Date: Mon, 26 Jun 2006 15:01:38 GMT From: Paolo Pisati <piso@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 100064 for review Message-ID: <200606261501.k5QF1cmS076479@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=100064 Change 100064 by piso@piso_newluxor on 2006/06/26 15:00:58 Add a filter parameter to nexus_setup_intr() and to inthand_add(). While here, put a comment about sparc64 particular interrupt calling path: intr_fast() when it's an IH_FAST or intr_execute_handlers() for ithread. In this situation filters won't work as expected, cause intr_fast() doesn't check return code and doesn't schedule any ithread: it has to be fixed somehow. Affected files ... .. //depot/projects/soc2006/intr_filter/sparc64/include/intr_machdep.h#2 edit .. //depot/projects/soc2006/intr_filter/sparc64/sparc64/intr_machdep.c#4 edit .. //depot/projects/soc2006/intr_filter/sparc64/sparc64/nexus.c#2 edit Differences ... ==== //depot/projects/soc2006/intr_filter/sparc64/include/intr_machdep.h#2 (text+ko) ==== @@ -79,8 +79,8 @@ void *iva); void intr_init1(void); void intr_init2(void); -int inthand_add(const char *name, int vec, void (*handler)(void *), - void *arg, int flags, void **cookiep); +int inthand_add(const char *name, int vec, driver_filter_t *filter, + void (*handler)(void *), void *arg, int flags, void **cookiep); int inthand_remove(int vec, void *cookie); ih_func_t intr_fast; ==== //depot/projects/soc2006/intr_filter/sparc64/sparc64/intr_machdep.c#4 (text+ko) ==== @@ -256,8 +256,8 @@ } int -inthand_add(const char *name, int vec, void (*handler)(void *), void *arg, - int flags, void **cookiep) +inthand_add(const char *name, int vec, driver_filter_t *filter, + void (*handler)(void *), void *arg, int flags, void **cookiep) { struct intr_vector *iv; struct intr_event *ie; /* descriptor for the IRQ */ @@ -289,11 +289,16 @@ } } - errcode = intr_event_add_handler(ie, name, handler, arg, + errcode = intr_event_add_handler(ie, name, filter, handler, arg, intr_priority(flags), flags, cookiep); if (errcode) return (errcode); + /* + * XXX Fast handlers are called from an asm routine(intr_fast), + * instead from intr_execute_handlers: with interrupt filters in + * place, they won't work, to be fixed. + */ intr_setup(flags & INTR_FAST ? PIL_FAST : PIL_ITHREAD, intr_fast, vec, intr_execute_handlers, iv); ==== //depot/projects/soc2006/intr_filter/sparc64/sparc64/nexus.c#2 (text+ko) ==== @@ -313,7 +313,7 @@ static int nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, - driver_intr_t *intr, void *arg, void **cookiep) + driver_filter_t *filter, driver_intr_t *intr, void *arg, void **cookiep) { int error; @@ -329,7 +329,7 @@ return (error); error = inthand_add(device_get_nameunit(child), rman_get_start(res), - intr, arg, flags, cookiep); + filter, intr, arg, flags, cookiep); return (error); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606261501.k5QF1cmS076479>