aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/hash_native_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/mm/hash_native_64.c')
-rw-r--r--arch/powerpc/mm/hash_native_64.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c
index d873f6507f72..f8a871a72985 100644
--- a/arch/powerpc/mm/hash_native_64.c
+++ b/arch/powerpc/mm/hash_native_64.c
@@ -316,8 +316,8 @@ static long native_hpte_updatepp(unsigned long slot, unsigned long newpp,
316 DBG_LOW(" -> hit\n"); 316 DBG_LOW(" -> hit\n");
317 /* Update the HPTE */ 317 /* Update the HPTE */
318 hptep->r = cpu_to_be64((be64_to_cpu(hptep->r) & 318 hptep->r = cpu_to_be64((be64_to_cpu(hptep->r) &
319 ~(HPTE_R_PP | HPTE_R_N)) | 319 ~(HPTE_R_PPP | HPTE_R_N)) |
320 (newpp & (HPTE_R_PP | HPTE_R_N | 320 (newpp & (HPTE_R_PPP | HPTE_R_N |
321 HPTE_R_C))); 321 HPTE_R_C)));
322 } 322 }
323 native_unlock_hpte(hptep); 323 native_unlock_hpte(hptep);
@@ -385,8 +385,8 @@ static void native_hpte_updateboltedpp(unsigned long newpp, unsigned long ea,
385 385
386 /* Update the HPTE */ 386 /* Update the HPTE */
387 hptep->r = cpu_to_be64((be64_to_cpu(hptep->r) & 387 hptep->r = cpu_to_be64((be64_to_cpu(hptep->r) &
388 ~(HPTE_R_PP | HPTE_R_N)) | 388 ~(HPTE_R_PPP | HPTE_R_N)) |
389 (newpp & (HPTE_R_PP | HPTE_R_N))); 389 (newpp & (HPTE_R_PPP | HPTE_R_N)));
390 /* 390 /*
391 * Ensure it is out of the tlb too. Bolted entries base and 391 * Ensure it is out of the tlb too. Bolted entries base and
392 * actual page size will be same. 392 * actual page size will be same.
@@ -550,7 +550,11 @@ static void hpte_decode(struct hash_pte *hpte, unsigned long slot,
550 } 550 }
551 } 551 }
552 /* This works for all page sizes, and for 256M and 1T segments */ 552 /* This works for all page sizes, and for 256M and 1T segments */
553 *ssize = hpte_v >> HPTE_V_SSIZE_SHIFT; 553 if (cpu_has_feature(CPU_FTR_ARCH_300))
554 *ssize = hpte_r >> HPTE_R_3_0_SSIZE_SHIFT;
555 else
556 *ssize = hpte_v >> HPTE_V_SSIZE_SHIFT;
557
554 shift = mmu_psize_defs[size].shift; 558 shift = mmu_psize_defs[size].shift;
555 559
556 avpn = (HPTE_V_AVPN_VAL(hpte_v) & ~mmu_psize_defs[size].avpnm); 560 avpn = (HPTE_V_AVPN_VAL(hpte_v) & ~mmu_psize_defs[size].avpnm);