svn commit: r234565 - head/share/man/man4
Author: delphij Date: Sun Apr 22 07:42:44 2012 New Revision: 234565 URL: http://svn.freebsd.org/changeset/base/234565 Log: Use 10.0 instead of 10 for FreeBSD version number. The latter undefined. Modified: head/share/man/man4/carp.4 Modified: head/share/man/man4/carp.4 == --- head/share/man/man4/carp.4 Sun Apr 22 04:36:25 2012(r234564) +++ head/share/man/man4/carp.4 Sun Apr 22 07:42:44 2012(r234565) @@ -26,7 +26,7 @@ .\ .\ $FreeBSD$ .\ -.Dd January 26, 2012 +.Dd April 22, 2012 .Dt CARP 4 .Os .Sh NAME @@ -295,7 +295,7 @@ The device was imported into .Fx 5.4 . In -.Fx 10 +.Fx 10.0 the .Nm was significantly rewritten, and is no longer a pseudo-interface. ___ 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: r234566 - head/cddl/contrib/opensolaris/cmd/zfs
Author: delphij Date: Sun Apr 22 07:50:24 2012 New Revision: 234566 URL: http://svn.freebsd.org/changeset/base/234566 Log: - Correct a typo which prevents 'lzjb' be displayed; - Use quotes when tab is used. Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 == --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Apr 22 07:42:44 2012 (r234565) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Apr 22 07:50:24 2012 (r234566) @@ -24,7 +24,7 @@ .\ .\ $FreeBSD$ .\ -.Dd February 26, 2012 +.Dd April 22, 2012 .Dt ZFS 8 .Os .Sh NAME @@ -833,7 +833,7 @@ disables integrity checking on user data a recommended practice. .It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | Cm zle Controls the compression algorithm used for this dataset. The -.CM lzjb +.Cm lzjb compression algorithm is optimized for performance while providing decent data compression. Setting compression to .Cm on @@ -1275,11 +1275,11 @@ for legacy mounts or the command for normal file systems, its mount options are set according to its properties. The correlation between properties and mount options is as follows: .Bl -column -offset 4n PROPERTY MOUNT OPTION -.It PROPERTY MOUNT OPTION -.It atime atime/noatime -.It exec exec/noexec -.It readonly ro/rw -.It setuid suid/nosuid +.It PROPERTY MOUNT OPTION +.It atime atime/noatime +.It exec exec/noexec +.It readonly ro/rw +.It setuidsuid/nosuid .El .Pp In addition, these options can be set on a per-mount basis using the ___ 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: r234567 - head/lib/libc/sys
Author: delphij Date: Sun Apr 22 07:51:49 2012 New Revision: 234567 URL: http://svn.freebsd.org/changeset/base/234567 Log: - Use quote when tab is used; - Follow the same macros used in device driver manual pages. Modified: head/lib/libc/sys/setfib.2 Modified: head/lib/libc/sys/setfib.2 == --- head/lib/libc/sys/setfib.2 Sun Apr 22 07:50:24 2012(r234566) +++ head/lib/libc/sys/setfib.2 Sun Apr 22 07:51:49 2012(r234567) @@ -51,8 +51,9 @@ may be retrieved by the .Va net.fibs sysctl. The system maximum is set in the kernel configuration file with -.Pp -.Dl optionsROUTETABLES= Ns Em N +.Bd -ragged -offset indent +.Cd options ROUTETABLES= Ns Em N +.Ed .Pp or in .Pa /boot/loader.conf ___ 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: r234568 - head/usr.bin/rctl
Author: delphij Date: Sun Apr 22 07:55:56 2012 New Revision: 234568 URL: http://svn.freebsd.org/changeset/base/234568 Log: The .Fx macro needs the version number be in its own word separated by a space. This change have no visible effect for rendering. Modified: head/usr.bin/rctl/rctl.8 Modified: head/usr.bin/rctl/rctl.8 == --- head/usr.bin/rctl/rctl.8Sun Apr 22 07:51:49 2012(r234567) +++ head/usr.bin/rctl/rctl.8Sun Apr 22 07:55:56 2012(r234568) @@ -186,7 +186,7 @@ Display all the rules applicable to proc The .Nm command appeared in -.Fx 9.0. +.Fx 9.0 . .Sh AUTHORS .An -nosplit The ___ 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: r234549 - head/share/mk
On Sat, 21 Apr 2012, Warner Losh wrote: Log: Fix partially merged patch from my external compiler tree in r234546. Define NM except when we're in strict POSIX mode. Modified: head/share/mk/sys.mk Modified: head/share/mk/sys.mk == --- head/share/mk/sys.mkSat Apr 21 16:27:50 2012(r234548) +++ head/share/mk/sys.mkSat Apr 21 17:45:40 2012(r234549) @@ -141,6 +141,10 @@ YFLAGS ?= YFLAGS ?= -d .endif +.if !defined(%POSIX) +NM ?= nm +.endif + .if defined(%POSIX) # Posix 1003.2 mandated rules Any chance of defining NM in order? The existing list was sorted except for RANLIB being grouped with AR, CPP after CXX*, LD after LEX, LINTL* after LINTO* (flags are grouped with commands so the combined sorting is not fully alphabetical). Only NM is totally disordered (added at the end instead of inserted). The unsorted macros are associated with more namespace pollution than the sorted ones. Bruce ___ 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: r234569 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src lib/libc/gen
Author: jasone Date: Sun Apr 22 08:49:13 2012 New Revision: 234569 URL: http://svn.freebsd.org/changeset/base/234569 Log: Import jemalloc a8f8d7540d66ddee7337db80c92890916e1063ca (dev branch, prior to 3.0.0 release). This fixes several bugs related to memory initialization. Mangle __jemalloc_a0{malloc,calloc,free}() just like all the other library-internal symbols in jemalloc, and adjust the tls allocation code in libc to use the mangled names. Modified: head/contrib/jemalloc/ChangeLog head/contrib/jemalloc/FREEBSD-diffs head/contrib/jemalloc/VERSION head/contrib/jemalloc/doc/jemalloc.3 head/contrib/jemalloc/include/jemalloc/internal/chunk.h head/contrib/jemalloc/include/jemalloc/internal/chunk_mmap.h head/contrib/jemalloc/include/jemalloc/internal/private_namespace.h head/contrib/jemalloc/include/jemalloc/internal/tsd.h head/contrib/jemalloc/include/jemalloc/jemalloc.h head/contrib/jemalloc/src/chunk.c head/contrib/jemalloc/src/chunk_dss.c head/contrib/jemalloc/src/chunk_mmap.c head/contrib/jemalloc/src/huge.c head/contrib/jemalloc/src/jemalloc.c head/lib/libc/gen/tls.c Modified: head/contrib/jemalloc/ChangeLog == --- head/contrib/jemalloc/ChangeLog Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/ChangeLog Sun Apr 22 08:49:13 2012 (r234569) @@ -70,6 +70,8 @@ found in the git revision history: invalid statistics and crashes. - Work around TLS dallocation via free() on Linux. This bug could cause write-after-free memory corruption. + - Fix chunk_alloc_dss() to stop claiming memory is zeroed. This bug could +cause memory corruption and crashes with --enable-dss specified. - Fix malloc_stats_print() to honor 'b' and 'l' in the opts parameter. - Fix realloc(p, 0) to act like free(p). - Do not enforce minimum alignment in memalign(). Modified: head/contrib/jemalloc/FREEBSD-diffs == --- head/contrib/jemalloc/FREEBSD-diffs Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/FREEBSD-diffs Sun Apr 22 08:49:13 2012 (r234569) @@ -1,5 +1,5 @@ diff --git a/doc/jemalloc.xml.in b/doc/jemalloc.xml.in -index f78f423..ce6df80 100644 +index e8a5722..cec85b5 100644 --- a/doc/jemalloc.xml.in +++ b/doc/jemalloc.xml.in @@ -51,12 +51,23 @@ @@ -82,17 +82,10 @@ index 8837ef5..d7133f4 100644 bool malloc_mutex_init(malloc_mutex_t *mutex); diff --git a/include/jemalloc/internal/private_namespace.h b/include/jemalloc/internal/private_namespace.h -index 15fe3c5..be94eb8 100644 +index bb1b63e..00eb169 100644 --- a/include/jemalloc/internal/private_namespace.h +++ b/include/jemalloc/internal/private_namespace.h -@@ -1,6 +1,3 @@ --#define a0calloc JEMALLOC_N(a0calloc) --#define a0free JEMALLOC_N(a0free) --#define a0malloc JEMALLOC_N(a0malloc) - #define arena_alloc_junk_small JEMALLOC_N(arena_alloc_junk_small) - #define arena_bin_index JEMALLOC_N(arena_bin_index) - #define arena_bin_info JEMALLOC_N(arena_bin_info) -@@ -167,7 +164,6 @@ +@@ -165,7 +165,6 @@ #define iqalloc JEMALLOC_N(iqalloc) #define iralloc JEMALLOC_N(iralloc) #define isalloc JEMALLOC_N(isalloc) @@ -195,7 +188,7 @@ index 000..2c5797f +#define pthread_mutex_lock _pthread_mutex_lock +#define pthread_mutex_unlock_pthread_mutex_unlock diff --git a/src/jemalloc.c b/src/jemalloc.c -index 00c2b23..729f4e1 100644 +index f9c8916..8e24a5a 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -8,6 +8,9 @@ malloc_tsd_data(, arenas, arena_t *, NULL) Modified: head/contrib/jemalloc/VERSION == --- head/contrib/jemalloc/VERSION Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/VERSION Sun Apr 22 08:49:13 2012 (r234569) @@ -1 +1 @@ -1.0.0-283-g606f1fdc3cdbc700717133ca56685313caea24bb +1.0.0-286-ga8f8d7540d66ddee7337db80c92890916e1063ca Modified: head/contrib/jemalloc/doc/jemalloc.3 == --- head/contrib/jemalloc/doc/jemalloc.3Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/doc/jemalloc.3Sun Apr 22 08:49:13 2012 (r234569) @@ -2,12 +2,12 @@ .\ Title: JEMALLOC .\Author: Jason Evans .\ Generator: DocBook XSL Stylesheets v1.76.1 http://docbook.sf.net/ -.\ Date: 04/20/2012 +.\ Date: 04/21/2012 .\Manual: User Manual -.\Source: jemalloc 1.0.0-283-g606f1fdc3cdbc700717133ca56685313caea24bb +.\Source: jemalloc 1.0.0-286-ga8f8d7540d66ddee7337db80c92890916e1063ca .\ Language: English .\ -.TH JEMALLOC 3 04/20/2012 jemalloc 1.0.0-283-g606f1fdc3c User Manual +.TH JEMALLOC 3 04/21/2012 jemalloc 1.0.0-286-ga8f8d7540d User Manual .\
svn commit: r234570 - in stable/9/sys/dev: ipw iwi iwn wpi
Author: bschmidt Date: Sun Apr 22 09:19:10 2012 New Revision: 234570 URL: http://svn.freebsd.org/changeset/base/234570 Log: MFC r233387: Use suspend/resume methods provided by net80211. This ensures that the appropriate state handling takes place, not doing so results in the device doing nothing until manual intervention. Modified: stable/9/sys/dev/ipw/if_ipw.c stable/9/sys/dev/iwi/if_iwi.c stable/9/sys/dev/iwn/if_iwn.c stable/9/sys/dev/wpi/if_wpi.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/ipw/if_ipw.c == --- stable/9/sys/dev/ipw/if_ipw.c Sun Apr 22 08:49:13 2012 (r234569) +++ stable/9/sys/dev/ipw/if_ipw.c Sun Apr 22 09:19:10 2012 (r234570) @@ -835,9 +835,9 @@ static int ipw_suspend(device_t dev) { struct ipw_softc *sc = device_get_softc(dev); + struct ieee80211com *ic = sc-sc_ifp-if_l2com; - ipw_stop(sc); - + ieee80211_suspend_all(ic); return 0; } @@ -845,13 +845,11 @@ static int ipw_resume(device_t dev) { struct ipw_softc *sc = device_get_softc(dev); - struct ifnet *ifp = sc-sc_ifp; + struct ieee80211com *ic = sc-sc_ifp-if_l2com; pci_write_config(dev, 0x41, 0, 1); - if (ifp-if_flags IFF_UP) - ipw_init(sc); - + ieee80211_resume_all(ic); return 0; } Modified: stable/9/sys/dev/iwi/if_iwi.c == --- stable/9/sys/dev/iwi/if_iwi.c Sun Apr 22 08:49:13 2012 (r234569) +++ stable/9/sys/dev/iwi/if_iwi.c Sun Apr 22 09:19:10 2012 (r234570) @@ -863,9 +863,9 @@ static int iwi_suspend(device_t dev) { struct iwi_softc *sc = device_get_softc(dev); + struct ieee80211com *ic = sc-sc_ifp-if_l2com; - iwi_stop(sc); - + ieee80211_suspend_all(ic); return 0; } @@ -873,13 +873,11 @@ static int iwi_resume(device_t dev) { struct iwi_softc *sc = device_get_softc(dev); - struct ifnet *ifp = sc-sc_ifp; + struct ieee80211com *ic = sc-sc_ifp-if_l2com; pci_write_config(dev, 0x41, 0, 1); - if (ifp-if_flags IFF_UP) - iwi_init(sc); - + ieee80211_resume_all(ic); return 0; } Modified: stable/9/sys/dev/iwn/if_iwn.c == --- stable/9/sys/dev/iwn/if_iwn.c Sun Apr 22 08:49:13 2012 (r234569) +++ stable/9/sys/dev/iwn/if_iwn.c Sun Apr 22 09:19:10 2012 (r234570) @@ -947,13 +947,9 @@ static int iwn_suspend(device_t dev) { struct iwn_softc *sc = device_get_softc(dev); - struct ifnet *ifp = sc-sc_ifp; - struct ieee80211com *ic = ifp-if_l2com; - struct ieee80211vap *vap = TAILQ_FIRST(ic-ic_vaps); + struct ieee80211com *ic = sc-sc_ifp-if_l2com; - iwn_stop(sc); - if (vap != NULL) - ieee80211_stop(vap); + ieee80211_suspend_all(ic); return 0; } @@ -961,20 +957,12 @@ static int iwn_resume(device_t dev) { struct iwn_softc *sc = device_get_softc(dev); - struct ifnet *ifp = sc-sc_ifp; - struct ieee80211com *ic = ifp-if_l2com; - struct ieee80211vap *vap = TAILQ_FIRST(ic-ic_vaps); + struct ieee80211com *ic = sc-sc_ifp-if_l2com; /* Clear device-specific PCI retry timeout register (41h). */ pci_write_config(dev, 0x41, 0, 1); - if (ifp-if_flags IFF_UP) { - iwn_init(sc); - if (vap != NULL) - ieee80211_init(vap); - if (ifp-if_drv_flags IFF_DRV_RUNNING) - iwn_start(ifp); - } + ieee80211_resume_all(ic); return 0; } Modified: stable/9/sys/dev/wpi/if_wpi.c == --- stable/9/sys/dev/wpi/if_wpi.c Sun Apr 22 08:49:13 2012 (r234569) +++ stable/9/sys/dev/wpi/if_wpi.c Sun Apr 22 09:19:10 2012 (r234570) @@ -1218,8 +1218,9 @@ static int wpi_suspend(device_t dev) { struct wpi_softc *sc = device_get_softc(dev); + struct ieee80211com *ic = sc-sc_ifp-if_l2com; - wpi_stop(sc); + ieee80211_suspend_all(ic); return 0; } @@ -1227,15 +1228,11 @@ static int wpi_resume(device_t dev) { struct wpi_softc *sc = device_get_softc(dev); - struct ifnet *ifp = sc-sc_ifp; + struct ieee80211com *ic = sc-sc_ifp-if_l2com; pci_write_config(dev, 0x41, 0, 1); - if (ifp-if_flags IFF_UP) { - wpi_init(ifp-if_softc); - if (ifp-if_drv_flags IFF_DRV_RUNNING) - wpi_start(ifp); - } + ieee80211_resume_all(ic); return 0; } ___ svn-src-all@freebsd.org mailing list
svn commit: r234571 - in stable/8/sys/dev: ipw iwi iwn wpi
Author: bschmidt Date: Sun Apr 22 09:19:19 2012 New Revision: 234571 URL: http://svn.freebsd.org/changeset/base/234571 Log: MFC r233387: Use suspend/resume methods provided by net80211. This ensures that the appropriate state handling takes place, not doing so results in the device doing nothing until manual intervention. Modified: stable/8/sys/dev/ipw/if_ipw.c stable/8/sys/dev/iwi/if_iwi.c stable/8/sys/dev/iwn/if_iwn.c stable/8/sys/dev/wpi/if_wpi.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/ipw/if_ipw.c == --- stable/8/sys/dev/ipw/if_ipw.c Sun Apr 22 09:19:10 2012 (r234570) +++ stable/8/sys/dev/ipw/if_ipw.c Sun Apr 22 09:19:19 2012 (r234571) @@ -833,9 +833,9 @@ static int ipw_suspend(device_t dev) { struct ipw_softc *sc = device_get_softc(dev); + struct ieee80211com *ic = sc-sc_ifp-if_l2com; - ipw_stop(sc); - + ieee80211_suspend_all(ic); return 0; } @@ -843,13 +843,11 @@ static int ipw_resume(device_t dev) { struct ipw_softc *sc = device_get_softc(dev); - struct ifnet *ifp = sc-sc_ifp; + struct ieee80211com *ic = sc-sc_ifp-if_l2com; pci_write_config(dev, 0x41, 0, 1); - if (ifp-if_flags IFF_UP) - ipw_init(sc); - + ieee80211_resume_all(ic); return 0; } Modified: stable/8/sys/dev/iwi/if_iwi.c == --- stable/8/sys/dev/iwi/if_iwi.c Sun Apr 22 09:19:10 2012 (r234570) +++ stable/8/sys/dev/iwi/if_iwi.c Sun Apr 22 09:19:19 2012 (r234571) @@ -861,9 +861,9 @@ static int iwi_suspend(device_t dev) { struct iwi_softc *sc = device_get_softc(dev); + struct ieee80211com *ic = sc-sc_ifp-if_l2com; - iwi_stop(sc); - + ieee80211_suspend_all(ic); return 0; } @@ -871,13 +871,11 @@ static int iwi_resume(device_t dev) { struct iwi_softc *sc = device_get_softc(dev); - struct ifnet *ifp = sc-sc_ifp; + struct ieee80211com *ic = sc-sc_ifp-if_l2com; pci_write_config(dev, 0x41, 0, 1); - if (ifp-if_flags IFF_UP) - iwi_init(sc); - + ieee80211_resume_all(ic); return 0; } Modified: stable/8/sys/dev/iwn/if_iwn.c == --- stable/8/sys/dev/iwn/if_iwn.c Sun Apr 22 09:19:10 2012 (r234570) +++ stable/8/sys/dev/iwn/if_iwn.c Sun Apr 22 09:19:19 2012 (r234571) @@ -958,13 +958,9 @@ static int iwn_suspend(device_t dev) { struct iwn_softc *sc = device_get_softc(dev); - struct ifnet *ifp = sc-sc_ifp; - struct ieee80211com *ic = ifp-if_l2com; - struct ieee80211vap *vap = TAILQ_FIRST(ic-ic_vaps); + struct ieee80211com *ic = sc-sc_ifp-if_l2com; - iwn_stop(sc); - if (vap != NULL) - ieee80211_stop(vap); + ieee80211_suspend_all(ic); return 0; } @@ -972,20 +968,12 @@ static int iwn_resume(device_t dev) { struct iwn_softc *sc = device_get_softc(dev); - struct ifnet *ifp = sc-sc_ifp; - struct ieee80211com *ic = ifp-if_l2com; - struct ieee80211vap *vap = TAILQ_FIRST(ic-ic_vaps); + struct ieee80211com *ic = sc-sc_ifp-if_l2com; /* Clear device-specific PCI retry timeout register (41h). */ pci_write_config(dev, 0x41, 0, 1); - if (ifp-if_flags IFF_UP) { - iwn_init(sc); - if (vap != NULL) - ieee80211_init(vap); - if (ifp-if_drv_flags IFF_DRV_RUNNING) - iwn_start(ifp); - } + ieee80211_resume_all(ic); return 0; } Modified: stable/8/sys/dev/wpi/if_wpi.c == --- stable/8/sys/dev/wpi/if_wpi.c Sun Apr 22 09:19:10 2012 (r234570) +++ stable/8/sys/dev/wpi/if_wpi.c Sun Apr 22 09:19:19 2012 (r234571) @@ -1216,8 +1216,9 @@ static int wpi_suspend(device_t dev) { struct wpi_softc *sc = device_get_softc(dev); + struct ieee80211com *ic = sc-sc_ifp-if_l2com; - wpi_stop(sc); + ieee80211_suspend_all(ic); return 0; } @@ -1225,15 +1226,11 @@ static int wpi_resume(device_t dev) { struct wpi_softc *sc = device_get_softc(dev); - struct ifnet *ifp = sc-sc_ifp; + struct ieee80211com *ic = sc-sc_ifp-if_l2com; pci_write_config(dev, 0x41, 0, 1); - if (ifp-if_flags IFF_UP) { - wpi_init(ifp-if_softc); - if (ifp-if_drv_flags IFF_DRV_RUNNING) - wpi_start(ifp); - } + ieee80211_resume_all(ic); return 0; } ___ svn-src-all@freebsd.org mailing list
svn commit: r234572 - head/sys/net
Author: melifaro Date: Sun Apr 22 16:13:23 2012 New Revision: 234572 URL: http://svn.freebsd.org/changeset/base/234572 Log: Do not require radix write lock to be held while dumping route table via sysctl(4) interface. This permits router not to stop forwarding packets while route table is being written to user-supplied buffer. Reported by:Pawel Tyll pt...@nitronet.pl Approved by:kib(mentor) MFC after: 1 week Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c == --- head/sys/net/rtsock.c Sun Apr 22 09:19:19 2012(r234571) +++ head/sys/net/rtsock.c Sun Apr 22 16:13:23 2012(r234572) @@ -1884,10 +1884,10 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) for (error = 0; error == 0 i = lim; i++) { rnh = rt_tables_get_rnh(req-td-td_proc-p_fibnum, i); if (rnh != NULL) { - RADIX_NODE_HEAD_LOCK(rnh); + RADIX_NODE_HEAD_RLOCK(rnh); error = rnh-rnh_walktree(rnh, sysctl_dumpentry, w); - RADIX_NODE_HEAD_UNLOCK(rnh); + RADIX_NODE_HEAD_RUNLOCK(rnh); } else if (af != 0) error = EAFNOSUPPORT; } ___ 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: r234573 - head/include/xlocale
Author: theraven Date: Sun Apr 22 16:58:14 2012 New Revision: 234573 URL: http://svn.freebsd.org/changeset/base/234573 Log: Fix a bug caused by some misplaced brackets. Reported by: das Modified: head/include/xlocale/_ctype.h Modified: head/include/xlocale/_ctype.h == --- head/include/xlocale/_ctype.h Sun Apr 22 16:13:23 2012 (r234572) +++ head/include/xlocale/_ctype.h Sun Apr 22 16:58:14 2012 (r234573) @@ -78,8 +78,8 @@ __maskrune_l(__ct_rune_t __c, unsigned l { int __limit; _RuneLocale *runes = __runes_for_locale(__loc, __limit); - return (__c 0 || __c = _CACHED_RUNES) ? ___runetype_l(__c, __loc) : - runes-__runetype[__c] __f; + return ((__c 0 || __c = _CACHED_RUNES) ? ___runetype_l(__c, __loc) : + runes-__runetype[__c]) __f; } _XLOCALE_INLINE int ___ 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: r234574 - head/sys/netgraph
Author: melifaro Date: Sun Apr 22 17:00:52 2012 New Revision: 234574 URL: http://svn.freebsd.org/changeset/base/234574 Log: Fix panic in ng_patch(4) caused by checksum flags being added to mbuf flags. Tested by:Maxim Ignatenko gelraen...@gmail.com Approved by: kib(mentor) MFC after:3 days Modified: head/sys/netgraph/ng_patch.c Modified: head/sys/netgraph/ng_patch.c == --- head/sys/netgraph/ng_patch.cSun Apr 22 16:58:14 2012 (r234573) +++ head/sys/netgraph/ng_patch.cSun Apr 22 17:00:52 2012 (r234574) @@ -517,7 +517,7 @@ ng_patch_rcvdata(hook_p hook, item_p ite return (ENOMEM); } do_patch(priv, m); - m-m_flags |= priv-config-csum_flags; + m-m_pkthdr.csum_flags |= priv-config-csum_flags; } target = NULL; ___ 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: r234482 - in head/sys: fs/msdosfs fs/nfsserver kern sys
On Fri, Apr 20, 2012 at 06:50:44AM +, Kirk McKusick wrote: Author: mckusick Date: Fri Apr 20 06:50:44 2012 New Revision: 234482 URL: http://svn.freebsd.org/changeset/base/234482 Log: This change creates a new list of active vnodes associated with a mount point. Active vnodes are those with a non-zero use or hold count, e.g., those vnodes that are not on the free list. Note that this list is in addition to the list of all the vnodes associated with a mount point. To avoid adding another set of linkage pointers to the vnode structure, the active list uses the existing linkage pointers used by the free list (previously named v_freelist, now renamed v_actfreelist). This update adds the MNT_VNODE_FOREACH_ACTIVE interface that loops over just the active vnodes associated with a mount point (typically less than 1% of the vnodes associated with the mount point). [...] @@ -1099,6 +1128,14 @@ insmntque1(struct vnode *vp, struct moun VNASSERT(mp-mnt_nvnodelistsize = 0, vp, (neg mount point vnode list size)); mp-mnt_nvnodelistsize++; + KASSERT((vp-v_iflag VI_ACTIVE) == 0, + (Activating already active vnode)); + vp-v_iflag |= VI_ACTIVE; + mtx_lock(vnode_free_list_mtx); + TAILQ_INSERT_HEAD(mp-mnt_activevnodelist, vp, v_actfreelist); + mp-mnt_activevnodelistsize++; + mtx_unlock(vnode_free_list_mtx); + VI_UNLOCK(vp); MNT_IUNLOCK(mp); return (0); } Now, for every vnode that is activated, it has to go through global mutex, which seems like scalability issue to me. With ZFS it is typical to have a lot of file systems and this global mutex was not needed before (well, it was needed, but only to get vnode from the free list). If we require vnode interlock to be held during v_actfreelist manipulation then why can't we use interlock+vnode_free_list_mtx when operating on the free list and interlock+per-mountpoint-lock when operating on mnt_activevnodelist? -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl pgpyXxZjtbdMw.pgp Description: PGP signature
svn commit: r234575 - head/share/mk
Author: imp Date: Sun Apr 22 17:14:11 2012 New Revision: 234575 URL: http://svn.freebsd.org/changeset/base/234575 Log: Sort nm in order. Submitted by: bde Modified: head/share/mk/sys.mk Modified: head/share/mk/sys.mk == --- head/share/mk/sys.mkSun Apr 22 17:00:52 2012(r234574) +++ head/share/mk/sys.mkSun Apr 22 17:14:11 2012(r234575) @@ -123,6 +123,10 @@ LINTLIBFLAGS ?= -cghapbxu -C ${LIB} MAKE ?= make +.if !defined(%POSIX) +NM ?= nm +.endif + OBJC ?= cc OBJCFLAGS ?= ${OBJCINCLUDES} ${CFLAGS} -Wno-import @@ -141,10 +145,6 @@ YFLAGS ?= YFLAGS ?= -d .endif -.if !defined(%POSIX) -NM ?= nm -.endif - .if defined(%POSIX) # Posix 1003.2 mandated rules ___ 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: r234549 - head/share/mk
On Apr 22, 2012, at 2:35 AM, Bruce Evans wrote: On Sat, 21 Apr 2012, Warner Losh wrote: Log: Fix partially merged patch from my external compiler tree in r234546. Define NM except when we're in strict POSIX mode. Modified: head/share/mk/sys.mk Modified: head/share/mk/sys.mk == --- head/share/mk/sys.mk Sat Apr 21 16:27:50 2012(r234548) +++ head/share/mk/sys.mk Sat Apr 21 17:45:40 2012(r234549) @@ -141,6 +141,10 @@ YFLAGS ?= YFLAGS ?= -d .endif +.if !defined(%POSIX) +NM ?= nm +.endif + .if defined(%POSIX) # Posix 1003.2 mandated rules Any chance of defining NM in order? The existing list was sorted except for RANLIB being grouped with AR, CPP after CXX*, LD after LEX, LINTL* after LINTO* (flags are grouped with commands so the combined sorting is not fully alphabetical). Only NM is totally disordered (added at the end instead of inserted). The unsorted macros are associated with more namespace pollution than the sorted ones. Yea, I added NM quickly after I discovered I'd forgotten it when I converted the bare nm's in libgcc. Since my external cc tree was different, I did this by hand. In that tree, it was sorted... But I've gone ahead and moved it until I can get the external compiler stuff committed. Warner___ 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: r234576 - in head/sys: powerpc/aim vm
Author: nwhitehorn Date: Sun Apr 22 17:58:30 2012 New Revision: 234576 URL: http://svn.freebsd.org/changeset/base/234576 Log: Avoid a lock order reversal in pmap_extract_and_hold() from relocking the page. This PMAP requires an additional lock besides the PMAP lock in pmap_extract_and_hold(), which vm_page_pa_tryrelock() did not release. Suggested by: kib MFC after:4 days Modified: head/sys/powerpc/aim/mmu_oea64.c head/sys/vm/vm_page.c Modified: head/sys/powerpc/aim/mmu_oea64.c == --- head/sys/powerpc/aim/mmu_oea64.cSun Apr 22 17:14:11 2012 (r234575) +++ head/sys/powerpc/aim/mmu_oea64.cSun Apr 22 17:58:30 2012 (r234576) @@ -1333,6 +1333,37 @@ moea64_extract(mmu_t mmu, pmap_t pm, vm_ * pmap and virtual address pair if that mapping permits the given * protection. */ + +extern int pa_tryrelock_restart; + +static int +vm_page_pa_tryrelock_moea64(pmap_t pmap, vm_paddr_t pa, vm_paddr_t *locked) +{ + /* +* This is a duplicate of vm_page_pa_tryrelock(), but with proper +* handling of the table lock +*/ + vm_paddr_t lockpa; + + lockpa = *locked; + *locked = pa; + if (lockpa) { + PA_LOCK_ASSERT(lockpa, MA_OWNED); + if (PA_LOCKPTR(pa) == PA_LOCKPTR(lockpa)) + return (0); + PA_UNLOCK(lockpa); + } + if (PA_TRYLOCK(pa)) + return (0); + UNLOCK_TABLE_RD(); + PMAP_UNLOCK(pmap); + atomic_add_int(pa_tryrelock_restart, 1); + PA_LOCK(pa); + LOCK_TABLE_RD(); + PMAP_LOCK(pmap); + return (EAGAIN); +} + vm_page_t moea64_extract_and_hold(mmu_t mmu, pmap_t pmap, vm_offset_t va, vm_prot_t prot) { @@ -1349,7 +1380,7 @@ retry: if (pvo != NULL (pvo-pvo_pte.lpte.pte_hi LPTE_VALID) ((pvo-pvo_pte.lpte.pte_lo LPTE_PP) == LPTE_RW || (prot VM_PROT_WRITE) == 0)) { - if (vm_page_pa_tryrelock(pmap, + if (vm_page_pa_tryrelock_moea64(pmap, pvo-pvo_pte.lpte.pte_lo LPTE_RPGN, pa)) goto retry; m = PHYS_TO_VM_PAGE(pvo-pvo_pte.lpte.pte_lo LPTE_RPGN); Modified: head/sys/vm/vm_page.c == --- head/sys/vm/vm_page.c Sun Apr 22 17:14:11 2012(r234575) +++ head/sys/vm/vm_page.c Sun Apr 22 17:58:30 2012(r234576) @@ -131,7 +131,7 @@ TUNABLE_INT(vm.boot_pages, boot_pages SYSCTL_INT(_vm, OID_AUTO, boot_pages, CTLFLAG_RD, boot_pages, 0, number of pages allocated for bootstrapping the VM system); -static int pa_tryrelock_restart; +int pa_tryrelock_restart; SYSCTL_INT(_vm, OID_AUTO, tryrelock_restart, CTLFLAG_RD, pa_tryrelock_restart, 0, Number of tryrelock restarts); ___ 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: r234577 - head/usr.bin/stat
Author: brueffer Date: Sun Apr 22 18:18:49 2012 New Revision: 234577 URL: http://svn.freebsd.org/changeset/base/234577 Log: Remove duplicate -l description. Submitted by: Rainer Hurling rhur...@gwdg.de MFC after:1 week Modified: head/usr.bin/stat/stat.1 Modified: head/usr.bin/stat/stat.1 == --- head/usr.bin/stat/stat.1Sun Apr 22 17:58:30 2012(r234576) +++ head/usr.bin/stat/stat.1Sun Apr 22 18:18:49 2012(r234577) @@ -29,7 +29,7 @@ .\ .\ $FreeBSD$ .\ -.Dd December 5, 2010 +.Dd April 22, 2012 .Dt STAT 1 .Os .Sh NAME @@ -140,10 +140,6 @@ If the link is broken or the target does fall back on .Xr lstat 2 and report information about the link. -.It Fl l -Display output in -.Ic ls Fl lT -format. .It Fl n Do not force a newline to appear at the end of each piece of output. .It Fl q ___ 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: r234577 - head/usr.bin/stat
On Sun, Apr 22, 2012 at 06:18:49PM +, Christian Brueffer wrote: Author: brueffer Date: Sun Apr 22 18:18:49 2012 New Revision: 234577 URL: http://svn.freebsd.org/changeset/base/234577 Log: Remove duplicate -l description. Submitted by: Rainer Hurling rhur...@gwdg.de MFC after: 1 week The patch should have also fixed the misordering of the -n, -qi, and -x options. -- Steve ___ 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: r234578 - head/lib/libc/locale
Author: theraven Date: Sun Apr 22 18:51:38 2012 New Revision: 234578 URL: http://svn.freebsd.org/changeset/base/234578 Log: Fix some incorrect symbol versions. Reported by: das Modified: head/lib/libc/locale/Symbol.map Modified: head/lib/libc/locale/Symbol.map == --- head/lib/libc/locale/Symbol.map Sun Apr 22 18:18:49 2012 (r234577) +++ head/lib/libc/locale/Symbol.map Sun Apr 22 18:51:38 2012 (r234578) @@ -60,13 +60,9 @@ FBSD_1.0 { nextwctype; nl_langinfo; __maskrune; - __maskrune_l; __sbmaskrune; - __sbmaskrune_l; __istype; - __istype_l; __sbistype; - __sbistype_l; __isctype; __toupper; __sbtoupper; @@ -197,6 +193,10 @@ FBSD_1.3 { wcstoul_l; wcstoull_l; wcstoumax_l; + __sbistype_l; + __maskrune_l; + __sbmaskrune_l; + __istype_l; __runes_for_locale; _ThreadRuneLocale; }; ___ 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: r234579 - in head/sys/powerpc: include mpc85xx powerpc
Author: nwhitehorn Date: Sun Apr 22 18:54:51 2012 New Revision: 234579 URL: http://svn.freebsd.org/changeset/base/234579 Log: Replace eieio; sync for creating bus-space memory barriers with sync. sync performs a strict superset of the functions of eieio, so using both is redundant. While here, expand bus barriers to all bus_space operations, since many drivers do not correctly use bus_space_barrier(). In principle, we can also replace sync just with eieio, for a significant performance increase, but it remains to be seen whether any poorly-written drivers currently depend on the side effects of sync to properly function. MFC after:1 week Modified: head/sys/powerpc/include/pio.h head/sys/powerpc/mpc85xx/mpc85xx.c head/sys/powerpc/powerpc/bus_machdep.c Modified: head/sys/powerpc/include/pio.h == --- head/sys/powerpc/include/pio.h Sun Apr 22 18:51:38 2012 (r234578) +++ head/sys/powerpc/include/pio.h Sun Apr 22 18:54:51 2012 (r234579) @@ -39,46 +39,52 @@ * I/O macros. */ +/* + * Note: this should be eieio, but many drivers expect ordering with + * main storage too. + */ +#define powerpc_iomb() __asm __volatile(sync : : : memory) + static __inline void __outb(volatile u_int8_t *a, u_int8_t v) { *a = v; - __asm__ volatile(eieio; sync); + powerpc_iomb(); } static __inline void __outw(volatile u_int16_t *a, u_int16_t v) { *a = v; - __asm__ volatile(eieio; sync); + powerpc_iomb(); } static __inline void __outl(volatile u_int32_t *a, u_int32_t v) { *a = v; - __asm__ volatile(eieio; sync); + powerpc_iomb(); } static __inline void __outll(volatile u_int64_t *a, u_int64_t v) { *a = v; - __asm__ volatile(eieio; sync); + powerpc_iomb(); } static __inline void __outwrb(volatile u_int16_t *a, u_int16_t v) { __asm__ volatile(sthbrx %0, 0, %1 :: r(v), r(a)); - __asm__ volatile(eieio; sync); + powerpc_iomb(); } static __inline void __outlrb(volatile u_int32_t *a, u_int32_t v) { __asm__ volatile(stwbrx %0, 0, %1 :: r(v), r(a)); - __asm__ volatile(eieio; sync); + powerpc_iomb(); } static __inline u_int8_t @@ -87,7 +93,7 @@ __inb(volatile u_int8_t *a) u_int8_t _v_; _v_ = *a; - __asm__ volatile(eieio; sync); + powerpc_iomb(); return _v_; } @@ -97,7 +103,7 @@ __inw(volatile u_int16_t *a) u_int16_t _v_; _v_ = *a; - __asm__ volatile(eieio; sync); + powerpc_iomb(); return _v_; } @@ -107,7 +113,7 @@ __inl(volatile u_int32_t *a) u_int32_t _v_; _v_ = *a; - __asm__ volatile(eieio; sync); + powerpc_iomb(); return _v_; } @@ -117,7 +123,7 @@ __inll(volatile u_int64_t *a) u_int64_t _v_; _v_ = *a; - __asm__ volatile(eieio; sync); + powerpc_iomb(); return _v_; } @@ -127,7 +133,7 @@ __inwrb(volatile u_int16_t *a) u_int16_t _v_; __asm__ volatile(lhbrx %0, 0, %1 : =r(_v_) : r(a)); - __asm__ volatile(eieio; sync); + powerpc_iomb(); return _v_; } @@ -137,7 +143,7 @@ __inlrb(volatile u_int32_t *a) u_int32_t _v_; __asm__ volatile(lwbrx %0, 0, %1 : =r(_v_) : r(a)); - __asm__ volatile(eieio; sync); + powerpc_iomb(); return _v_; } @@ -175,7 +181,7 @@ __outsb(volatile u_int8_t *a, const u_in { while (c--) *a = *s++; - __asm__ volatile(eieio; sync); + powerpc_iomb(); } static __inline void @@ -183,7 +189,7 @@ __outsw(volatile u_int16_t *a, const u_i { while (c--) *a = *s++; - __asm__ volatile(eieio; sync); + powerpc_iomb(); } static __inline void @@ -191,7 +197,7 @@ __outsl(volatile u_int32_t *a, const u_i { while (c--) *a = *s++; - __asm__ volatile(eieio; sync); + powerpc_iomb(); } static __inline void @@ -199,7 +205,7 @@ __outsll(volatile u_int64_t *a, const u_ { while (c--) *a = *s++; - __asm__ volatile(eieio; sync); + powerpc_iomb(); } static __inline void @@ -207,7 +213,7 @@ __outswrb(volatile u_int16_t *a, const u { while (c--) __asm__ volatile(sthbrx %0, 0, %1 :: r(*s++), r(a)); - __asm__ volatile(eieio; sync); + powerpc_iomb(); } static __inline void @@ -215,7 +221,7 @@ __outslrb(volatile u_int32_t *a, const u { while (c--) __asm__ volatile(stwbrx %0, 0, %1 :: r(*s++), r(a)); - __asm__ volatile(eieio; sync); + powerpc_iomb(); } static __inline void @@ -223,7 +229,7 @@ __insb(volatile u_int8_t *a, u_int8_t *d { while (c--) *d++ = *a; - __asm__ volatile(eieio; sync); + powerpc_iomb(); } static __inline void @@ -231,7 +237,7 @@
svn commit: r234580 - in head/sys: conf powerpc/include powerpc/powerpc
Author: nwhitehorn Date: Sun Apr 22 18:56:56 2012 New Revision: 234580 URL: http://svn.freebsd.org/changeset/base/234580 Log: Remove dead code. The routines in atomic.S did not work properly anyway, and were everywhere unused. If we turn out to need them, they should be reimplemented. MFC after:2 weeks Deleted: head/sys/powerpc/powerpc/atomic.S Modified: head/sys/conf/files.powerpc head/sys/powerpc/include/cpufunc.h Modified: head/sys/conf/files.powerpc == --- head/sys/conf/files.powerpc Sun Apr 22 18:54:51 2012(r234579) +++ head/sys/conf/files.powerpc Sun Apr 22 18:56:56 2012(r234580) @@ -170,7 +170,6 @@ powerpc/powermac/uninorthpci.c optional powerpc/powermac/vcoregpio.c optionalpowermac powerpc/powermac/windtunnel.c optionalpowermac windtunnel powerpc/powerpc/altivec.c optionalaim -powerpc/powerpc/atomic.S standard powerpc/powerpc/autoconf.c standard powerpc/powerpc/bcopy.cstandard powerpc/powerpc/bus_machdep.c standard Modified: head/sys/powerpc/include/cpufunc.h == --- head/sys/powerpc/include/cpufunc.h Sun Apr 22 18:54:51 2012 (r234579) +++ head/sys/powerpc/include/cpufunc.h Sun Apr 22 18:56:56 2012 (r234580) @@ -29,16 +29,6 @@ #ifndef _MACHINE_CPUFUNC_H_ #define_MACHINE_CPUFUNC_H_ -/* - * Required for user-space atomic.h includes - */ -static __inline void -powerpc_mb(void) -{ - - __asm __volatile(eieio; sync : : : memory); -} - #ifdef _KERNEL #include sys/types.h ___ 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: r234581 - in head/sys/powerpc: aim include
Author: nwhitehorn Date: Sun Apr 22 19:00:51 2012 New Revision: 234581 URL: http://svn.freebsd.org/changeset/base/234581 Log: Use lwsync to provide memory barriers on systems that support it instead of sync (lwsync is an alternate encoding of sync on systems that do not support it, providing graceful fallback). This provides more than an order of magnitude reduction in the time required to acquire or release a mutex. MFC after:2 months Modified: head/sys/powerpc/aim/slb.c head/sys/powerpc/include/atomic.h Modified: head/sys/powerpc/aim/slb.c == --- head/sys/powerpc/aim/slb.c Sun Apr 22 18:56:56 2012(r234580) +++ head/sys/powerpc/aim/slb.c Sun Apr 22 19:00:51 2012(r234581) @@ -139,7 +139,7 @@ make_new_leaf(uint64_t esid, uint64_t sl * that a lockless searcher always sees a valid path through * the tree. */ - powerpc_sync(); + mb(); idx = esid2idx(esid, parent-ua_level); parent-u.ua_child[idx] = child; @@ -187,7 +187,7 @@ make_intermediate(uint64_t esid, struct idx = esid2idx(child-ua_base, inter-ua_level); inter-u.ua_child[idx] = child; setbit(inter-ua_alloc, idx); - powerpc_sync(); + mb(); /* Set up parent to point to intermediate node ... */ idx = esid2idx(inter-ua_base, parent-ua_level); Modified: head/sys/powerpc/include/atomic.h == --- head/sys/powerpc/include/atomic.h Sun Apr 22 18:56:56 2012 (r234580) +++ head/sys/powerpc/include/atomic.h Sun Apr 22 19:00:51 2012 (r234581) @@ -36,12 +36,10 @@ #error this file needs sys/cdefs.h as a prerequisite #endif -#define__ATOMIC_BARRIER\ -__asm __volatile(sync : : : memory) - -#define mb() __ATOMIC_BARRIER -#definewmb() mb() -#definermb() mb() +/* NOTE: lwsync is equivalent to sync on systems without lwsync */ +#define mb() __asm __volatile(lwsync : : : memory) +#define wmb() __asm __volatile(lwsync : : : memory) +#define rmb() __asm __volatile(lwsync : : : memory) /* * atomic_add(p, v) @@ -94,13 +92,13 @@ atomic_add_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_add_##type(p, v, t); \ - __ATOMIC_BARRIER; \ + rmb(); \ } \ \ static __inline void \ atomic_add_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - __ATOMIC_BARRIER; \ + wmb(); \ __atomic_add_##type(p, v, t); \ } \ /* _ATOMIC_ADD */ @@ -180,13 +178,13 @@ _ATOMIC_ADD(long) atomic_clear_acq_##type(volatile u_##type *p, u_##type v) {\ u_##type t; \ __atomic_clear_##type(p, v, t); \ - __ATOMIC_BARRIER; \ + rmb(); \ } \ \ static __inline void \ atomic_clear_rel_##type(volatile u_##type *p, u_##type v) {\ u_##type t; \ - __ATOMIC_BARRIER; \ + wmb(); \ __atomic_clear_##type(p, v, t); \ } \ /* _ATOMIC_CLEAR */ @@ -282,13 +280,13 @@ _ATOMIC_CLEAR(long) atomic_set_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_set_##type(p, v, t); \ - __ATOMIC_BARRIER; \ + rmb(); \ } \ \ static __inline void \ atomic_set_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - __ATOMIC_BARRIER;
svn commit: r234583 - head/sys/powerpc/include
Author: nwhitehorn Date: Sun Apr 22 20:23:34 2012 New Revision: 234583 URL: http://svn.freebsd.org/changeset/base/234583 Log: On non-64-bit systems (which generally don't have lwsync), use eieio and isync to implement read and write barriers, following Appendix B.2 of Book II of the architecture manual. This provides a 25% speed increase to fork() on the PowerPC G4. Modified: head/sys/powerpc/include/atomic.h Modified: head/sys/powerpc/include/atomic.h == --- head/sys/powerpc/include/atomic.h Sun Apr 22 20:14:33 2012 (r234582) +++ head/sys/powerpc/include/atomic.h Sun Apr 22 20:23:34 2012 (r234583) @@ -38,8 +38,13 @@ /* NOTE: lwsync is equivalent to sync on systems without lwsync */ #define mb() __asm __volatile(lwsync : : : memory) +#ifdef __powerpc64__ #define wmb() __asm __volatile(lwsync : : : memory) #define rmb() __asm __volatile(lwsync : : : memory) +#else +#define wmb() __asm __volatile(eieio : : : memory) +#define rmb() __asm __volatile(isync : : : memory) +#endif /* * atomic_add(p, v) ___ 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: r234356 - in head: gnu/lib/csu lib/clang lib/csu/powerpc
On 16.04.12 23:36, Dimitry Andric wrote: Author: dim Date: Mon Apr 16 21:36:55 2012 New Revision: 234356 URL: http://svn.freebsd.org/changeset/base/234356 Log: Work around an issue on 32-bit PowerPC, where clang executable can get too big, causing 'relocation truncated to fit' errors at link time. Reviewed by: nwhitehorn Did you build and boot a 32-bit world with gcc? I get an unusable install with this commit, every command segfaults. This is on a G5 SMP with 32-bit OS, gcc built. 64-bit world/kernel did boot. Andreas ___ 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: r234584 - head/sys/powerpc/include
Author: nwhitehorn Date: Sun Apr 22 21:11:01 2012 New Revision: 234584 URL: http://svn.freebsd.org/changeset/base/234584 Log: Clarify what we are doing in r234583 a little better: eieio and isync do not provide general barriers, but only barriers in the context of the atomic sequences here. As such, make them private and keep the global *mb() routines using a variant of sync. Modified: head/sys/powerpc/include/atomic.h Modified: head/sys/powerpc/include/atomic.h == --- head/sys/powerpc/include/atomic.h Sun Apr 22 20:23:34 2012 (r234583) +++ head/sys/powerpc/include/atomic.h Sun Apr 22 21:11:01 2012 (r234584) @@ -37,13 +37,21 @@ #endif /* NOTE: lwsync is equivalent to sync on systems without lwsync */ -#define mb() __asm __volatile(lwsync : : : memory) +#define mb() __asm __volatile(lwsync : : : memory) +#define wmb() __asm __volatile(lwsync : : : memory) +#define rmb() __asm __volatile(lwsync : : : memory) + +/* + * The __ATOMIC_XMB() macros provide memory barriers only in conjunction + * with the atomic lXarx/stXcx. sequences below. See Appendix B.2 of Book II + * of the architecture manual. + */ #ifdef __powerpc64__ -#define wmb() __asm __volatile(lwsync : : : memory) -#define rmb() __asm __volatile(lwsync : : : memory) +#define __ATOMIC_WMB() __asm __volatile(lwsync : : : memory) +#define __ATOMIC_RMB() __asm __volatile(lwsync : : : memory) #else -#define wmb() __asm __volatile(eieio : : : memory) -#define rmb() __asm __volatile(isync : : : memory) +#define __ATOMIC_WMB() __asm __volatile(eieio : : : memory) +#define __ATOMIC_RMB() __asm __volatile(isync : : : memory) #endif /* @@ -97,13 +105,13 @@ atomic_add_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_add_##type(p, v, t); \ - rmb(); \ + __ATOMIC_RMB(); \ } \ \ static __inline void \ atomic_add_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - wmb(); \ + __ATOMIC_WMB(); \ __atomic_add_##type(p, v, t); \ } \ /* _ATOMIC_ADD */ @@ -183,13 +191,13 @@ _ATOMIC_ADD(long) atomic_clear_acq_##type(volatile u_##type *p, u_##type v) {\ u_##type t; \ __atomic_clear_##type(p, v, t); \ - rmb(); \ + __ATOMIC_RMB(); \ } \ \ static __inline void \ atomic_clear_rel_##type(volatile u_##type *p, u_##type v) {\ u_##type t; \ - wmb(); \ + __ATOMIC_WMB(); \ __atomic_clear_##type(p, v, t); \ } \ /* _ATOMIC_CLEAR */ @@ -285,13 +293,13 @@ _ATOMIC_CLEAR(long) atomic_set_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_set_##type(p, v, t); \ - rmb(); \ + __ATOMIC_RMB(); \ } \ \ static __inline void \ atomic_set_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - wmb(); \ + __ATOMIC_WMB(); \ __atomic_set_##type(p, v, t); \ } \ /* _ATOMIC_SET */ @@ -371,13 +379,13 @@ _ATOMIC_SET(long) atomic_subtract_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_subtract_##type(p, v, t); \ -
svn commit: r234585 - head/lib/libc/stdio
Author: das Date: Sun Apr 22 21:18:41 2012 New Revision: 234585 URL: http://svn.freebsd.org/changeset/base/234585 Log: Refactor scanf to improve modularity. Conversions are now performed by separate conversion functions. This will hopefully make bugs more noticeable (I noticed several already) and provide opportunities to reduce code duplication. Modified: head/lib/libc/stdio/vfscanf.c head/lib/libc/stdio/vfwscanf.c Modified: head/lib/libc/stdio/vfscanf.c == --- head/lib/libc/stdio/vfscanf.c Sun Apr 22 21:11:01 2012 (r234584) +++ head/lib/libc/stdio/vfscanf.c Sun Apr 22 21:18:41 2012 (r234585) @@ -107,6 +107,418 @@ static int parsefloat(FILE *, char *, ch __weak_reference(__vfscanf, vfscanf); /* + * Conversion functions are passed a pointer to this object instead of + * a real parameter to indicate that the assignment-suppression (*) + * flag was specified. We could use a NULL pointer to indicate this, + * but that would mask bugs in applications that call scanf() with a + * NULL pointer. + */ +static const int suppress; +#defineSUPPRESS_PTR((void *)suppress) + +static const mbstate_t initial_mbs; + +/* + * The following conversion functions return the number of characters consumed, + * or -1 on input failure. Character class conversion returns 0 on match + * failure. + */ + +static __inline int +convert_char(FILE *fp, char * __restrict p, int width) +{ + int n, nread; + + nread = 0; + if (p == SUPPRESS_PTR) { + size_t sum = 0; + for (;;) { + if ((n = fp-_r) width) { + sum += n; + width -= n; + fp-_p += n; + if (__srefill(fp)) { + if (sum == 0) + return (-1); + break; + } + } else { + sum += width; + fp-_r -= width; + fp-_p += width; + break; + } + } + nread += sum; + } else { + size_t r = __fread(p, 1, width, fp); + + if (r == 0) + return (-1); + nread += r; + } + return (nread); +} + +static __inline int +convert_wchar(FILE *fp, wchar_t *wcp, int width) +{ + mbstate_t mbs; + size_t nconv; + int n, nread; + char buf[MB_CUR_MAX]; + + nread = 0; + n = 0; + while (width != 0) { + if (n == MB_CUR_MAX) { + fp-_flags |= __SERR; + return (-1); + } + buf[n++] = *fp-_p; + fp-_p++; + fp-_r--; + mbs = initial_mbs; + nconv = mbrtowc(wcp, buf, n, mbs); + if (nconv == (size_t)-1) { + fp-_flags |= __SERR; + return (-1); + } + if (nconv == 0 wcp != SUPPRESS_PTR) + *wcp = L'\0'; + if (nconv != (size_t)-2) { + nread += n; + width--; + if (wcp != SUPPRESS_PTR) + wcp++; + n = 0; + } + if (fp-_r = 0 __srefill(fp)) { + if (n != 0) { + fp-_flags |= __SERR; + return (-1); + } + break; + } + } + return (nread); +} + +static __inline int +convert_ccl(FILE *fp, char * __restrict p, int width, const char *ccltab) +{ + char *p0; + int n; + + if (p == SUPPRESS_PTR) { + n = 0; + while (ccltab[*fp-_p]) { + n++, fp-_r--, fp-_p++; + if (--width == 0) + break; + if (fp-_r = 0 __srefill(fp)) { + if (n == 0) + return (-1); + break; + } + } + } else { + p0 = p; + while (ccltab[*fp-_p]) { + fp-_r--; + *p++ = *fp-_p++; + if (--width == 0) + break; + if (fp-_r = 0 __srefill(fp)) { + if (p == p0) + return (-1); + break; + } + } +
svn commit: r234586 - head/lib/libc/stdio
Author: das Date: Sun Apr 22 21:22:14 2012 New Revision: 234586 URL: http://svn.freebsd.org/changeset/base/234586 Log: Bugfix: %n doesn't count as a conversion, so sscanf(abc, ab%ncd, i) returns EOF, not 0. Modified: head/lib/libc/stdio/vfscanf.c head/lib/libc/stdio/vfwscanf.c Modified: head/lib/libc/stdio/vfscanf.c == --- head/lib/libc/stdio/vfscanf.c Sun Apr 22 21:18:41 2012 (r234585) +++ head/lib/libc/stdio/vfscanf.c Sun Apr 22 21:22:14 2012 (r234586) @@ -703,7 +703,6 @@ literal: break; case 'n': - nconversions++; if (flags SUPPRESS) /* ??? */ continue; if (flags SHORTSHORT) Modified: head/lib/libc/stdio/vfwscanf.c == --- head/lib/libc/stdio/vfwscanf.c Sun Apr 22 21:18:41 2012 (r234585) +++ head/lib/libc/stdio/vfwscanf.c Sun Apr 22 21:22:14 2012 (r234586) @@ -650,7 +650,6 @@ literal: break; case 'n': - nconversions++; if (flags SUPPRESS) /* ??? */ continue; if (flags SHORTSHORT) ___ 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: r234587 - head/lib/libc/stdio
Author: das Date: Sun Apr 22 21:28:14 2012 New Revision: 234587 URL: http://svn.freebsd.org/changeset/base/234587 Log: Bugfix: Correctly count the number of characters read for %l[ conversions. Modified: head/lib/libc/stdio/vfscanf.c Modified: head/lib/libc/stdio/vfscanf.c == --- head/lib/libc/stdio/vfscanf.c Sun Apr 22 21:22:14 2012 (r234586) +++ head/lib/libc/stdio/vfscanf.c Sun Apr 22 21:28:14 2012 (r234587) @@ -248,12 +248,12 @@ convert_wccl(FILE *fp, wchar_t *wcp, int { mbstate_t mbs; wchar_t twc; - int n, nchars, nconv, nread; + int n, nchars, nconv; char buf[MB_CUR_MAX]; if (wcp == SUPPRESS_PTR) wcp = twc; - n = nread = 0; + n = 0; nchars = 0; while (width != 0) { if (n == MB_CUR_MAX) { @@ -279,7 +279,6 @@ convert_wccl(FILE *fp, wchar_t *wcp, int } break; } - nread += n; width--; if (wcp != twc) wcp++; @@ -298,12 +297,10 @@ convert_wccl(FILE *fp, wchar_t *wcp, int fp-_flags |= __SERR; return (-1); } - n = nchars; - if (n == 0) + if (nchars == 0) return (0); *wcp = L'\0'; - /* XXX This matches historical behavior, but it's wrong. */ - return (nread + n); + return (nchars); } static __inline int ___ 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: r234588 - head/lib/libc/stdio
Author: das Date: Sun Apr 22 21:28:33 2012 New Revision: 234588 URL: http://svn.freebsd.org/changeset/base/234588 Log: Bugfix: Include whitespace characters in the count of the number of characters read. Modified: head/lib/libc/stdio/vfwscanf.c Modified: head/lib/libc/stdio/vfwscanf.c == --- head/lib/libc/stdio/vfwscanf.c Sun Apr 22 21:28:14 2012 (r234587) +++ head/lib/libc/stdio/vfwscanf.c Sun Apr 22 21:28:33 2012 (r234588) @@ -506,7 +506,7 @@ __vfwscanf(FILE * __restrict fp, locale_ if (iswspace(c)) { while ((c = __fgetwc(fp, locale)) != WEOF iswspace_l(c, locale)) - ; + nread++; if (c != WEOF) __ungetwc(c, fp, locale); continue; ___ 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: r234589 - head/sys/powerpc/include
Author: nwhitehorn Date: Sun Apr 22 21:55:19 2012 New Revision: 234589 URL: http://svn.freebsd.org/changeset/base/234589 Log: Correctly specify assembler constrains for synchronization instructions. MFC after: 3 days Modified: head/sys/powerpc/include/cpufunc.h Modified: head/sys/powerpc/include/cpufunc.h == --- head/sys/powerpc/include/cpufunc.h Sun Apr 22 21:28:33 2012 (r234588) +++ head/sys/powerpc/include/cpufunc.h Sun Apr 22 21:55:19 2012 (r234589) @@ -166,21 +166,21 @@ static __inline void eieio(void) { - __asm __volatile (eieio); + __asm __volatile (eieio : : : memory); } static __inline void isync(void) { - __asm __volatile (isync); + __asm __volatile (isync : : : memory); } static __inline void powerpc_sync(void) { - __asm __volatile (sync); + __asm __volatile (sync : : : memory); } static __inline register_t ___ 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: r234590 - head/sys/powerpc/include
Author: nwhitehorn Date: Sun Apr 22 22:27:35 2012 New Revision: 234590 URL: http://svn.freebsd.org/changeset/base/234590 Log: Provide a clearer split between read/write and acquire/release barriers. This should really, actually be correct now. Modified: head/sys/powerpc/include/atomic.h Modified: head/sys/powerpc/include/atomic.h == --- head/sys/powerpc/include/atomic.h Sun Apr 22 21:55:19 2012 (r234589) +++ head/sys/powerpc/include/atomic.h Sun Apr 22 22:27:35 2012 (r234590) @@ -38,20 +38,25 @@ /* NOTE: lwsync is equivalent to sync on systems without lwsync */ #define mb() __asm __volatile(lwsync : : : memory) +#ifdef __powerpc64__ +#define rmb() __asm __volatile(lwsync : : : memory) #define wmb() __asm __volatile(lwsync : : : memory) +#else #define rmb() __asm __volatile(lwsync : : : memory) +#define wmb() __asm __volatile(eieio : : : memory) +#endif /* - * The __ATOMIC_XMB() macros provide memory barriers only in conjunction + * The __ATOMIC_REL/ACQ() macros provide memory barriers only in conjunction * with the atomic lXarx/stXcx. sequences below. See Appendix B.2 of Book II * of the architecture manual. */ #ifdef __powerpc64__ -#define __ATOMIC_WMB() __asm __volatile(lwsync : : : memory) -#define __ATOMIC_RMB() __asm __volatile(lwsync : : : memory) +#define __ATOMIC_REL() __asm __volatile(lwsync : : : memory) +#define __ATOMIC_ACQ() __asm __volatile(lwsync : : : memory) #else -#define __ATOMIC_WMB() __asm __volatile(eieio : : : memory) -#define __ATOMIC_RMB() __asm __volatile(isync : : : memory) +#define __ATOMIC_REL() __asm __volatile(lwsync : : : memory) +#define __ATOMIC_ACQ() __asm __volatile(isync : : : memory) #endif /* @@ -105,13 +110,13 @@ atomic_add_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_add_##type(p, v, t); \ - __ATOMIC_RMB(); \ + __ATOMIC_ACQ(); \ } \ \ static __inline void \ atomic_add_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - __ATOMIC_WMB(); \ + __ATOMIC_REL(); \ __atomic_add_##type(p, v, t); \ } \ /* _ATOMIC_ADD */ @@ -191,13 +196,13 @@ _ATOMIC_ADD(long) atomic_clear_acq_##type(volatile u_##type *p, u_##type v) {\ u_##type t; \ __atomic_clear_##type(p, v, t); \ - __ATOMIC_RMB(); \ + __ATOMIC_ACQ(); \ } \ \ static __inline void \ atomic_clear_rel_##type(volatile u_##type *p, u_##type v) {\ u_##type t; \ - __ATOMIC_WMB(); \ + __ATOMIC_REL(); \ __atomic_clear_##type(p, v, t); \ } \ /* _ATOMIC_CLEAR */ @@ -293,13 +298,13 @@ _ATOMIC_CLEAR(long) atomic_set_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_set_##type(p, v, t); \ - __ATOMIC_RMB(); \ + __ATOMIC_ACQ(); \ } \ \ static __inline void \ atomic_set_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - __ATOMIC_WMB(); \ + __ATOMIC_REL(); \ __atomic_set_##type(p, v, t); \ } \ /* _ATOMIC_SET */ @@ -379,13 +384,13 @@ _ATOMIC_SET(long) atomic_subtract_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \
svn commit: r234591 - stable/8/sys/conf
Author: bz Date: Sun Apr 22 22:39:24 2012 New Revision: 234591 URL: http://svn.freebsd.org/changeset/base/234591 Log: 8.3-RELEASE was announced; call this STABLE again. Reported by: Adrian Wontroba (aw1 stade.co.uk) on stable Modified: stable/8/sys/conf/newvers.sh Modified: stable/8/sys/conf/newvers.sh == --- stable/8/sys/conf/newvers.shSun Apr 22 22:27:35 2012 (r234590) +++ stable/8/sys/conf/newvers.shSun Apr 22 22:39:24 2012 (r234591) @@ -32,7 +32,7 @@ TYPE=FreeBSD REVISION=8.3 -BRANCH=PRERELEASE +BRANCH=STABLE if [ X${BRANCH_OVERRIDE} != X ]; then BRANCH=${BRANCH_OVERRIDE} fi ___ 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: r234592 - head/libexec/rtld-elf/powerpc
Author: nwhitehorn Date: Mon Apr 23 00:54:06 2012 New Revision: 234592 URL: http://svn.freebsd.org/changeset/base/234592 Log: Fix a missed file in r234580: replace the now-obsolete powerpc_mb() with regular mb(). Modified: head/libexec/rtld-elf/powerpc/reloc.c Modified: head/libexec/rtld-elf/powerpc/reloc.c == --- head/libexec/rtld-elf/powerpc/reloc.c Sun Apr 22 22:39:24 2012 (r234591) +++ head/libexec/rtld-elf/powerpc/reloc.c Mon Apr 23 00:54:06 2012 (r234592) @@ -38,7 +38,7 @@ #include string.h #include unistd.h #include machine/cpu.h -#include machine/cpufunc.h +#include machine/atomic.h #include machine/md_var.h #include debug.h @@ -499,7 +499,7 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr jmptab = obj-pltgot + JMPTAB_BASE(N); jmptab[reloff] = target; - powerpc_mb(); /* Order jmptab update before next changes */ + mb(); /* Order jmptab update before next changes */ if (reloff PLT_EXTENDED_BEGIN) { /* for extended PLT entries, we keep the old code */ ___ 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: r234356 - in head: gnu/lib/csu lib/clang lib/csu/powerpc
On 04/22/12 15:41, Andreas Tobler wrote: On 16.04.12 23:36, Dimitry Andric wrote: Author: dim Date: Mon Apr 16 21:36:55 2012 New Revision: 234356 URL: http://svn.freebsd.org/changeset/base/234356 Log: Work around an issue on 32-bit PowerPC, where clang executable can get too big, causing 'relocation truncated to fit' errors at link time. Reviewed by:nwhitehorn Did you build and boot a 32-bit world with gcc? I get an unusable install with this commit, every command segfaults. This is on a G5 SMP with 32-bit OS, gcc built. 64-bit world/kernel did boot. I hadn't tested it before acking the review request. This does appear to break everything for 32-bit PPC. Have you looked into why? Can this be reverted in the interim? -Nathan ___ 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: r234593 - in stable/9/sys: dev/bce i386/conf kern
Author: yongari Date: Mon Apr 23 03:38:40 2012 New Revision: 234593 URL: http://svn.freebsd.org/changeset/base/234593 Log: MFC r234121: Back out r228476. r228476 fixed superfluous link UP/DOWN messages but broke IPMI access during boot. It's not clear why r228476 breaks IPMI and should be revisited. Reported by:Paul Guyot paulguyot ieee dot org Modified: stable/9/sys/dev/bce/if_bce.c stable/9/sys/dev/bce/if_bcereg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/dev/bce/if_bce.c == --- stable/9/sys/dev/bce/if_bce.c Mon Apr 23 00:54:06 2012 (r234592) +++ stable/9/sys/dev/bce/if_bce.c Mon Apr 23 03:38:40 2012 (r234593) @@ -1982,7 +1982,6 @@ static void bce_miibus_statchg(device_t dev) { struct bce_softc *sc; - struct ifnet *ifp; struct mii_data *mii; int val; @@ -1990,57 +1989,42 @@ bce_miibus_statchg(device_t dev) DBENTER(BCE_VERBOSE_PHY); - ifp = sc-bce_ifp; mii = device_get_softc(sc-bce_miibus); - if (mii == NULL || ifp == NULL || - (ifp-if_drv_flags IFF_DRV_RUNNING) == 0) - return; - sc-bce_link_up = FALSE; val = REG_RD(sc, BCE_EMAC_MODE); val = ~(BCE_EMAC_MODE_PORT | BCE_EMAC_MODE_HALF_DUPLEX | BCE_EMAC_MODE_MAC_LOOP | BCE_EMAC_MODE_FORCE_LINK | BCE_EMAC_MODE_25G); /* Set MII or GMII interface based on the PHY speed. */ - if ((mii-mii_media_status (IFM_ACTIVE | IFM_AVALID)) == - (IFM_ACTIVE | IFM_AVALID)) { - switch (IFM_SUBTYPE(mii-mii_media_active)) { - case IFM_10_T: - if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { - DBPRINT(sc, BCE_INFO_PHY, - Enabling 10Mb interface.\n); - val |= BCE_EMAC_MODE_PORT_MII_10; - sc-bce_link_up = TRUE; - break; - } - /* FALLTHROUGH */ - case IFM_100_TX: - DBPRINT(sc, BCE_INFO_PHY, Enabling MII interface.\n); - val |= BCE_EMAC_MODE_PORT_MII; - sc-bce_link_up = TRUE; - break; - case IFM_2500_SX: - DBPRINT(sc, BCE_INFO_PHY, Enabling 2.5G MAC mode.\n); - val |= BCE_EMAC_MODE_25G; - /* FALLTHROUGH */ - case IFM_1000_T: - case IFM_1000_SX: - DBPRINT(sc, BCE_INFO_PHY, Enabling GMII interface.\n); - val |= BCE_EMAC_MODE_PORT_GMII; - sc-bce_link_up = TRUE; - if (bce_verbose || bootverbose) - BCE_PRINTF(Gigabit link up!\n); - break; - default: - DBPRINT(sc, BCE_INFO_PHY, Unknown link speed.\n); + switch (IFM_SUBTYPE(mii-mii_media_active)) { + case IFM_10_T: + if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { + DBPRINT(sc, BCE_INFO_PHY, + Enabling 10Mb interface.\n); + val |= BCE_EMAC_MODE_PORT_MII_10; break; } + /* fall-through */ + case IFM_100_TX: + DBPRINT(sc, BCE_INFO_PHY, Enabling MII interface.\n); + val |= BCE_EMAC_MODE_PORT_MII; + break; + case IFM_2500_SX: + DBPRINT(sc, BCE_INFO_PHY, Enabling 2.5G MAC mode.\n); + val |= BCE_EMAC_MODE_25G; + /* fall-through */ + case IFM_1000_T: + case IFM_1000_SX: + DBPRINT(sc, BCE_INFO_PHY, Enabling GMII interface.\n); + val |= BCE_EMAC_MODE_PORT_GMII; + break; + default: + DBPRINT(sc, BCE_INFO_PHY, Unknown link speed, enabling + default GMII
svn commit: r234594 - in stable/8/sys: dev/bce i386/conf
Author: yongari Date: Mon Apr 23 03:40:39 2012 New Revision: 234594 URL: http://svn.freebsd.org/changeset/base/234594 Log: MFC r234121: Back out r228476. r228476 fixed superfluous link UP/DOWN messages but broke IPMI access during boot. It's not clear why r228476 breaks IPMI and should be revisited. Reported by:Paul Guyot paulguyot ieee dot org Modified: stable/8/sys/dev/bce/if_bce.c stable/8/sys/dev/bce/if_bcereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (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/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/dev/bce/if_bce.c == --- stable/8/sys/dev/bce/if_bce.c Mon Apr 23 03:38:40 2012 (r234593) +++ stable/8/sys/dev/bce/if_bce.c Mon Apr 23 03:40:39 2012 (r234594) @@ -1982,7 +1982,6 @@ static void bce_miibus_statchg(device_t dev) { struct bce_softc *sc; - struct ifnet *ifp; struct mii_data *mii; int val; @@ -1990,57 +1989,42 @@ bce_miibus_statchg(device_t dev) DBENTER(BCE_VERBOSE_PHY); - ifp = sc-bce_ifp; mii = device_get_softc(sc-bce_miibus); - if (mii == NULL || ifp == NULL || - (ifp-if_drv_flags IFF_DRV_RUNNING) == 0) - return; - sc-bce_link_up = FALSE; val = REG_RD(sc, BCE_EMAC_MODE); val = ~(BCE_EMAC_MODE_PORT | BCE_EMAC_MODE_HALF_DUPLEX | BCE_EMAC_MODE_MAC_LOOP | BCE_EMAC_MODE_FORCE_LINK | BCE_EMAC_MODE_25G); /* Set MII or GMII interface based on the PHY speed. */ - if ((mii-mii_media_status (IFM_ACTIVE | IFM_AVALID)) == - (IFM_ACTIVE | IFM_AVALID)) { - switch (IFM_SUBTYPE(mii-mii_media_active)) { - case IFM_10_T: - if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { - DBPRINT(sc, BCE_INFO_PHY, - Enabling 10Mb interface.\n); - val |= BCE_EMAC_MODE_PORT_MII_10; - sc-bce_link_up = TRUE; - break; - } - /* FALLTHROUGH */ - case IFM_100_TX: - DBPRINT(sc, BCE_INFO_PHY, Enabling MII interface.\n); - val |= BCE_EMAC_MODE_PORT_MII; - sc-bce_link_up = TRUE; - break; - case IFM_2500_SX: - DBPRINT(sc, BCE_INFO_PHY, Enabling 2.5G MAC mode.\n); - val |= BCE_EMAC_MODE_25G; - /* FALLTHROUGH */ - case IFM_1000_T: - case IFM_1000_SX: - DBPRINT(sc, BCE_INFO_PHY, Enabling GMII interface.\n); - val |= BCE_EMAC_MODE_PORT_GMII; - sc-bce_link_up = TRUE; - if (bce_verbose || bootverbose) - BCE_PRINTF(Gigabit link up!\n); - break; - default: - DBPRINT(sc, BCE_INFO_PHY, Unknown link speed.\n); + switch (IFM_SUBTYPE(mii-mii_media_active)) { + case IFM_10_T: + if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { + DBPRINT(sc, BCE_INFO_PHY, + Enabling 10Mb interface.\n); + val |= BCE_EMAC_MODE_PORT_MII_10; break; } + /* fall-through */ + case IFM_100_TX: + DBPRINT(sc, BCE_INFO_PHY, Enabling MII interface.\n); + val |= BCE_EMAC_MODE_PORT_MII; + break; + case IFM_2500_SX: + DBPRINT(sc, BCE_INFO_PHY, Enabling 2.5G MAC mode.\n); + val |= BCE_EMAC_MODE_25G; + /* fall-through */ + case IFM_1000_T: + case IFM_1000_SX: + DBPRINT(sc, BCE_INFO_PHY, Enabling GMII interface.\n); + val |= BCE_EMAC_MODE_PORT_GMII; + break; + default: + DBPRINT(sc, BCE_INFO_PHY, Unknown link speed, enabling + default GMII interface.\n); + val |= BCE_EMAC_MODE_PORT_GMII; } - if (sc-bce_link_up == FALSE) - return; - /* Set half or full duplex based on PHY settings. */ if ((mii-mii_media_active IFM_GMASK) == IFM_HDX) { DBPRINT(sc, BCE_INFO_PHY, @@ -2052,7 +2036,7 @@ bce_miibus_statchg(device_t dev) REG_WR(sc, BCE_EMAC_MODE, val); - if ((mii-mii_media_active IFM_ETH_RXPAUSE) != 0) { + if
svn commit: r234595 - stable/7/sys/dev/bce
Author: yongari Date: Mon Apr 23 03:42:23 2012 New Revision: 234595 URL: http://svn.freebsd.org/changeset/base/234595 Log: MFC r234121: Back out r228476. r228476 fixed superfluous link UP/DOWN messages but broke IPMI access during boot. It's not clear why r228476 breaks IPMI and should be revisited. Reported by:Paul Guyot paulguyot ieee dot org Modified: stable/7/sys/dev/bce/if_bce.c stable/7/sys/dev/bce/if_bcereg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/bce/if_bce.c == --- stable/7/sys/dev/bce/if_bce.c Mon Apr 23 03:40:39 2012 (r234594) +++ stable/7/sys/dev/bce/if_bce.c Mon Apr 23 03:42:23 2012 (r234595) @@ -1986,7 +1986,6 @@ static void bce_miibus_statchg(device_t dev) { struct bce_softc *sc; - struct ifnet *ifp; struct mii_data *mii; int val; @@ -1994,57 +1993,42 @@ bce_miibus_statchg(device_t dev) DBENTER(BCE_VERBOSE_PHY); - ifp = sc-bce_ifp; mii = device_get_softc(sc-bce_miibus); - if (mii == NULL || ifp == NULL || - (ifp-if_drv_flags IFF_DRV_RUNNING) == 0) - return; - sc-bce_link_up = FALSE; val = REG_RD(sc, BCE_EMAC_MODE); val = ~(BCE_EMAC_MODE_PORT | BCE_EMAC_MODE_HALF_DUPLEX | BCE_EMAC_MODE_MAC_LOOP | BCE_EMAC_MODE_FORCE_LINK | BCE_EMAC_MODE_25G); /* Set MII or GMII interface based on the PHY speed. */ - if ((mii-mii_media_status (IFM_ACTIVE | IFM_AVALID)) == - (IFM_ACTIVE | IFM_AVALID)) { - switch (IFM_SUBTYPE(mii-mii_media_active)) { - case IFM_10_T: - if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { - DBPRINT(sc, BCE_INFO_PHY, - Enabling 10Mb interface.\n); - val |= BCE_EMAC_MODE_PORT_MII_10; - sc-bce_link_up = TRUE; - break; - } - /* FALLTHROUGH */ - case IFM_100_TX: - DBPRINT(sc, BCE_INFO_PHY, Enabling MII interface.\n); - val |= BCE_EMAC_MODE_PORT_MII; - sc-bce_link_up = TRUE; - break; - case IFM_2500_SX: - DBPRINT(sc, BCE_INFO_PHY, Enabling 2.5G MAC mode.\n); - val |= BCE_EMAC_MODE_25G; - /* FALLTHROUGH */ - case IFM_1000_T: - case IFM_1000_SX: - DBPRINT(sc, BCE_INFO_PHY, Enabling GMII interface.\n); - val |= BCE_EMAC_MODE_PORT_GMII; - sc-bce_link_up = TRUE; - if (bce_verbose || bootverbose) - BCE_PRINTF(Gigabit link up!\n); - break; - default: - DBPRINT(sc, BCE_INFO_PHY, Unknown link speed.\n); + switch (IFM_SUBTYPE(mii-mii_media_active)) { + case IFM_10_T: + if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { + DBPRINT(sc, BCE_INFO_PHY, + Enabling 10Mb interface.\n); + val |= BCE_EMAC_MODE_PORT_MII_10; break; } + /* fall-through */ + case IFM_100_TX: + DBPRINT(sc, BCE_INFO_PHY, Enabling MII interface.\n); + val |= BCE_EMAC_MODE_PORT_MII; + break; + case IFM_2500_SX: + DBPRINT(sc, BCE_INFO_PHY, Enabling 2.5G MAC mode.\n); + val |= BCE_EMAC_MODE_25G; + /* fall-through */ + case IFM_1000_T: + case IFM_1000_SX: + DBPRINT(sc, BCE_INFO_PHY, Enabling GMII interface.\n); + val |= BCE_EMAC_MODE_PORT_GMII; + break; + default: + DBPRINT(sc, BCE_INFO_PHY, Unknown link speed, enabling + default GMII interface.\n); + val |= BCE_EMAC_MODE_PORT_GMII; } - if (sc-bce_link_up == FALSE) - return; - /* Set half or full duplex based on PHY settings. */ if ((mii-mii_media_active IFM_GMASK) == IFM_HDX) { DBPRINT(sc, BCE_INFO_PHY, @@ -2056,7 +2040,7 @@ bce_miibus_statchg(device_t dev) REG_WR(sc, BCE_EMAC_MODE, val); - if ((mii-mii_media_active IFM_ETH_RXPAUSE) != 0) { + if ((mii-mii_media_active IFM_ETH_RXPAUSE) != 0) { DBPRINT(sc, BCE_INFO_PHY, %s(): Enabling RX flow control.\n, __FUNCTION__); BCE_SETBIT(sc,
Re: svn commit: r234356 - in head: gnu/lib/csu lib/clang lib/csu/powerpc
On 23.04.12 02:55, Nathan Whitehorn wrote: On 04/22/12 15:41, Andreas Tobler wrote: On 16.04.12 23:36, Dimitry Andric wrote: Author: dim Date: Mon Apr 16 21:36:55 2012 New Revision: 234356 URL: http://svn.freebsd.org/changeset/base/234356 Log: Work around an issue on 32-bit PowerPC, where clang executable can get too big, causing 'relocation truncated to fit' errors at link time. Reviewed by:nwhitehorn Did you build and boot a 32-bit world with gcc? I get an unusable install with this commit, every command segfaults. This is on a G5 SMP with 32-bit OS, gcc built. 64-bit world/kernel did boot. I hadn't tested it before acking the review request. This does appear to break everything for 32-bit PPC. Have you looked into why? Can this be reverted in the interim? I noticed this last night. It took some time to bisect. And my target is unbootable atm. I will investigate later this evening. Andreas ___ 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