提交 b991f05f 编写于 作者: B Benjamin Herrenschmidt 提交者: Paul Mackerras

[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: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 ff3da2e0
......@@ -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)
mtmsr r10
blr
#endif
#endif /* CONFIG_SMP */
/*
* Load a PTE into the hash table, if possible.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册