x86/entry: Move nmi entry/exit into common code
authorThomas Gleixner <tglx@linutronix.de>
Mon, 2 Nov 2020 20:53:16 +0000 (12:53 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Mar 2021 16:06:36 +0000 (17:06 +0100)
commit269424432731f926d5d37329c6e215096ea52333
tree7035e7706a3799ab02d8c6d3dabf8be0f2bae59e
parent752fbe0c8ddd044ba1d230fcc7f51eea65284719
x86/entry: Move nmi entry/exit into common code

commit b6be002bcd1dd1dedb926abf3c90c794eacb77dc upstream.

Lockdep state handling on NMI enter and exit is nothing specific to X86. It's
not any different on other architectures. Also the extra state type is not
necessary, irqentry_state_t can carry the necessary information as well.

Move it to common code and extend irqentry_state_t to carry lockdep state.

[ Ira: Make exit_rcu and lockdep a union as they are mutually exclusive
  between the IRQ and NMI exceptions, and add kernel documentation for
  struct irqentry_state_t ]

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20201102205320.1458656-7-ira.weiny@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/entry/common.c
arch/x86/include/asm/idtentry.h
arch/x86/kernel/cpu/mce/core.c
arch/x86/kernel/nmi.c
arch/x86/kernel/traps.c
include/linux/entry-common.h
kernel/entry/common.c