diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/include/asm/pgtable.h | 54 | ||||
-rw-r--r-- | arch/powerpc/include/asm/pte-common.h | 5 | ||||
-rw-r--r-- | arch/powerpc/include/asm/pte-hash64.h | 6 |
3 files changed, 1 insertions, 64 deletions
diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h index 1146006d3477..79fee2eb8d56 100644 --- a/arch/powerpc/include/asm/pgtable.h +++ b/arch/powerpc/include/asm/pgtable.h | |||
@@ -55,64 +55,12 @@ static inline int pmd_protnone(pmd_t pmd) | |||
55 | { | 55 | { |
56 | return pte_protnone(pmd_pte(pmd)); | 56 | return pte_protnone(pmd_pte(pmd)); |
57 | } | 57 | } |
58 | 58 | #endif /* CONFIG_NUMA_BALANCING */ | |
59 | static inline int pte_present(pte_t pte) | ||
60 | { | ||
61 | return pte_val(pte) & _PAGE_NUMA_MASK; | ||
62 | } | ||
63 | |||
64 | #define pte_present_nonuma pte_present_nonuma | ||
65 | static inline int pte_present_nonuma(pte_t pte) | ||
66 | { | ||
67 | return pte_val(pte) & (_PAGE_PRESENT); | ||
68 | } | ||
69 | |||
70 | #define ptep_set_numa ptep_set_numa | ||
71 | static inline void ptep_set_numa(struct mm_struct *mm, unsigned long addr, | ||
72 | pte_t *ptep) | ||
73 | { | ||
74 | if ((pte_val(*ptep) & _PAGE_PRESENT) == 0) | ||
75 | VM_BUG_ON(1); | ||
76 | |||
77 | pte_update(mm, addr, ptep, _PAGE_PRESENT, _PAGE_NUMA, 0); | ||
78 | return; | ||
79 | } | ||
80 | |||
81 | #define pmdp_set_numa pmdp_set_numa | ||
82 | static inline void pmdp_set_numa(struct mm_struct *mm, unsigned long addr, | ||
83 | pmd_t *pmdp) | ||
84 | { | ||
85 | if ((pmd_val(*pmdp) & _PAGE_PRESENT) == 0) | ||
86 | VM_BUG_ON(1); | ||
87 | |||
88 | pmd_hugepage_update(mm, addr, pmdp, _PAGE_PRESENT, _PAGE_NUMA); | ||
89 | return; | ||
90 | } | ||
91 | |||
92 | /* | ||
93 | * Generic NUMA pte helpers expect pteval_t and pmdval_t types to exist | ||
94 | * which was inherited from x86. For the purposes of powerpc pte_basic_t and | ||
95 | * pmd_t are equivalent | ||
96 | */ | ||
97 | #define pteval_t pte_basic_t | ||
98 | #define pmdval_t pmd_t | ||
99 | static inline pteval_t ptenuma_flags(pte_t pte) | ||
100 | { | ||
101 | return pte_val(pte) & _PAGE_NUMA_MASK; | ||
102 | } | ||
103 | |||
104 | static inline pmdval_t pmdnuma_flags(pmd_t pmd) | ||
105 | { | ||
106 | return pmd_val(pmd) & _PAGE_NUMA_MASK; | ||
107 | } | ||
108 | |||
109 | # else | ||
110 | 59 | ||
111 | static inline int pte_present(pte_t pte) | 60 | static inline int pte_present(pte_t pte) |
112 | { | 61 | { |
113 | return pte_val(pte) & _PAGE_PRESENT; | 62 | return pte_val(pte) & _PAGE_PRESENT; |
114 | } | 63 | } |
115 | #endif /* CONFIG_NUMA_BALANCING */ | ||
116 | 64 | ||
117 | /* Conversion functions: convert a page and protection to a page entry, | 65 | /* Conversion functions: convert a page and protection to a page entry, |
118 | * and a page entry and page directory to the page they refer to. | 66 | * and a page entry and page directory to the page they refer to. |
diff --git a/arch/powerpc/include/asm/pte-common.h b/arch/powerpc/include/asm/pte-common.h index 2aef9b7a0eb2..c5a755ef7011 100644 --- a/arch/powerpc/include/asm/pte-common.h +++ b/arch/powerpc/include/asm/pte-common.h | |||
@@ -104,11 +104,6 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void); | |||
104 | _PAGE_USER | _PAGE_ACCESSED | _PAGE_RO | \ | 104 | _PAGE_USER | _PAGE_ACCESSED | _PAGE_RO | \ |
105 | _PAGE_RW | _PAGE_HWWRITE | _PAGE_DIRTY | _PAGE_EXEC) | 105 | _PAGE_RW | _PAGE_HWWRITE | _PAGE_DIRTY | _PAGE_EXEC) |
106 | 106 | ||
107 | #ifdef CONFIG_NUMA_BALANCING | ||
108 | /* Mask of bits that distinguish present and numa ptes */ | ||
109 | #define _PAGE_NUMA_MASK (_PAGE_NUMA|_PAGE_PRESENT) | ||
110 | #endif | ||
111 | |||
112 | /* | 107 | /* |
113 | * We define 2 sets of base prot bits, one for basic pages (ie, | 108 | * We define 2 sets of base prot bits, one for basic pages (ie, |
114 | * cacheable kernel and user pages) and one for non cacheable | 109 | * cacheable kernel and user pages) and one for non cacheable |
diff --git a/arch/powerpc/include/asm/pte-hash64.h b/arch/powerpc/include/asm/pte-hash64.h index 2505d8eab15c..55aea0caf95e 100644 --- a/arch/powerpc/include/asm/pte-hash64.h +++ b/arch/powerpc/include/asm/pte-hash64.h | |||
@@ -27,12 +27,6 @@ | |||
27 | #define _PAGE_RW 0x0200 /* software: user write access allowed */ | 27 | #define _PAGE_RW 0x0200 /* software: user write access allowed */ |
28 | #define _PAGE_BUSY 0x0800 /* software: PTE & hash are busy */ | 28 | #define _PAGE_BUSY 0x0800 /* software: PTE & hash are busy */ |
29 | 29 | ||
30 | /* | ||
31 | * Used for tracking numa faults | ||
32 | */ | ||
33 | #define _PAGE_NUMA 0x00000010 /* Gather numa placement stats */ | ||
34 | |||
35 | |||
36 | /* No separate kernel read-only */ | 30 | /* No separate kernel read-only */ |
37 | #define _PAGE_KERNEL_RW (_PAGE_RW | _PAGE_DIRTY) /* user access blocked by key */ | 31 | #define _PAGE_KERNEL_RW (_PAGE_RW | _PAGE_DIRTY) /* user access blocked by key */ |
38 | #define _PAGE_KERNEL_RO _PAGE_KERNEL_RW | 32 | #define _PAGE_KERNEL_RO _PAGE_KERNEL_RW |