]> git.karo-electronics.de Git - linux-beck.git/blobdiff - arch/x86/mm/extable.c
x86/head: Move the early NMI fixup into C
[linux-beck.git] / arch / x86 / mm / extable.c
index 1366e067a796f46fa1c242dc52952b8093018014..4be041910c2f6a4afe46c32755e7fc7742bad7d0 100644 (file)
@@ -1,5 +1,6 @@
 #include <linux/module.h>
 #include <asm/uaccess.h>
+#include <asm/traps.h>
 
 typedef bool (*ex_handler_t)(const struct exception_table_entry *,
                            struct pt_regs *, int);
@@ -89,6 +90,10 @@ int __init early_fixup_exception(struct pt_regs *regs, int trapnr)
        unsigned long new_ip;
        ex_handler_t handler;
 
+       /* Ignore early NMIs. */
+       if (trapnr == X86_TRAP_NMI)
+               return 1;
+
        e = search_exception_tables(regs->ip);
        if (!e)
                return 0;