summaryrefslogtreecommitdiffstats
path: root/include/asm-ppc/page.h
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@nuclecu.unam.mx>1997-08-06 19:14:48 +0000
committerMiguel de Icaza <miguel@nuclecu.unam.mx>1997-08-06 19:14:48 +0000
commite2819e52a162873ff5061de81bb749831bdb5de9 (patch)
tree6067ea700202750ba335a423696f2972700e5f76 /include/asm-ppc/page.h
parent17a005074429bbf143e40401f405ae4363e56828 (diff)
Merge to 2.1.38.
IMPORTANT NOTE: I could not figure out what information is the one that should be used for the following files (ie, those that were in our tree, or those that came from Linus' patch), please, check these: include/asm-mips/jazz.h include/asm-mips/jazzdma.h include/asm-mips/ioctls.h
Diffstat (limited to 'include/asm-ppc/page.h')
-rw-r--r--include/asm-ppc/page.h32
1 files changed, 27 insertions, 5 deletions
diff --git a/include/asm-ppc/page.h b/include/asm-ppc/page.h
index 273d31fd0..a18d5e324 100644
--- a/include/asm-ppc/page.h
+++ b/include/asm-ppc/page.h
@@ -1,11 +1,32 @@
#ifndef _PPC_PAGE_H
#define _PPC_PAGE_H
+#include <linux/config.h>
+
/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT 12
#define PAGE_SIZE (1UL << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
+/* This handles the memory map.. */
+
+/*
+ * these virtual mappings for prep and pmac
+ * on the prep machine the io areas are at different physical locations
+ * than their virtual address. On the pmac the io areas
+ * are mapped 1-1 virtual/physical.
+ * -- Cort
+ */
+#ifdef CONFIG_PREP
+#define KERNELBASE 0x90000000
+#endif
+#ifdef CONFIG_PMAC
+#define KERNELBASE 0xc0000000
+#endif
+#define PAGE_OFFSET KERNELBASE
+
+
+#ifndef __ASSEMBLY__
#ifdef __KERNEL__
#define STRICT_MM_TYPECHECKS
@@ -50,13 +71,13 @@ typedef unsigned long pgprot_t;
#endif
+
+/* align addr on a size boundry - adjust address up if needed -- Cort */
+#define _ALIGN(addr,size) (((addr)+size-1)&(~(size-1)))
+
/* to align the pointer to the (next) page boundary */
#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
-/* This handles the memory map.. */
-
-#define KERNELBASE 0x90000000
-#define PAGE_OFFSET KERNELBASE
#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
#define copy_page(to,from) memcpy((void *)(to), (void *)(from), PAGE_SIZE)
@@ -67,7 +88,8 @@ typedef unsigned long pgprot_t;
#define MAP_NR(addr) (__pa(addr) >> PAGE_SHIFT)
#define MAP_PAGE_RESERVED (1<<15)
+extern __inline__ unsigned long get_prezerod_page(void);
#endif /* __KERNEL__ */
-
+#endif /* __ASSEMBLY__ */
#endif /* _PPC_PAGE_H */