patch-2.2.18 linux/include/asm-m68k/page.h
Next file: linux/include/asm-m68k/semaphore.h
Previous file: linux/include/asm-m68k/math-emu.h
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Fri Oct 13 23:32:07 2000
- Orig file:
v2.2.17/include/asm-m68k/page.h
- Orig date:
Fri Apr 21 12:46:49 2000
diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/include/asm-m68k/page.h linux/include/asm-m68k/page.h
@@ -11,6 +11,7 @@
#ifdef __KERNEL__
#include <asm/setup.h>
+#include <asm/bootinfo.h>
#define STRICT_MM_TYPECHECKS
@@ -124,11 +125,29 @@
#ifdef CONFIG_AMIGA
if (MACH_IS_AMIGA && (physaddr < 16*1024*1024))
return (void *)0xffffffff;
- else
#endif
- return (void *)(physaddr+PAGE_OFFSET);
+#ifdef CONFIG_MAC
+ if (MACH_IS_MAC && (physaddr >= mac_bi_data.videoaddr) &&
+ (physaddr < mac_bi_data.videoaddr +
+ (mac_bi_data.videorow * (mac_bi_data.dimensions>>16))))
+ return (void *)0xffffffff;
+#endif
+ return (void *)(physaddr+PAGE_OFFSET);
}
#define MAP_NR(addr) (__pa(addr) >> PAGE_SHIFT)
+
+extern __inline__ int get_order(unsigned long size)
+{
+ int order;
+
+ size = (size-1) >> (PAGE_SHIFT-1);
+ order = -1;
+ do {
+ size >>= 1;
+ order++;
+ } while (size);
+ return order;
+}
#endif /* __KERNEL__ */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)