diff options
author | peterz@infradead.org <peterz@infradead.org> | 2020-07-27 14:48:52 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2020-07-27 15:13:29 +0200 |
commit | ed00495333ccc80fc8fb86fb43773c3c2a499466 (patch) | |
tree | 64882e5a738ab148341521d4ac598038ce8afd81 /arch/x86/Kconfig.debug | |
parent | ba1f2b2eaa2a529dba722507c55ff3d761d325dd (diff) |
locking/lockdep: Fix TRACE_IRQFLAGS vs. NMIs
Prior to commit:
859d069ee1dd ("lockdep: Prepare for NMI IRQ state tracking")
IRQ state tracking was disabled in NMIs due to nmi_enter()
doing lockdep_off() -- with the obvious requirement that NMI entry
call nmi_enter() before trace_hardirqs_off().
[ AFAICT, PowerPC and SH violate this order on their NMI entry ]
However, that commit explicitly changed lockdep_hardirqs_*() to ignore
lockdep_off() and breaks every architecture that has irq-tracing in
it's NMI entry that hasn't been fixed up (x86 being the only fixed one
at this point).
The reason for this change is that by ignoring lockdep_off() we can:
- get rid of 'current->lockdep_recursion' in lockdep_assert_irqs*()
which was going to to give header-recursion issues with the
seqlock rework.
- allow these lockdep_assert_*() macros to function in NMI context.
Restore the previous state of things and allow an architecture to
opt-in to the NMI IRQ tracking support, however instead of relying on
lockdep_off(), rely on in_nmi(), both are part of nmi_enter() and so
over-all entry ordering doesn't need to change.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20200727124852.GK119549@hirez.programming.kicks-ass.net
Diffstat (limited to 'arch/x86/Kconfig.debug')
-rw-r--r-- | arch/x86/Kconfig.debug | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index 0dd319e6e5b4..ee1d3c5834c6 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug @@ -3,6 +3,9 @@ config TRACE_IRQFLAGS_SUPPORT def_bool y +config TRACE_IRQFLAGS_NMI_SUPPORT + def_bool y + config EARLY_PRINTK_USB bool |