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;
}
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);
}
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);
}
#define __user
#endif
-#ifndef __put_page
+#if !defined(__put_page)
#define __put_page(p) atomic_dec(&(p)->count)
#endif
+#if !defined(__GFP_COMP)
+#define __GFP_COMP 0
+#endif
+
#ifndef REMAP_PAGE_RANGE_5_ARGS
#define DRM_RPR_ARG(vma)
#else