summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorR Sharada <sharada@in.ibm.com>2006-02-22 21:43:08 +0530
committerPaul Mackerras <paulus@samba.org>2006-02-24 11:36:29 +1100
commit47f78a49206b7f9b0d283ba46a2a5a6ee1796472 (patch)
treec58b73bf34271888016873699001f54e4b205dbc /arch/powerpc
parent611ae59c62e688792cd1e6a68b9dc0f68d0e0dff (diff)
downloadop-kernel-dev-47f78a49206b7f9b0d283ba46a2a5a6ee1796472.zip
op-kernel-dev-47f78a49206b7f9b0d283ba46a2a5a6ee1796472.tar.gz
[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 d96bcfe..33654d1 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)
*/
hpte_v = hptep->v;
+ /*
+ * Call __tlbie() here rather than tlbie() since we
+ * already hold the native_tlbie_lock.
+ */
if (hpte_v & HPTE_V_VALID) {
hptep->v = 0;
- tlbie(slot2va(hpte_v, slot), MMU_PAGE_4K, 0);
+ __tlbie(slot2va(hpte_v, slot), MMU_PAGE_4K);
}
}
+ asm volatile("eieio; tlbsync; ptesync":::"memory");
spin_unlock(&native_tlbie_lock);
local_irq_restore(flags);
}
OpenPOWER on IntegriCloud