Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jul 2020 20:15:21 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r363431 - in head/sys: amd64/amd64 i386/i386
Message-ID:  <202007222015.06MKFLdR032848@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007222015.06MKFLdR032848>