diff options
Diffstat (limited to 'linux/memory.c')
-rw-r--r-- | linux/memory.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/linux/memory.c b/linux/memory.c index 5023de80..bcb674b5 100644 --- a/linux/memory.c +++ b/linux/memory.c @@ -246,7 +246,12 @@ unsigned long drm_alloc_pages(int order, int area) for (addr = address, sz = bytes; sz > 0; addr += PAGE_SIZE, sz -= PAGE_SIZE) { +#if LINUX_VERSION_CODE >= 0x020400 + /* Argument type changed in 2.4.0-test6/pre8 */ + mem_map_reserve(virt_to_page(addr)); +#else mem_map_reserve(MAP_NR(addr)); +#endif } return address; @@ -267,7 +272,12 @@ void drm_free_pages(unsigned long address, int order, int area) for (addr = address, sz = bytes; sz > 0; addr += PAGE_SIZE, sz -= PAGE_SIZE) { +#if LINUX_VERSION_CODE >= 0x020400 + /* Argument type changed in 2.4.0-test6/pre8 */ + mem_map_unreserve(virt_to_page(addr)); +#else mem_map_unreserve(MAP_NR(addr)); +#endif } free_pages(address, order); } |