diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2020-05-21 22:05:14 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-06-11 15:15:04 +0200 |
commit | 2ab70319bc1f79228da4dce7b9d604740c9beeef (patch) | |
tree | 9d6a0aa7ff567def390f462fec3fd54e48463b32 /include | |
parent | x86/entry: Fix allnoconfig build warning (diff) | |
download | linux-2ab70319bc1f79228da4dce7b9d604740c9beeef.tar.xz linux-2ab70319bc1f79228da4dce7b9d604740c9beeef.zip |
nmi, tracing: Make hardware latency tracing noinstr safe
The hardware latency tracer calls into instrumentable functions. Move the
calls into the RCU watching sections and annotate them.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Andy Lutomirski <luto@kernel.org>
Cc: Paul E. McKenney <paulmck@kernel.org>
Link: https://lore.kernel.org/r/20200521202116.904176298@linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/hardirq.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index e07cf853aa16..29b862aba740 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h @@ -87,20 +87,24 @@ extern void rcu_nmi_exit(void); arch_nmi_enter(); \ printk_nmi_enter(); \ lockdep_off(); \ - ftrace_nmi_enter(); \ BUG_ON(in_nmi() == NMI_MASK); \ __preempt_count_add(NMI_OFFSET + HARDIRQ_OFFSET); \ rcu_nmi_enter(); \ lockdep_hardirq_enter(); \ + instrumentation_begin(); \ + ftrace_nmi_enter(); \ + instrumentation_end(); \ } while (0) #define nmi_exit() \ do { \ + instrumentation_begin(); \ + ftrace_nmi_exit(); \ + instrumentation_end(); \ lockdep_hardirq_exit(); \ rcu_nmi_exit(); \ BUG_ON(!in_nmi()); \ __preempt_count_sub(NMI_OFFSET + HARDIRQ_OFFSET); \ - ftrace_nmi_exit(); \ lockdep_on(); \ printk_nmi_exit(); \ arch_nmi_exit(); \ |