summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/nexus.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-04-21 07:26:30 +0000
committerpeter <peter@FreeBSD.org>1999-04-21 07:26:30 +0000
commitfa628c268c2d531552037f05699c06959d9618e6 (patch)
tree139882de7181a80226508d0a7c0f4695f2639ae0 /sys/amd64/amd64/nexus.c
parent47b96f90c086096cb12e76442461d4da895e207b (diff)
downloadFreeBSD-src-fa628c268c2d531552037f05699c06959d9618e6.zip
FreeBSD-src-fa628c268c2d531552037f05699c06959d9618e6.tar.gz
Stage 1 of a cleanup of the i386 interrupt registration mechanism.
Interrupts under the new scheme are managed by the i386 nexus with the awareness of the resource manager. There is further room for optimizing the interfaces still. All the users of register_intr()/intr_create() should be gone, with the exception of pcic and i386/isa/clock.c.
Diffstat (limited to 'sys/amd64/amd64/nexus.c')
-rw-r--r--sys/amd64/amd64/nexus.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/amd64/amd64/nexus.c b/sys/amd64/amd64/nexus.c
index 0cf03f0..cfb7b03 100644
--- a/sys/amd64/amd64/nexus.c
+++ b/sys/amd64/amd64/nexus.c
@@ -26,7 +26,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: nexus.c,v 1.2 1999/04/18 14:30:55 kato Exp $
+ * $Id: nexus.c,v 1.3 1999/04/19 08:04:19 peter Exp $
*/
/*
@@ -305,6 +305,7 @@ nexus_setup_intr(device_t bus, device_t child, struct resource *irq,
intrmask_t *mask;
driver_t *driver;
int error, icflags;
+ char name[32];
if (child)
device_printf(child, "interrupting at irq %d\n",
@@ -348,11 +349,11 @@ nexus_setup_intr(device_t bus, device_t child, struct resource *irq,
if (error)
return (error);
- *cookiep = intr_create((void *)(intptr_t)-1, irq->r_start, ihand, arg,
+ snprintf(name, sizeof(name), "%s%d", device_get_name(child),
+ device_get_unit(child));
+ *cookiep = inthand_add(name, irq->r_start, ihand, arg,
mask, icflags);
- if (*cookiep)
- error = intr_connect(*cookiep);
- else
+ if (*cookiep == NULL)
error = EINVAL; /* XXX ??? */
return (error);
@@ -361,7 +362,7 @@ nexus_setup_intr(device_t bus, device_t child, struct resource *irq,
static int
nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih)
{
- return (intr_destroy(ih));
+ return (inthand_remove(ih));
}
static devclass_t pcib_devclass;
OpenPOWER on IntegriCloud