Date: Sun, 22 Feb 2015 16:04:38 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r279163 - in projects/clang360-import: . bin/pkill/tests contrib/ipfilter contrib/llvm/lib/Transforms/Scalar contrib/llvm/patches contrib/netbsd-tests/lib/libc/gen etc games games/bcd g... Message-ID: <201502221604.t1MG4cZ4014526@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Sun Feb 22 16:04:37 2015 New Revision: 279163 URL: https://svnweb.freebsd.org/changeset/base/279163 Log: Merge ^/head r279023 through r279162. Added: projects/clang360-import/contrib/llvm/patches/patch-08-llvm-r230058-indirectbrs-assert.diff - copied unchanged from r279162, head/contrib/llvm/patches/patch-32-llvm-r230058-indirectbrs-assert.diff projects/clang360-import/share/man/man4/man4.powerpc/llan.4 - copied unchanged from r279162, head/share/man/man4/man4.powerpc/llan.4 Deleted: projects/clang360-import/games/bcd/ projects/clang360-import/games/ppt/ Modified: projects/clang360-import/ObsoleteFiles.inc projects/clang360-import/UPDATING projects/clang360-import/bin/pkill/tests/pgrep-j_test.sh projects/clang360-import/bin/pkill/tests/pkill-j_test.sh projects/clang360-import/contrib/ipfilter/ip_fil.c projects/clang360-import/contrib/ipfilter/ipf.h projects/clang360-import/contrib/llvm/lib/Transforms/Scalar/LoopRotation.cpp projects/clang360-import/contrib/netbsd-tests/lib/libc/gen/t_nice.c projects/clang360-import/etc/netstart projects/clang360-import/games/Makefile projects/clang360-import/lib/libc/db/man/dbm.3 projects/clang360-import/lib/libc/gen/getgrent.c projects/clang360-import/lib/libc/gen/getpwent.c projects/clang360-import/lib/libc/gen/nice.3 projects/clang360-import/lib/libc/gen/nice.c projects/clang360-import/lib/libc/gen/setmode.c projects/clang360-import/lib/libc/regex/engine.c projects/clang360-import/lib/libc/regex/regcomp.c projects/clang360-import/lib/msun/src/e_j0.c projects/clang360-import/lib/msun/src/e_j0f.c projects/clang360-import/lib/msun/src/e_j1.c projects/clang360-import/lib/msun/src/e_j1f.c projects/clang360-import/release/doc/en_US.ISO8859-1/relnotes/article.xml projects/clang360-import/release/release.conf.sample projects/clang360-import/release/release.sh projects/clang360-import/share/man/man4/Makefile projects/clang360-import/share/man/man4/man4.arm/devcfg.4 projects/clang360-import/share/man/man4/man4.i386/apm.4 projects/clang360-import/share/man/man4/man4.powerpc/Makefile projects/clang360-import/share/man/man4/man4.powerpc/tsec.4 projects/clang360-import/share/man/man5/rc.conf.5 projects/clang360-import/share/man/man7/release.7 projects/clang360-import/share/man/man9/microuptime.9 projects/clang360-import/share/misc/committers-doc.dot projects/clang360-import/sys/arm/broadcom/bcm2835/bcm2835_mbox.c projects/clang360-import/sys/arm/include/atomic.h projects/clang360-import/sys/boot/efi/include/amd64/efibind.h projects/clang360-import/sys/boot/efi/include/efidef.h projects/clang360-import/sys/boot/efi/include/i386/efibind.h projects/clang360-import/sys/dev/cxgbe/t4_sge.c projects/clang360-import/sys/dev/ixl/i40e_adminq.c projects/clang360-import/sys/dev/ixl/i40e_adminq_cmd.h projects/clang360-import/sys/dev/ixl/i40e_common.c projects/clang360-import/sys/dev/ixl/i40e_lan_hmc.c projects/clang360-import/sys/dev/ixl/i40e_prototype.h projects/clang360-import/sys/dev/ixl/i40e_type.h projects/clang360-import/sys/dev/ixl/if_ixl.c projects/clang360-import/sys/dev/ixl/if_ixlv.c projects/clang360-import/sys/dev/ixl/ixl.h projects/clang360-import/sys/dev/ixl/ixl_pf.h projects/clang360-import/sys/dev/ixl/ixl_txrx.c projects/clang360-import/sys/dev/ixl/ixlvc.c projects/clang360-import/sys/dev/sfxge/common/efsys.h projects/clang360-import/sys/dev/sfxge/common/efx.h projects/clang360-import/sys/dev/sfxge/common/efx_ev.c projects/clang360-import/sys/dev/sfxge/common/efx_filter.c projects/clang360-import/sys/dev/sfxge/common/efx_impl.h projects/clang360-import/sys/dev/sfxge/common/efx_mcdi.c projects/clang360-import/sys/dev/sfxge/common/efx_mcdi.h projects/clang360-import/sys/dev/sfxge/common/efx_mon.c projects/clang360-import/sys/dev/sfxge/common/efx_nic.c projects/clang360-import/sys/dev/sfxge/common/efx_phy.c projects/clang360-import/sys/dev/sfxge/common/efx_regs_ef10.h projects/clang360-import/sys/dev/sfxge/common/efx_regs_mcdi.h projects/clang360-import/sys/dev/sfxge/common/efx_tx.c projects/clang360-import/sys/dev/sfxge/common/siena_mac.c projects/clang360-import/sys/dev/sfxge/common/siena_mon.c projects/clang360-import/sys/dev/sfxge/common/siena_nic.c projects/clang360-import/sys/dev/sfxge/common/siena_nvram.c projects/clang360-import/sys/dev/sfxge/common/siena_sram.c projects/clang360-import/sys/dev/sfxge/sfxge_rx.c projects/clang360-import/sys/dev/sfxge/sfxge_tx.c projects/clang360-import/sys/dev/sfxge/sfxge_tx.h projects/clang360-import/sys/kern/kern_ctf.c projects/clang360-import/sys/kern/link_elf.c projects/clang360-import/sys/net/if_var.h projects/clang360-import/sys/net/if_vlan.c projects/clang360-import/sys/netinet/igmp.c projects/clang360-import/sys/netinet/igmp_var.h projects/clang360-import/sys/netinet/in_var.h projects/clang360-import/sys/netinet6/in6_var.h projects/clang360-import/sys/netinet6/mld6.c projects/clang360-import/sys/netinet6/mld6_var.h projects/clang360-import/sys/powerpc/powermac/powermac_thermal.c projects/clang360-import/sys/powerpc/ps3/ps3_syscons.c projects/clang360-import/sys/x86/acpica/acpi_wakeup.c projects/clang360-import/sys/x86/iommu/busdma_dmar.c projects/clang360-import/tools/build/mk/OptionalObsoleteFiles.inc projects/clang360-import/usr.bin/mkimg/Makefile projects/clang360-import/usr.bin/mkimg/mkimg.1 projects/clang360-import/usr.bin/mkimg/mkimg.c projects/clang360-import/usr.bin/mkimg/scheme.c projects/clang360-import/usr.bin/netstat/Makefile projects/clang360-import/usr.bin/netstat/bpf.c projects/clang360-import/usr.bin/netstat/flowtable.c projects/clang360-import/usr.bin/netstat/if.c projects/clang360-import/usr.bin/netstat/inet.c projects/clang360-import/usr.bin/netstat/inet6.c projects/clang360-import/usr.bin/netstat/ipsec.c projects/clang360-import/usr.bin/netstat/main.c projects/clang360-import/usr.bin/netstat/mbuf.c projects/clang360-import/usr.bin/netstat/mroute.c projects/clang360-import/usr.bin/netstat/mroute6.c projects/clang360-import/usr.bin/netstat/netgraph.c projects/clang360-import/usr.bin/netstat/netisr.c projects/clang360-import/usr.bin/netstat/netstat.1 projects/clang360-import/usr.bin/netstat/netstat.h projects/clang360-import/usr.bin/netstat/pfkey.c projects/clang360-import/usr.bin/netstat/route.c projects/clang360-import/usr.bin/netstat/sctp.c projects/clang360-import/usr.bin/netstat/unix.c projects/clang360-import/usr.sbin/Makefile projects/clang360-import/usr.sbin/ifmcstat/Makefile projects/clang360-import/usr.sbin/ifmcstat/ifmcstat.c projects/clang360-import/usr.sbin/jls/jls.8 projects/clang360-import/usr.sbin/jls/jls.c projects/clang360-import/usr.sbin/pmccontrol/pmccontrol.c Directory Properties: projects/clang360-import/ (props changed) projects/clang360-import/contrib/ipfilter/ (props changed) projects/clang360-import/contrib/llvm/ (props changed) projects/clang360-import/etc/ (props changed) projects/clang360-import/lib/libc/ (props changed) projects/clang360-import/share/ (props changed) projects/clang360-import/share/man/man4/ (props changed) projects/clang360-import/sys/ (props changed) projects/clang360-import/sys/boot/ (props changed) projects/clang360-import/usr.bin/mkimg/ (props changed) Modified: projects/clang360-import/ObsoleteFiles.inc ============================================================================== --- projects/clang360-import/ObsoleteFiles.inc Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/ObsoleteFiles.inc Sun Feb 22 16:04:37 2015 (r279163) @@ -93,6 +93,11 @@ OLD_FILES+=usr/lib/clang/3.5.1/lib/freeb OLD_DIRS+=usr/lib/clang/3.5.1/lib/freebsd OLD_DIRS+=usr/lib/clang/3.5.1/lib OLD_DIRS+=usr/lib/clang/3.5.1 +# 20150222: Removed bcd(6) and ppt(6) +OLD_FILES+=usr/bin/bcd +OLD_FILES+=usr/bin/ppt +OLD_FILES+=usr/share/man/man6/bcd.6.gz +OLD_FILES+=usr/share/man/man6/ppt.6.gz # 20150217: Removed remnants of ar(4) driver OLD_FILES+=usr/include/sys/dev/ic/hd64570.h # 20150212: /usr/games moving into /usr/bin Modified: projects/clang360-import/UPDATING ============================================================================== --- projects/clang360-import/UPDATING Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/UPDATING Sun Feb 22 16:04:37 2015 (r279163) @@ -39,7 +39,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 but before r278950, the RNG was not seeded properly. Immediately upgrade the kernel to r278950 or later and regenerate any keys (e.g. ssh keys or openssl keys) that were generated w/ a kernel from that - range. This does not effect programs that directly used /dev/random + range. This does not affect programs that directly used /dev/random or /dev/urandom. All userland uses of arc4random(3) are affected. 20150210: Modified: projects/clang360-import/bin/pkill/tests/pgrep-j_test.sh ============================================================================== --- projects/clang360-import/bin/pkill/tests/pgrep-j_test.sh Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/bin/pkill/tests/pgrep-j_test.sh Sun Feb 22 16:04:37 2015 (r279163) @@ -4,7 +4,7 @@ jail_name_to_jid() { local check_name="$1" - jls -j "$check_name" -s 2>/dev/null | tr ' ' '\n' | grep jid= | sed -e 's/.*=//g' + jls -j "$check_name" -s | tr ' ' '\n' | grep jid= | sed -e 's/.*=//g' } base=pgrep_j_test @@ -38,6 +38,7 @@ for i in `seq 1 10`; do esac sleep 0.1 done +sleep 0.5 pid1="$(pgrep -f -x -j "$jid" "$sleep $sleep_amount" | sort)" pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_1_1.pid)" \ Modified: projects/clang360-import/bin/pkill/tests/pkill-j_test.sh ============================================================================== --- projects/clang360-import/bin/pkill/tests/pkill-j_test.sh Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/bin/pkill/tests/pkill-j_test.sh Sun Feb 22 16:04:37 2015 (r279163) @@ -4,7 +4,7 @@ jail_name_to_jid() { local check_name="$1" - jls -j "$check_name" -s 2>/dev/null | tr ' ' '\n' | grep jid= | sed -e 's/.*=//g' + jls -j "$check_name" -s | tr ' ' '\n' | grep jid= | sed -e 's/.*=//g' } base=pkill_j_test @@ -40,6 +40,7 @@ for i in `seq 1 10`; do esac sleep 0.1 done +sleep 0.5 if pkill -f -j "$jid" $sleep && sleep 0.5 && ! -f ${PWD}/${base}_1_1.pid && Modified: projects/clang360-import/contrib/ipfilter/ip_fil.c ============================================================================== --- projects/clang360-import/contrib/ipfilter/ip_fil.c Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/contrib/ipfilter/ip_fil.c Sun Feb 22 16:04:37 2015 (r279163) @@ -44,6 +44,9 @@ static int write_output __P((struct ifne # endif #endif +struct ifaddr { + struct sockaddr_storage ifa_addr; +}; int ipfattach(softc) Modified: projects/clang360-import/contrib/ipfilter/ipf.h ============================================================================== --- projects/clang360-import/contrib/ipfilter/ipf.h Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/contrib/ipfilter/ipf.h Sun Feb 22 16:04:37 2015 (r279163) @@ -43,9 +43,6 @@ struct file; #include <sys/socket.h> #include <net/if.h> -#define _WANT_IFADDR -#include <net/if_var.h> - #include <netinet/in.h> #include <netinet/in_systm.h> #include <netinet/ip.h> Modified: projects/clang360-import/contrib/llvm/lib/Transforms/Scalar/LoopRotation.cpp ============================================================================== --- projects/clang360-import/contrib/llvm/lib/Transforms/Scalar/LoopRotation.cpp Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/contrib/llvm/lib/Transforms/Scalar/LoopRotation.cpp Sun Feb 22 16:04:37 2015 (r279163) @@ -535,6 +535,8 @@ bool LoopRotate::rotateLoop(Loop *L, boo Loop *PredLoop = LI->getLoopFor(*PI); if (!PredLoop || PredLoop->contains(Exit)) continue; + if (isa<IndirectBrInst>((*PI)->getTerminator())) + continue; SplitLatchEdge |= L->getLoopLatch() == *PI; BasicBlock *ExitSplit = SplitCriticalEdge(*PI, Exit, this); ExitSplit->moveBefore(Exit); Copied: projects/clang360-import/contrib/llvm/patches/patch-08-llvm-r230058-indirectbrs-assert.diff (from r279162, head/contrib/llvm/patches/patch-32-llvm-r230058-indirectbrs-assert.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang360-import/contrib/llvm/patches/patch-08-llvm-r230058-indirectbrs-assert.diff Sun Feb 22 16:04:37 2015 (r279163, copy of r279162, head/contrib/llvm/patches/patch-32-llvm-r230058-indirectbrs-assert.diff) @@ -0,0 +1,55 @@ +Pull in r230058 from upstream llvm trunk (by Benjamin Kramer): + + LoopRotate: When reconstructing loop simplify form don't split edges + from indirectbrs. + + Yet another chapter in the endless story. While this looks like we + leave the loop in a non-canonical state this replicates the logic in + LoopSimplify so it doesn't diverge from the canonical form in any way. + + PR21968 + +This fixes a "Cannot split critical edge from IndirectBrInst" assertion +failure when building the devel/radare2 port. + +Introduced here: https://svnweb.freebsd.org/changeset/base/279161 + +Index: lib/Transforms/Scalar/LoopRotation.cpp +=================================================================== +--- lib/Transforms/Scalar/LoopRotation.cpp ++++ lib/Transforms/Scalar/LoopRotation.cpp +@@ -498,6 +498,8 @@ bool LoopRotate::rotateLoop(Loop *L, bool Simplifi + Loop *PredLoop = LI->getLoopFor(*PI); + if (!PredLoop || PredLoop->contains(Exit)) + continue; ++ if (isa<IndirectBrInst>((*PI)->getTerminator())) ++ continue; + SplitLatchEdge |= L->getLoopLatch() == *PI; + BasicBlock *ExitSplit = SplitCriticalEdge(*PI, Exit, this); + ExitSplit->moveBefore(Exit); +Index: test/Transforms/LoopRotate/crash.ll +=================================================================== +--- test/Transforms/LoopRotate/crash.ll ++++ test/Transforms/LoopRotate/crash.ll +@@ -153,3 +153,21 @@ entry: + "5": ; preds = %"3", %entry + ret void + } ++ ++; PR21968 ++define void @test8(i1 %C, i8* %P) #0 { ++entry: ++ br label %for.cond ++ ++for.cond: ; preds = %for.inc, %entry ++ br i1 %C, label %l_bad, label %for.body ++ ++for.body: ; preds = %for.cond ++ indirectbr i8* %P, [label %for.inc, label %l_bad] ++ ++for.inc: ; preds = %for.body ++ br label %for.cond ++ ++l_bad: ; preds = %for.body, %for.cond ++ ret void ++} Modified: projects/clang360-import/contrib/netbsd-tests/lib/libc/gen/t_nice.c ============================================================================== --- projects/clang360-import/contrib/netbsd-tests/lib/libc/gen/t_nice.c Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/contrib/netbsd-tests/lib/libc/gen/t_nice.c Sun Feb 22 16:04:37 2015 (r279163) @@ -72,11 +72,6 @@ ATF_TC_BODY(nice_err, tc) { int i; -#ifdef __FreeBSD__ - atf_tc_expect_fail("nice(incr) with incr < 0 fails with unprivileged " - "users and sets errno == EPERM; see PR # 189821 for more details"); -#endif - /* * The call should fail with EPERM if the * supplied parameter is negative and the @@ -98,11 +93,7 @@ ATF_TC_HEAD(nice_priority, tc) ATF_TC_BODY(nice_priority, tc) { -#ifdef __FreeBSD__ - int i, pri, pri2, nic; -#else int i, pri, nic; -#endif pid_t pid; int sta; @@ -115,10 +106,8 @@ ATF_TC_BODY(nice_priority, tc) pri = getpriority(PRIO_PROCESS, 0); ATF_REQUIRE(errno == 0); -#ifdef __NetBSD__ if (nic != pri) atf_tc_fail("nice(3) and getpriority(2) conflict"); -#endif /* * Also verify that the nice(3) values @@ -130,18 +119,10 @@ ATF_TC_BODY(nice_priority, tc) if (pid == 0) { errno = 0; -#ifdef __FreeBSD__ pri = getpriority(PRIO_PROCESS, 0); -#else - pri2 = getpriority(PRIO_PROCESS, 0); -#endif ATF_REQUIRE(errno == 0); -#ifdef __FreeBSD__ - if (pri != pri2) -#else if (nic != pri) -#endif _exit(EXIT_FAILURE); _exit(EXIT_SUCCESS); @@ -180,11 +161,7 @@ ATF_TC_HEAD(nice_thread, tc) ATF_TC_BODY(nice_thread, tc) { pthread_t tid[5]; -#ifdef __FreeBSD__ - int pri, rv, val; -#else int rv, val; -#endif size_t i; /* @@ -196,12 +173,7 @@ ATF_TC_BODY(nice_thread, tc) val = nice(i); ATF_REQUIRE(val != -1); -#ifdef __FreeBSD__ - pri = getpriority(PRIO_PROCESS, 0); - rv = pthread_create(&tid[i], NULL, threadfunc, &pri); -#else rv = pthread_create(&tid[i], NULL, threadfunc, &val); -#endif ATF_REQUIRE(rv == 0); rv = pthread_join(tid[i], NULL); Modified: projects/clang360-import/etc/netstart ============================================================================== --- projects/clang360-import/etc/netstart Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/etc/netstart Sun Feb 22 16:04:37 2015 (r279163) @@ -57,7 +57,6 @@ _start=quietstart /etc/rc.d/routing ${_start} /etc/rc.d/mroute6d ${_start} /etc/rc.d/route6d ${_start} -/etc/rc.d/mrouted ${_start} /etc/rc.d/routed ${_start} /etc/rc.d/rtsold ${_start} /etc/rc.d/nisdomain ${_start} Modified: projects/clang360-import/games/Makefile ============================================================================== --- projects/clang360-import/games/Makefile Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/games/Makefile Sun Feb 22 16:04:37 2015 (r279163) @@ -3,7 +3,6 @@ .include <src.opts.mk> SUBDIR= \ - bcd \ caesar \ factor \ fortune \ @@ -11,7 +10,6 @@ SUBDIR= \ morse \ number \ pom \ - ppt \ primes \ random \ ${_tests} Modified: projects/clang360-import/lib/libc/db/man/dbm.3 ============================================================================== --- projects/clang360-import/lib/libc/db/man/dbm.3 Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/lib/libc/db/man/dbm.3 Sun Feb 22 16:04:37 2015 (r279163) @@ -15,7 +15,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 16, 2006 +.Dd February 19, 2015 .Dt DBM 3 .Os .Sh NAME @@ -174,9 +174,7 @@ deletes the entry for The .Fn dbm_delete function -normally returns zero but returns 1 if there was no entry with -.Fa key -in the database or returns -1 and sets +normally returns zero or returns -1 and sets .Va errno if there were any errors. .Pp Modified: projects/clang360-import/lib/libc/gen/getgrent.c ============================================================================== --- projects/clang360-import/lib/libc/gen/getgrent.c Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/lib/libc/gen/getgrent.c Sun Feb 22 16:04:37 2015 (r279163) @@ -1173,8 +1173,10 @@ nis_group(void *retval, void *mdata, va_ * terminator, alignment padding, and one (char *) * pointer for the member list terminator. */ - if (resultlen >= bufsize - _ALIGNBYTES - sizeof(char *)) + if (resultlen >= bufsize - _ALIGNBYTES - sizeof(char *)) { + free(result); goto erange; + } memcpy(buffer, result, resultlen); buffer[resultlen] = '\0'; free(result); Modified: projects/clang360-import/lib/libc/gen/getpwent.c ============================================================================== --- projects/clang360-import/lib/libc/gen/getpwent.c Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/lib/libc/gen/getpwent.c Sun Feb 22 16:04:37 2015 (r279163) @@ -1392,8 +1392,10 @@ nis_passwd(void *retval, void *mdata, va continue; } } - if (resultlen >= bufsize) + if (resultlen >= bufsize) { + free(result); goto erange; + } memcpy(buffer, result, resultlen); buffer[resultlen] = '\0'; free(result); Modified: projects/clang360-import/lib/libc/gen/nice.3 ============================================================================== --- projects/clang360-import/lib/libc/gen/nice.3 Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/lib/libc/gen/nice.3 Sun Feb 22 16:04:37 2015 (r279163) @@ -28,7 +28,7 @@ .\" @(#)nice.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd February 22, 2015 .Dt NICE 3 .Os .Sh NAME @@ -57,11 +57,34 @@ Only the super-user may lower priorities .Pp Children inherit the priority of their parent processes via .Xr fork 2 . +.Sh RETURN VALUES +Upon successful completion, +.Fn nice +returns the new nice value minus +.Dv NZERO . +Otherwise, \-1 is returned, the process' nice value is not changed, and +.Va errno +is set to indicate the error. +.Sh ERRORS +The +.Fn nice +function will fail if: +.Bl -tag -width Er +.It Bq Er EPERM +The +.Fa incr +argument is negative and the caller does not have appropriate privileges. +.El .Sh SEE ALSO .Xr nice 1 , .Xr fork 2 , .Xr setpriority 2 , .Xr renice 8 +.Sh STANDARDS +The +.Fn nice +function conforms to +.St -xpg4.2 . .Sh HISTORY A .Fn nice Modified: projects/clang360-import/lib/libc/gen/nice.c ============================================================================== --- projects/clang360-import/lib/libc/gen/nice.c Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/lib/libc/gen/nice.c Sun Feb 22 16:04:37 2015 (r279163) @@ -43,14 +43,18 @@ __FBSDID("$FreeBSD$"); * Backwards compatible nice. */ int -nice(incr) - int incr; +nice(int incr) { int prio; errno = 0; prio = getpriority(PRIO_PROCESS, 0); if (prio == -1 && errno) - return (-1); - return (setpriority(PRIO_PROCESS, 0, prio + incr)); + return -1; + if (setpriority(PRIO_PROCESS, 0, prio + incr) == -1) { + if (errno == EACCES) + errno = EPERM; + return -1; + } + return getpriority(PRIO_PROCESS, 0); } Modified: projects/clang360-import/lib/libc/gen/setmode.c ============================================================================== --- projects/clang360-import/lib/libc/gen/setmode.c Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/lib/libc/gen/setmode.c Sun Feb 22 16:04:37 2015 (r279163) @@ -186,10 +186,10 @@ setmode(const char *p) * as best we can. */ sigfillset(&sigset); - (void)_sigprocmask(SIG_BLOCK, &sigset, &sigoset); + (void)_sigprocmask(SIG_BLOCK, &sigset, &sigoset); (void)umask(mask = umask(0)); mask = ~mask; - (void)_sigprocmask(SIG_SETMASK, &sigoset, NULL); + (void)_sigprocmask(SIG_SETMASK, &sigoset, NULL); setlen = SET_LEN + 2; Modified: projects/clang360-import/lib/libc/regex/engine.c ============================================================================== --- projects/clang360-import/lib/libc/regex/engine.c Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/lib/libc/regex/engine.c Sun Feb 22 16:04:37 2015 (r279163) @@ -157,7 +157,7 @@ matcher(struct re_guts *g, int i; struct match mv; struct match *m = &mv; - const char *dp; + const char *dp = NULL; const sopno gf = g->firststate+1; /* +1 for OEND */ const sopno gl = g->laststate; const char *start; @@ -244,7 +244,7 @@ matcher(struct re_guts *g, ZAPSTATE(&m->mbs); /* Adjust start according to moffset, to speed things up */ - if (g->moffset > -1) + if (dp != NULL && g->moffset > -1) start = ((dp - g->moffset) < start) ? start : dp - g->moffset; SP("mloop", m->st, *start); Modified: projects/clang360-import/lib/libc/regex/regcomp.c ============================================================================== --- projects/clang360-import/lib/libc/regex/regcomp.c Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/lib/libc/regex/regcomp.c Sun Feb 22 16:04:37 2015 (r279163) @@ -1422,8 +1422,8 @@ static void findmust(struct parse *p, struct re_guts *g) { sop *scan; - sop *start; - sop *newstart; + sop *start = NULL; + sop *newstart = NULL; sopno newlen; sop s; char *cp; Modified: projects/clang360-import/lib/msun/src/e_j0.c ============================================================================== --- projects/clang360-import/lib/msun/src/e_j0.c Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/lib/msun/src/e_j0.c Sun Feb 22 16:04:37 2015 (r279163) @@ -278,7 +278,7 @@ static const double pS2[5] = { if(ix>=0x40200000) {p = pR8; q= pS8;} else if(ix>=0x40122E8B){p = pR5; q= pS5;} else if(ix>=0x4006DB6D){p = pR3; q= pS3;} - else if(ix>=0x40000000){p = pR2; q= pS2;} + else {p = pR2; q= pS2;} /* ix>=0x40000000 */ z = one/(x*x); r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5])))); s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*q[4])))); Modified: projects/clang360-import/lib/msun/src/e_j0f.c ============================================================================== --- projects/clang360-import/lib/msun/src/e_j0f.c Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/lib/msun/src/e_j0f.c Sun Feb 22 16:04:37 2015 (r279163) @@ -234,7 +234,7 @@ static const float pS2[5] = { if(ix>=0x41000000) {p = pR8; q= pS8;} else if(ix>=0x40f71c58){p = pR5; q= pS5;} else if(ix>=0x4036db68){p = pR3; q= pS3;} - else if(ix>=0x40000000){p = pR2; q= pS2;} + else {p = pR2; q= pS2;} /* ix>=0x40000000 */ z = one/(x*x); r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5])))); s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*q[4])))); Modified: projects/clang360-import/lib/msun/src/e_j1.c ============================================================================== --- projects/clang360-import/lib/msun/src/e_j1.c Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/lib/msun/src/e_j1.c Sun Feb 22 16:04:37 2015 (r279163) @@ -272,7 +272,7 @@ static const double ps2[5] = { if(ix>=0x40200000) {p = pr8; q= ps8;} else if(ix>=0x40122E8B){p = pr5; q= ps5;} else if(ix>=0x4006DB6D){p = pr3; q= ps3;} - else if(ix>=0x40000000){p = pr2; q= ps2;} + else {p = pr2; q= ps2;} /* ix>=0x40000000 */ z = one/(x*x); r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5])))); s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*q[4])))); Modified: projects/clang360-import/lib/msun/src/e_j1f.c ============================================================================== --- projects/clang360-import/lib/msun/src/e_j1f.c Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/lib/msun/src/e_j1f.c Sun Feb 22 16:04:37 2015 (r279163) @@ -229,7 +229,7 @@ static const float ps2[5] = { if(ix>=0x41000000) {p = pr8; q= ps8;} else if(ix>=0x40f71c58){p = pr5; q= ps5;} else if(ix>=0x4036db68){p = pr3; q= ps3;} - else if(ix>=0x40000000){p = pr2; q= ps2;} + else {p = pr2; q= ps2;} /* ix>=0x40000000 */ z = one/(x*x); r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5])))); s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*q[4])))); Modified: projects/clang360-import/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- projects/clang360-import/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Feb 22 16:04:37 2015 (r279163) @@ -22,7 +22,7 @@ <pubdate>$FreeBSD$</pubdate> - <!-- Last rev: 277458 --> + <!-- Last rev: 278934 --> <copyright> <year>2015</year> @@ -302,6 +302,13 @@ <para revision="277166" arch="powerpc">The &man.ptrace.2; system call has been updated include support for Altivec registers on &os;/&arch.powerpc;.</para> + + <para revision="278320">A new device control utility, + &man.devctl.8; has been added, which allows making + administrative changes to individual devices, such as + attaching and detaching drivers, and enabling and disabling + devices. The &man.devctl.8; utility uses the new + &man.devctl.3; library.</para> </sect2> <sect2 xml:id="userland-contrib"> @@ -375,6 +382,12 @@ <para revision="277270"><application>OpenSSL</application> has been updated to version 1.0.1l.</para> + + <para revision="278433">The &man.xz.1; utility has been udpated + to version 5.2.0.</para> + + <para revision="278433">The &man.xz.1; utility has been updated + to support multi-threaded compression.</para> </sect2> <sect2 xml:id="userland-installer"> @@ -460,6 +473,16 @@ <para revision="274987">The &man.gpio.3; library has been added, providing a wrapper around the &man.gpio.4; kernel interface.</para> + + <para revision="277610">The <literal>futimens()</literal> and + <literal>utimensat()</literal> system calls have been + added. See &man.utimensat.2; for more information.</para> + + <para revision="278934">The &man.elf.3; compile-time dependency + has been removed from <filename>dtri.o</filename>, which + allows adding <application>DTrace</application> probes to + userland applications and libraries without also linking + against &man.elf.3;.</para> </sect2> <sect2 xml:id="userland-abi"> @@ -515,12 +538,32 @@ at the &man.loader.8; prompt during boot, or add <literal>kern.vty=vt</literal> to &man.loader.conf.5; and reboot the system.</para> + + <para revision="277904">The &man.config.8; utility has been + updated to allow using a non-standard <filename + class="directory">src/</filename> tree, specified as an + argument to the <literal>-s</literal> flag.</para> + + <para revision="277990" arch="powerpc64">The + &os;/&arch.powerpc64; kernel now builds as + a position-independent executable, allowing the kernel to be + loaded into and run from any physical or virtual + address.</para> + + <important> + <para>This change requires an update to &man.loader.8;. + The userland and kernel must be updated before rebooting the + system.</para> + </important> </sect2> <sect2 xml:id="kernel-sysctl"> <title>System Tuning and Controls</title> - <para> </para> + <para revision="275140" contrib="sponsor" sponsor="&ff;">The + &man.hwpmc.4; default and maximum callchain depths have been + increased. The default has been increased from 16 to 32, and + the maximum increased from 32 to 128.</para> </sect2> </sect1> @@ -761,6 +804,18 @@ <para>This section covers changes and additions to file systems and other storage subsystems, both local and networked.</para> + <sect2 xml:id="storage-general"> + <title>General Storage</title> + <para revision="278037" contrib="sponsor" sponsor="&ix;">The + &man.ctl.4; <acronym>LUN</acronym> mapping has been rewritten, + replacing <acronym>iSCSI</acronym>-specific mapping mechanisms + with a new mechanism that works for any port.</para> + + <para revision="278354" contrib="sponsor" sponsor="&ix;">The + &man.ctld.8; utility has been updated to allow controlling + non-<acronym>iSCSI</acronym> &man.ctl.4; ports.</para> + </sect2> + <sect2 xml:id="storage-net"> <title>Networked Storage</title> @@ -962,6 +1017,11 @@ Release Engineering build tools have been updated to include support for producing virtual machine disk images for various cloud hosting providers.</para> + + <para revision="278926">The Release Engineering build tools have + been updated to use multi-threaded &man.xz.1;. By default, + the number of &man.xz.1; threads is set to the number of cores + available.</para> </sect2> </sect1> </article> Modified: projects/clang360-import/release/release.conf.sample ============================================================================== --- projects/clang360-import/release/release.conf.sample Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/release/release.conf.sample Sun Feb 22 16:04:37 2015 (r279163) @@ -53,6 +53,9 @@ PORTBRANCH="ports/head@rHEAD" #WITH_DVD= #WITH_COMPRESSED_IMAGES= +## Set to '1' to disable multi-threaded xz(1) compression. +#XZ_THREADS=0 + ## Set when building embedded images. #EMBEDDEDBUILD= Modified: projects/clang360-import/release/release.sh ============================================================================== --- projects/clang360-import/release/release.sh Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/release/release.sh Sun Feb 22 16:04:37 2015 (r279163) @@ -93,6 +93,7 @@ WITH_COMPRESSED_IMAGES= # the release. WITH_VMIMAGES= WITH_COMPRESSED_VMIMAGES= +XZ_THREADS=0 # Set to non-empty value to build virtual machine images for various # cloud providers as part of the release. @@ -179,7 +180,7 @@ RELEASE_WMAKEFLAGS="${MAKE_FLAGS} ${WORL RELEASE_KMAKEFLAGS="${MAKE_FLAGS} ${KERNEL_FLAGS} KERNCONF=\"${KERNEL}\" ${ARCH_FLAGS} ${CONF_FILES}" RELEASE_RMAKEFLAGS="${ARCH_FLAGS} KERNCONF=\"${KERNEL}\" ${CONF_FILES} \ ${DOCPORTS} WITH_DVD=${WITH_DVD} WITH_VMIMAGES=${WITH_VMIMAGES} \ - WITH_CLOUDWARE=${WITH_CLOUDWARE}" + WITH_CLOUDWARE=${WITH_CLOUDWARE} XZ_THREADS=${XZ_THREADS}" # Force src checkout if configured FORCE_SRC_KEY= Modified: projects/clang360-import/share/man/man4/Makefile ============================================================================== --- projects/clang360-import/share/man/man4/Makefile Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/share/man/man4/Makefile Sun Feb 22 16:04:37 2015 (r279163) @@ -573,7 +573,9 @@ MLINKS+=cdce.4 if_cdce.4 MLINKS+=crypto.4 cryptodev.4 MLINKS+=cue.4 if_cue.4 MLINKS+=cxgb.4 if_cxgb.4 -MLINKS+=cxgbe.4 if_cxgbe.4 +MLINKS+=cxgbe.4 if_cxgbe.4 \ + cxgbe.4 cxl.4 \ + cxgbe.4 if_cxl.4 MLINKS+=dc.4 if_dc.4 MLINKS+=de.4 if_de.4 MLINKS+=disc.4 if_disc.4 Modified: projects/clang360-import/share/man/man4/man4.arm/devcfg.4 ============================================================================== --- projects/clang360-import/share/man/man4/man4.arm/devcfg.4 Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/share/man/man4/man4.arm/devcfg.4 Sun Feb 22 16:04:37 2015 (r279163) @@ -92,4 +92,4 @@ driver. .Sh SEE ALSO Zynq-7000 SoC Technical Reference Manual (Xilinx doc UG585) .Sh AUTHORS -Thomas Skibo +.An Thomas Skibo Modified: projects/clang360-import/share/man/man4/man4.i386/apm.4 ============================================================================== --- projects/clang360-import/share/man/man4/man4.i386/apm.4 Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/share/man/man4/man4.i386/apm.4 Sun Feb 22 16:04:37 2015 (r279163) @@ -121,7 +121,7 @@ polls APM events and handles the followi .Xr apm 8 , .Xr zzz 8 .Sh AUTHORS -Tatsumi Hosokawa <hosokawa@jp.FreeBSD.org> +.An Tatsumi Hosokawa Aq Mt hosokawa@jp.FreeBSD.org .Sh BUGS WARNING! Many, if not most, of the implementations of APM-bios in laptops Modified: projects/clang360-import/share/man/man4/man4.powerpc/Makefile ============================================================================== --- projects/clang360-import/share/man/man4/man4.powerpc/Makefile Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/share/man/man4/man4.powerpc/Makefile Sun Feb 22 16:04:37 2015 (r279163) @@ -6,6 +6,7 @@ MAN= adb.4 \ ams.4 \ bm.4 \ cuda.4 \ + llan.4 \ pmu.4 \ powermac_nvram.4 \ smu.4 \ Copied: projects/clang360-import/share/man/man4/man4.powerpc/llan.4 (from r279162, head/share/man/man4/man4.powerpc/llan.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang360-import/share/man/man4/man4.powerpc/llan.4 Sun Feb 22 16:04:37 2015 (r279163, copy of r279162, head/share/man/man4/man4.powerpc/llan.4) @@ -0,0 +1,61 @@ +.\"- +.\" Copyright (c) 2015 Nathan Whitehorn <nwhitehorn@FreeBSD.org> +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. 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 AUTHOR ``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 AUTHOR 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$ +.\" +.Dd February 19, 2015 +.Dt LLAN 4 +.Os +.Sh NAME +.Nm llan +.Nd POWER Logical Lan +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device llan" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for the inter-partition logical LAN controller +provided by PAPR-compliant POWER hypervisors (such as PowerVM and PowerKVM). +On some firmwares, advanced offload features are supported by the hypervisor, +but these are not currently supported by the driver. +.Sh SEE ALSO +.Xr vtnet 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver appeared in +.Fx 10.0. +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Nathan Whitehorn Aq Mt nwhitehorn@FreeBSD.org . Modified: projects/clang360-import/share/man/man4/man4.powerpc/tsec.4 ============================================================================== --- projects/clang360-import/share/man/man4/man4.powerpc/tsec.4 Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/share/man/man4/man4.powerpc/tsec.4 Sun Feb 22 16:04:37 2015 (r279163) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 22, 2009 +.Dd February 20, 2015 .Dt TSEC 4 .Os .Sh NAME @@ -91,18 +91,23 @@ The driver supports interrupts coalescing (IC) so that raising a transmit/receive frame interrupt is delayed, if possible, until a threshold-defined period of time has elapsed, or a threshold-defined frame counter has been reached -(whichever occurs first). The following sysctls regulate this behaviour: +(whichever occurs first). +The following sysctls regulate this behaviour: .Bl -tag -width indent .It Va dev.tsec.X.int_coal.rx_time .It Va dev.tsec.X.int_coal.rx_count .It Va dev.tsec.X.int_coal.tx_time .It Va dev.tsec.X.int_coal.tx_count .Pp -Value of 0 for either time or count disables IC on the given path. Time value +Value of 0 for either time or count disables IC on the given path. +Time value 1-65535 corresponds to a real time period and is expressed in units equivalent -to 64 ticks of the TSEC clock. Count 1-255 represents the number of frames -(note that value of 1 is equivalent to IC disabled). User provided values -larger than supported will be trimmed to the maximum supported. More details +to 64 ticks of the TSEC clock. +Count 1-255 represents the number of frames +(note that value of 1 is equivalent to IC disabled). +User provided values +larger than supported will be trimmed to the maximum supported. +More details are available in the reference manual of the device. .El .Sh HARDWARE @@ -144,9 +149,9 @@ device driver first appeared in The base version of .Nm device driver was written by -.An Piotr Kruszynski. +.An Piotr Kruszynski . It has been extended with polling and interrupt coalescing support by -.An Rafal Jaworowski. +.An Rafal Jaworowski . It has been further enhanced with multicast, h/w checksum calculation and vlan support by .An Piotr Ziecik . Modified: projects/clang360-import/share/man/man5/rc.conf.5 ============================================================================== --- projects/clang360-import/share/man/man5/rc.conf.5 Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/share/man/man5/rc.conf.5 Sun Feb 22 16:04:37 2015 (r279163) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 11, 2014 +.Dd February 20, 2015 .Dt RC.CONF 5 .Os .Sh NAME @@ -2806,16 +2806,8 @@ these are the flags to pass to the routi .Pq Vt str The IPv6 equivalent of .Va routed_flags . -.It Va mrouted_enable -.Pq Vt bool -If set to -.Dq Li YES , -run the multicast routing daemon, -.Xr mrouted 8 . .It Va mroute6d_enable .Pq Vt bool -The IPv6 equivalent of -.Va mrouted_enable . If set to .Dq Li YES , run the IPv6 multicast routing daemon. @@ -2829,19 +2821,8 @@ and may be installed from the .Fx Ports Collection. -.It Va mrouted_flags -.Pq Vt str -If -.Va mrouted_enable -is set to -.Dq Li YES , -these are the flags to pass to the -.Xr mrouted 8 -daemon. .It Va mroute6d_flags .Pq Vt str -The IPv6 equivalent of -.Va mrouted_flags . If .Va mroute6d_enable is set to @@ -4530,7 +4511,6 @@ ruleset to load for .Xr mixer 8 , .Xr mountd 8 , .Xr moused 8 , -.Xr mrouted 8 , .Xr newfs 8 , .Xr newsyslog 8 , .Xr nfsd 8 , Modified: projects/clang360-import/share/man/man7/release.7 ============================================================================== --- projects/clang360-import/share/man/man7/release.7 Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/share/man/man7/release.7 Sun Feb 22 16:04:37 2015 (r279163) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 28, 2015 +.Dd February 20, 2015 .Dt RELEASE 7 .Os .Sh NAME @@ -256,6 +256,15 @@ Set to a non-empty value to compress the The original .Pq uncompressed images are not removed. +.It Va XZ_THREADS Pq Vt int +Set to the number of threads +.Xr xz 1 +should use when compressing images. +By default, +.Va XZ_THREADS +is set to +.Va 0 , +which uses all available cores on the system. .It Va VCSCMD The command run to obtain the source trees. Defaults to Modified: projects/clang360-import/share/man/man9/microuptime.9 ============================================================================== --- projects/clang360-import/share/man/man9/microuptime.9 Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/share/man/man9/microuptime.9 Sun Feb 22 16:04:37 2015 (r279163) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 25, 2013 +.Dd February 21, 2015 .Dt MICROUPTIME 9 .Os .Sh NAME @@ -112,6 +112,7 @@ functions is to enforce the user's prefe execution time. .Sh SEE ALSO .Xr bintime 9 , +.Xr get_cyclecount 9 , .Xr getbintime 9 , .Xr getmicrotime 9 , .Xr getnanotime 9 , Modified: projects/clang360-import/share/misc/committers-doc.dot ============================================================================== --- projects/clang360-import/share/misc/committers-doc.dot Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/share/misc/committers-doc.dot Sun Feb 22 16:04:37 2015 (r279163) @@ -53,6 +53,7 @@ node [color=lightblue2, style=filled, bg ale [label="Alex Dupre\nale@FreeBSD.org\n2003/12/22"] allanjude [label="Allan Jude\nallanjude@FreeBSD.org\n2014/05/17"] bcr [label="Benedict Reuschling\nbcr@FreeBSD.org\n2009/12/24"] +bhd [label="Björn Heidotting\nbhd@FreeBSD.org\n2014/10/14"] blackend [label="Marc Fonvieille\nblackend@FreeBSD.org\n2002/06/16"] brd [label="Brad Davis\nbrd@FreeBSD.org\n2005/06/01"] brueffer [label="Christian Brueffer\nbrueffer@FreeBSD.org\n2003/01/13"] @@ -102,6 +103,7 @@ bcr -> dru bcr -> crees bcr -> jgh bcr -> allanjude +bcr -> bhd blackend -> ale Modified: projects/clang360-import/sys/arm/broadcom/bcm2835/bcm2835_mbox.c ============================================================================== --- projects/clang360-import/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Sun Feb 22 15:56:16 2015 (r279162) +++ projects/clang360-import/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Sun Feb 22 16:04:37 2015 (r279163) @@ -89,27 +89,39 @@ struct bcm_mbox_softc { #define mbox_write_4(sc, reg, val) \ bus_space_write_4((sc)->bst, (sc)->bsh, reg, val) +static int +bcm_mbox_read_msg(struct bcm_mbox_softc *sc, int *ochan) +{ + uint32_t data; + uint32_t msg; + int chan; + + msg = mbox_read_4(sc, REG_READ); + dprintf("bcm_mbox_intr: raw data %08x\n", msg); + chan = MBOX_CHAN(msg); + data = MBOX_DATA(msg); + if (sc->msg[chan]) { + printf("bcm_mbox_intr: channel %d oveflow\n", chan); + return (1); + } + dprintf("bcm_mbox_intr: chan %d, data %08x\n", chan, data); + sc->msg[chan] = msg; + + if (ochan != NULL) + *ochan = chan; + + return (0); +} + static void bcm_mbox_intr(void *arg) { struct bcm_mbox_softc *sc = arg; int chan; - uint32_t data; - uint32_t msg; - while (!(mbox_read_4(sc, REG_STATUS) & STATUS_EMPTY)) { - msg = mbox_read_4(sc, REG_READ); - dprintf("bcm_mbox_intr: raw data %08x\n", msg); - chan = MBOX_CHAN(msg); - data = MBOX_DATA(msg); - if (sc->msg[chan]) { - printf("bcm_mbox_intr: channel %d oveflow\n", chan); - continue; - } - dprintf("bcm_mbox_intr: chan %d, data %08x\n", chan, data); - sc->msg[chan] = msg; - sema_post(&sc->sema[chan]); - } + while (!(mbox_read_4(sc, REG_STATUS) & STATUS_EMPTY)) + if (bcm_mbox_read_msg(sc, &chan) == 0) + sema_post(&sc->sema[chan]); } static int @@ -201,14 +213,30 @@ static int bcm_mbox_read(device_t dev, int chan, uint32_t *data) { struct bcm_mbox_softc *sc = device_get_softc(dev); + int err, read_chan; dprintf("bcm_mbox_read: chan %d\n", chan); + + err = 0; MBOX_LOCK(sc); - while (sema_trywait(&sc->sema[chan]) == 0) { - /* do not unlock sc while waiting for the mbox */ - if (sema_timedwait(&sc->sema[chan], 10*hz) == 0) - break; - printf("timeout sema for chan %d\n", chan); + if (!cold) { + while (sema_trywait(&sc->sema[chan]) == 0) { + /* do not unlock sc while waiting for the mbox */ + if (sema_timedwait(&sc->sema[chan], 10*hz) == 0) + break; + printf("timeout sema for chan %d\n", chan); + } + } else { + do { + /* Wait for a message */ + while ((mbox_read_4(sc, REG_STATUS) & STATUS_EMPTY)) + ; + /* Read the message */ + if (bcm_mbox_read_msg(sc, &read_chan) != 0) { + err = EINVAL; + goto out; + } + } while (read_chan != chan); } /* * get data from intr handler, the same channel is never coming *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502221604.t1MG4cZ4014526>