summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2001-01-20 02:30:58 +0000
committerjake <jake@FreeBSD.org>2001-01-20 02:30:58 +0000
commitea36052df59c348dde3964aba7a7421e3d8fb1d3 (patch)
tree8cd3a5f0f20ad2ded10cec3befd3a3ee7aca5631 /sys/i386
parent0fbfe85a3cf3589f4e05372bfa862cefce00e2aa (diff)
downloadFreeBSD-src-ea36052df59c348dde3964aba7a7421e3d8fb1d3.zip
FreeBSD-src-ea36052df59c348dde3964aba7a7421e3d8fb1d3.tar.gz
- Make npx_intr INTR_MPSAFE and move acquiring Giant into the
function itself. - Remove a hack to allow acquiring Giant from the npx asm trap vector.
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/exception.s2
-rw-r--r--sys/i386/include/asnames.h2
-rw-r--r--sys/i386/isa/npx.c6
3 files changed, 5 insertions, 5 deletions
diff --git a/sys/i386/i386/exception.s b/sys/i386/i386/exception.s
index bc5e2e3..99b91d0 100644
--- a/sys/i386/i386/exception.s
+++ b/sys/i386/i386/exception.s
@@ -174,9 +174,7 @@ IDTVEC(fpu)
MPLOCKED incl _cnt+V_TRAP
pushl $0 /* dummy unit to finish intr frame */
- call __mtx_enter_giant_def
call _npx_intr
- call __mtx_exit_giant_def
addl $4,%esp
incb PCPU(INTR_NESTING_LEVEL)
diff --git a/sys/i386/include/asnames.h b/sys/i386/include/asnames.h
index 2cad36b..26c5469 100644
--- a/sys/i386/include/asnames.h
+++ b/sys/i386/include/asnames.h
@@ -257,8 +257,6 @@
#define _mp_gdtbase mp_gdtbase
#define _mp_lock mp_lock
#define _mp_ncpus mp_ncpus
-#define __mtx_enter_giant_def _mtx_enter_giant_def
-#define __mtx_exit_giant_def _mtx_exit_giant_def
#define _mul64 mul64
#define _nfs_diskless nfs_diskless
#define _nfs_diskless_valid nfs_diskless_valid
diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c
index 52d45ed..7c6c4f0 100644
--- a/sys/i386/isa/npx.c
+++ b/sys/i386/isa/npx.c
@@ -47,6 +47,7 @@
#include <sys/module.h>
#include <sys/sysctl.h>
#include <sys/proc.h>
+#include <sys/mutex.h>
#include <machine/bus.h>
#include <sys/rman.h>
#ifdef NPX_DEBUG
@@ -389,7 +390,8 @@ npx_probe1(dev)
if (r == 0)
panic("npx: can't get IRQ");
BUS_SETUP_INTR(device_get_parent(dev),
- dev, r, INTR_TYPE_MISC,
+ dev, r,
+ INTR_TYPE_MISC | INTR_MPSAFE,
npx_intr, 0, &intr);
if (intr == 0)
panic("npx: can't create intr");
@@ -722,6 +724,7 @@ npx_intr(dummy)
u_short control;
struct intrframe *frame;
+ mtx_enter(&Giant, MTX_DEF);
if (PCPU_GET(npxproc) == NULL || !npx_exists) {
printf("npxintr: npxproc = %p, curproc = %p, npx_exists = %d\n",
PCPU_GET(npxproc), curproc, npx_exists);
@@ -780,6 +783,7 @@ npx_intr(dummy)
*/
psignal(curproc, SIGFPE);
}
+ mtx_exit(&Giant, MTX_DEF);
}
/*
OpenPOWER on IntegriCloud