lockdep: Add #include <linux/instruction_pointer.h> to lockdep.h
Subsystems (2)
Steven Rostedt
maintainerPATCH 1/1 lockdep: Add #include <linux/instruction_pointer.h> to lockdep.h
From: Steven Rostedt <[email protected]>
On 32bit x86, _THIS_IP_ is not defined in asm/linkage.h. It happens to get included into lockdep.h via kernel.h pulling in trace_printk.h which includes instruction_pointer.h that has _THIS_IP_ defined when linkage.h does not.
In order to remove trace_printk.h from kernel.h, have lockdep.h include instruction_pointer.h directly.
--- include/linux/lockdep.h | 1 + 1 file changed, 1 insertion(+)
include/linux/lockdep.h +1 -0
@@ -22,6 +22,7 @@ struct task_struct;#include <linux/list.h> #include <linux/debug_locks.h> #include <linux/stacktrace.h> +#include <linux/instruction_pointer.h> /* In case _THIS_IP_ isn't defined */ static inline void lockdep_copy_map (struct lockdep_map *to,struct lockdep_map *from)
Signature · 1 line
2.53.0
Quoted 11 lines · Steven Rostedt
From: Steven Rostedt <[email protected]>
On 32bit x86, _THIS_IP_ is not defined in
asm/linkage.h. It happens to get included intolockdep.hviakernel.hpulling intrace_printk.hwhich includesinstruction_pointer.hthat has _THIS_IP_ defined whenlinkage.hdoes not.In order to remove
trace_printk.hfromkernel.h, havelockdep.hincludeinstruction_pointer.hdirectly.Signed-off-by Steven Rostedt <[email protected]>
Quoted 18 lines
--- include/linux/lockdep.h | 1 + 1 file changed, 1 insertion(+)include/linux/lockdep.h +1
-0@@ -22,6 +22,7 @@ struct task_struct;#include <linux/list.h> #include <linux/debug_locks.h> #include <linux/stacktrace.h> +#include <linux/instruction_pointer.h> /* In case _THIS_IP_ isn't defined */ static inline void lockdep_copy_map (struct lockdep_map *to,struct lockdep_map *from)Signature · 1 line
2.53.0
Steven Rostedt
maintainerQuoted 8 lines · On Wed, 28 Oct 2026 11:16:05 -0400 Yury Norov <[email protected]> wrote:
Quoted 7 lines · Steven Rostedt
From: Steven Rostedt <[email protected]>
On 32bit x86, _THIS_IP_ is not defined in
asm/linkage.h. It happens to get included intolockdep.hviakernel.hpulling intrace_printk.hwhich includesinstruction_pointer.hthat has _THIS_IP_ defined whenlinkage.hdoes not.
Quoted 6 lines
Quoted 4 lines
In order to remove
trace_printk.hfromkernel.h, havelockdep.hincludeinstruction_pointer.hdirectly.Signed-off-by Steven Rostedt <[email protected]>Reviewed-by Yury Norov <[email protected]>
Thanks Yury.
Peter, can you give me an Acked-by on this patch and then I can add it to my series to remove trace_printk.h from kernel.h as that depends on this patch.
Thanks,
-- Steve
Quoted 19 lines
Quoted 19 lines
--- include/linux/lockdep.h | 1 + 1 file changed, 1 insertion(+)include/linux/lockdep.h +1
-0@@ -22,6 +22,7 @@ struct task_struct;#include <linux/list.h> #include <linux/debug_locks.h> #include <linux/stacktrace.h> +#include <linux/instruction_pointer.h> /* In case _THIS_IP_ isn't defined */ static inline void lockdep_copy_map (struct lockdep_map *to,struct lockdep_map *from)Signature · 1 line
2.53.0
Quoted 16 lines · Steven Rostedt
Quoted 13 lines · On Wed, 28 Oct 2026 11:16:05 -0400 Yury Norov <[email protected]> wrote:
Quoted 11 lines · Steven Rostedt
From: Steven Rostedt <[email protected]>
On 32bit x86, _THIS_IP_ is not defined in
asm/linkage.h. It happens to get included intolockdep.hviakernel.hpulling intrace_printk.hwhich includesinstruction_pointer.hthat has _THIS_IP_ defined whenlinkage.hdoes not.In order to remove
trace_printk.hfromkernel.h, havelockdep.hincludeinstruction_pointer.hdirectly.Signed-off-by Steven Rostedt <[email protected]>
Quoted 7 lines
Quoted 1 line
Reviewed-by Yury Norov <[email protected]>Thanks Yury.
Peter, can you give me an Acked-by on this patch and then I can add it to my series to remove
trace_printk.hfromkernel.has that depends on this patch.
Steven, can you share a link to the series?
Steven Rostedt
maintainerQuoted 5 lines · On Wed, 28 Oct 2026 11:48:16 -0400 Yury Norov <[email protected]> wrote:
Quoted 3 lines
Peter, can you give me an Acked-by on this patch and then I can add it to my series to remove
trace_printk.hfromkernel.has that depends on this patch.Steven, can you share a link to the series?
I just applied my last series:
https://lore.kernel.org/linux-trace-kernel/[email protected]/
-- Steve
Quoted 7 lines · Steven Rostedt
Quoted 4 lines · On Wed, 28 Oct 2026 11:48:16 -0400 Yury Norov <[email protected]> wrote:
Quoted 3 lines
Peter, can you give me an Acked-by on this patch and then I can add it to my series to remove
trace_printk.hfromkernel.has that depends on this patch.
Quoted 5 lines
Quoted 1 line
Steven, can you share a link to the series?
I just applied my last series:
https://lore.kernel.org/linux-trace-kernel/[email protected]/
Hmm... Seems I overlooked that v4. If not too late, please add my:
Thanks,
Yury
Quoted 3 lines · On Wed, 28 Oct 2026 13:54:35 -0400 Yury Norov <[email protected]> wrote:
Hmm... Seems I overlooked that v4. If not too late, please add my:
Reviewer-by Yury Norov <[email protected]>
Sure, no problem. Except I'll put it as:
;-)
-- Steve
Quoted 11 lines · Steven Rostedt
From: Steven Rostedt <[email protected]>
On 32bit x86, _THIS_IP_ is not defined in
asm/linkage.h. It happens to get included intolockdep.hviakernel.hpulling intrace_printk.hwhich includesinstruction_pointer.hthat has _THIS_IP_ defined whenlinkage.hdoes not.In order to remove
trace_printk.hfromkernel.h, havelockdep.hincludeinstruction_pointer.hdirectly.Signed-off-by Steven Rostedt <[email protected]>
Quoted 19 lines
--- include/linux/lockdep.h | 1 + 1 file changed, 1 insertion(+)include/linux/lockdep.h +1
-0@@ -22,6 +22,7 @@ struct task_struct;#include <linux/list.h> #include <linux/debug_locks.h> #include <linux/stacktrace.h> +#include <linux/instruction_pointer.h> /* In case _THIS_IP_ isn't defined */ static inline void lockdep_copy_map (struct lockdep_map *to,struct lockdep_map *from)Signature · 1 line
2.53.0