CVS commit: [netbsd-8] src/lib/libc
Module Name:src Committed By: snj Date: Wed Oct 25 06:56:41 UTC 2017 Modified Files: src/lib/libc/net [netbsd-8]: getaddrinfo.c src/lib/libc/resolv [netbsd-8]: res_mkquery.c Log Message: Pull up following revision(s) (requested by jdolecek in ticket #317): lib/libc/net/getaddrinfo.c: revision 1.116 lib/libc/resolv/res_mkquery.c: revision 1.16 PR/52578: Benjamin M. Schwartz Set the AD bit when DNSSEC is enabled (RFC 6840 Section 5.7). -- PR/52578: Benjamin M. Schwartz: sync the internal copy of res_nquery for getaddrinfo, with the real version so that we handle EDNS fallback. To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.115.6.1 src/lib/libc/net/getaddrinfo.c cvs rdiff -u -r1.15 -r1.15.8.1 src/lib/libc/resolv/res_mkquery.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/net/getaddrinfo.c diff -u src/lib/libc/net/getaddrinfo.c:1.115 src/lib/libc/net/getaddrinfo.c:1.115.6.1 --- src/lib/libc/net/getaddrinfo.c:1.115 Tue Jan 10 17:51:01 2017 +++ src/lib/libc/net/getaddrinfo.c Wed Oct 25 06:56:41 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: getaddrinfo.c,v 1.115 2017/01/10 17:51:01 christos Exp $ */ +/* $NetBSD: getaddrinfo.c,v 1.115.6.1 2017/10/25 06:56:41 snj Exp $ */ /* $KAME: getaddrinfo.c,v 1.29 2000/08/31 17:26:57 itojun Exp $ */ /* @@ -55,7 +55,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: getaddrinfo.c,v 1.115 2017/01/10 17:51:01 christos Exp $"); +__RCSID("$NetBSD: getaddrinfo.c,v 1.115.6.1 2017/10/25 06:56:41 snj Exp $"); #endif /* LIBC_SCCS and not lint */ #ifndef RUMP_ACTION @@ -2539,13 +2539,14 @@ _yp_getaddrinfo(void *rv, void *cb_data, */ static int res_queryN(const char *name, /* domain name */ struct res_target *target, -res_state res) +res_state statp) { u_char buf[MAXPACKET]; HEADER *hp; int n; struct res_target *t; int rcode; + u_char *rdata; int ancount; _DIAGASSERT(name != NULL); @@ -2558,8 +2559,12 @@ res_queryN(const char *name, /* domain n int class, type; u_char *answer; int anslen; + u_int oflags; hp = (HEADER *)(void *)t->answer; + oflags = statp->_flags; + +again: hp->rcode = NOERROR; /* default */ /* make it easier... */ @@ -2568,42 +2573,63 @@ res_queryN(const char *name, /* domain n answer = t->answer; anslen = t->anslen; #ifdef DEBUG - if (res->options & RES_DEBUG) + if (statp->options & RES_DEBUG) printf(";; res_nquery(%s, %d, %d)\n", name, class, type); #endif - n = res_nmkquery(res, QUERY, name, class, type, NULL, 0, NULL, + n = res_nmkquery(statp, QUERY, name, class, type, NULL, 0, NULL, buf, (int)sizeof(buf)); #ifdef RES_USE_EDNS0 - if (n > 0 && (res->options & RES_USE_EDNS0) != 0) - n = res_nopt(res, n, buf, (int)sizeof(buf), anslen); + if (n > 0 && (statp->_flags & RES_F_EDNS0ERR) == 0 && + (statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC)) != 0) { + n = res_nopt(statp, n, buf, (int)sizeof(buf), anslen); + rdata = &buf[n]; + if (n > 0 && (statp->options & RES_NSID) != 0U) { +n = res_nopt_rdata(statp, n, buf, +(int)sizeof(buf), +rdata, NS_OPT_NSID, 0, NULL); + } + } #endif if (n <= 0) { #ifdef DEBUG - if (res->options & RES_DEBUG) + if (statp->options & RES_DEBUG) printf(";; res_nquery: mkquery failed\n"); #endif h_errno = NO_RECOVERY; return n; } - n = res_nsend(res, buf, n, answer, anslen); -#if 0 + n = res_nsend(statp, buf, n, answer, anslen); if (n < 0) { +#ifdef RES_USE_EDNS0 + /* if the query choked with EDNS0, retry without EDNS0 */ + if ((statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC)) != 0U && + ((oflags ^ statp->_flags) & RES_F_EDNS0ERR) != 0) { +statp->_flags |= RES_F_EDNS0ERR; +if (statp->options & RES_DEBUG) + printf(";; res_nquery: retry without EDNS0\n"); +goto again; + } +#endif +#if 0 #ifdef DEBUG - if (res->options & RES_DEBUG) + if (statp->options & RES_DEBUG) printf(";; res_query: send error\n"); #endif h_errno = TRY_AGAIN; return n; - } #endif + } if (n < 0 || hp->rcode != NOERROR || ntohs(hp->ancount) == 0) { rcode = hp->rcode; /* record most recent error */ #ifdef DEBUG - if (res->options & RES_DEBUG) -printf(";; rcode = %u, ancount=%u\n", hp->rcode, -ntohs(hp->ancount)); + if (statp->options & RES_DEBUG) +printf(";; rcode = (%s), counts = an:%d ns:%d ar:%d\n", + p_rcode(hp->rcode), + ntohs(hp->ancount), + ntohs(hp->nscount), + ntohs(hp->arcount)); #endif continue; } Index: src/lib/libc/resolv/res_mkquery.c diff -u src/lib/libc/resolv/res_mkquery.c:1.15 src/lib/libc/resolv/res_mkquery.c:1.15.8.1 --- src/lib/libc/resolv/res_mkquery.c:1.15 Tue Feb 24 17:56:20 2015 +++ src/lib/libc/resolv/res_mkquery.c Wed Oct 25 06:56:41 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: res_mkquery.c,v 1.15 2015/02/24 17
CVS commit: [netbsd-8] src/share/man/man4
Module Name:src Committed By: snj Date: Wed Oct 25 06:54:27 UTC 2017 Modified Files: src/share/man/man4 [netbsd-8]: u3g.4 Log Message: Pull up following revision(s) (requested by sevan in ticket #311): share/man/man4/u3g.4: revision 1.9 u3ginit was split out and became umodeswitch. Update the kernel configuration declaration. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.8.18.1 src/share/man/man4/u3g.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/u3g.4 diff -u src/share/man/man4/u3g.4:1.8 src/share/man/man4/u3g.4:1.8.18.1 --- src/share/man/man4/u3g.4:1.8 Tue Mar 18 18:20:39 2014 +++ src/share/man/man4/u3g.4 Wed Oct 25 06:54:27 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: u3g.4,v 1.8 2014/03/18 18:20:39 riastradh Exp $ +.\" $NetBSD: u3g.4,v 1.8.18.1 2017/10/25 06:54:27 snj Exp $ .\" .\" Copyright (c) 2008 AnyWi Technologies .\" All rights reserved. @@ -17,7 +17,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd March 14, 2013 +.Dd October 8, 2017 .Dt U3G 4 .Os .Sh NAME @@ -28,7 +28,7 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent -.Cd "u3ginit* at uhub? port ?" +.Cd "umodeswitch* at uhub? port ?" .Cd "u3g* at uhub? port ?" .Cd "ucom* at u3g?" .Ed
CVS commit: [netbsd-8] src/bin/sh
Module Name:src Committed By: snj Date: Wed Oct 25 06:51:36 UTC 2017 Modified Files: src/bin/sh [netbsd-8]: expand.c sh.1 Log Message: Pull up following revision(s) (requested by kre in ticket #310): bin/sh/expand.c: revision 1.121 bin/sh/sh.1: revision 1.167 via patch Three fixes and a change to ~ expansions 1. A serious bug introduced 3 1/2 months ago (approx) (rev 1.116) which broke all but the simple cases of ~ expansions is fixed (amazingly, given the magnitude of this problem, no-one noticed!) 2. An ancient bug (probably from when ~ expansion was first addedin 1994, and certainly is in NetBSD-6 vintage shells) where ${UnSeT:-~} (and similar) does not expand the ~ is fixed (note that ${UnSeT:-~/} does expand, this should give a clue to the cause of the problem. 3. A fix/change to make the effects of ~ expansions on ${UnSeT:=whatever} identical to those in UnSeT=whatever In particular, with HOME=/foo ${UnSeT:=~:~} now assigns, and expands to, /foo:/foo rather than ~:~ just as VAR=~:~ assigns /foo:/foo to VAR. Note this is even after the previous fix (ie: appending a '/' would not change the results here.) It is hard to call this one a bug fix for certain (though I believe it is) as many other shells also produce different results for the ${V:=...} expansions than they do for V=... (though not all the same as we did). POSIX is not clear about this, expanding ~ after : in VAR=whatever assignments is clear, whether ${U:=whatever} assignments should be treated the same way is not stated, one way or the other. 4. Change to make ':' terminate the user name in a ~ expansion in all cases, not only in assignments. This makes sense, as ':' is one character that cannot occur in user names, no matter how otherwise weird they become. bash (incl in posix mode) ksh93 and bosh all act this way, whereas most other shells (and POSIX) do not. Because this is clearly an extension to POSIX, do this one only when not in posix mode (not set -o posix). To generate a diff of this commit: cvs rdiff -u -r1.110.2.2 -r1.110.2.3 src/bin/sh/expand.c cvs rdiff -u -r1.146.2.3 -r1.146.2.4 src/bin/sh/sh.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/expand.c diff -u src/bin/sh/expand.c:1.110.2.2 src/bin/sh/expand.c:1.110.2.3 --- src/bin/sh/expand.c:1.110.2.2 Sun Jul 23 14:58:14 2017 +++ src/bin/sh/expand.c Wed Oct 25 06:51:36 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: expand.c,v 1.110.2.2 2017/07/23 14:58:14 snj Exp $ */ +/* $NetBSD: expand.c,v 1.110.2.3 2017/10/25 06:51:36 snj Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)expand.c 8.5 (Berkeley) 5/15/95"; #else -__RCSID("$NetBSD: expand.c,v 1.110.2.2 2017/07/23 14:58:14 snj Exp $"); +__RCSID("$NetBSD: expand.c,v 1.110.2.3 2017/10/25 06:51:36 snj Exp $"); #endif #endif /* not lint */ @@ -358,6 +358,7 @@ exptilde(const char *p, int flag) #endif setstackmark(&smark); + (void) grabstackstr(expdest); user = stackblock(); /* we will just borrow top of stack */ while ((c = *++p) != '\0') { @@ -369,16 +370,16 @@ exptilde(const char *p, int flag) case CTLARI: /* just leave original unchanged */ case CTLENDARI: case CTLQUOTEMARK: - case CTLENDVAR: case '\n': popstackmark(&smark); return (startp); case CTLNONL: continue; case ':': - if (flag & EXP_VARTILDE) + if (!posix || flag & EXP_VARTILDE) goto done; break; + case CTLENDVAR: case '/': goto done; } @@ -679,7 +680,7 @@ subevalvar(const char *p, const char *st herefd = -1; VTRACE(DBG_EXPAND, ("subevalvar(%d) \"%.20s\" ${%.*s} sloc=%d vf=%x\n", subtype, p, p-str, str, startloc, varflags)); - argstr(p, EXP_TILDE); + argstr(p, subtype == VSASSIGN ? EXP_VARTILDE : EXP_TILDE); STACKSTRNUL(expdest); herefd = saveherefd; argbackq = saveargbackq; Index: src/bin/sh/sh.1 diff -u src/bin/sh/sh.1:1.146.2.3 src/bin/sh/sh.1:1.146.2.4 --- src/bin/sh/sh.1:1.146.2.3 Sun Jul 23 14:58:14 2017 +++ src/bin/sh/sh.1 Wed Oct 25 06:51:36 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: sh.1,v 1.146.2.3 2017/07/23 14:58:14 snj Exp $ +.\" $NetBSD: sh.1,v 1.146.2.4 2017/10/25 06:51:36 snj Exp $ .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -31,7 +31,7 @@ .\" .\" @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" -.Dd July 1, 2017 +.Dd October 6, 2017 .Dt SH 1 .\" everything except c o and s (keep them ordered) .ds flags abCEeFfhIiLmnpquVvx @@ -472,6 +472,10 @@ opened using the built-in command are passed on to utilities executed .Dq ( yes in posix mode), +whether a colon (:) terminates the user name in tilde (~) expansions +other than in assignment statements +.Dq ( no +in posix mode), and whether the shell treats an empty brace-list compound statement as a syntax error (expected by P
CVS commit: src
Module Name:src Committed By: kre Date: Wed Oct 25 06:32:59 UTC 2017 Modified Files: src/bin/stty: stty.1 src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/comp: mi src/distrib/sets/lists/debug: shl.mi src/lib/libc: shlib_version src/lib/libc/termios: Makefile.inc src/sys/sys: termios.h ttycom.h Added Files: src/lib/libc/termios: tcgetwinsize.3 tcgetwinsize.c tcsetwinsize.c Log Message: Implement tcgetwinsize() and tcsetwinsize() in libc, with access via (and document them.) Bump libc minor number for them. Arrange for "struct winsize" to become visible in Fix stty(1) so that "cols" is reported as the arg to set number of columns, and "columns" is the alias, rather than the other way around, as "cols" is what has been added to POSIX. This is to conform with updates to be included in 1003.1 issue 8 (whenever that gets published) currently available at: http://austingroupbugs.net/view.php?id=1053 (see note 3863) http://austingroupbugs.net/view.php?id=1151 (see note 3856) To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/bin/stty/stty.1 cvs rdiff -u -r1.823 -r1.824 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.2152 -r1.2153 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.185 -r1.186 src/distrib/sets/lists/debug/shl.mi cvs rdiff -u -r1.277 -r1.278 src/lib/libc/shlib_version cvs rdiff -u -r1.4 -r1.5 src/lib/libc/termios/Makefile.inc cvs rdiff -u -r0 -r1.1 src/lib/libc/termios/tcgetwinsize.3 \ src/lib/libc/termios/tcgetwinsize.c src/lib/libc/termios/tcsetwinsize.c cvs rdiff -u -r1.33 -r1.34 src/sys/sys/termios.h cvs rdiff -u -r1.20 -r1.21 src/sys/sys/ttycom.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/stty/stty.1 diff -u src/bin/stty/stty.1:1.43 src/bin/stty/stty.1:1.44 --- src/bin/stty/stty.1:1.43 Sun Aug 14 23:29:43 2016 +++ src/bin/stty/stty.1 Wed Oct 25 06:32:59 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: stty.1,v 1.43 2016/08/14 23:29:43 sevan Exp $ +.\" $NetBSD: stty.1,v 1.44 2017/10/25 06:32:59 kre Exp $ .\" .\" Copyright (c) 1990, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -477,13 +477,13 @@ The status line consists of the system load average, the current command name, its process ID, the event the process is waiting on (or the status of the process), the user and system times, percent CPU, and current memory usage. -.It Cm columns Ar number +.It Cm cols Ar number The terminal size is recorded as having .Ar number columns. -.It Cm cols Ar number +.It Cm columns Ar number An alias for -.Cm columns . +.Cm cols . .It Cm rows Ar number The terminal size is recorded as having .Ar number Index: src/distrib/sets/lists/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.823 src/distrib/sets/lists/base/shl.mi:1.824 --- src/distrib/sets/lists/base/shl.mi:1.823 Tue Oct 10 19:31:56 2017 +++ src/distrib/sets/lists/base/shl.mi Wed Oct 25 06:32:59 2017 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.823 2017/10/10 19:31:56 christos Exp $ +# $NetBSD: shl.mi,v 1.824 2017/10/25 06:32:59 kre Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -18,7 +18,7 @@ ./lib/libblacklist.so.0.0 base-sys-shlib dynamicroot ./lib/libc.so base-sys-shlib dynamicroot ./lib/libc.so.12base-sys-shlib dynamicroot -./lib/libc.so.12.208base-sys-shlib dynamicroot +./lib/libc.so.12.209base-sys-shlib dynamicroot ./lib/libcrypt.sobase-sys-shlib dynamicroot ./lib/libcrypt.so.1base-sys-shlib dynamicroot ./lib/libcrypt.so.1.0base-sys-shlib dynamicroot @@ -217,7 +217,7 @@ ./usr/lib/libc++.so.1.0base-sys-shlib compatfile,libcxx ./usr/lib/libc.sobase-sys-shlib compatfile ./usr/lib/libc.so.12base-sys-shlib compatfile -./usr/lib/libc.so.12.208 base-sys-shlib compatfile +./usr/lib/libc.so.12.209 base-sys-shlib compatfile ./usr/lib/libcdk.sobase-obsolete compatfile,obsolete ./usr/lib/libcom_err.sobase-krb5-shlib compatfile,kerberos ./usr/lib/libcom_err.so.8 base-krb5-shlib compatfile,kerberos Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2152 src/distrib/sets/lists/comp/mi:1.2153 --- src/distrib/sets/lists/comp/mi:1.2152 Mon Oct 16 11:38:25 2017 +++ src/distrib/sets/lists/comp/mi Wed Oct 25 06:32:59 2017 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2152 2017/10/16 11:38:25 maya Exp $ +# $NetBSD: mi,v 1.2153 2017/10/25 06:32:59 kre Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -9570,9 +9570,11 @@ ./usr/share/man/cat3/tcgetattr.0 comp-c-catman .cat ./usr/share/man/cat3/tcgetpgrp.0 comp-c-catman .cat ./usr/share/man/cat3/tcgetsid.0 comp-c-catman .cat +./usr/share/man/cat3/tcgetwinsize.0 comp-c-catman .cat ./usr/share/man/cat
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Wed Oct 25 06:02:40 UTC 2017 Modified Files: src/sys/kern: kern_event.c Log Message: Document lock order and locking rules. To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/sys/kern/kern_event.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_event.c diff -u src/sys/kern/kern_event.c:1.94 src/sys/kern/kern_event.c:1.95 --- src/sys/kern/kern_event.c:1.94 Sat Sep 16 23:55:16 2017 +++ src/sys/kern/kern_event.c Wed Oct 25 06:02:40 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_event.c,v 1.94 2017/09/16 23:55:16 christos Exp $ */ +/* $NetBSD: kern_event.c,v 1.95 2017/10/25 06:02:40 riastradh Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.94 2017/09/16 23:55:16 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.95 2017/10/25 06:02:40 riastradh Exp $"); #include #include @@ -170,7 +170,26 @@ static int user_kfilterc; /* current o static int user_kfiltermaxc; /* max size so far */ static size_t user_kfiltersz; /* size of allocated memory */ -/* Locks */ +/* + * Global Locks. + * + * Lock order: + * + * kqueue_filter_lock + * -> kn_kq->kq_fdp->fd_lock + * -> object lock (e.g., device driver lock, kqueue_misc_lock, &c.) + * -> kn_kq->kq_lock + * + * Locking rules: + * + * f_attach: fdp->fd_lock, KERNEL_LOCK + * f_detach: fdp->fd_lock, KERNEL_LOCK + * f_event(!NOTE_SUBMIT) via kevent: fdp->fd_lock, _no_ object lock + * f_event via knote: whatever caller guarantees + * Typically, f_event(NOTE_SUBMIT) via knote: object lock + *f_event(!NOTE_SUBMIT) via knote: nothing, + * acquires/releases object lock inside. + */ static krwlock_t kqueue_filter_lock; /* lock on filter lists */ static kmutex_t kqueue_misc_lock; /* miscellaneous */
CVS commit: src/bin/sh
Module Name:src Committed By: kre Date: Wed Oct 25 05:42:56 UTC 2017 Modified Files: src/bin/sh: jobs.c sh.1 Log Message: Add options to the builtin jobid command to allow discovering the process group (-g), the process leader pid (-p) ($! if the job was &'d) and the job identifier (-j) (the %n that refers to the job) in addition to (default) the list of all pids in the job (which it has always done). No change to the (single) "job" arg, which is a specifier of the job: the process leader pid, or one of the % forms, and defaults to %% (aka %+). (This is all now documented in sh(1)) Also document the jobs command properly (no change to the command, just document what it actually is.) And while here, a whole new section in sh(1) "Job Control". It probably needs better wording, but this is (perhaps) better than the nothing that was there before. To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.92 src/bin/sh/jobs.c cvs rdiff -u -r1.168 -r1.169 src/bin/sh/sh.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/jobs.c diff -u src/bin/sh/jobs.c:1.91 src/bin/sh/jobs.c:1.92 --- src/bin/sh/jobs.c:1.91 Mon Oct 23 10:52:07 2017 +++ src/bin/sh/jobs.c Wed Oct 25 05:42:56 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: jobs.c,v 1.91 2017/10/23 10:52:07 kre Exp $ */ +/* $NetBSD: jobs.c,v 1.92 2017/10/25 05:42:56 kre Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)jobs.c 8.5 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: jobs.c,v 1.91 2017/10/23 10:52:07 kre Exp $"); +__RCSID("$NetBSD: jobs.c,v 1.92 2017/10/25 05:42:56 kre Exp $"); #endif #endif /* not lint */ @@ -384,6 +384,10 @@ restartjob(struct job *jp) error("Cannot continue job (%s)", strerror(errno)); for (ps = jp->ps, i = jp->nprocs ; --i >= 0 ; ps++) { if (WIFSTOPPED(ps->status)) { + VTRACE(DBG_JOBS, ( + "restartjob: [%jd] pid %d status change" + " from %#x (stopped) to -1 (running)\n", + (size_t)(jp-jobtab+1), ps->pid, ps->status)); ps->status = -1; jp->state = JOBRUNNING; } @@ -720,9 +724,43 @@ jobidcmd(int argc, char **argv) { struct job *jp; int i; + int pg = 0, onep = 0, job = 0; + + while ((i = nextopt("gjp"))) { + switch (i) { + case 'g': pg = 1; break; + case 'j': job = 1; break; + case 'p': onep = 1; break; + } + } + CTRACE(DBG_JOBS, ("jobidcmd%s%s%s%s %s\n", pg ? " -g" : "", + onep ? " -p" : "", job ? " -j" : "", jobs_invalid ? " [inv]" : "", + *argptr ? *argptr : "")); + if (pg + onep + job > 1) + error("-g -j and -p options cannot be combined"); + + if (argptr[0] && argptr[1]) + error("usage: jobid [-g|-p|-r] jobid"); - nextopt(""); jp = getjob(*argptr, 0); + if (job) { + out1fmt("%%%jd\n", (size_t)(jp - jobtab + 1)); + return 0; + } + if (pg) { + if (jp->pgrp != 0) { + out1fmt("%ld\n", (long)jp->pgrp); + return 0; + } + return 1; + } + if (onep) { + i = jp->nprocs - 1; + if (i < 0) + return 1; + out1fmt("%ld\n", (long)jp->ps[i].pid); + return 0; + } for (i = 0 ; i < jp->nprocs ; ) { out1fmt("%ld", (long)jp->ps[i].pid); out1c(++i < jp->nprocs ? ' ' : '\n'); @@ -873,6 +911,7 @@ makejob(union node *node, int nprocs) jp->used = 1; jp->changed = 0; jp->nprocs = 0; + jp->pgrp = 0; #if JOBS jp->jobctl = jobctl; set_curjob(jp, 1); @@ -939,6 +978,7 @@ forkparent(struct job *jp, union node *n pgrp = pid; else pgrp = jp->ps[0].pid; + jp->pgrp = pgrp; /* This can fail because we are doing it in the child also */ (void)setpgid(pid, pgrp); } Index: src/bin/sh/sh.1 diff -u src/bin/sh/sh.1:1.168 src/bin/sh/sh.1:1.169 --- src/bin/sh/sh.1:1.168 Sun Oct 15 12:01:43 2017 +++ src/bin/sh/sh.1 Wed Oct 25 05:42:56 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: sh.1,v 1.168 2017/10/15 12:01:43 pgoyette Exp $ +.\" $NetBSD: sh.1,v 1.169 2017/10/25 05:42:56 kre Exp $ .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -31,7 +31,7 @@ .\" .\" @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" -.Dd October 6, 2017 +.Dd October 24, 2017 .Dt SH 1 .\" everything except c o and s (keep them ordered) .ds flags abCEeFfhIiLmnpquVvx @@ -2433,14 +2433,91 @@ Read the .Va file to set key bindings as defined by .Xr editrc 5 . -.It jobid Op Ar job -Print the process id's of the processes in the job. +.It jobid Oo Fl g Ns \&| Ns Fl j Ns \&| Ns Fl p Oc Op Ar job +With no flags, print the process identifiers of the processes in the job. If the .Ar job argument is omitted, the current job is used. -.It jobs -This command lists out all the background processes +Any of the ways to select a job may be used for +.Ar job , +including the +.Sq \&% +forms, or the process id of the job leader +.Po +.Dq \&$! +if the job was created in the background. +.Pc +.Pp +If one of the flags is given, then instead of the list of +process identifiers, the +.Ic jobid +command prints: +.Bl
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Wed Oct 25 04:45:41 UTC 2017 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c Log Message: - For X550 and newer, print NVM Image Version with %u.%02x (e.g. "0.05"). - Fix value check of OEM_NVM_IMAGE_VER. To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/sys/dev/pci/ixgbe/ixgbe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.106 src/sys/dev/pci/ixgbe/ixgbe.c:1.107 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.106 Mon Oct 23 09:31:18 2017 +++ src/sys/dev/pci/ixgbe/ixgbe.c Wed Oct 25 04:45:41 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.106 2017/10/23 09:31:18 msaitoh Exp $ */ +/* $NetBSD: ixgbe.c,v 1.107 2017/10/25 04:45:41 msaitoh Exp $ */ /** @@ -972,8 +972,13 @@ ixgbe_attach(device_t parent, device_t d high = (nvmreg >> 12) & 0x0f; low = (nvmreg >> 4) & 0xff; id = nvmreg & 0x0f; - aprint_normal(" NVM Image Version %u.%u ID 0x%x,", high, low, - id); + aprint_normal(" NVM Image Version %u.", high); + if (hw->mac.type == ixgbe_mac_X540) + str = "%x"; + else + str = "%02x"; + aprint_normal(str, low); + aprint_normal(" ID 0x%x,", id); break; case ixgbe_mac_X550EM_x: case ixgbe_mac_X550: @@ -982,7 +987,7 @@ ixgbe_attach(device_t parent, device_t d break; high = (nvmreg >> 12) & 0x0f; low = nvmreg & 0xff; - aprint_normal(" NVM Image Version %u.%u,", high, low); + aprint_normal(" NVM Image Version %u.%02x,", high, low); break; default: break; @@ -998,7 +1003,7 @@ ixgbe_attach(device_t parent, device_t d high = (nvmreg >> 12) & 0x0f; low = (nvmreg >> 4) & 0xff; id = nvmreg & 0x000f; - aprint_normal(" PHY FW Revision %u.%u ID 0x%x,", high, low, + aprint_normal(" PHY FW Revision %u.%02x ID 0x%x,", high, low, id); break; default: @@ -1017,7 +1022,7 @@ ixgbe_attach(device_t parent, device_t d aprint_normal(" NVM Map version %u.%02x,", high, low); } hw->eeprom.ops.read(hw, IXGBE_OEM_NVM_IMAGE_VER, &nvmreg); - if (nvmreg == 0x) { + if (nvmreg != 0x) { high = (nvmreg >> 12) & 0x0f; low = nvmreg & 0x00ff; aprint_verbose(" OEM NVM Image version %u.%02x,", high,
CVS commit: src/sys/net
Module Name:src Committed By: ozaki-r Date: Wed Oct 25 04:33:15 UTC 2017 Modified Files: src/sys/net: if_bridge.c Log Message: Remove unnecessary splsoftnet To generate a diff of this commit: cvs rdiff -u -r1.137 -r1.138 src/sys/net/if_bridge.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_bridge.c diff -u src/sys/net/if_bridge.c:1.137 src/sys/net/if_bridge.c:1.138 --- src/sys/net/if_bridge.c:1.137 Wed Oct 25 04:17:34 2017 +++ src/sys/net/if_bridge.c Wed Oct 25 04:33:15 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bridge.c,v 1.137 2017/10/25 04:17:34 ozaki-r Exp $ */ +/* $NetBSD: if_bridge.c,v 1.138 2017/10/25 04:33:15 ozaki-r Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -80,7 +80,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.137 2017/10/25 04:17:34 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.138 2017/10/25 04:33:15 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_bridge_ipf.h" @@ -465,9 +465,6 @@ bridge_clone_destroy(struct ifnet *ifp) { struct bridge_softc *sc = ifp->if_softc; struct bridge_iflist *bif; - int s; - - s = splsoftnet(); bridge_stop(ifp, 1); @@ -482,8 +479,6 @@ bridge_clone_destroy(struct ifnet *ifp) PSLIST_DESTROY(&sc->sc_iflist_psref.bip_iflist); BRIDGE_UNLOCK(sc); - splx(s); - if_detach(ifp); /* Tear down the routing table. */
CVS commit: src/sys/net
Module Name:src Committed By: ozaki-r Date: Wed Oct 25 04:17:34 UTC 2017 Modified Files: src/sys/net: if_bridge.c Log Message: Don't free sc_rthash twice To generate a diff of this commit: cvs rdiff -u -r1.136 -r1.137 src/sys/net/if_bridge.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_bridge.c diff -u src/sys/net/if_bridge.c:1.136 src/sys/net/if_bridge.c:1.137 --- src/sys/net/if_bridge.c:1.136 Mon Oct 23 09:22:51 2017 +++ src/sys/net/if_bridge.c Wed Oct 25 04:17:34 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bridge.c,v 1.136 2017/10/23 09:22:51 msaitoh Exp $ */ +/* $NetBSD: if_bridge.c,v 1.137 2017/10/25 04:17:34 ozaki-r Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -80,7 +80,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.136 2017/10/23 09:22:51 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.137 2017/10/25 04:17:34 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_bridge_ipf.h" @@ -494,7 +494,6 @@ bridge_clone_destroy(struct ifnet *ifp) callout_destroy(&sc->sc_brcallout); callout_destroy(&sc->sc_bstpcallout); workqueue_destroy(sc->sc_rtage_wq); - kmem_free(sc->sc_rthash, sizeof(*sc->sc_rthash) * BRIDGE_RTHASH_SIZE); kmem_free(sc, sizeof(*sc)); return 0;
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: sevan Date: Tue Oct 24 22:38:32 UTC 2017 Modified Files: src/sys/arch/evbarm/conf: BEAGLEBOARD Log Message: Switch BEAGLEBOARD config over to using GENERIC.common. Remove duplicates already defined in GENERIC.common. To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/arch/evbarm/conf/BEAGLEBOARD Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/BEAGLEBOARD diff -u src/sys/arch/evbarm/conf/BEAGLEBOARD:1.63 src/sys/arch/evbarm/conf/BEAGLEBOARD:1.64 --- src/sys/arch/evbarm/conf/BEAGLEBOARD:1.63 Thu Sep 14 07:58:40 2017 +++ src/sys/arch/evbarm/conf/BEAGLEBOARD Tue Oct 24 22:38:32 2017 @@ -1,122 +1,20 @@ # -# $NetBSD: BEAGLEBOARD,v 1.63 2017/09/14 07:58:40 mrg Exp $ +# $NetBSD: BEAGLEBOARD,v 1.64 2017/10/24 22:38:32 sevan Exp $ # # BEAGLEBOARD -- TI OMAP 3530 Eval Board Kernel # include "arch/evbarm/conf/std.beagle" - -# estimated number of users - -maxusers 32 - -# Standard system options - -options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT -#options NTP # NTP phase/frequency locked loop +include "arch/evbarm/conf/GENERIC.common" # CPU options #options UVMHIST,UVMHIST_PRINT options CPU_CORTEXA8 options OMAP_3530 -options PMAPCOUNTERS - -# Architecture options - -# File systems - -file-system FFS # UFS -#file-system LFS # log-structured file system -file-system MFS # memory file system -file-system NFS # Network file system -#file-system ADOSFS # AmigaDOS-compatible file system -#file-system EXT2FS # second extended file system (linux) -#file-system CD9660 # ISO 9660 + Rock Ridge file system -file-system MSDOSFS # MS-DOS file system -#file-system FDESC # /dev/fd -file-system KERNFS # /kern -#file-system NULLFS # loopback file system -file-system PROCFS # /proc -#file-system PUFFS # Userspace file systems (e.g. ntfs-3g & sshfs) -#file-system UMAPFS # NULLFS + uid and gid remapping -#file-system UNION # union file system -file-system TMPFS # memory file system -file-system PTYFS # /dev/pts/N support - -# File system options -#options QUOTA # legacy UFS quotas -#options QUOTA2 # new, in-filesystem UFS quotas -#options DISKLABEL_EI # disklabel Endian Independent support -#options FFS_EI # FFS Endian Independent support -#options NFSSERVER -options WAPBL # File system journaling support -#options FFS_NO_SNAPSHOT # No FFS snapshot support - -# Networking options - -#options GATEWAY # packet forwarding -options INET # IP + ICMP + TCP + UDP -options INET6 # IPV6 -#options IPSEC # IP security -#options IPSEC_DEBUG # debug for IP security -#options MROUTING # IP multicast routing -#options PIM # Protocol Independent Multicast -#options NETATALK # AppleTalk networking -#options PPP_BSDCOMP # BSD-Compress compression support for PPP -#options PPP_DEFLATE # Deflate compression support for PPP -#options PPP_FILTER # Active filter support for PPP (requires bpf) -#options TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG - -options NFS_BOOT_BOOTP -options NFS_BOOT_DHCP -#options NFS_BOOT_BOOTSTATIC -#options NFS_BOOTSTATIC_MYIP="\"192.168.1.4\"" -#options NFS_BOOTSTATIC_GWIP="\"192.168.1.1\"" -#options NFS_BOOTSTATIC_MASK="\"255.255.255.0\"" -#options NFS_BOOTSTATIC_SERVADDR="\"192.168.1.1\"" -#options NFS_BOOTSTATIC_SERVER="\"192.168.1.1:/nfs/sdp2430\"" - -options NFS_BOOT_RWSIZE=1024 - -# Compatibility options -include "conf/compat_netbsd30.config" -options COMPAT_NETBSD32 # allow running arm (e.g. non-earm) binaries - -# Shared memory options - -options SYSVMSG # System V-like message queues -options SYSVSEM # System V-like semaphores -options SYSVSHM # System V-like memory sharing - -# Device options - -#options MEMORY_DISK_HOOKS # boottime setup of ramdisk -#options MEMORY_DISK_ROOT_SIZE=8192 # Size in blocks -#options MEMORY_DISK_DYNAMIC -#options MINIROOTSIZE=1000 # Size in blocks -#options MEMORY_DISK_IS_ROOT # use memory disk as root - -# Miscellaneous kernel options -options KTRACE # system call tracing, a la ktrace(1) -#options SCSIVERBOSE # Verbose SCSI errors -#options MIIVERBOSE # Verbose MII autoconfuration messages -#options DDB_KEYCODE=0x40 -#options USERCONF # userconf(4) support -#options PIPE_SOCKETPAIR # smaller, but slower pipe(2) # Development and Debugging options -#options PERFCTRS # performance counters -options DIAGNOSTIC # internal consistency checks -#options DEBUG -#options PMAP_DEBUG # Enable pmap_debug_level code -#options IPKDB # remote kernel debugging -#options VERBOSE_INIT_ARM # verbose bootstraping messages -options DDB # in-kernel debugger -options DDB_ONPANIC=1 -options DDB_HISTORY_SIZE=100 # Enable history editing in DDB -#options KGDB makeoptions DEBUG="-g" # compile full symbol table makeoptions COPY_SYMTAB=1 @@ -271,24 +169,4 @@ options HWCLOCK options HW
CVS commit: [tls-maxphys] src/sys/ufs/ufs
Module Name:src Committed By: jdolecek Date: Tue Oct 24 22:27:43 UTC 2017 Modified Files: src/sys/ufs/ufs [tls-maxphys]: ufs_vfsops.c Log Message: remove rebase merge artifacts To generate a diff of this commit: cvs rdiff -u -r1.51.2.3 -r1.51.2.4 src/sys/ufs/ufs/ufs_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/ufs/ufs/ufs_vfsops.c diff -u src/sys/ufs/ufs/ufs_vfsops.c:1.51.2.3 src/sys/ufs/ufs/ufs_vfsops.c:1.51.2.4 --- src/sys/ufs/ufs/ufs_vfsops.c:1.51.2.3 Wed Aug 20 00:04:45 2014 +++ src/sys/ufs/ufs/ufs_vfsops.c Tue Oct 24 22:27:42 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_vfsops.c,v 1.51.2.3 2014/08/20 00:04:45 tls Exp $ */ +/* $NetBSD: ufs_vfsops.c,v 1.51.2.4 2017/10/24 22:27:42 jdolecek Exp $ */ /* * Copyright (c) 1991, 1993, 1994 @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ufs_vfsops.c,v 1.51.2.3 2014/08/20 00:04:45 tls Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ufs_vfsops.c,v 1.51.2.4 2017/10/24 22:27:42 jdolecek Exp $"); #if defined(_KERNEL_OPT) #include "opt_ffs.h" @@ -99,7 +99,6 @@ ufs_root(struct mount *mp, struct vnode } /* -<<< ufs_vfsops.c * Get (from disk) and set (to mount structure) maximum I/O size */ @@ -130,7 +129,6 @@ ufs_update_maxphys(struct mount *mp) } /* -=== * Look up and return a vnode/inode pair by inode number. */ int @@ -151,7 +149,6 @@ ufs_vget(struct mount *mp, ino_t ino, st } /* ->>> 1.53 * Do operations associated with quotas */ int
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: sevan Date: Tue Oct 24 22:25:51 UTC 2017 Modified Files: src/sys/arch/evbarm/conf: BEAGLEBOARDXM Log Message: Switch BEAGLEBOARDXM config over to using GENERIC.common. Remove duplicates already defined in GENERIC.common. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/evbarm/conf/BEAGLEBOARDXM Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/BEAGLEBOARDXM diff -u src/sys/arch/evbarm/conf/BEAGLEBOARDXM:1.26 src/sys/arch/evbarm/conf/BEAGLEBOARDXM:1.27 --- src/sys/arch/evbarm/conf/BEAGLEBOARDXM:1.26 Thu Sep 14 07:58:40 2017 +++ src/sys/arch/evbarm/conf/BEAGLEBOARDXM Tue Oct 24 22:25:51 2017 @@ -1,122 +1,21 @@ # -# $NetBSD: BEAGLEBOARDXM,v 1.26 2017/09/14 07:58:40 mrg Exp $ +# $NetBSD: BEAGLEBOARDXM,v 1.27 2017/10/24 22:25:51 sevan Exp $ # # BEAGLEBOARD -- TI OMAP 3530 Eval Board Kernel # include "arch/evbarm/conf/std.beagle" - -# estimated number of users - -maxusers 32 - -# Standard system options - -options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT -#options NTP # NTP phase/frequency locked loop +include "arch/evbarm/conf/GENERIC.common" # CPU options options CPU_CORTEXA8 options TI_DM37XX -options PMAPCOUNTERS # Architecture options -# File systems - -file-system FFS # UFS -#file-system LFS # log-structured file system -file-system MFS # memory file system -file-system NFS # Network file system -#file-system ADOSFS # AmigaDOS-compatible file system -#file-system EXT2FS # second extended file system (linux) -#file-system CD9660 # ISO 9660 + Rock Ridge file system -file-system MSDOSFS # MS-DOS file system -#file-system FDESC # /dev/fd -#file-system KERNFS # /kern -#file-system NULLFS # loopback file system -#file-system PROCFS # /proc -#file-system PUFFS # Userspace file systems (e.g. ntfs-3g & sshfs) -#file-system UMAPFS # NULLFS + uid and gid remapping -#file-system UNION # union file system -file-system TMPFS # memory file system -file-system PTYFS # /dev/pts/N support - -# File system options -#options QUOTA # legacy UFS quotas -#options QUOTA2 # new, in-filesystem UFS quotas -#options DISKLABEL_EI # disklabel Endian Independent support -#options FFS_EI # FFS Endian Independent support -#options NFSSERVER -options WAPBL # File system journaling support -#options FFS_NO_SNAPSHOT # No FFS snapshot support - -# Networking options - -#options GATEWAY # packet forwarding -options INET # IP + ICMP + TCP + UDP -options INET6 # IPV6 -#options IPSEC # IP security -#options IPSEC_DEBUG # debug for IP security -#options MROUTING # IP multicast routing -#options PIM # Protocol Independent Multicast -#options NETATALK # AppleTalk networking -#options PPP_BSDCOMP # BSD-Compress compression support for PPP -#options PPP_DEFLATE # Deflate compression support for PPP -#options PPP_FILTER # Active filter support for PPP (requires bpf) -#options TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG - -options NFS_BOOT_BOOTP -options NFS_BOOT_DHCP -#options NFS_BOOT_BOOTSTATIC -#options NFS_BOOTSTATIC_MYIP="\"192.168.1.4\"" -#options NFS_BOOTSTATIC_GWIP="\"192.168.1.1\"" -#options NFS_BOOTSTATIC_MASK="\"255.255.255.0\"" -#options NFS_BOOTSTATIC_SERVADDR="\"192.168.1.1\"" -#options NFS_BOOTSTATIC_SERVER="\"192.168.1.1:/nfs/sdp2430\"" - -options NFS_BOOT_RWSIZE=1024 - -# Compatibility options - -include "conf/compat_netbsd30.config" -options COMPAT_NETBSD32 # allow running arm (e.g. non-earm) binaries - -# Shared memory options - -options SYSVMSG # System V-like message queues -options SYSVSEM # System V-like semaphores -options SYSVSHM # System V-like memory sharing - -# Device options - -#options MEMORY_DISK_HOOKS # boottime setup of ramdisk -#options MEMORY_DISK_ROOT_SIZE=8192 # Size in blocks -#options MEMORY_DISK_DYNAMIC -#options MINIROOTSIZE=1000 # Size in blocks -#options MEMORY_DISK_IS_ROOT # use memory disk as root - -# Miscellaneous kernel options -options KTRACE # system call tracing, a la ktrace(1) -#options SCSIVERBOSE # Verbose SCSI errors -#options MIIVERBOSE # Verbose MII autoconfuration messages -#options DDB_KEYCODE=0x40 -#options USERCONF # userconf(4) support -#options PIPE_SOCKETPAIR # smaller, but slower pipe(2) - # Development and Debugging options -#options PERFCTRS # performance counters -options DIAGNOSTIC # internal consistency checks -#options DEBUG -#options PMAP_DEBUG # Enable pmap_debug_level code -#options IPKDB # remote kernel debugging -#options VERBOSE_INIT_ARM # verbose bootstraping messages -options DDB # in-kernel debugger -options DDB_ONPANIC=1 -options DDB_HISTORY_SIZE=100 # Enable history editing in DDB -#options KGDB makeoptions DEBUG="-g" # compile full symbol table makeoptions COPY_SYMTAB=1 @@ -256,23 +155,3 @@ prcm* at obio1 addr 0x48306000 size 0
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Tue Oct 24 20:24:12 UTC 2017 Modified Files: src/sys/arch/arm/include: armreg.h Log Message: Some more registers To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.113 src/sys/arch/arm/include/armreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/armreg.h diff -u src/sys/arch/arm/include/armreg.h:1.112 src/sys/arch/arm/include/armreg.h:1.113 --- src/sys/arch/arm/include/armreg.h:1.112 Sat Sep 16 00:47:16 2017 +++ src/sys/arch/arm/include/armreg.h Tue Oct 24 20:24:12 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: armreg.h,v 1.112 2017/09/16 00:47:16 matt Exp $ */ +/* $NetBSD: armreg.h,v 1.113 2017/10/24 20:24:12 skrll Exp $ */ /* * Copyright (c) 1998, 2001 Ben Harris @@ -1024,6 +1024,10 @@ ARMREG_READ_INLINE(pmccntr, "p15,0,%0,c9 ARMREG_WRITE_INLINE(pmccntr, "p15,0,%0,c9,c13,0") /* PMC Cycle Counter */ ARMREG_READ_INLINE(pmuserenr, "p15,0,%0,c9,c14,0") /* PMC User Enable */ ARMREG_WRITE_INLINE(pmuserenr, "p15,0,%0,c9,c14,0") /* PMC User Enable */ +ARMREG_READ_INLINE(pmintenset, "p15,0,%0,c9,c14,1") /* PMC Interrupt Enable Set */ +ARMREG_WRITE_INLINE(pmintenset, "p15,0,%0,c9,c14,1") /* PMC Interrupt Enable Set */ +ARMREG_READ_INLINE(pmintenclr, "p15,0,%0,c9,c14,2") /* PMC Interrupt Enable Clear */ +ARMREG_WRITE_INLINE(pmintenclr, "p15,0,%0,c9,c14,2") /* PMC Interrupt Enable Clear */ ARMREG_READ_INLINE(l2ctrl, "p15,1,%0,c9,c0,2") /* A7/A15 L2 Control Register */ /* cp10 c10 registers */ ARMREG_READ_INLINE(prrr, "p15,0,%0,c10,c2,0") /* Primary Region Remap Register */ @@ -1064,6 +1068,8 @@ ARMREG_READ64_INLINE(cntp_cval, "p15,2,% ARMREG_WRITE64_INLINE(cntp_cval, "p15,2,%Q0,%R0,c14") /* PL1 Physical Timer CompareValue Register */ ARMREG_READ64_INLINE(cntv_cval, "p15,3,%Q0,%R0,c14") /* PL1 Virtual Timer CompareValue Register */ ARMREG_WRITE64_INLINE(cntv_cval, "p15,3,%Q0,%R0,c14") /* PL1 Virtual Timer CompareValue Register */ +ARMREG_READ64_INLINE(cntvoff, "p15,4,%Q0,%R0,c14") /* Virtual Offset Register */ +ARMREG_WRITE64_INLINE(cntvoff, "p15,4,%Q0,%R0,c14") /* Virtual Offset Register */ /* cp15 c15 registers */ ARMREG_READ_INLINE(cbar, "p15,4,%0,c15,c0,0") /* Configuration Base Address Register */ ARMREG_READ_INLINE(pmcrv6, "p15,0,%0,c15,c12,0") /* PMC Control Register (armv6) */
CVS commit: src/lib/libc/gen
Module Name:src Committed By: abhinav Date: Tue Oct 24 19:14:55 UTC 2017 Modified Files: src/lib/libc/gen: unvis.3 Log Message: Add missing functions from the SYNOPSIS to the NAME section To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/lib/libc/gen/unvis.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/unvis.3 diff -u src/lib/libc/gen/unvis.3:1.28 src/lib/libc/gen/unvis.3:1.29 --- src/lib/libc/gen/unvis.3:1.28 Mon Jul 3 21:32:49 2017 +++ src/lib/libc/gen/unvis.3 Tue Oct 24 19:14:55 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: unvis.3,v 1.28 2017/07/03 21:32:49 wiz Exp $ +.\" $NetBSD: unvis.3,v 1.29 2017/10/24 19:14:55 abhinav Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -34,7 +34,10 @@ .Os .Sh NAME .Nm unvis , -.Nm strunvis +.Nm strunvis , +.Nm strnunvis , +.Nm strunvisx , +.Nm strnunvisx .Nd decode a visual representation of characters .Sh LIBRARY .Lb libc
CVS commit: src/lib/libc/gen
Module Name:src Committed By: abhinav Date: Tue Oct 24 19:07:13 UTC 2017 Modified Files: src/lib/libc/gen: randomid.3 Log Message: Use commas at the right places in the NAME section To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/gen/randomid.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/randomid.3 diff -u src/lib/libc/gen/randomid.3:1.8 src/lib/libc/gen/randomid.3:1.9 --- src/lib/libc/gen/randomid.3:1.8 Mon Jul 3 21:32:49 2017 +++ src/lib/libc/gen/randomid.3 Tue Oct 24 19:07:12 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: randomid.3,v 1.8 2017/07/03 21:32:49 wiz Exp $ +.\" $NetBSD: randomid.3,v 1.9 2017/10/24 19:07:12 abhinav Exp $ .\" .\" Copyright (C) 2006 The NetBSD Foundation .\" All rights reserved. @@ -34,9 +34,9 @@ .Dt RANDOMID 3 .Os .Sh NAME -.Nm randomid +.Nm randomid , .Nm randomid_new , -.Nm randomid_delete , +.Nm randomid_delete .Nd provide pseudo-random data stream without repetitions .Sh SYNOPSIS .In sys/types.h
CVS commit: src/lib/libc/gen
Module Name:src Committed By: abhinav Date: Tue Oct 24 19:04:58 UTC 2017 Modified Files: src/lib/libc/gen: pwcache.3 Log Message: Add missing functions from the SYNOPSIS to the NAME section To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/lib/libc/gen/pwcache.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/pwcache.3 diff -u src/lib/libc/gen/pwcache.3:1.17 src/lib/libc/gen/pwcache.3:1.18 --- src/lib/libc/gen/pwcache.3:1.17 Fri May 2 18:11:04 2008 +++ src/lib/libc/gen/pwcache.3 Tue Oct 24 19:04:58 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: pwcache.3,v 1.17 2008/05/02 18:11:04 martin Exp $ +.\" $NetBSD: pwcache.3,v 1.18 2017/10/24 19:04:58 abhinav Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -61,7 +61,11 @@ .Sh NAME .Nm pwcache , .Nm user_from_uid , -.Nm group_from_gid +.Nm uid_from_user , +.Nm pwcache_userdb , +.Nm group_from_gid , +.Nm gid_from_group , +.Nm pwcache_groupdb .Nd cache password and group entries .Sh LIBRARY .Lb libc
CVS commit: src/lib/libc/gen
Module Name:src Committed By: abhinav Date: Tue Oct 24 18:54:03 UTC 2017 Modified Files: src/lib/libc/gen: getgrouplist.3 Log Message: Remove trailing comma after last Nm entry in the NAME section To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libc/gen/getgrouplist.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/getgrouplist.3 diff -u src/lib/libc/gen/getgrouplist.3:1.14 src/lib/libc/gen/getgrouplist.3:1.15 --- src/lib/libc/gen/getgrouplist.3:1.14 Fri May 2 18:11:04 2008 +++ src/lib/libc/gen/getgrouplist.3 Tue Oct 24 18:54:03 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: getgrouplist.3,v 1.14 2008/05/02 18:11:04 martin Exp $ +.\" $NetBSD: getgrouplist.3,v 1.15 2017/10/24 18:54:03 abhinav Exp $ .\" .\" Copyright (c) 2005 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -61,7 +61,7 @@ .Os .Sh NAME .Nm getgrouplist , -.Nm getgroupmembership , +.Nm getgroupmembership .Nd calculate group access list .Sh LIBRARY .Lb libc
CVS commit: src/lib/libc/gen
Module Name:src Committed By: abhinav Date: Tue Oct 24 18:50:46 UTC 2017 Modified Files: src/lib/libc/gen: getpass.3 Log Message: Add getpass_r and getpassfd to the NAME section as well. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/lib/libc/gen/getpass.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/getpass.3 diff -u src/lib/libc/gen/getpass.3:1.22 src/lib/libc/gen/getpass.3:1.23 --- src/lib/libc/gen/getpass.3:1.22 Sat Apr 14 10:34:29 2012 +++ src/lib/libc/gen/getpass.3 Tue Oct 24 18:50:46 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: getpass.3,v 1.22 2012/04/14 10:34:29 wiz Exp $ +.\" $NetBSD: getpass.3,v 1.23 2017/10/24 18:50:46 abhinav Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -33,7 +33,9 @@ .Dt GETPASS 3 .Os .Sh NAME -.Nm getpass +.Nm getpass , +.Nm getpass_r , +.Nm getpassfd .Nd get a password .Sh LIBRARY .Lb libc
CVS commit: src/lib/libc/gen
Module Name:src Committed By: abhinav Date: Tue Oct 24 18:42:06 UTC 2017 Modified Files: src/lib/libc/gen: cgetcap.3 Log Message: Fix typo: s/cexpandtc/csetexpandtc The synopsis and description mention only csetexpandtc function. nxr also only shows csetexpandtc while no matches for cexpandtc. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/gen/cgetcap.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/cgetcap.3 diff -u src/lib/libc/gen/cgetcap.3:1.8 src/lib/libc/gen/cgetcap.3:1.9 --- src/lib/libc/gen/cgetcap.3:1.8 Sun Apr 22 10:13:52 2012 +++ src/lib/libc/gen/cgetcap.3 Tue Oct 24 18:42:06 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: cgetcap.3,v 1.8 2012/04/22 10:13:52 wiz Exp $ +.\" $NetBSD: cgetcap.3,v 1.9 2017/10/24 18:42:06 abhinav Exp $ .\" .\" Copyright (c) 1992, 1993 .\" The Regents of the University of California. All rights reserved. @@ -46,7 +46,7 @@ .Nm cgetfirst , .Nm cgetnext , .Nm cgetclose , -.Nm cexpandtc +.Nm csetexpandtc .Nd capability database access routines .Sh LIBRARY .Lb libc
CVS commit: src/lib/libc/atomic
Module Name:src Committed By: abhinav Date: Tue Oct 24 18:19:17 UTC 2017 Modified Files: src/lib/libc/atomic: membar_ops.3 Log Message: Add membar_datadep_consumer to the NAME section Remove Pp before Bl To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libc/atomic/membar_ops.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/atomic/membar_ops.3 diff -u src/lib/libc/atomic/membar_ops.3:1.4 src/lib/libc/atomic/membar_ops.3:1.5 --- src/lib/libc/atomic/membar_ops.3:1.4 Thu Jan 8 22:27:17 2015 +++ src/lib/libc/atomic/membar_ops.3 Tue Oct 24 18:19:17 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: membar_ops.3,v 1.4 2015/01/08 22:27:17 riastradh Exp $ +.\" $NetBSD: membar_ops.3,v 1.5 2017/10/24 18:19:17 abhinav Exp $ .\" .\" Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -36,6 +36,7 @@ .Nm membar_exit , .Nm membar_producer , .Nm membar_consumer , +.Nm membar_datadep_consumer , .Nm membar_sync .Nd memory access barrier operations .\" .Sh LIBRARY @@ -61,7 +62,6 @@ The family of functions provide memory access barrier operations necessary for synchronization in multiprocessor execution environments that have relaxed load and store order. -.Pp .Bl -tag -width "mem" .It Fn membar_enter Any store preceding
CVS commit: src/doc
Module Name:src Committed By: christos Date: Tue Oct 24 17:39:30 UTC 2017 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: new tzcode To generate a diff of this commit: cvs rdiff -u -r1.1479 -r1.1480 src/doc/3RDPARTY cvs rdiff -u -r1.2326 -r1.2327 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1479 src/doc/3RDPARTY:1.1480 --- src/doc/3RDPARTY:1.1479 Mon Oct 23 21:30:21 2017 +++ src/doc/3RDPARTY Tue Oct 24 13:39:30 2017 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1479 2017/10/24 01:30:21 kre Exp $ +# $NetBSD: 3RDPARTY,v 1.1480 2017/10/24 17:39:30 christos Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1411,7 +1411,7 @@ Notes: Added changes from a5 -> a12 manually. Package: tz -Version: tzcode2017b / tzdata2017c +Version: tzcode2017c / tzdata2017c Current Vers: tzcode2017c / tzdata2017c Maintainer: Paul Eggert Archive Site: ftp://ftp.iana.org/tz/releases/ Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2326 src/doc/CHANGES:1.2327 --- src/doc/CHANGES:1.2326 Mon Oct 23 21:30:21 2017 +++ src/doc/CHANGES Tue Oct 24 13:39:30 2017 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2326 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2327 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -73,3 +73,4 @@ Changes from NetBSD 8.0 to NetBSD 9.0: amd64: Add support for SMAP. [maxv 20171017] amd64: Add support for USER_LDT. [maxv 20171021] tzdata updated to 2017c [kre 20171024] + libc: Update to tzcode2017c. [christos 20171024]
CVS commit: src/lib/libc/cdb
Module Name:src Committed By: abhinav Date: Tue Oct 24 17:01:15 UTC 2017 Modified Files: src/lib/libc/cdb: cdbr.3 Log Message: Remove cdbr_write from NAME section, it's a left over Also add comma after the first Nm entry ok joerg@ To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libc/cdb/cdbr.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/cdb/cdbr.3 diff -u src/lib/libc/cdb/cdbr.3:1.4 src/lib/libc/cdb/cdbr.3:1.5 --- src/lib/libc/cdb/cdbr.3:1.4 Thu Dec 5 21:17:23 2013 +++ src/lib/libc/cdb/cdbr.3 Tue Oct 24 17:01:15 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: cdbr.3,v 1.4 2013/12/05 21:17:23 joerg Exp $ +.\" $NetBSD: cdbr.3,v 1.5 2017/10/24 17:01:15 abhinav Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -28,18 +28,17 @@ .\" 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. -.Dd December 5, 2013 +.Dd October 24, 2017 .Dt CDBR 3 .Os .Sh NAME -.Nm cdbr +.Nm cdbr , .Nm cdbr_open , .Nm cdbr_open_mem , .Nm cdbr_entries , .Nm cdbr_get , .Nm cdbr_find , -.Nm cdbr_close , -.Nm cdbr_write +.Nm cdbr_close .Nd constant database access methods .Sh SYNOPSIS .Ft "struct cdbr *"
CVS commit: xsrc/external/mit/xf86-video-suntcx/dist/src
Module Name:xsrc Committed By: macallan Date: Tue Oct 24 15:43:45 UTC 2017 Modified Files: xsrc/external/mit/xf86-video-suntcx/dist/src: tcx_driver.c Log Message: deal with firmware that does not set the 'vram' property on the tcx's node To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 \ xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c diff -u xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c:1.13 xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c:1.14 --- xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c:1.13 Tue Sep 27 19:11:51 2016 +++ xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c Tue Oct 24 15:43:45 2017 @@ -359,7 +359,8 @@ TCXPreInit(ScrnInfoPtr pScrn, int flags) /* see if we have more than 1MB vram */ pTcx->vramsize = 0x10; - if ((b = sparcPromGetProperty(&psdp->node, "vram", &len)) != NULL) { + if (((b = sparcPromGetProperty(&psdp->node, "vram", &len)) != NULL) && + (len == 4)) { memcpy(&v, b, 4); if ((v > 0) && (v < 3)) pTcx->vramsize = 0x10 * v;
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Tue Oct 24 15:07:09 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sunxi_intc.c Log Message: Adjust irq mask/unmask along with enable/disable to make qemu happy To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sunxi_intc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/sunxi/sunxi_intc.c diff -u src/sys/arch/arm/sunxi/sunxi_intc.c:1.2 src/sys/arch/arm/sunxi/sunxi_intc.c:1.3 --- src/sys/arch/arm/sunxi/sunxi_intc.c:1.2 Wed Oct 11 00:17:03 2017 +++ src/sys/arch/arm/sunxi/sunxi_intc.c Tue Oct 24 15:07:09 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_intc.c,v 1.2 2017/10/11 00:17:03 jmcneill Exp $ */ +/* $NetBSD: sunxi_intc.c,v 1.3 2017/10/24 15:07:09 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -29,7 +29,7 @@ #define _INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_intc.c,v 1.2 2017/10/11 00:17:03 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_intc.c,v 1.3 2017/10/24 15:07:09 jmcneill Exp $"); #include #include @@ -96,6 +96,7 @@ sunxi_intc_unblock_irqs(struct pic_softc KASSERT((mask & sc->sc_enabled_irqs[group]) == 0); sc->sc_enabled_irqs[group] |= mask; INTC_WRITE(sc, INTC_EN_REG(group), sc->sc_enabled_irqs[group]); + INTC_WRITE(sc, INTC_MASK_REG(group), ~sc->sc_enabled_irqs[group]); } static void @@ -106,6 +107,7 @@ sunxi_intc_block_irqs(struct pic_softc * sc->sc_enabled_irqs[group] &= ~mask; INTC_WRITE(sc, INTC_EN_REG(group), sc->sc_enabled_irqs[group]); + INTC_WRITE(sc, INTC_MASK_REG(group), ~sc->sc_enabled_irqs[group]); } static void @@ -246,7 +248,7 @@ sunxi_intc_attach(device_t parent, devic /* Disable IRQs */ for (i = 0; i < INTC_MAX_GROUPS; i++) { INTC_WRITE(sc, INTC_EN_REG(i), 0); - INTC_WRITE(sc, INTC_MASK_REG(i), 0); + INTC_WRITE(sc, INTC_MASK_REG(i), ~0U); INTC_WRITE(sc, INTC_IRQ_PEND_REG(i), INTC_READ(sc, INTC_IRQ_PEND_REG(i))); }
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Tue Oct 24 15:06:23 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sunxi_platform.c Log Message: sun4i: use Timer 1 instead of Timer 0 for delay, and explicitly enable it To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/sunxi/sunxi_platform.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/sunxi/sunxi_platform.c diff -u src/sys/arch/arm/sunxi/sunxi_platform.c:1.14 src/sys/arch/arm/sunxi/sunxi_platform.c:1.15 --- src/sys/arch/arm/sunxi/sunxi_platform.c:1.14 Mon Oct 23 19:36:01 2017 +++ src/sys/arch/arm/sunxi/sunxi_platform.c Tue Oct 24 15:06:23 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_platform.c,v 1.14 2017/10/23 19:36:01 jakllsch Exp $ */ +/* $NetBSD: sunxi_platform.c,v 1.15 2017/10/24 15:06:23 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -31,7 +31,7 @@ #include "opt_fdt_arm.h" #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.14 2017/10/23 19:36:01 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.15 2017/10/24 15:06:23 jmcneill Exp $"); #include #include @@ -64,7 +64,13 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_platfo #define SUN4I_TIMER_BASE 0x01c20c00 #define SUN4I_TIMER_SIZE 0x90 -#define SUN4I_TIMER_0_VAL 0x18 +#define SUN4I_TIMER_1_CTRL 0x20 +#define SUN4I_TIMER_1_CTRL_CLK_SRC __BITS(3,2) +#define SUN4I_TIMER_1_CTRL_CLK_SRC_OSC24M 1 +#define SUN4I_TIMER_1_CTRL_RELOAD __BIT(1) +#define SUN4I_TIMER_1_CTRL_EN __BIT(0) +#define SUN4I_TIMER_1_INTV_VALUE 0x24 +#define SUN4I_TIMER_1_VAL 0x28 #define SUN4I_WDT_BASE 0x01c20c90 #define SUN4I_WDT_SIZE 0x10 @@ -185,12 +191,21 @@ sun4i_platform_delay(u_int n) long ticks = n * incs_per_us; uint32_t cur, prev; - if (bsh == 0) + if (bsh == 0) { bus_space_map(bst, SUN4I_TIMER_BASE, SUN4I_TIMER_SIZE, 0, &bsh); - prev = ~bus_space_read_4(bst, bsh, SUN4I_TIMER_0_VAL); + /* Enable Timer 1 */ + bus_space_write_4(bst, bsh, SUN4I_TIMER_1_INTV_VALUE, ~0U); + bus_space_write_4(bst, bsh, SUN4I_TIMER_1_CTRL, + SUN4I_TIMER_1_CTRL_EN | + SUN4I_TIMER_1_CTRL_RELOAD | + __SHIFTIN(SUN4I_TIMER_1_CTRL_CLK_SRC_OSC24M, + SUN4I_TIMER_1_CTRL_CLK_SRC)); + } + + prev = ~bus_space_read_4(bst, bsh, SUN4I_TIMER_1_VAL); while (ticks > 0) { - cur = ~bus_space_read_4(bst, bsh, SUN4I_TIMER_0_VAL); + cur = ~bus_space_read_4(bst, bsh, SUN4I_TIMER_1_VAL); if (cur > prev) ticks -= (cur - prev); else
CVS commit: [netbsd-7] src/sys/dev/sysmon
Module Name:src Committed By: snj Date: Tue Oct 24 09:25:26 UTC 2017 Modified Files: src/sys/dev/sysmon [netbsd-7]: sysmon_envsys.c Log Message: Fix fallout from ticket #1511: It's rnd_detach_source, not rnd_detach_sources. To generate a diff of this commit: cvs rdiff -u -r1.127.2.2 -r1.127.2.3 src/sys/dev/sysmon/sysmon_envsys.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/sysmon/sysmon_envsys.c diff -u src/sys/dev/sysmon/sysmon_envsys.c:1.127.2.2 src/sys/dev/sysmon/sysmon_envsys.c:1.127.2.3 --- src/sys/dev/sysmon/sysmon_envsys.c:1.127.2.2 Mon Oct 23 18:57:12 2017 +++ src/sys/dev/sysmon/sysmon_envsys.c Tue Oct 24 09:25:26 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsys.c,v 1.127.2.2 2017/10/23 18:57:12 snj Exp $ */ +/* $NetBSD: sysmon_envsys.c,v 1.127.2.3 2017/10/24 09:25:26 snj Exp $ */ /*- * Copyright (c) 2007, 2008 Juan Romero Pardines. @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.127.2.2 2017/10/23 18:57:12 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.127.2.3 2017/10/24 09:25:26 snj Exp $"); #include #include @@ -1210,7 +1210,7 @@ sme_remove_userprops(void) * Detach from entropy collection */ if (edata->flags & ENVSYS_FHAS_ENTROPY) -rnd_detach_sources(&edata->rnd_src); +rnd_detach_source(&edata->rnd_src); /* * Finally, remove any old limits event, then
CVS commit: [netbsd-7-1] src/sys/dev/sysmon
Module Name:src Committed By: snj Date: Tue Oct 24 09:24:53 UTC 2017 Modified Files: src/sys/dev/sysmon [netbsd-7-1]: sysmon_envsys.c Log Message: Fix fallout from ticket #1511: It's rnd_detach_source, not rnd_detach_sources. To generate a diff of this commit: cvs rdiff -u -r1.127.2.1.6.1 -r1.127.2.1.6.2 \ src/sys/dev/sysmon/sysmon_envsys.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/sysmon/sysmon_envsys.c diff -u src/sys/dev/sysmon/sysmon_envsys.c:1.127.2.1.6.1 src/sys/dev/sysmon/sysmon_envsys.c:1.127.2.1.6.2 --- src/sys/dev/sysmon/sysmon_envsys.c:1.127.2.1.6.1 Mon Oct 23 18:57:09 2017 +++ src/sys/dev/sysmon/sysmon_envsys.c Tue Oct 24 09:24:53 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsys.c,v 1.127.2.1.6.1 2017/10/23 18:57:09 snj Exp $ */ +/* $NetBSD: sysmon_envsys.c,v 1.127.2.1.6.2 2017/10/24 09:24:53 snj Exp $ */ /*- * Copyright (c) 2007, 2008 Juan Romero Pardines. @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.127.2.1.6.1 2017/10/23 18:57:09 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.127.2.1.6.2 2017/10/24 09:24:53 snj Exp $"); #include #include @@ -1210,7 +1210,7 @@ sme_remove_userprops(void) * Detach from entropy collection */ if (edata->flags & ENVSYS_FHAS_ENTROPY) -rnd_detach_sources(&edata->rnd_src); +rnd_detach_source(&edata->rnd_src); /* * Finally, remove any old limits event, then
CVS commit: [netbsd-7-0] src/sys/dev/sysmon
Module Name:src Committed By: snj Date: Tue Oct 24 09:24:32 UTC 2017 Modified Files: src/sys/dev/sysmon [netbsd-7-0]: sysmon_envsys.c Log Message: Fix fallout from ticket #1511: It's rnd_detach_source, not rnd_detach_sources. To generate a diff of this commit: cvs rdiff -u -r1.127.2.1.2.1 -r1.127.2.1.2.2 \ src/sys/dev/sysmon/sysmon_envsys.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/sysmon/sysmon_envsys.c diff -u src/sys/dev/sysmon/sysmon_envsys.c:1.127.2.1.2.1 src/sys/dev/sysmon/sysmon_envsys.c:1.127.2.1.2.2 --- src/sys/dev/sysmon/sysmon_envsys.c:1.127.2.1.2.1 Mon Oct 23 18:57:08 2017 +++ src/sys/dev/sysmon/sysmon_envsys.c Tue Oct 24 09:24:32 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsys.c,v 1.127.2.1.2.1 2017/10/23 18:57:08 snj Exp $ */ +/* $NetBSD: sysmon_envsys.c,v 1.127.2.1.2.2 2017/10/24 09:24:32 snj Exp $ */ /*- * Copyright (c) 2007, 2008 Juan Romero Pardines. @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.127.2.1.2.1 2017/10/23 18:57:08 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.127.2.1.2.2 2017/10/24 09:24:32 snj Exp $"); #include #include @@ -1210,7 +1210,7 @@ sme_remove_userprops(void) * Detach from entropy collection */ if (edata->flags & ENVSYS_FHAS_ENTROPY) -rnd_detach_sources(&edata->rnd_src); +rnd_detach_source(&edata->rnd_src); /* * Finally, remove any old limits event, then
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: snj Date: Tue Oct 24 09:21:36 UTC 2017 Modified Files: src/doc [netbsd-8]: CHANGES-8.0 Log Message: 302-305, 307, 308, 315, 326 To generate a diff of this commit: cvs rdiff -u -r1.1.2.69 -r1.1.2.70 src/doc/CHANGES-8.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.0 diff -u src/doc/CHANGES-8.0:1.1.2.69 src/doc/CHANGES-8.0:1.1.2.70 --- src/doc/CHANGES-8.0:1.1.2.69 Sat Oct 21 19:56:55 2017 +++ src/doc/CHANGES-8.0 Tue Oct 24 09:21:36 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.0,v 1.1.2.69 2017/10/21 19:56:55 snj Exp $ +# $NetBSD: CHANGES-8.0,v 1.1.2.70 2017/10/24 09:21:36 snj Exp $ A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04 until the 8.0 release: @@ -6347,3 +6347,96 @@ usr.sbin/inetd/inetd.c1.124 Don't setup SPs if no policy sepecifier is specified [ozaki-r, ticket #331] +sys/arch/powerpc/booke/dev/pq3etsec.c 1.30-1.31 +sys/arch/x86/pci/if_vmx.c 1.20 +sys/dev/ic/i82557.c1.148 +sys/dev/ic/rtl8169.c1.152 +sys/dev/pci/cxgb/cxgb_sge.c 1.5 +sys/dev/pci/if_age.c1.51 +sys/dev/pci/if_alc.c1.25 +sys/dev/pci/if_ale.c1.23 +sys/dev/pci/if_bge.c1.311 +sys/dev/pci/if_bge.c1.312 +sys/dev/pci/if_bnx.c1.62 +sys/dev/pci/if_jme.c1.32 +sys/dev/pci/if_nfe.c1.64 +sys/dev/pci/if_sip.c1.167 +sys/dev/pci/if_stge.c1.63-1.64 +sys/dev/pci/if_ti.c1.102 +sys/dev/pci/if_txp.c1.48 +sys/dev/pci/if_vge.c1.61 +sys/dev/pci/if_wm.c1.538 +sys/dev/pci/ixgbe/ix_txrx.c 1.29 via patch +sys/net/agr/if_agrether_hash.c 1.4 +sys/net/if_ether.h1.67-1.68 +sys/net/if_ethersubr.c1.244 +sys/net/if_vlan.c1.100 +sys/net80211/ieee80211_input.c 1.89 +sys/net80211/ieee80211_output.c 1.59 +sys/sys/mbuf.h 1.171 + + VLAN ID uses pkthdr instead of mtag now. + [knakahara, ticket #302] + +sys/net/if_gif.c1.129-1.130 +sys/net/if_gif.h1.26-1.27 +sys/netinet/in_gif.c1.88 +sys/netinet6/in6_gif.c1.86 + + gif(4) locking fixes. + [knahakara, ticket #303] + +sys/net/if_loop.c1.95 + + loop_clone_create() must be called after ncpu is counted + up for all CPUs. + [knakahara, ticket #304] + +distrib/sets/lists/tests/mi 1.762 +sys/net/route.c 1.198-1.201 +sys/net/route.h 1.114 +sys/netatalk/at_proto.c1.22 +sys/netinet/in_proto.c1.124 +sys/netinet6/in6_proto.c 1.118 +sys/netmpls/mpls_proto.c 1.31 +sys/netnatm/natm_proto.c 1.18 +sys/rump/net/lib/libsockin/sockin.c 1.65 +sys/sys/domain.h1.33 +tests/net/route/Makefile 1.6 +tests/net/route/t_rtcache.sh 1.1 + + - Add tests of rtcache invalidation + - Remove unnecessary NULL check of rt_ifp + - Invalidate rtcache based on a global generation counter + - Remove the global lock for rtcache + - Synchronize on rtcache_generation with rtlock + [ozaki-r, ticket #305] + +sys/netinet6/nd6.c1.236 + + Add missing NULL check. PR kern/52554 + [ozaki-r, ticket #307] + +sbin/resize_ffs/resize_ffs.8 1.18 +sbin/resize_ffs/resize_ffs.c 1.48-1.53 + + Fix numerous overflow errors which can lead to superblock + corruption on large filesystems. Documentation fixes. + [sborrill, ticket #308] + +sys/arch/arm/arm32/vm_machdep.c 1.71-1.72 + + In vmapbuf use pmap_enter(pmap_kernel(), ...) and not + pmap_kenter_pa as the former handles multiple mappings for + VIPT AND VIVT correctly whereas the latter doesn't work for + VIVT. PR port-shark/52102 + [skrll, ticket #315] + +sys/arch/arm/vfp/vfp_init.c 1.54-1.55 +sys/kern/subr_pcu.c1.21 + + Fix a race condition that would cause FPU register corruption + on ARM SMP, and possibly other ports using the PCU framework. + PR port-arm/52603. + [bouyer, ticket #326] +
CVS commit: [netbsd-8] src/sys
Module Name:src Committed By: snj Date: Tue Oct 24 09:14:59 UTC 2017 Modified Files: src/sys/arch/arm/vfp [netbsd-8]: vfp_init.c src/sys/kern [netbsd-8]: subr_pcu.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #326): sys/arch/arm/vfp/vfp_init.c: revision 1.54-1.55 sys/kern/subr_pcu.c: revision 1.21 PR port-arm/52603: There is a race here, as seen on arm with FPU: LWP L is running but not on CPU, has its FPU state on CPU2 which has not been released yet, so fpexc still has VFP_FPEXC_EN set in the PCB copy. LWP L is scheduled on CPU1, CPU1 calls cpu_switchto() for L in mi_switch(). cpu_switchto() will set VFP_FPEXC_EN in the FPU's fpexc register per the PCB fpexc copy. Before CPU1 calls pcu_switchpoint() for L, CPU2 calls pcu_do_op(PCU_CMD_SAVE | PCU_CMD_RELEASE) for L because it still holds its FPU state and wants to load another lwp. This cause VFP_FPEXC_EN to be cleared in the PCB copy, but not in CPU1's register. L's l_pcu_cpu is set to NULL. When CPU1 calls pcu_switchpoint() for L it see l_pcu_cpu is NULL, and doesn't call the release callback. Now CPU1 has its FPU enabled but with the wrong FPU state. Fix by releasing the PCU even if l_pcu_cpu is NULL. -- In the REENABLE case, make sur the fpexc copy in the pcb also has VFP_FPEXC_EN set. Otherwise we could trap on every context switch even if the CPU already has the VFP state. -- We KASSERT((fregs->vfp_fpexc & VFP_FPEXC_EN) == 0) just before, so enabled is always false. remove. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.53.2.1 src/sys/arch/arm/vfp/vfp_init.c cvs rdiff -u -r1.20 -r1.20.6.1 src/sys/kern/subr_pcu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/vfp/vfp_init.c diff -u src/sys/arch/arm/vfp/vfp_init.c:1.53 src/sys/arch/arm/vfp/vfp_init.c:1.53.2.1 --- src/sys/arch/arm/vfp/vfp_init.c:1.53 Fri May 26 21:17:46 2017 +++ src/sys/arch/arm/vfp/vfp_init.c Tue Oct 24 09:14:59 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: vfp_init.c,v 1.53 2017/05/26 21:17:46 jmcneill Exp $ */ +/* $NetBSD: vfp_init.c,v 1.53.2.1 2017/10/24 09:14:59 snj Exp $ */ /* * Copyright (c) 2008 ARM Ltd @@ -520,29 +520,25 @@ vfp_state_load(lwp_t *l, u_int flags) curcpu()->ci_vfp_evs[1].ev_count++; } + KASSERT((armreg_fpexc_read() & VFP_FPEXC_EN) == 0); /* * If the VFP is already enabled we must be bouncing an instruction. */ if (flags & PCU_REENABLE) { uint32_t fpexc = armreg_fpexc_read(); armreg_fpexc_write(fpexc | VFP_FPEXC_EN); + fregs->vfp_fpexc |= VFP_FPEXC_EN; return; } + KASSERT((fregs->vfp_fpexc & VFP_FPEXC_EN) == 0); /* * Load and Enable the VFP (so that we can write the registers). */ - bool enabled = fregs->vfp_fpexc & VFP_FPEXC_EN; fregs->vfp_fpexc |= VFP_FPEXC_EN; armreg_fpexc_write(fregs->vfp_fpexc); - if (enabled) { - /* - * If we think the VFP is enabled, it must have be - * disabled by vfp_state_release for another LWP so - * we can now just return. - */ - return; - } + KASSERT(curcpu()->ci_pcu_curlwp[PCU_FPU] == NULL); + KASSERT(l->l_pcu_cpu[PCU_FPU] == NULL); load_vfpregs(fregs); armreg_fpscr_write(fregs->vfp_fpscr); @@ -562,6 +558,9 @@ vfp_state_save(lwp_t *l) struct vfpreg * const fregs = &pcb->pcb_vfp; uint32_t fpexc = armreg_fpexc_read(); + KASSERT(curcpu()->ci_pcu_curlwp[PCU_FPU] == l); + KASSERT(curcpu() == l->l_pcu_cpu[PCU_FPU]); + KASSERT(curlwp == l || curlwp->l_pcu_cpu[PCU_FPU] != curcpu()); /* * Enable the VFP (so we can read the registers). * Make sure the exception bit is cleared so that we can Index: src/sys/kern/subr_pcu.c diff -u src/sys/kern/subr_pcu.c:1.20 src/sys/kern/subr_pcu.c:1.20.6.1 --- src/sys/kern/subr_pcu.c:1.20 Thu Mar 16 16:13:21 2017 +++ src/sys/kern/subr_pcu.c Tue Oct 24 09:14:59 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_pcu.c,v 1.20 2017/03/16 16:13:21 chs Exp $ */ +/* $NetBSD: subr_pcu.c,v 1.20.6.1 2017/10/24 09:14:59 snj Exp $ */ /*- * Copyright (c) 2011, 2014 The NetBSD Foundation, Inc. @@ -52,7 +52,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_pcu.c,v 1.20 2017/03/16 16:13:21 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_pcu.c,v 1.20.6.1 2017/10/24 09:14:59 snj Exp $"); #include #include @@ -110,7 +110,8 @@ pcu_switchpoint(lwp_t *l) continue; } struct cpu_info * const pcu_ci = l->l_pcu_cpu[id]; - if (pcu_ci == NULL || pcu_ci == l->l_cpu) { + if (pcu_ci == l->l_cpu) { + KASSERT(pcu_ci->ci_pcu_curlwp[id] == l); continue; } const pcu_ops_t * const pcu = pcu_ops_md_defs[id];
CVS commit: [netbsd-8] src/sys/arch/arm/arm32
Module Name:src Committed By: snj Date: Tue Oct 24 09:12:07 UTC 2017 Modified Files: src/sys/arch/arm/arm32 [netbsd-8]: vm_machdep.c Log Message: Pull up following revision(s) (requested by skrll in ticket #315): sys/arch/arm/arm32/vm_machdep.c: 1.71-1.72 In vmapbuf use pmap_enter(pmap_kernel(), ...) and not pmap_kenter_pa as the former handles multiple mappings for VIPT AND VIVT correctly whereas the latter doesn't work for VIVT. PR port-shark/52102 >From skrll@. Tested by martin@ and me. -- Fix eva argument to pmap_remove and passed prot bits in flags for pmap_enter, i.e. fix previous. To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.70.10.1 src/sys/arch/arm/arm32/vm_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm32/vm_machdep.c diff -u src/sys/arch/arm/arm32/vm_machdep.c:1.70 src/sys/arch/arm/arm32/vm_machdep.c:1.70.10.1 --- src/sys/arch/arm/arm32/vm_machdep.c:1.70 Sun Mar 29 09:47:48 2015 +++ src/sys/arch/arm/arm32/vm_machdep.c Tue Oct 24 09:12:07 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.70 2015/03/29 09:47:48 matt Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.70.10.1 2017/10/24 09:12:07 snj Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -44,7 +44,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.70 2015/03/29 09:47:48 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.70.10.1 2017/10/24 09:12:07 snj Exp $"); #include "opt_armfpe.h" #include "opt_pmap_debug.h" @@ -245,8 +245,8 @@ vmapbuf(struct buf *bp, vsize_t len) */ while (len) { (void) pmap_extract(pm, faddr, &fpa); - pmap_kenter_pa(taddr, fpa, VM_PROT_READ|VM_PROT_WRITE, - PMAP_WIRED); + pmap_enter(pmap_kernel(), taddr, fpa, VM_PROT_READ|VM_PROT_WRITE, + VM_PROT_READ|VM_PROT_WRITE|PMAP_WIRED); faddr += PAGE_SIZE; taddr += PAGE_SIZE; len -= PAGE_SIZE; @@ -281,7 +281,7 @@ vunmapbuf(struct buf *bp, vsize_t len) off = (vaddr_t)bp->b_data - addr; len = round_page(off + len); - pmap_kremove(addr, len); + pmap_remove(pmap_kernel(), addr, addr + len); pmap_update(pmap_kernel()); uvm_km_free(phys_map, addr, len, UVM_KMF_VAONLY); bp->b_data = bp->b_saveaddr;
CVS commit: src/sys/arch/arm/imx
Module Name:src Committed By: hkenken Date: Tue Oct 24 09:11:51 UTC 2017 Modified Files: src/sys/arch/arm/imx: imx6_pcie.c Log Message: Added link up status check for valid pci device confirm. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/imx/imx6_pcie.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/imx/imx6_pcie.c diff -u src/sys/arch/arm/imx/imx6_pcie.c:1.3 src/sys/arch/arm/imx/imx6_pcie.c:1.4 --- src/sys/arch/arm/imx/imx6_pcie.c:1.3 Fri Jun 9 18:14:59 2017 +++ src/sys/arch/arm/imx/imx6_pcie.c Tue Oct 24 09:11:51 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: imx6_pcie.c,v 1.3 2017/06/09 18:14:59 ryo Exp $ */ +/* $NetBSD: imx6_pcie.c,v 1.4 2017/10/24 09:11:51 hkenken Exp $ */ /* * Copyright (c) 2016 Genetec Corporation. All rights reserved. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: imx6_pcie.c,v 1.3 2017/06/09 18:14:59 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imx6_pcie.c,v 1.4 2017/10/24 09:11:51 hkenken Exp $"); #include "opt_pci.h" @@ -142,6 +142,23 @@ static void imx6pcie_intr_disestablish(v CFATTACH_DECL_NEW(imxpcie, sizeof(struct imx6pcie_softc), imx6pcie_match, imx6pcie_attach, NULL, NULL); +static int +imx6pcie_linkup_status(struct imx6pcie_softc *sc) +{ + return PCIE_READ(sc, PCIE_PL_DEBUG1) & PCIE_PL_DEBUG1_XMLH_LINK_UP; +} + +static int +imx6pcie_valid_device(struct imx6pcie_softc *sc, int bus, int dev) +{ + if (bus != 0 && !imx6pcie_linkup_status(sc)) + return 0; + if (bus <= 1 && dev > 0) + return 0; + + return 1; +} + static void imx6pcie_clock_enable(struct imx6pcie_softc *sc) { @@ -392,14 +409,11 @@ static int imx6pcie_wait_for_link(struct imx6pcie_softc *sc) { uint32_t ltssm, valid, v; - uint32_t linkup; int retry; #define LINKUP_RETRY 200 for (retry = LINKUP_RETRY; retry > 0; --retry) { - linkup = PCIE_READ(sc, PCIE_PL_DEBUG1); - if ((linkup & PCIE_PL_DEBUG1_XMLH_LINK_UP) && - !(linkup & PCIE_PL_DEBUG1_XMLH_LINK_IN_TRAINING)) { + if (!imx6pcie_linkup_status(sc)) { delay(100); continue; } @@ -425,8 +439,7 @@ imx6pcie_wait_for_link(struct imx6pcie_s imx6pcie_phy_write(sc, PCIE_PHY_RX_OVRD_IN_LO, v); } - if (linkup) - return 0; + return 0; } aprint_error_dev(sc->sc_dev, "Link Up failed.\n"); @@ -686,11 +699,13 @@ imx6pcie_setup(struct imx6pcie_softc * c v = PCIE_READ(sc, PCI_COMMAND_STATUS_REG); v |= PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE | - PCI_COMMAND_MASTER_ENABLE; + PCI_COMMAND_MASTER_ENABLE | + PCI_COMMAND_SERR_ENABLE; PCIE_WRITE(sc, PCI_COMMAND_STATUS_REG, v); PCIE_WRITE(sc, PCI_CLASS_REG, - PCI_CLASS_CODE(PCI_CLASS_BRIDGE, PCI_SUBCLASS_BRIDGE_PCI, PCI_INTERFACE_BRIDGE_PCI_PCI)); + PCI_CLASS_CODE(PCI_CLASS_BRIDGE, + PCI_SUBCLASS_BRIDGE_PCI, PCI_INTERFACE_BRIDGE_PCI_PCI)); PCIE_WRITE(sc, PCIE_PL_IATUVR, 0); @@ -785,7 +800,7 @@ imx6pcie_conf_read(void *v, pcitag_t tag if ((unsigned int)offset >= PCI_EXTCONF_SIZE) return ret; - if (b <= 1 && d > 0) + if (!imx6pcie_valid_device(sc, b, d)) return ret; PCIE_WRITE(sc, PCIE_PL_IATUVR, 0); @@ -832,7 +847,7 @@ imx6pcie_conf_write(void *v, pcitag_t ta if ((unsigned int)offset >= PCI_EXTCONF_SIZE) return; - if (b <= 1 && d > 0) + if (!imx6pcie_valid_device(sc, b, d)) return; PCIE_WRITE(sc, PCIE_PL_IATUVR, 0);
CVS commit: [netbsd-8] src/sbin/resize_ffs
Module Name:src Committed By: snj Date: Tue Oct 24 09:08:40 UTC 2017 Modified Files: src/sbin/resize_ffs [netbsd-8]: resize_ffs.8 resize_ffs.c Log Message: Pull up following revision(s) (requested by sborrill in ticket #308): sbin/resize_ffs/resize_ffs.8: revision 1.18 sbin/resize_ffs/resize_ffs.c: revision 1.48-1.53 Fix the most obvious integer overflow errors which can lead to superblock corruption. Thanks to riastradh@ -- Use int64_t for loop index so we don't iterate forever/until trap. -- Fix the syntax (pointed out by David H. Gutteridge on source-changes-d). Fix the build... -- - More fixes to use 64bit offsets. - Compute left-over fragments also for FFS2. -- PR/52590: David H. Gutteridge: Minor documentation improvements -- Fix computation of left-over fragments also for ufs2. Fixes PR 52600. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.17.6.1 src/sbin/resize_ffs/resize_ffs.8 cvs rdiff -u -r1.47 -r1.47.6.1 src/sbin/resize_ffs/resize_ffs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/resize_ffs/resize_ffs.8 diff -u src/sbin/resize_ffs/resize_ffs.8:1.17 src/sbin/resize_ffs/resize_ffs.8:1.17.6.1 --- src/sbin/resize_ffs/resize_ffs.8:1.17 Mon Sep 12 05:47:21 2016 +++ src/sbin/resize_ffs/resize_ffs.8 Tue Oct 24 09:08:40 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: resize_ffs.8,v 1.17 2016/09/12 05:47:21 sevan Exp $ +.\" $NetBSD: resize_ffs.8,v 1.17.6.1 2017/10/24 09:08:40 snj Exp $ .\" .\" As its sole author, I explicitly place this man page in the public .\" domain. Anyone may use it in any way for any purpose (though I would @@ -9,7 +9,7 @@ .\" X Against HTML mo...@rodents.montreal.qc.ca .\" / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B .\" -.Dd April 6, 2015 +.Dd October 1, 2017 .Dt RESIZE_FFS 8 .Os .Sh NAME @@ -128,10 +128,8 @@ command first appeared in .Aq r...@netbsd.org (Byteswapped file system and UFS2 support) .Pp -A big bug-finding kudos goes to John Kohl for finding the rotational -layout bug referred to in the -.Sx WARNING -section above. +A big bug-finding kudos goes to John Kohl for finding a significant +rotational layout bug. .Sh BUGS Can fail to shrink a file system when there actually is enough space, because it does not distinguish between a block allocated as a block Index: src/sbin/resize_ffs/resize_ffs.c diff -u src/sbin/resize_ffs/resize_ffs.c:1.47 src/sbin/resize_ffs/resize_ffs.c:1.47.6.1 --- src/sbin/resize_ffs/resize_ffs.c:1.47 Wed Aug 24 07:44:05 2016 +++ src/sbin/resize_ffs/resize_ffs.c Tue Oct 24 09:08:40 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: resize_ffs.c,v 1.47 2016/08/24 07:44:05 dholland Exp $ */ +/* $NetBSD: resize_ffs.c,v 1.47.6.1 2017/10/24 09:08:40 snj Exp $ */ /* From sources sent on February 17, 2003 */ /*- * As its sole author, I explicitly place this code in the public @@ -36,7 +36,7 @@ */ #include -__RCSID("$NetBSD: resize_ffs.c,v 1.47 2016/08/24 07:44:05 dholland Exp $"); +__RCSID("$NetBSD: resize_ffs.c,v 1.47.6.1 2017/10/24 09:08:40 snj Exp $"); #include #include @@ -462,10 +462,10 @@ static void initcg(int cgn) { struct cg *cg; /* The in-core cg, of course */ - int base; /* Disk address of cg base */ - int dlow; /* Size of pre-cg data area */ - int dhigh; /* Offset of post-inode data area, from base */ - int dmax; /* Offset of end of post-inode data area */ + int64_t base; /* Disk address of cg base */ + int64_t dlow; /* Size of pre-cg data area */ + int64_t dhigh; /* Offset of post-inode data area, from base */ + int64_t dmax; /* Offset of end of post-inode data area */ int i; /* Generic loop index */ int n; /* Generic count */ int start; /* start of cg maps */ @@ -478,7 +478,7 @@ initcg(int cgn) dmax = newsb->fs_size - base; if (dmax > newsb->fs_fpg) dmax = newsb->fs_fpg; - start = &cg->cg_space[0] - (unsigned char *) cg; + start = (unsigned char *)&cg->cg_space[0] - (unsigned char *) cg; /* * Clear out the cg - assumes all-0-bytes is the correct way * to initialize fields we don't otherwise touch, which is @@ -564,13 +564,16 @@ initcg(int cgn) * below for the post-inode data area, is that the pre-sb data * area always starts at 0, and thus is block-aligned, and * always ends at the sb, which is block-aligned.) */ - if ((newsb->fs_old_flags & FS_FLAGS_UPDATED) == 0) - for (i = 0; i < dlow; i += newsb->fs_frag) { - old_cg_blktot(cg, 0)[old_cbtocylno(newsb, i)]++; + if ((newsb->fs_old_flags & FS_FLAGS_UPDATED) == 0) { + int64_t di; + + for (di = 0; di < dlow; di += newsb->fs_frag) { + old_cg_blktot(cg, 0)[old_cbtocylno(newsb, di)]++; old_cg_blks(newsb, cg, - old_cbtocylno(newsb, i), - 0)[old_cbtorpos(newsb, i)]++; + old_cbtocylno(newsb, di), + 0)[old_cbtorpos(newsb, di)]++; } + } /* Deal with a partial block at the beginning of the post-
CVS commit: [netbsd-8] src/sys/netinet6
Module Name:src Committed By: snj Date: Tue Oct 24 09:00:23 UTC 2017 Modified Files: src/sys/netinet6 [netbsd-8]: nd6.c Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #307): sys/netinet6/nd6.c: revision 1.236 Add missing NULL check PR kern/52554 To generate a diff of this commit: cvs rdiff -u -r1.232.2.1 -r1.232.2.2 src/sys/netinet6/nd6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/nd6.c diff -u src/sys/netinet6/nd6.c:1.232.2.1 src/sys/netinet6/nd6.c:1.232.2.2 --- src/sys/netinet6/nd6.c:1.232.2.1 Fri Jul 7 13:57:26 2017 +++ src/sys/netinet6/nd6.c Tue Oct 24 09:00:22 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6.c,v 1.232.2.1 2017/07/07 13:57:26 martin Exp $ */ +/* $NetBSD: nd6.c,v 1.232.2.2 2017/10/24 09:00:22 snj Exp $ */ /* $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.232.2.1 2017/07/07 13:57:26 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.232.2.2 2017/10/24 09:00:22 snj Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -2321,6 +2321,11 @@ nd6_resolve(struct ifnet *ifp, const str created = true; } + if (ln == NULL) { + m_freem(m); + return ENETDOWN; /* better error? */ + } + LLE_WLOCK_ASSERT(ln); /* We don't have to do link-layer address resolution on a p2p link. */
CVS commit: [netbsd-8] src
Module Name:src Committed By: snj Date: Tue Oct 24 08:55:56 UTC 2017 Modified Files: src/distrib/sets/lists/tests [netbsd-8]: mi src/sys/net [netbsd-8]: route.c route.h src/sys/netatalk [netbsd-8]: at_proto.c src/sys/netinet [netbsd-8]: in_proto.c src/sys/netinet6 [netbsd-8]: in6_proto.c src/sys/netmpls [netbsd-8]: mpls_proto.c src/sys/netnatm [netbsd-8]: natm_proto.c src/sys/rump/net/lib/libsockin [netbsd-8]: sockin.c src/sys/sys [netbsd-8]: domain.h src/tests/net/route [netbsd-8]: Makefile Added Files: src/tests/net/route [netbsd-8]: t_rtcache.sh Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #305): distrib/sets/lists/tests/mi: revision 1.762 sys/net/route.c: revision 1.198-1.201 sys/net/route.h: revision 1.114 sys/netatalk/at_proto.c: revision 1.22 sys/netinet/in_proto.c: revision 1.124 sys/netinet6/in6_proto.c: revision 1.118 sys/netmpls/mpls_proto.c: revision 1.31 sys/netnatm/natm_proto.c: revision 1.18 sys/rump/net/lib/libsockin/sockin.c: revision 1.65 sys/sys/domain.h: revision 1.33 tests/net/route/Makefile: revision 1.6 tests/net/route/t_rtcache.sh: revision 1.1 Add tests of rtcache invalidation Remove unnecessary NULL check of rt_ifp It's always non-NULL. Invalidate rtcache based on a global generation counter The change introduces a global generation counter that is incremented when any routes have been added or deleted. When a rtcache caches a rtentry into itself, it also stores a snapshot of the generation counter. If the snapshot equals to the global counter, the cache is still valid, otherwise invalidated. One drawback of the change is that all rtcaches of all protocol families are invalidated when any routes of any protocol families are added or deleted. If that matters, we should have separate generation counters based on protocol families. This change removes LIST_ENTRY from struct route, which fixes a part of PR kern/52515. Remove the global lock for rtcache Thanks to removal of LIST_ENTRY of struct route, rtcaches are accessed only by their users. And in existing usages a rtcache is guranteed to be not accessed simultaneously. So the rtcache framework doesn't need any exclusion controls in itself. Synchronize on rtcache_generation with rtlock It's racy if NET_MPSAFE is enabled. Pointed out by joerg@ To generate a diff of this commit: cvs rdiff -u -r1.752.2.4 -r1.752.2.5 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.194.6.2 -r1.194.6.3 src/sys/net/route.c cvs rdiff -u -r1.112.4.1 -r1.112.4.2 src/sys/net/route.h cvs rdiff -u -r1.21 -r1.21.10.1 src/sys/netatalk/at_proto.c cvs rdiff -u -r1.123.4.1 -r1.123.4.2 src/sys/netinet/in_proto.c cvs rdiff -u -r1.117.4.1 -r1.117.4.2 src/sys/netinet6/in6_proto.c cvs rdiff -u -r1.30 -r1.30.8.1 src/sys/netmpls/mpls_proto.c cvs rdiff -u -r1.17 -r1.17.8.1 src/sys/netnatm/natm_proto.c cvs rdiff -u -r1.64 -r1.64.8.1 src/sys/rump/net/lib/libsockin/sockin.c cvs rdiff -u -r1.32 -r1.32.10.1 src/sys/sys/domain.h cvs rdiff -u -r1.5 -r1.5.6.1 src/tests/net/route/Makefile cvs rdiff -u -r0 -r1.1.2.2 src/tests/net/route/t_rtcache.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.752.2.4 src/distrib/sets/lists/tests/mi:1.752.2.5 --- src/distrib/sets/lists/tests/mi:1.752.2.4 Sat Oct 21 19:43:53 2017 +++ src/distrib/sets/lists/tests/mi Tue Oct 24 08:55:55 2017 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.752.2.4 2017/10/21 19:43:53 snj Exp $ +# $NetBSD: mi,v 1.752.2.5 2017/10/24 08:55:55 snj Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -3376,6 +3376,7 @@ ./usr/tests/net/route/t_flags tests-net-tests atf,rump ./usr/tests/net/route/t_flags6 tests-net-tests atf,rump ./usr/tests/net/route/t_route tests-net-tests atf,rump +./usr/tests/net/route/t_rtcache tests-net-tests atf,rump ./usr/tests/net/systests-net-tests compattestfile,atf ./usr/tests/net/sys/Atffile tests-net-tests compattestfile,atf ./usr/tests/net/sys/Kyuafile tests-net-tests compattestfile,atf,kyua Index: src/sys/net/route.c diff -u src/sys/net/route.c:1.194.6.2 src/sys/net/route.c:1.194.6.3 --- src/sys/net/route.c:1.194.6.2 Fri Jul 7 13:57:26 2017 +++ src/sys/net/route.c Tue Oct 24 08:55:55 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: route.c,v 1.194.6.2 2017/07/07 13:57:26 martin Exp $ */ +/* $NetBSD: route.c,v 1.194.6.3 2017/10/24 08:55:55 snj Exp $ */ /*- * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.194.6.2 2017/07/07 13:57:26 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.194.6.3 2017/10/24 08:55:55 snj Exp $"); #include #ifdef RTFLUSH_DEBUG @@ -169,8 +169
CVS commit: [netbsd-8] src/sys/net
Module Name:src Committed By: snj Date: Tue Oct 24 08:50:44 UTC 2017 Modified Files: src/sys/net [netbsd-8]: if_loop.c Log Message: Pull up following revision(s) (requested by knakahara in ticket #304): sys/net/if_loop.c: revision 1.95 loop_clone_create() must be called after ncpu is counted up for all CPUs. loop_clone_create() uses ncpu in the following call-path. - loop_clone_create() - if_attach() - if_percpuq_create() - softint_establish() // use ncpu - percpu_foreach() // use ncpu However, loopinit() of built-in module is called from module_init_class(MODULE_CLASS_DRIVER) which is called before ncpu is counted up in some architectures. So, It is too fast. On the other hand, it is too late for rump netinet component to call loop_clone_create() in config_finalize(). As the result, loop_clone_create() shuld be called in loopattach() for built-in module, and in loopinit() for dynamic module. To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.94.6.1 src/sys/net/if_loop.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_loop.c diff -u src/sys/net/if_loop.c:1.94 src/sys/net/if_loop.c:1.94.6.1 --- src/sys/net/if_loop.c:1.94 Tue Mar 28 08:47:19 2017 +++ src/sys/net/if_loop.c Tue Oct 24 08:50:44 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_loop.c,v 1.94 2017/03/28 08:47:19 ozaki-r Exp $ */ +/* $NetBSD: if_loop.c,v 1.94.6.1 2017/10/24 08:50:44 snj Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_loop.c,v 1.94 2017/03/28 08:47:19 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_loop.c,v 1.94.6.1 2017/10/24 08:50:44 snj Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -146,10 +146,9 @@ void loopattach(int n) { - /* - * Nothing to do here, initialization is handled by the - * module initialization code in loopnit() below). - */ +#ifndef _MODULE + loop_clone_create(&loop_cloner, 0); /* lo0 always exists */ +#endif } void @@ -159,7 +158,9 @@ loopinit(void) if (lo0ifp != NULL) /* can happen in rump kernel */ return; - (void)loop_clone_create(&loop_cloner, 0); /* lo0 always exists */ +#ifdef _MODULE + loop_clone_create(&loop_cloner, 0); /* lo0 always exists */ +#endif if_clone_attach(&loop_cloner); }
CVS commit: [netbsd-8] src/sys
Module Name:src Committed By: snj Date: Tue Oct 24 08:47:24 UTC 2017 Modified Files: src/sys/net [netbsd-8]: if_gif.c if_gif.h src/sys/netinet [netbsd-8]: in_gif.c src/sys/netinet6 [netbsd-8]: in6_gif.c Log Message: Pull up following revision(s) (requested by knahakara in ticket #303): sys/net/if_gif.c: 1.129-1.130 sys/net/if_gif.h: 1.26-1.27 sys/netinet/in_gif.c: 1.88 sys/netinet6/in6_gif.c: 1.86 add lock for percpu route like l2tp(4). -- add lock for sclist to exclude ifconfig gifX add/delete and ifconfig gifX tunnel -- update locking notes. To generate a diff of this commit: cvs rdiff -u -r1.126.2.2 -r1.126.2.3 src/sys/net/if_gif.c cvs rdiff -u -r1.25 -r1.25.8.1 src/sys/net/if_gif.h cvs rdiff -u -r1.87 -r1.87.8.1 src/sys/netinet/in_gif.c cvs rdiff -u -r1.85 -r1.85.6.1 src/sys/netinet6/in6_gif.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_gif.c diff -u src/sys/net/if_gif.c:1.126.2.2 src/sys/net/if_gif.c:1.126.2.3 --- src/sys/net/if_gif.c:1.126.2.2 Wed Aug 9 05:51:50 2017 +++ src/sys/net/if_gif.c Tue Oct 24 08:47:24 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_gif.c,v 1.126.2.2 2017/08/09 05:51:50 snj Exp $ */ +/* $NetBSD: if_gif.c,v 1.126.2.3 2017/10/24 08:47:24 snj Exp $ */ /* $KAME: if_gif.c,v 1.76 2001/08/20 02:01:02 kjc Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.126.2.2 2017/08/09 05:51:50 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.126.2.3 2017/10/24 08:47:24 snj Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -96,7 +96,14 @@ __KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1 /* * gif global variable definitions */ -static LIST_HEAD(, gif_softc) gif_softc_list; +LIST_HEAD(gif_sclist, gif_softc); +static struct { + struct gif_sclist list; + kmutex_t lock; +} gif_softcs __cacheline_aligned; + +static void gif_ro_init_pc(void *, void *, struct cpu_info *); +static void gif_ro_fini_pc(void *, void *, struct cpu_info *); static void gifattach0(struct gif_softc *); static int gif_output(struct ifnet *, struct mbuf *, @@ -205,7 +212,8 @@ static void gifinit(void) { - LIST_INIT(&gif_softc_list); + mutex_init(&gif_softcs.lock, MUTEX_DEFAULT, IPL_NONE); + LIST_INIT(&gif_softcs.list); if_clone_attach(&gif_cloner); gif_sysctl_setup(); @@ -216,8 +224,11 @@ gifdetach(void) { int error = 0; - if (!LIST_EMPTY(&gif_softc_list)) + mutex_enter(&gif_softcs.lock); + if (!LIST_EMPTY(&gif_softcs.list)) { + mutex_exit(&gif_softcs.lock); error = EBUSY; + } if (error == 0) { if_clone_detach(&gif_cloner); @@ -238,8 +249,12 @@ gif_clone_create(struct if_clone *ifc, i gifattach0(sc); - sc->gif_ro_percpu = percpu_alloc(sizeof(struct route)); - LIST_INSERT_HEAD(&gif_softc_list, sc, gif_list); + sc->gif_ro_percpu = percpu_alloc(sizeof(struct gif_ro)); + percpu_foreach(sc->gif_ro_percpu, gif_ro_init_pc, NULL); + + mutex_enter(&gif_softcs.lock); + LIST_INSERT_HEAD(&gif_softcs.list, sc, gif_list); + mutex_exit(&gif_softcs.lock); return (0); } @@ -270,12 +285,30 @@ gifattach0(struct gif_softc *sc) bpf_attach(&sc->gif_if, DLT_NULL, sizeof(u_int)); } +static void +gif_ro_init_pc(void *p, void *arg __unused, struct cpu_info *ci __unused) +{ + struct gif_ro *gro = p; + + mutex_init(&gro->gr_lock, MUTEX_DEFAULT, IPL_NONE); +} + +static void +gif_ro_fini_pc(void *p, void *arg __unused, struct cpu_info *ci __unused) +{ + struct gif_ro *gro = p; + + rtcache_free(&gro->gr_ro); + + mutex_destroy(&gro->gr_lock); +} + void gif_rtcache_free_pc(void *p, void *arg __unused, struct cpu_info *ci __unused) { - struct route *ro = p; + struct gif_ro *gro = p; - rtcache_free(ro); + rtcache_free(&gro->gr_ro); } static int @@ -288,8 +321,10 @@ gif_clone_destroy(struct ifnet *ifp) gif_delete_tunnel(&sc->gif_if); bpf_detach(ifp); if_detach(ifp); - percpu_foreach(sc->gif_ro_percpu, gif_rtcache_free_pc, NULL); - percpu_free(sc->gif_ro_percpu, sizeof(struct route)); + + percpu_foreach(sc->gif_ro_percpu, gif_ro_fini_pc, NULL); + percpu_free(sc->gif_ro_percpu, sizeof(struct gif_ro)); + kmem_free(sc, sizeof(struct gif_softc)); return (0); @@ -969,7 +1004,8 @@ gif_set_tunnel(struct ifnet *ifp, struct return error; } - LIST_FOREACH(sc2, &gif_softc_list, gif_list) { + mutex_enter(&gif_softcs.lock); + LIST_FOREACH(sc2, &gif_softcs.list, gif_list) { if (sc2 == sc) continue; if (!sc2->gif_pdst || !sc2->gif_psrc) @@ -978,12 +1014,14 @@ gif_set_tunnel(struct ifnet *ifp, struct if (sockaddr_cmp(sc2->gif_pdst, dst) == 0 && sockaddr_cmp(sc2->gif_psrc, src) == 0) { /* continue to use the old configureation. */ + mutex_exit(&gif_softcs.lock); error = EADDRNOTAVAIL; goto out; } /* XXX both end must be valid? (I mean, not 0.0.0.0) */ } + mutex_exit(&gif_softcs.lock); nsrc = sockaddr_dup(src, M_WAITOK); ndst = sockaddr_
CVS commit: [netbsd-8] src/sys
Module Name:src Committed By: snj Date: Tue Oct 24 08:39:00 UTC 2017 Modified Files: src/sys/arch/powerpc/booke/dev [netbsd-8]: pq3etsec.c src/sys/arch/x86/pci [netbsd-8]: if_vmx.c src/sys/dev/ic [netbsd-8]: i82557.c rtl8169.c src/sys/dev/pci [netbsd-8]: if_age.c if_alc.c if_ale.c if_bge.c if_bnx.c if_jme.c if_nfe.c if_sip.c if_stge.c if_ti.c if_txp.c if_vge.c if_wm.c src/sys/dev/pci/cxgb [netbsd-8]: cxgb_sge.c src/sys/dev/pci/ixgbe [netbsd-8]: ix_txrx.c src/sys/net [netbsd-8]: if_ether.h if_ethersubr.c if_vlan.c src/sys/net/agr [netbsd-8]: if_agrether_hash.c src/sys/net80211 [netbsd-8]: ieee80211_input.c ieee80211_output.c src/sys/sys [netbsd-8]: mbuf.h Log Message: Pull up following revision(s) (requested by knakahara in ticket #302): sys/arch/powerpc/booke/dev/pq3etsec.c: 1.30-1.31 sys/arch/x86/pci/if_vmx.c: 1.20 sys/dev/ic/i82557.c: 1.148 sys/dev/ic/rtl8169.c: 1.152 sys/dev/pci/cxgb/cxgb_sge.c: 1.5 sys/dev/pci/if_age.c: 1.51 sys/dev/pci/if_alc.c: 1.25 sys/dev/pci/if_ale.c: 1.23 sys/dev/pci/if_bge.c: 1.311 sys/dev/pci/if_bge.c: 1.312 sys/dev/pci/if_bnx.c: 1.62 sys/dev/pci/if_jme.c: 1.32 sys/dev/pci/if_nfe.c: 1.64 sys/dev/pci/if_sip.c: 1.167 sys/dev/pci/if_stge.c: 1.63-1.64 sys/dev/pci/if_ti.c: 1.102 sys/dev/pci/if_txp.c: 1.48 sys/dev/pci/if_vge.c: 1.61 sys/dev/pci/if_wm.c: 1.538 sys/dev/pci/ixgbe/ix_txrx.c: 1.29 via patch sys/net/agr/if_agrether_hash.c: 1.4 sys/net/if_ether.h: 1.67-1.68 sys/net/if_ethersubr.c: 1.244 sys/net/if_vlan.c: 1.100 sys/net80211/ieee80211_input.c: 1.89 sys/net80211/ieee80211_output.c: 1.59 sys/sys/mbuf.h: 1.171 VLAN ID uses pkthdr instead of mtag now. Contributed by s-yamaguchi@IIJ. I just commit by proxy. Reviewed by joerg@n.o and christos@n.o, thanks. See http://mail-index.netbsd.org/tech-net/2017/09/26/msg006459.html -- only get vtag when we have vtag like the other drivers. -- - only get the vtag if we have it like the other drivers - mask the hardware vlan tag -- - add a constant for the vlan mask. - enforce that we have a tag before we get it. only get vtag when we have vtag like the other drivers. like if_bge.c:1.312 and if_stge.c:1.64. fixed by s-yamaguchi@IIJ, thanks. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.29.8.1 src/sys/arch/powerpc/booke/dev/pq3etsec.c cvs rdiff -u -r1.19 -r1.19.6.1 src/sys/arch/x86/pci/if_vmx.c cvs rdiff -u -r1.147 -r1.147.6.1 src/sys/dev/ic/i82557.c cvs rdiff -u -r1.151 -r1.151.2.1 src/sys/dev/ic/rtl8169.c cvs rdiff -u -r1.50 -r1.50.8.1 src/sys/dev/pci/if_age.c cvs rdiff -u -r1.24 -r1.24.8.1 src/sys/dev/pci/if_alc.c cvs rdiff -u -r1.22 -r1.22.2.1 src/sys/dev/pci/if_ale.c cvs rdiff -u -r1.310 -r1.310.2.1 src/sys/dev/pci/if_bge.c cvs rdiff -u -r1.61 -r1.61.8.1 src/sys/dev/pci/if_bnx.c cvs rdiff -u -r1.31 -r1.31.8.1 src/sys/dev/pci/if_jme.c cvs rdiff -u -r1.63 -r1.63.8.1 src/sys/dev/pci/if_nfe.c cvs rdiff -u -r1.166 -r1.166.2.1 src/sys/dev/pci/if_sip.c cvs rdiff -u -r1.62 -r1.62.8.1 src/sys/dev/pci/if_stge.c cvs rdiff -u -r1.101 -r1.101.8.1 src/sys/dev/pci/if_ti.c cvs rdiff -u -r1.47 -r1.47.8.1 src/sys/dev/pci/if_txp.c cvs rdiff -u -r1.60 -r1.60.8.1 src/sys/dev/pci/if_vge.c cvs rdiff -u -r1.508.4.3 -r1.508.4.4 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.4 -r1.4.10.1 src/sys/dev/pci/cxgb/cxgb_sge.c cvs rdiff -u -r1.24.2.1 -r1.24.2.2 src/sys/dev/pci/ixgbe/ix_txrx.c cvs rdiff -u -r1.66 -r1.66.8.1 src/sys/net/if_ether.h cvs rdiff -u -r1.242 -r1.242.6.1 src/sys/net/if_ethersubr.c cvs rdiff -u -r1.97.2.2 -r1.97.2.3 src/sys/net/if_vlan.c cvs rdiff -u -r1.3 -r1.3.114.1 src/sys/net/agr/if_agrether_hash.c cvs rdiff -u -r1.88 -r1.88.6.1 src/sys/net80211/ieee80211_input.c cvs rdiff -u -r1.58 -r1.58.8.1 src/sys/net80211/ieee80211_output.c cvs rdiff -u -r1.170 -r1.170.2.1 src/sys/sys/mbuf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/booke/dev/pq3etsec.c diff -u src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.29 src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.29.8.1 --- src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.29 Thu Dec 15 09:28:04 2016 +++ src/sys/arch/powerpc/booke/dev/pq3etsec.c Tue Oct 24 08:38:58 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pq3etsec.c,v 1.29 2016/12/15 09:28:04 ozaki-r Exp $ */ +/* $NetBSD: pq3etsec.c,v 1.29.8.1 2017/10/24 08:38:58 snj Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -41,7 +41,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.29 2016/12/15 09:28:04 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.29.8.1 2017/10/24 08:38:58 snj Exp $"); #include #include @@ -1512,8 +1512,7 @@ pq3etsec_rx_offload( co
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Tue Oct 24 08:32:42 UTC 2017 Modified Files: src/sys/dev/pci: pci_subr.c Log Message: Print Error Source Identification register correctly. To generate a diff of this commit: cvs rdiff -u -r1.194 -r1.195 src/sys/dev/pci/pci_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pci_subr.c diff -u src/sys/dev/pci/pci_subr.c:1.194 src/sys/dev/pci/pci_subr.c:1.195 --- src/sys/dev/pci/pci_subr.c:1.194 Thu Oct 19 05:52:57 2017 +++ src/sys/dev/pci/pci_subr.c Tue Oct 24 08:32:41 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_subr.c,v 1.194 2017/10/19 05:52:57 msaitoh Exp $ */ +/* $NetBSD: pci_subr.c,v 1.195 2017/10/24 08:32:41 msaitoh Exp $ */ /* * Copyright (c) 1997 Zubin D. Dittia. All rights reserved. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.194 2017/10/19 05:52:57 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.195 2017/10/24 08:32:41 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_pci.h" @@ -2692,7 +2692,8 @@ pci_conf_print_aer_cap(const pcireg_t *r pci_conf_print_aer_cap_rooterr_status(reg); reg = regs[o2i(extcapoff + PCI_AER_ERRSRC_ID)]; - printf("Error Source Identification: 0x%04x\n", reg); + printf("Error Source Identification register: 0x%08x\n", + reg); pci_conf_print_aer_cap_errsrc_id(reg); break; }
CVS commit: src/sys/dev/ic
Module Name:src Committed By: msaitoh Date: Tue Oct 24 08:02:07 UTC 2017 Modified Files: src/sys/dev/ic: spdmem.c Log Message: Print "ECC" or "no ECC" for DDR4. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/dev/ic/spdmem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/spdmem.c diff -u src/sys/dev/ic/spdmem.c:1.27 src/sys/dev/ic/spdmem.c:1.28 --- src/sys/dev/ic/spdmem.c:1.27 Mon Oct 16 17:52:10 2017 +++ src/sys/dev/ic/spdmem.c Tue Oct 24 08:02:06 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: spdmem.c,v 1.27 2017/10/16 17:52:10 christos Exp $ */ +/* $NetBSD: spdmem.c,v 1.28 2017/10/24 08:02:06 msaitoh Exp $ */ /* * Copyright (c) 2007 Nicolas Joly @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: spdmem.c,v 1.27 2017/10/16 17:52:10 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spdmem.c,v 1.28 2017/10/24 08:02:06 msaitoh Exp $"); #include #include @@ -879,8 +879,9 @@ decode_ddr4(const struct sysctlnode *nod if (s->sm_ddr4.ddr4_mod_type < __arraycount(spdmem_ddr4_module_types)) aprint_normal(" (%s)", spdmem_ddr4_module_types[s->sm_ddr4.ddr4_mod_type]); - aprint_normal(", %stemp-sensor, ", - (s->sm_ddr4.ddr4_has_therm_sensor)?"":"no "); + aprint_normal(", %sECC, %stemp-sensor, ", + (s->sm_ddr4.ddr4_bus_width_extension) ? "" : "no ", + (s->sm_ddr4.ddr4_has_therm_sensor) ? "" : "no "); /* * DDR4 size calculation from JEDEC spec