Author: mav
Date: Wed Jul 22 20:15:21 2020
New Revision: 363431
URL: https://svnweb.freebsd.org/changeset/base/363431

Log:
  Untie nmi_handle_intr() from DEV_ISA.
  
  The only part of nmi_handle_intr() depending on ISA is isa_nmi(), which is
  already wrapped.  Entering debugger on NMI does not really depend on ISA.
  
  MFC after:    2 weeks

Modified:
  head/sys/amd64/amd64/trap.c
  head/sys/i386/i386/trap.c

Modified: head/sys/amd64/amd64/trap.c
==============================================================================
--- head/sys/amd64/amd64/trap.c Wed Jul 22 20:13:12 2020        (r363430)
+++ head/sys/amd64/amd64/trap.c Wed Jul 22 20:15:21 2020        (r363431)
@@ -350,11 +350,9 @@ trap(struct trapframe *frame)
                        signo = SIGFPE;
                        break;
 
-#ifdef DEV_ISA
                case T_NMI:
                        nmi_handle_intr(type, frame);
                        return;
-#endif
 
                case T_OFLOW:           /* integer overflow fault */
                        ucode = FPE_INTOVF;
@@ -580,11 +578,9 @@ trap(struct trapframe *frame)
 #endif
                        break;
 
-#ifdef DEV_ISA
                case T_NMI:
                        nmi_handle_intr(type, frame);
                        return;
-#endif
                }
 
                trap_fatal(frame, 0);

Modified: head/sys/i386/i386/trap.c
==============================================================================
--- head/sys/i386/i386/trap.c   Wed Jul 22 20:13:12 2020        (r363430)
+++ head/sys/i386/i386/trap.c   Wed Jul 22 20:15:21 2020        (r363431)
@@ -407,7 +407,6 @@ user_trctrap_out:
                        signo = SIGFPE;
                        break;
 
-#ifdef DEV_ISA
                case T_NMI:
 #ifdef POWERFAIL_NMI
 #ifndef TIMER_FREQ
@@ -423,7 +422,6 @@ user_trctrap_out:
                        nmi_handle_intr(type, frame);
                        return;
 #endif /* POWERFAIL_NMI */
-#endif /* DEV_ISA */
 
                case T_OFLOW:           /* integer overflow fault */
                        ucode = FPE_INTOVF;
@@ -669,7 +667,6 @@ kernel_trctrap:
 #endif
                        break;
 
-#ifdef DEV_ISA
                case T_NMI:
 #ifdef POWERFAIL_NMI
                        if (time_second - lastalert > 10) {
@@ -682,7 +679,6 @@ kernel_trctrap:
                        nmi_handle_intr(type, frame);
                        return;
 #endif /* POWERFAIL_NMI */
-#endif /* DEV_ISA */
                }
 
                trap_fatal(frame, eva);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to