mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] lockdep: Add #include <linux/instruction_pointer.h> to lockdep.h
@ 2026-10-28 15:05 Steven Rostedt
  2026-10-28 15:16 ` Yury Norov
  0 siblings, 1 reply; 7+ messages in thread
From: Steven Rostedt @ 2026-10-28 15:05 UTC (permalink / raw)
  To: LKML, Linux Trace Kernel; +Cc: Peter Zijlstra, Masami Hiramatsu, Yury Norov

From: Steven Rostedt <rostedt@goodmis.org>

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.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 include/linux/lockdep.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index a6451ecbbe9a..c6b0168f5fc9 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -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)
-- 
2.53.0


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

* Re: [PATCH] lockdep: Add #include <linux/instruction_pointer.h> to lockdep.h
  2026-10-28 15:05 [PATCH] lockdep: Add #include <linux/instruction_pointer.h> to lockdep.h Steven Rostedt
@ 2026-10-28 15:16 ` Yury Norov
  2026-10-28 15:45   ` Steven Rostedt
  0 siblings, 1 reply; 7+ messages in thread
From: Yury Norov @ 2026-10-28 15:16 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: LKML, Linux Trace Kernel, Peter Zijlstra, Masami Hiramatsu, Yury Norov

On Wed, Oct 28, 2026 at 11:05:58AM -0400, Steven Rostedt wrote:
> From: Steven Rostedt <rostedt@goodmis.org>
> 
> 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.
> 
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Reviewed-by: Yury Norov <yury.norov@gmail.com>

> ---
>  include/linux/lockdep.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
> index a6451ecbbe9a..c6b0168f5fc9 100644
> --- a/include/linux/lockdep.h
> +++ b/include/linux/lockdep.h
> @@ -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)
> -- 
> 2.53.0

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

* Re: [PATCH] lockdep: Add #include <linux/instruction_pointer.h> to lockdep.h
  2026-10-28 15:16 ` Yury Norov
@ 2026-10-28 15:45   ` Steven Rostedt
  2026-10-28 15:48     ` Yury Norov
  0 siblings, 1 reply; 7+ messages in thread
From: Steven Rostedt @ 2026-10-28 15:45 UTC (permalink / raw)
  To: Yury Norov
  Cc: LKML, Linux Trace Kernel, Peter Zijlstra, Masami Hiramatsu, Yury Norov

On Wed, 28 Oct 2026 11:16:05 -0400
Yury Norov <ynorov@nvidia.com> wrote:

> On Wed, Oct 28, 2026 at 11:05:58AM -0400, Steven Rostedt wrote:
> > From: Steven Rostedt <rostedt@goodmis.org>
> > 
> > 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.
> > 
> > Signed-off-by: Steven Rostedt <rostedt@goodmis.org>  
> 
> Reviewed-by: Yury Norov <yury.norov@gmail.com>

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


> 
> > ---
> >  include/linux/lockdep.h | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
> > index a6451ecbbe9a..c6b0168f5fc9 100644
> > --- a/include/linux/lockdep.h
> > +++ b/include/linux/lockdep.h
> > @@ -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)
> > -- 
> > 2.53.0  


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

* Re: [PATCH] lockdep: Add #include <linux/instruction_pointer.h> to lockdep.h
  2026-10-28 15:45   ` Steven Rostedt
@ 2026-10-28 15:48     ` Yury Norov
  2026-10-28 16:30       ` Steven Rostedt
  0 siblings, 1 reply; 7+ messages in thread
From: Yury Norov @ 2026-10-28 15:48 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: LKML, Linux Trace Kernel, Peter Zijlstra, Masami Hiramatsu, Yury Norov

On Wed, Oct 28, 2026 at 11:45:28AM -0400, Steven Rostedt wrote:
> On Wed, 28 Oct 2026 11:16:05 -0400
> Yury Norov <ynorov@nvidia.com> wrote:
> 
> > On Wed, Oct 28, 2026 at 11:05:58AM -0400, Steven Rostedt wrote:
> > > From: Steven Rostedt <rostedt@goodmis.org>
> > > 
> > > 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.
> > > 
> > > Signed-off-by: Steven Rostedt <rostedt@goodmis.org>  
> > 
> > Reviewed-by: Yury Norov <yury.norov@gmail.com>
> 
> 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.

Steven, can you share a link to the series?

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

* Re: [PATCH] lockdep: Add #include <linux/instruction_pointer.h> to lockdep.h
  2026-10-28 15:48     ` Yury Norov
@ 2026-10-28 16:30       ` Steven Rostedt
  2026-10-28 17:54         ` Yury Norov
  0 siblings, 1 reply; 7+ messages in thread
From: Steven Rostedt @ 2026-10-28 16:30 UTC (permalink / raw)
  To: Yury Norov
  Cc: LKML, Linux Trace Kernel, Peter Zijlstra, Masami Hiramatsu, Yury Norov

On Wed, 28 Oct 2026 11:48:16 -0400
Yury Norov <ynorov@nvidia.com> wrote:

> > 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.  
> 
> Steven, can you share a link to the series?

I just applied my last series:

  https://lore.kernel.org/linux-trace-kernel/20260625104007.041432666@kernel.org/

-- Steve

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

* Re: [PATCH] lockdep: Add #include <linux/instruction_pointer.h> to lockdep.h
  2026-10-28 16:30       ` Steven Rostedt
@ 2026-10-28 17:54         ` Yury Norov
  2026-10-28 18:05           ` Steven Rostedt
  0 siblings, 1 reply; 7+ messages in thread
From: Yury Norov @ 2026-10-28 17:54 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: LKML, Linux Trace Kernel, Peter Zijlstra, Masami Hiramatsu, Yury Norov

On Wed, Oct 28, 2026 at 12:30:51PM -0400, Steven Rostedt wrote:
> On Wed, 28 Oct 2026 11:48:16 -0400
> Yury Norov <ynorov@nvidia.com> wrote:
> 
> > > 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.  
> > 
> > Steven, can you share a link to the series?
> 
> I just applied my last series:
> 
>   https://lore.kernel.org/linux-trace-kernel/20260625104007.041432666@kernel.org/

Hmm... Seems I overlooked that v4. If not too late, please add my:

Reviewer-by: Yury Norov <ynorov@nvidia.com>

Thanks,
Yury

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

* Re: [PATCH] lockdep: Add #include <linux/instruction_pointer.h> to lockdep.h
  2026-10-28 17:54         ` Yury Norov
@ 2026-10-28 18:05           ` Steven Rostedt
  0 siblings, 0 replies; 7+ messages in thread
From: Steven Rostedt @ 2026-10-28 18:05 UTC (permalink / raw)
  To: Yury Norov
  Cc: LKML, Linux Trace Kernel, Peter Zijlstra, Masami Hiramatsu, Yury Norov

On Wed, 28 Oct 2026 13:54:35 -0400
Yury Norov <ynorov@nvidia.com> wrote:

> Hmm... Seems I overlooked that v4. If not too late, please add my:
> 
> Reviewer-by: Yury Norov <ynorov@nvidia.com>

Sure, no problem. Except I'll put it as:

 Reviewed-by: Yury Norov <ynorov@nvidia.com>

 ;-)

-- Steve


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

end of thread, other threads:[~2026-10-28 18:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-28 15:05 [PATCH] lockdep: Add #include <linux/instruction_pointer.h> to lockdep.h Steven Rostedt
2026-10-28 15:16 ` Yury Norov
2026-10-28 15:45   ` Steven Rostedt
2026-10-28 15:48     ` Yury Norov
2026-10-28 16:30       ` Steven Rostedt
2026-10-28 17:54         ` Yury Norov
2026-10-28 18:05           ` Steven Rostedt

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

all inboxes | Powered by JetHome®