Commit 2502ec37 authored by Thomas Gleixner's avatar Thomas Gleixner

lockdep: Rename trace_hardirq_{enter,exit}()

Continue what commit:

  d820ac4c ("locking: rename trace_softirq_[enter|exit] => lockdep_softirq_[enter|exit]")

started, rename these to avoid confusing them with tracepoints.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarWill Deacon <will@kernel.org>
Link: https://lkml.kernel.org/r/20200320115859.060481361@infradead.org
parent 46db36ab
...@@ -37,7 +37,7 @@ extern void rcu_nmi_exit(void); ...@@ -37,7 +37,7 @@ extern void rcu_nmi_exit(void);
do { \ do { \
account_irq_enter_time(current); \ account_irq_enter_time(current); \
preempt_count_add(HARDIRQ_OFFSET); \ preempt_count_add(HARDIRQ_OFFSET); \
trace_hardirq_enter(); \ lockdep_hardirq_enter(); \
} while (0) } while (0)
/* /*
...@@ -50,7 +50,7 @@ extern void irq_enter(void); ...@@ -50,7 +50,7 @@ extern void irq_enter(void);
*/ */
#define __irq_exit() \ #define __irq_exit() \
do { \ do { \
trace_hardirq_exit(); \ lockdep_hardirq_exit(); \
account_irq_exit_time(current); \ account_irq_exit_time(current); \
preempt_count_sub(HARDIRQ_OFFSET); \ preempt_count_sub(HARDIRQ_OFFSET); \
} while (0) } while (0)
...@@ -74,12 +74,12 @@ extern void irq_exit(void); ...@@ -74,12 +74,12 @@ extern void irq_exit(void);
BUG_ON(in_nmi()); \ BUG_ON(in_nmi()); \
preempt_count_add(NMI_OFFSET + HARDIRQ_OFFSET); \ preempt_count_add(NMI_OFFSET + HARDIRQ_OFFSET); \
rcu_nmi_enter(); \ rcu_nmi_enter(); \
trace_hardirq_enter(); \ lockdep_hardirq_enter(); \
} while (0) } while (0)
#define nmi_exit() \ #define nmi_exit() \
do { \ do { \
trace_hardirq_exit(); \ lockdep_hardirq_exit(); \
rcu_nmi_exit(); \ rcu_nmi_exit(); \
BUG_ON(!in_nmi()); \ BUG_ON(!in_nmi()); \
preempt_count_sub(NMI_OFFSET + HARDIRQ_OFFSET); \ preempt_count_sub(NMI_OFFSET + HARDIRQ_OFFSET); \
......
...@@ -35,11 +35,11 @@ ...@@ -35,11 +35,11 @@
# define trace_softirq_context(p) ((p)->softirq_context) # define trace_softirq_context(p) ((p)->softirq_context)
# define trace_hardirqs_enabled(p) ((p)->hardirqs_enabled) # define trace_hardirqs_enabled(p) ((p)->hardirqs_enabled)
# define trace_softirqs_enabled(p) ((p)->softirqs_enabled) # define trace_softirqs_enabled(p) ((p)->softirqs_enabled)
# define trace_hardirq_enter() \ # define lockdep_hardirq_enter() \
do { \ do { \
current->hardirq_context++; \ current->hardirq_context++; \
} while (0) } while (0)
# define trace_hardirq_exit() \ # define lockdep_hardirq_exit() \
do { \ do { \
current->hardirq_context--; \ current->hardirq_context--; \
} while (0) } while (0)
...@@ -58,8 +58,8 @@ do { \ ...@@ -58,8 +58,8 @@ do { \
# define trace_softirq_context(p) 0 # define trace_softirq_context(p) 0
# define trace_hardirqs_enabled(p) 0 # define trace_hardirqs_enabled(p) 0
# define trace_softirqs_enabled(p) 0 # define trace_softirqs_enabled(p) 0
# define trace_hardirq_enter() do { } while (0) # define lockdep_hardirq_enter() do { } while (0)
# define trace_hardirq_exit() do { } while (0) # define lockdep_hardirq_exit() do { } while (0)
# define lockdep_softirq_enter() do { } while (0) # define lockdep_softirq_enter() do { } while (0)
# define lockdep_softirq_exit() do { } while (0) # define lockdep_softirq_exit() do { } while (0)
#endif #endif
......
...@@ -226,7 +226,7 @@ static inline bool lockdep_softirq_start(void) ...@@ -226,7 +226,7 @@ static inline bool lockdep_softirq_start(void)
if (trace_hardirq_context(current)) { if (trace_hardirq_context(current)) {
in_hardirq = true; in_hardirq = true;
trace_hardirq_exit(); lockdep_hardirq_exit();
} }
lockdep_softirq_enter(); lockdep_softirq_enter();
...@@ -239,7 +239,7 @@ static inline void lockdep_softirq_end(bool in_hardirq) ...@@ -239,7 +239,7 @@ static inline void lockdep_softirq_end(bool in_hardirq)
lockdep_softirq_exit(); lockdep_softirq_exit();
if (in_hardirq) if (in_hardirq)
trace_hardirq_enter(); lockdep_hardirq_enter();
} }
#else #else
static inline bool lockdep_softirq_start(void) { return false; } static inline bool lockdep_softirq_start(void) { return false; }
...@@ -414,7 +414,8 @@ void irq_exit(void) ...@@ -414,7 +414,8 @@ void irq_exit(void)
tick_irq_exit(); tick_irq_exit();
rcu_irq_exit(); rcu_irq_exit();
trace_hardirq_exit(); /* must be last! */ /* must be last! */
lockdep_hardirq_exit();
} }
/* /*
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
# define trace_softirq_context(p) 0 # define trace_softirq_context(p) 0
# define trace_hardirqs_enabled(p) 0 # define trace_hardirqs_enabled(p) 0
# define trace_softirqs_enabled(p) 0 # define trace_softirqs_enabled(p) 0
# define trace_hardirq_enter() do { } while (0) # define lockdep_hardirq_enter() do { } while (0)
# define trace_hardirq_exit() do { } while (0) # define lockdep_hardirq_exit() do { } while (0)
# define lockdep_softirq_enter() do { } while (0) # define lockdep_softirq_enter() do { } while (0)
# define lockdep_softirq_exit() do { } while (0) # define lockdep_softirq_exit() do { } while (0)
# define INIT_TRACE_IRQFLAGS # define INIT_TRACE_IRQFLAGS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment