svn commit: r198356 - head/sys/cam/scsi
Author: brueffer Date: Thu Oct 22 06:13:07 2009 New Revision: 198356 URL: http://svn.freebsd.org/changeset/base/198356 Log: Fix a memory leak in an error case. PR: 138376 Submitted by: Patroklos Argyroudis a...@census-labs.com Reviewed by: scottl MFC after:1 week Modified: head/sys/cam/scsi/scsi_low.c Modified: head/sys/cam/scsi/scsi_low.c == --- head/sys/cam/scsi/scsi_low.cThu Oct 22 04:35:32 2009 (r198355) +++ head/sys/cam/scsi/scsi_low.cThu Oct 22 06:13:07 2009 (r198356) @@ -638,7 +638,10 @@ scsi_low_attach_xs(slp) return ENOMEM; splp = SCSI_LOW_MALLOC(sizeof(*splp)); if (splp == NULL) + { + SCSI_LOW_FREE(sap); return ENOMEM; + } SCSI_LOW_BZERO(sap, sizeof(*sap)); SCSI_LOW_BZERO(splp, sizeof(*splp)); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r198357 - head/sys/net
Author: brueffer Date: Thu Oct 22 06:17:04 2009 New Revision: 198357 URL: http://svn.freebsd.org/changeset/base/198357 Log: Check pointer for NULL before dereferencing it, not after. PR: 138390 Submitted by: Patroklos Argyroudis a...@census-labs.com MFC after:1 week Modified: head/sys/net/if_gif.c Modified: head/sys/net/if_gif.c == --- head/sys/net/if_gif.c Thu Oct 22 06:13:07 2009(r198356) +++ head/sys/net/if_gif.c Thu Oct 22 06:17:04 2009(r198357) @@ -507,7 +507,7 @@ gif_input(m, af, ifp) struct ifnet *ifp; { int isr, n; - struct gif_softc *sc = ifp-if_softc; + struct gif_softc *sc; struct etherip_header *eip; struct ether_header *eh; struct ifnet *oldifp; @@ -517,7 +517,7 @@ gif_input(m, af, ifp) m_freem(m); return; } - + sc = ifp-if_softc; m-m_pkthdr.rcvif = ifp; #ifdef MAC ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r198358 - head/sys/dev/ppbus
Author: brueffer Date: Thu Oct 22 06:51:29 2009 New Revision: 198358 URL: http://svn.freebsd.org/changeset/base/198358 Log: Check pointer for NULL before dereferencing it, not after. PR: 138387, 138388 Submitted by: Patroklos Argyroudis a...@census-labs.com MFC after:1 week Modified: head/sys/dev/ppbus/lpt.c head/sys/dev/ppbus/pcfclock.c Modified: head/sys/dev/ppbus/lpt.c == --- head/sys/dev/ppbus/lpt.cThu Oct 22 06:17:04 2009(r198357) +++ head/sys/dev/ppbus/lpt.cThu Oct 22 06:51:29 2009(r198358) @@ -486,12 +486,15 @@ lptopen(struct cdev *dev, int flags, int { int trys, err; struct lpt_data *sc = dev-si_drv1; - device_t lptdev = sc-sc_dev; - device_t ppbus = device_get_parent(lptdev); + device_t lptdev; + device_t ppbus; if (!sc) return (ENXIO); + lptdev = sc-sc_dev; + ppbus = device_get_parent(lptdev); + ppb_lock(ppbus); if (sc-sc_state) { lprintf((%s: still open %x\n, device_get_nameunit(lptdev), Modified: head/sys/dev/ppbus/pcfclock.c == --- head/sys/dev/ppbus/pcfclock.c Thu Oct 22 06:17:04 2009 (r198357) +++ head/sys/dev/ppbus/pcfclock.c Thu Oct 22 06:51:29 2009 (r198358) @@ -150,12 +150,14 @@ static int pcfclock_open(struct cdev *dev, int flag, int fms, struct thread *td) { struct pcfclock_data *sc = dev-si_drv1; - device_t pcfclockdev = sc-dev; - device_t ppbus = device_get_parent(pcfclockdev); + device_t pcfclockdev; + device_t ppbus; int res; if (!sc) return (ENXIO); + pcfclockdev = sc-dev; + ppbus = device_get_parent(pcfclockdev); ppb_lock(ppbus); res = ppb_request_bus(ppbus, pcfclockdev, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r198335 - head/share/mk
On Thu, Oct 22, 2009 at 01:07:07AM +0400, Ruslan Ermilov wrote: On Wed, Oct 21, 2009 at 05:07:46PM +, Roman Divacky wrote: Author: rdivacky Date: Wed Oct 21 17:07:46 2009 New Revision: 198335 URL: http://svn.freebsd.org/changeset/base/198335 Log: Set CSTD in all cases except when CC=icc and NO_WARNS is set. This way we can set desired C standard even for cross tools etc. I think you meant to say always set CFLAGS based on CSTD. Unfortunately the actual change does not only that, it also breaks NO_WARNS (by ignoring it) for anything that's not icc. yes, it sets the C standard regardless of NO_WARNS It also breaks icc compiles without NO_WARNS by passing unrecognized flags to the compiler. A correct change would be to move setting of CFLAGS based on CSTD out of the control of NO_WARNS, like this: previously it did: NO_WARNS ICCCFLAGS includes CSTD 00 1 01 0 10 0 11 0 now it does NO_WARNS ICCCFLAGS includes CSTD 00 1 01 1 10 1 11 0 so you are saying that for ICC and !NO_WARNS the CFLAGS should not include CSTD? ie: NO_WARNS ICCCFLAGS includes CSTD 00 1 01 0 10 1 11 0 am I right? my intention was to set the C standard regardless of NO_WARNS for clang (because it default to C99 and gcc breaks with it). feel free to fix my commit if this is the case thank you ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r198359 - stable/8/share/man/man4
Author: brueffer Date: Thu Oct 22 08:34:20 2009 New Revision: 198359 URL: http://svn.freebsd.org/changeset/base/198359 Log: MFC: r198232 Powercrypt and NetSec seem to be defunct (webpages point to link farms and a google search yields no alternative). Remove the links but keep the entries around for reference. Approved by: re (kib) Modified: stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/hifn.4 Modified: stable/8/share/man/man4/hifn.4 == --- stable/8/share/man/man4/hifn.4 Thu Oct 22 06:51:29 2009 (r198358) +++ stable/8/share/man/man4/hifn.4 Thu Oct 22 08:34:20 2009 (r198359) @@ -26,7 +26,7 @@ .\ .\ $FreeBSD$ .\ -.Dd April 1, 2006 +.Dd October 19, 2009 .Dt HIFN 4 .Os .Sh NAME @@ -85,17 +85,11 @@ Came as 128KB SRAM model, or 2MB DRAM mo .It Hifn 7751 Reference board with 512KB SRAM. .It PowerCrypt -See -.Pa http://www.powercrypt.com/ . Comes with 512KB SRAM. .It XL-Crypt -See -.Pa http://www.powercrypt.com/ . Only board based on 7811 (which is faster than 7751 and has a random number generator). .It NetSec 7751 -See -.Pa http://www.netsec.net/ . Supports the most IPsec sessions, with 1MB SRAM. .It Soekris Engineering vpn1201 and vpn1211 See ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r198360 - stable/7/share/man/man4
Author: brueffer Date: Thu Oct 22 08:36:08 2009 New Revision: 198360 URL: http://svn.freebsd.org/changeset/base/198360 Log: MFC: r198232 Powercrypt and NetSec seem to be defunct (webpages point to link farms and a google search yields no alternative). Remove the links but keep the entries around for reference. Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/hifn.4 Modified: stable/7/share/man/man4/hifn.4 == --- stable/7/share/man/man4/hifn.4 Thu Oct 22 08:34:20 2009 (r198359) +++ stable/7/share/man/man4/hifn.4 Thu Oct 22 08:36:08 2009 (r198360) @@ -26,7 +26,7 @@ .\ .\ $FreeBSD$ .\ -.Dd April 1, 2006 +.Dd October 19, 2009 .Dt HIFN 4 .Os .Sh NAME @@ -85,17 +85,11 @@ Came as 128KB SRAM model, or 2MB DRAM mo .It Hifn 7751 Reference board with 512KB SRAM. .It PowerCrypt -See -.Pa http://www.powercrypt.com/ . Comes with 512KB SRAM. .It XL-Crypt -See -.Pa http://www.powercrypt.com/ . Only board based on 7811 (which is faster than 7751 and has a random number generator). .It NetSec 7751 -See -.Pa http://www.netsec.net/ . Supports the most IPsec sessions, with 1MB SRAM. .It Soekris Engineering vpn1201 and vpn1211 See ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r198341 - in head/sys: amd64/amd64 arm/arm arm/mv i386/i386 i386/xen ia64/ia64 kern mips/mips powerpc/aim powerpc/booke powerpc/include powerpc/powerpc sparc64/sparc64 sun4v/sun4v vm
On 2009-10-21, at 20:38, Marcel Moolenaar wrote: The key property of this change is that the I-cache is made coherent *after* writes have been done. Doing it in the PMAP layer when adding or changing a mapping means that the I-cache is made coherent *before* any writes happen. The difference is key when the I-cache prefetches. Marcel, does this new approach help with your problems on MV-78xxx with SATA when executing binaries was failing with various signals etc. (and the suspicions were this was due to some i-cache incoherency)? Rafal ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r198362 - stable/6/share/man/man4
Author: brueffer Date: Thu Oct 22 09:39:32 2009 New Revision: 198362 URL: http://svn.freebsd.org/changeset/base/198362 Log: MFC: r198232 Powercrypt and NetSec seem to be defunct (webpages point to link farms and a google search yields no alternative). Remove the links but keep the entries around for reference. Modified: stable/6/share/man/man4/ (props changed) stable/6/share/man/man4/hifn.4 Modified: stable/6/share/man/man4/hifn.4 == --- stable/6/share/man/man4/hifn.4 Thu Oct 22 08:38:27 2009 (r198361) +++ stable/6/share/man/man4/hifn.4 Thu Oct 22 09:39:32 2009 (r198362) @@ -28,7 +28,7 @@ .\ .\ $FreeBSD$ .\ -.Dd April 1, 2006 +.Dd October 19, 2009 .Dt HIFN 4 .Os .Sh NAME @@ -87,17 +87,11 @@ Came as 128KB SRAM model, or 2MB DRAM mo .It Hifn 7751 Reference board with 512KB SRAM. .It PowerCrypt -See -.Pa http://www.powercrypt.com/ . Comes with 512KB SRAM. .It XL-Crypt -See -.Pa http://www.powercrypt.com/ . Only board based on 7811 (which is faster than 7751 and has a random number generator). .It NetSec 7751 -See -.Pa http://www.netsec.net/ . Supports the most IPsec sessions, with 1MB SRAM. .It Soekris Engineering vpn1201 and vpn1211 See ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r198363 - head/share/man/man4
Author: brueffer Date: Thu Oct 22 11:35:12 2009 New Revision: 198363 URL: http://svn.freebsd.org/changeset/base/198363 Log: List more dependencies for these drivers. While here, convert atapicam(4) to use our standard section 4 SYNOPSIS layout. PR: 132525 Submitted by: gcooper MFC after:3 days Modified: head/share/man/man4/atapicam.4 head/share/man/man4/umass.4 Modified: head/share/man/man4/atapicam.4 == --- head/share/man/man4/atapicam.4 Thu Oct 22 09:39:32 2009 (r198362) +++ head/share/man/man4/atapicam.4 Thu Oct 22 11:35:12 2009 (r198363) @@ -27,14 +27,29 @@ .\ .\ $FreeBSD$ .\ -.Dd October 23, 2002 +.Dd October 22, 2009 .Dt ATAPICAM 4 .Os .Sh NAME .Nm atapicam .Nd CAM XPT (transport) module for ATAPI devices .Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd device scbus +.Cd device cam +.Cd device ata .Cd device atapicam +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +atapicam_load=YES +.Ed .Sh DESCRIPTION The ATAPI/CAM module allows ATAPI devices (CD-ROM, CD-RW, DVD drives, floppy drives such as Iomega Zip, tape drives) to be accessed through Modified: head/share/man/man4/umass.4 == --- head/share/man/man4/umass.4 Thu Oct 22 09:39:32 2009(r198362) +++ head/share/man/man4/umass.4 Thu Oct 22 11:35:12 2009(r198363) @@ -27,7 +27,7 @@ .\ .\ $FreeBSD$ .\ -.Dd November 22, 2006 +.Dd October 22, 2009 .Dt UMASS 4 .Os .Sh NAME @@ -38,6 +38,9 @@ To compile this driver into the kernel, place the following line in your kernel configuration file: .Bd -ragged -offset indent +.Cd device scbus +.Cd device cam +.Cd device usb .Cd device umass .Ed .Pp ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r198365 - head/share/mk
Author: ru Date: Thu Oct 22 11:45:35 2009 New Revision: 198365 URL: http://svn.freebsd.org/changeset/base/198365 Log: Unbreak NO_WARNS, keeping CSTD effect on CFLAGS out of its control. Unbreak compiles with icc. Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk == --- head/share/mk/bsd.sys.mkThu Oct 22 11:38:19 2009(r198364) +++ head/share/mk/bsd.sys.mkThu Oct 22 11:45:35 2009(r198365) @@ -11,7 +11,7 @@ # the default is gnu99 for now CSTD ?= gnu99 -.if !defined(NO_WARNS) || ${CC} != icc +.if ${CC} != icc . if ${CSTD} == kr CFLAGS += -traditional . elif ${CSTD} == c89 || ${CSTD} == c90 @@ -23,6 +23,8 @@ CFLAGS+= -std=iso9899:1999 . else CFLAGS += -std=${CSTD} . endif +.endif +.if !defined(NO_WARNS) ${CC} != icc # -pedantic is problematic because it also imposes namespace restrictions #CFLAGS+= -pedantic . if defined(WARNS) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r198335 - head/share/mk
Hi, On Thu, Oct 22, 2009 at 09:06:38AM +0200, Roman Divacky wrote: On Thu, Oct 22, 2009 at 01:07:07AM +0400, Ruslan Ermilov wrote: On Wed, Oct 21, 2009 at 05:07:46PM +, Roman Divacky wrote: Author: rdivacky Date: Wed Oct 21 17:07:46 2009 New Revision: 198335 URL: http://svn.freebsd.org/changeset/base/198335 Log: Set CSTD in all cases except when CC=icc and NO_WARNS is set. This way we can set desired C standard even for cross tools etc. I think you meant to say always set CFLAGS based on CSTD. Unfortunately the actual change does not only that, it also breaks NO_WARNS (by ignoring it) for anything that's not icc. yes, it sets the C standard regardless of NO_WARNS But it does NOT only that, it also causes NO_WARNS to be a no-op (see below). It also breaks icc compiles without NO_WARNS by passing unrecognized flags to the compiler. A correct change would be to move setting of CFLAGS based on CSTD out of the control of NO_WARNS, like this: previously it did: NO_WARNS ICC CFLAGS includes CSTD 0 0 1 0 1 0 1 0 0 1 1 0 now it does NO_WARNS ICC CFLAGS includes CSTD 0 0 1 0 1 1 1 0 1 1 1 0 so you are saying that for ICC and !NO_WARNS the CFLAGS should not include CSTD? ie: NO_WARNS ICC CFLAGS includes CSTD 0 0 1 0 1 0 1 0 1 1 1 0 am I right? my intention was to set the C standard regardless of NO_WARNS for clang (because it default to C99 and gcc breaks with it). I understand your intentions. icc has different command-line options to support conformance to standards, mostly incompatible with gcc. From a manpage: : -ansi : Support all ANSI standard C programs, equivalent to the -ansi option of gcc. : -[no-]c99 : Enable [disable] C99 support for C programs. : -std=c99 : Enable C99 support for C programs : -strict-ansi : Select strict ANSI C/C++ conformance dialect feel free to fix my commit if this is the case Your commit also causes warning options (those starting with -W) to leak into CFLAGS when NO_WARNS is set, thus making NO_WARNS a no-op, and that is a bigger problem I was talking about. Before your change: # make -f bsd.own.mk -f bsd.sys.mk WARNS=6 -DNO_WARNS CSTD=c99 -V CFLAGS -O2 -pipe -fstack-protector After your change: # make -f bsd.own.mk -f bsd.sys.mk WARNS=6 -DNO_WARNS CSTD=c99 -V CFLAGS -O2 -pipe -std=iso9899:1999 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign With my fix: # make -f bsd.own.mk -f bsd.sys.mk WARNS=6 -DNO_WARNS CSTD=c99 -V CFLAGS -O2 -pipe -std=iso9899:1999 -fstack-protector FYI, I've committed my fix. Cheers, -- Ruslan Ermilov r...@freebsd.org FreeBSD committer ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r198358 - head/sys/dev/ppbus
On Thursday 22 October 2009 2:51:29 am Christian Brueffer wrote: Author: brueffer Date: Thu Oct 22 06:51:29 2009 New Revision: 198358 URL: http://svn.freebsd.org/changeset/base/198358 Log: Check pointer for NULL before dereferencing it, not after. PR: 138387, 138388 Submitted by: Patroklos Argyroudis a...@census-labs.com MFC after: 1 week In this case the '!sc' check should just be removed. It will never be true. I think this is also probably true of many of the other cases you are running into. Modified: head/sys/dev/ppbus/lpt.c head/sys/dev/ppbus/pcfclock.c Modified: head/sys/dev/ppbus/lpt.c == --- head/sys/dev/ppbus/lpt.c Thu Oct 22 06:17:04 2009(r198357) +++ head/sys/dev/ppbus/lpt.c Thu Oct 22 06:51:29 2009(r198358) @@ -486,12 +486,15 @@ lptopen(struct cdev *dev, int flags, int { int trys, err; struct lpt_data *sc = dev-si_drv1; - device_t lptdev = sc-sc_dev; - device_t ppbus = device_get_parent(lptdev); + device_t lptdev; + device_t ppbus; if (!sc) return (ENXIO); + lptdev = sc-sc_dev; + ppbus = device_get_parent(lptdev); + ppb_lock(ppbus); if (sc-sc_state) { lprintf((%s: still open %x\n, device_get_nameunit(lptdev), Modified: head/sys/dev/ppbus/pcfclock.c == --- head/sys/dev/ppbus/pcfclock.c Thu Oct 22 06:17:04 2009 (r198357) +++ head/sys/dev/ppbus/pcfclock.c Thu Oct 22 06:51:29 2009 (r198358) @@ -150,12 +150,14 @@ static int pcfclock_open(struct cdev *dev, int flag, int fms, struct thread *td) { struct pcfclock_data *sc = dev-si_drv1; - device_t pcfclockdev = sc-dev; - device_t ppbus = device_get_parent(pcfclockdev); + device_t pcfclockdev; + device_t ppbus; int res; if (!sc) return (ENXIO); + pcfclockdev = sc-dev; + ppbus = device_get_parent(pcfclockdev); ppb_lock(ppbus); res = ppb_request_bus(ppbus, pcfclockdev, -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r198366 - head/sys/dev/mwl
Author: rpaulo Date: Thu Oct 22 12:48:17 2009 New Revision: 198366 URL: http://svn.freebsd.org/changeset/base/198366 Log: Don't use BUS_DMA_ALLOCNOW as that causes the attachment to fail on Cambria boards. MFC after:2 months Modified: head/sys/dev/mwl/if_mwl_pci.c Modified: head/sys/dev/mwl/if_mwl_pci.c == --- head/sys/dev/mwl/if_mwl_pci.c Thu Oct 22 11:45:35 2009 (r198365) +++ head/sys/dev/mwl/if_mwl_pci.c Thu Oct 22 12:48:17 2009 (r198366) @@ -204,7 +204,7 @@ mwl_pci_attach(device_t dev) BUS_SPACE_MAXADDR, /* maxsize */ MWL_TXDESC, /* nsegments */ BUS_SPACE_MAXADDR, /* maxsegsize */ - BUS_DMA_ALLOCNOW,/* flags */ + 0, /* flags */ NULL,/* lockfunc */ NULL,/* lockarg */ sc-sc_dmat)) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r198367 - head/sys/kern
Author: jhb Date: Thu Oct 22 14:53:44 2009 New Revision: 198367 URL: http://svn.freebsd.org/changeset/base/198367 Log: Set the devclass_t pointer specified in the DRIVER_MODULE() macro sooner so it is always valid when a driver's identify routine is called. Previously, new-bus would attempt to create the devclass for a newly loaded driver in two separate places, once in devclass_add_driver(), and again after devclass_add_driver() returned in driver_module_handler(). Only the second lookup attempted to set a device class' parent and set the devclass_t pointer specified in the DRIVER_MODULE() macro. However, by the time it was executed, the driver was already added to existing instances of the parent driver at which point in time the new driver's identify routine would have been invoked. The fix is to merge the two attempts and only create the devclass once in devclass_add_driver() including setting the devclass_t pointer passed to DRIVER_MODULE() before the driver is added to any existing bus devices. Reported by: avg Reviewed by: imp MFC after:2 weeks Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c == --- head/sys/kern/subr_bus.cThu Oct 22 12:48:17 2009(r198366) +++ head/sys/kern/subr_bus.cThu Oct 22 14:53:44 2009(r198367) @@ -1049,9 +1049,10 @@ devclass_driver_added(devclass_t dc, dri * @param driver the driver to register */ static int -devclass_add_driver(devclass_t dc, driver_t *driver, int pass) +devclass_add_driver(devclass_t dc, driver_t *driver, int pass, devclass_t *dcp) { driverlink_t dl; + const char *parentname; PDEBUG((%s, DRIVERNAME(driver))); @@ -1072,9 +1073,17 @@ devclass_add_driver(devclass_t dc, drive kobj_class_compile((kobj_class_t) driver); /* -* Make sure the devclass which the driver is implementing exists. +* If the driver has any base classes, make the +* devclass inherit from the devclass of the driver's +* first base class. This will allow the system to +* search for drivers in both devclasses for children +* of a device using this driver. */ - devclass_find_internal(driver-name, NULL, TRUE); + if (driver-baseclasses) + parentname = driver-baseclasses[0]-name; + else + parentname = NULL; + *dcp = devclass_find_internal(driver-name, parentname, TRUE); dl-driver = driver; TAILQ_INSERT_TAIL(dc-drivers, dl, link); @@ -4157,27 +4166,8 @@ driver_module_handler(module_t mod, int driver = dmd-dmd_driver; PDEBUG((Loading module: driver %s on bus %s (pass %d), DRIVERNAME(driver), dmd-dmd_busname, pass)); - error = devclass_add_driver(bus_devclass, driver, pass); - if (error) - break; - - /* -* If the driver has any base classes, make the -* devclass inherit from the devclass of the driver's -* first base class. This will allow the system to -* search for drivers in both devclasses for children -* of a device using this driver. -*/ - if (driver-baseclasses) { - const char *parentname; - parentname = driver-baseclasses[0]-name; - *dmd-dmd_devclass = - devclass_find_internal(driver-name, - parentname, TRUE); - } else { - *dmd-dmd_devclass = - devclass_find_internal(driver-name, NULL, TRUE); - } + error = devclass_add_driver(bus_devclass, driver, pass, + dmd-dmd_devclass); break; case MOD_UNLOAD: ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r198341 - in head/sys: amd64/amd64 arm/arm arm/mv i386/i386 i386/xen ia64/ia64 kern mips/mips powerpc/aim powerpc/booke powerpc/include powerpc/powerpc sparc64/sparc64 sun4v/sun4v vm
On Oct 22, 2009, at 2:10 AM, Rafal Jaworowski wrote: On 2009-10-21, at 20:38, Marcel Moolenaar wrote: The key property of this change is that the I-cache is made coherent *after* writes have been done. Doing it in the PMAP layer when adding or changing a mapping means that the I-cache is made coherent *before* any writes happen. The difference is key when the I-cache prefetches. Marcel, does this new approach help with your problems on MV-78xxx with SATA when executing binaries was failing with various signals etc. (and the suspicions were this was due to some i-cache incoherency)? This commit only adds I-cache synchronisation to ptrace(2) so that breakpoints work reliably. Note that the PMAP layer for ARM needs to have a proper implementation, because breakpoints don't work reliably. Unfortunately, the PMAP code is not well suited for non-current PMAP operations. I'm looking into it... In any case: I'll be working on moving I-cache coherency from PMAP to MI where sensible to make sure we synchronize after the memory update and not before (or multiple times in an attempt to plaster over the cracks). I expect that in the end it'll have helped... :-) -- Marcel Moolenaar xcl...@mac.com ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r198368 - in stable/8: . cddl/compat/opensolaris contrib/pf sys sys/amd64/include/xen sys/cddl/contrib/opensolaris sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/contrib/dev/acpica ...
Author: trasz Date: Thu Oct 22 16:26:38 2009 New Revision: 198368 URL: http://svn.freebsd.org/changeset/base/198368 Log: MFC r196863: Improve wording. MFC r196941: Prevent the line from wrapping. Approved by: re (kib) Modified: stable/8/ (props changed) stable/8/cddl/compat/opensolaris/ (props changed) stable/8/contrib/pf/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Oct 22 14:53:44 2009(r198367) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Oct 22 16:26:38 2009(r198368) @@ -3557,15 +3557,19 @@ arc_init(void) #ifdef __i386__ if (prefetch_tunable_set == 0) { - printf(ZFS NOTICE: prefetch is disabled by default on i386 -- add enable to tunable to change.\n ); + printf(ZFS NOTICE: Prefetch is disabled by default on i386 + -- to enable,\n); + printf(add \vfs.zfs.prefetch_disable=0\ + to /boot/loader.conf.\n); zfs_prefetch_disable=1; } #else if uint64_t)physmem * PAGESIZE) (1ULL 32)) prefetch_tunable_set == 0) { - printf(ZFS NOTICE: system has less than 4GB and prefetch enable is not set - ... disabling.\n); + printf(ZFS NOTICE: Prefetch is disabled by default if less + than 4GB of RAM is present;\n + to enable, add \vfs.zfs.prefetch_disable=0\ + to /boot/loader.conf.\n); zfs_prefetch_disable=1; } #endif ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r198369 - head/sys/net80211
Author: rpaulo Date: Thu Oct 22 17:30:22 2009 New Revision: 198369 URL: http://svn.freebsd.org/changeset/base/198369 Log: Initialize rann_flags properly. MFC after:2 days Modified: head/sys/net80211/ieee80211_hwmp.c Modified: head/sys/net80211/ieee80211_hwmp.c == --- head/sys/net80211/ieee80211_hwmp.c Thu Oct 22 16:26:38 2009 (r198368) +++ head/sys/net80211/ieee80211_hwmp.c Thu Oct 22 17:30:22 2009 (r198369) @@ -653,6 +653,7 @@ hwmp_rootmode_rann_cb(void *arg) IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, vap-iv_bss, %s, send broadcast RANN); + rann.rann_flags = 0; if (ms-ms_flags IEEE80211_MESHFLAGS_PORTAL) rann.rann_flags |= IEEE80211_MESHRANN_FLAGS_PR; rann.rann_hopcount = 0; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r198371 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci net
Author: qingli Date: Thu Oct 22 18:48:25 2009 New Revision: 198371 URL: http://svn.freebsd.org/changeset/base/198371 Log: MFC 198306 The flow-table function flowtable_route_flush() may be called during system initialization time. Since the flow-table is designed to maintain per CPU flow cache, the existing code did not check whether smp_started is true before calling sched_bind() and sched_unbind(), which triggers a page fault. Reviewed by: jeff Approved by: re Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/net/flowtable.c Modified: stable/8/sys/net/flowtable.c == --- stable/8/sys/net/flowtable.cThu Oct 22 17:36:41 2009 (r198370) +++ stable/8/sys/net/flowtable.cThu Oct 22 18:48:25 2009 (r198371) @@ -930,16 +930,20 @@ flowtable_route_flush(struct flowtable * for (i = 0; i = mp_maxid; i++) { if (CPU_ABSENT(i)) continue; - - thread_lock(curthread); - sched_bind(curthread, i); - thread_unlock(curthread); + + if (smp_started == 1) { + thread_lock(curthread); + sched_bind(curthread, i); + thread_unlock(curthread); + } flowtable_free_stale(ft, rt); - thread_lock(curthread); - sched_unbind(curthread); - thread_unlock(curthread); + if (smp_started == 1) { + thread_lock(curthread); + sched_unbind(curthread); + thread_unlock(curthread); + } } } else { flowtable_free_stale(ft, rt); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r198372 - head/sys/cam
Author: mav Date: Thu Oct 22 20:44:55 2009 New Revision: 198372 URL: http://svn.freebsd.org/changeset/base/198372 Log: cam_ccbq_fini() declared for 11 years, but never implemented. Remove it. Modified: head/sys/cam/cam_queue.h Modified: head/sys/cam/cam_queue.h == --- head/sys/cam/cam_queue.hThu Oct 22 18:48:25 2009(r198371) +++ head/sys/cam/cam_queue.hThu Oct 22 20:44:55 2009(r198372) @@ -96,8 +96,6 @@ int cam_ccbq_init(struct cam_ccbq *ccbq void cam_ccbq_free(struct cam_ccbq *ccbq); -void cam_ccbq_fini(struct cam_ccbq *ccbq); - /* * Allocate and initialize a cam_queue structure. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r198373 - head/sys/dev/usb/input
Author: thompsa Date: Thu Oct 22 20:54:01 2009 New Revision: 198373 URL: http://svn.freebsd.org/changeset/base/198373 Log: Allow dumping the USB mouse reports via 'sysctl -b dev.ums.N.parseinfo', previously only available via bootverbose. PR: usb/137191 Submitted by: Eygene Ryabinkin Modified: head/sys/dev/usb/input/ums.c Modified: head/sys/dev/usb/input/ums.c == --- head/sys/dev/usb/input/ums.cThu Oct 22 20:44:55 2009 (r198372) +++ head/sys/dev/usb/input/ums.cThu Oct 22 20:54:01 2009 (r198373) @@ -63,6 +63,7 @@ __FBSDID($FreeBSD$); #include sys/priv.h #include sys/conf.h #include sys/fcntl.h +#include sys/sbuf.h #include dev/usb/usb.h #include dev/usb/usbdi.h @@ -161,7 +162,9 @@ static usb_fifo_open_t ums_open; static usb_fifo_close_t ums_close; static usb_fifo_ioctl_t ums_ioctl; -static void ums_put_queue(struct ums_softc *sc, int32_t dx, int32_t dy, int32_t dz, int32_t dt, int32_t buttons); +static voidums_put_queue(struct ums_softc *, int32_t, int32_t, + int32_t, int32_t, int32_t); +static int ums_sysctl_handler_parseinfo(SYSCTL_HANDLER_ARGS); static struct usb_fifo_methods ums_fifo_methods = { .f_open = ums_open, @@ -643,6 +646,12 @@ ums_attach(device_t dev) if (err) { goto detach; } + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, parseinfo, CTLTYPE_STRING|CTLFLAG_RD, + sc, 0, ums_sysctl_handler_parseinfo, + , Dump UMS report parsing information); + return (0); detach: @@ -916,6 +925,67 @@ done: return (error); } +static int +ums_sysctl_handler_parseinfo(SYSCTL_HANDLER_ARGS) +{ + struct ums_softc *sc = arg1; + struct ums_info *info; + struct sbuf *sb; + int i, j, err; + + sb = sbuf_new_auto(); + for (i = 0; i UMS_INFO_MAX; i++) { + info = sc-sc_info[i]; + + /* Don't emit empty info */ + if ((info-sc_flags + (UMS_FLAG_X_AXIS | UMS_FLAG_Y_AXIS | UMS_FLAG_Z_AXIS | +UMS_FLAG_T_AXIS | UMS_FLAG_W_AXIS)) == 0 + info-sc_buttons == 0) + continue; + + sbuf_printf(sb, i%d:, i + 1); + if (info-sc_flags UMS_FLAG_X_AXIS) + sbuf_printf(sb, X:r%d, p%d, s%d;, + (int)info-sc_iid_x, + (int)info-sc_loc_x.pos, + (int)info-sc_loc_x.size); + if (info-sc_flags UMS_FLAG_Y_AXIS) + sbuf_printf(sb, Y:r%d, p%d, s%d;, + (int)info-sc_iid_y, + (int)info-sc_loc_y.pos, + (int)info-sc_loc_y.size); + if (info-sc_flags UMS_FLAG_Z_AXIS) + sbuf_printf(sb, Z:r%d, p%d, s%d;, + (int)info-sc_iid_z, + (int)info-sc_loc_z.pos, + (int)info-sc_loc_z.size); + if (info-sc_flags UMS_FLAG_T_AXIS) + sbuf_printf(sb, T:r%d, p%d, s%d;, + (int)info-sc_iid_t, + (int)info-sc_loc_t.pos, + (int)info-sc_loc_t.size); + if (info-sc_flags UMS_FLAG_W_AXIS) + sbuf_printf(sb, W:r%d, p%d, s%d;, + (int)info-sc_iid_w, + (int)info-sc_loc_w.pos, + (int)info-sc_loc_w.size); + + for (j = 0; j info-sc_buttons; j++) { + sbuf_printf(sb, B%d:r%d, p%d, s%d;, j + 1, + (int)info-sc_iid_btn[j], + (int)info-sc_loc_btn[j].pos, + (int)info-sc_loc_btn[j].size); + } + sbuf_printf(sb, \n); + } + sbuf_finish(sb); + err = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); + sbuf_delete(sb); + + return (err); +} + static devclass_t ums_devclass; static device_method_t ums_methods[] = { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r198374 - head/sys/tools
Author: emaste Date: Thu Oct 22 20:57:17 2009 New Revision: 198374 URL: http://svn.freebsd.org/changeset/base/198374 Log: Rename default to default_function, for compatibility with GNU awk. (For cross-compiling out-of-tree kernel modules, for example.) Modified: head/sys/tools/makeobjops.awk Modified: head/sys/tools/makeobjops.awk == --- head/sys/tools/makeobjops.awk Thu Oct 22 20:54:01 2009 (r198373) +++ head/sys/tools/makeobjops.awk Thu Oct 22 20:57:17 2009 (r198374) @@ -240,7 +240,7 @@ function handle_method (static, doc) lineno++ } - default = ; + default_function = ; if (!match(line, /\};?/)) { warnsrc(Premature end of file); error = 1; @@ -248,9 +248,9 @@ function handle_method (static, doc) } extra = substr(line, RSTART + RLENGTH); if (extra ~ /[ ]*DEFAULT[ ]*[a-zA-Z_][a-zA-Z_0-9]*[ ]*;/) { - default = extra; - sub(/.*DEFAULT[ ]*/, , default); - sub(/[; ]+.*$/, , default); + default_function = extra; + sub(/.*DEFAULT[ ]*/, , default_function); + sub(/[; ]+.*$/, , default_function); } else if (extra opt_d) { # Warn about garbage at end of line. @@ -294,8 +294,8 @@ function handle_method (static, doc) firstvar = varnames[1]; - if (default == ) - default = kobj_error_method; + if (default_function == ) + default_function = kobj_error_method; # the method description printh(/** @brief Unique descriptor for the umname () method */); @@ -308,7 +308,7 @@ function handle_method (static, doc) # Print out the method desc printc(struct kobj_method mname _method_default = {); - printc(\t mname _desc, (kobjop_t) default); + printc(\t mname _desc, (kobjop_t) default_function); printc(};\n); printc(struct kobjop_desc mname _desc = {); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r198375 - head/share/zoneinfo
Author: edwin Date: Thu Oct 22 20:59:51 2009 New Revision: 198375 URL: http://svn.freebsd.org/changeset/base/198375 Log: Move comments to the beginning of the line to make it look better. Thank to ru@ for his noticing of it. MFC after:1 week Modified: head/share/zoneinfo/Makefile Modified: head/share/zoneinfo/Makefile == --- head/share/zoneinfo/MakefileThu Oct 22 20:57:17 2009 (r198374) +++ head/share/zoneinfo/MakefileThu Oct 22 20:59:51 2009 (r198375) @@ -55,11 +55,11 @@ beforeinstall: ${.CURDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/ afterinstall: - @# - @# If the file /var/db/zoneinfo exists, and it is owned by root:wheel, - @# and the contents of it exists in /usr/share/zoneinfo, then reinstall - @# it. - @# +# +# If the file /var/db/zoneinfo exists, and it is owned by root:wheel, +# and the contents of it exists in /usr/share/zoneinfo, then reinstall +# it. +# @if [ -f ${DESTDIR}/var/db/zoneinfo -a -O ${DESTDIR}/var/db/zoneinfo \ -a -G ${DESTDIR}/var/db/zoneinfo ]; then \ zf=$$(cat ${DESTDIR}/var/db/zoneinfo); \ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r198376 - head/lib/libusb
Author: thompsa Date: Thu Oct 22 21:01:41 2009 New Revision: 198376 URL: http://svn.freebsd.org/changeset/base/198376 Log: Prevent wraparound of the timeout variable. Submitted by: HPS Modified: head/lib/libusb/libusb20_ugen20.c Modified: head/lib/libusb/libusb20_ugen20.c == --- head/lib/libusb/libusb20_ugen20.c Thu Oct 22 20:59:51 2009 (r198375) +++ head/lib/libusb/libusb20_ugen20.c Thu Oct 22 21:01:41 2009 (r198376) @@ -800,7 +800,11 @@ ugen20_tr_submit(struct libusb20_transfe if (xfer-flags LIBUSB20_TRANSFER_DO_CLEAR_STALL) { fsep-flags |= USB_FS_FLAG_CLEAR_STALL; } - fsep-timeout = xfer-timeout; + /* NOTE: The fsep-timeout variable is 16-bit. */ + if (xfer-timeout 65535) + fsep-timeout = 65535; + else + fsep-timeout = xfer-timeout; temp.ep_index = xfer-trIndex; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r198377 - head/sys/cam
Author: mav Date: Thu Oct 22 21:07:32 2009 New Revision: 198377 URL: http://svn.freebsd.org/changeset/base/198377 Log: After thinking again, implement cam_ccbq_fini(). This is effectively NULL change, but makes this API a bit more consistent. Modified: head/sys/cam/cam_queue.c head/sys/cam/cam_queue.h head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_queue.c == --- head/sys/cam/cam_queue.cThu Oct 22 21:01:41 2009(r198376) +++ head/sys/cam/cam_queue.cThu Oct 22 21:07:32 2009(r198377) @@ -289,7 +289,7 @@ void cam_ccbq_free(struct cam_ccbq *ccbq) { if (ccbq) { - camq_fini(ccbq-queue); + cam_ccbq_fini(ccbq); free(ccbq, M_CAMCCBQ); } } @@ -338,6 +338,13 @@ cam_ccbq_init(struct cam_ccbq *ccbq, int return (0); } +void +cam_ccbq_fini(struct cam_ccbq *ccbq) +{ + + camq_fini(ccbq-queue); +} + /* * Heap routines for manipulating CAM queues. */ Modified: head/sys/cam/cam_queue.h == --- head/sys/cam/cam_queue.hThu Oct 22 21:01:41 2009(r198376) +++ head/sys/cam/cam_queue.hThu Oct 22 21:07:32 2009(r198377) @@ -96,6 +96,8 @@ int cam_ccbq_init(struct cam_ccbq *ccbq void cam_ccbq_free(struct cam_ccbq *ccbq); +void cam_ccbq_fini(struct cam_ccbq *ccbq); + /* * Allocate and initialize a cam_queue structure. */ Modified: head/sys/cam/cam_xpt.c == --- head/sys/cam/cam_xpt.c Thu Oct 22 21:01:41 2009(r198376) +++ head/sys/cam/cam_xpt.c Thu Oct 22 21:07:32 2009(r198377) @@ -4447,7 +4447,7 @@ xpt_release_device(struct cam_eb *bus, s devq = bus-sim-devq; cam_devq_resize(devq, devq-alloc_queue.array_size - 1); camq_fini(device-drvq); - camq_fini(device-ccbq.queue); + cam_ccbq_fini(device-ccbq); free(device, M_CAMXPT); xpt_release_target(bus, target); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r198378 - in head/sys/powerpc: aim booke include powerpc
Author: nwhitehorn Date: Fri Oct 23 03:17:02 2009 New Revision: 198378 URL: http://svn.freebsd.org/changeset/base/198378 Log: Add SMP support on U3-based G5 systems. This does not yet work perfectly: at least on my Xserve, getting the decrementer and timebase on APs to tick requires setting up a clock chip over I2C, which is not yet done. While here, correct the 64-bit tlbie function to set the CPU to 64-bit mode correctly. Hardware donated by: grehan Modified: head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/aim/mp_cpudep.c head/sys/powerpc/aim/platform_chrp.c head/sys/powerpc/booke/mp_cpudep.c head/sys/powerpc/include/pcpu.h head/sys/powerpc/include/smp.h head/sys/powerpc/include/spr.h head/sys/powerpc/powerpc/cpu.c head/sys/powerpc/powerpc/mp_machdep.c Modified: head/sys/powerpc/aim/mmu_oea64.c == --- head/sys/powerpc/aim/mmu_oea64.cThu Oct 22 21:07:32 2009 (r198377) +++ head/sys/powerpc/aim/mmu_oea64.cFri Oct 23 03:17:02 2009 (r198378) @@ -182,35 +182,28 @@ va_to_vsid(pmap_t pm, vm_offset_t va) * Just to add to the fun, exceptions must be off as well * so that we can't trap in 64-bit mode. What a pain. */ +struct mtx tlbie_mutex; static __inline void TLBIE(pmap_t pmap, vm_offset_t va) { - register_t msr; - register_t scratch; - uint64_t vpn; register_t vpn_hi, vpn_lo; - -#if 1 - /* -* CPU documentation says that tlbie takes the VPN, not the -* VA. I think the code below does this correctly. We will see. -*/ + register_t msr; + register_t scratch; vpn = (uint64_t)(va ADDR_PIDX); if (pmap != NULL) vpn |= (va_to_vsid(pmap,va) 28); -#else - vpn = va; -#endif vpn_hi = (uint32_t)(vpn 32); vpn_lo = (uint32_t)vpn; + mtx_lock_spin(tlbie_mutex); __asm __volatile(\ mfmsr %0; \ clrldi %1,%0,49; \ - insrdi %1,1,1,0; \ + mtmsr %1; \ + insrdi %1,%5,1,0; \ mtmsrd %1; \ ptesync; \ \ @@ -222,7 +215,8 @@ TLBIE(pmap_t pmap, vm_offset_t va) { eieio; \ tlbsync; \ ptesync; - : =r(msr), =r(scratch) : r(vpn_hi), r(vpn_lo), r(32)); + : =r(msr), =r(scratch) : r(vpn_hi), r(vpn_lo), r(32), r(1)); + mtx_unlock_spin(tlbie_mutex); } #define DISABLE_TRANS(msr) msr = mfmsr(); mtmsr(msr ~PSL_DR); isync() @@ -352,7 +346,7 @@ static int moea64_pte_insert(u_int, str * PVO calls. */ static int moea64_pvo_enter(pmap_t, uma_zone_t, struct pvo_head *, - vm_offset_t, vm_offset_t, uint64_t, int, int); + vm_offset_t, vm_offset_t, uint64_t, int); static voidmoea64_pvo_remove(struct pvo_entry *, int); static struct pvo_entry *moea64_pvo_find_va(pmap_t, vm_offset_t, int *); static struct lpte *moea64_pvo_to_pte(const struct pvo_entry *, int); @@ -825,6 +819,11 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o MTX_RECURSE); /* +* Initialize the TLBIE lock. TLBIE can only be executed by one CPU. +*/ + mtx_init(tlbie_mutex, tlbie mutex, NULL, MTX_SPIN); + + /* * Initialise the unmanaged pvo pool. */ moea64_bpvo_pool = (struct pvo_entry *)moea64_bootstrap_alloc( @@ -1254,7 +1253,7 @@ moea64_enter_locked(pmap_t pmap, vm_offs pvo_flags |= PVO_FAKE; error = moea64_pvo_enter(pmap, zone, pvo_head, va, VM_PAGE_TO_PHYS(m), - pte_lo, pvo_flags, 0); + pte_lo, pvo_flags); if (pmap == kernel_pmap) TLBIE(pmap, va); @@ -1427,16 +1426,15 @@ moea64_uma_page_alloc(uma_zone_t zone, i if (pvo_allocator_start = pvo_allocator_end) panic(Ran out of PVO allocator buffer space!); - /* Now call pvo_enter in recursive mode */ moea64_pvo_enter(kernel_pmap, moea64_upvo_zone, moea64_pvo_kunmanaged, va, VM_PAGE_TO_PHYS(m), LPTE_M, - PVO_WIRED | PVO_BOOTSTRAP, 1); + PVO_WIRED | PVO_BOOTSTRAP); TLBIE(kernel_pmap, va); - + if (needed_lock) PMAP_UNLOCK(kernel_pmap); - + if ((wait M_ZERO) (m-flags PG_ZERO) == 0) bzero((void *)va, PAGE_SIZE); @@ -1579,7 +1577,7 @@ moea64_kenter(mmu_t mmu, vm_offset_t va, PMAP_LOCK(kernel_pmap); error = moea64_pvo_enter(kernel_pmap, moea64_upvo_zone, moea64_pvo_kunmanaged, va, pa, pte_lo, - PVO_WIRED | VM_PROT_EXECUTE, 0); + PVO_WIRED | VM_PROT_EXECUTE); TLBIE(kernel_pmap, va); @@ -1968,14 +1966,29 @@ static void tlbia(void) { vm_offset_t i; + register_t msr, scratch; - for (i = 0; i 0xFF000; i += 0x1000) - TLBIE(NULL,i); + for (i = 0; i 0xFF000;
Re: svn commit: r198376 - head/lib/libusb
Hi, Any chance that we can get it into 8.0 too? This fix printing with print/hplip3, which is probably what most people with multi-function HP printers will use. John -- John Hay -- j...@meraka.csir.co.za / j...@freebsd.org On Thu, Oct 22, 2009 at 09:01:41PM +, Andrew Thompson wrote: Author: thompsa Date: Thu Oct 22 21:01:41 2009 New Revision: 198376 URL: http://svn.freebsd.org/changeset/base/198376 Log: Prevent wraparound of the timeout variable. Submitted by: HPS Modified: head/lib/libusb/libusb20_ugen20.c Modified: head/lib/libusb/libusb20_ugen20.c == --- head/lib/libusb/libusb20_ugen20.c Thu Oct 22 20:59:51 2009 (r198375) +++ head/lib/libusb/libusb20_ugen20.c Thu Oct 22 21:01:41 2009 (r198376) @@ -800,7 +800,11 @@ ugen20_tr_submit(struct libusb20_transfe if (xfer-flags LIBUSB20_TRANSFER_DO_CLEAR_STALL) { fsep-flags |= USB_FS_FLAG_CLEAR_STALL; } - fsep-timeout = xfer-timeout; + /* NOTE: The fsep-timeout variable is 16-bit. */ + if (xfer-timeout 65535) + fsep-timeout = 65535; + else + fsep-timeout = xfer-timeout; temp.ep_index = xfer-trIndex; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r198378 - in head/sys/powerpc: aim booke include powerpc
On Oct 22, 2009, at 8:17 PM, Nathan Whitehorn wrote: Author: nwhitehorn Date: Fri Oct 23 03:17:02 2009 New Revision: 198378 URL: http://svn.freebsd.org/changeset/base/198378 Log: Add SMP support on U3-based G5 systems. Yay! -- Marcel Moolenaar xcl...@mac.com ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org