2012-06-14 01:47:37

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure in Linus' tree

Hi Linus,

While building Linus' tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

In file included from include/asm-generic/bug.h:5:0,
from arch/powerpc/include/asm/bug.h:127,
from arch/powerpc/kernel/head_64.S:31:
include/linux/kernel.h:44:0: warning: "ALIGN" redefined [enabled by default]
include/linux/linkage.h:57:0: note: this is the location of the previous definition
include/linux/sysinfo.h: Assembler messages:
include/linux/sysinfo.h:7: Error: Unrecognized opcode: `struct'
include/linux/sysinfo.h:8: Error: Unrecognized opcode: `__kernel_long_t'

And it went downhill from there :-(

Caused by commit 3777808873b0 ("bug.h: need linux/kernel.h for
TAINT_WARN") which, unfortunately never made it into linux-next.

I have reverted that commit for today (which presumably means that sh
builds will be broken again).
--
Cheers,
Stephen Rothwell [email protected]


Attachments:
(No filename) (955.00 B)
(No filename) (836.00 B)
Download all attachments

2012-06-14 03:06:19

by Paul Mundt

[permalink] [raw]
Subject: Re: linux-next: build failure in Linus' tree

On Thu, Jun 14, 2012 at 11:47:22AM +1000, Stephen Rothwell wrote:
> Hi Linus,
>
> While building Linus' tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> In file included from include/asm-generic/bug.h:5:0,
> from arch/powerpc/include/asm/bug.h:127,
> from arch/powerpc/kernel/head_64.S:31:
> include/linux/kernel.h:44:0: warning: "ALIGN" redefined [enabled by default]
> include/linux/linkage.h:57:0: note: this is the location of the previous definition
> include/linux/sysinfo.h: Assembler messages:
> include/linux/sysinfo.h:7: Error: Unrecognized opcode: `struct'
> include/linux/sysinfo.h:8: Error: Unrecognized opcode: `__kernel_long_t'
>
> And it went downhill from there :-(
>
> Caused by commit 3777808873b0 ("bug.h: need linux/kernel.h for
> TAINT_WARN") which, unfortunately never made it into linux-next.
>
> I have reverted that commit for today (which presumably means that sh
> builds will be broken again).

I'm still unsure as to the best way to fix this, and there was no
response to the original mail I posted about it either:

http://marc.info/?l=linux-kernel&m=133879579014853&w=2

I'll fetch a powerpc cross compiler and see if I can figure out what went
wrong.

We can always bite the bullet and stuff it in the sh thread_info.h, but
that's papering around the issue, and any other TIF_RESTORE_SIGMASK &&
!HAVE_SET_RESTORE_SIGMASK generic bug user will have to use the same
hack.

2012-06-14 03:40:50

by Paul Mundt

[permalink] [raw]
Subject: Re: linux-next: build failure in Linus' tree

(adding Arnd to Cc, who I forgot to include previously)

On Thu, Jun 14, 2012 at 12:06:06PM +0900, Paul Mundt wrote:
> On Thu, Jun 14, 2012 at 11:47:22AM +1000, Stephen Rothwell wrote:
> > While building Linus' tree, today's linux-next build (powerpc
> > ppc64_defconfig) failed like this:
> >
> > In file included from include/asm-generic/bug.h:5:0,
> > from arch/powerpc/include/asm/bug.h:127,
> > from arch/powerpc/kernel/head_64.S:31:
> > include/linux/kernel.h:44:0: warning: "ALIGN" redefined [enabled by default]
> > include/linux/linkage.h:57:0: note: this is the location of the previous definition
> > include/linux/sysinfo.h: Assembler messages:
> > include/linux/sysinfo.h:7: Error: Unrecognized opcode: `struct'
> > include/linux/sysinfo.h:8: Error: Unrecognized opcode: `__kernel_long_t'
> >
> > And it went downhill from there :-(
> >
> > Caused by commit 3777808873b0 ("bug.h: need linux/kernel.h for
> > TAINT_WARN") which, unfortunately never made it into linux-next.
> >
> > I have reverted that commit for today (which presumably means that sh
> > builds will be broken again).
>
> I'm still unsure as to the best way to fix this, and there was no
> response to the original mail I posted about it either:
>
> http://marc.info/?l=linux-kernel&m=133879579014853&w=2
>
> I'll fetch a powerpc cross compiler and see if I can figure out what went
> wrong.
>
Ok, it's because the asm-generic/bug.h __ASSEMBLY__ guarding is
completely bogus. This should hopefully fix it once and for all.
Sorry for the trouble.

Signed-off-by: Paul Mundt <[email protected]>

---

include/asm-generic/bug.h | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index 9f02005..506ec19 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -2,7 +2,6 @@
#define _ASM_GENERIC_BUG_H

#include <linux/compiler.h>
-#include <linux/kernel.h>

#ifdef CONFIG_BUG

@@ -32,6 +31,9 @@ struct bug_entry {

#endif /* CONFIG_GENERIC_BUG */

+#ifndef __ASSEMBLY__
+#include <linux/kernel.h>
+
/*
* Don't use BUG() or BUG_ON() unless there's really no way out; one
* example might be detecting data structure corruption in the middle
@@ -61,7 +63,6 @@ struct bug_entry {
* to provide better diagnostics.
*/
#ifndef __WARN_TAINT
-#ifndef __ASSEMBLY__
extern __printf(3, 4)
void warn_slowpath_fmt(const char *file, const int line,
const char *fmt, ...);
@@ -70,7 +71,6 @@ void warn_slowpath_fmt_taint(const char *file, const int line, unsigned taint,
const char *fmt, ...);
extern void warn_slowpath_null(const char *file, const int line);
#define WANT_WARN_ON_SLOWPATH
-#endif
#define __WARN() warn_slowpath_null(__FILE__, __LINE__)
#define __WARN_printf(arg...) warn_slowpath_fmt(__FILE__, __LINE__, arg)
#define __WARN_printf_taint(taint, arg...) \
@@ -203,4 +203,6 @@ extern void warn_slowpath_null(const char *file, const int line);
# define WARN_ON_SMP(x) ({0;})
#endif

+#endif /* __ASSEMBLY__ */
+
#endif

2012-06-15 00:14:23

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure in Linus' tree

Hi Paul,

On Thu, 14 Jun 2012 12:40:36 +0900 Paul Mundt <[email protected]> wrote:
>
> (adding Arnd to Cc, who I forgot to include previously)
>
> On Thu, Jun 14, 2012 at 12:06:06PM +0900, Paul Mundt wrote:
> > On Thu, Jun 14, 2012 at 11:47:22AM +1000, Stephen Rothwell wrote:
> > > While building Linus' tree, today's linux-next build (powerpc
> > > ppc64_defconfig) failed like this:
> > >
> > > In file included from include/asm-generic/bug.h:5:0,
> > > from arch/powerpc/include/asm/bug.h:127,
> > > from arch/powerpc/kernel/head_64.S:31:
> > > include/linux/kernel.h:44:0: warning: "ALIGN" redefined [enabled by default]
> > > include/linux/linkage.h:57:0: note: this is the location of the previous definition
> > > include/linux/sysinfo.h: Assembler messages:
> > > include/linux/sysinfo.h:7: Error: Unrecognized opcode: `struct'
> > > include/linux/sysinfo.h:8: Error: Unrecognized opcode: `__kernel_long_t'
> > >
> > > And it went downhill from there :-(
> > >
> > > Caused by commit 3777808873b0 ("bug.h: need linux/kernel.h for
> > > TAINT_WARN") which, unfortunately never made it into linux-next.
> > >
> > > I have reverted that commit for today (which presumably means that sh
> > > builds will be broken again).
> >
> > I'm still unsure as to the best way to fix this, and there was no
> > response to the original mail I posted about it either:
> >
> > http://marc.info/?l=linux-kernel&m=133879579014853&w=2
> >
> > I'll fetch a powerpc cross compiler and see if I can figure out what went
> > wrong.
> >
> Ok, it's because the asm-generic/bug.h __ASSEMBLY__ guarding is
> completely bogus. This should hopefully fix it once and for all.
> Sorry for the trouble.
>
> Signed-off-by: Paul Mundt <[email protected]>

Tested-by: Stephen Rothwell <[email protected]>

Can you create a proper commit message and send this to Linus, please? I
have included it in my fixes tree in linux-next for today.

--
Cheers,
Stephen Rothwell [email protected]


Attachments:
(No filename) (1.99 kB)
(No filename) (836.00 B)
Download all attachments

2012-06-15 00:56:35

by Paul Mundt

[permalink] [raw]
Subject: Re: linux-next: build failure in Linus' tree

On Fri, Jun 15, 2012 at 10:14:07AM +1000, Stephen Rothwell wrote:
> On Thu, 14 Jun 2012 12:40:36 +0900 Paul Mundt <[email protected]> wrote:
> > Ok, it's because the asm-generic/bug.h __ASSEMBLY__ guarding is
> > completely bogus. This should hopefully fix it once and for all.
> > Sorry for the trouble.
> >
> > Signed-off-by: Paul Mundt <[email protected]>
>
> Tested-by: Stephen Rothwell <[email protected]>
>
> Can you create a proper commit message and send this to Linus, please? I
> have included it in my fixes tree in linux-next for today.
>
Will do, thanks for testing.

2012-06-15 08:46:16

by Richard W.M. Jones

[permalink] [raw]
Subject: Re: linux-next: build failure in Linus' tree

On Thu, Jun 14, 2012 at 12:40:36PM +0900, Paul Mundt wrote:
> Ok, it's because the asm-generic/bug.h __ASSEMBLY__ guarding is
> completely bogus. This should hopefully fix it once and for all.
> Sorry for the trouble.

I can confirm this fixes the build on ppc64 for me too.

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v

2012-06-15 09:23:06

by Sedat Dilek

[permalink] [raw]
Subject: Re: linux-next: build failure in Linus' tree

On Fri, Jun 15, 2012 at 2:14 AM, Stephen Rothwell <[email protected]> wrote:
> Hi Paul,
>
> On Thu, 14 Jun 2012 12:40:36 +0900 Paul Mundt <[email protected]> wrote:
>>
>> (adding Arnd to Cc, who I forgot to include previously)
>>
>> On Thu, Jun 14, 2012 at 12:06:06PM +0900, Paul Mundt wrote:
>> > On Thu, Jun 14, 2012 at 11:47:22AM +1000, Stephen Rothwell wrote:
>> > > While building Linus' tree, today's linux-next build (powerpc
>> > > ppc64_defconfig) failed like this:
>> > >
>> > > In file included from include/asm-generic/bug.h:5:0,
>> > >                  from arch/powerpc/include/asm/bug.h:127,
>> > >                  from arch/powerpc/kernel/head_64.S:31:
>> > > include/linux/kernel.h:44:0: warning: "ALIGN" redefined [enabled by default]
>> > > include/linux/linkage.h:57:0: note: this is the location of the previous definition
>> > > include/linux/sysinfo.h: Assembler messages:
>> > > include/linux/sysinfo.h:7: Error: Unrecognized opcode: `struct'
>> > > include/linux/sysinfo.h:8: Error: Unrecognized opcode: `__kernel_long_t'
>> > >
>> > > And it went downhill from there :-(
>> > >
>> > > Caused by commit 3777808873b0 ("bug.h: need linux/kernel.h for
>> > > TAINT_WARN") which, unfortunately never made it into linux-next.
>> > >
>> > > I have reverted that commit for today (which presumably means that sh
>> > > builds will be broken again).
>> >
>> > I'm still unsure as to the best way to fix this, and there was no
>> > response to the original mail I posted about it either:
>> >
>> > http://marc.info/?l=linux-kernel&m=133879579014853&w=2
>> >
>> > I'll fetch a powerpc cross compiler and see if I can figure out what went
>> > wrong.
>> >
>> Ok, it's because the asm-generic/bug.h __ASSEMBLY__ guarding is
>> completely bogus. This should hopefully fix it once and for all.
>> Sorry for the trouble.
>>
>> Signed-off-by: Paul Mundt <[email protected]>
>
> Tested-by: Stephen Rothwell <[email protected]>
>
> Can you create a proper commit message and send this to Linus, please?  I
> have included it in my fixes tree in linux-next for today.
>

Reference: commit 2a6f7f6bd7a9eb3c835c7e5a7d51b43675fb3881 ("fix
bug.h's inclusion of kernel.h")

- Sedat -

[1] http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commitdiff;h=2a6f7f6bd7a9eb3c835c7e5a7d51b43675fb3881

> --
> Cheers,
> Stephen Rothwell                    [email protected]

2012-06-15 10:15:18

by Sedat Dilek

[permalink] [raw]
Subject: Re: linux-next: build failure in Linus' tree

On Fri, Jun 15, 2012 at 11:23 AM, Sedat Dilek
<[email protected]> wrote:
> On Fri, Jun 15, 2012 at 2:14 AM, Stephen Rothwell <[email protected]> wrote:
>> Hi Paul,
>>
>> On Thu, 14 Jun 2012 12:40:36 +0900 Paul Mundt <[email protected]> wrote:
>>>
>>> (adding Arnd to Cc, who I forgot to include previously)
>>>
>>> On Thu, Jun 14, 2012 at 12:06:06PM +0900, Paul Mundt wrote:
>>> > On Thu, Jun 14, 2012 at 11:47:22AM +1000, Stephen Rothwell wrote:
>>> > > While building Linus' tree, today's linux-next build (powerpc
>>> > > ppc64_defconfig) failed like this:
>>> > >
>>> > > In file included from include/asm-generic/bug.h:5:0,
>>> > >                  from arch/powerpc/include/asm/bug.h:127,
>>> > >                  from arch/powerpc/kernel/head_64.S:31:
>>> > > include/linux/kernel.h:44:0: warning: "ALIGN" redefined [enabled by default]
>>> > > include/linux/linkage.h:57:0: note: this is the location of the previous definition
>>> > > include/linux/sysinfo.h: Assembler messages:
>>> > > include/linux/sysinfo.h:7: Error: Unrecognized opcode: `struct'
>>> > > include/linux/sysinfo.h:8: Error: Unrecognized opcode: `__kernel_long_t'
>>> > >
>>> > > And it went downhill from there :-(
>>> > >
>>> > > Caused by commit 3777808873b0 ("bug.h: need linux/kernel.h for
>>> > > TAINT_WARN") which, unfortunately never made it into linux-next.
>>> > >
>>> > > I have reverted that commit for today (which presumably means that sh
>>> > > builds will be broken again).
>>> >
>>> > I'm still unsure as to the best way to fix this, and there was no
>>> > response to the original mail I posted about it either:
>>> >
>>> > http://marc.info/?l=linux-kernel&m=133879579014853&w=2
>>> >
>>> > I'll fetch a powerpc cross compiler and see if I can figure out what went
>>> > wrong.
>>> >
>>> Ok, it's because the asm-generic/bug.h __ASSEMBLY__ guarding is
>>> completely bogus. This should hopefully fix it once and for all.
>>> Sorry for the trouble.
>>>
>>> Signed-off-by: Paul Mundt <[email protected]>
>>
>> Tested-by: Stephen Rothwell <[email protected]>
>>
>> Can you create a proper commit message and send this to Linus, please?  I
>> have included it in my fixes tree in linux-next for today.
>>
>
> Reference: commit 2a6f7f6bd7a9eb3c835c7e5a7d51b43675fb3881 ("fix
> bug.h's inclusion of kernel.h")
>

Hope people don't treat this as nitpicking:
I looked through the last commits to the involved file, all commits
are labeled with "bug.h: ...", so follow the "rule"...

"bug.h: Fix inclusion of kernel.h"

> - Sedat -
>
> [1] http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commitdiff;h=2a6f7f6bd7a9eb3c835c7e5a7d51b43675fb3881
>
>> --
>> Cheers,
>> Stephen Rothwell                    [email protected]

2012-06-15 11:38:18

by Arnd Bergmann

[permalink] [raw]
Subject: Re: linux-next: build failure in Linus' tree

On Thursday 14 June 2012, Paul Mundt wrote:
> Ok, it's because the asm-generic/bug.h __ASSEMBLY__ guarding is
> completely bogus. This should hopefully fix it once and for all.
> Sorry for the trouble.
>
> Signed-off-by: Paul Mundt <[email protected]>

Acked-by: Arnd Bergmann <[email protected]>

2012-06-17 23:39:39

by Benjamin Herrenschmidt

[permalink] [raw]
Subject: Re: linux-next: build failure in Linus' tree

On Fri, 2012-06-15 at 09:56 +0900, Paul Mundt wrote:
> Will do, thanks for testing.

Ping ? :-)

All the powerpc builds are still broken...

Cheers,
Ben.

2012-06-18 04:58:26

by Paul Mundt

[permalink] [raw]
Subject: Re: linux-next: build failure in Linus' tree

On Mon, Jun 18, 2012 at 09:38:58AM +1000, Benjamin Herrenschmidt wrote:
> On Fri, 2012-06-15 at 09:56 +0900, Paul Mundt wrote:
> > Will do, thanks for testing.
>
> Ping ? :-)
>
> All the powerpc builds are still broken...
>
Sent now, sorry about the delay! As I was about to send it earlier,
someone else reported an x86 build failure that looked related, so I held
off until I could properly test it (I didn't want to just trade one
platform breakage for another). In the end it was unrelated to the patch
in question.