2024-01-29 01:22:42

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the tip tree

Hi all,

After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

In file included from include/linux/compiler_types.h:89,
from <command-line>:
kernel/irq/irq_sim.c: In function 'irq_domain_create_sim':
include/linux/compiler_attributes.h:76:41: error: expected expression before '__attribute__'
76 | #define __cleanup(func) __attribute__((__cleanup__(func)))
| ^~~~~~~~~~~~~
include/linux/cleanup.h:64:25: note: in expansion of macro '__cleanup'
64 | #define __free(_name) __cleanup(__free_##_name)
| ^~~~~~~~~
kernel/irq/irq_sim.c:173:19: note: in expansion of macro '__free'
173 | pending = __free(bitmap) = bitmap_zalloc(num_irqs, GFP_KERNEL);
| ^~~~~~

Caused by commit

590610d72a79 ("genirq/irq_sim: Shrink code by using cleanup helpers")

I have used the tip tree from next-20240125 for today.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2024-01-29 08:14:28

by Bartosz Golaszewski

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the tip tree

On Mon, 29 Jan 2024 at 02:22, Stephen Rothwell <[email protected]> wrote:
>
> Hi all,
>
> After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
>
> In file included from include/linux/compiler_types.h:89,
> from <command-line>:
> kernel/irq/irq_sim.c: In function 'irq_domain_create_sim':
> include/linux/compiler_attributes.h:76:41: error: expected expression before '__attribute__'
> 76 | #define __cleanup(func) __attribute__((__cleanup__(func)))
> | ^~~~~~~~~~~~~
> include/linux/cleanup.h:64:25: note: in expansion of macro '__cleanup'
> 64 | #define __free(_name) __cleanup(__free_##_name)
> | ^~~~~~~~~
> kernel/irq/irq_sim.c:173:19: note: in expansion of macro '__free'
> 173 | pending = __free(bitmap) = bitmap_zalloc(num_irqs, GFP_KERNEL);
> | ^~~~~~
>
> Caused by commit
>
> 590610d72a79 ("genirq/irq_sim: Shrink code by using cleanup helpers")
>
> I have used the tip tree from next-20240125 for today.
>
> --
> Cheers,
> Stephen Rothwell

For the record: this is not my code. This is what I sent:
https://lore.kernel.org/all/[email protected]/

Applying my version will fix the problem.

Thanks,
Bartosz

2017-11-09 06:20:01

by Ingo Molnar

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the tip tree


* Stephen Rothwell <[email protected]> wrote:

> Hi Ingo,
>
> On Wed, 8 Nov 2017 10:18:28 +0100 Ingo Molnar <[email protected]> wrote:
> >
> > Note, I created a commit out of this fix, with your SOB - let me know if you have
> > any objections.
>
> Only a small nit - I didn't bisect it, I just figured it out by
> inspection. Unfortunately, I don't have time to do bisections while
> building linux-next. :-(
>
> Not a biggie, though. Thanks for sorting this out.

Yeah, so while I knew that you didn't do the bisection the usual way, you still
got it right nevertheless, so the tag is well deserved! I'll add it as a
"Commit-identified-by" tag next time perhaps.

Thanks,

Ingo

From 1583556028249851064@xxx Thu Nov 09 03:05:12 +0000 2017
X-GM-THRID: 1583470096978513501
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread

2017-11-09 03:05:12

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the tip tree

Hi Ingo,

On Wed, 8 Nov 2017 10:18:28 +0100 Ingo Molnar <[email protected]> wrote:
>
> * Josh Poimboeuf <[email protected]> wrote:
>
> > On Wed, Nov 08, 2017 at 01:47:17PM +1100, Stephen Rothwell wrote:
> >
> > Does this fix it?
> >
> > diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
> > index 6aaed251b4ed..0f94af3ccaaa 100644
> > --- a/tools/objtool/Makefile
> > +++ b/tools/objtool/Makefile
> > @@ -27,7 +27,7 @@ all: $(OBJTOOL)
> >
> > INCLUDES := -I$(srctree)/tools/include \
> > -I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \
> > - -I$(srctree)/tools/objtool/arch/$(HOSTARCH)/include
> > + -I$(srctree)/tools/objtool/arch/$(ARCH)/include
> > WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
> > CFLAGS += -Wall -Werror $(WARNINGS) -fomit-frame-pointer -O2 -g $(INCLUDES)
> > LDFLAGS += -lelf $(LIBSUBCMD)
>
> Note, I created a commit out of this fix, with your SOB - let me know if you have
> any objections.

I applied this patch to linux-next today after the tip tree merge.
--
Cheers,
Stephen Rothwell

From 1583504096723868765@xxx Wed Nov 08 13:19:46 +0000 2017
X-GM-THRID: 1583470096978513501
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread

2017-11-08 13:19:46

by Josh Poimboeuf

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the tip tree

On Wed, Nov 08, 2017 at 10:18:28AM +0100, Ingo Molnar wrote:
>
> * Josh Poimboeuf <[email protected]> wrote:
>
> > On Wed, Nov 08, 2017 at 01:47:17PM +1100, Stephen Rothwell wrote:
> > > Presumably caused by commit
> > >
> > > 6a77cff819ae ("objtool: Move synced files to their original relative locations")
> > >
> > > If it matters, this is a cross compilation (PowerPC host) using O= .
> > >
> > > I have used the tip tree from next-20171107 for today.
> >
> > Hi Stephen,
> >
> > Does this fix it?
> >
> > diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
> > index 6aaed251b4ed..0f94af3ccaaa 100644
> > --- a/tools/objtool/Makefile
> > +++ b/tools/objtool/Makefile
> > @@ -27,7 +27,7 @@ all: $(OBJTOOL)
> >
> > INCLUDES := -I$(srctree)/tools/include \
> > -I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \
> > - -I$(srctree)/tools/objtool/arch/$(HOSTARCH)/include
> > + -I$(srctree)/tools/objtool/arch/$(ARCH)/include
> > WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
> > CFLAGS += -Wall -Werror $(WARNINGS) -fomit-frame-pointer -O2 -g $(INCLUDES)
> > LDFLAGS += -lelf $(LIBSUBCMD)
>
> Note, I created a commit out of this fix, with your SOB - let me know if you have
> any objections.

Looks good, thanks Ingo!

--
Josh

From 1583500044474713995@xxx Wed Nov 08 12:15:22 +0000 2017
X-GM-THRID: 1583470096978513501
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread

2017-11-08 12:15:22

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the tip tree

Hi Ingo,

On Wed, 8 Nov 2017 10:18:28 +0100 Ingo Molnar <[email protected]> wrote:
>
> Note, I created a commit out of this fix, with your SOB - let me know if you have
> any objections.

Only a small nit - I didn't bisect it, I just figured it out by
inspection. Unfortunately, I don't have time to do bisections while
building linux-next. :-(

Not a biggie, though. Thanks for sorting this out.

--
Cheers,
Stephen Rothwell

From 1583488983040879393@xxx Wed Nov 08 09:19:33 +0000 2017
X-GM-THRID: 1583470096978513501
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread

2017-11-08 09:19:33

by Ingo Molnar

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the tip tree


* Josh Poimboeuf <[email protected]> wrote:

> On Wed, Nov 08, 2017 at 01:47:17PM +1100, Stephen Rothwell wrote:
> > Presumably caused by commit
> >
> > 6a77cff819ae ("objtool: Move synced files to their original relative locations")
> >
> > If it matters, this is a cross compilation (PowerPC host) using O= .
> >
> > I have used the tip tree from next-20171107 for today.
>
> Hi Stephen,
>
> Does this fix it?
>
> diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
> index 6aaed251b4ed..0f94af3ccaaa 100644
> --- a/tools/objtool/Makefile
> +++ b/tools/objtool/Makefile
> @@ -27,7 +27,7 @@ all: $(OBJTOOL)
>
> INCLUDES := -I$(srctree)/tools/include \
> -I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \
> - -I$(srctree)/tools/objtool/arch/$(HOSTARCH)/include
> + -I$(srctree)/tools/objtool/arch/$(ARCH)/include
> WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
> CFLAGS += -Wall -Werror $(WARNINGS) -fomit-frame-pointer -O2 -g $(INCLUDES)
> LDFLAGS += -lelf $(LIBSUBCMD)

Note, I created a commit out of this fix, with your SOB - let me know if you have
any objections.

Thanks,

Ingo

From 1583483635681954882@xxx Wed Nov 08 07:54:33 +0000 2017
X-GM-THRID: 1583470096978513501
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread

2017-11-08 07:54:33

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the tip tree

Hi Josh,

On Tue, 7 Nov 2017 21:01:52 -0600 Josh Poimboeuf <[email protected]> wrote:
>
> On Wed, Nov 08, 2017 at 01:47:17PM +1100, Stephen Rothwell wrote:
> > Presumably caused by commit
> >
> > 6a77cff819ae ("objtool: Move synced files to their original relative locations")
> >
> > If it matters, this is a cross compilation (PowerPC host) using O= .
> >
> > I have used the tip tree from next-20171107 for today.
>
> Hi Stephen,
>
> Does this fix it?
>
> diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
> index 6aaed251b4ed..0f94af3ccaaa 100644
> --- a/tools/objtool/Makefile
> +++ b/tools/objtool/Makefile
> @@ -27,7 +27,7 @@ all: $(OBJTOOL)
>
> INCLUDES := -I$(srctree)/tools/include \
> -I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \
> - -I$(srctree)/tools/objtool/arch/$(HOSTARCH)/include
> + -I$(srctree)/tools/objtool/arch/$(ARCH)/include
> WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
> CFLAGS += -Wall -Werror $(WARNINGS) -fomit-frame-pointer -O2 -g $(INCLUDES)
> LDFLAGS += -lelf $(LIBSUBCMD)

Yes, thanks.

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

--
Cheers,
Stephen Rothwell

From 1583470291131219826@xxx Wed Nov 08 04:22:27 +0000 2017
X-GM-THRID: 1583470096978513501
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread

2017-11-08 04:22:27

by Josh Poimboeuf

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the tip tree

On Wed, Nov 08, 2017 at 01:47:17PM +1100, Stephen Rothwell wrote:
> Presumably caused by commit
>
> 6a77cff819ae ("objtool: Move synced files to their original relative locations")
>
> If it matters, this is a cross compilation (PowerPC host) using O= .
>
> I have used the tip tree from next-20171107 for today.

Hi Stephen,

Does this fix it?

diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
index 6aaed251b4ed..0f94af3ccaaa 100644
--- a/tools/objtool/Makefile
+++ b/tools/objtool/Makefile
@@ -27,7 +27,7 @@ all: $(OBJTOOL)

INCLUDES := -I$(srctree)/tools/include \
-I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \
- -I$(srctree)/tools/objtool/arch/$(HOSTARCH)/include
+ -I$(srctree)/tools/objtool/arch/$(ARCH)/include
WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
CFLAGS += -Wall -Werror $(WARNINGS) -fomit-frame-pointer -O2 -g $(INCLUDES)
LDFLAGS += -lelf $(LIBSUBCMD)

From 1583470096978513501@xxx Wed Nov 08 04:19:22 +0000 2017
X-GM-THRID: 1583470096978513501
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread

Subject: [tip:core/objtool] objtool: Fix cross-build

Commit-ID: 9eb719855f6c9b21eb5889d9ac2ca1c60527ad89
Gitweb: https://git.kernel.org/tip/9eb719855f6c9b21eb5889d9ac2ca1c60527ad89
Author: Josh Poimboeuf <[email protected]>
AuthorDate: Tue, 7 Nov 2017 21:01:52 -0600
Committer: Ingo Molnar <[email protected]>
CommitDate: Wed, 8 Nov 2017 10:06:08 +0100

objtool: Fix cross-build

Stephen Rothwell reported this cross-compilation build failure:

| In file included from orc_dump.c:19:0:
| orc.h:21:10: fatal error: asm/orc_types.h: No such file or directory
| ...

Caused by:

6a77cff819ae ("objtool: Move synced files to their original relative locations")

Use the proper arch header files location, not the host-arch location.

Bisected-by: Stephen Rothwell <[email protected]>
Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Josh Poimboeuf <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Linux-Next Mailing List <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: http://lkml.kernel.org/r/20171108030152.bd76eahiwjwjt3kp@treble
Signed-off-by: Ingo Molnar <[email protected]>
---
tools/objtool/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
index 6aaed25..0f94af3 100644
--- a/tools/objtool/Makefile
+++ b/tools/objtool/Makefile
@@ -27,7 +27,7 @@ all: $(OBJTOOL)

INCLUDES := -I$(srctree)/tools/include \
-I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \
- -I$(srctree)/tools/objtool/arch/$(HOSTARCH)/include
+ -I$(srctree)/tools/objtool/arch/$(ARCH)/include
WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
CFLAGS += -Wall -Werror $(WARNINGS) -fomit-frame-pointer -O2 -g $(INCLUDES)
LDFLAGS += -lelf $(LIBSUBCMD)

From 1583468332912277391@xxx Wed Nov 08 03:51:19 +0000 2017
X-GM-THRID: 1582463214376446658
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread