linux-next: build failure after merge of the akpm-current tree
Hi all,
After merging the akpm-current tree, today's linux-next build (arm multi_v7_defconfig) failed like this:
In file included from include/linux/rcupdate.h:28,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from arch/arm/kernel/asm-offsets.c:11:include/linux/bottom_half.h: In function 'local_bh_disable':include/linux/bottom_half.h:19:24: error: '_THIS_IP_' undeclared (first use in this function)
19 | __local_bh_disable_ip(_THIS_IP_, SOFTIRQ_DISABLE_OFFSET);
| ^~~~~~~~~
include/linux/bottom_half.h:19:24: note: each undeclared identifier is reported only once for each function it appears in
include/linux/bottom_half.h: In function 'local_bh_enable':
include/linux/bottom_half.h:32:23: error: '_THIS_IP_' undeclared (first use in this function)
32 | __local_bh_enable_ip(_THIS_IP_, SOFTIRQ_DISABLE_OFFSET);
| ^~~~~~~~~Presumably caused by a commit in the series that starts with
dcaf7a5f413b ("kernel.h: drop unneeded <linux/kernel.h> inclusion from other headers")
I have applied the following patch for today (though there may be a better solution).
From: Stephen Rothwell <[email protected]>
Date: Fri, 15 Oct 2021 19:58:46 +1100
Subject: [PATCH] bottom_half.h needs kernel.h
for _THIS_IP_ on arm at least
--- include/linux/bottom_half.h | 1 + 1 file changed, 1 insertion(+)
include/linux/bottom_half.h +1 -0
@@ -2,6 +2,7 @@#ifndef _LINUX_BH_H#define _LINUX_BH_H +#include <linux/kernel.h> #include <linux/preempt.h> #if defined(CONFIG_PREEMPT_RT ) || defined(CONFIG_TRACE_IRQFLAGS )
Signature · 5 lines
2.33.0 -- Cheers, Stephen Rothwell
+Cc: Rasmus
Quoted 20 lines · Stephen Rothwell
Hi all,
After merging the akpm-current tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:In file included from
include/linux/rcupdate.h:28,
frominclude/linux/rculist.h:11,
frominclude/linux/pid.h:5,
frominclude/linux/sched.h:14,
fromarch/arm/kernel/asm-offsets.c:11:include/linux/bottom_half.h: In function 'local_bh_disable':include/linux/bottom_half.h:19:24: error: '_THIS_IP_' undeclared (first use in this function)19 | __local_bh_disable_ip(_THIS_IP_, SOFTIRQ_DISABLE_OFFSET); | ^~~~~~~~~ include/linux/bottom_half.h:19:24: note: each undeclared identifier is reported only once for each function it appears in include/linux/bottom_half.h: In function 'local_bh_enable': include/linux/bottom_half.h:32:23: error: '_THIS_IP_' undeclared (first use in this function) 32 | __local_bh_enable_ip(_THIS_IP_, SOFTIRQ_DISABLE_OFFSET); | ^~~~~~~~~
Quoted 6 lines
Presumably caused by a commit in the series that starts with
dcaf7a5f413b("kernel.h: drop unneeded <linux/kernel.h> inclusion from other headers")I have applied the following patch for today (though there may be a better solution).
Thanks! As a quick fix looks good, but I think we need a separate header for those _*_IP_ macros.
Quoted 23 lines
From: Stephen Rothwell <[email protected]>
Date: Fri, 15 Oct 2021 19:58:46 +1100
Subject: [PATCH]bottom_half.hneedskernel.hfor _THIS_IP_ on arm at least
Signed-off-by Stephen Rothwell <[email protected]>--- include/linux/bottom_half.h | 1 + 1 file changed, 1 insertion(+)include/linux/bottom_half.h +1
-0@@ -2,6 +2,7 @@#ifndef _LINUX_BH_H#define _LINUX_BH_H +#include <linux/kernel.h> #include <linux/preempt.h> #if defined(CONFIG_PREEMPT_RT ) || defined(CONFIG_TRACE_IRQFLAGS )
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hi Andy,
Quoted 3 lines · On Fri, 15 Oct 2021 16:14:56 +0300 Andy Shevchenko…
Thanks! As a quick fix looks good, but I think we need a separate header for those _*_IP_ macros.
Like this (on top of my previous fix - which I assume Andrew will squash out of existence)?
From: Stephen Rothwell <[email protected]>
Date: Mon, 18 Oct 2021 13:27:54 +1100
Subject: [PATCH] kernel.h: split out instrcutions pointer accessors
botton_half.h needs _THIS_IP_ to be standalone, so split that and _RET_IP_ out from kernel.h into the new instruction_pointer.h. kernel.h directly needs them, so include it there and replace the include of kernel.h with this new file in bottom_half.h.
--- include/linux/bottom_half.h | 2 +- include/linux/instruction_pointer.h | 8 ++++++++ include/linux/kernel.h | 4 +--- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 include/linux/instruction_pointer.h
include/linux/bottom_half.h +1 -1
@@ -2,7 +2,7 @@#ifndef _LINUX_BH_H#define _LINUX_BH_H -#include <linux/kernel.h> +#include <linux/instruction_pointer.h> #include <linux/preempt.h> #if defined(CONFIG_PREEMPT_RT ) || defined(CONFIG_TRACE_IRQFLAGS )
include/linux/instruction_pointer.h new file +8 -0
@@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_INSTRUCTION_POINTER_H +#define _LINUX_INSTRUCTION_POINTER_H + +#define _RET_IP_ (unsigned long)__builtin_return_address(0) +#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) + +#enfif /* _LINUX_INSTRUCTION_POINTER_H */
include/linux/kernel.h +1 -3
@@ -20,6 +20,7 @@#include <linux/printk.h> #include <linux/build_bug.h> #include <linux/static_call_types.h> +#include <linux/instruction_pointer.h> #include <asm/byteorder.h> #include <uapi/linux/kernel.h>
@@ -53,9 +54,6 @@ } \ ) -#define _RET_IP_ (unsigned long)__builtin_return_address(0) -#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) -/** * upper_32_bits - return bits 32-63 of a number * @n: the number we're accessing
Signature · 7 lines
2.33.0 There are, presumably, other places this new file can be included ... -- Cheers, Stephen Rothwell
Quoted 7 lines · Stephen Rothwell
Quoted 3 lines · On Fri, 15 Oct 2021 16:14:56 +0300 Andy Shevchenko…
Thanks! As a quick fix looks good, but I think we need a separate header for those _*_IP_ macros.
Like this (on top of my previous fix - which I assume Andrew will squash out of existence)?
Yep, thanks!
I thought that it makes sense to have STACK_MAGIC also in this header. Thoughts?
One spelling correction below.
Quoted 3 lines
From: Stephen Rothwell <[email protected]>
Date: Mon, 18 Oct 2021 13:27:54 +1100
Subject: [PATCH]kernel.h: split out instrcutions pointer accessors
instructions
Quoted 70 lines
botton_half.hneeds _THIS_IP_ to be standalone, so split that and _RET_IP_ out fromkernel.hinto the newinstruction_pointer.h.kernel.hdirectly needs them, so include it there and replace the include ofkernel.hwith this new file inbottom_half.h.Signed-off-by Stephen Rothwell <[email protected]>--- include/linux/bottom_half.h | 2 +- include/linux/instruction_pointer.h | 8 ++++++++ include/linux/kernel.h | 4 +--- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 include/linux/instruction_pointer.hinclude/linux/bottom_half.h +1
-1@@ -2,7 +2,7 @@#ifndef _LINUX_BH_H#define _LINUX_BH_H -#include <linux/kernel.h> +#include <linux/instruction_pointer.h> #include <linux/preempt.h> #if defined(CONFIG_PREEMPT_RT ) || defined(CONFIG_TRACE_IRQFLAGS )include/linux/instruction_pointer.h new file +8
-0@@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_INSTRUCTION_POINTER_H +#define _LINUX_INSTRUCTION_POINTER_H + +#define _RET_IP_ (unsigned long)__builtin_return_address(0) +#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) + +#enfif /* _LINUX_INSTRUCTION_POINTER_H */ include/linux/kernel.h +1
-4@@ -20,6 +20,7 @@#include <linux/printk.h> #include <linux/build_bug.h> #include <linux/static_call_types.h> +#include <linux/instruction_pointer.h> #include <asm/byteorder.h> #include <uapi/linux/kernel.h> @@ -53,9 +54,6 @@ } \ ) -#define _RET_IP_ (unsigned long)__builtin_return_address(0) -#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) -/** * upper_32_bits - return bits 32-63 of a number * @n: the number we're accessing -- 2.33.0
There are, presumably, other places this new file can be included ...
--
Cheers,
Stephen Rothwell
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hi Andy,
Quoted 4 lines · On Mon, 18 Oct 2021 11:01:18 +0300 Andy Shevchenko <[email protected]>…
Quoted 2 lines · Stephen Rothwell
Quoted 1 line · On Fri, 15 Oct 2021 16:14:56 +0300 Andy Shevchenko…
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Thanks! As a quick fix looks good, but I think we need a separate header for those _*_IP_ macros.
Like this (on top of my previous fix - which I assume Andrew will squash out of existence)?
Yep, thanks!
I thought that it makes sense to haveSTACK_MAGICalso in this header. Thoughts?
You might want to think of a different name for the header file then.
Quoted 8 lines
One spelling correction below.
Quoted 3 lines
From: Stephen Rothwell <[email protected]>
Date: Mon, 18 Oct 2021 13:27:54 +1100
Subject: [PATCH]kernel.h: split out instrcutions pointer accessorsinstructions
instruction ? :-)
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 10 lines · Stephen Rothwell
Hi Andy,
Quoted 7 lines · On Mon, 18 Oct 2021 11:01:18 +0300 Andy Shevchenko <[email protected]>…
Quoted 5 lines · Stephen Rothwell
Quoted 3 lines · On Fri, 15 Oct 2021 16:14:56 +0300 Andy Shevchenko…
Thanks! As a quick fix looks good, but I think we need a separate header for those _*_IP_ macros.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Like this (on top of my previous fix - which I assume Andrew will squash out of existence)?
Yep, thanks!
I thought that it makes sense to haveSTACK_MAGICalso in this header. Thoughts?You might want to think of a different name for the header file then.
Eh, it seems more reasonable to leave it in kernel.h, then figure out how to get rid of it completely. AFAICT it's only used in one single place under arch/ (and I can't figure out how that magic value is supposed to get there in the first place... that arch was thrown out in 2013 and resurrected in 2015, but that particular line doesn't make sense), and then in some i915 code which might as well define their own cookie.
Rasmus
Quoted 3 lines · Rasmus Villemoes
Quoted 2 lines · Stephen Rothwell
Quoted 1 line · On Mon, 18 Oct 2021 11:01:18 +0300 Andy Shevchenko <[email protected]>…
On Mon, Oct 18, 2021 at 6:49 AM Stephen Rothwell <[email protected]> wrote:
...
Quoted 11 lines
Quoted 3 lines
Quoted 1 line
I thought that it makes sense to have
STACK_MAGICalso in this header. Thoughts?You might want to think of a different name for the header file then.
Eh, it seems more reasonable to leave it in
kernel.h, then figure out how to get rid of it completely. AFAICT it's only used in one single place underarch/(and I can't figure out how that magic value is supposed to get there in the first place... that arch was thrown out in 2013 and resurrected in 2015, but that particular line doesn't make sense), and then in some i915 code which might as well define their own cookie.
It's used in two places and probably we may just move it to these two users, I don't believe will we ever have i915 together with h8300.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 1 line · Stephen Rothwell
On Fri, 15 Oct 2021 16:14:56 +0300 Andy Shevchenko <[email protected]> wrote:
...
Quoted 2 lines
Like this (on top of my previous fix - which I assume Andrew will squash out of existence)?
Andrew, can you incorporate this one, please?
Quoted 68 lines
From: Stephen Rothwell <[email protected]>
Date: Mon, 18 Oct 2021 13:27:54 +1100
Subject: [PATCH]kernel.h: split out instrcutions pointer accessors
botton_half.hneeds _THIS_IP_ to be standalone, so split that and _RET_IP_ out fromkernel.hinto the newinstruction_pointer.h.kernel.hdirectly needs them, so include it there and replace the include ofkernel.hwith this new file inbottom_half.h.Signed-off-by Stephen Rothwell <[email protected]>--- include/linux/bottom_half.h | 2 +- include/linux/instruction_pointer.h | 8 ++++++++ include/linux/kernel.h | 4 +--- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 include/linux/instruction_pointer.hinclude/linux/bottom_half.h +1
-1@@ -2,7 +2,7 @@#ifndef _LINUX_BH_H#define _LINUX_BH_H -#include <linux/kernel.h> +#include <linux/instruction_pointer.h> #include <linux/preempt.h> #if defined(CONFIG_PREEMPT_RT ) || defined(CONFIG_TRACE_IRQFLAGS )include/linux/instruction_pointer.h new file +8
-0@@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_INSTRUCTION_POINTER_H +#define _LINUX_INSTRUCTION_POINTER_H + +#define _RET_IP_ (unsigned long)__builtin_return_address(0) +#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) + +#enfif /* _LINUX_INSTRUCTION_POINTER_H */ include/linux/kernel.h +1
-3@@ -20,6 +20,7 @@#include <linux/printk.h> #include <linux/build_bug.h> #include <linux/static_call_types.h> +#include <linux/instruction_pointer.h> #include <asm/byteorder.h> #include <uapi/linux/kernel.h> @@ -53,9 +54,6 @@ } \ ) -#define _RET_IP_ (unsigned long)__builtin_return_address(0) -#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) -/** * upper_32_bits - return bits 32-63 of a number * @n: the number we're accessing Signature · 1 line
2.33.0
Signature · 2 lines
With Best Regards, Andy Shevchenko