提交 47f78a49 编写于 作者: R R Sharada 提交者: Paul Mackerras

[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: NR Sharada <sharada@in.ibm.com>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 611ae59c
...@@ -403,12 +403,17 @@ static void native_hpte_clear(void) ...@@ -403,12 +403,17 @@ static void native_hpte_clear(void)
*/ */
hpte_v = hptep->v; hpte_v = hptep->v;
/*
* Call __tlbie() here rather than tlbie() since we
* already hold the native_tlbie_lock.
*/
if (hpte_v & HPTE_V_VALID) { if (hpte_v & HPTE_V_VALID) {
hptep->v = 0; 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); spin_unlock(&native_tlbie_lock);
local_irq_restore(flags); local_irq_restore(flags);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册