On Wed, Oct 28, 2026 at 11:05:58AM -0400, Steven Rostedt wrote:
> 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.
> 
> Signed-off-by: Steven Rostedt <[email protected]>

Reviewed-by: Yury Norov <[email protected]>

> ---
>  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

Reply via email to