diff options
-rw-r--r-- | arch/sh/include/asm/pgtable_32.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/sh/include/asm/pgtable_32.h b/arch/sh/include/asm/pgtable_32.h index 72ea209195bd..0db19db913c7 100644 --- a/arch/sh/include/asm/pgtable_32.h +++ b/arch/sh/include/asm/pgtable_32.h | |||
@@ -20,7 +20,7 @@ | |||
20 | * - Bit 9 is reserved by everyone and used by _PAGE_PROTNONE. | 20 | * - Bit 9 is reserved by everyone and used by _PAGE_PROTNONE. |
21 | * | 21 | * |
22 | * - Bits 10 and 11 are low bits of the PPN that are reserved on >= 4K pages. | 22 | * - Bits 10 and 11 are low bits of the PPN that are reserved on >= 4K pages. |
23 | * Bit 10 is used for _PAGE_ACCESSED, bit 11 remains unused. | 23 | * Bit 10 is used for _PAGE_ACCESSED, and bit 11 is used for _PAGE_SPECIAL. |
24 | * | 24 | * |
25 | * - On 29 bit platforms, bits 31 to 29 are used for the space attributes | 25 | * - On 29 bit platforms, bits 31 to 29 are used for the space attributes |
26 | * and timing control which (together with bit 0) are moved into the | 26 | * and timing control which (together with bit 0) are moved into the |
@@ -52,6 +52,7 @@ | |||
52 | #define _PAGE_PROTNONE 0x200 /* software: if not present */ | 52 | #define _PAGE_PROTNONE 0x200 /* software: if not present */ |
53 | #define _PAGE_ACCESSED 0x400 /* software: page referenced */ | 53 | #define _PAGE_ACCESSED 0x400 /* software: page referenced */ |
54 | #define _PAGE_FILE _PAGE_WT /* software: pagecache or swap? */ | 54 | #define _PAGE_FILE _PAGE_WT /* software: pagecache or swap? */ |
55 | #define _PAGE_SPECIAL 0x800 /* software: special page */ | ||
55 | 56 | ||
56 | #define _PAGE_SZ_MASK (_PAGE_SZ0 | _PAGE_SZ1) | 57 | #define _PAGE_SZ_MASK (_PAGE_SZ0 | _PAGE_SZ1) |
57 | #define _PAGE_PR_MASK (_PAGE_RW | _PAGE_USER) | 58 | #define _PAGE_PR_MASK (_PAGE_RW | _PAGE_USER) |
@@ -148,8 +149,12 @@ | |||
148 | # define _PAGE_SZHUGE (_PAGE_FLAGS_HARD) | 149 | # define _PAGE_SZHUGE (_PAGE_FLAGS_HARD) |
149 | #endif | 150 | #endif |
150 | 151 | ||
152 | /* | ||
153 | * Mask of bits that are to be preserved accross pgprot changes. | ||
154 | */ | ||
151 | #define _PAGE_CHG_MASK \ | 155 | #define _PAGE_CHG_MASK \ |
152 | (PTE_MASK | _PAGE_ACCESSED | _PAGE_CACHABLE | _PAGE_DIRTY) | 156 | (PTE_MASK | _PAGE_ACCESSED | _PAGE_CACHABLE | \ |
157 | _PAGE_DIRTY | _PAGE_SPECIAL) | ||
153 | 158 | ||
154 | #ifndef __ASSEMBLY__ | 159 | #ifndef __ASSEMBLY__ |
155 | 160 | ||
@@ -328,7 +333,7 @@ static inline void set_pte(pte_t *ptep, pte_t pte) | |||
328 | #define pte_dirty(pte) ((pte).pte_low & _PAGE_DIRTY) | 333 | #define pte_dirty(pte) ((pte).pte_low & _PAGE_DIRTY) |
329 | #define pte_young(pte) ((pte).pte_low & _PAGE_ACCESSED) | 334 | #define pte_young(pte) ((pte).pte_low & _PAGE_ACCESSED) |
330 | #define pte_file(pte) ((pte).pte_low & _PAGE_FILE) | 335 | #define pte_file(pte) ((pte).pte_low & _PAGE_FILE) |
331 | #define pte_special(pte) (0) | 336 | #define pte_special(pte) ((pte).pte_low & _PAGE_SPECIAL) |
332 | 337 | ||
333 | #ifdef CONFIG_X2TLB | 338 | #ifdef CONFIG_X2TLB |
334 | #define pte_write(pte) ((pte).pte_high & _PAGE_EXT_USER_WRITE) | 339 | #define pte_write(pte) ((pte).pte_high & _PAGE_EXT_USER_WRITE) |
@@ -358,8 +363,9 @@ PTE_BIT_FUNC(low, mkclean, &= ~_PAGE_DIRTY); | |||
358 | PTE_BIT_FUNC(low, mkdirty, |= _PAGE_DIRTY); | 363 | PTE_BIT_FUNC(low, mkdirty, |= _PAGE_DIRTY); |
359 | PTE_BIT_FUNC(low, mkold, &= ~_PAGE_ACCESSED); | 364 | PTE_BIT_FUNC(low, mkold, &= ~_PAGE_ACCESSED); |
360 | PTE_BIT_FUNC(low, mkyoung, |= _PAGE_ACCESSED); | 365 | PTE_BIT_FUNC(low, mkyoung, |= _PAGE_ACCESSED); |
366 | PTE_BIT_FUNC(low, mkspecial, |= _PAGE_SPECIAL); | ||
361 | 367 | ||
362 | static inline pte_t pte_mkspecial(pte_t pte) { return pte; } | 368 | #define __HAVE_ARCH_PTE_SPECIAL |
363 | 369 | ||
364 | /* | 370 | /* |
365 | * Macro and implementation to make a page protection as uncachable. | 371 | * Macro and implementation to make a page protection as uncachable. |