From owner-p4-projects@FreeBSD.ORG Tue Jan 16 21:10:24 2007 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 2F89516A417; Tue, 16 Jan 2007 21:10:23 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DB25F16A57E; Tue, 16 Jan 2007 21:10:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id 6121613C468; Tue, 16 Jan 2007 21:10:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id l0GLA1MA047029; Tue, 16 Jan 2007 16:10:12 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Paolo Pisati Date: Tue, 16 Jan 2007 16:01:05 -0500 User-Agent: KMail/1.9.1 References: <200701161011.l0GABmDf081094@repoman.freebsd.org> In-Reply-To: <200701161011.l0GABmDf081094@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200701161601.05588.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 16 Jan 2007 16:10:12 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2457/Tue Jan 16 06:53:04 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Perforce Change Reviews Subject: Re: PERFORCE change 112980 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: Tue, 16 Jan 2007 21:10:24 -0000 On Tuesday 16 January 2007 05:11, Paolo Pisati wrote: > http://perforce.freebsd.org/chv.cgi?CH=112980 > > Change 112980 by piso@piso_newluxor on 2007/01/16 10:10:55 > > Move spin lock acquisition inside the interrupt scanning > function. > While here, fix spacing and indentation. FYI, callout_init_mtx() doesn't work with spin mutexes. > Affected files ... > > .. //depot/projects/soc2006/intr_filter/ia64/ia64/interrupt.c#20 edit > > Differences ... > > ==== //depot/projects/soc2006/intr_filter/ia64/ia64/interrupt.c#20 (text+ko) ==== > > @@ -273,7 +273,7 @@ > { > > mtx_init(&ia64_intrs_lock, "intr table", NULL, MTX_SPIN); > - callout_init_mtx(&stray_callout_handle, &ia64_intrs_lock, 0); > + callout_init(&stray_callout_handle, 1); > } > SYSINIT(ithds_init, SI_SUB_INTR, SI_ORDER_SECOND, ithds_init, NULL); > > @@ -361,10 +361,13 @@ > walk_intr_ia64(void) { > struct ia64_intr *ia64_i; > static int i = 0; > + int j; > > - for (; i < IA64_NUMI; ) { > - int j = i++; > + for (; i < IA64_NUMI;) { > + j = i++; > + mtx_lock_spin(&ia64_intrs_lock); > ia64_i = ia64_intrs[j]; > + mtx_unlock_spin(&ia64_intrs_lock); > if (ia64_i != NULL && ia64_i->event != NULL) > return (ia64_i->event); > } > @@ -374,12 +377,10 @@ > > void > intr_callout_reset(void) > -{ > - > - mtx_lock_spin(&ia64_intrs_lock); > +{ > + > callout_reset(&stray_callout_handle, hz, > - &stray_detection, &walk_intr_ia64); > - mtx_unlock_spin(&ia64_intrs_lock); > + &stray_detection, &walk_intr_ia64); > } > > static void > -- John Baldwin