aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorR Sharada <sharada@in.ibm.com>2006-02-22 11:13:08 -0500
committerPaul Mackerras <paulus@samba.org>2006-02-23 19:36:29 -0500
commit47f78a49206b7f9b0d283ba46a2a5a6ee1796472 (patch)
treec58b73bf34271888016873699001f54e4b205dbc /arch/powerpc
parent611ae59c62e688792cd1e6a68b9dc0f68d0e0dff (diff)
[PATCH] powerpc64: fix spinlock recursion in native_hpte_clear
native_hpte_clear has a spinlock recursion problem with the native_tlbie_lock being called twice, once in native_hpte_clear() and once within tlbie(). Fix the problem by changing the call to tlbie() in native_hpte_clear() to __tlbie(). It still supports only 4k pages for now. Signed-off-by: R Sharada <sharada@in.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/mm/hash_native_64.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c
index d96bcfe4c6f6..33654d1b1b43 100644
--- a/arch/powerpc/mm/hash_native_64.c
+++ b/arch/powerpc/mm/hash_native_64.c
@@ -403,12 +403,17 @@ static void native_hpte_clear(void)
403 */ 403 */
404 hpte_v = hptep->v; 404 hpte_v = hptep->v;
405 405
406 /*
407 * Call __tlbie() here rather than tlbie() since we
408 * already hold the native_tlbie_lock.
409 */
406 if (hpte_v & HPTE_V_VALID) { 410 if (hpte_v & HPTE_V_VALID) {
407 hptep->v = 0; 411 hptep->v = 0;
408 tlbie(slot2va(hpte_v, slot), MMU_PAGE_4K, 0); 412 __tlbie(slot2va(hpte_v, slot), MMU_PAGE_4K);
409 } 413 }
410 } 414 }
411 415
416 asm volatile("eieio; tlbsync; ptesync":::"memory");
412 spin_unlock(&native_tlbie_lock); 417 spin_unlock(&native_tlbie_lock);
413 local_irq_restore(flags); 418 local_irq_restore(flags);
414} 419}