On Tue, 14 Apr 2009 01:57:27 -0700 (PDT) David Miller <davem@xxxxxxxxxxxxx> wrote: > From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> > 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 <heiko.carstens@xxxxxxxxxx> 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 <fweisbec@xxxxxxxxx> Reported-by: Sachin Sant <sachinp@xxxxxxxxxx> Signed-off-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx> --- 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; -- To unsubscribe from this list: send the line "unsubscribe linux-next" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html