mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 17:41:44 +00:00
locking/lockdep: Cleanup
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Marco Elver <elver@google.com> Link: https://lkml.kernel.org/r/20200821085348.546087214@infradead.org
This commit is contained in:
parent
7da93f3793
commit
00b0ed2d49
@ -53,6 +53,7 @@ DECLARE_PER_CPU(int, hardirq_context);
|
||||
extern void trace_hardirqs_off_finish(void);
|
||||
extern void trace_hardirqs_on(void);
|
||||
extern void trace_hardirqs_off(void);
|
||||
|
||||
# define lockdep_hardirq_context() (raw_cpu_read(hardirq_context))
|
||||
# define lockdep_softirq_context(p) ((p)->softirq_context)
|
||||
# define lockdep_hardirqs_enabled() (this_cpu_read(hardirqs_enabled))
|
||||
@ -181,17 +182,25 @@ do { \
|
||||
* if !TRACE_IRQFLAGS.
|
||||
*/
|
||||
#ifdef CONFIG_TRACE_IRQFLAGS
|
||||
|
||||
#define local_irq_enable() \
|
||||
do { trace_hardirqs_on(); raw_local_irq_enable(); } while (0)
|
||||
do { \
|
||||
trace_hardirqs_on(); \
|
||||
raw_local_irq_enable(); \
|
||||
} while (0)
|
||||
|
||||
#define local_irq_disable() \
|
||||
do { raw_local_irq_disable(); trace_hardirqs_off(); } while (0)
|
||||
do { \
|
||||
raw_local_irq_disable(); \
|
||||
trace_hardirqs_off(); \
|
||||
} while (0)
|
||||
|
||||
#define local_irq_save(flags) \
|
||||
do { \
|
||||
raw_local_irq_save(flags); \
|
||||
trace_hardirqs_off(); \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define local_irq_restore(flags) \
|
||||
do { \
|
||||
if (raw_irqs_disabled_flags(flags)) { \
|
||||
@ -214,10 +223,7 @@ do { \
|
||||
|
||||
#define local_irq_enable() do { raw_local_irq_enable(); } while (0)
|
||||
#define local_irq_disable() do { raw_local_irq_disable(); } while (0)
|
||||
#define local_irq_save(flags) \
|
||||
do { \
|
||||
raw_local_irq_save(flags); \
|
||||
} while (0)
|
||||
#define local_irq_save(flags) do { raw_local_irq_save(flags); } while (0)
|
||||
#define local_irq_restore(flags) do { raw_local_irq_restore(flags); } while (0)
|
||||
#define safe_halt() do { raw_safe_halt(); } while (0)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user