diff options
Diffstat (limited to 'include/asm-powerpc/pgtable-ppc64.h')
-rw-r--r-- | include/asm-powerpc/pgtable-ppc64.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/include/asm-powerpc/pgtable-ppc64.h b/include/asm-powerpc/pgtable-ppc64.h index 27f18695f7d6..7686569a0bef 100644 --- a/include/asm-powerpc/pgtable-ppc64.h +++ b/include/asm-powerpc/pgtable-ppc64.h | |||
@@ -65,15 +65,15 @@ | |||
65 | 65 | ||
66 | #define VMALLOC_REGION_ID (REGION_ID(VMALLOC_START)) | 66 | #define VMALLOC_REGION_ID (REGION_ID(VMALLOC_START)) |
67 | #define KERNEL_REGION_ID (REGION_ID(PAGE_OFFSET)) | 67 | #define KERNEL_REGION_ID (REGION_ID(PAGE_OFFSET)) |
68 | #define VMEMMAP_REGION_ID (0xfUL) | ||
68 | #define USER_REGION_ID (0UL) | 69 | #define USER_REGION_ID (0UL) |
69 | 70 | ||
70 | /* | 71 | /* |
71 | * Defines the address of the vmemap area, in the top 16th of the | 72 | * Defines the address of the vmemap area, in its own region |
72 | * kernel region. | ||
73 | */ | 73 | */ |
74 | #define VMEMMAP_BASE (ASM_CONST(CONFIG_KERNEL_START) + \ | 74 | #define VMEMMAP_BASE (VMEMMAP_REGION_ID << REGION_SHIFT) |
75 | (0xfUL << (REGION_SHIFT - 4))) | 75 | #define vmemmap ((struct page *)VMEMMAP_BASE) |
76 | #define vmemmap ((struct page *)VMEMMAP_BASE) | 76 | |
77 | 77 | ||
78 | /* | 78 | /* |
79 | * Common bits in a linux-style PTE. These match the bits in the | 79 | * Common bits in a linux-style PTE. These match the bits in the |
@@ -314,6 +314,16 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, | |||
314 | old = pte_update(mm, addr, ptep, _PAGE_RW, 0); | 314 | old = pte_update(mm, addr, ptep, _PAGE_RW, 0); |
315 | } | 315 | } |
316 | 316 | ||
317 | static inline void huge_ptep_set_wrprotect(struct mm_struct *mm, | ||
318 | unsigned long addr, pte_t *ptep) | ||
319 | { | ||
320 | unsigned long old; | ||
321 | |||
322 | if ((pte_val(*ptep) & _PAGE_RW) == 0) | ||
323 | return; | ||
324 | old = pte_update(mm, addr, ptep, _PAGE_RW, 1); | ||
325 | } | ||
326 | |||
317 | /* | 327 | /* |
318 | * We currently remove entries from the hashtable regardless of whether | 328 | * We currently remove entries from the hashtable regardless of whether |
319 | * the entry was young or dirty. The generic routines only flush if the | 329 | * the entry was young or dirty. The generic routines only flush if the |