svn commit: r303212 - in head: etc/mtree tools/build/mk usr.sbin/chown/tests
Author: bdrewery Date: Sat Jul 23 05:49:18 2016 New Revision: 303212 URL: https://svnweb.freebsd.org/changeset/base/303212 Log: Move chown tests to proper path Sponsored by: EMC / Isilon Storage Division Modified: head/etc/mtree/BSD.tests.dist head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.sbin/chown/tests/Makefile Modified: head/etc/mtree/BSD.tests.dist == --- head/etc/mtree/BSD.tests.dist Sat Jul 23 05:30:55 2016 (r303211) +++ head/etc/mtree/BSD.tests.dist Sat Jul 23 05:49:18 2016 (r303212) @@ -8,8 +8,6 @@ bin cat .. -chown -.. date .. dd @@ -652,6 +650,8 @@ .. .. usr.sbin +chown +.. etcupdate .. extattr Modified: head/tools/build/mk/OptionalObsoleteFiles.inc == --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jul 23 05:30:55 2016(r303211) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jul 23 05:49:18 2016(r303212) @@ -7419,6 +7419,9 @@ OLD_FILES+=usr/share/aclocal/atf-c.m4 OLD_FILES+=usr/share/aclocal/atf-common.m4 OLD_FILES+=usr/share/aclocal/atf-sh.m4 OLD_DIRS+=usr/share/aclocal +OLD_DIRS+=usr/tests/bin/chown +OLD_FILES+=usr/tests/bin/chown/Kyuafile +OLD_FILES+=usr/tests/bin/chown/chown-f_test OLD_FILES+=usr/tests/bin/chown/units_basics OLD_FILES+=usr/tests/bin/date/legacy_test OLD_FILES+=usr/tests/bin/sh/legacy_test Modified: head/usr.sbin/chown/tests/Makefile == --- head/usr.sbin/chown/tests/Makefile Sat Jul 23 05:30:55 2016 (r303211) +++ head/usr.sbin/chown/tests/Makefile Sat Jul 23 05:49:18 2016 (r303212) @@ -2,7 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/bin/chown +TESTSDIR= ${TESTSBASE}/usr.sbin/chown TAP_TESTS_SH= chown-f_test ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r303211 - in head: share/man/man9 sys/kern sys/sys
Author: kib Date: Sat Jul 23 05:30:55 2016 New Revision: 303211 URL: https://svnweb.freebsd.org/changeset/base/303211 Log: Implement mtx_trylock_spin(9). Discussed with: bde Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.freebsd.org/D7192 Modified: head/share/man/man9/Makefile head/share/man/man9/mutex.9 head/sys/kern/kern_mutex.c head/sys/sys/mutex.h Modified: head/share/man/man9/Makefile == --- head/share/man/man9/MakefileSat Jul 23 03:49:02 2016 (r303210) +++ head/share/man/man9/MakefileSat Jul 23 05:30:55 2016 (r303211) @@ -1181,6 +1181,8 @@ MLINKS+=mutex.9 mtx_assert.9 \ mutex.9 MTX_SYSINIT.9 \ mutex.9 mtx_trylock.9 \ mutex.9 mtx_trylock_flags.9 \ + mutex.9 mtx_trylock_spin.9 \ + mutex.9 mtx_trylock_spin_flags.9 \ mutex.9 mtx_unlock.9 \ mutex.9 mtx_unlock_flags.9 \ mutex.9 mtx_unlock_spin.9 \ Modified: head/share/man/man9/mutex.9 == --- head/share/man/man9/mutex.9 Sat Jul 23 03:49:02 2016(r303210) +++ head/share/man/man9/mutex.9 Sat Jul 23 05:30:55 2016(r303211) @@ -28,7 +28,7 @@ .\"from BSDI $Id: mutex.4,v 1.1.2.3 1998/04/27 22:53:13 ewv Exp $ .\" $FreeBSD$ .\" -.Dd December 13, 2014 +.Dd July 18, 2016 .Dt MUTEX 9 .Os .Sh NAME @@ -41,6 +41,8 @@ .Nm mtx_lock_spin_flags , .Nm mtx_trylock , .Nm mtx_trylock_flags , +.Nm mtx_trylock_spin , +.Nm mtx_trylock_spin_flags , .Nm mtx_unlock , .Nm mtx_unlock_spin , .Nm mtx_unlock_flags , @@ -73,6 +75,10 @@ .Ft int .Fn mtx_trylock_flags "struct mtx *mutex" "int flags" .Ft void +.Fn mtx_trylock_spin "struct mtx *mutex" +.Ft int +.Fn mtx_trylock_spin_flags "struct mtx *mutex" "int flags" +.Ft void .Fn mtx_unlock "struct mtx *mutex" .Ft void .Fn mtx_unlock_spin "struct mtx *mutex" @@ -249,26 +255,33 @@ argument, then the mutex can be acquired .Pp The .Fn mtx_trylock -attempts to acquire the +and +.Fn mtx_trylock_spin +functions attempt to acquire a .Dv MTX_DEF -mutex pointed to by +or +.Dv MTX_SPIN +mutex, respectively, pointed to by .Fa mutex . -If the mutex cannot be immediately acquired -.Fn mtx_trylock -will return 0, -otherwise the mutex will be acquired -and a non-zero value will be returned. +If the mutex cannot be immediately acquired, the functions will return 0, +otherwise the mutex will be acquired and a non-zero value will be returned. .Pp The .Fn mtx_trylock_flags -function has the same behavior as +and +.Fn mtx_trylock_spin_flags +functions have the same behavior as .Fn mtx_trylock -but should be used when the caller desires to pass in a +and +.Fn mtx_trylock_spin +respectively, but should be used when the caller desires to pass in a .Fa flags value. Presently, the only valid value in the .Fn mtx_trylock -case is +and +.Fn mtx_trylock_spin +cases is .Dv MTX_QUIET , and its effects are identical to those described for .Fn mtx_lock @@ -447,6 +460,13 @@ while any spin lock is held. .It Dv MTX_RECURSE Specifies that the initialized mutex is allowed to recurse. This bit must be present if the mutex is permitted to recurse. +.Pp +Note that neither +.Fn mtx_trylock +nor +.Fn mtx_trylock_spin +support recursion; +that is, attempting to acquire an already-owned mutex fails. .It Dv MTX_QUIET Do not log any mutex operations for this lock. .It Dv MTX_NOWITNESS @@ -534,3 +554,7 @@ functions appeared in .Bsx 4.1 and .Fx 5.0 . +The +.Fn mtx_trylock_spin +function was added in +.Fx 12.0 . Modified: head/sys/kern/kern_mutex.c == --- head/sys/kern/kern_mutex.c Sat Jul 23 03:49:02 2016(r303210) +++ head/sys/kern/kern_mutex.c Sat Jul 23 05:30:55 2016(r303211) @@ -281,6 +281,34 @@ __mtx_lock_spin_flags(volatile uintptr_t WITNESS_LOCK(>lock_object, opts | LOP_EXCLUSIVE, file, line); } +int +__mtx_trylock_spin_flags(volatile uintptr_t *c, int opts, const char *file, +int line) +{ + struct mtx *m; + + if (SCHEDULER_STOPPED()) + return (1); + + m = mtxlock2mtx(c); + + KASSERT(m->mtx_lock != MTX_DESTROYED, + ("mtx_trylock_spin() of destroyed mutex @ %s:%d", file, line)); + KASSERT(LOCK_CLASS(>lock_object) == _class_mtx_spin, + ("mtx_trylock_spin() of sleep mutex %s @ %s:%d", + m->lock_object.lo_name, file, line)); + KASSERT((opts & MTX_RECURSE) == 0, + ("mtx_trylock_spin: unsupp. opt MTX_RECURSE on mutex %s @ %s:%d\n", + m->lock_object.lo_name, file, line)); + if (__mtx_trylock_spin(m, curthread, opts, file, line)) { + LOCK_LOG_TRY("LOCK", >lock_object, opts, 1, file, line); + WITNESS_LOCK(>lock_object, opts | LOP_EXCLUSIVE, file,
svn commit: r303210 - head/lib/libc/gen
Author: ache Date: Sat Jul 23 03:49:02 2016 New Revision: 303210 URL: https://svnweb.freebsd.org/changeset/base/303210 Log: 1) POSIX defines well when GLOB_NOMATCH or original pattern (instead) should be returned, so we can't return GLOB_NOMATCH blindly just because we dislike something in the pattern. 2) Remove extra condition. Modified: head/lib/libc/gen/glob.c Modified: head/lib/libc/gen/glob.c == --- head/lib/libc/gen/glob.cSat Jul 23 02:27:42 2016(r303209) +++ head/lib/libc/gen/glob.cSat Jul 23 03:49:02 2016(r303210) @@ -217,7 +217,8 @@ glob(const char * __restrict pattern, in while (bufnext <= bufend) { clen = mbrtowc(, patnext, MB_LEN_MAX, ); if (clen == (size_t)-1 || clen == (size_t)-2) - return (GLOB_NOMATCH); + return (globfinal(pglob, , + pglob->gl_pathc, pattern)); else if (clen == 0) { too_long = 0; break; @@ -239,7 +240,8 @@ glob(const char * __restrict pattern, in prot = 0; clen = mbrtowc(, patnext, MB_LEN_MAX, ); if (clen == (size_t)-1 || clen == (size_t)-2) - return (GLOB_NOMATCH); + return (globfinal(pglob, , + pglob->gl_pathc, pattern)); else if (clen == 0) { too_long = 0; break; @@ -249,7 +251,7 @@ glob(const char * __restrict pattern, in } } if (too_long) - return (GLOB_NOMATCH); + return (globfinal(pglob, , pglob->gl_pathc, pattern)); *bufnext = EOS; if (flags & GLOB_BRACE) @@ -613,9 +615,9 @@ globfinal(glob_t *pglob, struct glob_lim * GLOB_NOMAGIC is there just for compatibility with csh. */ if (pglob->gl_pathc == oldpathc) { - if (origpat != NULL && ((pglob->gl_flags & GLOB_NOCHECK) || + if ((pglob->gl_flags & GLOB_NOCHECK) || ((pglob->gl_flags & GLOB_NOMAGIC) && - !(pglob->gl_flags & GLOB_MAGCHAR + !(pglob->gl_flags & GLOB_MAGCHAR))) return (globextend(NULL, pglob, limit, origpat)); else return (GLOB_NOMATCH); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r303209 - head/sys/powerpc/booke
On Sat, 23 Jul 2016, Justin Hibbits wrote: Log: Use label math instead of hard-coding offsets for return addresses. Though the chances of the code in these sections changing are low, future-proof the sections and use label math. Not with numeric labels. Renumber the surrounding areas to avoid duplicate label numbers. New numeric labels tend to move the addresses of old labels. Renumbering to give unique numeric labels more than defeats their reason for existence -- you have to manage them on every change to a label anywhere in the file (and perhaps in macros and included files). You never get a error for a duplicated numeric label. Non-unique numeric labels are also a good obfuscation. Given a branch to 1f or 1b, grepping the file for 1: may find many labels 1:. You have to examine all the labels named 1: or search only near the jump to see where 1 is. Its name is supposed to not matter, but perhaps it does. Numeric labels should only be used in macros, and then only when the macro processor is too feeble to support generating unique non-numeric labels. Standard cpp is too feeble for this. I managed to remove all numeric labels in i386/exception.s (except in macros and included files), and none came back. amd64/exception.S has 19 of them, 7 with the additional style bug of being on a line with a statement or comment. Bruce ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r303209 - head/sys/powerpc/booke
Author: jhibbits Date: Sat Jul 23 02:27:42 2016 New Revision: 303209 URL: https://svnweb.freebsd.org/changeset/base/303209 Log: Use label math instead of hard-coding offsets for return addresses. Though the chances of the code in these sections changing are low, future-proof the sections and use label math. Renumber the surrounding areas to avoid duplicate label numbers. Modified: head/sys/powerpc/booke/locore.S Modified: head/sys/powerpc/booke/locore.S == --- head/sys/powerpc/booke/locore.S Sat Jul 23 01:21:58 2016 (r303208) +++ head/sys/powerpc/booke/locore.S Sat Jul 23 02:27:42 2016 (r303209) @@ -171,7 +171,7 @@ __start: ori %r3, %r3, (PSL_IS | PSL_DS) bl 2f 2: mflr%r4 - addi%r4, %r4, 20 + addi%r4, %r4, (3f - 2b) mtspr SPR_SRR0, %r4 mtspr SPR_SRR1, %r3 rfi /* Switch context */ @@ -179,6 +179,7 @@ __start: /* * Invalidate initial entry */ +3: mr %r3, %r29 bl tlb1_inval_entry @@ -224,7 +225,7 @@ __start: rlwinm %r4, %r4, 0, 8, 31 /* Current offset from kernel load address */ rlwinm %r3, %r3, 0, 0, 19 add %r4, %r4, %r3 /* Convert to kernel virtual address */ - addi%r4, %r4, 36 + addi%r4, %r4, (5f - 4b) li %r3, PSL_DE /* Note AS=0 */ mtspr SPR_SRR0, %r4 mtspr SPR_SRR1, %r3 @@ -233,6 +234,7 @@ __start: /* * Invalidate temp mapping */ +5: mr %r3, %r28 bl tlb1_inval_entry @@ -362,7 +364,7 @@ bp_kernload: ori %r3, %r3, (PSL_IS | PSL_DS) bl 3f 3: mflr%r4 - addi%r4, %r4, 20 + addi%r4, %r4, (4f - 3b) mtspr SPR_SRR0, %r4 mtspr SPR_SRR1, %r3 rfi /* Switch context */ @@ -370,6 +372,7 @@ bp_kernload: /* * Invalidate initial entry */ +4: mr %r3, %r29 bl tlb1_inval_entry @@ -395,10 +398,10 @@ bp_kernload: isync /* Retrieve kernel load [physical] address from bp_kernload */ - bl 4f + bl 5f .long bp_kernload .long __boot_page -4: mflr%r3 +5: mflr%r3 lwz %r4, 0(%r3) lwz %r5, 4(%r3) rlwinm %r3, %r3, 0, 0, 19 @@ -414,15 +417,16 @@ bp_kernload: msync /* Switch to the final mapping */ - bl 5f -5: mflr%r3 + bl 6f +6: mflr%r3 rlwinm %r3, %r3, 0, 0xfff /* Offset from boot page start */ add %r3, %r3, %r5 /* Make this virtual address */ - addi%r3, %r3, 32 + addi%r3, %r3, (7f - 6b) li %r4, 0 /* Note AS=0 */ mtspr SPR_SRR0, %r3 mtspr SPR_SRR1, %r4 rfi +7: /* * At this point we're running at virtual addresses KERNBASE and beyond so ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r303188 - head/share/mk
On 7/22/2016 5:25 PM, Bruce Evans wrote: > On Fri, 22 Jul 2016, Ngie Cooper wrote: > >> On Fri, Jul 22, 2016 at 2:57 PM, Bruce Evans>> wrote: >> ... > +# GCC 6.1.0 > +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100 > +CWARNFLAGS+= -Wno-error=unused-const-variable= > -Wno-error=nonnull-compare -Wno-error=shift-negative-value > -Wno-error=misleading-indentation -Wno-error=tautological-compare > +.endif Extra trailing = in the first one as well? >>> >>> I don't see one. I see only unreadably long lines containing unreadably >>> unordered flags. Perhaps your mail client mangled the line splitting, >>> but the above quite displays OK in mutt and vi here (except mutt makes >>> the line wrapping especially ugly by highlighting it). >> >> Look for "-Wno-error=unused-const-variable=". > > It is not trailing :-). It is only trailing in the above quote and > apparently in the mail as seen by jhb because some mail programs mangle > the formatting worse than others. In the above quote as seen by me > in EDITOR=vi, the long line is split and each part is quoted. But in > the previous quote, the line wasn't split. Since it was unreadable > by me, I used the editor search function to check if it had a trailing > '=' using a regexp, and none was found. It's not a mail issue. It is in the actual file. See https://svnweb.freebsd.org/base/head/share/mk/bsd.sys.mk?r1=303188=303187=303188 and https://svnweb.freebsd.org/base/head/share/mk/bsd.sys.mk?revision=303188=markup=303188#l119 Specifically "-Wno-error=unused-const-variable=", the first value. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r303208 - head/lib/libc/gen
Author: ache Date: Sat Jul 23 01:21:58 2016 New Revision: 303208 URL: https://svnweb.freebsd.org/changeset/base/303208 Log: 1) We need the original pattern (in the next round of changes) not only in case it fully constructed, but for half-constructed too, so have no other choice to pass original pattern from glob() down to globextend() instead of attempt to reconstruct I implement previously. 2) Instead of copy the same big enough code, make function for it: globfinal(). Modified: head/lib/libc/gen/glob.c Modified: head/lib/libc/gen/glob.c == --- head/lib/libc/gen/glob.cFri Jul 22 23:13:25 2016(r303207) +++ head/lib/libc/gen/glob.cSat Jul 23 01:21:58 2016(r303208) @@ -145,11 +145,12 @@ typedef uint_fast64_t Char; #defineM_RNG META(L'-') #defineM_SET META(L'[') #defineismeta(c) (((c)_QUOTE) != 0) +#ifdef DEBUG #defineisprot(c) (((c)_PROTECT) != 0) - +#endif static int compare(const void *, const void *); -static int g_Ctoc(const Char *, char *, size_t, int); +static int g_Ctoc(const Char *, char *, size_t); static int g_lstat(Char *, struct stat *, glob_t *); static DIR *g_opendir(Char *, glob_t *); static const Char *g_strchr(const Char *, wchar_t); @@ -157,19 +158,24 @@ static const Char *g_strchr(const Char * static Char*g_strcat(Char *, const Char *); #endif static int g_stat(Char *, struct stat *, glob_t *); -static int glob0(const Char *, glob_t *, struct glob_limit *, int); +static int glob0(const Char *, glob_t *, struct glob_limit *, +const char *); static int glob1(Char *, glob_t *, struct glob_limit *); static int glob2(Char *, Char *, Char *, Char *, glob_t *, struct glob_limit *); static int glob3(Char *, Char *, Char *, Char *, Char *, glob_t *, struct glob_limit *); -static int globextend(const Char *, glob_t *, struct glob_limit *, int); +static int globextend(const Char *, glob_t *, struct glob_limit *, +const char *); static const Char * globtilde(const Char *, Char *, size_t, glob_t *); -static int globexp0(const Char *, glob_t *, struct glob_limit *); +static int globexp0(const Char *, glob_t *, struct glob_limit *, +const char *); static int globexp1(const Char *, glob_t *, struct glob_limit *); static int globexp2(const Char *, const Char *, glob_t *, struct glob_limit *); +static int globfinal(glob_t *, struct glob_limit *, size_t, +const char *); static int match(Char *, Char *, Char *); #ifdef DEBUG static void qprintf(const char *, Char *); @@ -247,14 +253,14 @@ glob(const char * __restrict pattern, in *bufnext = EOS; if (flags & GLOB_BRACE) - return (globexp0(patbuf, pglob, )); + return (globexp0(patbuf, pglob, , pattern)); else - return (glob0(patbuf, pglob, , 1)); + return (glob0(patbuf, pglob, , pattern)); } static int -globexp0(const Char *pattern, glob_t *pglob, struct glob_limit *limit) -{ +globexp0(const Char *pattern, glob_t *pglob, struct glob_limit *limit, +const char *origpat) { int rv; size_t oldpathc; @@ -265,31 +271,15 @@ globexp0(const Char *pattern, glob_t *pg errno = 0; return (GLOB_NOSPACE); } - return (glob0(pattern, pglob, limit, 1)); + return (glob0(pattern, pglob, limit, origpat)); } oldpathc = pglob->gl_pathc; if ((rv = globexp1(pattern, pglob, limit)) != 0) return rv; - /* -* If there was no match we are going to append the pattern -* if GLOB_NOCHECK was specified or if GLOB_NOMAGIC was specified -* and the pattern did not contain any magic characters -* GLOB_NOMAGIC is there just for compatibility with csh. -*/ - if (pglob->gl_pathc == oldpathc) { - if (((pglob->gl_flags & GLOB_NOCHECK) || - ((pglob->gl_flags & GLOB_NOMAGIC) && - !(pglob->gl_flags & GLOB_MAGCHAR - return (globextend(pattern, pglob, limit, 1)); - else - return (GLOB_NOMATCH); - } - if (!(pglob->gl_flags & GLOB_NOSORT)) - qsort(pglob->gl_pathv + pglob->gl_offs + oldpathc, - pglob->gl_pathc - oldpathc, sizeof(char *), compare); - return (0); + + return (globfinal(pglob, limit, oldpathc, origpat)); } /* @@ -311,7 +301,7 @@ globexp1(const Char *pattern, glob_t *pg return (globexp2(ptr, pattern, pglob, limit)); } - return (glob0(pattern, pglob, limit, 0)); + return (glob0(pattern, pglob, limit, NULL)); } @@ -359,7 +349,7 @@ globexp2(const Char *ptr, const
Re: svn commit: r303188 - head/share/mk
On Fri, 22 Jul 2016, Ngie Cooper wrote: On Fri, Jul 22, 2016 at 2:57 PM, Bruce Evanswrote: ... +# GCC 6.1.0 +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100 +CWARNFLAGS+= -Wno-error=unused-const-variable= -Wno-error=nonnull-compare -Wno-error=shift-negative-value -Wno-error=misleading-indentation -Wno-error=tautological-compare +.endif Extra trailing = in the first one as well? I don't see one. I see only unreadably long lines containing unreadably unordered flags. Perhaps your mail client mangled the line splitting, but the above quite displays OK in mutt and vi here (except mutt makes the line wrapping especially ugly by highlighting it). Look for "-Wno-error=unused-const-variable=". It is not trailing :-). It is only trailing in the above quote and apparently in the mail as seen by jhb because some mail programs mangle the formatting worse than others. In the above quote as seen by me in EDITOR=vi, the long line is split and each part is quoted. But in the previous quote, the line wasn't split. Since it was unreadable by me, I used the editor search function to check if it had a trailing '=' using a regexp, and none was found. The corresponding line for gcc 5.2.0 in bsd.sys.mk has the same quality. The '='s in the correct part of the syntax are not very good either. I think they break our policy that all warnings are fatal unless NO_WERROR is set. Already clang allows too many things to compile without even warnings. I think this allows them to compile with gcc's stricter warnings, but only with newer gcc's. NO_WERROR is too global, but is at least easy to understand. Bruce ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r303188 - head/share/mk
On Fri, Jul 22, 2016 at 03:20:51PM -0700, Ngie Cooper wrote: > On Fri, Jul 22, 2016 at 2:57 PM, Bruce Evanswrote: > ... > >>> +# GCC 6.1.0 > >>> +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100 > >>> +CWARNFLAGS+= -Wno-error=unused-const-variable= > >>> -Wno-error=nonnull-compare -Wno-error=shift-negative-value > >>> -Wno-error=misleading-indentation -Wno-error=tautological-compare > >>> +.endif > >> > >> > >> Extra trailing = in the first one as well? > > > > I don't see one. I see only unreadably long lines containing unreadably > > unordered flags. Perhaps your mail client mangled the line splitting, > > but the above quite displays OK in mutt and vi here (except mutt makes > > the line wrapping especially ugly by highlighting it). > > Look for "-Wno-error=unused-const-variable=". I copy-pasted this from compiler error message: /home/rb743/dev/freebsd-riscv/lib/libc/isc/ev_timers.c:23:19: error: 'rcsid' defined but not used [-Werror=unused-const-variable=] static const char rcsid[] = "$Id: ev_timers.c,v 1.6 2005/04/27 04:56:36 sra Exp $"; I am not sure yet why compiler set extra trailing = for some errors only Ruslan ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r303205 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe
On Friday, July 22, 2016 10:46:41 PM John Baldwin wrote: > Author: jhb > Date: Fri Jul 22 22:46:41 2016 > New Revision: 303205 > URL: https://svnweb.freebsd.org/changeset/base/303205 > > Log: > Add a driver to create VF devices on Chelsio T4/T5 NICs. > > Chelsio NICs are a bit unique compared to some other NICs in that they > expose different functionality on different physical functions. In > particular, PF4 is used to manage the NIC interfaces ('t4nex' and 't5nex'). > However, PF4 is not able to create VF devices. Instead, VFs are only > supported by physical functions 0 through 3. This commit adds 't4iov' > and 't5iov' drivers that attach to PF0-3. > > One extra wrinkle is that the iov devices cannot enable SR-IOV until the > firwmare has been initialized by the main PF4 driver. To handle this > case, a new t4_if kobj interface has been added to permit cross-calls > between the PF drivers. The PF4 driver notifies sibling drivers when it > is fully attached. It also requests sibling drivers to detach before it > detaches. Sibling drivers query the PF4 driver during their attach > routine to see if it is attached. If not, the sibling drivers defer > their attach actions until the PF4 driver informs them it is attached. > > VF devices are associated with a single port on the NIC. VF devices > created from PF0 are associated with the first port on the NIC, VFs > from PF1 are associated with the second port, etc. VF devices can > only be created from a PF device that has an associated port. Thus, > on a 2-port card, VFs are only supported on PF0 and PF1. > > Reviewed by:np (earlier versions) > MFC after: 1 month > Sponsored by: Chelsio Communications Note that this only permits the creation of VFs, it does not include a driver for these VFs. I have a mostly working driver, but it is against an older HEAD and has to be rebased. In addition, Linux VF drivers will not work without some hacks to the FreeBSD cxgbe/cxl driver because the Linux VF driver only wants page-sized buffers whereas the FreeBSD drivers use 2k buffers (since that is an mbuf cluster). -- John Baldwin ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r303205 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe
Author: jhb Date: Fri Jul 22 22:46:41 2016 New Revision: 303205 URL: https://svnweb.freebsd.org/changeset/base/303205 Log: Add a driver to create VF devices on Chelsio T4/T5 NICs. Chelsio NICs are a bit unique compared to some other NICs in that they expose different functionality on different physical functions. In particular, PF4 is used to manage the NIC interfaces ('t4nex' and 't5nex'). However, PF4 is not able to create VF devices. Instead, VFs are only supported by physical functions 0 through 3. This commit adds 't4iov' and 't5iov' drivers that attach to PF0-3. One extra wrinkle is that the iov devices cannot enable SR-IOV until the firwmare has been initialized by the main PF4 driver. To handle this case, a new t4_if kobj interface has been added to permit cross-calls between the PF drivers. The PF4 driver notifies sibling drivers when it is fully attached. It also requests sibling drivers to detach before it detaches. Sibling drivers query the PF4 driver during their attach routine to see if it is attached. If not, the sibling drivers defer their attach actions until the PF4 driver informs them it is attached. VF devices are associated with a single port on the NIC. VF devices created from PF0 are associated with the first port on the NIC, VFs from PF1 are associated with the second port, etc. VF devices can only be created from a PF device that has an associated port. Thus, on a 2-port card, VFs are only supported on PF0 and PF1. Reviewed by: np (earlier versions) MFC after:1 month Sponsored by: Chelsio Communications Added: head/sys/dev/cxgbe/t4_if.m (contents, props changed) head/sys/dev/cxgbe/t4_iov.c (contents, props changed) Modified: head/sys/conf/files head/sys/dev/cxgbe/t4_main.c head/sys/modules/cxgbe/if_cxgbe/Makefile Modified: head/sys/conf/files == --- head/sys/conf/files Fri Jul 22 21:52:07 2016(r303204) +++ head/sys/conf/files Fri Jul 22 22:46:41 2016(r303205) @@ -1243,6 +1243,8 @@ dev/cxgb/sys/uipc_mvec.c optional cxgb p compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/cxgb_t3fw.c optional cxgb cxgb_t3fw \ compile-with "${NORMAL_C} -I$S/dev/cxgb" +dev/cxgbe/t4_iov.c optional cxgbe pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_mp_ring.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_main.coptional cxgbe pci \ Added: head/sys/dev/cxgbe/t4_if.m == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/cxgbe/t4_if.m Fri Jul 22 22:46:41 2016(r303205) @@ -0,0 +1,65 @@ +#- +# Copyright (c) 2015-2016 Chelsio Communications, Inc. +# All rights reserved. +# Written by: John Baldwin+# +# 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 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 AUTHOR 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$ +# + +#include + +INTERFACE t4; + +# The "main" device of a T4/T5 NIC is the PF4 device. Drivers for other +# functions on the NIC need to wait for the main device to be initialized +# before finishing attach. These routines allow drivers for other devices +# to coordinate with the main driver for the PF4. + +# Called by a driver during attach to determine if the PF4 driver is +# initialized. If the main driver is not ready, the driver should defer +# further initialization until 'attach_child'. +METHOD int is_main_ready { + device_tdev; +}; + +# Called by the PF4 driver on each sibling device when the PF4 driver is +# initialized. +METHOD int attach_child { + device_t
Re: svn commit: r303188 - head/share/mk
On Fri, Jul 22, 2016 at 2:57 PM, Bruce Evanswrote: ... >>> +# GCC 6.1.0 >>> +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100 >>> +CWARNFLAGS+= -Wno-error=unused-const-variable= >>> -Wno-error=nonnull-compare -Wno-error=shift-negative-value >>> -Wno-error=misleading-indentation -Wno-error=tautological-compare >>> +.endif >> >> >> Extra trailing = in the first one as well? > > I don't see one. I see only unreadably long lines containing unreadably > unordered flags. Perhaps your mail client mangled the line splitting, > but the above quite displays OK in mutt and vi here (except mutt makes > the line wrapping especially ugly by highlighting it). Look for "-Wno-error=unused-const-variable=". Thanks, -Ngie ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r303188 - head/share/mk
On Fri, 22 Jul 2016, John Baldwin wrote: On Friday, July 22, 2016 03:00:38 PM Ruslan Bukin wrote: Log: Add warn flags for GCC 6.1 compiler. Sponsored by: DARPA, AFRL Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk == --- head/share/mk/bsd.sys.mkFri Jul 22 14:57:26 2016(r303187) +++ head/share/mk/bsd.sys.mkFri Jul 22 15:00:38 2016(r303188) @@ -114,6 +114,11 @@ CWARNFLAGS+= -Wno-format CWARNFLAGS+= -Wno-error=unused-function -Wno-error=enum-compare -Wno-error=logical-not-parentheses -Wno-error=bool-compare -Wno-error=uninitialized -Wno-error=array-bounds -Wno-error=clobbered -Wno-error=cast-align -Wno-error=extra -Wno-error=attributes -Wno-error=inline -Wno-error=unused-but-set-variable -Wno-error=unused-value -Wno-error=strict-aliasing -Wno-error=address .endif +# GCC 6.1.0 +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100 +CWARNFLAGS+= -Wno-error=unused-const-variable= -Wno-error=nonnull-compare -Wno-error=shift-negative-value -Wno-error=misleading-indentation -Wno-error=tautological-compare +.endif Extra trailing = in the first one as well? I don't see one. I see only unreadably long lines containing unreadably unordered flags. Perhaps your mail client mangled the line splitting, but the above quite displays OK in mutt and vi here (except mutt makes the line wrapping especially ugly by highlighting it). Bruce ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r303204 - head/sys/dev/cxgbe
Author: jhb Date: Fri Jul 22 21:52:07 2016 New Revision: 303204 URL: https://svnweb.freebsd.org/changeset/base/303204 Log: Install a handler for firmware work request error messages. If a driver sends an malformed or disallowed work request, the firmware responds with a work request error. Previously the driver treated this is as an unexpected message and panicked. Now it decodes the error message to aid in debugging. Reviewed by: np (older version) MFC after:1 month Sponsored by: Chelsio Communications Differential Revision:https://reviews.freebsd.org/D6950 Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c == --- head/sys/dev/cxgbe/t4_sge.c Fri Jul 22 21:49:41 2016(r303203) +++ head/sys/dev/cxgbe/t4_sge.c Fri Jul 22 21:52:07 2016(r303204) @@ -244,6 +244,7 @@ static int handle_sge_egr_update(struct struct mbuf *); static int handle_fw_msg(struct sge_iq *, const struct rss_header *, struct mbuf *); +static int t4_handle_wrerr_rpl(struct adapter *, const __be64 *); static void wrq_tx_drain(void *, int); static void drain_wrq_wr_list(struct adapter *, struct sge_wrq *); @@ -402,6 +403,7 @@ t4_sge_modload(void) t4_register_cpl_handler(CPL_SGE_EGR_UPDATE, handle_sge_egr_update); t4_register_cpl_handler(CPL_RX_PKT, t4_eth_rx); t4_register_fw_msg_handler(FW6_TYPE_CMD_RPL, t4_handle_fw_rpl); + t4_register_fw_msg_handler(FW6_TYPE_WRERR_RPL, t4_handle_wrerr_rpl); } void @@ -4782,6 +4784,71 @@ handle_fw_msg(struct sge_iq *iq, const s return (t4_fw_msg_handler[cpl->type](sc, >data[0])); } +/** + * t4_handle_wrerr_rpl - process a FW work request error message + * @adap: the adapter + * @rpl: start of the FW message + */ +static int +t4_handle_wrerr_rpl(struct adapter *adap, const __be64 *rpl) +{ + u8 opcode = *(const u8 *)rpl; + const struct fw_error_cmd *e = (const void *)rpl; + unsigned int i; + + if (opcode != FW_ERROR_CMD) { + log(LOG_ERR, + "%s: Received WRERR_RPL message with opcode %#x\n", + device_get_nameunit(adap->dev), opcode); + return (EINVAL); + } + log(LOG_ERR, "%s: FW_ERROR (%s) ", device_get_nameunit(adap->dev), + G_FW_ERROR_CMD_FATAL(be32toh(e->op_to_type)) ? "fatal" : + "non-fatal"); + switch (G_FW_ERROR_CMD_TYPE(be32toh(e->op_to_type))) { + case FW_ERROR_TYPE_EXCEPTION: + log(LOG_ERR, "exception info:\n"); + for (i = 0; i < nitems(e->u.exception.info); i++) + log(LOG_ERR, "%s%08x", i == 0 ? "\t" : " ", + be32toh(e->u.exception.info[i])); + log(LOG_ERR, "\n"); + break; + case FW_ERROR_TYPE_HWMODULE: + log(LOG_ERR, "HW module regaddr %08x regval %08x\n", + be32toh(e->u.hwmodule.regaddr), + be32toh(e->u.hwmodule.regval)); + break; + case FW_ERROR_TYPE_WR: + log(LOG_ERR, "WR cidx %d PF %d VF %d eqid %d hdr:\n", + be16toh(e->u.wr.cidx), + G_FW_ERROR_CMD_PFN(be16toh(e->u.wr.pfn_vfn)), + G_FW_ERROR_CMD_VFN(be16toh(e->u.wr.pfn_vfn)), + be32toh(e->u.wr.eqid)); + for (i = 0; i < nitems(e->u.wr.wrhdr); i++) + log(LOG_ERR, "%s%02x", i == 0 ? "\t" : " ", + e->u.wr.wrhdr[i]); + log(LOG_ERR, "\n"); + break; + case FW_ERROR_TYPE_ACL: + log(LOG_ERR, "ACL cidx %d PF %d VF %d eqid %d %s", + be16toh(e->u.acl.cidx), + G_FW_ERROR_CMD_PFN(be16toh(e->u.acl.pfn_vfn)), + G_FW_ERROR_CMD_VFN(be16toh(e->u.acl.pfn_vfn)), + be32toh(e->u.acl.eqid), + G_FW_ERROR_CMD_MV(be16toh(e->u.acl.mv_pkd)) ? "vlanid" : + "MAC"); + for (i = 0; i < nitems(e->u.acl.val); i++) + log(LOG_ERR, " %02x", e->u.acl.val[i]); + log(LOG_ERR, "\n"); + break; + default: + log(LOG_ERR, "type %#x\n", + G_FW_ERROR_CMD_TYPE(be32toh(e->op_to_type))); + return (EINVAL); + } + return (0); +} + static int sysctl_uint16(SYSCTL_HANDLER_ARGS) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r303203 - head/share/misc
Author: mizhka Date: Fri Jul 22 21:49:41 2016 New Revision: 303203 URL: https://svnweb.freebsd.org/changeset/base/303203 Log: [new-committer:mizhka] add committer into graph Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D7288 Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot == --- head/share/misc/committers-src.dot Fri Jul 22 20:52:40 2016 (r303202) +++ head/share/misc/committers-src.dot Fri Jul 22 21:49:41 2016 (r303203) @@ -237,6 +237,7 @@ maxim [label="Maxim Konovalov\nmaxim@Fre mdf [label="Matthew Fleming\n...@freebsd.org\n2010/06/04"] mdodd [label="Matthew N. Dodd\nmd...@freebsd.org\n1999/07/27"] melifaro [label="Alexander V. Chernikov\nmelif...@freebsd.org\n2011/10/04"] +mizhka [label="Michael Zhilin\nmiz...@freebsd.org\n2016/07/19"] mjacob [label="Matt Jacob\nmja...@freebsd.org\n1997/08/13"] mjg [label="Mateusz Guzik\n...@freebsd.org\n2012/06/04"] mlaier [label="Max Laier\nmla...@freebsd.org\n2004/02/10"] @@ -353,6 +354,7 @@ adrian -> jmcneill adrian -> landonf adrian -> lidl adrian -> loos +adrian -> mizhka adrian -> monthadar adrian -> ray adrian -> rmh ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r303076 - head/sys/dev/fb
On Wednesday, July 20, 2016 09:29:39 AM Roger Pau Monné wrote: > Author: royger > Date: Wed Jul 20 09:29:39 2016 > New Revision: 303076 > URL: https://svnweb.freebsd.org/changeset/base/303076 > > Log: > vesa: fix panic on suspend > > Fix the following panic seen when migrating a FreeBSD guest on Xen: > > panic: mtx_lock() of destroyed mutex @ /usr/src/sys/dev/fb/vesa.c:541 > cpuid = 0 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame > 0xfe001d2fa4f0 > vpanic() at vpanic+0x182/frame 0xfe001d2fa570 > kassert_panic() at kassert_panic+0x126/frame 0xfe001d2fa5e0 > __mtx_lock_flags() at __mtx_lock_flags+0x15b/frame 0xfe001d2fa630 > vesa_bios_save_restore() at vesa_bios_save_restore+0x78/frame > 0xfe001d2fa680 > vga_suspend() at vga_suspend+0xa3/frame 0xfe001d2fa6b0 > isavga_suspend() at isavga_suspend+0x1d/frame 0xfe001d2fa6d0 > bus_generic_suspend_child() at bus_generic_suspend_child+0x44/frame > [...] > > This is caused because vga_sub_configure (which is called if the VGA adapter > is attached after VESA tried to initialize), points to vesa_configure, which > doesn't initialize the VESA mutex. In order to fix it, make sure > vga_sub_configure points to vesa_load, so that all the needed vesa > components are properly initialized. This panics a box without VESA (a dumb VGA) since vesa_init_done doesn't get set to true if VESA fails to find anything during its probe, so the mutex can be initialized twice. I think it is better to just revert this change and use MTX_SYSINIT to initialize the mutex instead. vga0: at port 0x3d0-0x3db iomem 0xb8000-0xb on isa0 panic: lock "VESA lock" 0x81c64af0 already initialized cpuid = 0 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0x824ec7a0 kdb_backtrace() at kdb_backtrace+0x39/frame 0x824ec850 vpanic() at vpanic+0x181/frame 0x824ec8d0 kassert_panic() at kassert_panic+0x17d/frame 0x824ec960 lock_init() at lock_init+0x186/frame 0x824ec9a0 _mtx_init() at _mtx_init+0x90/frame 0x824ec9e0 vesa_late_load() at vesa_late_load+0x2d/frame 0x824eca00 vga_init() at vga_init+0x65/frame 0x824eca20 vga_attach_unit() at vga_attach_unit+0x4b/frame 0x824eca50 isavga_attach() at isavga_attach+0x6c/frame 0x824eca90 DEVICE_ATTACH() at DEVICE_ATTACH+0x44/frame 0x824ecab0 https://reviews.freebsd.org/D7290 is a suggested patch that works in my test case. -- John Baldwin ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r301453 - in head/sys: arm/arm arm64/arm64 dev/fdt dev/gpio dev/iicbus dev/ofw dev/pci dev/vnic kern mips/mips sys
On 07/22/16 13:53, Andrew Turner wrote: On Fri, 22 Jul 2016 13:19:32 -0700 John Baldwinwrote: On Thursday, July 21, 2016 10:51:20 PM Nathan Whitehorn wrote: On 07/21/16 14:35, John Baldwin wrote: On Thursday, July 21, 2016 01:37:42 PM Andrew Turner wrote: On Wed, 20 Jul 2016 13:28:53 +0200 Michal Meloun wrote: Dne 19.07.2016 v 17:06 Nathan Whitehorn napsal(a): 2. It partially duplicates the functionality of OFW_BUS_MAP_INTR(), but is both problematically more general and less flexible (it has requirements on timing of PIC attachment vs. driver resource allocation) OFW_BUS_MAP_INTR() can parse only OFW based data and expect that parsed data are magicaly stored within the call. The new method, bus_map_intr(), can parse data from multiple sources (OFW, UEFI / ACPI, synthetic[gpio device + pin number]). It also returns parsed data back to caller. And no, it doesn't add any additional timing requirements . I've been looking at ACPI on arm64. So far I have not found the need for this with ACPI as we don't need to send the data to the interrupt controller driver to be parsed in the way OFW/FDT needs to. ACPI though has a gross hack where we call BUS_CONFIG_INTR on the IRQ in bus_alloc_resource(). I hadn't realized that. It looks like you could do essentially the same thing we do on PowerPC to clean this up by explicitly mapping the ACPI interrupt domains to different PICs with varying default interrupt properties. What I had advocated in the discussions leading up to this was to have some sort of opaque structure containing a set of properties (the sort of thing bus_map_resource and make_dev_s use) that was passed up at bus_setup_intr() time. I think it should now be passed up at bus_alloc_resource() time instead, but it would allow bus drivers to "decorate" a SYS_RES_IRQ request as it goes up the device tree with properties that the interrupt controller can then associate with the IRQ cookie it allocates in its own code. We used to do this on PPC and MIPS, and the current code still supports it, but it turned out not to be useful in the end for IRQs. The hierarchy for IRQs rarely (read: almost never) follows the bus hierarchy and often is enumerated in a different order. I have hardware, for example, where the children of a single parent bus are all wired to different interrupt controllers and sometimes to a mixture of interrupt controllers. Those controllers are cascaded in ways that cross the newbus tree laterally and, on some of them, the parent device from the bus topology has interrupts handled by its own (bus) children. Trying to make the newbus parents do something sensible with all of this would be crazy and, in the case where parents depend on resources provided by their own children, impossible. This is all to say that, since you want the interrupts to be decorated along a path that usually has nothing to do with the newbus hierarchy, it doesn't add much to add extra features to resource allocation. ofw_bus_map_intr() is a newbus method to support this kind of thing but, on all supported platforms, it is implemented only in nexus and no cases have appeared where anyone ever wanted anything at the intermediate layers. Mmm. Another idea that has been bandied about is to create a separate "plane" in new-bus for an interrupt hierarchy and allow devices to have "interrupt" parents that are not the same as the "bus" parent. (Additional planes for power and clocks might also make sense.) The idea is borrowed from IOKit on Darwin which has multiple planes. The "bus" plane is always fully populated, but the other planes (Darwin has one for power for example) can be sparse. ACPI has methods that effectively describe the power plane on x86. For some planes the structure would look more like a directed graph. Devices can have multiple clock parents, e.g. one for the register interface, and another to drive the external bus. I can also imagine the case where a device could have multiple interrupt parents, an MMC/SD controller comes to mind where it may have an interrupt on a GPIO line to detect the card being inserted, with another for command completion, etc. In this case one parent would be the standard interrupt controller, with the other being the GPIO controller. Andrew That's a good point for the generalized system (this already works for the specific case of interrupts, of course). It's more the resources that have a non-bus parent than the device. There are also devices with multiple bus parents, but those are more oddball kinds of things (Apple made some on-board PCI devices that are also connected by a second non-PCI path). -Nathan ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r301453 - in head/sys: arm/arm arm64/arm64 dev/fdt dev/gpio dev/iicbus dev/ofw dev/pci dev/vnic kern mips/mips sys
On Fri, 22 Jul 2016 13:19:32 -0700 John Baldwinwrote: > On Thursday, July 21, 2016 10:51:20 PM Nathan Whitehorn wrote: > > > > On 07/21/16 14:35, John Baldwin wrote: > > > On Thursday, July 21, 2016 01:37:42 PM Andrew Turner wrote: > > >> On Wed, 20 Jul 2016 13:28:53 +0200 > > >> Michal Meloun wrote: > > >>> Dne 19.07.2016 v 17:06 Nathan Whitehorn napsal(a): > > 2. It partially duplicates the functionality of > > OFW_BUS_MAP_INTR(), but is both problematically more general > > and less flexible (it has requirements on timing of PIC > > attachment vs. driver resource allocation) > > >>> OFW_BUS_MAP_INTR() can parse only OFW based data and expect > > >>> that parsed data are magicaly stored within the call. > > >>> The new method, bus_map_intr(), can parse data from multiple > > >>> sources (OFW, UEFI / ACPI, synthetic[gpio device + pin > > >>> number]). It also returns parsed data back to caller. > > >>> And no, it doesn't add any additional timing requirements . > > >> I've been looking at ACPI on arm64. So far I have not found the > > >> need for this with ACPI as we don't need to send the data to the > > >> interrupt controller driver to be parsed in the way OFW/FDT > > >> needs to. > > > ACPI though has a gross hack where we call BUS_CONFIG_INTR on the > > > IRQ in bus_alloc_resource(). > > > > I hadn't realized that. It looks like you could do essentially the > > same thing we do on PowerPC to clean this up by explicitly mapping > > the ACPI interrupt domains to different PICs with varying default > > interrupt properties. > > > > > What I had advocated in the discussions > > > leading up to this was to have some sort of opaque structure > > > containing a set of properties (the sort of thing > > > bus_map_resource and make_dev_s use) that was passed up at > > > bus_setup_intr() time. > > > > > I think it should now > > > be passed up at bus_alloc_resource() time instead, but it would > > > allow bus drivers to "decorate" a SYS_RES_IRQ request as it goes > > > up the device tree with properties that the interrupt controller > > > can then associate with the IRQ cookie it allocates in its own > > > code. > > > > > > We used to do this on PPC and MIPS, and the current code still > > supports it, but it turned out not to be useful in the end for > > IRQs. The hierarchy for IRQs rarely (read: almost never) follows > > the bus hierarchy and often is enumerated in a different order. I > > have hardware, for example, where the children of a single parent > > bus are all wired to different interrupt controllers and sometimes > > to a mixture of interrupt controllers. Those controllers are > > cascaded in ways that cross the newbus tree laterally and, on some > > of them, the parent device from the bus topology has interrupts > > handled by its own (bus) children. Trying to make the newbus > > parents do something sensible with all of this would be crazy and, > > in the case where parents depend on resources provided by their own > > children, impossible. > > > > This is all to say that, since you want the interrupts to be > > decorated along a path that usually has nothing to do with the > > newbus hierarchy, it doesn't add much to add extra features to > > resource allocation. ofw_bus_map_intr() is a newbus method to > > support this kind of thing but, on all supported platforms, it is > > implemented only in nexus and no cases have appeared where anyone > > ever wanted anything at the intermediate layers. > > Mmm. Another idea that has been bandied about is to create a separate > "plane" in new-bus for an interrupt hierarchy and allow devices to > have "interrupt" parents that are not the same as the "bus" parent. > (Additional planes for power and clocks might also make sense.) The > idea is borrowed from IOKit on Darwin which has multiple planes. The > "bus" plane is always fully populated, but the other planes (Darwin > has one for power for example) can be sparse. ACPI has methods that > effectively describe the power plane on x86. For some planes the structure would look more like a directed graph. Devices can have multiple clock parents, e.g. one for the register interface, and another to drive the external bus. I can also imagine the case where a device could have multiple interrupt parents, an MMC/SD controller comes to mind where it may have an interrupt on a GPIO line to detect the card being inserted, with another for command completion, etc. In this case one parent would be the standard interrupt controller, with the other being the GPIO controller. Andrew ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r303202 - head/share/man/man4
Author: jhb Date: Fri Jul 22 20:52:40 2016 New Revision: 303202 URL: https://svnweb.freebsd.org/changeset/base/303202 Log: Update after r303154 to note that operations on local files are safe. Modified: head/share/man/man4/aio.4 Modified: head/share/man/man4/aio.4 == --- head/share/man/man4/aio.4 Fri Jul 22 19:36:11 2016(r303201) +++ head/share/man/man4/aio.4 Fri Jul 22 20:52:40 2016(r303202) @@ -54,7 +54,9 @@ the .Va vfs.aio.enable_unsafe sysctl node to a non-zero value. .Pp -Asynchronous I/O operations on sockets and raw disk devices do not block +Asynchronous I/O operations on sockets, +raw disk devices, +and regular files on local filesystems do not block indefinitely and are always enabled. .Pp The ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r301453 - in head/sys: arm/arm arm64/arm64 dev/fdt dev/gpio dev/iicbus dev/ofw dev/pci dev/vnic kern mips/mips sys
On 07/22/16 13:19, John Baldwin wrote: On Thursday, July 21, 2016 10:51:20 PM Nathan Whitehorn wrote: On 07/21/16 14:35, John Baldwin wrote: On Thursday, July 21, 2016 01:37:42 PM Andrew Turner wrote: On Wed, 20 Jul 2016 13:28:53 +0200 Michal Melounwrote: Dne 19.07.2016 v 17:06 Nathan Whitehorn napsal(a): 2. It partially duplicates the functionality of OFW_BUS_MAP_INTR(), but is both problematically more general and less flexible (it has requirements on timing of PIC attachment vs. driver resource allocation) OFW_BUS_MAP_INTR() can parse only OFW based data and expect that parsed data are magicaly stored within the call. The new method, bus_map_intr(), can parse data from multiple sources (OFW, UEFI / ACPI, synthetic[gpio device + pin number]). It also returns parsed data back to caller. And no, it doesn't add any additional timing requirements . I've been looking at ACPI on arm64. So far I have not found the need for this with ACPI as we don't need to send the data to the interrupt controller driver to be parsed in the way OFW/FDT needs to. ACPI though has a gross hack where we call BUS_CONFIG_INTR on the IRQ in bus_alloc_resource(). I hadn't realized that. It looks like you could do essentially the same thing we do on PowerPC to clean this up by explicitly mapping the ACPI interrupt domains to different PICs with varying default interrupt properties. What I had advocated in the discussions leading up to this was to have some sort of opaque structure containing a set of properties (the sort of thing bus_map_resource and make_dev_s use) that was passed up at bus_setup_intr() time. I think it should now be passed up at bus_alloc_resource() time instead, but it would allow bus drivers to "decorate" a SYS_RES_IRQ request as it goes up the device tree with properties that the interrupt controller can then associate with the IRQ cookie it allocates in its own code. We used to do this on PPC and MIPS, and the current code still supports it, but it turned out not to be useful in the end for IRQs. The hierarchy for IRQs rarely (read: almost never) follows the bus hierarchy and often is enumerated in a different order. I have hardware, for example, where the children of a single parent bus are all wired to different interrupt controllers and sometimes to a mixture of interrupt controllers. Those controllers are cascaded in ways that cross the newbus tree laterally and, on some of them, the parent device from the bus topology has interrupts handled by its own (bus) children. Trying to make the newbus parents do something sensible with all of this would be crazy and, in the case where parents depend on resources provided by their own children, impossible. This is all to say that, since you want the interrupts to be decorated along a path that usually has nothing to do with the newbus hierarchy, it doesn't add much to add extra features to resource allocation. ofw_bus_map_intr() is a newbus method to support this kind of thing but, on all supported platforms, it is implemented only in nexus and no cases have appeared where anyone ever wanted anything at the intermediate layers. Mmm. Another idea that has been bandied about is to create a separate "plane" in new-bus for an interrupt hierarchy and allow devices to have "interrupt" parents that are not the same as the "bus" parent. (Additional planes for power and clocks might also make sense.) The idea is borrowed from IOKit on Darwin which has multiple planes. The "bus" plane is always fully populated, but the other planes (Darwin has one for power for example) can be sparse. ACPI has methods that effectively describe the power plane on x86. That's basically what the virtual IRQ code does: it implements a separate IRQ "plane" that is lazily interconnected during bus attachment and then strongly interconnected at configure_final() (i.e. it panics at that point if the topology hasn't converged yet). A generalized version of this concept would be useful for a number of other resource types (power, clocks, GPIOs, etc.) and I would be very happy to see it as a standard part of the OS. -Nathan ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r301453 - in head/sys: arm/arm arm64/arm64 dev/fdt dev/gpio dev/iicbus dev/ofw dev/pci dev/vnic kern mips/mips sys
On Thursday, July 21, 2016 10:51:20 PM Nathan Whitehorn wrote: > > On 07/21/16 14:35, John Baldwin wrote: > > On Thursday, July 21, 2016 01:37:42 PM Andrew Turner wrote: > >> On Wed, 20 Jul 2016 13:28:53 +0200 > >> Michal Melounwrote: > >>> Dne 19.07.2016 v 17:06 Nathan Whitehorn napsal(a): > 2. It partially duplicates the functionality of OFW_BUS_MAP_INTR(), > but is both problematically more general and less flexible (it has > requirements on timing of PIC attachment vs. driver resource > allocation) > >>> OFW_BUS_MAP_INTR() can parse only OFW based data and expect that > >>> parsed data are magicaly stored within the call. > >>> The new method, bus_map_intr(), can parse data from multiple sources > >>> (OFW, UEFI / ACPI, synthetic[gpio device + pin number]). It also > >>> returns parsed data back to caller. > >>> And no, it doesn't add any additional timing requirements . > >> I've been looking at ACPI on arm64. So far I have not found the need > >> for this with ACPI as we don't need to send the data to the interrupt > >> controller driver to be parsed in the way OFW/FDT needs to. > > ACPI though has a gross hack where we call BUS_CONFIG_INTR on the IRQ > > in bus_alloc_resource(). > > I hadn't realized that. It looks like you could do essentially the same > thing we do on PowerPC to clean this up by explicitly mapping the ACPI > interrupt domains to different PICs with varying default interrupt > properties. > > > What I had advocated in the discussions > > leading up to this was to have some sort of opaque structure containing > > a set of properties (the sort of thing bus_map_resource and make_dev_s > > use) that was passed up at bus_setup_intr() time. > > > I think it should now > > be passed up at bus_alloc_resource() time instead, but it would allow bus > > drivers to "decorate" a SYS_RES_IRQ request as it goes up the device tree > > with properties that the interrupt controller can then associate with > > the IRQ cookie it allocates in its own code. > > > We used to do this on PPC and MIPS, and the current code still supports > it, but it turned out not to be useful in the end for IRQs. The > hierarchy for IRQs rarely (read: almost never) follows the bus hierarchy > and often is enumerated in a different order. I have hardware, for > example, where the children of a single parent bus are all wired to > different interrupt controllers and sometimes to a mixture of interrupt > controllers. Those controllers are cascaded in ways that cross the > newbus tree laterally and, on some of them, the parent device from the > bus topology has interrupts handled by its own (bus) children. Trying to > make the newbus parents do something sensible with all of this would be > crazy and, in the case where parents depend on resources provided by > their own children, impossible. > > This is all to say that, since you want the interrupts to be decorated > along a path that usually has nothing to do with the newbus hierarchy, > it doesn't add much to add extra features to resource allocation. > ofw_bus_map_intr() is a newbus method to support this kind of thing but, > on all supported platforms, it is implemented only in nexus and no cases > have appeared where anyone ever wanted anything at the intermediate layers. Mmm. Another idea that has been bandied about is to create a separate "plane" in new-bus for an interrupt hierarchy and allow devices to have "interrupt" parents that are not the same as the "bus" parent. (Additional planes for power and clocks might also make sense.) The idea is borrowed from IOKit on Darwin which has multiple planes. The "bus" plane is always fully populated, but the other planes (Darwin has one for power for example) can be sparse. ACPI has methods that effectively describe the power plane on x86. -- John Baldwin ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r303188 - head/share/mk
On Friday, July 22, 2016 03:00:38 PM Ruslan Bukin wrote: > Author: br > Date: Fri Jul 22 15:00:38 2016 > New Revision: 303188 > URL: https://svnweb.freebsd.org/changeset/base/303188 > > Log: > Add warn flags for GCC 6.1 compiler. > > Sponsored by: DARPA, AFRL > > Modified: > head/share/mk/bsd.sys.mk > > Modified: head/share/mk/bsd.sys.mk > == > --- head/share/mk/bsd.sys.mk Fri Jul 22 14:57:26 2016(r303187) > +++ head/share/mk/bsd.sys.mk Fri Jul 22 15:00:38 2016(r303188) > @@ -114,6 +114,11 @@ CWARNFLAGS+= -Wno-format > CWARNFLAGS+= -Wno-error=unused-function -Wno-error=enum-compare > -Wno-error=logical-not-parentheses -Wno-error=bool-compare > -Wno-error=uninitialized -Wno-error=array-bounds -Wno-error=clobbered > -Wno-error=cast-align -Wno-error=extra -Wno-error=attributes > -Wno-error=inline -Wno-error=unused-but-set-variable -Wno-error=unused-value > -Wno-error=strict-aliasing -Wno-error=address > .endif > > +# GCC 6.1.0 > +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100 > +CWARNFLAGS+= -Wno-error=unused-const-variable= -Wno-error=nonnull-compare > -Wno-error=shift-negative-value -Wno-error=misleading-indentation > -Wno-error=tautological-compare > +.endif Extra trailing = in the first one as well? -- John Baldwin ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r303190 - head/sys/conf
On Friday, July 22, 2016 04:15:35 PM Ruslan Bukin wrote: > Author: br > Date: Fri Jul 22 16:15:35 2016 > New Revision: 303190 > URL: https://svnweb.freebsd.org/changeset/base/303190 > > Log: > Add GCC 6.1 warn flags for kernel as well. > > Sponsored by: DARPA, AFRL > > Modified: > head/sys/conf/kern.mk > > Modified: head/sys/conf/kern.mk > == > --- head/sys/conf/kern.mk Fri Jul 22 15:22:49 2016(r303189) > +++ head/sys/conf/kern.mk Fri Jul 22 16:15:35 2016(r303190) > @@ -50,6 +50,9 @@ CWARNEXTRA?=-Wno-error=inline -Wno-erro > -Wno-error=array-bounds -Wno-error=address \ > -Wno-error=cast-qual -Wno-error=sequence-point > -Wno-error=attributes \ > -Wno-error=strict-overflow -Wno-error=overflow > +.if ${COMPILER_VERSION} >= 60100 > +CWARNEXTRA+= -Wno-error=nonnull-compare -Wno-error=shift-overflow= Extra trailing =? -- John Baldwin ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r303201 - stable/10/usr.bin/tr
Author: ache Date: Fri Jul 22 19:36:11 2016 New Revision: 303201 URL: https://svnweb.freebsd.org/changeset/base/303201 Log: MFC: r302827 Optimize [Cc]flag case: don't repeatedly add the last character of string2 to squeeze cset when string2 reach its EOS state. Modified: stable/10/usr.bin/tr/tr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/tr/tr.c == --- stable/10/usr.bin/tr/tr.c Fri Jul 22 19:34:43 2016(r303200) +++ stable/10/usr.bin/tr/tr.c Fri Jul 22 19:36:11 2016(r303201) @@ -272,10 +272,11 @@ endloop: if (Cflag && !iswrune(cnt)) continue; if (cmap_lookup(map, cnt) == OOBCH) { - if (next()) + if (next()) { cmap_add(map, cnt, s2.lastch); - if (sflag) - cset_add(squeeze, s2.lastch); + if (sflag) + cset_add(squeeze, s2.lastch); + } } else cmap_add(map, cnt, cnt); if ((s2.state == EOS || s2.state == INFINITE) && ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r303200 - stable/10/usr.bin/tr
Author: ache Date: Fri Jul 22 19:34:43 2016 New Revision: 303200 URL: https://svnweb.freebsd.org/changeset/base/303200 Log: MFC: r302826 Document incomplete support of [=equiv=] and collation for ranges. Modified: stable/10/usr.bin/tr/tr.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/tr/tr.1 == --- stable/10/usr.bin/tr/tr.1 Fri Jul 22 19:28:23 2016(r303199) +++ stable/10/usr.bin/tr/tr.1 Fri Jul 22 19:34:43 2016(r303200) @@ -334,6 +334,10 @@ should be used instead of explicit chara and .Dq Li A-Z . .Pp +.Dq Li [=equiv=] +expression and collation for ranges +are implemented for single byte locales only. +.Pp System V has historically implemented character ranges using the syntax .Dq Li [c-c] instead of the ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r303199 - head/usr.sbin/ctld
Author: np Date: Fri Jul 22 19:28:23 2016 New Revision: 303199 URL: https://svnweb.freebsd.org/changeset/base/303199 Log: ctld(8): Fix MaxBurstLength negotiation. The target must reply with the selected value of MaxBurstSize instead of just echoing back the initiator's offered value. Reviewed by: mav@ Sponsored by: Chelsio Communications Differential Revision:https://reviews.freebsd.org/D7278 Modified: head/usr.sbin/ctld/login.c Modified: head/usr.sbin/ctld/login.c == --- head/usr.sbin/ctld/login.c Fri Jul 22 17:36:40 2016(r303198) +++ head/usr.sbin/ctld/login.c Fri Jul 22 19:28:23 2016(r303199) @@ -569,7 +569,7 @@ login_negotiate_key(struct pdu *request, tmp = MAX_BURST_LENGTH; } conn->conn_max_burst_length = tmp; - keys_add(response_keys, name, value); + keys_add_int(response_keys, name, tmp); } else if (strcmp(name, "FirstBurstLength") == 0) { tmp = strtoul(value, NULL, 10); if (tmp <= 0) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r303198 - stable/10/sys/kern
Author: kib Date: Fri Jul 22 17:36:40 2016 New Revision: 303198 URL: https://svnweb.freebsd.org/changeset/base/303198 Log: MFC r302919: In ptrace_vm_entry(), do not call vmspace_free() while owning a vm object lock. Modified: stable/10/sys/kern/sys_process.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/sys_process.c == --- stable/10/sys/kern/sys_process.cFri Jul 22 17:34:58 2016 (r303197) +++ stable/10/sys/kern/sys_process.cFri Jul 22 17:36:40 2016 (r303198) @@ -389,7 +389,6 @@ ptrace_vm_entry(struct thread *td, struc } while (0); vm_map_unlock_read(map); - vmspace_free(vm); pve->pve_fsid = VNOVAL; pve->pve_fileid = VNOVAL; @@ -434,6 +433,7 @@ ptrace_vm_entry(struct thread *td, struc free(freepath, M_TEMP); } } + vmspace_free(vm); if (error == 0) CTR3(KTR_PTRACE, "PT_VM_ENTRY: pid %d, entry %d, start %p", p->p_pid, pve->pve_entry, pve->pve_start); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r303197 - stable/11/sys/kern
Author: kib Date: Fri Jul 22 17:34:58 2016 New Revision: 303197 URL: https://svnweb.freebsd.org/changeset/base/303197 Log: MFC r302919: In ptrace_vm_entry(), do not call vmspace_free() while owning a vm object lock. Approved by: re (gjb) Modified: stable/11/sys/kern/sys_process.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/sys_process.c == --- stable/11/sys/kern/sys_process.cFri Jul 22 17:34:28 2016 (r303196) +++ stable/11/sys/kern/sys_process.cFri Jul 22 17:34:58 2016 (r303197) @@ -433,7 +433,6 @@ ptrace_vm_entry(struct thread *td, struc } while (0); vm_map_unlock_read(map); - vmspace_free(vm); pve->pve_fsid = VNOVAL; pve->pve_fileid = VNOVAL; @@ -478,6 +477,7 @@ ptrace_vm_entry(struct thread *td, struc free(freepath, M_TEMP); } } + vmspace_free(vm); if (error == 0) CTR3(KTR_PTRACE, "PT_VM_ENTRY: pid %d, entry %d, start %p", p->p_pid, pve->pve_entry, pve->pve_start); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r303196 - in stable/11: contrib/llvm/projects/libunwind/include contrib/llvm/projects/libunwind/src gnu/lib/libgcc
Author: emaste Date: Fri Jul 22 17:34:28 2016 New Revision: 303196 URL: https://svnweb.freebsd.org/changeset/base/303196 Log: MFC libunwind improvements r302450: libunwind: update to upstream snapshot r272680 The key improvement is that it may be built without cross-unwinding support, which significantly reduces the stack space requirement. r302456: libunwind: enable only the native unwinder by default This significantly reduces stack space requirements, and runtimes require only native unwinding. r302475: libunwind: limit stack usage in unwind cursor This may be reworked upstream but in the interim should address the stack usage issue reported in the PR. r303016: llvm-libunwind: use conventional (non-Darwin) X86 register numbers For historical reasons Darwin/i386 has ebp and esp swapped in the eh_frame register numbering. That is: Darwin Other Reg #eh_frameeh_frameDWARF == 4ebp espesp 5esp ebpebp Although the UNW_X86_* constants are not supposed to be coupled to DWARF / eh_frame numbering they are currently conflated in LLVM libunwind, and thus we require the non-Darwin numbering. PR: 206384 Approved by: re (kib) Sponsored by: The FreeBSD Foundation Modified: stable/11/contrib/llvm/projects/libunwind/include/__libunwind_config.h stable/11/contrib/llvm/projects/libunwind/include/libunwind.h stable/11/contrib/llvm/projects/libunwind/src/AddressSpace.hpp stable/11/contrib/llvm/projects/libunwind/src/CompactUnwinder.hpp stable/11/contrib/llvm/projects/libunwind/src/Registers.hpp stable/11/contrib/llvm/projects/libunwind/src/Unwind-EHABI.cpp stable/11/contrib/llvm/projects/libunwind/src/UnwindCursor.hpp stable/11/contrib/llvm/projects/libunwind/src/UnwindLevel1.c stable/11/contrib/llvm/projects/libunwind/src/UnwindRegistersRestore.S stable/11/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S stable/11/contrib/llvm/projects/libunwind/src/config.h stable/11/contrib/llvm/projects/libunwind/src/libunwind.cpp stable/11/gnu/lib/libgcc/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/llvm/projects/libunwind/include/__libunwind_config.h == --- stable/11/contrib/llvm/projects/libunwind/include/__libunwind_config.h Fri Jul 22 17:31:14 2016(r303195) +++ stable/11/contrib/llvm/projects/libunwind/include/__libunwind_config.h Fri Jul 22 17:34:28 2016(r303196) @@ -17,4 +17,47 @@ #define _LIBUNWIND_ARM_EHABI 0 #endif +#if defined(_LIBUNWIND_IS_NATIVE_ONLY) +# if defined(__i386__) +# define _LIBUNWIND_TARGET_I386 1 +# define _LIBUNWIND_CONTEXT_SIZE 8 +# define _LIBUNWIND_CURSOR_SIZE 19 +# elif defined(__x86_64__) +# define _LIBUNWIND_TARGET_X86_64 1 +# define _LIBUNWIND_CONTEXT_SIZE 21 +# define _LIBUNWIND_CURSOR_SIZE 33 +# elif defined(__ppc__) +# define _LIBUNWIND_TARGET_PPC 1 +# define _LIBUNWIND_CONTEXT_SIZE 117 +# define _LIBUNWIND_CURSOR_SIZE 128 +# elif defined(__aarch64__) +# define _LIBUNWIND_TARGET_AARCH64 1 +# define _LIBUNWIND_CONTEXT_SIZE 66 +# define _LIBUNWIND_CURSOR_SIZE 78 +# elif defined(__arm__) +# define _LIBUNWIND_TARGET_ARM 1 +# define _LIBUNWIND_CONTEXT_SIZE 60 +# define _LIBUNWIND_CURSOR_SIZE 67 +# elif defined(__or1k__) +# define _LIBUNWIND_TARGET_OR1K 1 +# define _LIBUNWIND_CONTEXT_SIZE 16 +# define _LIBUNWIND_CURSOR_SIZE 28 +# elif defined(__riscv__) +# define _LIBUNWIND_TARGET_RISCV 1 +# define _LIBUNWIND_CONTEXT_SIZE 128 /* XXX */ +# define _LIBUNWIND_CURSOR_SIZE 140 /* XXX */ +# else +# error "Unsupported architecture." +# endif +#else // !_LIBUNWIND_IS_NATIVE_ONLY +# define _LIBUNWIND_TARGET_I386 1 +# define _LIBUNWIND_TARGET_X86_64 1 +# define _LIBUNWIND_TARGET_PPC 1 +# define _LIBUNWIND_TARGET_AARCH64 1 +# define _LIBUNWIND_TARGET_ARM 1 +# define _LIBUNWIND_TARGET_OR1K 1 +# define _LIBUNWIND_CONTEXT_SIZE 128 +# define _LIBUNWIND_CURSOR_SIZE 140 +#endif // _LIBUNWIND_IS_NATIVE_ONLY + #endif // LIBUNWIND_CONFIG_H__ Modified: stable/11/contrib/llvm/projects/libunwind/include/libunwind.h == --- stable/11/contrib/llvm/projects/libunwind/include/libunwind.h Fri Jul 22 17:31:14 2016(r303195) +++ stable/11/contrib/llvm/projects/libunwind/include/libunwind.h Fri Jul 22 17:34:28 2016(r303196) @@ -46,12 +46,12 @@ enum { }; struct unw_context_t { - uint64_t data[128]; + uint64_t data[_LIBUNWIND_CONTEXT_SIZE]; }; typedef struct unw_context_t unw_context_t; struct unw_cursor_t { - uint64_t data[140]; + uint64_t data[_LIBUNWIND_CURSOR_SIZE]; }; typedef struct unw_cursor_t unw_cursor_t; @@ -151,8 +151,8 @@ enum { UNW_X86_ECX = 1, UNW_X86_EDX = 2,
svn commit: r303195 - head/sys/conf
Author: bdrewery Date: Fri Jul 22 17:31:14 2016 New Revision: 303195 URL: https://svnweb.freebsd.org/changeset/base/303195 Log: Don't run find(1) for __MPATH with NO_MODULES set. It's a waste of time when it won't be used. Submitted by: bde MFC after:3 days Modified: head/sys/conf/config.mk head/sys/conf/kern.pre.mk Modified: head/sys/conf/config.mk == --- head/sys/conf/config.mk Fri Jul 22 17:25:28 2016(r303194) +++ head/sys/conf/config.mk Fri Jul 22 17:31:14 2016(r303195) @@ -54,7 +54,7 @@ KERN_OPTS!=cat ${KERNBUILDDIR}/opt*.h | .export KERN_OPTS .endif -.if !defined(__MPATH) +.if !defined(NO_MODULES) && !defined(__MPATH) __MPATH!=find ${SYSDIR:tA}/ -name \*_if.m .export __MPATH .endif Modified: head/sys/conf/kern.pre.mk == --- head/sys/conf/kern.pre.mk Fri Jul 22 17:25:28 2016(r303194) +++ head/sys/conf/kern.pre.mk Fri Jul 22 17:31:14 2016(r303195) @@ -192,7 +192,7 @@ SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symb SYSTEM_DEP+= ${LDSCRIPT} # Calculate path for .m files early, if needed. -.if !defined(__MPATH) +.if !defined(NO_MODULES) && !defined(__MPATH) __MPATH!=find ${S:tA}/ -name \*_if.m .endif @@ -212,7 +212,9 @@ MKMODULESENV+= MODULES_OVERRIDE="${MODUL .if defined(DEBUG) MKMODULESENV+= DEBUG_FLAGS="${DEBUG}" .endif +.if !defined(NO_MODULES) MKMODULESENV+= __MPATH="${__MPATH}" +.endif # Architecture and output format arguments for objdump to convert image to # object file ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r303194 - stable/10/sys/kern
Author: kib Date: Fri Jul 22 17:25:28 2016 New Revision: 303194 URL: https://svnweb.freebsd.org/changeset/base/303194 Log: MFC r302893: Do not allow creation of char or block special nodes with VNOVAL dev_t. Modified: stable/10/sys/kern/vfs_syscalls.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_syscalls.c == --- stable/10/sys/kern/vfs_syscalls.c Fri Jul 22 17:24:36 2016 (r303193) +++ stable/10/sys/kern/vfs_syscalls.c Fri Jul 22 17:25:28 2016 (r303194) @@ -1269,6 +1269,8 @@ kern_mknodat(struct thread *td, int fd, case S_IFCHR: case S_IFBLK: error = priv_check(td, PRIV_VFS_MKNOD_DEV); + if (error == 0 && dev == VNOVAL) + error = EINVAL; break; case S_IFMT: error = priv_check(td, PRIV_VFS_MKNOD_BAD); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r303193 - stable/11/libexec/rtld-elf
Author: bdrewery Date: Fri Jul 22 17:24:36 2016 New Revision: 303193 URL: https://svnweb.freebsd.org/changeset/base/303193 Log: MFC r302908: Fix dlsym(RTLD_NEXT) handling to only return the next library in last library cases. Approved by: re (gjb) Modified: stable/11/libexec/rtld-elf/rtld.c Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.c == --- stable/11/libexec/rtld-elf/rtld.c Fri Jul 22 17:22:37 2016 (r303192) +++ stable/11/libexec/rtld-elf/rtld.c Fri Jul 22 17:24:36 2016 (r303193) @@ -3291,7 +3291,7 @@ do_dlsym(void *handle, const char *name, handle == RTLD_SELF) { /* ... caller included */ if (handle == RTLD_NEXT) obj = globallist_next(obj); - TAILQ_FOREACH_FROM(obj, _list, next) { + for (; obj != NULL; obj = TAILQ_NEXT(obj, next)) { if (obj->marker) continue; res = symlook_obj(, obj); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r300349 - head
On 5/20/16 6:32 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Sat May 21 01:32:07 2016 > New Revision: 300349 > URL: https://svnweb.freebsd.org/changeset/base/300349 > > Log: > Enable and utilize WITHOUT_CROSS_COMPILER logic for external CC. > > This is a NOP. > It turns out it isn't a NOP! > Reviewed by:brooks, bapt > Sponsored by: EMC / Isilon Storage Division > Differential Revision: https://reviews.freebsd.org/D6354 > > Modified: > head/Makefile.inc1 > > Modified: head/Makefile.inc1 > == > --- head/Makefile.inc1Sat May 21 01:32:04 2016(r300348) > +++ head/Makefile.inc1Sat May 21 01:32:07 2016(r300349) > @@ -91,6 +91,12 @@ X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX}${ > X${BINUTIL}?=${${BINUTIL}} > .endif > .endfor > +# If a full path to an external cross compiler is given, don't build > +# a cross compiler. > +.if ${XCC:N${CCACHE_BIN}:M/*} > +MK_CROSS_COMPILER= no > +.endif Now MK_CROSS_COMPILER=no is set. > + > .include# don't depend on src.opts.mk doing it > .include "share/mk/src.opts.mk" > src.opts.mk has: .if ${MK_CROSS_COMPILER} == "no" MK_BINUTILS_BOOTSTRAP:= no MK_CLANG_BOOTSTRAP:= no MK_ELFTOOLCHAIN_BOOTSTRAP:= no MK_GCC_BOOTSTRAP:= no .endif So binutils and elftoolchain don't get built. In my SYSTEM_COMPILER commit r300354 I had intended that binutils and elftoolchain continue to build as they lack version checks like were added for the compiler. I'll get some sort of fix in today for this. > @@ -454,7 +460,7 @@ BFLAGS+= -B${CROSS_BINUTILS_PREFIX} > .endif > > # External compiler needs sysroot and target flags. > -.if ${XCC:N${CCACHE_BIN}:M/*} || ${MK_CROSS_COMPILER} == "no" > +.if ${MK_CROSS_COMPILER} == "no" > .if !defined(CROSS_BINUTILS_PREFIX) || !exists(${CROSS_BINUTILS_PREFIX}) > BFLAGS+= -B${WORLDTMP}/usr/bin > .endif > @@ -478,7 +484,7 @@ XCFLAGS+= -target ${TARGET_TRIPLE} > .endif > XCFLAGS+=--sysroot=${WORLDTMP} > .else > -.endif # ${XCC:M/*} || ${MK_CROSS_COMPILER} == "no" > +.endif # ${MK_CROSS_COMPILER} == "no" > > .if !empty(BFLAGS) > XCFLAGS+=${BFLAGS} > @@ -1714,9 +1720,7 @@ _elftctools=lib/libelftc \ > usr.bin/elfcopy > .endif > > -# If an full path to an external cross compiler is given, don't build > -# a cross compiler. > -.if ${XCC:N${CCACHE_BIN}:M/*} == "" && ${MK_CROSS_COMPILER} != "no" > +.if ${MK_CROSS_COMPILER} != "no" > .if ${MK_CLANG_BOOTSTRAP} != "no" > _clang= usr.bin/clang > _clang_libs= lib/clang > -- Regards, Bryan Drewery ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r303192 - stable/11/sys/kern
Author: kib Date: Fri Jul 22 17:22:37 2016 New Revision: 303192 URL: https://svnweb.freebsd.org/changeset/base/303192 Log: MFC r302893: Do not allow creation of char or block special nodes with VNOVAL dev_t. Approved by: re (gjb) Modified: stable/11/sys/kern/vfs_syscalls.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_syscalls.c == --- stable/11/sys/kern/vfs_syscalls.c Fri Jul 22 16:48:39 2016 (r303191) +++ stable/11/sys/kern/vfs_syscalls.c Fri Jul 22 17:22:37 2016 (r303192) @@ -1167,6 +1167,8 @@ kern_mknodat(struct thread *td, int fd, case S_IFCHR: case S_IFBLK: error = priv_check(td, PRIV_VFS_MKNOD_DEV); + if (error == 0 && dev == VNOVAL) + error = EINVAL; break; case S_IFMT: error = priv_check(td, PRIV_VFS_MKNOD_BAD); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r303191 - stable/10/lib/libc/locale
Author: ache Date: Fri Jul 22 16:48:39 2016 New Revision: 303191 URL: https://svnweb.freebsd.org/changeset/base/303191 Log: Forget to merge this changes in prev. MFC Modified: stable/10/lib/libc/locale/collcmp.c Modified: stable/10/lib/libc/locale/collcmp.c == --- stable/10/lib/libc/locale/collcmp.c Fri Jul 22 16:15:35 2016 (r303190) +++ stable/10/lib/libc/locale/collcmp.c Fri Jul 22 16:48:39 2016 (r303191) @@ -42,10 +42,12 @@ __FBSDID("$FreeBSD$"); int __collate_range_cmp(char c1, char c2) { - static char s1[2], s2[2]; + char s1[2], s2[2]; s1[0] = c1; + s1[1] = '\0'; s2[0] = c2; + s2[1] = '\0'; return (strcoll(s1, s2)); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r303190 - head/sys/conf
Author: br Date: Fri Jul 22 16:15:35 2016 New Revision: 303190 URL: https://svnweb.freebsd.org/changeset/base/303190 Log: Add GCC 6.1 warn flags for kernel as well. Sponsored by: DARPA, AFRL Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk == --- head/sys/conf/kern.mk Fri Jul 22 15:22:49 2016(r303189) +++ head/sys/conf/kern.mk Fri Jul 22 16:15:35 2016(r303190) @@ -50,6 +50,9 @@ CWARNEXTRA?= -Wno-error=inline -Wno-erro -Wno-error=array-bounds -Wno-error=address \ -Wno-error=cast-qual -Wno-error=sequence-point -Wno-error=attributes \ -Wno-error=strict-overflow -Wno-error=overflow +.if ${COMPILER_VERSION} >= 60100 +CWARNEXTRA+= -Wno-error=nonnull-compare -Wno-error=shift-overflow= +.endif .else # For gcc 4.2, eliminate the too-often-wrong warnings about uninitialized vars. CWARNEXTRA?= -Wno-uninitialized ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r303189 - head/share/mk
Author: br Date: Fri Jul 22 15:22:49 2016 New Revision: 303189 URL: https://svnweb.freebsd.org/changeset/base/303189 Log: Set the soft-float flag for assembly code as well. This fixes compilation with GCC 6.1. Sponsored by: DARPA, AFRL Modified: head/share/mk/bsd.cpu.mk Modified: head/share/mk/bsd.cpu.mk == --- head/share/mk/bsd.cpu.mkFri Jul 22 15:00:38 2016(r303188) +++ head/share/mk/bsd.cpu.mkFri Jul 22 15:22:49 2016(r303189) @@ -329,6 +329,7 @@ CFLAGS += -mfloat-abi=softfp .if ${MACHINE_CPUARCH} == "riscv" CFLAGS += -msoft-float +ACFLAGS += -msoft-float .endif # NB: COPTFLAGS is handled in /usr/src/sys/conf/kern.pre.mk ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r303187 - head/contrib/llvm/projects/libunwind/include
Author: br Date: Fri Jul 22 14:57:26 2016 New Revision: 303187 URL: https://svnweb.freebsd.org/changeset/base/303187 Log: Set real values for context/cursor sizes for RISC-V to prevent static assertions. Reviewed by: emaste Sponsored by: DARPA, AFRL Modified: head/contrib/llvm/projects/libunwind/include/__libunwind_config.h Modified: head/contrib/llvm/projects/libunwind/include/__libunwind_config.h == --- head/contrib/llvm/projects/libunwind/include/__libunwind_config.h Fri Jul 22 14:39:55 2016(r303186) +++ head/contrib/llvm/projects/libunwind/include/__libunwind_config.h Fri Jul 22 14:57:26 2016(r303187) @@ -50,8 +50,8 @@ # define _LIBUNWIND_MAX_REGISTER 32 # elif defined(__riscv__) # define _LIBUNWIND_TARGET_RISCV 1 -# define _LIBUNWIND_CONTEXT_SIZE 128 /* XXX */ -# define _LIBUNWIND_CURSOR_SIZE 140 /* XXX */ +# define _LIBUNWIND_CONTEXT_SIZE 64 +# define _LIBUNWIND_CURSOR_SIZE 76 # define _LIBUNWIND_MAX_REGISTER 96 # else # error "Unsupported architecture." ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r303188 - head/share/mk
Author: br Date: Fri Jul 22 15:00:38 2016 New Revision: 303188 URL: https://svnweb.freebsd.org/changeset/base/303188 Log: Add warn flags for GCC 6.1 compiler. Sponsored by: DARPA, AFRL Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk == --- head/share/mk/bsd.sys.mkFri Jul 22 14:57:26 2016(r303187) +++ head/share/mk/bsd.sys.mkFri Jul 22 15:00:38 2016(r303188) @@ -114,6 +114,11 @@ CWARNFLAGS+= -Wno-format CWARNFLAGS+= -Wno-error=unused-function -Wno-error=enum-compare -Wno-error=logical-not-parentheses -Wno-error=bool-compare -Wno-error=uninitialized -Wno-error=array-bounds -Wno-error=clobbered -Wno-error=cast-align -Wno-error=extra -Wno-error=attributes -Wno-error=inline -Wno-error=unused-but-set-variable -Wno-error=unused-value -Wno-error=strict-aliasing -Wno-error=address .endif +# GCC 6.1.0 +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100 +CWARNFLAGS+= -Wno-error=unused-const-variable= -Wno-error=nonnull-compare -Wno-error=shift-negative-value -Wno-error=misleading-indentation -Wno-error=tautological-compare +.endif + # How to handle FreeBSD custom printf format specifiers. .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30600 FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r303146 - head/usr.bin/sed
On 07/22/16 02:13, Bruce Evans wrote: On Fri, 22 Jul 2016, Alexey Dokuchaev wrote: Log: sed(1): Appease older GCC. "Appease" actually seems to be the correct wording here since gcc's detection of a variable that might be used unitialized seems to report one that is not used uninitialized. Isn't it also being dictated by style(9) and common sense? :) You missed that this combines a style fix in previous gcc appeasement (or just excessive paranoia) in one variable with appeasement for another variable, since copying the previous appeasement would copy its style bug. The 2 variables are used in exactly the same limited way. Yes, the first one is just a style fix while I was there. The oldpsanl bogusness was breaking the build with gcc42. gcc48+, clang and coverity all agree it was a false positive. It was likely a side effect of raising the WARNS level to 5. Modified: head/usr.bin/sed/process.c @@ -97,11 +97,12 @@ process(void) { struct s_command *cp; SPACE tspace; -size_t oldpsl = 0; +size_t oldpsl; char *p; int oldpsanl; p = NULL; +oldpsanl = oldpsl = 0; Multiple assignments on a single line is not very good style and is probably not KNF. Here it is further from being good style since the variables have different types. Since both types are integral and the value is 0 the implicit type conversions don't change the value. However, compilers should warn about down-converting a size_t to an int unless they do the analysis that this is safe because the value in the size_t is known to fit in the int. Doing the multiple assignment seemed natural and readable as both are (perhaps equally bogus) initializations. I did notice the different types after committing. Perhaps swapping the assignment would have been preferable? I suspect the compiler manages to optimize out the casting. Pedro. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r303186 - head/sys/arm/allwinner/a20
Author: manu Date: Fri Jul 22 14:39:55 2016 New Revision: 303186 URL: https://svnweb.freebsd.org/changeset/base/303186 Log: PC5 doesn't have mmc2 function. Modified: head/sys/arm/allwinner/a20/a20_padconf.c Modified: head/sys/arm/allwinner/a20/a20_padconf.c == --- head/sys/arm/allwinner/a20/a20_padconf.cFri Jul 22 14:24:17 2016 (r303185) +++ head/sys/arm/allwinner/a20/a20_padconf.cFri Jul 22 14:39:55 2016 (r303186) @@ -87,7 +87,7 @@ const static struct allwinner_pins a20_p {"PC2", 2, 2, {"gpio_in", "gpio_out", "nand0", "spi0", NULL, NULL, NULL, NULL}}, {"PC3", 2, 3, {"gpio_in", "gpio_out", "nand0", NULL, NULL, NULL, NULL, NULL}}, {"PC4", 2, 4, {"gpio_in", "gpio_out", "nand0", NULL, NULL, NULL, NULL, NULL}}, - {"PC5", 2, 5, {"gpio_in", "gpio_out", "nand0", "mmc2", NULL, NULL, NULL, NULL}}, + {"PC5", 2, 5, {"gpio_in", "gpio_out", "nand0", NULL, NULL, NULL, NULL, NULL}}, {"PC6", 2, 6, {"gpio_in", "gpio_out", "nand0", "mmc2", NULL, NULL, NULL, NULL}}, {"PC7", 2, 7, {"gpio_in", "gpio_out", "nand0", "mmc2", NULL, NULL, NULL, NULL}}, {"PC8", 2, 8, {"gpio_in", "gpio_out", "nand0", "mmc2", NULL, NULL, NULL, NULL}}, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r303185 - in stable/10/lib/libc: gen locale regex stdio
Author: ache Date: Fri Jul 22 14:24:17 2016 New Revision: 303185 URL: https://svnweb.freebsd.org/changeset/base/303185 Log: MFC: r302824 1) Eliminate possibility to call __*collate_range_cmp() with inclomplete locale (which cause core dump) by removing whole 'table' argument by which it passed. 2) Restore __collate_range_cmp() in __sccl(). 3) Collating [a-z] range in regcomp() works for single byte locales only (we can't do it for other ones). In previous state only first 256 wide chars are considered and all others are just silently dropped from the range. Modified: stable/10/lib/libc/gen/fnmatch.c stable/10/lib/libc/gen/glob.c stable/10/lib/libc/locale/collate.h stable/10/lib/libc/locale/collcmp.c stable/10/lib/libc/regex/regcomp.c stable/10/lib/libc/stdio/vfscanf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/fnmatch.c == --- stable/10/lib/libc/gen/fnmatch.cFri Jul 22 12:55:31 2016 (r303184) +++ stable/10/lib/libc/gen/fnmatch.cFri Jul 22 14:24:17 2016 (r303185) @@ -304,8 +304,8 @@ rangematch(pattern, test, flags, newp, p if (table->__collate_load_error ? c <= test && test <= c2 : - __collate_range_cmp(table, c, test) <= 0 - && __collate_range_cmp(table, test, c2) <= 0 + __wcollate_range_cmp(c, test) <= 0 + && __wcollate_range_cmp(test, c2) <= 0 ) ok = 1; } else if (c == test) Modified: stable/10/lib/libc/gen/glob.c == --- stable/10/lib/libc/gen/glob.c Fri Jul 22 12:55:31 2016 (r303184) +++ stable/10/lib/libc/gen/glob.c Fri Jul 22 14:24:17 2016 (r303185) @@ -836,8 +836,8 @@ match(Char *name, Char *pat, Char *paten if ((*pat & M_MASK) == M_RNG) { if (table->__collate_load_error ? CHAR(c) <= CHAR(k) && CHAR(k) <= CHAR(pat[1]) : - __collate_range_cmp(table, CHAR(c), CHAR(k)) <= 0 - && __collate_range_cmp(table, CHAR(k), CHAR(pat[1])) <= 0 + __wcollate_range_cmp(CHAR(c), CHAR(k)) <= 0 + && __wcollate_range_cmp(CHAR(k), CHAR(pat[1])) <= 0 ) ok = 1; pat += 2; Modified: stable/10/lib/libc/locale/collate.h == --- stable/10/lib/libc/locale/collate.h Fri Jul 22 12:55:31 2016 (r303184) +++ stable/10/lib/libc/locale/collate.h Fri Jul 22 14:24:17 2016 (r303185) @@ -72,7 +72,8 @@ u_char*__collate_strdup(u_char *); u_char *__collate_substitute(struct xlocale_collate *, const u_char *); int__collate_load_tables(const char *); void __collate_lookup(struct xlocale_collate *, const u_char *, int *, int *, int *); -int__collate_range_cmp(struct xlocale_collate *, int, int); +int__collate_range_cmp(char, char); +int__wcollate_range_cmp(wchar_t, wchar_t); #ifdef COLLATE_DEBUG void __collate_print_tables(void); #endif Modified: stable/10/lib/libc/locale/collcmp.c == --- stable/10/lib/libc/locale/collcmp.c Fri Jul 22 12:55:31 2016 (r303184) +++ stable/10/lib/libc/locale/collcmp.c Fri Jul 22 14:24:17 2016 (r303185) @@ -33,20 +33,29 @@ __FBSDID("$FreeBSD$"); #include -#include +#include #include "collate.h" /* * Compare two characters using collate */ -int __collate_range_cmp(struct xlocale_collate *table, int c1, int c2) +int __collate_range_cmp(char c1, char c2) { static char s1[2], s2[2]; s1[0] = c1; s2[0] = c2; - struct _xlocale l = {{0}}; - l.components[XLC_COLLATE] = (struct xlocale_component *)table; - return (strcoll_l(s1, s2, )); + return (strcoll(s1, s2)); +} + +int __wcollate_range_cmp(wchar_t c1, wchar_t c2) +{ + wchar_t s1[2], s2[2]; + + s1[0] = c1; + s1[1] = L'\0'; + s2[0] = c2; + s2[1] = L'\0'; + return (wcscoll(s1, s2)); } Modified: stable/10/lib/libc/regex/regcomp.c == --- stable/10/lib/libc/regex/regcomp.c Fri Jul 22 12:55:31 2016 (r303184) +++ stable/10/lib/libc/regex/regcomp.c Fri Jul 22 14:24:17 2016 (r303185) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include
svn commit: r303184 - stable/11/contrib/llvm/tools/clang/lib/Driver
Author: emaste Date: Fri Jul 22 12:55:31 2016 New Revision: 303184 URL: https://svnweb.freebsd.org/changeset/base/303184 Log: MFC r303031: clang++: Always use --eh-frame-hdr on FreeBSD, even for -static FreeBSD uses LLVM's libunwind on FreeBSD/arm64 today (and we expect to use it more widely in the future) and it requires the EH frame segment in static binaries. Approved by: re (kib) Modified: stable/11/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/llvm/tools/clang/lib/Driver/Tools.cpp == --- stable/11/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Fri Jul 22 06:21:03 2016(r303183) +++ stable/11/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Fri Jul 22 12:55:31 2016(r303184) @@ -7922,12 +7922,12 @@ void freebsd::Linker::ConstructJob(Compi if (IsPIE) CmdArgs.push_back("-pie"); + CmdArgs.push_back("--eh-frame-hdr"); if (Args.hasArg(options::OPT_static)) { CmdArgs.push_back("-Bstatic"); } else { if (Args.hasArg(options::OPT_rdynamic)) CmdArgs.push_back("-export-dynamic"); -CmdArgs.push_back("--eh-frame-hdr"); if (Args.hasArg(options::OPT_shared)) { CmdArgs.push_back("-Bshareable"); } else { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r303146 - head/usr.bin/sed
On Fri, 22 Jul 2016, Alexey Dokuchaev wrote: Log: sed(1): Appease older GCC. "Appease" actually seems to be the correct wording here since gcc's detection of a variable that might be used unitialized seems to report one that is not used uninitialized. Isn't it also being dictated by style(9) and common sense? :) You missed that this combines a style fix in previous gcc appeasement (or just excessive paranoia) in one variable with appeasement for another variable, since copying the previous appeasement would copy its style bug. The 2 variables are used in exactly the same limited way. Modified: head/usr.bin/sed/process.c @@ -97,11 +97,12 @@ process(void) { struct s_command *cp; SPACE tspace; - size_t oldpsl = 0; + size_t oldpsl; char *p; int oldpsanl; p = NULL; + oldpsanl = oldpsl = 0; Multiple assignments on a single line is not very good style and is probably not KNF. Here it is further from being good style since the variables have different types. Since both types are integral and the value is 0 the implicit type conversions don't change the value. However, compilers should warn about down-converting a size_t to an int unless they do the analysis that this is safe because the value in the size_t is known to fit in the int. Bruce ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r303183 - head/sys/modules/cam
Author: kib Date: Fri Jul 22 06:21:03 2016 New Revision: 303183 URL: https://svnweb.freebsd.org/changeset/base/303183 Log: Make cam.ko loadable. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/modules/cam/Makefile Modified: head/sys/modules/cam/Makefile == --- head/sys/modules/cam/Makefile Fri Jul 22 05:09:08 2016 (r303182) +++ head/sys/modules/cam/Makefile Fri Jul 22 06:21:03 2016 (r303183) @@ -2,7 +2,7 @@ S= ${.CURDIR}/../.. -.PATH: $S/cam $S/cam/scsi $S/cam/ata $S/${MACHINE}/${MACHINE} +.PATH: $S/cam $S/cam/scsi $S/cam/ata $S/cam/nvme $S/${MACHINE}/${MACHINE} KMOD= cam @@ -41,6 +41,8 @@ SRCS+=ata_da.c SRCS+= ata_machdep.c .endif SRCS+= ata_pmp.c +SRCS+= nvme_all.c +SRCS+= nvme_xpt.c EXPORT_SYMS= YES # XXX evaluate ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"