Re: Lockup after logging out of X

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ken Moffat <zarniwhoop@...>
Cc: <linux-kernel@...>, Eric W. Biederman <ebiederm@...>, Vivek Goyal <vgoyal@...>, Andi Kleen <ak@...>
Date: Tuesday, May 8, 2007 - 7:01 pm

On Tue, May 08, 2007 at 08:51:42PM +0100, Ken Moffat wrote:

Already known, although it is still unclear what the bug actually is.
Can you run with the appended patch please (from Eric Biederman) 
and post any backtraces the WARN_ON in there spews out? 

Also do you use swiotlb?

Thanks

-Andi

diff --git a/include/asm-x86_64/page.h b/include/asm-x86_64/page.h
index b17fc16..e6a4d1e 100644
--- a/include/asm-x86_64/page.h
+++ b/include/asm-x86_64/page.h
@@ -105,7 +105,18 @@ extern unsigned long phys_base;
 
 /* Note: __pa(&symbol_visible_to_c) should be always replaced with __pa_symbol.
    Otherwise you risk miscompilation. */
-#define __pa(x)			((unsigned long)(x) - PAGE_OFFSET)
+#define __pa(x)	\
+({									\
+	unsigned long v;						\
+	asm("" : "=r" (v) : "0" ((unsigned long)(x)));			\
+	WARN_ON(v >= __START_KERNEL_map);					\
+	if (likely(v < __START_KERNEL_map))				\
+		v -= PAGE_OFFSET;					\
+	else								\
+		v = (v - __START_KERNEL_map) + phys_base;		\
+	v; 								\
+}) 
+
 /* __pa_symbol should be used for C visible symbols.
    This seems to be the official gcc blessed way to do such arithmetic. */ 
 #define __pa_symbol(x)		\


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Lockup after logging out of X, Ken Moffat, (Tue May 8, 3:51 pm)
Re: Lockup after logging out of X, Andi Kleen, (Tue May 8, 7:01 pm)
Re: Lockup after logging out of X, Ken Moffat, (Tue May 8, 8:14 pm)
Re: Lockup after logging out of X, Andi Kleen, (Wed May 9, 5:08 am)
Re: Lockup after logging out of X, , (Tue May 8, 7:42 pm)
Re: Lockup after logging out of X, Michal Piotrowski, (Tue May 8, 6:47 pm)
Re: Lockup after logging out of X, Ken Moffat, (Tue May 8, 7:03 pm)
Re: Lockup after logging out of X, young dave, (Tue May 8, 9:48 pm)
Re: Lockup after logging out of X, , (Tue May 8, 4:21 pm)
Re: Lockup after logging out of X, Ken Moffat, (Tue May 8, 4:48 pm)