diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-12-07 16:30:11 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-12-07 16:30:11 -0300 |
commit | 189382f7a338c02b448ab27e1d5566e052165dc8 (patch) | |
tree | 14903209649ee76584b17afa492e31a0c9460c27 /arch/powerpc/mm/hash_utils_64.c | |
parent | 62e27076b7a48d1c8fc4eed59ff75f6382915c46 (diff) |
Linux-libre 4.8.12-gnupck-4.8.12-gnu
Diffstat (limited to 'arch/powerpc/mm/hash_utils_64.c')
-rw-r--r-- | arch/powerpc/mm/hash_utils_64.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 28923b2e2..8dff9ce6f 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c @@ -190,8 +190,12 @@ unsigned long htab_convert_pte_flags(unsigned long pteflags) /* * Kernel read only mapped with ppp bits 0b110 */ - if (!(pteflags & _PAGE_WRITE)) - rflags |= (HPTE_R_PP0 | 0x2); + if (!(pteflags & _PAGE_WRITE)) { + if (mmu_has_feature(MMU_FTR_KERNEL_RO)) + rflags |= (HPTE_R_PP0 | 0x2); + else + rflags |= 0x3; + } } else { if (pteflags & _PAGE_RWX) rflags |= 0x2; |