Include isa.h to avoid confusion while reading the code (code wrapped
into #if NISA > 0 is thrown out by cpp atm).
No behaviour change, except for additional printf() before entering
the debugger (which I find helpful).
Ignore second chunk if you don't care about i386 and amd64 being the
same.

Btw, amd64/x86_nmi() reads ports which are called "historic garbage" by
i386/isa_nmi().

Index: trap.c
===================================================================
RCS file: /cvs/src/sys/arch/i386/i386/trap.c,v
retrieving revision 1.103
diff -u -r1.103 trap.c
--- trap.c      7 Aug 2012 05:16:53 -0000       1.103
+++ trap.c      3 Sep 2012 21:49:26 -0000
@@ -80,6 +80,7 @@
 #endif
 
 #include "npx.h"
+#include "isa.h"
 
 void trap(struct trapframe *);
 void syscall(struct trapframe *);
@@ -509,13 +510,12 @@
                if (kdb_trap(type, 0, frame))
                        return;
 #endif
-                       return;
 #endif /* DDB || KGDB */
                /* machine/parity/power fail/"kitchen sink" faults */
-               if (isa_nmi() == 0)
-                       return;
-               else
+               if (isa_nmi() != 0)
                        goto we_re_toast;
+               else
+                       return;
 #endif
        }

Reply via email to