patch-2.4.25 linux-2.4.25/include/asm-mips/page.h

Next file: linux-2.4.25/include/asm-mips/param.h
Previous file: linux-2.4.25/include/asm-mips/msgbuf.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.24/include/asm-mips/page.h linux-2.4.25/include/asm-mips/page.h
@@ -5,32 +5,44 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (C) 1994 - 1999 by Ralf Baechle
+ * Copyright (C) 1994 - 1999, 2003 by Ralf Baechle
  */
 #ifndef __ASM_PAGE_H
 #define __ASM_PAGE_H
 
 #include <linux/config.h>
+#include <asm/break.h>
 
-/* PAGE_SHIFT determines the page size */
+#ifdef __KERNEL__
+
+/*
+ * PAGE_SHIFT determines the page size
+ */
+#ifdef CONFIG_PAGE_SIZE_4KB
 #define PAGE_SHIFT	12
+#endif
+#ifdef CONFIG_PAGE_SIZE_16KB
+#define PAGE_SHIFT	14
+#endif
+#ifdef CONFIG_PAGE_SIZE_64KB
+#define PAGE_SHIFT	16
+#endif
 #define PAGE_SIZE	(1L << PAGE_SHIFT)
 #define PAGE_MASK	(~(PAGE_SIZE-1))
 
-#ifdef __KERNEL__
-
 #ifndef __ASSEMBLY__
 
 #include <asm/cacheflush.h>
 
-#define BUG() do { printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); *(int *)0=0; } while (0)
-#define PAGE_BUG(page) do {  BUG(); } while (0)
+#define BUG()								\
+do {									\
+	__asm__ __volatile__("break %0" : : "i" (BRK_BUG));		\
+} while (0)
 
-extern void (*_clear_page)(void * page);
-extern void (*_copy_page)(void * to, void * from);
+#define PAGE_BUG(page) do {  BUG(); } while (0)
 
-#define clear_page(page)	_clear_page(page)
-#define copy_page(to, from)	_copy_page(to, from)
+extern void clear_page(void * page);
+extern void copy_page(void * to, void * from);
 
 extern unsigned long shm_align_mask;
 
@@ -90,7 +102,7 @@
 #define __pgprot(x)	((pgprot_t) { (x) } )
 
 /* Pure 2^n version of get_order */
-extern __inline__ int get_order(unsigned long size)
+static __inline__ int get_order(unsigned long size)
 {
 	int order;
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)