From owner-p4-projects@FreeBSD.ORG Mon Jun 26 15:01:39 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CEFBF16A408; Mon, 26 Jun 2006 15:01:39 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F43116A404 for ; Mon, 26 Jun 2006 15:01:39 +0000 (UTC) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E85F4511B for ; Mon, 26 Jun 2006 15:01:39 +0000 (GMT) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k5QF1dLV076482 for ; Mon, 26 Jun 2006 15:01:39 GMT (envelope-from piso@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k5QF1cmS076479 for perforce@freebsd.org; Mon, 26 Jun 2006 15:01:38 GMT (envelope-from piso@freebsd.org) Date: Mon, 26 Jun 2006 15:01:38 GMT Message-Id: <200606261501.k5QF1cmS076479@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to piso@freebsd.org using -f From: Paolo Pisati To: Perforce Change Reviews Cc: Subject: PERFORCE change 100064 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2006 15:01:40 -0000 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); }