diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-08-08 22:17:26 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-08-08 22:17:26 +0000 |
commit | 984760dbf5e48f6224dfe9e26e03536b3d38b6cd (patch) | |
tree | a99674322e524c4c90009b3bdae5fab0eebf2094 /drivers/video | |
parent | a7ce7d5e94c98ef5b867f61b2ebecd563f4b6ec9 (diff) |
Merge with Linux 2.4.0-test6-pre8.
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/acornfb.c | 7 | ||||
-rw-r--r-- | drivers/video/sa1100fb.c | 9 |
2 files changed, 9 insertions, 7 deletions
diff --git a/drivers/video/acornfb.c b/drivers/video/acornfb.c index f504cddaf..e5e0e4aad 100644 --- a/drivers/video/acornfb.c +++ b/drivers/video/acornfb.c @@ -22,6 +22,7 @@ #include <linux/malloc.h> #include <linux/init.h> #include <linux/fb.h> +#include <linux/wrapper.h> #include <asm/hardware.h> #include <asm/io.h> @@ -1532,8 +1533,8 @@ free_unused_pages(unsigned int virtual_start, unsigned int virtual_end) * set count to 1, and free * the page. */ - clear_bit(PG_reserved, &mem_map[MAP_NR(virtual_start)].flags); - atomic_set(&mem_map[MAP_NR(virtual_start)].count, 1); + mem_map_unreserve(virt_to_page(virtual_start)); + atomic_set(&virt_to_page(virtual_start)->count, 1); free_page(virtual_start); virtual_start += PAGE_SIZE; @@ -1628,7 +1629,7 @@ acornfb_init(void) for (page = current_par.screen_base; page < PAGE_ALIGN(current_par.screen_base + size); page += PAGE_SIZE) - mem_map[MAP_NR(page)].flags |= (1 << PG_reserved); + mem_map_reserve(virt_to_page(page)); /* Hand back any excess pages that we allocated. */ for (page = current_par.screen_base + size; page < top; page += PAGE_SIZE) free_page(page); diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c index 7a91d0b01..df86a674e 100644 --- a/drivers/video/sa1100fb.c +++ b/drivers/video/sa1100fb.c @@ -36,6 +36,7 @@ #include <linux/init.h> #include <linux/fb.h> #include <linux/delay.h> +#include <linux/wrapper.h> #include <asm/hardware.h> #include <asm/io.h> @@ -730,8 +731,8 @@ __init sa1100fb_map_video_memory(void) u_int required_pages; u_int extra_pages; u_int order; - u_int i; char *allocated_region; + struct page *page; if (VideoMemRegion != NULL) return -EINVAL; @@ -757,9 +758,9 @@ __init sa1100fb_map_video_memory(void) /* Set reserved flag for fb memory to allow it to be remapped into */ /* user space by the common fbmem driver using remap_page_range(). */ - for(i = MAP_NR(VideoMemRegion); - i < MAP_NR(VideoMemRegion + ALLOCATED_FB_MEM_SIZE); i++) - set_bit(PG_reserved, &mem_map[i].flags); + for(page = virt_to_page(VideoMemRegion); + page < virt_to_page(VideoMemRegion + ALLOCATED_FB_MEM_SIZE); page++) + mem_map_reserve(page); /* Remap the fb memory to a non-buffered, non-cached region */ VideoMemRegion = (u_char *)__ioremap((u_long)VideoMemRegion_phys, |