diff options
author | Henric Jungheim <henric@cvs.openbsd.org> | 2003-06-24 21:54:40 +0000 |
---|---|---|
committer | Henric Jungheim <henric@cvs.openbsd.org> | 2003-06-24 21:54:40 +0000 |
commit | 355b8560084501d10eae7686c8385754bc6c7072 (patch) | |
tree | d3bc0a5b778c1c6b51beb7fedae743f3fc436c13 /sys/arch/sparc64/dev/schizo.c | |
parent | 02503c73b4a809f21312fef8bf66cfe5d0f1a50f (diff) |
Add a "where" argument to the sparc64 interrupt code. This lets us
associate a name with each interrupt handler. This is not visible
outside the kernel (yet).
ok jason@
Diffstat (limited to 'sys/arch/sparc64/dev/schizo.c')
-rw-r--r-- | sys/arch/sparc64/dev/schizo.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/sys/arch/sparc64/dev/schizo.c b/sys/arch/sparc64/dev/schizo.c index b810b820fb1..fdffac2237b 100644 --- a/sys/arch/sparc64/dev/schizo.c +++ b/sys/arch/sparc64/dev/schizo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: schizo.c,v 1.15 2003/06/11 03:16:12 henric Exp $ */ +/* $OpenBSD: schizo.c,v 1.16 2003/06/24 21:54:39 henric Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -82,7 +82,7 @@ paddr_t schizo_bus_mmap(bus_space_tag_t, bus_addr_t, off_t, int, int); int _schizo_bus_map(bus_space_tag_t, bus_space_tag_t, bus_addr_t, bus_size_t, int, bus_space_handle_t *); void *_schizo_intr_establish(bus_space_tag_t, bus_space_tag_t, int, int, int, - int (*)(void *), void *); + int (*)(void *), void *, const char *); paddr_t _schizo_bus_mmap(bus_space_tag_t, bus_space_tag_t, bus_addr_t, off_t, int, int); int schizo_dmamap_create(bus_dma_tag_t, bus_dma_tag_t, bus_size_t, int, @@ -437,7 +437,7 @@ _schizo_bus_mmap(bus_space_tag_t t, bus_space_tag_t t0, bus_addr_t paddr, void * _schizo_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int ihandle, - int level, int flags, int (*handler)(void *), void *arg) + int level, int flags, int (*handler)(void *), void *arg, const char *what) { struct schizo_pbm *pbm = t->cookie; struct intrhand *ih = NULL; @@ -445,11 +445,6 @@ _schizo_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int ihandle, int ino; long vec = INTVEC(ihandle); - ih = (struct intrhand *)malloc(sizeof(struct intrhand), M_DEVBUF, - M_NOWAIT); - if (ih == NULL) - return (NULL); - vec = INTVEC(ihandle); ino = INTINO(vec); @@ -468,11 +463,10 @@ _schizo_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int ihandle, intrclrptr = &pbmreg->iclr[ino]; } - ih->ih_map = intrmapptr; - ih->ih_clr = intrclrptr; - ih->ih_fun = handler; - ih->ih_pil = level; - ih->ih_number = ino; + ih = bus_intr_allocate(t0, handler, arg, ino, level, intrmapptr, + intrclrptr, what); + if (ih == NULL) + return (NULL); intr_establish(ih->ih_pil, ih); |