summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2000-09-12 16:02:43 +0000
committerbde <bde@FreeBSD.org>2000-09-12 16:02:43 +0000
commitb2fc79d87651f41ff9a7036d6dd0612b88ae0d89 (patch)
tree1332bf9c3eb4c854f26f548e5404732a5f7ff161
parent4161876ae1660a56fae8ed7d7ec3cfc2e84978bd (diff)
downloadFreeBSD-src-b2fc79d87651f41ff9a7036d6dd0612b88ae0d89.zip
FreeBSD-src-b2fc79d87651f41ff9a7036d6dd0612b88ae0d89.tar.gz
Don't panic for delivery of a multiplexed SWI. Most SWI handlers
don't take an arg, but swi_generic() is special in order to avoid one whole conditional branch in the old SWI dispatch code. The new SWI dispatch code passed it a garbage arg. Bypass swi_generic() and call swi_dispatcher() directly, like the corresponding alpha code has always done. The panic was rare because because it only occurred if more than one of the {sio,cy,rc} drivers was configured and one was active, and the cy driver doesn't even compile.
-rw-r--r--sys/amd64/isa/ithread.c5
-rw-r--r--sys/i386/isa/ithread.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/amd64/isa/ithread.c b/sys/amd64/isa/ithread.c
index 4ceac42..9bc66dc 100644
--- a/sys/amd64/isa/ithread.c
+++ b/sys/amd64/isa/ithread.c
@@ -327,7 +327,10 @@ intr_soft(void *dummy)
atomic_add_long(intr_countp[i], 1);
spending &= ~ (1 << i);
mtx_enter(&Giant, MTX_DEF);
- (ihandlers[i])();
+ if (ihandlers[i] == swi_generic)
+ swi_dispatcher(i);
+ else
+ (ihandlers[i])();
mtx_exit(&Giant, MTX_DEF);
}
/*
diff --git a/sys/i386/isa/ithread.c b/sys/i386/isa/ithread.c
index 4ceac42..9bc66dc 100644
--- a/sys/i386/isa/ithread.c
+++ b/sys/i386/isa/ithread.c
@@ -327,7 +327,10 @@ intr_soft(void *dummy)
atomic_add_long(intr_countp[i], 1);
spending &= ~ (1 << i);
mtx_enter(&Giant, MTX_DEF);
- (ihandlers[i])();
+ if (ihandlers[i] == swi_generic)
+ swi_dispatcher(i);
+ else
+ (ihandlers[i])();
mtx_exit(&Giant, MTX_DEF);
}
/*
OpenPOWER on IntegriCloud