From owner-cvs-all@FreeBSD.ORG Mon Nov 21 23:34:49 2005 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C82D916A41F; Mon, 21 Nov 2005 23:34:49 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 870AA43D60; Mon, 21 Nov 2005 23:34:44 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (ppp212-204.lns1.adl2.internode.on.net [203.122.212.204]) (authenticated bits=0) by cain.gsoft.com.au (8.13.4/8.13.4) with ESMTP id jALNYf3T050994 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Tue, 22 Nov 2005 10:04:42 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: cvs-all@freebsd.org Date: Tue, 22 Nov 2005 10:04:27 +1030 User-Agent: KMail/1.8.2 References: <200511212022.jALKMZQA069772@repoman.freebsd.org> In-Reply-To: <200511212022.jALKMZQA069772@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5635928.nLcQ6TtDhN"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200511221004.35442.doconnor@gsoft.com.au> X-Spam-Score: 0.05 () FORGED_RCVD_HELO X-Scanned-By: MIMEDefang 2.51 on 203.31.81.10 Cc: cvs-src@freebsd.org, src-committers@freebsd.org, John Baldwin Subject: Re: cvs commit: src/sys/dev/puc puc.c src/sys/alpha/conf DEFAULTS src/sys/amd64/conf DEFAULTS src/sys/i386/conf DEFAULTS src/sys/ia64/conf DEFAULTS src/sys/pc98/conf DEFAULTS src/sys/sparc64/conf DEFAULTS 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: Mon, 21 Nov 2005 23:34:50 -0000 --nextPart5635928.nLcQ6TtDhN Content-Type: multipart/mixed; boundary="Boundary-01=_FmlgDYL9hm+d5If" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_FmlgDYL9hm+d5If Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tue, 22 Nov 2005 06:52, John Baldwin wrote: > Don't enable PUC_FASTINTR by default in the source. Instead, enable it > via the DEFAULTS kernel configs. This allows folks to turn it that > option off in the kernel configs if desired without having to hack the > source. This is especially useful since PUC_FASTINTR hangs the kernel boot > on my ultra60 which has two uart(4) devices hung off of a puc(4) device. > > I did not enable PUC_FASTINTR by default on powerpc since powerpc does > not currently allow sharing of INTR_FAST with non-INTR_FAST like the other > archs. Why not make it a tunable? Untested but compilable patch attached. =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --Boundary-01=_FmlgDYL9hm+d5If Content-Type: text/x-diff; charset="utf-8"; name="puc-intr-tunable.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="puc-intr-tunable.diff" Index: sys/dev/puc/puc.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/CVS-Repository/src/sys/dev/puc/puc.c,v retrieving revision 1.41 diff -u -r1.41 puc.c =2D-- sys/dev/puc/puc.c 28 Sep 2005 18:06:25 -0000 1.41 +++ sys/dev/puc/puc.c 21 Nov 2005 23:33:09 -0000 @@ -116,6 +116,14 @@ =20 devclass_t puc_devclass; =20 +#ifdef PUC_FASTINTR +static int fast_intr =3D 1; +#else +static int fast_intr =3D 0; +#endif + +TUNABLE_INT("hw.puc.fast_intr", &fast_intr); + static int puc_port_bar_index(struct puc_softc *sc, int bar) { @@ -196,18 +204,19 @@ =20 sc->irqres =3D res; sc->irqrid =3D rid; =2D#ifdef PUC_FASTINTR =2D irq_setup =3D BUS_SETUP_INTR(device_get_parent(dev), dev, res, =2D INTR_TYPE_TTY | INTR_FAST, puc_intr, sc, &sc->intr_cookie); =2D if (irq_setup =3D=3D 0) =2D sc->fastintr =3D INTR_FAST; =2D else + if (fast_intr) { irq_setup =3D BUS_SETUP_INTR(device_get_parent(dev), dev, res, =2D INTR_TYPE_TTY, puc_intr, sc, &sc->intr_cookie); =2D#else =2D irq_setup =3D BUS_SETUP_INTR(device_get_parent(dev), dev, res, =2D INTR_TYPE_TTY, puc_intr, sc, &sc->intr_cookie); =2D#endif + INTR_TYPE_TTY | INTR_FAST, puc_intr, sc, &sc->intr_cookie); + if (irq_setup =3D=3D 0) + sc->fastintr =3D INTR_FAST; + else + irq_setup =3D BUS_SETUP_INTR(device_get_parent(dev), dev, res, + INTR_TYPE_TTY, puc_intr, sc, &sc->intr_cookie); + } else { + irq_setup =3D BUS_SETUP_INTR(device_get_parent(dev), dev, res, + INTR_TYPE_TTY, puc_intr, sc, &sc->intr_cookie); + } +=09 if (irq_setup !=3D 0) return (ENXIO); =20 --Boundary-01=_FmlgDYL9hm+d5If-- --nextPart5635928.nLcQ6TtDhN Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDglmL5ZPcIHs/zowRAhflAJ99kQNHL83UHFgNxSoWIIbxsJ0FpACdFjig 1/BVV7opt1oRqBFgLEZte1U= =NvWB -----END PGP SIGNATURE----- --nextPart5635928.nLcQ6TtDhN--