patch-2.2.8 linux/include/asm-m68k/page.h
Next file: linux/include/asm-m68k/pgtable.h
Previous file: linux/include/asm-m68k/oplib.h
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
Tue May 11 09:57:14 1999
- Orig file:
v2.2.7/linux/include/asm-m68k/page.h
- Orig date:
Wed Jan 20 23:14:06 1999
diff -u --recursive --new-file v2.2.7/linux/include/asm-m68k/page.h linux/include/asm-m68k/page.h
@@ -110,7 +110,22 @@
/* This handles the memory map.. */
#define PAGE_OFFSET 0
#define __pa(x) ((unsigned long)(x)-PAGE_OFFSET)
-#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET))
+/*
+ * A hacky workaround for the problems with mmap() of frame buffer
+ * memory in the lower 16MB physical memoryspace.
+ *
+ * This is a short term solution, we will have to deal properly
+ * with this in 2.3.x.
+ */
+extern inline void *__va(unsigned long physaddr)
+{
+#ifdef CONFIG_AMIGA
+ if (MACH_IS_AMIGA && (physaddr < 16*1024*1024))
+ return (void *)0xffffffff;
+ else
+#endif
+ return (void *)(physaddr+PAGE_OFFSET);
+}
#define MAP_NR(addr) (__pa(addr) >> PAGE_SHIFT)
#endif /* __KERNEL__ */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)