diff options
Diffstat (limited to 'arch/powerpc/mm/fsl_booke_mmu.c')
-rw-r--r-- | arch/powerpc/mm/fsl_booke_mmu.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c index c5394728bf2..1ed6b52f303 100644 --- a/arch/powerpc/mm/fsl_booke_mmu.c +++ b/arch/powerpc/mm/fsl_booke_mmu.c | |||
@@ -116,7 +116,7 @@ void loadcam_entry(int idx) | |||
116 | mtspr(SPRN_MAS2, TLBCAM[idx].MAS2); | 116 | mtspr(SPRN_MAS2, TLBCAM[idx].MAS2); |
117 | mtspr(SPRN_MAS3, TLBCAM[idx].MAS3); | 117 | mtspr(SPRN_MAS3, TLBCAM[idx].MAS3); |
118 | 118 | ||
119 | if (cur_cpu_spec->cpu_features & MMU_FTR_BIG_PHYS) | 119 | if (mmu_has_feature(MMU_FTR_BIG_PHYS)) |
120 | mtspr(SPRN_MAS7, TLBCAM[idx].MAS7); | 120 | mtspr(SPRN_MAS7, TLBCAM[idx].MAS7); |
121 | 121 | ||
122 | asm volatile("isync;tlbwe;isync" : : : "memory"); | 122 | asm volatile("isync;tlbwe;isync" : : : "memory"); |
@@ -152,18 +152,13 @@ static void settlbcam(int index, unsigned long virt, phys_addr_t phys, | |||
152 | 152 | ||
153 | TLBCAM[index].MAS3 = (phys & MAS3_RPN) | MAS3_SX | MAS3_SR; | 153 | TLBCAM[index].MAS3 = (phys & MAS3_RPN) | MAS3_SX | MAS3_SR; |
154 | TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_SW : 0); | 154 | TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_SW : 0); |
155 | if (cur_cpu_spec->cpu_features & MMU_FTR_BIG_PHYS) | 155 | if (mmu_has_feature(MMU_FTR_BIG_PHYS)) |
156 | TLBCAM[index].MAS7 = (u64)phys >> 32; | 156 | TLBCAM[index].MAS7 = (u64)phys >> 32; |
157 | 157 | ||
158 | #ifndef CONFIG_KGDB /* want user access for breakpoints */ | ||
159 | if (flags & _PAGE_USER) { | 158 | if (flags & _PAGE_USER) { |
160 | TLBCAM[index].MAS3 |= MAS3_UX | MAS3_UR; | 159 | TLBCAM[index].MAS3 |= MAS3_UX | MAS3_UR; |
161 | TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_UW : 0); | 160 | TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_UW : 0); |
162 | } | 161 | } |
163 | #else | ||
164 | TLBCAM[index].MAS3 |= MAS3_UX | MAS3_UR; | ||
165 | TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_UW : 0); | ||
166 | #endif | ||
167 | 162 | ||
168 | tlbcam_addrs[index].start = virt; | 163 | tlbcam_addrs[index].start = virt; |
169 | tlbcam_addrs[index].limit = virt + size - 1; | 164 | tlbcam_addrs[index].limit = virt + size - 1; |