patch-2.4.19 linux-2.4.19/include/asm-mips/page.h
Next file: linux-2.4.19/include/asm-mips/parport.h
Previous file: linux-2.4.19/include/asm-mips/paccess.h
Back to the patch index
Back to the overall index
- Lines: 117
- Date:
Fri Aug 2 17:39:45 2002
- Orig file:
linux-2.4.18/include/asm-mips/page.h
- Orig date:
Wed Aug 9 13:46:02 2000
diff -urN linux-2.4.18/include/asm-mips/page.h linux-2.4.19/include/asm-mips/page.h
@@ -1,5 +1,4 @@
-/* $Id: page.h,v 1.9 2000/02/24 00:13:19 ralf Exp $
- *
+/*
* Definitions for page handling
*
* This file is subject to the terms and conditions of the GNU General Public
@@ -11,18 +10,55 @@
#ifndef __ASM_PAGE_H
#define __ASM_PAGE_H
+#include <linux/config.h>
+
/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT 12
-#define PAGE_SIZE (1UL << PAGE_SHIFT)
+#define PAGE_SIZE (1L << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
#ifdef __KERNEL__
-#ifndef _LANGUAGE_ASSEMBLY
+#ifndef __ASSEMBLY__
#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)
+/*
+ * Prototypes for clear_page / copy_page variants with processor dependant
+ * optimizations.
+ */
+void andes_clear_page(void * page);
+void mips32_clear_page_dc(unsigned long page);
+void mips32_clear_page_sc(unsigned long page);
+void r3k_clear_page(void * page);
+void r4k_clear_page_d16(void * page);
+void r4k_clear_page_d32(void * page);
+void r4k_clear_page_r4600_v1(void * page);
+void r4k_clear_page_r4600_v2(void * page);
+void r4k_clear_page_s16(void * page);
+void r4k_clear_page_s32(void * page);
+void r4k_clear_page_s64(void * page);
+void r4k_clear_page_s128(void * page);
+void r5432_clear_page_d32(void * page);
+void rm7k_clear_page(void * page);
+void sb1_clear_page(void * page);
+void andes_copy_page(void * to, void * from);
+void mips32_copy_page_dc(unsigned long to, unsigned long from);
+void mips32_copy_page_sc(unsigned long to, unsigned long from);
+void r3k_copy_page(void * to, void * from);
+void r4k_copy_page_d16(void * to, void * from);
+void r4k_copy_page_d32(void * to, void * from);
+void r4k_copy_page_r4600_v1(void * to, void * from);
+void r4k_copy_page_r4600_v2(void * to, void * from);
+void r4k_copy_page_s16(void * to, void * from);
+void r4k_copy_page_s32(void * to, void * from);
+void r4k_copy_page_s64(void * to, void * from);
+void r4k_copy_page_s128(void * to, void * from);
+void r5432_copy_page_d32(void * to, void * from);
+void rm7k_copy_page(void * to, void * from);
+void sb1_copy_page(void * to, void * from);
+
extern void (*_clear_page)(void * page);
extern void (*_copy_page)(void * to, void * from);
@@ -34,7 +70,11 @@
/*
* These are used to make use of C type-checking..
*/
+#ifdef CONFIG_64BIT_PHYS_ADDR
+typedef struct { unsigned long long pte; } pte_t;
+#else
typedef struct { unsigned long pte; } pte_t;
+#endif
typedef struct { unsigned long pmd; } pmd_t;
typedef struct { unsigned long pgd; } pgd_t;
typedef struct { unsigned long pgprot; } pgprot_t;
@@ -44,8 +84,10 @@
#define pgd_val(x) ((x).pgd)
#define pgprot_val(x) ((x).pgprot)
+#define ptep_buddy(x) ((pte_t *)((unsigned long)(x) ^ sizeof(pte_t)))
+
#define __pte(x) ((pte_t) { (x) } )
-#define __pme(x) ((pme_t) { (x) } )
+#define __pmd(x) ((pmd_t) { (x) } )
#define __pgd(x) ((pgd_t) { (x) } )
#define __pgprot(x) ((pgprot_t) { (x) } )
@@ -63,10 +105,10 @@
return order;
}
-#endif /* _LANGUAGE_ASSEMBLY */
+#endif /* !__ASSEMBLY__ */
/* to align the pointer to the (next) page boundary */
-#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
+#define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK)
/*
* This handles the memory map.
@@ -78,6 +120,14 @@
#define virt_to_page(kaddr) (mem_map + (__pa(kaddr) >> PAGE_SHIFT))
#define VALID_PAGE(page) ((page - mem_map) < max_mapnr)
+#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
+ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
+
+/*
+ * Memory above this physical address will be considered highmem.
+ */
+#define HIGHMEM_START (0x20000000)
+
#endif /* defined (__KERNEL__) */
#endif /* __ASM_PAGE_H */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)