patch-2.1.16 linux/include/asm-ppc/page.h

Next file: linux/include/asm-ppc/pgtable.h
Previous file: linux/include/asm-ppc/mmu.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.15/linux/include/asm-ppc/page.h linux/include/asm-ppc/page.h
@@ -6,8 +6,6 @@
 #define PAGE_SIZE	(1UL << PAGE_SHIFT)
 #define PAGE_MASK	(~(PAGE_SIZE-1))
 
-void invalidate(void);
-
 #ifdef __KERNEL__
 
 #define STRICT_MM_TYPECHECKS
@@ -59,30 +57,15 @@
 
 #define KERNELBASE	0x90000000
 #define PAGE_OFFSET	KERNELBASE
-#define MAP_NR(addr)	((((unsigned long)addr) - PAGE_OFFSET) >> PAGE_SHIFT)
-#define MAP_PAGE_RESERVED	(1<<15)
-
 
-#if 0  /* Now defined in "mm.h" */
-/*
- * This used to be an unsigned short...
- * 
- *                         -- Cort
- */
-/*typedef unsigned short mem_map_t;*/
+#define clear_page(page)        memset((void *)(page), 0, PAGE_SIZE)
+#define copy_page(to,from)	memcpy((void *)(to), (void *)(from), PAGE_SIZE)
+/* map phys->virtual and virtual->phys */
+#define __pa(x)			((unsigned long)(x)-PAGE_OFFSET)
+#define __va(x)			((void *)((unsigned long)(x)+PAGE_OFFSET))
 
-typedef struct {
-	unsigned count:30,
-		 dirty:1,
-		 reserved:1;
-} mem_map_t;
-#endif
-
-/* Certain architectures need to do special things when pte's
- * within a page table are directly modified.  Thus, the following
- * hook is made available.
- */
-#define set_pte(pteptr, pteval) ((*(pteptr)) = (pteval))
+#define MAP_NR(addr)	(__pa(addr) >> PAGE_SHIFT)
+#define MAP_PAGE_RESERVED	(1<<15)
 
 
 #endif /* __KERNEL__ */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov