diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2005-09-19 23:52:50 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-09-21 05:21:07 -0400 |
commit | 61b1a94254a2158d053458764a5bd30331d73a54 (patch) | |
tree | 4a2aa56ae5d3182c1015b5e9a4351aeb8fab2f3a /arch/ppc64/mm/hash_native.c | |
parent | 637a6ff6ce525d8495df944550efea0f023dd521 (diff) |
[PATCH] ppc64: Store virtual address in TLB flush batches
This patch slightly change the TLB flush batch mecanism so that we
store the full vaddr (including vsid) when adding an entry to the
batch so that the flush part doesn't have to get to the context.
This cleans it a bit, and paves the way to future updates like
dynamic vsids.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc64/mm/hash_native.c')
-rw-r--r-- | arch/ppc64/mm/hash_native.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/arch/ppc64/mm/hash_native.c b/arch/ppc64/mm/hash_native.c index 7626bb59954d..29b074505d3e 100644 --- a/arch/ppc64/mm/hash_native.c +++ b/arch/ppc64/mm/hash_native.c | |||
@@ -335,10 +335,9 @@ static void native_hpte_clear(void) | |||
335 | local_irq_restore(flags); | 335 | local_irq_restore(flags); |
336 | } | 336 | } |
337 | 337 | ||
338 | static void native_flush_hash_range(unsigned long context, | 338 | static void native_flush_hash_range(unsigned long number, int local) |
339 | unsigned long number, int local) | ||
340 | { | 339 | { |
341 | unsigned long vsid, vpn, va, hash, secondary, slot, flags, avpn; | 340 | unsigned long va, vpn, hash, secondary, slot, flags, avpn; |
342 | int i, j; | 341 | int i, j; |
343 | hpte_t *hptep; | 342 | hpte_t *hptep; |
344 | unsigned long hpte_v; | 343 | unsigned long hpte_v; |
@@ -351,13 +350,7 @@ static void native_flush_hash_range(unsigned long context, | |||
351 | 350 | ||
352 | j = 0; | 351 | j = 0; |
353 | for (i = 0; i < number; i++) { | 352 | for (i = 0; i < number; i++) { |
354 | if (batch->addr[i] < KERNELBASE) | 353 | va = batch->vaddr[j]; |
355 | vsid = get_vsid(context, batch->addr[i]); | ||
356 | else | ||
357 | vsid = get_kernel_vsid(batch->addr[i]); | ||
358 | |||
359 | va = (vsid << 28) | (batch->addr[i] & 0x0fffffff); | ||
360 | batch->vaddr[j] = va; | ||
361 | if (large) | 354 | if (large) |
362 | vpn = va >> HPAGE_SHIFT; | 355 | vpn = va >> HPAGE_SHIFT; |
363 | else | 356 | else |