summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2020-02-25 23:16:27 +0100
committerThomas Gleixner <tglx@linutronix.de>2020-06-11 15:14:51 +0200
commit14a8bd2aa7c355b3a8879618a4f70f9c2b0004f7 (patch)
tree33f3932201b55eb7326e3759fa816d7217474ee6 /arch/x86/kernel
parentx86/entry: Convert Spurious interrupt bug exception to IDTENTRY (diff)
downloadlinux-14a8bd2aa7c355b3a8879618a4f70f9c2b0004f7.tar.xz
linux-14a8bd2aa7c355b3a8879618a4f70f9c2b0004f7.zip
x86/entry: Convert Coprocessor error exception to IDTENTRY
Convert #MF to IDTENTRY_ERRORCODE: - Implement the C entry point with DEFINE_IDTENTRY - Emit the ASM stub with DECLARE_IDTENTRY - Remove the ASM idtentry in 64bit - Remove the open coded ASM entry code in 32bit - Fixup the XEN/PV code - Remove the old prototypes - Remove the RCU warning as the new entry macro ensures correctness No functional change. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com> Acked-by: Peter Zijlstra <peterz@infradead.org> Acked-by: Andy Lutomirski <luto@kernel.org> Link: https://lkml.kernel.org/r/20200505134905.838823510@linutronix.de
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/idt.c2
-rw-r--r--arch/x86/kernel/traps.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/arch/x86/kernel/idt.c b/arch/x86/kernel/idt.c
index 8e8936dcf6e4..2bde50d4cfa1 100644
--- a/arch/x86/kernel/idt.c
+++ b/arch/x86/kernel/idt.c
@@ -84,7 +84,7 @@ static const __initconst struct idt_data def_idts[] = {
INTG(X86_TRAP_SS, asm_exc_stack_segment),
INTG(X86_TRAP_GP, asm_exc_general_protection),
INTG(X86_TRAP_SPURIOUS, asm_exc_spurious_interrupt_bug),
- INTG(X86_TRAP_MF, coprocessor_error),
+ INTG(X86_TRAP_MF, asm_exc_coprocessor_error),
INTG(X86_TRAP_AC, alignment_check),
INTG(X86_TRAP_XF, simd_coprocessor_error),
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 2c638b9bc827..ba26bebfed72 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -854,10 +854,9 @@ exit:
cond_local_irq_disable(regs);
}
-dotraplinkage void do_coprocessor_error(struct pt_regs *regs, long error_code)
+DEFINE_IDTENTRY(exc_coprocessor_error)
{
- RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
- math_error(regs, error_code, X86_TRAP_MF);
+ math_error(regs, 0, X86_TRAP_MF);
}
dotraplinkage void