diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2013-06-20 05:00:13 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-06-21 02:01:52 -0400 |
commit | db3d8534903c8a9617142975bec6db95acaba753 (patch) | |
tree | eea268dcfdd5cce84aa9b32025528dbc2d71d5aa /arch/powerpc/platforms/cell/beat_htab.c | |
parent | 8998897b8f966c9036307b5130494d4bf1e6cb18 (diff) |
powerpc/mm: handle hugepage size correctly when invalidating hpte entries
If a hash bucket gets full, we "evict" a more/less random entry from it.
When we do that we don't invalidate the TLB (hpte_remove) because we assume
the old translation is still technically "valid". This implies that when
we are invalidating or updating pte, even if HPTE entry is not valid
we should do a tlb invalidate. With hugepages, we need to pass the correct
actual page size value for tlb invalidation.
This change update the patch 0608d692463598c1d6e826d9dd7283381b4f246c
"powerpc/mm: Always invalidate tlb on hpte invalidate and update" to handle
transparent hugepages correctly.
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/platforms/cell/beat_htab.c')
-rw-r--r-- | arch/powerpc/platforms/cell/beat_htab.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/cell/beat_htab.c b/arch/powerpc/platforms/cell/beat_htab.c index 246e1d8b3af3..c34ee4e60873 100644 --- a/arch/powerpc/platforms/cell/beat_htab.c +++ b/arch/powerpc/platforms/cell/beat_htab.c | |||
@@ -185,7 +185,8 @@ static void beat_lpar_hptab_clear(void) | |||
185 | static long beat_lpar_hpte_updatepp(unsigned long slot, | 185 | static long beat_lpar_hpte_updatepp(unsigned long slot, |
186 | unsigned long newpp, | 186 | unsigned long newpp, |
187 | unsigned long vpn, | 187 | unsigned long vpn, |
188 | int psize, int ssize, int local) | 188 | int psize, int apsize, |
189 | int ssize, int local) | ||
189 | { | 190 | { |
190 | unsigned long lpar_rc; | 191 | unsigned long lpar_rc; |
191 | u64 dummy0, dummy1; | 192 | u64 dummy0, dummy1; |
@@ -274,7 +275,8 @@ static void beat_lpar_hpte_updateboltedpp(unsigned long newpp, | |||
274 | } | 275 | } |
275 | 276 | ||
276 | static void beat_lpar_hpte_invalidate(unsigned long slot, unsigned long vpn, | 277 | static void beat_lpar_hpte_invalidate(unsigned long slot, unsigned long vpn, |
277 | int psize, int ssize, int local) | 278 | int psize, int apsize, |
279 | int ssize, int local) | ||
278 | { | 280 | { |
279 | unsigned long want_v; | 281 | unsigned long want_v; |
280 | unsigned long lpar_rc; | 282 | unsigned long lpar_rc; |
@@ -364,9 +366,10 @@ static long beat_lpar_hpte_insert_v3(unsigned long hpte_group, | |||
364 | * already zero. For now I am paranoid. | 366 | * already zero. For now I am paranoid. |
365 | */ | 367 | */ |
366 | static long beat_lpar_hpte_updatepp_v3(unsigned long slot, | 368 | static long beat_lpar_hpte_updatepp_v3(unsigned long slot, |
367 | unsigned long newpp, | 369 | unsigned long newpp, |
368 | unsigned long vpn, | 370 | unsigned long vpn, |
369 | int psize, int ssize, int local) | 371 | int psize, int apsize, |
372 | int ssize, int local) | ||
370 | { | 373 | { |
371 | unsigned long lpar_rc; | 374 | unsigned long lpar_rc; |
372 | unsigned long want_v; | 375 | unsigned long want_v; |
@@ -394,7 +397,8 @@ static long beat_lpar_hpte_updatepp_v3(unsigned long slot, | |||
394 | } | 397 | } |
395 | 398 | ||
396 | static void beat_lpar_hpte_invalidate_v3(unsigned long slot, unsigned long vpn, | 399 | static void beat_lpar_hpte_invalidate_v3(unsigned long slot, unsigned long vpn, |
397 | int psize, int ssize, int local) | 400 | int psize, int apsize, |
401 | int ssize, int local) | ||
398 | { | 402 | { |
399 | unsigned long want_v; | 403 | unsigned long want_v; |
400 | unsigned long lpar_rc; | 404 | unsigned long lpar_rc; |