public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* linux-next: origin tree build failure
@ 2009-04-14  4:43 Stephen Rothwell
  2009-04-14  8:57 ` David Miller
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Stephen Rothwell @ 2009-04-14  4:43 UTC (permalink / raw)
  To: Linus; +Cc: linux-next, Frederic Weisbecker, LKML, David S. Miller,
	Ingo Molnar

Hi all,

Today's linux-next build (sparc defconfig) failed like this:

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

Caused by commit 9eeba6138cefc0435695463ddadb0d95e0a6bcd2 ("lockdep: warn
about lockdep disabling after kernel taint").  xchg is defined in
asm/system.h on sparc. It looks like asm/atomic.h on 64bit sparc includes
asm/system.h, but not on 32bit.

Dave, arch/sparc/include/asm/atomic_32.h should really include
asm/system.h since xchg is used in there.

I have applied the following patch for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/

From: Stephen Rothwell <sfr@canb•auug.org.au>
Date: Tue, 14 Apr 2009 14:27:09 +1000
Subject: [PATCH] sparc: asm/atomic.h on 32bit should include asm/system.h for xchg

Signed-off-by: Stephen Rothwell <sfr@canb•auug.org.au>
---
 arch/sparc/include/asm/atomic_32.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/sparc/include/asm/atomic_32.h b/arch/sparc/include/asm/atomic_32.h
index ce46597..bb91b12 100644
--- a/arch/sparc/include/asm/atomic_32.h
+++ b/arch/sparc/include/asm/atomic_32.h
@@ -15,6 +15,8 @@
 
 #ifdef __KERNEL__
 
+#include <asm/system.h>
+
 #define ATOMIC_INIT(i)  { (i) }
 
 extern int __atomic_add_return(int, atomic_t *);
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: linux-next: origin tree build failure
  2009-04-14  4:43 linux-next: origin tree build failure Stephen Rothwell
@ 2009-04-14  8:57 ` David Miller
  2009-04-14  9:20   ` Heiko Carstens
  2009-04-14  9:08 ` David Miller
  2009-04-14  9:15 ` [PATCH] lockdep: warn about lockdep disabling after kernel taint, fix Ingo Molnar
  2 siblings, 1 reply; 8+ messages in thread
From: David Miller @ 2009-04-14  8:57 UTC (permalink / raw)
  To: sfr; +Cc: torvalds, linux-next, fweisbec, linux-kernel, mingo

From: Stephen Rothwell <sfr@canb•auug.org.au>
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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: linux-next: origin tree build failure
  2009-04-14  4:43 linux-next: origin tree build failure Stephen Rothwell
  2009-04-14  8:57 ` David Miller
@ 2009-04-14  9:08 ` David Miller
  2009-04-14 10:26   ` Stephen Rothwell
  2009-04-14  9:15 ` [PATCH] lockdep: warn about lockdep disabling after kernel taint, fix Ingo Molnar
  2 siblings, 1 reply; 8+ messages in thread
From: David Miller @ 2009-04-14  9:08 UTC (permalink / raw)
  To: sfr; +Cc: torvalds, linux-next, fweisbec, linux-kernel, mingo

From: Stephen Rothwell <sfr@canb•auug.org.au>
Date: Tue, 14 Apr 2009 14:43:17 +1000

> sparc: asm/atomic.h on 32bit should include asm/system.h for xchg
> 
> Signed-off-by: Stephen Rothwell <sfr@canb•auug.org.au>

Just in case it wasn't clear, I'm applying this :)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] lockdep: warn about lockdep disabling after kernel taint, fix
  2009-04-14  4:43 linux-next: origin tree build failure Stephen Rothwell
  2009-04-14  8:57 ` David Miller
  2009-04-14  9:08 ` David Miller
@ 2009-04-14  9:15 ` Ingo Molnar
  2009-04-14  9:23   ` Heiko Carstens
  2009-04-14 10:29   ` Stephen Rothwell
  2 siblings, 2 replies; 8+ messages in thread
From: Ingo Molnar @ 2009-04-14  9:15 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linus, linux-next, Frederic Weisbecker, LKML, David S. Miller


* Stephen Rothwell <sfr@canb•auug.org.au> wrote:

> Hi all,
> 
> Today's linux-next build (sparc defconfig) failed like this:
> 
> In file included from kernel/panic.c:12:
> include/linux/debug_locks.h: In function '__debug_locks_off':
> include/linux/debug_locks.h:15: error: implicit declaration of function 'xchg'
> 
> Caused by commit 9eeba6138cefc0435695463ddadb0d95e0a6bcd2 ("lockdep: warn
> about lockdep disabling after kernel taint").  xchg is defined in
> asm/system.h on sparc. It looks like asm/atomic.h on 64bit sparc includes
> asm/system.h, but not on 32bit.
> 
> Dave, arch/sparc/include/asm/atomic_32.h should really include
> asm/system.h since xchg is used in there.
> 
> I have applied the following patch for today.

I dont think Sparc is at fault here - system.h is where we 
historically provided xchg() from. Then as atomic.h was introduced 
and extended, some architectures (x86 amongst them) gradually 
migrated their definition of xchg() into atomic.h and related helper 
headers. (while still making it available for system.h)

This opened up the path for someone eventually only including 
asm/atomic.h from generic code and breaking the architectures that 
only provide it via system.h. So i've queued up the fix below - this 
should address the problem on Sparc and s390.

So moving it to atomic.h does make sense - but that's no excuse for 
breaking the build. Sorry about this!

	Ingo

------------->
>From f99a7c31f427f8f783c7b1379755f91b59acaf72 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte•hu>
Date: Tue, 14 Apr 2009 11:03:12 +0200
Subject: [PATCH] lockdep: warn about lockdep disabling after kernel taint, fix

Impact: build fix

Stephen Rothwell reported that the Sparc build broke:

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

due to:

 9eeba61: lockdep: warn about lockdep disabling after kernel taint

There is some inconsistency between architectures about where exactly
xchg() is defined. Most have it in system.h but also in atomic.h (which
is arguably the more logical point for it). Some, such as Sparc only
have it in asm/system.h and not available via asm/atomic.h.

Use the widest set of headers in debug_locks.h and also include asm/system.h.

Reported-by: Stephen Rothwell <sfr@canb•auug.org.au>
Acked-by: Frederic Weisbecker <fweisbec@gmail•com>
Signed-off-by: Ingo Molnar <mingo@elte•hu>
---
 include/linux/debug_locks.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h
index 493dedb..29b3ce3 100644
--- a/include/linux/debug_locks.h
+++ b/include/linux/debug_locks.h
@@ -3,6 +3,7 @@
 
 #include <linux/kernel.h>
 #include <asm/atomic.h>
+#include <asm/system.h>
 
 struct task_struct;
 

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: linux-next: origin tree build failure
  2009-04-14  8:57 ` David Miller
@ 2009-04-14  9:20   ` Heiko Carstens
  0 siblings, 0 replies; 8+ messages in thread
From: Heiko Carstens @ 2009-04-14  9:20 UTC (permalink / raw)
  To: David Miller
  Cc: sfr, torvalds, linux-next, fweisbec, linux-kernel, mingo,
	Martin Schwidefsky

On Tue, 14 Apr 2009 01:57:27 -0700 (PDT)
David Miller <davem@davemloft•net> wrote:

> From: Stephen Rothwell <sfr@canb•auug.org.au>
> 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@de•ibm.com>

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@gmail•com>
Reported-by: Sachin Sant <sachinp@in•ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de•ibm.com>
---

 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;
 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] lockdep: warn about lockdep disabling after kernel taint, fix
  2009-04-14  9:15 ` [PATCH] lockdep: warn about lockdep disabling after kernel taint, fix Ingo Molnar
@ 2009-04-14  9:23   ` Heiko Carstens
  2009-04-14 10:29   ` Stephen Rothwell
  1 sibling, 0 replies; 8+ messages in thread
From: Heiko Carstens @ 2009-04-14  9:23 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Stephen Rothwell, Linus, linux-next, Frederic Weisbecker, LKML,
	David S. Miller

On Tue, 14 Apr 2009 11:15:38 +0200
Ingo Molnar <mingo@elte•hu> wrote:
> Subject: [PATCH] lockdep: warn about lockdep disabling after kernel taint, fix
> 
> Impact: build fix
> 
> Stephen Rothwell reported that the Sparc build broke:
> 
>  In file included from kernel/panic.c:12:
>  include/linux/debug_locks.h: In function '__debug_locks_off':
>  include/linux/debug_locks.h:15: error: implicit declaration of function 'xchg'
> 
> due to:
> 
>  9eeba61: lockdep: warn about lockdep disabling after kernel taint
> 
> There is some inconsistency between architectures about where exactly
> xchg() is defined. Most have it in system.h but also in atomic.h (which
> is arguably the more logical point for it). Some, such as Sparc only
> have it in asm/system.h and not available via asm/atomic.h.
> 
> Use the widest set of headers in debug_locks.h and also include asm/system.h.
> 
> Reported-by: Stephen Rothwell <sfr@canb•auug.org.au>
> Acked-by: Frederic Weisbecker <fweisbec@gmail•com>
> Signed-off-by: Ingo Molnar <mingo@elte•hu>
> ---
>  include/linux/debug_locks.h |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h
> index 493dedb..29b3ce3 100644
> --- a/include/linux/debug_locks.h
> +++ b/include/linux/debug_locks.h
> @@ -3,6 +3,7 @@
> 
>  #include <linux/kernel.h>
>  #include <asm/atomic.h>
> +#include <asm/system.h>

Ah, ok. Please ignore my other mail from a few seconds ago ;)
This fixes the s390 build break. Thanks!

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: linux-next: origin tree build failure
  2009-04-14  9:08 ` David Miller
@ 2009-04-14 10:26   ` Stephen Rothwell
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2009-04-14 10:26 UTC (permalink / raw)
  To: David Miller; +Cc: torvalds, linux-next, fweisbec, linux-kernel, mingo

[-- Attachment #1: Type: text/plain, Size: 519 bytes --]

Hi Dave,

On Tue, 14 Apr 2009 02:08:18 -0700 (PDT) David Miller <davem@davemloft•net> wrote:
>
> From: Stephen Rothwell <sfr@canb•auug.org.au>
> Date: Tue, 14 Apr 2009 14:43:17 +1000
> 
> > sparc: asm/atomic.h on 32bit should include asm/system.h for xchg
> > 
> > Signed-off-by: Stephen Rothwell <sfr@canb•auug.org.au>
> 
> Just in case it wasn't clear, I'm applying this :)

Ah, ok, thanks :-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] lockdep: warn about lockdep disabling after kernel taint, fix
  2009-04-14  9:15 ` [PATCH] lockdep: warn about lockdep disabling after kernel taint, fix Ingo Molnar
  2009-04-14  9:23   ` Heiko Carstens
@ 2009-04-14 10:29   ` Stephen Rothwell
  1 sibling, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2009-04-14 10:29 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Linus, linux-next, Frederic Weisbecker, LKML, David S. Miller

[-- Attachment #1: Type: text/plain, Size: 465 bytes --]

Hi Ingo,

On Tue, 14 Apr 2009 11:15:38 +0200 Ingo Molnar <mingo@elte•hu> wrote:
>
> This opened up the path for someone eventually only including 
> asm/atomic.h from generic code and breaking the architectures that 
> only provide it via system.h. So i've queued up the fix below - this 
> should address the problem on Sparc and s390.

Thanks.

-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-04-14 10:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-14  4:43 linux-next: origin tree build failure Stephen Rothwell
2009-04-14  8:57 ` David Miller
2009-04-14  9:20   ` Heiko Carstens
2009-04-14  9:08 ` David Miller
2009-04-14 10:26   ` Stephen Rothwell
2009-04-14  9:15 ` [PATCH] lockdep: warn about lockdep disabling after kernel taint, fix Ingo Molnar
2009-04-14  9:23   ` Heiko Carstens
2009-04-14 10:29   ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox