From 8b9363d1b1f7bc40fb68261f7659dea5124f2821 Mon Sep 17 00:00:00 2001 From: Rik Faith Date: Tue, 8 Aug 2000 16:04:21 +0000 Subject: Sync with Linux 2.4.0-test6-pre8 --- linux/memory.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'linux/memory.c') 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); } -- cgit v1.2.3