summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/hash_low_32.S
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-03-31 07:49:27 +1100
committerPaul Mackerras <paulus@samba.org>2008-04-03 22:11:11 +1100
commitb991f05f1326fd9e6212851d0f2099875906dd16 (patch)
tree3ed9768f865989ab221bcbfbfb8df930997cb3b6 /arch/powerpc/mm/hash_low_32.S
parentff3da2e0938bae36d10d69c22bce0177b067a9e2 (diff)
[POWERPC] Fix deadlock with mmu_hash_lock in hash_page_sync
hash_page_sync() takes and releases the low level mmu hash lock in order to sync with other processors disposing of page tables. Because that lock can be needed to service hash misses triggered by interrupt handlers, taking it must be done with interrupts off. However, hash_page_sync() appears to be called with interrupts enabled, thus causing occasional deadlocks. We fix it by making sure hash_page_sync() masks interrupts while holding the lock. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/mm/hash_low_32.S')
-rw-r--r--arch/powerpc/mm/hash_low_32.S8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/hash_low_32.S
index 7f830a4888d..e10d76a860d 100644
--- a/arch/powerpc/mm/hash_low_32.S
+++ b/arch/powerpc/mm/hash_low_32.S
@@ -44,6 +44,9 @@ mmu_hash_lock:
#ifdef CONFIG_SMP
.text
_GLOBAL(hash_page_sync)
+ mfmsr r10
+ rlwinm r0,r10,0,17,15 /* clear bit 16 (MSR_EE) */
+ mtmsr r0
lis r8,mmu_hash_lock@h
ori r8,r8,mmu_hash_lock@l
lis r0,0x0fff
@@ -60,8 +63,9 @@ _GLOBAL(hash_page_sync)
eieio
li r0,0
stw r0,0(r8)
- blr
-#endif
+ mtmsr r10
+ blr
+#endif /* CONFIG_SMP */
/*
* Load a PTE into the hash table, if possible.