Subject: Re: linux-next: origin tree build failure

From: Heiko Carstens <[email-masked]>
Date: Tue, 14 Apr 2009 11:20:34 +0200

On Tue, 14 Apr 2009 01:57:27 -0700 (PDT)
David Miller <[email-masked]> wrote:

> From: Stephen Rothwell <[email-masked]>
> Date: Tue, 14 Apr 2009 14:43:17 +1000
> 
> > Dave, arch/sparc/include/asm/atomic_32.h should really include
> > asm/system.h since xchg is used in there.
> 
> That's true.
> 
> But atomic.h is not the proper place to obtain xchg() from, which is
> asm/system.h, and that's what debug_locks.h needs to include if it
> needs to use xchg().
> 
> This is why the s390 build broke in precisely the same way.

Due to header include dependencies we can't include asm/system.h from
asm/atomic.h. So David's solution seems to be the right way.
How about this:

Subject: [PATCH] Fix xchg build breakage on s390.

From: Heiko Carstens <[email-masked]>

In file included from kernel/panic.c:11:
include/linux/debug_locks.h: In function '__debug_locks_off':
include/linux/debug_locks.h:15: error: implicit declaration of function 'xchg'

Caused by 9eeba6138cefc0435695463ddadb0d95e0a6bcd2
"lockdep: warn about lockdep disabling after kernel taint"

Cc: Frederic Weisbecker <[email-masked]>
Reported-by: Sachin Sant <[email-masked]>
Signed-off-by: Heiko Carstens <[email-masked]>
---

 include/linux/debug_locks.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/include/linux/debug_locks.h
===================================================================
--- linux-2.6.orig/include/linux/debug_locks.h
+++ linux-2.6/include/linux/debug_locks.h
@@ -2,7 +2,7 @@
 #define __LINUX_DEBUG_LOCKING_H
 
 #include <linux/kernel.h>
-#include <asm/atomic.h>
+#include <asm/system.h>
 
 struct task_struct;