aboutsummaryrefslogtreecommitdiff
path: root/sys/x86
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2010-07-01 18:51:18 +0000
committerAlexander Motin <mav@FreeBSD.org>2010-07-01 18:51:18 +0000
commit6019ba4e4b15335b01631d538b3dbad58874c989 (patch)
tree15d016afd2f3807393a84aa4d8889b1f6b51b0c5 /sys/x86
parent956000b83852e37f4588fdeb8e1ecff70d4257fe (diff)
downloadsrc-6019ba4e4b15335b01631d538b3dbad58874c989.tar.gz
src-6019ba4e4b15335b01631d538b3dbad58874c989.zip
Rework r209456:
Instead of using fake rid (which ISA doesn't like), delete untrusted IRQ resource and let it be recreated.
Notes
Notes: svn path=/head/; revision=209634
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 a59528b211da..c4cc9f5905b5 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 80886449d9bf..a3211f89721c 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");