From owner-cvs-all@FreeBSD.ORG Thu Apr 24 15:09:23 2008 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 200AC106566C; Thu, 24 Apr 2008 15:09:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 1B7518FC1B; Thu, 24 Apr 2008 15:09:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unknown [208.65.91.234]) by elvis.mu.org (Postfix) with ESMTP id 284B71A4D80; Thu, 24 Apr 2008 08:09:22 -0700 (PDT) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m3OF96Zu041966; Thu, 24 Apr 2008 11:09:08 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Marcel Moolenaar Date: Thu, 24 Apr 2008 10:52:51 -0400 User-Agent: KMail/1.9.7 References: <200804190725.m3J7Pvie056329@repoman.freebsd.org> <8764A4AA-DE86-43A6-B161-3159DE7E5AB8@mac.com> In-Reply-To: <8764A4AA-DE86-43A6-B161-3159DE7E5AB8@mac.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200804241052.52297.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]); Thu, 24 Apr 2008 11:09:09 -0400 (EDT) X-Virus-Scanned: ClamAV 0.91.2/6924/Thu Apr 24 06:04:50 2008 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: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, Peter Wemm Subject: Re: cvs commit: src/sys/amd64/amd64 machdep.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2008 15:09:23 -0000 On Wednesday 23 April 2008 09:26:14 pm Marcel Moolenaar wrote: > > On Apr 23, 2008, at 5:40 PM, Peter Wemm wrote: > > > On Wed, Apr 23, 2008 at 5:58 AM, John Baldwin wrote: > >> On Saturday 19 April 2008 03:25:57 am Peter Wemm wrote: > >>> peter 2008-04-19 07:25:57 UTC > >>> > >>> FreeBSD src repository > >>> > >>> Modified files: > >>> sys/amd64/amd64 machdep.c > >>> Log: > >>> Put in a real isa_irq_pending() stub in order to remove two lines > >>> of > >>> dmesg noise from sio per unit. sio likes to probe if interrupts are > >>> configured correctly by looking at the pending bits of the atpic > >>> in order > >>> to put a non-fatal warning on the console. I think I'd rather > >>> read the > >>> pending bits from the apics, but I'm not sure its worth the hassle. > >> > >> Actually, the x86 interrupt sources have a pending method so this > >> can be > >> replaced. Could probably easily write something like this: > >> > >> int > >> intr_pending(u_int irq) > >> { > >> struct intsrc *isrc; > >> > >> isc = intr_lookup_source(irq); > >> if (isrc == NULL) > >> panic("bizarre"); > >> return (isrc->is_pic->pic_pending(isrc)); > >> } > >> > >> For intr_machdep.c and use this in sio: > >> > >> #if defined(__i386__) || defined(__amd64__) > >> foo = intr_pending(rman_get_start(irq_resource)); > >> #else > >> foo = isa_irq_pending() & (1 << rman_get_start(irq_resource)); > >> #endif > >> > >> or some such. I'd really prefer to kill isa_irq_pending(). > > > > Let's just add intr_pending() to all MD backends that currently > > provide isa_irq_pending() for sio's benenfit. Either as a simple > > wrapper around the now-static local isa_irq_pending() (ia64), or by > > simplifying and converting isa_irq_pending() into intr_pending() > > (sparc64). > > sio() is only for i386 and amd64, isa_irq_pending() should be > removed from all MD code, except from i386 and amd64. Other people may still want to use sio, but the use of isa_irq_pending() in sio is dubious at best and really only applicable to ISA sio parts anyway. It's probably a waste of time to bother checking for PCI devices, etc. -- John Baldwin