kernel: In the x86_64 kernel, add a missing include to trap.c.
authorSascha Wildner <saw@online.de>
Thu, 17 Mar 2011 06:07:04 +0000 (07:07 +0100)
committerSascha Wildner <saw@online.de>
Thu, 17 Mar 2011 06:07:04 +0000 (07:07 +0100)
Some bits of code in trap() regarding the handling of T_NMI were not
compiled in due to NISA not being defined.

While I'm here, put some more code in "#if NISA > 0", like it is for
i386.

sys/platform/pc64/x86_64/trap.c

index 1ff4f2c..d22e5d4 100644 (file)
@@ -44,6 +44,8 @@
  * x86_64 Trap and System call handling
  */
 
+#include "use_isa.h"
+
 #include "opt_ddb.h"
 #include "opt_ktrace.h"
 
@@ -508,6 +510,7 @@ trap(struct trapframe *frame)
                        i = SIGFPE;
                        break;
 
+#if NISA > 0
                case T_NMI:
                        MAKEMPSAFE(have_mplock);
                        /* machine/parity/power fail/"kitchen sink" faults */
@@ -526,6 +529,7 @@ trap(struct trapframe *frame)
                        } else if (panic_on_nmi)
                                panic("NMI indicates hardware failure");
                        break;
+#endif /* NISA > 0 */
 
                case T_OFLOW:           /* integer overflow fault */
                        ucode = FPE_INTOVF;
@@ -698,10 +702,10 @@ trap(struct trapframe *frame)
 #endif
                        break;
 
+#if NISA > 0
                case T_NMI:
                        MAKEMPSAFE(have_mplock);
                        /* machine/parity/power fail/"kitchen sink" faults */
-#if NISA > 0
                        if (isa_nmi(code) == 0) {
 #ifdef DDB
                                /*