diff options
author | peter <peter@FreeBSD.org> | 1999-12-20 15:01:23 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-12-20 15:01:23 +0000 |
commit | 1df231171f821c70fd1262ca77fc83f311f05ce0 (patch) | |
tree | 757c3960b8d884da05ef5682ef5f64557f6fef57 /sys | |
parent | 8f45fa6446cf76d0d2c400146066394c84a24df0 (diff) | |
download | FreeBSD-src-1df231171f821c70fd1262ca77fc83f311f05ce0.zip FreeBSD-src-1df231171f821c70fd1262ca77fc83f311f05ce0.tar.gz |
Zap the old isa_device specific register_intr() and unregister_intr()
emulations. Thankfully, nothing is left in the tree that uses them.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/isa/intr_machdep.c | 66 | ||||
-rw-r--r-- | sys/amd64/isa/intr_machdep.h | 6 | ||||
-rw-r--r-- | sys/amd64/isa/nmi.c | 66 | ||||
-rw-r--r-- | sys/i386/isa/intr_machdep.c | 66 | ||||
-rw-r--r-- | sys/i386/isa/intr_machdep.h | 6 | ||||
-rw-r--r-- | sys/i386/isa/nmi.c | 66 |
6 files changed, 0 insertions, 276 deletions
diff --git a/sys/amd64/isa/intr_machdep.c b/sys/amd64/isa/intr_machdep.c index a429ef4..f4f89ff 100644 --- a/sys/amd64/isa/intr_machdep.c +++ b/sys/amd64/isa/intr_machdep.c @@ -544,13 +544,6 @@ typedef struct intrec { static intrec *intreclist_head[ICU_LEN]; -typedef struct isarec { - int id_unit; - ointhand2_t *id_handler; -} isarec; - -static isarec *isareclist[ICU_LEN]; - /* * The interrupt multiplexer calls each of the handlers in turn. The * ipl is initially quite low. It is raised as necessary for each call @@ -572,14 +565,6 @@ intr_mux(void *arg) } } -static void -isa_intr_wrap(void *cookie) -{ - isarec *irec = (isarec *)cookie; - - irec->id_handler(irec->id_unit); -} - static intrec* find_idesc(unsigned *maskptr, int irq) { @@ -857,54 +842,3 @@ inthand_remove(intrec *idesc) free(idesc, M_DEVBUF); return (0); } - -/* - * Emulate the register_intr() call previously defined as low level function. - * That function (now icu_setup()) may no longer be directly called, since - * a conflict between an ISA and PCI interrupt might go by unnocticed, else. - */ - -int -register_intr(int intr, int device_id, u_int flags, - ointhand2_t handler, u_int *maskptr, int unit) -{ - intrec *idesc; - isarec *irec; - - irec = malloc(sizeof *irec, M_DEVBUF, M_WAITOK); - if (irec == NULL) - return NULL; - bzero(irec, sizeof *irec); - irec->id_unit = unit; - irec->id_handler = handler; - - flags |= INTR_EXCL; - idesc = inthand_add("old", intr, isa_intr_wrap, irec, maskptr, flags); - if (idesc == NULL) { - free(irec, M_DEVBUF); - return -1; - } - isareclist[intr] = irec; - return 0; -} - -/* - * Emulate the old unregister_intr() low level function. - * Make sure there is just one interrupt, that it was - * registered as non-shared, and that the handlers match. - */ - -int -unregister_intr(int intr, ointhand2_t handler) -{ - intrec *p = intreclist_head[intr]; - - if (p != NULL && (p->flags & INTR_EXCL) != 0 && - p->handler == isa_intr_wrap && isareclist[intr] != NULL && - isareclist[intr]->id_handler == handler) { - free(isareclist[intr], M_DEVBUF); - isareclist[intr] = NULL; - return (inthand_remove(p)); - } - return (EINVAL); -} diff --git a/sys/amd64/isa/intr_machdep.h b/sys/amd64/isa/intr_machdep.h index adea303..cf0667c 100644 --- a/sys/amd64/isa/intr_machdep.h +++ b/sys/amd64/isa/intr_machdep.h @@ -199,19 +199,13 @@ int update_intr_masks __P((void)); intrmask_t splq __P((intrmask_t mask)); -/* XXX currently dev_instance must be set to the ISA device_id or -1 for PCI */ #define INTR_FAST 0x00000001 /* fast interrupt handler */ #define INTR_EXCL 0x00010000 /* excl. intr, default is shared */ - struct intrec *inthand_add(const char *name, int irq, inthand2_t handler, void *arg, intrmask_t *maskptr, int flags); int inthand_remove(struct intrec *idesc); -int register_intr __P((int intr, int device_id, u_int flags, - ointhand2_t *handler, u_int *maskptr, int unit)); -int unregister_intr(int intr, ointhand2_t handler); - #endif /* LOCORE */ #endif /* KERNEL */ diff --git a/sys/amd64/isa/nmi.c b/sys/amd64/isa/nmi.c index a429ef4..f4f89ff 100644 --- a/sys/amd64/isa/nmi.c +++ b/sys/amd64/isa/nmi.c @@ -544,13 +544,6 @@ typedef struct intrec { static intrec *intreclist_head[ICU_LEN]; -typedef struct isarec { - int id_unit; - ointhand2_t *id_handler; -} isarec; - -static isarec *isareclist[ICU_LEN]; - /* * The interrupt multiplexer calls each of the handlers in turn. The * ipl is initially quite low. It is raised as necessary for each call @@ -572,14 +565,6 @@ intr_mux(void *arg) } } -static void -isa_intr_wrap(void *cookie) -{ - isarec *irec = (isarec *)cookie; - - irec->id_handler(irec->id_unit); -} - static intrec* find_idesc(unsigned *maskptr, int irq) { @@ -857,54 +842,3 @@ inthand_remove(intrec *idesc) free(idesc, M_DEVBUF); return (0); } - -/* - * Emulate the register_intr() call previously defined as low level function. - * That function (now icu_setup()) may no longer be directly called, since - * a conflict between an ISA and PCI interrupt might go by unnocticed, else. - */ - -int -register_intr(int intr, int device_id, u_int flags, - ointhand2_t handler, u_int *maskptr, int unit) -{ - intrec *idesc; - isarec *irec; - - irec = malloc(sizeof *irec, M_DEVBUF, M_WAITOK); - if (irec == NULL) - return NULL; - bzero(irec, sizeof *irec); - irec->id_unit = unit; - irec->id_handler = handler; - - flags |= INTR_EXCL; - idesc = inthand_add("old", intr, isa_intr_wrap, irec, maskptr, flags); - if (idesc == NULL) { - free(irec, M_DEVBUF); - return -1; - } - isareclist[intr] = irec; - return 0; -} - -/* - * Emulate the old unregister_intr() low level function. - * Make sure there is just one interrupt, that it was - * registered as non-shared, and that the handlers match. - */ - -int -unregister_intr(int intr, ointhand2_t handler) -{ - intrec *p = intreclist_head[intr]; - - if (p != NULL && (p->flags & INTR_EXCL) != 0 && - p->handler == isa_intr_wrap && isareclist[intr] != NULL && - isareclist[intr]->id_handler == handler) { - free(isareclist[intr], M_DEVBUF); - isareclist[intr] = NULL; - return (inthand_remove(p)); - } - return (EINVAL); -} diff --git a/sys/i386/isa/intr_machdep.c b/sys/i386/isa/intr_machdep.c index a429ef4..f4f89ff 100644 --- a/sys/i386/isa/intr_machdep.c +++ b/sys/i386/isa/intr_machdep.c @@ -544,13 +544,6 @@ typedef struct intrec { static intrec *intreclist_head[ICU_LEN]; -typedef struct isarec { - int id_unit; - ointhand2_t *id_handler; -} isarec; - -static isarec *isareclist[ICU_LEN]; - /* * The interrupt multiplexer calls each of the handlers in turn. The * ipl is initially quite low. It is raised as necessary for each call @@ -572,14 +565,6 @@ intr_mux(void *arg) } } -static void -isa_intr_wrap(void *cookie) -{ - isarec *irec = (isarec *)cookie; - - irec->id_handler(irec->id_unit); -} - static intrec* find_idesc(unsigned *maskptr, int irq) { @@ -857,54 +842,3 @@ inthand_remove(intrec *idesc) free(idesc, M_DEVBUF); return (0); } - -/* - * Emulate the register_intr() call previously defined as low level function. - * That function (now icu_setup()) may no longer be directly called, since - * a conflict between an ISA and PCI interrupt might go by unnocticed, else. - */ - -int -register_intr(int intr, int device_id, u_int flags, - ointhand2_t handler, u_int *maskptr, int unit) -{ - intrec *idesc; - isarec *irec; - - irec = malloc(sizeof *irec, M_DEVBUF, M_WAITOK); - if (irec == NULL) - return NULL; - bzero(irec, sizeof *irec); - irec->id_unit = unit; - irec->id_handler = handler; - - flags |= INTR_EXCL; - idesc = inthand_add("old", intr, isa_intr_wrap, irec, maskptr, flags); - if (idesc == NULL) { - free(irec, M_DEVBUF); - return -1; - } - isareclist[intr] = irec; - return 0; -} - -/* - * Emulate the old unregister_intr() low level function. - * Make sure there is just one interrupt, that it was - * registered as non-shared, and that the handlers match. - */ - -int -unregister_intr(int intr, ointhand2_t handler) -{ - intrec *p = intreclist_head[intr]; - - if (p != NULL && (p->flags & INTR_EXCL) != 0 && - p->handler == isa_intr_wrap && isareclist[intr] != NULL && - isareclist[intr]->id_handler == handler) { - free(isareclist[intr], M_DEVBUF); - isareclist[intr] = NULL; - return (inthand_remove(p)); - } - return (EINVAL); -} diff --git a/sys/i386/isa/intr_machdep.h b/sys/i386/isa/intr_machdep.h index adea303..cf0667c 100644 --- a/sys/i386/isa/intr_machdep.h +++ b/sys/i386/isa/intr_machdep.h @@ -199,19 +199,13 @@ int update_intr_masks __P((void)); intrmask_t splq __P((intrmask_t mask)); -/* XXX currently dev_instance must be set to the ISA device_id or -1 for PCI */ #define INTR_FAST 0x00000001 /* fast interrupt handler */ #define INTR_EXCL 0x00010000 /* excl. intr, default is shared */ - struct intrec *inthand_add(const char *name, int irq, inthand2_t handler, void *arg, intrmask_t *maskptr, int flags); int inthand_remove(struct intrec *idesc); -int register_intr __P((int intr, int device_id, u_int flags, - ointhand2_t *handler, u_int *maskptr, int unit)); -int unregister_intr(int intr, ointhand2_t handler); - #endif /* LOCORE */ #endif /* KERNEL */ diff --git a/sys/i386/isa/nmi.c b/sys/i386/isa/nmi.c index a429ef4..f4f89ff 100644 --- a/sys/i386/isa/nmi.c +++ b/sys/i386/isa/nmi.c @@ -544,13 +544,6 @@ typedef struct intrec { static intrec *intreclist_head[ICU_LEN]; -typedef struct isarec { - int id_unit; - ointhand2_t *id_handler; -} isarec; - -static isarec *isareclist[ICU_LEN]; - /* * The interrupt multiplexer calls each of the handlers in turn. The * ipl is initially quite low. It is raised as necessary for each call @@ -572,14 +565,6 @@ intr_mux(void *arg) } } -static void -isa_intr_wrap(void *cookie) -{ - isarec *irec = (isarec *)cookie; - - irec->id_handler(irec->id_unit); -} - static intrec* find_idesc(unsigned *maskptr, int irq) { @@ -857,54 +842,3 @@ inthand_remove(intrec *idesc) free(idesc, M_DEVBUF); return (0); } - -/* - * Emulate the register_intr() call previously defined as low level function. - * That function (now icu_setup()) may no longer be directly called, since - * a conflict between an ISA and PCI interrupt might go by unnocticed, else. - */ - -int -register_intr(int intr, int device_id, u_int flags, - ointhand2_t handler, u_int *maskptr, int unit) -{ - intrec *idesc; - isarec *irec; - - irec = malloc(sizeof *irec, M_DEVBUF, M_WAITOK); - if (irec == NULL) - return NULL; - bzero(irec, sizeof *irec); - irec->id_unit = unit; - irec->id_handler = handler; - - flags |= INTR_EXCL; - idesc = inthand_add("old", intr, isa_intr_wrap, irec, maskptr, flags); - if (idesc == NULL) { - free(irec, M_DEVBUF); - return -1; - } - isareclist[intr] = irec; - return 0; -} - -/* - * Emulate the old unregister_intr() low level function. - * Make sure there is just one interrupt, that it was - * registered as non-shared, and that the handlers match. - */ - -int -unregister_intr(int intr, ointhand2_t handler) -{ - intrec *p = intreclist_head[intr]; - - if (p != NULL && (p->flags & INTR_EXCL) != 0 && - p->handler == isa_intr_wrap && isareclist[intr] != NULL && - isareclist[intr]->id_handler == handler) { - free(isareclist[intr], M_DEVBUF); - isareclist[intr] = NULL; - return (inthand_remove(p)); - } - return (EINVAL); -} |