aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2013-04-28 05:37:34 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-04-30 02:00:11 -0400
commit74f227b22897e0db52a58f8f634e9ce6f67cc652 (patch)
tree987b31602251010b3335389510cf5d037d331413 /arch/powerpc/mm
parent5c1f6ee9a31cbdac90bbb8ae1ba4475031ac74b4 (diff)
powerpc: Use encode avpn where we need only avpn values
In all these cases we are doing something similar to HPTE_V_COMPARE(hpte_v, want_v) which ignores the HPTE_V_LARGE bit With MPSS support we would need actual page size to set HPTE_V_LARGE bit and that won't be available in most of these cases. Since we are ignoring HPTE_V_LARGE bit, use the avpn value instead. There should not be any change in behaviour after this patch. Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r--arch/powerpc/mm/hash_native_64.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c
index ffc1e00f7a22..9d8983ad1dec 100644
--- a/arch/powerpc/mm/hash_native_64.c
+++ b/arch/powerpc/mm/hash_native_64.c
@@ -252,7 +252,7 @@ static long native_hpte_updatepp(unsigned long slot, unsigned long newpp,
252 unsigned long hpte_v, want_v; 252 unsigned long hpte_v, want_v;
253 int ret = 0; 253 int ret = 0;
254 254
255 want_v = hpte_encode_v(vpn, psize, ssize); 255 want_v = hpte_encode_avpn(vpn, psize, ssize);
256 256
257 DBG_LOW(" update(vpn=%016lx, avpnv=%016lx, group=%lx, newpp=%lx)", 257 DBG_LOW(" update(vpn=%016lx, avpnv=%016lx, group=%lx, newpp=%lx)",
258 vpn, want_v & HPTE_V_AVPN, slot, newpp); 258 vpn, want_v & HPTE_V_AVPN, slot, newpp);
@@ -288,7 +288,7 @@ static long native_hpte_find(unsigned long vpn, int psize, int ssize)
288 unsigned long want_v, hpte_v; 288 unsigned long want_v, hpte_v;
289 289
290 hash = hpt_hash(vpn, mmu_psize_defs[psize].shift, ssize); 290 hash = hpt_hash(vpn, mmu_psize_defs[psize].shift, ssize);
291 want_v = hpte_encode_v(vpn, psize, ssize); 291 want_v = hpte_encode_avpn(vpn, psize, ssize);
292 292
293 /* Bolted mappings are only ever in the primary group */ 293 /* Bolted mappings are only ever in the primary group */
294 slot = (hash & htab_hash_mask) * HPTES_PER_GROUP; 294 slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
@@ -348,7 +348,7 @@ static void native_hpte_invalidate(unsigned long slot, unsigned long vpn,
348 348
349 DBG_LOW(" invalidate(vpn=%016lx, hash: %lx)\n", vpn, slot); 349 DBG_LOW(" invalidate(vpn=%016lx, hash: %lx)\n", vpn, slot);
350 350
351 want_v = hpte_encode_v(vpn, psize, ssize); 351 want_v = hpte_encode_avpn(vpn, psize, ssize);
352 native_lock_hpte(hptep); 352 native_lock_hpte(hptep);
353 hpte_v = hptep->v; 353 hpte_v = hptep->v;
354 354
@@ -520,7 +520,7 @@ static void native_flush_hash_range(unsigned long number, int local)
520 slot = (hash & htab_hash_mask) * HPTES_PER_GROUP; 520 slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
521 slot += hidx & _PTEIDX_GROUP_IX; 521 slot += hidx & _PTEIDX_GROUP_IX;
522 hptep = htab_address + slot; 522 hptep = htab_address + slot;
523 want_v = hpte_encode_v(vpn, psize, ssize); 523 want_v = hpte_encode_avpn(vpn, psize, ssize);
524 native_lock_hpte(hptep); 524 native_lock_hpte(hptep);
525 hpte_v = hptep->v; 525 hpte_v = hptep->v;
526 if (!HPTE_V_COMPARE(hpte_v, want_v) || 526 if (!HPTE_V_COMPARE(hpte_v, want_v) ||