Re: svn commit: r290550 - head/release/tools
You are correct, thank you for noticing. I've committed the fix as r290573, which will be merged to stable/10 along with r290550. Glen On Mon, Nov 09, 2015 at 01:49:29PM +0800, Howard Su wrote: > tmpfs doesn't support noatime option. please remove it. > > On Mon, Nov 9, 2015 at 2:02 AM, Glen Barber wrote: > > > Author: gjb > > Date: Sun Nov 8 18:02:39 2015 > > New Revision: 290550 > > URL: https://svnweb.freebsd.org/changeset/base/290550 > > > > Log: > > Use tmpfs(5) instead of md(4) for '/tmp' mount. > > > > Submitted by: Nikolai Lifanov > > Differential Revision:D3506 > > MFC after:3 days > > Sponsored by: The FreeBSD Foundation > > > > Modified: > > head/release/tools/arm.subr > > > > Modified: head/release/tools/arm.subr > > > > == > > --- head/release/tools/arm.subr Sun Nov 8 18:00:44 2015(r290549) > > +++ head/release/tools/arm.subr Sun Nov 8 18:02:39 2015(r290550) > > @@ -110,7 +110,7 @@ arm_install_base() { > > >> ${CHROOTDIR}/${DESTDIR}/etc/fstab > > echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \ > > >> ${CHROOTDIR}/${DESTDIR}/etc/fstab > > - echo "md /tmp mfs rw,noatime,-s30m 0 0" \ > > + echo "tmpfs /tmp tmpfs rw,noatime,mode=1777,size=30m 0 0" \ > > >> ${CHROOTDIR}/${DESTDIR}/etc/fstab > > > > local hostname > > ___ > > svn-src-head@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/svn-src-head > > To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org" > > > > > > -- > -Howard signature.asc Description: PGP signature
svn commit: r290573 - head/release/tools
Author: gjb Date: Mon Nov 9 06:30:26 2015 New Revision: 290573 URL: https://svnweb.freebsd.org/changeset/base/290573 Log: Remove noatime from tmpfs(5) fstab(5) entry. Submitted by: Howard Su MFC after:3 days X-MFC-With: r290550 Sponsored by: The FreeBSD Foundation Modified: head/release/tools/arm.subr Modified: head/release/tools/arm.subr == --- head/release/tools/arm.subr Mon Nov 9 06:24:11 2015(r290572) +++ head/release/tools/arm.subr Mon Nov 9 06:30:26 2015(r290573) @@ -110,7 +110,7 @@ arm_install_base() { >> ${CHROOTDIR}/${DESTDIR}/etc/fstab echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab - echo "tmpfs /tmp tmpfs rw,noatime,mode=1777,size=30m 0 0" \ + echo "tmpfs /tmp tmpfs rw,mode=1777,size=30m 0 0" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab local hostname ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290572 - in head: lib/libc/tests/gen tools/regression/lib/libc/gen
Author: ngie Date: Mon Nov 9 06:24:11 2015 New Revision: 290572 URL: https://svnweb.freebsd.org/changeset/base/290572 Log: Integrate tools/regression/lib/libc/gen into the FreeBSD test suite as lib/libc/tests/gen The code in test-fnmatch that was used for generating: - bin/sh/tests/builtins/case2.0 - bin/sh/tests/builtins/case3.0 has been left undisturbed. The target `make sh-tests` has been moved over from tools/regression/lib/libc/gen/Makefile to lib/libc/tests/gen/Makefile and made into a PHONY target case2.0 and case3.0 test input generation isn't being done automatically. This needs additional discussion. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Added: head/lib/libc/tests/gen/fmtcheck_test.c - copied, changed from r290571, head/tools/regression/lib/libc/gen/test-fmtcheck.c head/lib/libc/tests/gen/fmtmsg_test.c - copied, changed from r290571, head/tools/regression/lib/libc/gen/test-fmtmsg.c head/lib/libc/tests/gen/fnmatch_test.c - copied, changed from r290571, head/tools/regression/lib/libc/gen/test-fnmatch.c head/lib/libc/tests/gen/fnmatch_testcases.h (contents, props changed) head/lib/libc/tests/gen/ftw_test.c - copied, changed from r290571, head/tools/regression/lib/libc/gen/test-ftw.c head/lib/libc/tests/gen/popen_test.c - copied, changed from r290571, head/tools/regression/lib/libc/gen/test-popen.c head/lib/libc/tests/gen/posix_spawn_test.c - copied, changed from r290571, head/tools/regression/lib/libc/gen/test-posix_spawn.c head/lib/libc/tests/gen/test-fnmatch.c (contents, props changed) head/lib/libc/tests/gen/wordexp_test.c - copied, changed from r290571, head/tools/regression/lib/libc/gen/test-wordexp.c Deleted: head/tools/regression/lib/libc/gen/ Modified: head/lib/libc/tests/gen/Makefile Modified: head/lib/libc/tests/gen/Makefile == --- head/lib/libc/tests/gen/MakefileMon Nov 9 06:16:38 2015 (r290571) +++ head/lib/libc/tests/gen/MakefileMon Nov 9 06:24:11 2015 (r290572) @@ -2,8 +2,15 @@ .include -ATF_TESTS_C= arc4random_test +ATF_TESTS_C+= arc4random_test +ATF_TESTS_C+= fmtcheck2_test +ATF_TESTS_C+= fmtmsg_test +ATF_TESTS_C+= fnmatch2_test ATF_TESTS_C+= fpclassify2_test +ATF_TESTS_C+= ftw_test +ATF_TESTS_C+= popen_test +ATF_TESTS_C+= posix_spawn_test +ATF_TESTS_C+= wordexp_test # TODO: t_closefrom, t_cpuset, t_fmtcheck, t_randomid, t_sleep # TODO: t_siginfo (fixes require further inspection) @@ -53,7 +60,25 @@ DPADD.nice_test+=${LIBPTHREAD} LDADD.syslog_test+=-lpthread DPADD.syslog_test+=${LIBPTHREAD} +CFLAGS+= -I${.CURDIR} + +SRCS.fmtcheck2_test= fmtcheck_test.c +SRCS.fnmatch2_test=fnmatch_test.c + TESTS_SUBDIRS= execve TESTS_SUBDIRS+=posix_spawn +# The old testcase name +TEST_FNMATCH= test-fnmatch +CLEANFILES+= ${GEN_SH_CASE_TESTCASES} +sh-tests: .PHONY +.for target in clean obj depend all + @cd ${.CURDIR} && ${MAKE} PROG=${TEST_FNMATCH} \ + -DNO_SUBDIR ${target} +.endfor + @cd ${.OBJDIR} && ./${TEST_FNMATCH} -s 1 > \ + ${SRCTOP}/bin/sh/tests/builtins/case2.0 + @cd ${.OBJDIR} && ./${TEST_FNMATCH} -s 2 > \ + ${SRCTOP}/bin/sh/tests/builtins/case3.0 + .include Copied and modified: head/lib/libc/tests/gen/fmtcheck_test.c (from r290571, head/tools/regression/lib/libc/gen/test-fmtcheck.c) == --- head/tools/regression/lib/libc/gen/test-fmtcheck.c Mon Nov 9 06:16:38 2015(r290571, copy source) +++ head/lib/libc/tests/gen/fmtcheck_test.c Mon Nov 9 06:24:11 2015 (r290572) @@ -31,10 +31,13 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include +#include + struct test_fmt { char*fmt1; char*fmt2; @@ -72,31 +75,31 @@ struct test_fmt { { "%p %30s %#llx %-10.*e", "This number %lu%% and string %s has %qd numbers and %.*g floats", 1 }, }; -int -main(int argc, char *argv[]) +ATF_TC_WITHOUT_HEAD(fmtcheck_test); +ATF_TC_BODY(fmtcheck_test, tc) { - int i, n, r; - const char *f, *cf, *f1, *f2; + int i; + const char *f, *cf, *f1, *f2; - printf("1..1\n"); - r = 0; - n = sizeof(test_fmts) / sizeof(test_fmts[0]); - for (i=0 ; i __FBSDID("$FreeBSD$"); +#include #include - #include #include #include @@ -37,6 +37,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + static char *run_test(long classification, const char *label, int severity, const char *text, const char *action, const char *tag); @@ -217,18 +219,14 @@ run_test(long classification, const char return (result); } -int -main(void) +ATF_TC_WITHOUT
svn commit: r290571 - head/lib/libc/tests/gen
Author: ngie Date: Mon Nov 9 06:16:38 2015 New Revision: 290571 URL: https://svnweb.freebsd.org/changeset/base/290571 Log: Fix some TAP -> ATF conversion errors - Remove a leftover printf from when this was a TAP based testcase - Catch mmap failures properly MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/tests/gen/arc4random_test.c Modified: head/lib/libc/tests/gen/arc4random_test.c == --- head/lib/libc/tests/gen/arc4random_test.c Mon Nov 9 02:29:38 2015 (r290570) +++ head/lib/libc/tests/gen/arc4random_test.c Mon Nov 9 06:16:38 2015 (r290571) @@ -30,10 +30,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include + #include /* @@ -56,14 +58,9 @@ ATF_TC_BODY(test_arc4random, tc) pid_t pid; char c; - printf("1..1\n"); - page = mmap(NULL, sizeof(struct shared_page), PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED, -1, 0); - if (page == MAP_FAILED) { - printf("fail 1 - mmap\n"); - exit(1); - } + ATF_REQUIRE_MSG(page != MAP_FAILED, "mmap failed; errno=%d", errno); arc4random_buf(&c, 1); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r290550 - head/release/tools
tmpfs doesn't support noatime option. please remove it. On Mon, Nov 9, 2015 at 2:02 AM, Glen Barber wrote: > Author: gjb > Date: Sun Nov 8 18:02:39 2015 > New Revision: 290550 > URL: https://svnweb.freebsd.org/changeset/base/290550 > > Log: > Use tmpfs(5) instead of md(4) for '/tmp' mount. > > Submitted by: Nikolai Lifanov > Differential Revision:D3506 > MFC after:3 days > Sponsored by: The FreeBSD Foundation > > Modified: > head/release/tools/arm.subr > > Modified: head/release/tools/arm.subr > > == > --- head/release/tools/arm.subr Sun Nov 8 18:00:44 2015(r290549) > +++ head/release/tools/arm.subr Sun Nov 8 18:02:39 2015(r290550) > @@ -110,7 +110,7 @@ arm_install_base() { > >> ${CHROOTDIR}/${DESTDIR}/etc/fstab > echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \ > >> ${CHROOTDIR}/${DESTDIR}/etc/fstab > - echo "md /tmp mfs rw,noatime,-s30m 0 0" \ > + echo "tmpfs /tmp tmpfs rw,noatime,mode=1777,size=30m 0 0" \ > >> ${CHROOTDIR}/${DESTDIR}/etc/fstab > > local hostname > ___ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org" > -- -Howard ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290570 - head/cddl/usr.sbin/dtrace/tests
Author: ngie Date: Mon Nov 9 02:29:38 2015 New Revision: 290570 URL: https://svnweb.freebsd.org/changeset/base/290570 Log: Reduce the Makefile snippet complexity a bit - Set BINDIR to TESTSDIR globally (and subsequently, remove all `${FILESGROUP}DIR` setting because BINDIR is set to `TESTSDIR`) - Set MAN to "" globally, instead of per-PROG MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/cddl/usr.sbin/dtrace/tests/Makefile.inc1 Modified: head/cddl/usr.sbin/dtrace/tests/Makefile.inc1 == --- head/cddl/usr.sbin/dtrace/tests/Makefile.inc1 Mon Nov 9 01:53:54 2015(r290569) +++ head/cddl/usr.sbin/dtrace/tests/Makefile.inc1 Mon Nov 9 02:29:38 2015(r290570) @@ -10,9 +10,6 @@ ${TESTGROUP}= ${TESTFILES} ${TESTGROUP}EXE= ${TESTEXES} ${TESTGROUP}EXEMODE= 0555 -${TESTGROUP}DIR= ${TESTSDIR} -${TESTGROUP}EXEDIR= ${TESTSDIR} - TESTWRAPPER= t_dtrace_contrib ATF_TESTS_SH+= ${TESTWRAPPER} TEST_METADATA.t_dtrace_contrib+= required_files="/usr/local/bin/ksh" @@ -30,14 +27,15 @@ CLEANFILES+=${TESTWRAPPER}.sh PROGS= ${CFILES:T:S/.c$/.exe/g} .for prog in ${PROGS} SRCS.${prog}+= ${prog:S/.exe$/.c/} -BINDIR.${prog}= ${TESTSDIR} -MAN.${prog}= .if exists(${prog:S/^tst.//:S/.exe$/.d/}) SRCS.${prog}+= ${prog:S/^tst.//:S/.exe$/.d/} .endif .endfor +BINDIR=${TESTSDIR} +MAN= + # Some tests depend on the internals of their corresponding test programs, # so make sure the optimizer doesn't interfere with them. CFLAGS+= -O0 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290568 - head/sys/arm64/arm64
Author: emaste Date: Mon Nov 9 01:49:25 2015 New Revision: 290568 URL: https://svnweb.freebsd.org/changeset/base/290568 Log: Fix typo in message from arm64 ITS workaround Modified: head/sys/arm64/arm64/gic_v3_its.c Modified: head/sys/arm64/arm64/gic_v3_its.c == --- head/sys/arm64/arm64/gic_v3_its.c Mon Nov 9 01:05:31 2015 (r290567) +++ head/sys/arm64/arm64/gic_v3_its.c Mon Nov 9 01:49:25 2015 (r290568) @@ -189,7 +189,7 @@ gic_v3_its_attach(device_t dev) */ if (device_get_unit(dev) != 0) { device_printf(dev, - "Only single instance of ITS is supported, exitting...\n"); + "Only single instance of ITS is supported, exiting...\n"); return (ENXIO); } sc->its_socket = 0; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290567 - in head: etc/mtree usr.bin/limits usr.bin/limits/tests
Author: ngie Date: Mon Nov 9 01:05:31 2015 New Revision: 290567 URL: https://svnweb.freebsd.org/changeset/base/290567 Log: Add some basic tests that exercise cputime limits with limits(1) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Added: head/usr.bin/limits/tests/ head/usr.bin/limits/tests/Makefile (contents, props changed) head/usr.bin/limits/tests/limits_test.sh (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/usr.bin/limits/Makefile Modified: head/etc/mtree/BSD.tests.dist == --- head/etc/mtree/BSD.tests.dist Mon Nov 9 00:19:04 2015 (r290566) +++ head/etc/mtree/BSD.tests.dist Mon Nov 9 01:05:31 2015 (r290567) @@ -554,6 +554,8 @@ .. lastcomm .. +limits +.. m4 .. mkimg Modified: head/usr.bin/limits/Makefile == --- head/usr.bin/limits/MakefileMon Nov 9 00:19:04 2015 (r290566) +++ head/usr.bin/limits/MakefileMon Nov 9 01:05:31 2015 (r290567) @@ -1,6 +1,12 @@ # $FreeBSD$ +.include + PROG= limits LIBADD=util +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/usr.bin/limits/tests/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/limits/tests/Makefile Mon Nov 9 01:05:31 2015 (r290567) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +ATF_TESTS_SH+= limits_test + +.include Added: head/usr.bin/limits/tests/limits_test.sh == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/limits/tests/limits_test.shMon Nov 9 01:05:31 2015 (r290567) @@ -0,0 +1,65 @@ +# +# Copyright 2015 EMC Corp. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# $FreeBSD$ +# + +# Make sure time(1) is consistent with the FreeBSD time command and not the +# shell interpretation of time(1) +TIME=/usr/bin/time + +atf_test_case cputime_hard_flag +cputime_hard_flag_body() +{ + + atf_check -e empty -o match:'cputime[[:space:]]+3 secs' -s exit:0 \ + limits -H -t 3 limits -H + atf_check -e empty -o match:'cputime[[:space:]]+3 secs' -s exit:0 \ + limits -H -t 3 limits -S + atf_check -e match:'real[[:space:]]+[34]\.[0-9][0-9]' -o empty -s signal:sigkill \ + limits -H -t 3 $TIME -p sh -c 'while : ; do : ; done' +} + +SIGXCPU=24 # atf_check doesn't know sigxcpu + +atf_test_case cputime_soft_flag +cputime_soft_flag_body() +{ + + atf_check -e empty -o match:'cputime-max[[:space:]]+infinity secs' -s exit:0 \ + limits -S -t 3 limits -H + atf_check -e empty -o match:'cputime-cur[[:space:]]+3 secs' -s exit:0 \ + limits -S -t 3 limits -S + atf_check -e match:'real[[:space:]]+[34]\.[0-9][0-9]' -o empty -s signal:$SIGXCPU \ + limits -S -t 3 $TIME -p sh -c 'while : ; do : ; done' +} + +atf_init_test_cases() +{ + + atf_add_test_case cputime_hard_flag + atf_add_test_case cputime_soft_flag +} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290566 - in head/sys/dev: re rl
Author: marius Date: Mon Nov 9 00:19:04 2015 New Revision: 290566 URL: https://svnweb.freebsd.org/changeset/base/290566 Log: - Although it doesn't make a whole lot of sense to enable RX and TX before their initial configuration is done, it turns out that r281337 has the inverse effect on some older chips. Moreover, as with newer chips before, two chips seemingly identical according to their MAC revisions may behave differently in this regard, with most working but a few not, making changes extremely hard to test. Closer inspection of the corresponding Linux code suggests that RX and TX should only be enabled after their initial configuration with RTL8168G and later chips, i. e. RTL8106E{,US}, RTL8107E, as well as RTL8168{EP,G,GU,H}, so limit the new code path to these. [1] - Distinguish between RTL8168H and RTL8107E, with the latter being the 10/100-Mbit/s-only variant of the former. - For MAC variants that can only do Fast Ethernet at a maximum, ensure that we don't advertise Gigabit Ethernet speed. - In re_stop(), do the inverse of re_init_locked() and enable RXDV gate on RTL8168G and later chips again, matching what Linux does. PR: 203422 [1] MFC after:1 week Modified: head/sys/dev/re/if_re.c head/sys/dev/rl/if_rlreg.h Modified: head/sys/dev/re/if_re.c == --- head/sys/dev/re/if_re.c Sun Nov 8 23:46:05 2015(r290565) +++ head/sys/dev/re/if_re.c Mon Nov 9 00:19:04 2015(r290566) @@ -636,9 +636,8 @@ re_miibus_statchg(device_t dev) } } /* -* RealTek controllers does not provide any interface to -* Tx/Rx MACs for resolved speed, duplex and flow-control -* parameters. +* RealTek controllers do not provide any interface to the RX/TX +* MACs for resolved speed, duplex and flow-control parameters. */ } @@ -660,7 +659,7 @@ re_set_rxmode(struct rl_softc *sc) rxfilt = RL_RXCFG_CONFIG | RL_RXCFG_RX_INDIV | RL_RXCFG_RX_BROAD; if ((sc->rl_flags & RL_FLAG_EARLYOFF) != 0) rxfilt |= RL_RXCFG_EARLYOFF; - else if ((sc->rl_flags & RL_FLAG_EARLYOFFV2) != 0) + else if ((sc->rl_flags & RL_FLAG_8168G_PLUS) != 0) rxfilt |= RL_RXCFG_EARLYOFFV2; if (ifp->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) { @@ -1207,11 +1206,10 @@ re_attach(device_t dev) struct rl_softc *sc; struct ifnet*ifp; const struct rl_hwrev *hw_rev; + int capmask, error = 0, hwrev, i, msic, msixc, + phy, reg, rid; u_int32_t cap, ctl; - int hwrev; u_int16_t devid, re_did = 0; - int error = 0, i, phy, rid; - int msic, msixc, reg; uint8_t cfg; sc = device_get_softc(dev); @@ -1486,17 +1484,17 @@ re_attach(device_t dev) break; case RL_HWREV_8168EP: case RL_HWREV_8168G: - case RL_HWREV_8168H: case RL_HWREV_8411B: sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_JUMBOV2 | RL_FLAG_CMDSTOP_WAIT_TXQ | RL_FLAG_WOL_MANLINK | - RL_FLAG_EARLYOFFV2 | RL_FLAG_RXDV_GATED; + RL_FLAG_8168G_PLUS; break; case RL_HWREV_8168GU: + case RL_HWREV_8168H: if (pci_get_device(dev) == RT_DEVICEID_8101E) { - /* RTL8106EUS */ + /* RTL8106E(US), RTL8107E */ sc->rl_flags |= RL_FLAG_FASTETHER; } else sc->rl_flags |= RL_FLAG_JUMBOV2 | RL_FLAG_WOL_MANLINK; @@ -1504,7 +1502,7 @@ re_attach(device_t dev) sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_CMDSTOP_WAIT_TXQ | - RL_FLAG_EARLYOFFV2 | RL_FLAG_RXDV_GATED; + RL_FLAG_8168G_PLUS; break; case RL_HWREV_8169_8110SB: case RL_HWREV_8169_8110SBL: @@ -1654,8 +1652,11 @@ re_attach(device_t dev) phy = RE_PHYAD_INTERNAL; if (sc->rl_type == RL_8169) phy = 1; + capmask = BMSR_DEFCAPMASK; + if ((sc->rl_flags & RL_FLAG_FASTETHER) != 0) +capmask &= ~BMSR_EXTSTAT; error = mii_attach(dev, &sc->rl_miibus, ifp, re_ifmedia_upd, - re_ifmedia_sts, BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, MIIF_DOPAUSE); + re_ifmedia_sts, capmask, phy, MII_OFFSET_ANY, MIIF_DOPAUSE); if (error != 0) { device_printf(dev, "
Re: svn commit: r290565 - head/release/scripts
On Sun, Nov 08, 2015 at 11:46:05PM +, Simon J. Gerraty wrote: > Author: sjg > Date: Sun Nov 8 23:46:05 2015 > New Revision: 290565 > URL: https://svnweb.freebsd.org/changeset/base/290565 > > Log: > Ensure TEMPROOT is unique, to guard against multiple builds on same machine. > > Differential Revision: D3002 > Reviewed by:gjb Technically, I did not review the change, I just did not object to your proposal. :) Glen signature.asc Description: PGP signature
svn commit: r290565 - head/release/scripts
Author: sjg Date: Sun Nov 8 23:46:05 2015 New Revision: 290565 URL: https://svnweb.freebsd.org/changeset/base/290565 Log: Ensure TEMPROOT is unique, to guard against multiple builds on same machine. Differential Revision:D3002 Reviewed by: gjb Modified: head/release/scripts/mm-mtree.sh Modified: head/release/scripts/mm-mtree.sh == --- head/release/scripts/mm-mtree.shSun Nov 8 23:21:54 2015 (r290564) +++ head/release/scripts/mm-mtree.shSun Nov 8 23:46:05 2015 (r290565) @@ -30,7 +30,7 @@ display_usage () { # Set the default path for the temporary root environment # -TEMPROOT='/var/tmp/temproot' +TEMPROOT=`TMPDIR=/var/tmp mktemp -d -t temproot` # Assign the location of the mtree database # ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290564 - head/sys/dev/usb/wlan
Author: avos Date: Sun Nov 8 23:21:54 2015 New Revision: 290564 URL: https://svnweb.freebsd.org/changeset/base/290564 Log: urtwn(4): improve RX filter. - Filter out unneeded frames in STA mode. - Implement ic_promisc() call. Tested with RTL8188EU, STA and MONITOR modes. Reviewed by: kevlo Approved by: adrian (mentor) Differential Revision:https://reviews.freebsd.org/D3999 Modified: head/sys/dev/usb/wlan/if_urtwn.c head/sys/dev/usb/wlan/if_urtwnreg.h Modified: head/sys/dev/usb/wlan/if_urtwn.c == --- head/sys/dev/usb/wlan/if_urtwn.cSun Nov 8 23:06:40 2015 (r290563) +++ head/sys/dev/usb/wlan/if_urtwn.cSun Nov 8 23:21:54 2015 (r290564) @@ -269,6 +269,8 @@ static void urtwn_set_gain(struct urtwn static voidurtwn_scan_start(struct ieee80211com *); static voidurtwn_scan_end(struct ieee80211com *); static voidurtwn_set_channel(struct ieee80211com *); +static voidurtwn_set_promisc(struct urtwn_softc *); +static voidurtwn_update_promisc(struct ieee80211com *); static voidurtwn_update_mcast(struct ieee80211com *); static voidurtwn_set_chan(struct urtwn_softc *, struct ieee80211_channel *, @@ -457,6 +459,7 @@ urtwn_attach(device_t self) ic->ic_parent = urtwn_parent; ic->ic_vap_create = urtwn_vap_create; ic->ic_vap_delete = urtwn_vap_delete; + ic->ic_update_promisc = urtwn_update_promisc; ic->ic_update_mcast = urtwn_update_mcast; ieee80211_radiotap_attach(ic, &sc->sc_txtap.wt_ihdr, @@ -1574,22 +1577,6 @@ urtwn_newstate(struct ieee80211vap *vap, break; case IEEE80211_S_RUN: if (vap->iv_opmode == IEEE80211_M_MONITOR) { - /* Enable Rx of data frames. */ - urtwn_write_2(sc, R92C_RXFLTMAP2, 0x); - - /* Enable Rx of ctrl frames. */ - urtwn_write_2(sc, R92C_RXFLTMAP1, 0x); - - /* -* Accept data/control/management frames -* from any BSSID. -*/ - urtwn_write_4(sc, R92C_RCR, - (urtwn_read_4(sc, R92C_RCR) & ~(R92C_RCR_APM | - R92C_RCR_CBSSID_DATA | R92C_RCR_CBSSID_BCN)) | - R92C_RCR_ADF | R92C_RCR_ACF | R92C_RCR_AMF | - R92C_RCR_AAP); - /* Turn link LED on. */ urtwn_set_led(sc, URTWN_LED_LINK, 1); break; @@ -1618,9 +1605,11 @@ urtwn_newstate(struct ieee80211vap *vap, urtwn_write_2(sc, R92C_BCN_INTERVAL, ni->ni_intval); /* Allow Rx from our BSSID only. */ - urtwn_write_4(sc, R92C_RCR, - urtwn_read_4(sc, R92C_RCR) | - R92C_RCR_CBSSID_DATA | R92C_RCR_CBSSID_BCN); + if (ic->ic_promisc == 0) { + urtwn_write_4(sc, R92C_RCR, + urtwn_read_4(sc, R92C_RCR) | + R92C_RCR_CBSSID_DATA | R92C_RCR_CBSSID_BCN); + } /* Enable TSF synchronization. */ urtwn_tsf_sync_enable(sc); @@ -2755,21 +2744,50 @@ urtwn_pa_bias_init(struct urtwn_softc *s static void urtwn_rxfilter_init(struct urtwn_softc *sc) { - /* Initialize Rx filter. */ - /* TODO: use better filter for monitor mode. */ - urtwn_write_4(sc, R92C_RCR, - R92C_RCR_AAP | R92C_RCR_APM | R92C_RCR_AM | R92C_RCR_AB | - R92C_RCR_APP_ICV | R92C_RCR_AMF | R92C_RCR_HTC_LOC_CTRL | - R92C_RCR_APP_MIC | R92C_RCR_APP_PHYSTS); + struct ieee80211com *ic = &sc->sc_ic; + struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); + uint32_t rcr; + uint16_t filter; + + URTWN_ASSERT_LOCKED(sc); + /* Accept all multicast frames. */ urtwn_write_4(sc, R92C_MAR + 0, 0x); urtwn_write_4(sc, R92C_MAR + 4, 0x); - /* Accept all management frames. */ - urtwn_write_2(sc, R92C_RXFLTMAP0, 0x); + + /* Filter for management frames. */ + filter = 0x7f3f; + if (vap->iv_opmode == IEEE80211_M_STA) { + filter &= ~( + R92C_RXFLTMAP_SUBTYPE(IEEE80211_FC0_SUBTYPE_ASSOC_REQ) | + R92C_RXFLTMAP_SUBTYPE(IEEE80211_FC0_SUBTYPE_REASSOC_REQ) | + R92C_RXFLTMAP_SUBTYPE(IEEE80211_FC0_SUBTYPE_PROBE_REQ)); + } + urtwn_write_2(sc, R92C_RXFLTMAP0, filter); + /* Reject all control frames. */ urtwn_write_2(sc, R92C_RXFLTMAP1, 0x); - /* Accept all data frames. */ - urtwn_write_2(sc, R92C_RXFLTMAP2, 0x); + + /* Reject all data frames. */ +
svn commit: r290563 - in head: lib/libc/tests/net tools/regression/lib/libc/net
Author: ngie Date: Sun Nov 8 23:06:40 2015 New Revision: 290563 URL: https://svnweb.freebsd.org/changeset/base/290563 Log: Integrate tools/regression/lib/libc/net into the FreeBSD test suite as lib/libc/tests/net Also, fix eui64_aton_test:test_str(..). The test was comparing the result of eui64_aton to a pointer of the expected result. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Added: head/lib/libc/tests/net/ether_test.c - copied, changed from r290562, head/tools/regression/lib/libc/net/test-ether.c head/lib/libc/tests/net/eui64_aton_test.c - copied, changed from r290562, head/tools/regression/lib/libc/net/test-eui64_aton.c head/lib/libc/tests/net/eui64_ntoa_test.c - copied, changed from r290562, head/tools/regression/lib/libc/net/test-eui64_ntoa.c head/lib/libc/tests/net/test-eui64.h - copied unchanged from r290562, head/tools/regression/lib/libc/net/test-eui64.h Deleted: head/tools/regression/lib/libc/net/ Modified: head/lib/libc/tests/net/Makefile Modified: head/lib/libc/tests/net/Makefile == --- head/lib/libc/tests/net/MakefileSun Nov 8 22:23:21 2015 (r290562) +++ head/lib/libc/tests/net/MakefileSun Nov 8 23:06:40 2015 (r290563) @@ -1,22 +1,23 @@ # $FreeBSD$ -.include +ATF_TESTS_C+= ether_test +ATF_TESTS_C+= eui64_aton_test +ATF_TESTS_C+= eui64_ntoa_test -BINDIR=${TESTSDIR} +CFLAGS+= -I${.CURDIR} -NETBSD_ATF_TESTS_C=getprotoent_test +NETBSD_ATF_TESTS_C+= getprotoent_test NETBSD_ATF_TESTS_C+= ether_aton_test -SRCS.t_ether_aton= aton_ether_subr.c t_ether_aton.c - -aton_ether_subr.c: gen_ether_subr ${.CURDIR:H:H:H:H}/sys/net/if_ethersubr.c - ${HOST_SH} ${.ALLSRC} ${.TARGET} +SRCS.ether_aton_test= aton_ether_subr.c t_ether_aton.c # TODO: hostent_test NETBSD_ATF_TESTS_SH= nsdispatch_test NETBSD_ATF_TESTS_SH+= protoent_test NETBSD_ATF_TESTS_SH+= servent_test +BINDIR=${TESTSDIR} + PROGS= h_nsd_recurse PROGS+=h_protoent PROGS+=h_servent @@ -26,12 +27,14 @@ DPADD.h_nsd_recurse+= ${LIBPTHREAD} LDADD.h_nsd_recurse+= -lpthread CLEANFILES+= aton_ether_subr.c +aton_ether_subr.c: gen_ether_subr ${SRCTOP}/sys/net/if_ethersubr.c + ${HOST_SH} ${.ALLSRC} ${.TARGET} .include "../Makefile.netbsd-tests" # TODO: the testcases needs to be ported to FreeBSD #TESTS_SUBDIRS=getaddrinfo -FILES= hosts +FILES+=hosts FILES+=resolv.conf .include Copied and modified: head/lib/libc/tests/net/ether_test.c (from r290562, head/tools/regression/lib/libc/net/test-ether.c) == --- head/tools/regression/lib/libc/net/test-ether.c Sun Nov 8 22:23:21 2015(r290562, copy source) +++ head/lib/libc/tests/net/ether_test.cSun Nov 8 23:06:40 2015 (r290563) @@ -30,206 +30,163 @@ #include +#include #include #include -static int testnum; +#include -#defineOK()do { \ - printf("ok %d %s\n", testnum, __func__);\ - return; \ -} while (0) - -#defineNOTOK(why) do { \ - printf("not ok %d %s # %s\n", testnum, __func__, why); \ - return; \ -} while (0) - -#defineTODO() NOTOK("TODO") - -static const char *ether_line_string = - "01:23:45:67:89:ab ether_line_hostname"; -static const char *ether_line_hostname = "ether_line_hostname"; +static const char *ether_line_string = "01:23:45:67:89:ab ether_line_hostname"; +static const char *ether_line_hostname = "ether_line_hostname"; static const struct ether_addr ether_line_addr = { { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab } }; -static void -test_ether_line(void) +ATF_TC_WITHOUT_HEAD(ether_line); +ATF_TC_BODY(ether_line, tc) { struct ether_addr e; char hostname[256]; - testnum++; - if (ether_line(ether_line_string, &e, hostname) != 0) - NOTOK("returned error"); - if (bcmp(&e, ðer_line_addr, ETHER_ADDR_LEN) != 0) - NOTOK("bad address"); - if (strcmp(hostname, ether_line_hostname) != 0) { - printf("hostname: %s\n", hostname); - NOTOK("bad hostname"); - } - OK(); + ATF_REQUIRE_MSG(ether_line(ether_line_string, &e, hostname) == 0, + "ether_line failed; errno=%d", errno); + ATF_REQUIRE_MSG(bcmp(&e, ðer_line_addr, ETHER_ADDR_LEN) == 0, + "bad address"); + ATF_REQUIRE_MSG(strcmp(hostname, ether_line_hostname) == 0, + "bad hostname"); }
Re: svn commit: r290494 - in head: . contrib/ipfilter contrib/llvm/lib/Target/Sparc/AsmParser contrib/llvm/lib/Target/Sparc/Disassembler contrib/llvm/lib/Target/Sparc/InstPrinter contrib/netbsd-tests/
On Mon, Nov 09, 2015 at 01:23:21AM +0300, Andrey Chernov wrote: > On 09.11.2015 0:41, Baptiste Daroussin wrote: > >>> Deleted: head/lib/libc/locale/ascii.c > >> > >> BTW, why this one is deleted (along with ASCII locales)? It > >> serves its job as "strict ASCII checker" right. > >> > > The ASCII locales are still there, just using the same rules for > > everything as their unicode counter part except of course for > > LC_CTYPE. > > > > There was no left usage for that code so I removed it. If there are > > strong opinions for bringing it back, I can do it. > > ascii.c specifically test for bit8 and sets EILSEQ (unlike, say, > ISO-8859-1 Unicode subset or C locale). IMHO it should be restored. > hum, ok make sense. I'll make some regression tests and bring it back as soon as I can. Best regards, Bapt signature.asc Description: PGP signature
Re: svn commit: r290562 - head/usr.bin/localedef
> On Nov 8, 2015, at 14:23, Baptiste Daroussin wrote: > > Author: bapt > Date: Sun Nov 8 22:23:21 2015 > New Revision: 290562 > URL: https://svnweb.freebsd.org/changeset/base/290562 > > Log: > lower again the warnings and remove the pragmas unsupported by gcc 4.2.1 Thank you. Hopefully this will unbreak mips and partially unbreak sparc64 (sparc64 is still hung up on a mismatched definition between strsignal in string.h and contrib/gcc). ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r290494 - in head: . contrib/ipfilter contrib/llvm/lib/Target/Sparc/AsmParser contrib/llvm/lib/Target/Sparc/Disassembler contrib/llvm/lib/Target/Sparc/InstPrinter contrib/netbsd-tests/
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 09.11.2015 0:41, Baptiste Daroussin wrote: >>> Deleted: head/lib/libc/locale/ascii.c >> >> BTW, why this one is deleted (along with ASCII locales)? It >> serves its job as "strict ASCII checker" right. >> > The ASCII locales are still there, just using the same rules for > everything as their unicode counter part except of course for > LC_CTYPE. > > There was no left usage for that code so I removed it. If there are > strong opinions for bringing it back, I can do it. ascii.c specifically test for bit8 and sets EILSEQ (unlike, say, ISO-8859-1 Unicode subset or C locale). IMHO it should be restored. - -- http://ache.vniz.net/ -BEGIN PGP SIGNATURE- iQEcBAEBCAAGBQJWP8tZAAoJEKUckv0MjfbK7KIIAMWRvRbZAA2hHAV2FBOoW5uh HmKI76M3drrx+em0gtreA3VaZ+kmNDax4u6yS9Wdfz3Ajhotyu0AGzvagX1e6bF4 TjCatprbXZZY/iAMqgvjXtsPCv6Mc62jHXfch+bG2alDhJRFChvNj6Dhg3tMvF5b WesMy+lKuna3cs5lmV6TbOmBWGivKcNwT+0S4Go3OMcuYxsVYKFwZZKABtpe9HQo VRdwU8cSwionUnQPgdrf6kLBlT+Ou6NGc6C4eV6TGxlHyDY/MdqgS0qzMEa5BoS4 rBtXYmeZEQ19vp6gJ4x4va6/4bZ3AUFXn6xFAKVEjeKMjLfOTUz0E5jr9WovRj4= =Hy7z -END PGP SIGNATURE- ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290562 - head/usr.bin/localedef
Author: bapt Date: Sun Nov 8 22:23:21 2015 New Revision: 290562 URL: https://svnweb.freebsd.org/changeset/base/290562 Log: lower again the warnings and remove the pragmas unsupported by gcc 4.2.1 Modified: head/usr.bin/localedef/Makefile head/usr.bin/localedef/monetary.c head/usr.bin/localedef/numeric.c head/usr.bin/localedef/time.c Modified: head/usr.bin/localedef/Makefile == --- head/usr.bin/localedef/Makefile Sun Nov 8 21:57:35 2015 (r290561) +++ head/usr.bin/localedef/Makefile Sun Nov 8 22:23:21 2015 (r290562) @@ -13,7 +13,7 @@ SRCS= charmap.c \ time.c \ wide.c -WARNS= 5 +WARNS= 3 ${SRCS:M*.c}: parser.h parser.h: parser.y Modified: head/usr.bin/localedef/monetary.c == --- head/usr.bin/localedef/monetary.c Sun Nov 8 21:57:35 2015 (r290561) +++ head/usr.bin/localedef/monetary.c Sun Nov 8 22:23:21 2015 (r290562) @@ -151,9 +151,6 @@ add_monetary_num(int n) } } -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wcast-qual" - void reset_monetary_group(void) { @@ -178,8 +175,6 @@ add_monetary_group(int n) mon.mon_grouping = s; } -#pragma GCC diagnostic pop - void dump_monetary(void) { Modified: head/usr.bin/localedef/numeric.c == --- head/usr.bin/localedef/numeric.cSun Nov 8 21:57:35 2015 (r290561) +++ head/usr.bin/localedef/numeric.cSun Nov 8 22:23:21 2015 (r290562) @@ -77,9 +77,6 @@ add_numeric_str(wchar_t *wcs) } } -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wcast-qual" - void reset_numeric_group(void) { @@ -104,8 +101,6 @@ add_numeric_group(int n) numeric.grouping = s; } -#pragma GCC diagnostic pop - void dump_numeric(void) { Modified: head/usr.bin/localedef/time.c == --- head/usr.bin/localedef/time.c Sun Nov 8 21:57:35 2015 (r290561) +++ head/usr.bin/localedef/time.c Sun Nov 8 22:23:21 2015 (r290562) @@ -187,9 +187,6 @@ check_time_list(void) fprintf(stderr,"too few items in list (%d)", last_kw); } -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wcast-qual" - void reset_time_list(void) { @@ -228,8 +225,6 @@ reset_time_list(void) } } -#pragma GCC diagnostic pop - void dump_time(void) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290561 - head/lib/libc/tests/locale
Author: ngie Date: Sun Nov 8 21:57:35 2015 New Revision: 290561 URL: https://svnweb.freebsd.org/changeset/base/290561 Log: Delete leftover printfs from when these were TAP tests MFC after: 1 week X-MFC with: r290532 Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/tests/locale/mblen_test.c head/lib/libc/tests/locale/mbrtoc16_test.c head/lib/libc/tests/locale/mbrtowc_test.c head/lib/libc/tests/locale/mbsrtowcs_test.c Modified: head/lib/libc/tests/locale/mblen_test.c == --- head/lib/libc/tests/locale/mblen_test.c Sun Nov 8 21:38:46 2015 (r290560) +++ head/lib/libc/tests/locale/mblen_test.c Sun Nov 8 21:57:35 2015 (r290561) @@ -53,8 +53,6 @@ ATF_TC_BODY(mblen_test, tc) * C/POSIX locale. */ - printf("1..1\n"); - ATF_REQUIRE(MB_CUR_MAX == 1); /* No shift states in C locale. */ Modified: head/lib/libc/tests/locale/mbrtoc16_test.c == --- head/lib/libc/tests/locale/mbrtoc16_test.c Sun Nov 8 21:38:46 2015 (r290560) +++ head/lib/libc/tests/locale/mbrtoc16_test.c Sun Nov 8 21:57:35 2015 (r290561) @@ -53,8 +53,6 @@ ATF_TC_BODY(mbrtoc16_test, tc) * C/POSIX locale. */ - printf("1..1\n"); - /* Null wide character, internal state. */ ATF_REQUIRE(mbrtoc16(&c16, "", 1, NULL) == 0); ATF_REQUIRE(c16 == 0); Modified: head/lib/libc/tests/locale/mbrtowc_test.c == --- head/lib/libc/tests/locale/mbrtowc_test.c Sun Nov 8 21:38:46 2015 (r290560) +++ head/lib/libc/tests/locale/mbrtowc_test.c Sun Nov 8 21:57:35 2015 (r290561) @@ -57,8 +57,6 @@ ATF_TC_BODY(mbrtowc_test, tc) * C/POSIX locale. */ - printf("1..1\n"); - ATF_REQUIRE(MB_CUR_MAX == 1); /* Null wide character, internal state. */ Modified: head/lib/libc/tests/locale/mbsrtowcs_test.c == --- head/lib/libc/tests/locale/mbsrtowcs_test.c Sun Nov 8 21:38:46 2015 (r290560) +++ head/lib/libc/tests/locale/mbsrtowcs_test.c Sun Nov 8 21:57:35 2015 (r290561) @@ -57,8 +57,6 @@ ATF_TC_BODY(mbsrtowcs_test, tc) * C/POSIX locale. */ - printf("1..1\n"); - /* Simple null terminated string. */ memset(srcbuf, 0xcc, sizeof(srcbuf)); strcpy(srcbuf, "hello"); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r290494 - in head: . contrib/ipfilter contrib/llvm/lib/Target/Sparc/AsmParser contrib/llvm/lib/Target/Sparc/Disassembler contrib/llvm/lib/Target/Sparc/InstPrinter contrib/netbsd-tests/
On Sun, Nov 08, 2015 at 11:04:36PM +0300, Andrey Chernov wrote: > On 07.11.2015 15:43, Baptiste Daroussin wrote: > > Log: > > Improve collation string and locales support > ... > > Deleted: > > head/lib/libc/locale/ascii.c > > BTW, why this one is deleted (along with ASCII locales)? It serves its > job as "strict ASCII checker" right. > The ASCII locales are still there, just using the same rules for everything as their unicode counter part except of course for LC_CTYPE. There was no left usage for that code so I removed it. If there are strong opinions for bringing it back, I can do it. Best regards, Bapt signature.asc Description: PGP signature
svn commit: r290560 - head/lib/libc/tests/stdio
Author: ngie Date: Sun Nov 8 21:38:46 2015 New Revision: 290560 URL: https://svnweb.freebsd.org/changeset/base/290560 Log: Convert print_positional_test over to ATF Somehow missed in r290537 X-MFC with: r290537 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/tests/stdio/print_positional_test.c Modified: head/lib/libc/tests/stdio/print_positional_test.c == --- head/lib/libc/tests/stdio/print_positional_test.c Sun Nov 8 21:22:24 2015(r290559) +++ head/lib/libc/tests/stdio/print_positional_test.c Sun Nov 8 21:38:46 2015(r290560) @@ -37,6 +37,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + const char correct[] = "|xx 01 02 03 04\n" "|xx 05 06 07 08\n" @@ -53,15 +55,13 @@ const char correct[] = const char correct2[] = "b bs BSD"; +static char buf[1024]; +static wchar_t wbuf1[1024], wbuf2[1024]; +static const char *temp; -int -main(int argc, char *argv[]) +ATF_TC_WITHOUT_HEAD(positional_normal); +ATF_TC_BODY(positional_normal, tc) { - char buf[1024]; - wchar_t wbuf1[1024], wbuf2[1024]; - const char *temp; - - printf("1..4\n"); /* Test positional arguments */ snprintf(buf, sizeof buf, @@ -86,8 +86,13 @@ main(int argc, char *argv[]) "37", "38", "39", "40", "41", "42", "43", "44", 45, -1L, 1LL, -1, 1LL ); - printf("%sok 1 - print-positional normal\n", - strcmp(buf, correct) == 0 ? "" : "not "); + ATF_REQUIRE_MSG(wcscmp(wbuf1, wbuf2) == 0, + "buffers didn't match"); +} + +ATF_TC_WITHOUT_HEAD(positional_wide); +ATF_TC_BODY(positional_wide, tc) +{ swprintf(wbuf1, sizeof wbuf1, L"|xx %1$s %2$s %3$s %4$s\n" @@ -113,20 +118,39 @@ main(int argc, char *argv[]) ); temp = correct; mbsrtowcs(wbuf2, &temp, sizeof wbuf2, NULL); - printf("%sok 2 - print-positional wide\n", - wcscmp(wbuf1, wbuf2) == 0 ? "" : "not "); + ATF_REQUIRE_MSG(wcscmp(wbuf1, wbuf2) == 0, + "buffers didn't match"); +} + +ATF_TC_WITHOUT_HEAD(positional_precision); +ATF_TC_BODY(positional_precision, tc) +{ snprintf(buf, sizeof buf, "%2$.*4$s %2$.*3$s %1$s", "BSD", "bsd", 2, 1); - printf("%sok 3 - print-positional precision\n", - strcmp(buf, correct2) == 0 ? "" : "not "); + ATF_REQUIRE_MSG(strcmp(buf, correct2) == 0, + "buffers didn't match"); +} + +ATF_TC_WITHOUT_HEAD(positional_precision_wide); +ATF_TC_BODY(positional_precision_wide, tc) +{ swprintf(wbuf1, sizeof buf, L"%2$.*4$s %2$.*3$s %1$s", "BSD", "bsd", 2, 1); temp = correct2; mbsrtowcs(wbuf2, &temp, sizeof wbuf2, NULL); - printf("%sok 4 - print-positional precision wide\n", - wcscmp(wbuf1, wbuf2) == 0 ? "" : "not "); + ATF_REQUIRE_MSG(wcscmp(wbuf1, wbuf2) == 0, + "buffers didn't match"); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, positional_normal); + ATF_TP_ADD_TC(tp, positional_wide); + ATF_TP_ADD_TC(tp, positional_precision); + ATF_TP_ADD_TC(tp, positional_precision_wide); - exit(0); + return (atf_no_error()); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290559 - head/usr.bin/localedef
Author: bapt Date: Sun Nov 8 21:22:24 2015 New Revision: 290559 URL: https://svnweb.freebsd.org/changeset/base/290559 Log: Eliminate some gcc pragmas Modified: head/usr.bin/localedef/collate.c head/usr.bin/localedef/wide.c Modified: head/usr.bin/localedef/collate.c == --- head/usr.bin/localedef/collate.cSun Nov 8 21:08:31 2015 (r290558) +++ head/usr.bin/localedef/collate.cSun Nov 8 21:22:24 2015 (r290559) @@ -435,24 +435,19 @@ subst_compare(const void *n1, const void RB_GENERATE_STATIC(substs, subst, entry, subst_compare); -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wcast-qual" - static int subst_compare_ref(const void *n1, const void *n2) { - int32_t *c1 = ((subst_t *)n1)->ref; - int32_t *c2 = ((subst_t *)n2)->ref; + const wchar_t *c1 = ((const subst_t *)n1)->ref; + const wchar_t *c2 = ((const subst_t *)n2)->ref; int rv; - rv = wcscmp((wchar_t *)c1, (wchar_t *)c2); + rv = wcscmp(c1, c2); return ((rv < 0) ? -1 : (rv > 0) ? 1 : 0); } RB_GENERATE_STATIC(substs_ref, subst, entry_ref, subst_compare_ref); -#pragma GCC diagnostic pop - void init_collate(void) { Modified: head/usr.bin/localedef/wide.c == --- head/usr.bin/localedef/wide.c Sun Nov 8 21:08:31 2015 (r290558) +++ head/usr.bin/localedef/wide.c Sun Nov 8 21:22:24 2015 (r290559) @@ -310,15 +310,12 @@ tomb_utf8(char *mb, wchar_t wc) * 0x8000 - 0x - 2 byte encoding */ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wcast-qual" - static int towide_dbcs(wchar_t *wc, const char *mb, unsigned n) { wchar_t c; - c = *(uint8_t *)mb; + c = *(const uint8_t *)mb; if ((c & 0x80) == 0) { /* 7-bit */ @@ -408,7 +405,7 @@ towide_gb18030(wchar_t *wc, const char * { wchar_t c; - c = *(uint8_t *)mb; + c = *(const uint8_t *)mb; if ((c & 0x80) == 0) { /* 7-bit */ @@ -451,7 +448,7 @@ towide_mskanji(wchar_t *wc, const char * { wchar_t c; - c = *(uint8_t *)mb; + c = *(const uint8_t *)mb; if ((c < 0x80) || ((c > 0xa0) && (c < 0xe0))) { /* 7-bit */ @@ -487,7 +484,7 @@ towide_euc_impl(wchar_t *wc, const char int width = 2; wchar_t c; - c = *(uint8_t *)mb; + c = *(const uint8_t *)mb; /* * All variations of EUC encode 7-bit ASCII as one byte, and use @@ -528,8 +525,6 @@ towide_euc_impl(wchar_t *wc, const char return (width); } -#pragma GCC diagnostic pop - /* * EUC-CN encodes as follows: * ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290558 - head/sys/arm64/conf
Author: emaste Date: Sun Nov 8 21:08:31 2015 New Revision: 290558 URL: https://svnweb.freebsd.org/changeset/base/290558 Log: Sync arm64 GENERIC whitespace/comments with amd64 Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/conf/GENERIC Modified: head/sys/arm64/conf/GENERIC == --- head/sys/arm64/conf/GENERIC Sun Nov 8 21:06:51 2015(r290557) +++ head/sys/arm64/conf/GENERIC Sun Nov 8 21:08:31 2015(r290558) @@ -28,7 +28,7 @@ options SCHED_ULE # ULE scheduler optionsPREEMPTION # Enable kernel thread preemption optionsINET# InterNETworking optionsINET6 # IPv6 communications protocols -optionsIPSEC # IP (v4/v6) security +optionsIPSEC # IP (v4/v6) security optionsTCP_OFFLOAD # TCP offload optionsSCTP# Stream Control Transmission Protocol optionsFFS # Berkeley Fast Filesystem @@ -38,8 +38,8 @@ options UFS_DIRHASH # Improve performa optionsUFS_GJOURNAL# Enable gjournal-based UFS journaling optionsQUOTA # Enable disk quotas for UFS optionsMD_ROOT # MD is a potential root device -optionsNFSCL # New Network Filesystem Client -optionsNFSD# New Network Filesystem Server +optionsNFSCL # Network Filesystem Client +optionsNFSD# Network Filesystem Server optionsNFSLOCKD# Network Lock Manager optionsNFS_ROOT# NFS usable as /, requires NFSCL optionsMSDOSFS # MSDOS Filesystem @@ -95,8 +95,8 @@ devicevirtio_blk device vtnet # Bus drivers -optionsPCI_IOV device pci +optionsPCI_IOV # PCI SR-IOV support # Ethernet NICs device vnic# Cavium ThunderX NIC ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290557 - head/sys/dev/ofw
Author: andreast Date: Sun Nov 8 21:06:51 2015 New Revision: 290557 URL: https://svnweb.freebsd.org/changeset/base/290557 Log: Improve r290373, do a runtime check rather than a compile time switch. I learned that the Power8 and the PS3 have a mix of OFW and FDT. Both have AIM defined. But currently they are not affected. They have no I2C devices under OFW. This version was tested on a Quad G5 and build tested for armv6*. Discussed withnwhitehorn@ Reviewed by: ian@ Modified: head/sys/dev/ofw/ofw_iicbus.c Modified: head/sys/dev/ofw/ofw_iicbus.c == --- head/sys/dev/ofw/ofw_iicbus.c Sun Nov 8 20:56:04 2015 (r290556) +++ head/sys/dev/ofw/ofw_iicbus.c Sun Nov 8 21:06:51 2015 (r290557) @@ -101,9 +101,13 @@ ofw_iicbus_attach(device_t dev) { struct iicbus_softc *sc = IICBUS_SOFTC(dev); struct ofw_iicbus_devinfo *dinfo; - phandle_t child, node; + phandle_t child, node, root; pcell_t freq, paddr; device_t childdev; + ssize_t compatlen; + char compat[255]; + char *curstr; + u_int iic_addr_8bit = 0; sc->dev = dev; mtx_init(&sc->lock, "iicbus", NULL, MTX_DEF); @@ -125,6 +129,21 @@ ofw_iicbus_attach(device_t dev) bus_enumerate_hinted_children(dev); /* +* Check if we're running on a PowerMac, needed for the I2C +* address below. +*/ + root = OF_peer(0); + compatlen = OF_getprop(root, "compatible", compat, + sizeof(compat)); + if (compatlen != -1) { + for (curstr = compat; curstr < compat + compatlen; + curstr += strlen(curstr) + 1) { + if (strncmp(curstr, "MacRISC", 7) == 0) + iic_addr_8bit = 1; + } + } + + /* * Attach those children represented in the device tree. */ for (child = OF_child(node); child != 0; child = OF_peer(child)) { @@ -153,11 +172,11 @@ ofw_iicbus_attach(device_t dev) * Linux FDT data contains 7-bit values, so shift them up to * 8-bit format. */ -#ifdef AIM - dinfo->opd_dinfo.addr = paddr; -#else - dinfo->opd_dinfo.addr = paddr << 1; -#endif + if (iic_addr_8bit) + dinfo->opd_dinfo.addr = paddr; + else + dinfo->opd_dinfo.addr = paddr << 1; + if (ofw_bus_gen_setup_devinfo(&dinfo->opd_obdinfo, child) != 0) { free(dinfo, M_DEVBUF); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290556 - head/usr.sbin
Author: emaste Date: Sun Nov 8 20:56:04 2015 New Revision: 290556 URL: https://svnweb.freebsd.org/changeset/base/290556 Log: arm64: build usr.sbin/acpi subdirectory The arm64 platform will in general use ACPI so we want these tools built there. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/Makefile.arm64 Modified: head/usr.sbin/Makefile.arm64 == --- head/usr.sbin/Makefile.arm64Sun Nov 8 19:29:34 2015 (r290555) +++ head/usr.sbin/Makefile.arm64Sun Nov 8 20:56:04 2015 (r290556) @@ -1,3 +1,6 @@ # $FreeBSD$ +.if ${MK_ACPI} != "no" +SUBDIR+= acpi +.endif SUBDIR+= ofwdump ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r290512 - head/usr.bin/localedef
hiya, not enough! On 7 November 2015 at 12:31, Baptiste Daroussin wrote: > Author: bapt > Date: Sat Nov 7 20:31:23 2015 > New Revision: 290512 > URL: https://svnweb.freebsd.org/changeset/base/290512 > > Log: > Bump warning level > > Modified: > head/usr.bin/localedef/Makefile > > Modified: head/usr.bin/localedef/Makefile > == > --- head/usr.bin/localedef/Makefile Sat Nov 7 20:29:23 2015 > (r290511) > +++ head/usr.bin/localedef/Makefile Sat Nov 7 20:31:23 2015 > (r290512) > @@ -13,7 +13,7 @@ SRCS= charmap.c \ > time.c \ > wide.c > > -WARNS= 3 > +WARNS= 5 > ${SRCS:M*.c}: parser.h > parser.h: parser.y > > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r290494 - in head: . contrib/ipfilter contrib/llvm/lib/Target/Sparc/AsmParser contrib/llvm/lib/Target/Sparc/Disassembler contrib/llvm/lib/Target/Sparc/InstPrinter contrib/netbsd-tests/
On 07.11.2015 15:43, Baptiste Daroussin wrote: > Log: > Improve collation string and locales support ... > Deleted: > head/lib/libc/locale/ascii.c BTW, why this one is deleted (along with ASCII locales)? It serves its job as "strict ASCII checker" right. -- http://ache.vniz.net/ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290555 - head/sys/dev/drm2/i915
Author: dumbbell Date: Sun Nov 8 19:29:34 2015 New Revision: 290555 URL: https://svnweb.freebsd.org/changeset/base/290555 Log: drm/i915: Reduce diff with Linux 3.8 There is no functional change. The goal is to ease the future update to Linux 3.8's i915 driver. MFC after:2 months Modified: head/sys/dev/drm2/i915/intel_fb.c Modified: head/sys/dev/drm2/i915/intel_fb.c == --- head/sys/dev/drm2/i915/intel_fb.c Sun Nov 8 19:08:38 2015 (r290554) +++ head/sys/dev/drm2/i915/intel_fb.c Sun Nov 8 19:29:34 2015 (r290555) @@ -32,9 +32,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include -#include static int intelfb_create(struct intel_fbdev *ifbdev, struct drm_fb_helper_surface_size *sizes) @@ -45,7 +45,7 @@ static int intelfb_create(struct intel_f #endif struct fb_info *info; struct drm_framebuffer *fb; - struct drm_mode_fb_cmd2 mode_cmd; + struct drm_mode_fb_cmd2 mode_cmd = {}; struct drm_i915_gem_object *obj; int size, ret; @@ -57,7 +57,7 @@ static int intelfb_create(struct intel_f mode_cmd.height = sizes->surface_height; mode_cmd.pitches[0] = roundup2(mode_cmd.width * ((sizes->surface_bpp + 7) / -8), 64); + 8), 64); mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, sizes->surface_depth); @@ -143,6 +143,7 @@ static int intelfb_create(struct intel_f drm_fb_helper_fill_var(info, &ifbdev->helper, sizes->fb_width, sizes->fb_height); /* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */ + DRM_DEBUG_KMS("allocated %dx%d (s %dbits) fb: 0x%08x, bo %p\n", fb->width, fb->height, fb->depth, obj->gtt_offset, obj); @@ -222,8 +223,7 @@ int intel_fbdev_init(struct drm_device * drm_i915_private_t *dev_priv = dev->dev_private; int ret; - ifbdev = malloc(sizeof(struct intel_fbdev), DRM_MEM_KMS, - M_WAITOK | M_ZERO); + ifbdev = malloc(sizeof(struct intel_fbdev), DRM_MEM_KMS, M_WAITOK | M_ZERO); dev_priv->fbdev = ifbdev; ifbdev->helper.funcs = &intel_fb_helper_funcs; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r286337 - head/sys/contrib/dev/ath/ath_hal/ar9300
On Sun, Nov 8, 2015 at 8:26 PM, Oliver Pinter wrote: > On Sun, Nov 8, 2015 at 8:24 PM, Adrian Chadd wrote: >> i'm burnt out and still too busy fixing issues introduced into -head >> (both wifi and low-memory platform support.) > > That's bad to read. :( > >> >> Someone else at this stage has to MFC things :( > > Renator, Avos anyone else? Sorry, Renato > >> >> Sorry, >> >> >> -a >> >> >> On 8 November 2015 at 10:49, Oliver Pinter >> wrote: >>> On 8/19/15, Renato Botelho wrote: > On Aug 19, 2015, at 18:31, Adrian Chadd wrote: > > jim asked me again to do the MFC, so once I've finished doing some > more tidying up of bits and pieces I'll do the MFC. >>> >>> What's the status of this MFC? You need a tester or you have a patch? >>> Thank you very much! -- Renato Botelho ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r286337 - head/sys/contrib/dev/ath/ath_hal/ar9300
On Sun, Nov 8, 2015 at 8:24 PM, Adrian Chadd wrote: > i'm burnt out and still too busy fixing issues introduced into -head > (both wifi and low-memory platform support.) That's bad to read. :( > > Someone else at this stage has to MFC things :( Renator, Avos anyone else? > > Sorry, > > > -a > > > On 8 November 2015 at 10:49, Oliver Pinter > wrote: >> On 8/19/15, Renato Botelho wrote: On Aug 19, 2015, at 18:31, Adrian Chadd wrote: jim asked me again to do the MFC, so once I've finished doing some more tidying up of bits and pieces I'll do the MFC. >> >> What's the status of this MFC? You need a tester or you have a patch? >> >>> >>> Thank you very much! >>> >>> -- >>> Renato Botelho >>> >>> ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r286337 - head/sys/contrib/dev/ath/ath_hal/ar9300
i'm burnt out and still too busy fixing issues introduced into -head (both wifi and low-memory platform support.) Someone else at this stage has to MFC things :( Sorry, -a On 8 November 2015 at 10:49, Oliver Pinter wrote: > On 8/19/15, Renato Botelho wrote: >>> On Aug 19, 2015, at 18:31, Adrian Chadd wrote: >>> >>> jim asked me again to do the MFC, so once I've finished doing some >>> more tidying up of bits and pieces I'll do the MFC. > > What's the status of this MFC? You need a tester or you have a patch? > >> >> Thank you very much! >> >> -- >> Renato Botelho >> >> ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290554 - head/tools/tools/locale/tools
Author: bapt Date: Sun Nov 8 19:08:38 2015 New Revision: 290554 URL: https://svnweb.freebsd.org/changeset/base/290554 Log: Modify the tool that generates the locales so that the generated CJK locales are padded as expected by the users Submitted by: marino Obtained from:DragonflyBSD Modified: head/tools/tools/locale/tools/cldr2def.pl Modified: head/tools/tools/locale/tools/cldr2def.pl == --- head/tools/tools/locale/tools/cldr2def.pl Sun Nov 8 18:48:35 2015 (r290553) +++ head/tools/tools/locale/tools/cldr2def.pl Sun Nov 8 19:08:38 2015 (r290554) @@ -1,4 +1,5 @@ #!/usr/local/bin/perl -wC +# $FreeBSD$ use strict; use File::Copy; @@ -66,6 +67,7 @@ my %callback = ( mdorder => \&callback_mdorder, altmon => \&callback_altmon, cformat => \&callback_cformat, + cbabmon => \&callback_abmon, data => undef, ); @@ -173,7 +175,7 @@ if ($TYPE eq "msgdef") { if ($TYPE eq "timedef") { %keys = ( - "abmon" => "as", + "abmon" => " "as", "abday" => "as", "day" => "as", @@ -226,6 +228,30 @@ sub callback_altmon { return $s; } +sub callback_abmon { + # for specified CJK locales, pad result with a space to enable + # columns to line up (style established in FreeBSD in 2001) + my $s = shift; + my $nl = $callback{data}{l} . "_" . $callback{data}{c}; + + if ($nl eq 'ja_JP' || $nl eq 'ko_KR' || $nl eq 'zh_CN' || + $nl eq 'zh_HK' || $nl eq 'zh_TW') { + my @monthnames = split(";", $s); + my @cleaned; + foreach (@monthnames) + { + if ($_ =~ /^"<(two|three|four|five|six|seven|eight|nine)>/ || + ($_ =~ /^"/ && $_ !~ /^"(||)/)) + { + $_ =~ s/^"/"/; + } + push @cleaned, $_; + } + return join(";",@cleaned); + } + return $s; +} + sub get_unidata { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r286337 - head/sys/contrib/dev/ath/ath_hal/ar9300
On 8/19/15, Renato Botelho wrote: >> On Aug 19, 2015, at 18:31, Adrian Chadd wrote: >> >> jim asked me again to do the MFC, so once I've finished doing some >> more tidying up of bits and pieces I'll do the MFC. What's the status of this MFC? You need a tester or you have a patch? > > Thank you very much! > > -- > Renato Botelho > > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290553 - head/sys/contrib/vchiq/interface/vchiq_arm
Author: skra Date: Sun Nov 8 18:48:35 2015 New Revision: 290553 URL: https://svnweb.freebsd.org/changeset/base/290553 Log: Fix pagelist bus_dmamap_t map handling. Memory for pagelist is allocated by bus_dmamem_alloc() which creates associated bus_dmamap_t map for us. When this memory is freed by bus_dmamem_free(), the map is freed as well. Thus there is no need to free it explicitly by bus_dmamap_destroy(), which leads to double freeing. Discussed with: gonzo Approved by: kib (mentor) Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c == --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Sun Nov 8 18:11:24 2015(r290552) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Sun Nov 8 18:48:35 2015(r290553) @@ -542,9 +542,8 @@ create_pagelist(char __user *buf, size_t return 0; failed_load: - bus_dmamap_unload(bi->pagelist_dma_tag, bi->pagelist_dma_map); + bus_dmamem_free(bi->pagelist_dma_tag, bi->pagelist, bi->pagelist_dma_map); failed_alloc: - bus_dmamap_destroy(bi->pagelist_dma_tag, bi->pagelist_dma_map); bus_dma_tag_destroy(bi->pagelist_dma_tag); return err; @@ -613,7 +612,6 @@ free_pagelist(BULKINFO_T *bi, int actual bus_dmamap_unload(bi->pagelist_dma_tag, bi->pagelist_dma_map); bus_dmamem_free(bi->pagelist_dma_tag, bi->pagelist, bi->pagelist_dma_map); - bus_dmamap_destroy(bi->pagelist_dma_tag, bi->pagelist_dma_map); bus_dma_tag_destroy(bi->pagelist_dma_tag); free(bi, M_VCPAGELIST); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290552 - head/sys/kern
Author: trasz Date: Sun Nov 8 18:11:24 2015 New Revision: 290552 URL: https://svnweb.freebsd.org/changeset/base/290552 Log: Make naming more consistent; no functional changes. MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_rctl.c Modified: head/sys/kern/kern_rctl.c == --- head/sys/kern/kern_rctl.c Sun Nov 8 18:08:31 2015(r290551) +++ head/sys/kern/kern_rctl.c Sun Nov 8 18:11:24 2015(r290552) @@ -71,13 +71,13 @@ FEATURE(rctl, "Resource Limits"); #defineHRF_DONT_INHERIT1 #defineHRF_DONT_ACCUMULATE 2 -#defineRCTL_MAX_INBUFLEN 4 * 1024 -#defineRCTL_MAX_OUTBUFLEN 16 * 1024 * 1024 +#defineRCTL_MAX_INBUFSIZE 4 * 1024 +#defineRCTL_MAX_OUTBUFSIZE 16 * 1024 * 1024 #defineRCTL_LOG_BUFSIZE128 #defineRCTL_PCPU_SHIFT (10 * 100) -unsigned int rctl_maxbufsize = RCTL_MAX_OUTBUFLEN; +unsigned int rctl_maxbufsize = RCTL_MAX_OUTBUFSIZE; SYSCTL_NODE(_kern_racct, OID_AUTO, rctl, CTLFLAG_RW, 0, "Resource Limits"); SYSCTL_UINT(_kern_racct_rctl, OID_AUTO, maxbufsize, CTLFLAG_RWTUN, @@ -1278,7 +1278,7 @@ rctl_read_inbuf(char **inputstr, const c if (inbuflen <= 0) return (EINVAL); - if (inbuflen > RCTL_MAX_INBUFLEN) + if (inbuflen > RCTL_MAX_INBUFSIZE) return (E2BIG); str = malloc(inbuflen + 1, M_RCTL, M_WAITOK); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290551 - in head/sys: kern sys
Author: trasz Date: Sun Nov 8 18:08:31 2015 New Revision: 290551 URL: https://svnweb.freebsd.org/changeset/base/290551 Log: Speed up rctl(8) rule retrieval; the difference shows mostly in "rctl -n", as otherwise most of the time is spent resolving UIDs to names. Reviewed by: mjg@ MFC after:1 month Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D4059 Modified: head/sys/kern/kern_rctl.c head/sys/sys/racct.h Modified: head/sys/kern/kern_rctl.c == --- head/sys/kern/kern_rctl.c Sun Nov 8 18:02:39 2015(r290550) +++ head/sys/kern/kern_rctl.c Sun Nov 8 18:08:31 2015(r290551) @@ -71,13 +71,18 @@ FEATURE(rctl, "Resource Limits"); #defineHRF_DONT_INHERIT1 #defineHRF_DONT_ACCUMULATE 2 -/* Default buffer size for rctl_get_rules(2). */ -#defineRCTL_DEFAULT_BUFSIZE4096 -#defineRCTL_MAX_INBUFLEN 4096 +#defineRCTL_MAX_INBUFLEN 4 * 1024 +#defineRCTL_MAX_OUTBUFLEN 16 * 1024 * 1024 #defineRCTL_LOG_BUFSIZE128 #defineRCTL_PCPU_SHIFT (10 * 100) +unsigned int rctl_maxbufsize = RCTL_MAX_OUTBUFLEN; + +SYSCTL_NODE(_kern_racct, OID_AUTO, rctl, CTLFLAG_RW, 0, "Resource Limits"); +SYSCTL_UINT(_kern_racct_rctl, OID_AUTO, maxbufsize, CTLFLAG_RWTUN, +&rctl_maxbufsize, 0, "Maximum output buffer size"); + /* * 'rctl_rule_link' connects a rule with every racct it's related to. * For example, rule 'user:X:openfiles:deny=N/process' is linked @@ -1435,7 +1440,7 @@ int sys_rctl_get_rules(struct thread *td, struct rctl_get_rules_args *uap) { int error; - size_t bufsize = RCTL_DEFAULT_BUFSIZE; + size_t bufsize; char *inputstr, *buf; struct sbuf *sb; struct rctl_rule *filter; @@ -1461,12 +1466,16 @@ sys_rctl_get_rules(struct thread *td, st return (error); } -again: + bufsize = uap->outbuflen; + if (bufsize > rctl_maxbufsize) { + sx_sunlock(&allproc_lock); + return (E2BIG); + } + buf = malloc(bufsize, M_RCTL, M_WAITOK); sb = sbuf_new(NULL, buf, bufsize, SBUF_FIXEDLEN); KASSERT(sb != NULL, ("sbuf_new failed")); - sx_assert(&allproc_lock, SA_LOCKED); FOREACH_PROC_IN_SYSTEM(p) { rw_rlock(&rctl_lock); LIST_FOREACH(link, &p->p_racct->r_rule_links, rrl_next) { @@ -1489,10 +1498,8 @@ again: ui_racct_foreach(rctl_get_rules_callback, filter, sb); prison_racct_foreach(rctl_get_rules_callback, filter, sb); if (sbuf_error(sb) == ENOMEM) { - sbuf_delete(sb); - free(buf, M_RCTL); - bufsize *= 4; - goto again; + error = ERANGE; + goto out; } /* @@ -1502,7 +1509,7 @@ again: sbuf_setpos(sb, sbuf_len(sb) - 1); error = rctl_write_outbuf(sb, uap->outbufp, uap->outbuflen); - +out: rctl_rule_release(filter); sx_sunlock(&allproc_lock); free(buf, M_RCTL); @@ -1513,7 +1520,7 @@ int sys_rctl_get_limits(struct thread *td, struct rctl_get_limits_args *uap) { int error; - size_t bufsize = RCTL_DEFAULT_BUFSIZE; + size_t bufsize; char *inputstr, *buf; struct sbuf *sb; struct rctl_rule *filter; @@ -1554,7 +1561,13 @@ sys_rctl_get_limits(struct thread *td, s return (EINVAL); } -again: + bufsize = uap->outbuflen; + if (bufsize > rctl_maxbufsize) { + rctl_rule_release(filter); + sx_sunlock(&allproc_lock); + return (E2BIG); + } + buf = malloc(bufsize, M_RCTL, M_WAITOK); sb = sbuf_new(NULL, buf, bufsize, SBUF_FIXEDLEN); KASSERT(sb != NULL, ("sbuf_new failed")); @@ -1567,10 +1580,8 @@ again: } rw_runlock(&rctl_lock); if (sbuf_error(sb) == ENOMEM) { - sbuf_delete(sb); - free(buf, M_RCTL); - bufsize *= 4; - goto again; + error = ERANGE; + goto out; } /* @@ -1580,6 +1591,7 @@ again: sbuf_setpos(sb, sbuf_len(sb) - 1); error = rctl_write_outbuf(sb, uap->outbufp, uap->outbuflen); +out: rctl_rule_release(filter); sx_sunlock(&allproc_lock); free(buf, M_RCTL); Modified: head/sys/sys/racct.h == --- head/sys/sys/racct.hSun Nov 8 18:02:39 2015(r290550) +++ head/sys/sys/racct.hSun Nov 8 18:08:31 2015(r290551) @@ -37,9 +37,10 @@ #define_RACCT_H_ #include -#include -#include #include +#include +#include +#include struct proc; struct rctl_rule_link; @@ -146,6 +147,8 @@ struct racct
svn commit: r290550 - head/release/tools
Author: gjb Date: Sun Nov 8 18:02:39 2015 New Revision: 290550 URL: https://svnweb.freebsd.org/changeset/base/290550 Log: Use tmpfs(5) instead of md(4) for '/tmp' mount. Submitted by: Nikolai Lifanov Differential Revision:D3506 MFC after:3 days Sponsored by: The FreeBSD Foundation Modified: head/release/tools/arm.subr Modified: head/release/tools/arm.subr == --- head/release/tools/arm.subr Sun Nov 8 18:00:44 2015(r290549) +++ head/release/tools/arm.subr Sun Nov 8 18:02:39 2015(r290550) @@ -110,7 +110,7 @@ arm_install_base() { >> ${CHROOTDIR}/${DESTDIR}/etc/fstab echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab - echo "md /tmp mfs rw,noatime,-s30m 0 0" \ + echo "tmpfs /tmp tmpfs rw,noatime,mode=1777,size=30m 0 0" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab local hostname ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290549 - head/lib/libc/stdio
Author: ache Date: Sun Nov 8 18:00:44 2015 New Revision: 290549 URL: https://svnweb.freebsd.org/changeset/base/290549 Log: Reorganize code to elimitate one _sseek() call for append modes. MFC after: 1 week Modified: head/lib/libc/stdio/ftell.c Modified: head/lib/libc/stdio/ftell.c == --- head/lib/libc/stdio/ftell.c Sun Nov 8 17:33:48 2015(r290548) +++ head/lib/libc/stdio/ftell.c Sun Nov 8 18:00:44 2015(r290549) @@ -98,7 +98,20 @@ _ftello(FILE *fp, fpos_t *offset) * Find offset of underlying I/O object, then * adjust for buffered bytes. */ - if (fp->_flags & __SOFF) + if (!(fp->_flags & __SRD) && (fp->_flags & __SWR) && + fp->_p != NULL && fp->_p - fp->_bf._base > 0 && + ((fp->_flags & __SAPP) || (fp->_flags2 & __S2OAP))) { + if ((pos = _sseek(fp, (fpos_t)0, SEEK_END)) == -1) { + if (errno == ESPIPE || + (fp->_flags & __SOPT) || __sflush(fp) || + (pos = _sseek(fp, (fpos_t)0, SEEK_CUR)) == -1) + return (1); + else { + *offset = pos; + return (0); + } + } + } else if (fp->_flags & __SOFF) pos = fp->_offset; else { pos = _sseek(fp, (fpos_t)0, SEEK_CUR); @@ -125,26 +138,6 @@ _ftello(FILE *fp, fpos_t *offset) * position to be greater than that in the * underlying object. */ - if ((fp->_flags & __SAPP) || (fp->_flags2 & __S2OAP)) { - int serrno = errno; - - errno = 0; - if ((pos = _sseek(fp, (fpos_t)0, SEEK_END)) == -1) { - if (errno == ESPIPE || - (fp->_flags & __SOPT) || __sflush(fp) || - (pos = - _sseek(fp, (fpos_t)0, SEEK_CUR)) == -1) - return (1); - else { - errno = serrno; - *offset = pos; - return (0); - } - } - errno = serrno; - /* fp->_p can be changed in _sseek(), recalculate. */ - n = fp->_p - fp->_bf._base; - } if (pos > OFF_MAX - n) { errno = EOVERFLOW; return (1); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r290522 - head/share/timedef
On Sat, Nov 07, 2015 at 04:15:08PM -0800, Bryan Drewery wrote: > On 11/7/2015 4:08 PM, Baptiste Daroussin wrote: > > On Sat, Nov 07, 2015 at 11:54:14PM +, Hajimu UMEMOTO wrote: > >> Author: ume > >> Date: Sat Nov 7 23:54:14 2015 > >> New Revision: 290522 > >> URL: https://svnweb.freebsd.org/changeset/base/290522 > >> > >> Log: > >> Fix alignment of the short month names for CJK locales, > >> as far as I could edit them. > >> > > > > They are auto generated, I will try to have a look to fix the generation > > tool so > > we won't get hit by it next time. > > > > Thanks for the fix! > > > > How much effort is involved to generate them? Should the build generate > them instead? > The effort is really easy now, all the work was to get the proper tools which we now have on tools/tools/locales this work was already done by edwin@ there is a wiki page about it (forgot the link) and extended by marino@ on dfly. Best regards, Bapt signature.asc Description: PGP signature
Re: svn commit: r290522 - head/share/timedef
On Sun, Nov 08, 2015 at 08:49:42PM +0900, Hajimu UMEMOTO wrote: > Hi, > > > On Sun, 8 Nov 2015 01:08:18 +0100 > > Baptiste Daroussin said: > > bapt> They are auto generated, I will try to have a look to fix the > generation tool so > bapt> we won't get hit by it next time. > > Oops, I dodn't notice that. > It seems that Linux does similar way. > I think it should be fixed by the origin data rather than by the > generation tool. > I don't test it, but perhaps the attached change should fix it: > > bapt> Thanks for the fix! > > You are welcome. > > Sincerely, > The origin data are available there http://cldr.unicode.org/ they have a trac (sorry I do not remember the link :)) to report issues. We are right now at v27 the tools to generate our sources are in tools/tools/locale/*. In the meantime marino@ has modified the tools to generate CJK correctly I will bring that to freebsd soon. http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/fb572e12d4eae3f415ca6a464aecbd14bdbde4ce Best regards, Bapt signature.asc Description: PGP signature
svn commit: r290548 - in head/sbin: init reboot
Author: trasz Date: Sun Nov 8 17:33:48 2015 New Revision: 290548 URL: https://svnweb.freebsd.org/changeset/base/290548 Log: Userspace part of reroot support. This makes it possible to change the root filesystem without full reboot, using "reboot -r". This can be used to to eg. boot from a temporary md_image preloaded by loader(8), setup an iSCSI session, and continue booting from rootfs mounted over iSCSI. Reviewed by: kib@, bapt@ MFC after:1 month Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D3693 Modified: head/sbin/init/Makefile head/sbin/init/init.c head/sbin/init/pathnames.h head/sbin/reboot/reboot.8 head/sbin/reboot/reboot.c Modified: head/sbin/init/Makefile == --- head/sbin/init/Makefile Sun Nov 8 14:26:50 2015(r290547) +++ head/sbin/init/Makefile Sun Nov 8 17:33:48 2015(r290548) @@ -2,12 +2,18 @@ # $FreeBSD$ PROG= init +SRCS= init.c getmntopts.c MAN= init.8 PRECIOUSPROG= INSTALLFLAGS=-b -B.bak CFLAGS+=-DDEBUGSHELL -DSECURE -DLOGIN_CAP -DCOMPAT_SYSV_INIT LIBADD=util crypt +# Needed for getmntopts.c +MOUNT= ${.CURDIR}/../../sbin/mount +CFLAGS+=-I${MOUNT} +.PATH: ${MOUNT} + NO_SHARED?=YES .include Modified: head/sbin/init/init.c == --- head/sbin/init/init.c Sun Nov 8 14:26:50 2015(r290547) +++ head/sbin/init/init.c Sun Nov 8 17:33:48 2015(r290548) @@ -46,6 +46,7 @@ static const char rcsid[] = #include #include +#include #include #include #include @@ -79,6 +80,7 @@ static const char rcsid[] = #include #endif +#include "mntopts.h" #include "pathnames.h" /* @@ -103,6 +105,7 @@ static void warning(const char *, ...) _ static void emergency(const char *, ...) __printflike(1, 2); static void disaster(int); static void badsys(int); +static void revoke_ttys(void); static int runshutdown(void); static char *strk(char *); @@ -122,6 +125,8 @@ static state_func_t clean_ttys(void); static state_func_t catatonia(void); static state_func_t death(void); static state_func_t death_single(void); +static state_func_t reroot(void); +static state_func_t reroot_phase_two(void); static state_func_t run_script(const char *); @@ -193,7 +198,7 @@ main(int argc, char *argv[]) { state_t initial_transition = runcom; char kenv_value[PATH_MAX]; - int c; + int c, error; struct sigaction sa; sigset_t mask; @@ -226,6 +231,9 @@ main(int argc, char *argv[]) case 'q': /* rescan /etc/ttys */ sig = SIGHUP; break; + case 'r': /* remount root */ + sig = SIGEMT; + break; default: goto invalid; } @@ -247,7 +255,7 @@ invalid: /* * Create an initial session. */ - if (setsid() < 0) + if (setsid() < 0 && (errno != EPERM || getsid(0) != 1)) warning("initial setsid() failed: %m"); /* @@ -261,7 +269,7 @@ invalid: * This code assumes that we always get arguments through flags, * never through bits set in some random machine register. */ - while ((c = getopt(argc, argv, "dsf")) != -1) + while ((c = getopt(argc, argv, "dsfr")) != -1) switch (c) { case 'd': devfs = 1; @@ -272,6 +280,9 @@ invalid: case 'f': runcom_mode = FASTBOOT; break; + case 'r': + initial_transition = reroot_phase_two; + break; default: warning("unrecognized flag '-%c'", c); break; @@ -287,13 +298,13 @@ invalid: handle(badsys, SIGSYS, 0); handle(disaster, SIGABRT, SIGFPE, SIGILL, SIGSEGV, SIGBUS, SIGXCPU, SIGXFSZ, 0); - handle(transition_handler, SIGHUP, SIGINT, SIGTERM, SIGTSTP, SIGUSR1, - SIGUSR2, 0); + handle(transition_handler, SIGHUP, SIGINT, SIGEMT, SIGTERM, SIGTSTP, + SIGUSR1, SIGUSR2, 0); handle(alrm_handler, SIGALRM, 0); sigfillset(&mask); delset(&mask, SIGABRT, SIGFPE, SIGILL, SIGSEGV, SIGBUS, SIGSYS, - SIGXCPU, SIGXFSZ, SIGHUP, SIGINT, SIGTERM, SIGTSTP, SIGALRM, - SIGUSR1, SIGUSR2, 0); + SIGXCPU, SIGXFSZ, SIGHUP, SIGINT, SIGEMT, SIGTERM, SIGTSTP, + SIGALRM, SIGUSR1, SIGUSR2, 0); sigprocmask(SIG_SETMASK, &mask, (sigset_t *) 0); sigemptyset(&sa.sa_mask);
svn commit: r290547 - in head/sys: arm/annapurna/alpine arm/mv/armadaxp arm/qemu arm/ti/omap4 arm/xilinx kern x86/x86
Author: tijl Date: Sun Nov 8 14:26:50 2015 New Revision: 290547 URL: https://svnweb.freebsd.org/changeset/base/290547 Log: Since r289279 bufinit() uses mp_ncpus, but some architectures set this variable during mp_start() which is too late. Move this to mp_setmaxid() where other architectures set it and move x86 assertions to MI code. Reviewed by: kib (x86 part) Modified: head/sys/arm/annapurna/alpine/alpine_machdep_mp.c head/sys/arm/mv/armadaxp/armadaxp_mp.c head/sys/arm/qemu/virt_mp.c head/sys/arm/ti/omap4/omap4_mp.c head/sys/arm/xilinx/zy7_mp.c head/sys/kern/subr_smp.c head/sys/x86/x86/mp_x86.c Modified: head/sys/arm/annapurna/alpine/alpine_machdep_mp.c == --- head/sys/arm/annapurna/alpine/alpine_machdep_mp.c Sun Nov 8 14:22:57 2015(r290546) +++ head/sys/arm/annapurna/alpine/alpine_machdep_mp.c Sun Nov 8 14:26:50 2015(r290547) @@ -128,16 +128,14 @@ platform_mp_init_secondary(void) void platform_mp_setmaxid(void) { - int core_cnt; - core_cnt = platform_mp_get_core_cnt(); - mp_maxid = core_cnt - 1; + mp_ncpus = platform_mp_get_core_cnt(); + mp_maxid = mp_ncpus - 1; } int platform_mp_probe(void) { - mp_ncpus = platform_mp_get_core_cnt(); return (1); } Modified: head/sys/arm/mv/armadaxp/armadaxp_mp.c == --- head/sys/arm/mv/armadaxp/armadaxp_mp.c Sun Nov 8 14:22:57 2015 (r290546) +++ head/sys/arm/mv/armadaxp/armadaxp_mp.c Sun Nov 8 14:26:50 2015 (r290547) @@ -82,15 +82,14 @@ void platform_mp_setmaxid(void) { - mp_maxid = 3; + mp_ncpus = platform_get_ncpus(); + mp_maxid = mp_ncpus - 1; } int platform_mp_probe(void) { - mp_ncpus = platform_get_ncpus(); - return (mp_ncpus > 1); } Modified: head/sys/arm/qemu/virt_mp.c == --- head/sys/arm/qemu/virt_mp.c Sun Nov 8 14:22:57 2015(r290546) +++ head/sys/arm/qemu/virt_mp.c Sun Nov 8 14:26:50 2015(r290547) @@ -49,17 +49,8 @@ static int running_cpus; int platform_mp_probe(void) { - int ncpus; - ncpus = ofw_cpu_early_foreach(NULL, true); - if (ncpus <= 1) { - mp_ncpus = 1; - return (0); - } - - mp_ncpus = MIN(ncpus, MAXCPU); - - return (1); + return (mp_ncpus > 1); } static boolean_t @@ -77,7 +68,10 @@ platform_mp_setmaxid(void) { mp_maxid = PCPU_GET(cpuid); - ofw_cpu_early_foreach(virt_maxid, true); + mp_ncpus = ofw_cpu_early_foreach(virt_maxid, true); + if (mp_ncpus < 1) + mp_ncpus = 1; + mp_ncpus = MIN(ncpus, MAXCPU); } static boolean_t Modified: head/sys/arm/ti/omap4/omap4_mp.c == --- head/sys/arm/ti/omap4/omap4_mp.cSun Nov 8 14:22:57 2015 (r290546) +++ head/sys/arm/ti/omap4/omap4_mp.cSun Nov 8 14:26:50 2015 (r290547) @@ -51,14 +51,14 @@ void platform_mp_setmaxid(void) { -mp_maxid = 1; + mp_maxid = 1; + mp_ncpus = 2; } int platform_mp_probe(void) { - mp_ncpus = 2; return (1); } Modified: head/sys/arm/xilinx/zy7_mp.c == --- head/sys/arm/xilinx/zy7_mp.cSun Nov 8 14:22:57 2015 (r290546) +++ head/sys/arm/xilinx/zy7_mp.cSun Nov 8 14:26:50 2015 (r290547) @@ -57,13 +57,13 @@ platform_mp_setmaxid(void) { mp_maxid = 1; + mp_ncpus = 2; } int platform_mp_probe(void) { - mp_ncpus = 2; return (1); } Modified: head/sys/kern/subr_smp.c == --- head/sys/kern/subr_smp.cSun Nov 8 14:22:57 2015(r290546) +++ head/sys/kern/subr_smp.cSun Nov 8 14:26:50 2015(r290547) @@ -125,7 +125,15 @@ struct mtx smp_ipi_mtx; static void mp_setmaxid(void *dummy) { + cpu_mp_setmaxid(); + + KASSERT(mp_ncpus >= 1, ("%s: CPU count < 1", __func__)); + KASSERT(mp_ncpus > 1 || mp_maxid == 0, + ("%s: one CPU but mp_maxid is not zero", __func__)); + KASSERT(mp_maxid >= mp_ncpus - 1, + ("%s: counters out of sync: max %d, count %d", __func__, + mp_maxid, mp_ncpus)); } SYSINIT(cpu_mp_setmaxid, SI_SUB_TUNABLES, SI_ORDER_FIRST, mp_setmaxid, NULL); Modified: head/sys/x86/x86/mp_x86.c == --- head/sys/x86/x86/mp_x86.c Sun Nov 8 14:22:57 2015(r290546) +++ head/sys/x86/x86/mp_x86.c Sun Nov 8 14:26:50 2015(r290547) @@ -425,18 +425,11 @@ cpu_mp_setmaxid(void) { /* -* mp_maxid should be alr
svn commit: r290545 - head/sys/netpfil/ipfw
Author: melifaro Date: Sun Nov 8 13:44:21 2015 New Revision: 290545 URL: https://svnweb.freebsd.org/changeset/base/290545 Log: Print proper setfib values in ipfw log. Submitted by: Denis Schneider Modified: head/sys/netpfil/ipfw/ip_fw_log.c Modified: head/sys/netpfil/ipfw/ip_fw_log.c == --- head/sys/netpfil/ipfw/ip_fw_log.c Sun Nov 8 13:37:16 2015 (r290544) +++ head/sys/netpfil/ipfw/ip_fw_log.c Sun Nov 8 13:44:21 2015 (r290545) @@ -352,7 +352,7 @@ ipfw_log(struct ip_fw_chain *chain, stru break; case O_SETFIB: snprintf(SNPARGS(action2, 0), "SetFib %d", - TARG(cmd->arg1, fib)); + TARG(cmd->arg1, fib) & 0x7FFF); break; case O_SKIPTO: snprintf(SNPARGS(action2, 0), "SkipTo %d", ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290543 - head/sys/netpfil/ipfw
Author: melifaro Date: Sun Nov 8 12:24:19 2015 New Revision: 290543 URL: https://svnweb.freebsd.org/changeset/base/290543 Log: Fix setfib target. Problem was introduced in r272840 when converting tablearg value to 0. Submitted by: Denis Schneider Modified: head/sys/netpfil/ipfw/ip_fw2.c head/sys/netpfil/ipfw/ip_fw_sockopt.c Modified: head/sys/netpfil/ipfw/ip_fw2.c == --- head/sys/netpfil/ipfw/ip_fw2.c Sun Nov 8 09:37:26 2015 (r290542) +++ head/sys/netpfil/ipfw/ip_fw2.c Sun Nov 8 12:24:19 2015 (r290543) @@ -2476,7 +2476,7 @@ do { \ uint32_t fib; IPFW_INC_RULE_COUNTER(f, pktlen); - fib = TARG(cmd->arg1, fib) & 0x7; + fib = TARG(cmd->arg1, fib) & 0x7FFF; if (fib >= rt_numfibs) fib = 0; M_SETFIB(m, fib); Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c == --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Sun Nov 8 09:37:26 2015 (r290542) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Sun Nov 8 12:24:19 2015 (r290543) @@ -1497,9 +1497,9 @@ check_ipfw_rule_body(ipfw_insn *cmd, int if (cmdlen != F_INSN_SIZE(ipfw_insn)) goto bad_size; if ((cmd->arg1 != IP_FW_TARG) && - ((cmd->arg1 & 0x7) >= rt_numfibs)) { + ((cmd->arg1 & 0x7FFF) >= rt_numfibs)) { printf("ipfw: invalid fib number %d\n", - cmd->arg1 & 0x7); + cmd->arg1 & 0x7FFF); return EINVAL; } goto check_action; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r290522 - head/share/timedef
Hi, > On Sun, 8 Nov 2015 01:08:18 +0100 > Baptiste Daroussin said: bapt> They are auto generated, I will try to have a look to fix the generation tool so bapt> we won't get hit by it next time. Oops, I dodn't notice that. It seems that Linux does similar way. I think it should be fixed by the origin data rather than by the generation tool. I don't test it, but perhaps the attached change should fix it: bapt> Thanks for the fix! You are welcome. Sincerely, Index: ja_JP.UTF-8.src diff -u ja_JP.UTF-8.src.orig ja_JP.UTF-8.src --- ja_JP.UTF-8.src.orig 2015-11-08 20:26:46.948186000 +0900 +++ ja_JP.UTF-8.src 2015-11-08 20:29:37.892220775 +0900 @@ -68015,15 +68015,15 @@ "";/ "" -abmon "";/ -"";/ -"";/ -"";/ -"";/ -"";/ -"";/ -"";/ -"";/ +abmon "";/ +"";/ +"";/ +"";/ +"";/ +"";/ +"";/ +"";/ +"";/ "";/ "";/ "" -- Hajimu UMEMOTO u...@mahoroba.org u...@freebsd.org http://www.mahoroba.org/~ume/ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r290475 - in head: share/man/man9 sys/kern sys/sys
On 11/07/15 19:26, Conrad Meyer wrote: Can do — fixed in r290505. Thanks, Conrad Thank you. Looks good! --HPS ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290542 - head/sys/dev/usb/controller
Author: hselasky Date: Sun Nov 8 09:37:26 2015 New Revision: 290542 URL: https://svnweb.freebsd.org/changeset/base/290542 Log: Avoid using the bounce buffer when the source or destination buffer is 32-bits aligned. Merge the two bounce buffers into a single one. Some rough tests showed that the DWC OTG throughput on RPI2 increased by 10% after this patch. MFC after:1 week Modified: head/sys/dev/usb/controller/dwc_otg.c head/sys/dev/usb/controller/dwc_otg.h Modified: head/sys/dev/usb/controller/dwc_otg.c == --- head/sys/dev/usb/controller/dwc_otg.c Sun Nov 8 08:31:34 2015 (r290541) +++ head/sys/dev/usb/controller/dwc_otg.c Sun Nov 8 09:37:26 2015 (r290542) @@ -181,6 +181,110 @@ dwc_otg_get_hw_ep_profile(struct usb_dev } static void +dwc_otg_write_fifo(struct dwc_otg_softc *sc, struct usb_page_cache *pc, +uint32_t offset, uint32_t fifo, uint32_t count) +{ + uint32_t temp; + + /* round down length to nearest 4-bytes */ + temp = count & ~3; + + /* check if we can write the data directly */ + if (temp != 0 && usb_pc_buffer_is_aligned(pc, offset, temp, 3)) { + struct usb_page_search buf_res; + + /* pre-subtract length */ + count -= temp; + + /* iterate buffer list */ + do { + /* get current buffer pointer */ + usbd_get_page(pc, offset, &buf_res); + + if (buf_res.length > temp) + buf_res.length = temp; + + /* transfer data into FIFO */ + bus_space_write_region_4(sc->sc_io_tag, sc->sc_io_hdl, + fifo, buf_res.buffer, buf_res.length / 4); + + offset += buf_res.length; + fifo += buf_res.length; + temp -= buf_res.length; + } while (temp != 0); + } + + /* check for remainder */ + if (count != 0) { + /* clear topmost word before copy */ + sc->sc_bounce_buffer[(count - 1) / 4] = 0; + + /* copy out data */ + usbd_copy_out(pc, offset, + sc->sc_bounce_buffer, count); + + /* transfer data into FIFO */ + bus_space_write_region_4(sc->sc_io_tag, + sc->sc_io_hdl, fifo, sc->sc_bounce_buffer, + (count + 3) / 4); + } +} + +static void +dwc_otg_read_fifo(struct dwc_otg_softc *sc, struct usb_page_cache *pc, +uint32_t offset, uint32_t count) +{ + uint32_t temp; + + /* round down length to nearest 4-bytes */ + temp = count & ~3; + + /* check if we can read the data directly */ + if (temp != 0 && usb_pc_buffer_is_aligned(pc, offset, temp, 3)) { + struct usb_page_search buf_res; + + /* pre-subtract length */ + count -= temp; + + /* iterate buffer list */ + do { + /* get current buffer pointer */ + usbd_get_page(pc, offset, &buf_res); + + if (buf_res.length > temp) + buf_res.length = temp; + + /* transfer data from FIFO */ + bus_space_read_region_4(sc->sc_io_tag, sc->sc_io_hdl, + sc->sc_current_rx_fifo, buf_res.buffer, buf_res.length / 4); + + offset += buf_res.length; + sc->sc_current_rx_fifo += buf_res.length; + sc->sc_current_rx_bytes -= buf_res.length; + temp -= buf_res.length; + } while (temp != 0); + } + + /* check for remainder */ + if (count != 0) { + /* read data into bounce buffer */ + bus_space_read_region_4(sc->sc_io_tag, sc->sc_io_hdl, + sc->sc_current_rx_fifo, + sc->sc_bounce_buffer, (count + 3) / 4); + + /* store data into proper buffer */ + usbd_copy_in(pc, offset, sc->sc_bounce_buffer, count); + + /* round length up to nearest 4 bytes */ + count = (count + 3) & ~3; + + /* update counters */ + sc->sc_current_rx_bytes -= count; + sc->sc_current_rx_fifo += count; + } +} + +static void dwc_otg_tx_fifo_reset(struct dwc_otg_softc *sc, uint32_t value) { uint32_t temp; @@ -579,6 +683,14 @@ dwc_otg_common_rx_ack(struct dwc_otg_sof sc->sc_irq_mask |= GINTMSK_RXFLVLMSK; DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); + if (sc->sc_current_rx_bytes != 0) { + /* need to dump remaining data */ + bus_space_read_region_4(sc->sc_io_tag, sc->sc_io_hdl, + sc->sc_curren
svn commit: r290541 - in head/sys/arm: arm include
Author: skra Date: Sun Nov 8 08:31:34 2015 New Revision: 290541 URL: https://svnweb.freebsd.org/changeset/base/290541 Log: Make usermode variable the bool type. It's already used that way. Suggested by: kib Approved by: kib (mentor) Modified: head/sys/arm/arm/pmap-v6-new.c head/sys/arm/arm/trap-v6.c head/sys/arm/include/pmap-v6.h Modified: head/sys/arm/arm/pmap-v6-new.c == --- head/sys/arm/arm/pmap-v6-new.c Sun Nov 8 08:27:51 2015 (r290540) +++ head/sys/arm/arm/pmap-v6-new.c Sun Nov 8 08:31:34 2015 (r290541) @@ -6133,7 +6133,7 @@ CTASSERT(powerof2(PT2MAP_SIZE)); * Handle access and R/W emulation faults. */ int -pmap_fault(pmap_t pmap, vm_offset_t far, uint32_t fsr, int idx, int usermode) +pmap_fault(pmap_t pmap, vm_offset_t far, uint32_t fsr, int idx, bool usermode) { pt1_entry_t *pte1p, pte1; pt2_entry_t *pte2p, pte2; Modified: head/sys/arm/arm/trap-v6.c == --- head/sys/arm/arm/trap-v6.c Sun Nov 8 08:27:51 2015(r290540) +++ head/sys/arm/arm/trap-v6.c Sun Nov 8 08:31:34 2015(r290541) @@ -211,7 +211,7 @@ call_trapsignal(struct thread *td, int s * FAULT_IS_NOT_MINE value, then the abort is fatal. */ static __inline void -abort_imprecise(struct trapframe *tf, u_int fsr, u_int prefetch, u_int usermode) +abort_imprecise(struct trapframe *tf, u_int fsr, u_int prefetch, bool usermode) { /* @@ -243,7 +243,7 @@ out: * */ static __inline void -abort_debug(struct trapframe *tf, u_int fsr, u_int prefetch, u_int usermode, +abort_debug(struct trapframe *tf, u_int fsr, u_int prefetch, bool usermode, u_int far) { @@ -277,7 +277,7 @@ abort_handler(struct trapframe *tf, int { struct thread *td; vm_offset_t far, va; - int idx, usermode; + int idx, rv; uint32_t fsr; struct ksig ksig; struct proc *p; @@ -285,7 +285,7 @@ abort_handler(struct trapframe *tf, int struct vm_map *map; struct vmspace *vm; vm_prot_t ftype; - int rv; + bool usermode; #ifdef INVARIANTS void *onfault; #endif @@ -556,7 +556,7 @@ static int abort_fatal(struct trapframe *tf, u_int idx, u_int fsr, u_int far, u_int prefetch, struct thread *td, struct ksig *ksig) { - u_int usermode; + bool usermode; const char *mode; const char *rw_mode; @@ -617,7 +617,7 @@ static int abort_align(struct trapframe *tf, u_int idx, u_int fsr, u_int far, u_int prefetch, struct thread *td, struct ksig *ksig) { - u_int usermode; + bool usermode; usermode = TRAPF_USERMODE(tf); if (!usermode) { Modified: head/sys/arm/include/pmap-v6.h == --- head/sys/arm/include/pmap-v6.h Sun Nov 8 08:27:51 2015 (r290540) +++ head/sys/arm/include/pmap-v6.h Sun Nov 8 08:31:34 2015 (r290541) @@ -201,7 +201,7 @@ void pmap_tlb_flush_ng(pmap_t ); void pmap_dcache_wb_range(vm_paddr_t , vm_size_t , vm_memattr_t ); vm_paddr_t pmap_kextract(vm_offset_t ); -int pmap_fault(pmap_t , vm_offset_t , uint32_t , int , int ); +int pmap_fault(pmap_t , vm_offset_t , uint32_t , int , bool); #definevtophys(va) pmap_kextract((vm_offset_t)(va)) void pmap_set_tex(void); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290540 - head/lib/libc/tests/stdio
Author: ngie Date: Sun Nov 8 08:27:51 2015 New Revision: 290540 URL: https://svnweb.freebsd.org/changeset/base/290540 Log: printfloat_test and scanfloat_test need symbols from msun; these are automatically provided on amd64, but not i386. Add libm to DPADD/LDADD to unbreak the i386 tinderbox Pointyhat to: ngie MFC after: 1 week X-MFC with: r290538 Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/tests/stdio/Makefile Modified: head/lib/libc/tests/stdio/Makefile == --- head/lib/libc/tests/stdio/Makefile Sun Nov 8 07:53:31 2015 (r290539) +++ head/lib/libc/tests/stdio/Makefile Sun Nov 8 08:27:51 2015 (r290540) @@ -26,6 +26,12 @@ NETBSD_ATF_TESTS_C+= popen_test NETBSD_ATF_TESTS_C+= printf_test NETBSD_ATF_TESTS_C+= scanf_test +DPADD.printfloat_test+=${LIBM} +LDADD.printfloat_test+=-lm + +DPADD.scanfloat_test+= ${LIBM} +LDADD.scanfloat_test+= -lm + .include "../Makefile.netbsd-tests" .include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"