diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-10-27 03:40:19 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-10-27 03:40:19 -0400 |
commit | a16382ce1cbcc3ab12274e20f92c09c439629162 (patch) | |
tree | 68a3a82ffa6c90e6b06643567bc1e1f733d5467e /arch/sh | |
parent | 48ccb2ceec6fb1d46d1bc92dadc602d4341a0149 (diff) |
sh64: _PAGE_SPECIAL support.
Now that sh64 has grown extended page flag support we finally have a free
bit for _PAGE_SPECIAL. Wire it up.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/include/asm/pgtable.h | 2 | ||||
-rw-r--r-- | arch/sh/include/asm/pgtable_32.h | 2 | ||||
-rw-r--r-- | arch/sh/include/asm/pgtable_64.h | 9 |
3 files changed, 7 insertions, 6 deletions
diff --git a/arch/sh/include/asm/pgtable.h b/arch/sh/include/asm/pgtable.h index 02f77450cd8f..a15f1058bbf4 100644 --- a/arch/sh/include/asm/pgtable.h +++ b/arch/sh/include/asm/pgtable.h | |||
@@ -169,6 +169,8 @@ extern void page_table_range_init(unsigned long start, unsigned long end, | |||
169 | #define HAVE_ARCH_UNMAPPED_AREA | 169 | #define HAVE_ARCH_UNMAPPED_AREA |
170 | #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN | 170 | #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN |
171 | 171 | ||
172 | #define __HAVE_ARCH_PTE_SPECIAL | ||
173 | |||
172 | #include <asm-generic/pgtable.h> | 174 | #include <asm-generic/pgtable.h> |
173 | 175 | ||
174 | #endif /* __ASM_SH_PGTABLE_H */ | 176 | #endif /* __ASM_SH_PGTABLE_H */ |
diff --git a/arch/sh/include/asm/pgtable_32.h b/arch/sh/include/asm/pgtable_32.h index e172d696e52b..ae1a6ef71f37 100644 --- a/arch/sh/include/asm/pgtable_32.h +++ b/arch/sh/include/asm/pgtable_32.h | |||
@@ -378,8 +378,6 @@ PTE_BIT_FUNC(low, mkold, &= ~_PAGE_ACCESSED); | |||
378 | PTE_BIT_FUNC(low, mkyoung, |= _PAGE_ACCESSED); | 378 | PTE_BIT_FUNC(low, mkyoung, |= _PAGE_ACCESSED); |
379 | PTE_BIT_FUNC(low, mkspecial, |= _PAGE_SPECIAL); | 379 | PTE_BIT_FUNC(low, mkspecial, |= _PAGE_SPECIAL); |
380 | 380 | ||
381 | #define __HAVE_ARCH_PTE_SPECIAL | ||
382 | |||
383 | /* | 381 | /* |
384 | * Macro and implementation to make a page protection as uncachable. | 382 | * Macro and implementation to make a page protection as uncachable. |
385 | */ | 383 | */ |
diff --git a/arch/sh/include/asm/pgtable_64.h b/arch/sh/include/asm/pgtable_64.h index 0ee46776dad6..22113f7fc83c 100644 --- a/arch/sh/include/asm/pgtable_64.h +++ b/arch/sh/include/asm/pgtable_64.h | |||
@@ -132,6 +132,7 @@ static __inline__ void set_pte(pte_t *pteptr, pte_t pteval) | |||
132 | * anything above the PPN field. | 132 | * anything above the PPN field. |
133 | */ | 133 | */ |
134 | #define _PAGE_WIRED _PAGE_EXT(0x001) /* software: wire the tlb entry */ | 134 | #define _PAGE_WIRED _PAGE_EXT(0x001) /* software: wire the tlb entry */ |
135 | #define _PAGE_SPECIAL _PAGE_EXT(0x002) | ||
135 | 136 | ||
136 | #define _PAGE_CLEAR_FLAGS (_PAGE_PRESENT | _PAGE_FILE | _PAGE_SHARED | \ | 137 | #define _PAGE_CLEAR_FLAGS (_PAGE_PRESENT | _PAGE_FILE | _PAGE_SHARED | \ |
137 | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_WIRED) | 138 | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_WIRED) |
@@ -175,7 +176,8 @@ static __inline__ void set_pte(pte_t *pteptr, pte_t pteval) | |||
175 | /* Default flags for a User page */ | 176 | /* Default flags for a User page */ |
176 | #define _PAGE_TABLE (_KERNPG_TABLE | _PAGE_USER) | 177 | #define _PAGE_TABLE (_KERNPG_TABLE | _PAGE_USER) |
177 | 178 | ||
178 | #define _PAGE_CHG_MASK (PTE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY) | 179 | #define _PAGE_CHG_MASK (PTE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | \ |
180 | _PAGE_SPECIAL) | ||
179 | 181 | ||
180 | /* | 182 | /* |
181 | * We have full permissions (Read/Write/Execute/Shared). | 183 | * We have full permissions (Read/Write/Execute/Shared). |
@@ -265,7 +267,7 @@ static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } | |||
265 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | 267 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } |
266 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } | 268 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } |
267 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; } | 269 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; } |
268 | static inline int pte_special(pte_t pte){ return 0; } | 270 | static inline int pte_special(pte_t pte){ return pte_val(pte) & _PAGE_SPECIAL; } |
269 | 271 | ||
270 | static inline pte_t pte_wrprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_WRITE)); return pte; } | 272 | static inline pte_t pte_wrprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_WRITE)); return pte; } |
271 | static inline pte_t pte_mkclean(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_DIRTY)); return pte; } | 273 | static inline pte_t pte_mkclean(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_DIRTY)); return pte; } |
@@ -274,8 +276,7 @@ static inline pte_t pte_mkwrite(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | | |||
274 | static inline pte_t pte_mkdirty(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); return pte; } | 276 | static inline pte_t pte_mkdirty(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); return pte; } |
275 | static inline pte_t pte_mkyoung(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_ACCESSED)); return pte; } | 277 | static inline pte_t pte_mkyoung(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_ACCESSED)); return pte; } |
276 | static inline pte_t pte_mkhuge(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_SZHUGE)); return pte; } | 278 | static inline pte_t pte_mkhuge(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_SZHUGE)); return pte; } |
277 | static inline pte_t pte_mkspecial(pte_t pte) { return pte; } | 279 | static inline pte_t pte_mkspecial(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_SPECIAL)); return pte; } |
278 | |||
279 | 280 | ||
280 | /* | 281 | /* |
281 | * Conversion functions: convert a page and protection to a page entry. | 282 | * Conversion functions: convert a page and protection to a page entry. |