patch-2.3.31 linux/arch/i386/mm/ioremap.c
Next file: linux/arch/m68k/config.in
Previous file: linux/arch/i386/kernel/time.c
Back to the patch index
Back to the overall index
- Lines: 21
- Date:
Tue Dec 7 16:22:34 1999
- Orig file:
v2.3.30/linux/arch/i386/mm/ioremap.c
- Orig date:
Tue Nov 23 22:42:20 1999
diff -u --recursive --new-file v2.3.30/linux/arch/i386/mm/ioremap.c linux/arch/i386/mm/ioremap.c
@@ -119,8 +119,18 @@
/*
* Don't allow anybody to remap normal RAM that we're using..
*/
- if (phys_addr < virt_to_phys(high_memory))
- return NULL;
+ if (phys_addr < virt_to_phys(high_memory)) {
+ char *t_addr, *t_end;
+ int i;
+
+ t_addr = __va(phys_addr);
+ t_end = t_addr + (size - 1);
+
+ for(i = MAP_NR(t_addr); i < MAP_NR(t_end); i++) {
+ if(!PageReserved(mem_map + i))
+ return NULL;
+ }
+ }
/*
* Mappings have to be page-aligned
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)