summaryrefslogtreecommitdiffstats
path: root/sys/x86
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2010-07-01 18:51:18 +0000
committermav <mav@FreeBSD.org>2010-07-01 18:51:18 +0000
commit0966180de4c4670f353a2a204c5c0df3a45b3805 (patch)
tree15d016afd2f3807393a84aa4d8889b1f6b51b0c5 /sys/x86
parentf20ddfdf57e2b9a26f533913a8d39c52588d39f4 (diff)
downloadFreeBSD-src-0966180de4c4670f353a2a204c5c0df3a45b3805.zip
FreeBSD-src-0966180de4c4670f353a2a204c5c0df3a45b3805.tar.gz
Rework r209456:
Instead of using fake rid (which ISA doesn't like), delete untrusted IRQ resource and let it be recreated.
Diffstat (limited to 'sys/x86')
-rw-r--r--sys/x86/isa/atrtc.c3
-rw-r--r--sys/x86/isa/clock.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/x86/isa/atrtc.c b/sys/x86/isa/atrtc.c
index a59528b..c4cc9f5 100644
--- a/sys/x86/isa/atrtc.c
+++ b/sys/x86/isa/atrtc.c
@@ -259,7 +259,8 @@ atrtc_attach(device_t dev)
if (!atrtcclock_disable &&
(resource_int_value(device_get_name(dev), device_get_unit(dev),
"clock", &i) != 0 || i != 0)) {
- sc->intr_rid = -1;
+ sc->intr_rid = 0;
+ bus_delete_resource(dev, SYS_RES_IRQ, sc->intr_rid);
if (!(sc->intr_res = bus_alloc_resource(dev, SYS_RES_IRQ,
&sc->intr_rid, 8, 8, 1, RF_ACTIVE))) {
device_printf(dev,"Can't map interrupt.\n");
diff --git a/sys/x86/isa/clock.c b/sys/x86/isa/clock.c
index 8088644..a3211f8 100644
--- a/sys/x86/isa/clock.c
+++ b/sys/x86/isa/clock.c
@@ -535,7 +535,8 @@ attimer_attach(device_t dev)
tc_init(&sc->tc);
if (resource_int_value(device_get_name(dev), device_get_unit(dev),
"clock", &i) != 0 || i != 0) {
- sc->intr_rid = -1;
+ sc->intr_rid = 0;
+ bus_delete_resource(dev, SYS_RES_IRQ, sc->intr_rid);
if (!(sc->intr_res = bus_alloc_resource(dev, SYS_RES_IRQ,
&sc->intr_rid, 0, 0, 1, RF_ACTIVE))) {
device_printf(dev,"Can't map interrupt.\n");
OpenPOWER on IntegriCloud