Date: Wed, 8 Nov 2006 19:51:03 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 109547 for review Message-ID: <200611081951.kA8Jp3KE054238@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=109547 Change 109547 by sam@sam_ebb on 2006/11/08 19:50:09 o fix teardown_intr to handle multiple irqs o change setup_intr to work like teardown--compute the mask of irqs and touch intr_enabled only once Affected files ... .. //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425.c#16 edit Differences ... ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425.c#16 (text+ko) ==== @@ -301,6 +301,7 @@ struct resource *ires, int flags, driver_intr_t *intr, void *arg, void **cookiep) { + uint32_t mask; int i; if (flags & INTR_TYPE_TTY) { @@ -313,8 +314,11 @@ } BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, intr, arg, cookiep); + + mask = 0; for (i = rman_get_start(ires); i <= rman_get_end(ires); i++) - intr_enabled |= 1 << i; + mask |= 1 << i; + intr_enabled |= mask; ixp425_set_intrmask(); return (0); @@ -324,9 +328,15 @@ ixp425_teardown_intr(device_t dev, device_t child, struct resource *res, void *cookie) { + uint32_t mask; + int i; - intr_enabled &= ~ 1 << rman_get_start(res); + mask = 0; + for (i = rman_get_start(res); i <= rman_get_end(res); i++) + mask |= 1 << i; + intr_enabled &= ~mask; ixp425_set_intrmask(); + return (BUS_TEARDOWN_INTR(device_get_parent(dev), child, res, cookie)); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611081951.kA8Jp3KE054238>