]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: move more pagetable-related definitions into pgtable*.h
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Fri, 13 Feb 2009 19:01:54 +0000 (11:01 -0800)
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Fri, 13 Feb 2009 19:35:01 +0000 (11:35 -0800)
PAGETABLE_LEVELS and the PTE masks should be in pgtable*.h

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
arch/x86/include/asm/page_32_types.h
arch/x86/include/asm/page_64_types.h
arch/x86/include/asm/page_types.h
arch/x86/include/asm/pgtable-2level_types.h
arch/x86/include/asm/pgtable-3level_types.h
arch/x86/include/asm/pgtable_64_types.h
arch/x86/include/asm/pgtable_types.h

index b5486aaf36ec75fcfb68879c0b9d5c727c36457a..f1e4a79a6e415702ab6930cedce937afc3e71d54 100644 (file)
 /* 44=32+12, the limit we can fit into an unsigned long pfn */
 #define __PHYSICAL_MASK_SHIFT  44
 #define __VIRTUAL_MASK_SHIFT   32
-#define PAGETABLE_LEVELS       3
 
 #else  /* !CONFIG_X86_PAE */
 #define __PHYSICAL_MASK_SHIFT  32
 #define __VIRTUAL_MASK_SHIFT   32
-#define PAGETABLE_LEVELS       2
 #endif /* CONFIG_X86_PAE */
 
 #ifndef __ASSEMBLY__
index bc73af3eda9ceaf6dc7a0f5a0d759c061e8c1c2a..d38c91b7024834a56be59db9c9b1bf411c698c50 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _ASM_X86_PAGE_64_DEFS_H
 #define _ASM_X86_PAGE_64_DEFS_H
 
-#define PAGETABLE_LEVELS       4
-
 #define THREAD_ORDER   1
 #define THREAD_SIZE  (PAGE_SIZE << THREAD_ORDER)
 #define CURRENT_MASK (~(THREAD_SIZE - 1))
index 2c52ff767584b21b05783ed58610a6ed1f6e14af..2d625da6603c36958cd51a130f6ae41ce2df0f3d 100644 (file)
    (ie, 32-bit PAE). */
 #define PHYSICAL_PAGE_MASK     (((signed long)PAGE_MASK) & __PHYSICAL_MASK)
 
-/* PTE_PFN_MASK extracts the PFN from a (pte|pmd|pud|pgd)val_t */
-#define PTE_PFN_MASK           ((pteval_t)PHYSICAL_PAGE_MASK)
-
-/* PTE_FLAGS_MASK extracts the flags from a (pte|pmd|pud|pgd)val_t */
-#define PTE_FLAGS_MASK         (~PTE_PFN_MASK)
-
 #define PMD_PAGE_SIZE          (_AC(1, UL) << PMD_SHIFT)
 #define PMD_PAGE_MASK          (~(PMD_PAGE_SIZE-1))
 
index 09ae67efcebd55c1a559099f91b29c06e2f8477a..daacc23e3fb95170173c5afd6f49ebbce5b2d5c3 100644 (file)
@@ -17,6 +17,7 @@ typedef union {
 #endif /* !__ASSEMBLY__ */
 
 #define SHARED_KERNEL_PMD      0
+#define PAGETABLE_LEVELS       2
 
 /*
  * traditional i386 two-level paging structure:
@@ -25,6 +26,7 @@ typedef union {
 #define PGDIR_SHIFT    22
 #define PTRS_PER_PGD   1024
 
+
 /*
  * the i386 is two-level, so we don't really have any
  * PMD directory physically.
index bcc89625ebe530964c5b23a13b212711651d2296..1bd5876c864949f4fd1ac3a9cd100ac64893f3ba 100644 (file)
@@ -24,6 +24,8 @@ typedef union {
 #define SHARED_KERNEL_PMD      1
 #endif
 
+#define PAGETABLE_LEVELS       3
+
 /*
  * PGDIR_SHIFT determines what a top-level page table entry can map
  */
index 2f59135c6f2a661e9dcb442f525ede76eea4b069..fbf42b8e03833d0537b5e8594a4a3f06a154e180 100644 (file)
@@ -18,6 +18,7 @@ typedef struct { pteval_t pte; } pte_t;
 #endif /* !__ASSEMBLY__ */
 
 #define SHARED_KERNEL_PMD      0
+#define PAGETABLE_LEVELS       4
 
 /*
  * PGDIR_SHIFT determines what a top-level page table entry can map
index 9dafe87be2de91e1d2945ae452cfad1a1cb5dbdb..4d258ad76a0fc04925ac484c1fa9b0bfc47a1cb9 100644 (file)
 
 #include <linux/types.h>
 
+/* PTE_PFN_MASK extracts the PFN from a (pte|pmd|pud|pgd)val_t */
+#define PTE_PFN_MASK           ((pteval_t)PHYSICAL_PAGE_MASK)
+
+/* PTE_FLAGS_MASK extracts the flags from a (pte|pmd|pud|pgd)val_t */
+#define PTE_FLAGS_MASK         (~PTE_PFN_MASK)
+
 typedef struct pgprot { pgprotval_t pgprot; } pgprot_t;
 
 typedef struct { pgdval_t pgd; } pgd_t;