From owner-cvs-src@FreeBSD.ORG Fri Apr 25 12:42:16 2008 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBB76106568C; Fri, 25 Apr 2008 12:42:16 +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 9E7F58FC16; Fri, 25 Apr 2008 12:42:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (unknown [208.65.91.234]) by elvis.mu.org (Postfix) with ESMTP id 632B61A4D80; Fri, 25 Apr 2008 05:42:16 -0700 (PDT) From: John Baldwin To: "M. Warner Losh" Date: Fri, 25 Apr 2008 07:47:23 -0400 User-Agent: KMail/1.9.7 References: <8764A4AA-DE86-43A6-B161-3159DE7E5AB8@mac.com> <200804241559.26710.jhb@freebsd.org> <20080424.201238.-1876858660.imp@bsdimp.com> In-Reply-To: <20080424.201238.-1876858660.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200804250747.23898.jhb@freebsd.org> Cc: src-committers@freebsd.org, peter@wemm.org, cvs-src@freebsd.org, xcllnt@mac.com, cvs-all@freebsd.org, marius@alchemy.franken.de Subject: Re: cvs commit: src/sys/amd64/amd64 machdep.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2008 12:42:16 -0000 On Thursday 24 April 2008 10:12:38 pm M. Warner Losh wrote: > In message: <200804241559.26710.jhb@freebsd.org> > > John Baldwin writes: > : --- //depot/projects/smpng/sys/dev/sio/sio.c 2008/01/21 18:58:30 > : +++ //depot/user/jhb/intr/dev/sio/sio.c 2008/04/24 14:51:42 > : @@ -85,6 +85,11 @@ > : #endif > : #include > : > : +#if defined(__i386__) || defined(__amd64__) > : +#define PROBE_IRQ > : +#include > : +#endif > : + > : #define LOTS_OF_EVENTS 64 /* helps separate urgent events from input */ > : > : #ifdef COM_MULTIPORT > > noprobe is true for all busses except isa and cbus. So really, you > could make this patch a lot simpler. > > Index: sio.c > =================================================================== > RCS file: /cache/ncvs/src/sys/dev/sio/sio.c,v > retrieving revision 1.473 > diff -u -r1.473 sio.c > --- sio.c 25 Dec 2007 17:51:57 -0000 1.473 > +++ sio.c 25 Apr 2008 02:11:08 -0000 > @@ -430,8 +430,10 @@ > int fn; > device_t idev; > Port_t iobase; > +#ifdef DEV_ISA > intrmask_t irqmap[4]; > intrmask_t irqs; > +#endif > u_char mcr_image; > int result; > u_long xirq; > @@ -700,9 +702,10 @@ > device_set_softc(dev, NULL); > free(com, M_DEVBUF); > } > - return (result == 0 ? BUS_PROBE_DEFAULT + 1 : result); > + return (result == 0 ? BUS_PROBE_DEFAULT - 1 : result); > } > > +#ifdef DEV_ISA > /* > * Check that > * o the CFCR, IER and MCR in UART hold the values written to them > @@ -777,7 +780,10 @@ > device_set_softc(dev, NULL); > free(com, M_DEVBUF); > } > - return (result == 0 ? BUS_PROBE_DEFAULT + 1 : result); > + return (result == 0 ? BUS_PROBE_DEFAULT - 1 : result); > +#else > + return (BUS_PROBE_DEFAULT - 1); > +#endif > } > > #ifdef COM_ESP > > > Warner I had pondered making it not do all the checks if the IRQ wasn't an ISA irq. We can also probably not bother with the check if the IRQ came from ACPI as that tends to be correct (I've seen PNPBIOS be wrong OTOH). Probably this needs to only be done in the sio_isa_probe() routine (and sio_cbus_probe()) and moved out of sioprobe() and have a separate sio_acpi_probe() for ACPI that doesn't do it. -- John Baldwin