diff options
author | Dave Airlie <airlied@linux.ie> | 2006-04-23 09:05:05 +0000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-04-23 09:05:05 +0000 |
commit | d365f031292d0f50755a3049c410443b1075fff5 (patch) | |
tree | 80027dd2f45e1a6a24e48edbf4cf98eaafffa39e /linux-core/ati_pcigart.c | |
parent | 30a5787d3671fba89d14efb638695c2dd61adf03 (diff) |
fixup GFP_COMP for older kernels and get_page/put_page for newer
Diffstat (limited to 'linux-core/ati_pcigart.c')
-rw-r--r-- | linux-core/ati_pcigart.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/linux-core/ati_pcigart.c b/linux-core/ati_pcigart.c index 6e4353b5..14317925 100644 --- a/linux-core/ati_pcigart.c +++ b/linux-core/ati_pcigart.c @@ -59,7 +59,8 @@ static void *drm_ati_alloc_pcigart_table(void) int i; DRM_DEBUG("%s\n", __FUNCTION__); - address = __get_free_pages(GFP_KERNEL, ATI_PCIGART_TABLE_ORDER); + address = __get_free_pages(GFP_KERNEL | __GFP_COMP, + ATI_PCIGART_TABLE_ORDER); if (address == 0UL) { return 0; } @@ -67,7 +68,9 @@ static void *drm_ati_alloc_pcigart_table(void) page = virt_to_page(address); for (i = 0; i < ATI_PCIGART_TABLE_PAGES; i++, page++) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) get_page(page); +#endif SetPageReserved(page); } @@ -84,7 +87,9 @@ static void drm_ati_free_pcigart_table(void *address) page = virt_to_page((unsigned long)address); for (i = 0; i < ATI_PCIGART_TABLE_PAGES; i++, page++) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) __put_page(page); +#endif ClearPageReserved(page); } |