From owner-p4-projects@FreeBSD.ORG Sat Jul 22 12:33:45 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 CD66016A4E1; Sat, 22 Jul 2006 12:33:45 +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 9561416A4DD for ; Sat, 22 Jul 2006 12:33:45 +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 6313F43D64 for ; Sat, 22 Jul 2006 12:33:45 +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 k6MCXjbl033394 for ; Sat, 22 Jul 2006 12:33:45 GMT (envelope-from piso@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6MCXjIL033391 for perforce@freebsd.org; Sat, 22 Jul 2006 12:33:45 GMT (envelope-from piso@freebsd.org) Date: Sat, 22 Jul 2006 12:33:45 GMT Message-Id: <200607221233.k6MCXjIL033391@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 102141 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: Sat, 22 Jul 2006 12:33:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=102141 Change 102141 by piso@piso_longino on 2006/07/22 12:33:15 Use IF_FAST macro instead of directly checking flags, and axe an INTR_FAST check in swi_add(): is it possible for a software interrupt handler to have INTR_FAST defined? did it make sense at all? Affected files ... .. //depot/projects/soc2006/intr_filter/kern/kern_intr.c#10 edit Differences ... ==== //depot/projects/soc2006/intr_filter/kern/kern_intr.c#10 (text+ko) ==== @@ -370,7 +370,7 @@ intr_event_update(ie); /* Create a thread if we need one. */ - while (ie->ie_thread == NULL && !(flags & INTR_FAST)) { + while (ie->ie_thread == NULL && !IS_FAST(filter, handler)) { if (ie->ie_flags & IE_ADDING_THREAD) msleep(ie, &ie->ie_lock, 0, "ithread", 0); else { @@ -551,7 +551,13 @@ struct intr_event *ie; int error; - if (flags & (INTR_FAST | INTR_ENTROPY)) +#if 0 + // XXX a software intr handler with INTR_FAST?!?!?!? + if (flags & (INTR_FAST | INTR_ENTROPY)) + return (EINVAL); +#endif + + if (flags & INTR_ENTROPY) return (EINVAL); ie = (eventp != NULL) ? *eventp : NULL;