diff options
author | Rik Faith <faith@alephnull.com> | 2000-08-08 16:04:21 +0000 |
---|---|---|
committer | Rik Faith <faith@alephnull.com> | 2000-08-08 16:04:21 +0000 |
commit | 8b9363d1b1f7bc40fb68261f7659dea5124f2821 (patch) | |
tree | 5292870b287ab2ad5ca0ea71487115b158c6d507 /linux/memory.c | |
parent | 9199075a6a975ebcc44aff53fe0f77080c01a30b (diff) |
Sync with Linux 2.4.0-test6-pre8
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); } |