Date: Tue, 22 Nov 2005 10:04:27 +1030 From: "Daniel O'Connor" <doconnor@gsoft.com.au> To: cvs-all@freebsd.org Cc: cvs-src@freebsd.org, src-committers@freebsd.org, John Baldwin <jhb@freebsd.org> 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 Message-ID: <200511221004.35442.doconnor@gsoft.com.au> In-Reply-To: <200511212022.jALKMZQA069772@repoman.freebsd.org> References: <200511212022.jALKMZQA069772@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200511221004.35442.doconnor>