Build fixes for liblockdep
cover Build fixes for liblockdep
In addition to the patch I recently sent for lockdep itself, the following fixes are also needed to make liblockdep build.
Ben.
Bastian Blank (1):
liblockdep: Stub NMI watchdog reset
Ben Hutchings (1):
liblockdep: Stub task_struct::state
tools/include/linux/lockdep.h | 4 ++++ tools/include/linux/nmi.h | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 tools/include/linux/nmi.h
PATCH 1/2 liblockdep: Stub NMI watchdog reset
From: Bastian Blank <[email protected]>
lockdep.c now includes <linux/nmi.h> and requires touch_nmi_watchdog(), so provide those for liblockdep.
--- tools/include/linux/nmi.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tools/include/linux/nmi.h
tools/include/linux/nmi.h new file +12 -0
@@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* linux/include/linux/nmi.h +*/ +#ifndef LINUX_NMI_H +#define LINUX_NMI_H + +static inline void touch_nmi_watchdog (void ) +{ +} + +#endif
PATCH 2/2 liblockdep: Stub task_struct::state
In reply to Ben Hutchingslockdep_print_held_locks() now checks task_struct::state. Define it so that all tasks are assumed to be running, since we have no reasonble way to tell in user-space.
--- tools/include/linux/lockdep.h | 4 ++++ 1 file changed, 4 insertions(+)
tools/include/linux/lockdep.h +4 -0
@@ -31,12 +31,16 @@ struct task_struct {gfp_t lockdep_reclaim_gfp;int pid;char comm[17 ]; +long state; };extern struct task_struct *__curr (void );#define current (__curr()) +/* lockdep checks task_struct::state == TASK_RUNNING */ +#define TASK_RUNNING 0 +static inline int debug_locks_off (void ) {return 1 ;
Also, please update your address in MAINTAINERS.
Ben.
Quoted 16 lines · Ben Hutchings
In addition to the patch I recently sent for lockdep itself, the following fixes are also needed to make liblockdep build.
Ben.
Bastian Blank (1):
liblockdep: Stub NMI watchdog resetBen Hutchings (1):
liblockdep: Stubtask_struct::statetools/include/linux/lockdep.h | 4 ++++ tools/include/linux/nmi.h | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 tools/include/linux/nmi.h
Signature · 3 lines
Ben Hutchings For every complex problem there is a solution that is simple, neat, and wrong.
Quoted 2 lines · Ben Hutchings
In addition to the patch I recently sent for lockdep itself, the following fixes are also needed to make liblockdep build.
Thanks Ben. I've already sent patches similar to this as well as a MAINTAINERS update a few weeks ago to Ingo, but he didn't merge it in yet (https://lkml.org/lkml/2018/8/13/480). Let me follow up with him.