Re: svn commit: r313761 - in head/lib/msun: . src [breaks the build for armv6/v7 and for powerpc64]

2017-02-15 Thread Mark Millard

On 2017-Feb-15, at 11:35 PM, Mark Millard  wrote:

> When I tried to cross-build -r313783 (via svnlite update) the following:
> 
> __FBSDID("$FreeBSD: head/lib/msun/src/catrigl.c 313761 2017-02-15 07:59:54Z 
> mmokhi $");
> 
> got:
> 
> Building /usr/obj/bpim3_clang/arm.armv6/usr/src/lib/msun/catrigl.o
> --- catrigl.o ---
> /usr/src/lib/msun/src/catrigl.c:48:10: fatal error: 'invtrig.h' file not found
> #include "invtrig.h"
> ^
> . . .
> --- lib/msun__L ---
> 1 error generated.
> *** [catrigl.o] Error code 1
> 
> make[4]: stopped in /usr/src/lib/msun
> .ERROR_TARGET='catrigl.o'
> .ERROR_META_FILE='/usr/obj/bpim3_clang/arm.armv6/usr/src/lib/msun/catrigl.o.meta'
> .MAKE.LEVEL='4'
> MAKEFILE=''
> .MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose'
> .CURDIR='/usr/src/lib/msun'
> .MAKE='make'
> .OBJDIR='/usr/obj/bpim3_clang/arm.armv6/usr/src/lib/msun'
> .TARGETS='all'
> DESTDIR='/usr/obj/bpim3_clang/arm.armv6/usr/src/tmp'
> LD_LIBRARY_PATH=''
> MACHINE='arm'
> MACHINE_ARCH='armv6'
> MAKEOBJDIRPREFIX='/usr/obj/bpim3_clang/arm.armv6'
> MAKESYSPATH='/usr/src/share/mk'
> MAKE_VERSION='20161212'
> PATH='/usr/obj/bpim3_clang/arm.armv6/usr/src/tmp/legacy/usr/sbin:/usr/obj/bpim3_clang/arm.armv6/usr/src/tmp/legacy/usr/bin:/usr/obj/bpim3_clang/arm.armv6/usr/src/tmp/legacy/bin:/usr/obj/bpim3_clang/arm.armv6/usr/src/tmp/usr/sbin:/usr/obj/bpim3_clang/arm.armv6/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin'
> SRCTOP='/usr/src'
> OBJTOP='/usr/obj/bpim3_clang/arm.armv6/usr/src'
> .MAKE.MAKEFILES='/usr/src/share/mk/sys.mk /usr/src/share/mk/local.sys.env.mk 
> /usr/src/share/mk/src.sys.env.mk 
> /root/src.configs/src.conf.bpim3-clang-bootstrap.amd64-host 
> /usr/src/share/mk/bsd.mkopt.mk /usr/src/share/mk/bsd.suffixes.mk 
> /root/src.configs/make.conf /usr/src/share/mk/local.sys.mk 
> /usr/src/share/mk/src.sys.mk /dev/null /usr/src/lib/msun/Makefile 
> /usr/src/lib/msun/arm/Makefile.inc /usr/src/share/mk/src.opts.mk 
> /usr/src/share/mk/bsd.own.mk /usr/src/share/mk/bsd.opts.mk 
> /usr/src/share/mk/bsd.cpu.mk /usr/src/share/mk/bsd.compiler.mk 
> /usr/src/share/mk/bsd.compiler.mk /usr/src/share/mk/bsd.lib.mk 
> /usr/src/share/mk/bsd.init.mk /usr/src/share/mk/local.init.mk 
> /usr/src/share/mk/src.init.mk /usr/src/lib/msun/../Makefile.inc 
> /usr/src/share/mk/bsd.libnames.mk /usr/src/share/mk/src.libnames.mk 
> /usr/src/share/mk/bsd.symver.mk /usr/src/share/mk/bsd.nls.mk 
> /usr/src/share/mk/bsd.files.mk /usr/src/share/mk/bsd.incs.mk 
> /usr/src/share/mk/bsd.confs.mk /usr/src/share/mk/bsd.links.mk /usr/src
 /share/mk/bsd.dep.mk /usr/src/share/mk/bsd.clang-analyze.mk 
/usr/src/share/mk/bsd.obj.mk /usr/src/share/mk/bsd.subdir.mk 
/usr/src/share/mk/bsd.sys.mk'
> .PATH='. /usr/src/lib/msun /usr/src/lib/msun/arm /usr/src/lib/msun/bsdsrc 
> /usr/src/lib/msun/src /usr/src/lib/msun/man'
> 1 error

powerpc64 gets the same sort of build failure:

--- catrigl.o ---
/usr/src/lib/msun/src/catrigl.c:48:10: fatal error: 'invtrig.h' file not found
#include "invtrig.h"
 ^
1 error generated.
*** [catrigl.o] Error code 1

make[4]: stopped in /usr/src/lib/msun
.ERROR_TARGET='catrigl.o'
.ERROR_META_FILE='/usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.powerpc64/usr/src/lib/msun/catrigl.o.meta'
.MAKE.LEVEL='4'
MAKEFILE=''
.MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose'
.CURDIR='/usr/src/lib/msun'
.MAKE='make'
.OBJDIR='/usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.powerpc64/usr/src/lib/msun'
.TARGETS='all'
DESTDIR='/usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.powerpc64/usr/src/tmp'
LD_LIBRARY_PATH=''
MACHINE='powerpc'
MACHINE_ARCH='powerpc64'
MAKEOBJDIRPREFIX='/usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.powerpc64'
MAKESYSPATH='/usr/src/share/mk'
MAKE_VERSION='20161212'
PATH='/usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.powerpc64/usr/src/tmp/legacy/usr/sbin:/usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.powerpc64/usr/src/tmp/legacy/usr/bin:/usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.powerpc64/usr/src/tmp/legacy/bin:/usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.powerpc64/usr/src/tmp/usr/sbin:/usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.powerpc64/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin'
SRCTOP='/usr/src'
OBJTOP='/usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.powerpc64/usr/src'
.MAKE.MAKEFILES='/usr/src/share/mk/sys.mk /usr/src/share/mk/local.sys.env.mk 
/usr/src/share/mk/src.sys.env.mk 
/root/src.configs/src.conf.powerpc64-clang_altbinutils-bootstrap.amd64-host 
/usr/src/share/mk/bsd.mkopt.mk /usr/src/share/mk/bsd.suffixes.mk 
/root/src.configs/make.conf /usr/src/share/mk/local.sys.mk 
/usr/src/share/mk/src.sys.mk /dev/null /usr/src/lib/msun/Makefile 
/usr/src/lib/msun/powerpc/Makefile.inc /usr/src/share/mk/src.opts.mk 
/usr/src/share/mk/bsd.own.mk /usr/src/share/mk/bsd.opts.mk 
/usr/src/share/mk/bsd.cpu.mk /usr/src/share/mk/bsd.compiler.mk 
/usr/src/share/mk/bsd.compiler.mk 

Re: svn commit: r313761 - in head/lib/msun: . src [breaks the build for armv6/v7]

2017-02-15 Thread Mark Millard
When I tried to cross-build -r313783 (via svnlite update) the following:

__FBSDID("$FreeBSD: head/lib/msun/src/catrigl.c 313761 2017-02-15 07:59:54Z 
mmokhi $");

got:

Building /usr/obj/bpim3_clang/arm.armv6/usr/src/lib/msun/catrigl.o
--- catrigl.o ---
/usr/src/lib/msun/src/catrigl.c:48:10: fatal error: 'invtrig.h' file not found
#include "invtrig.h"
 ^
. . .
--- lib/msun__L ---
1 error generated.
*** [catrigl.o] Error code 1

make[4]: stopped in /usr/src/lib/msun
.ERROR_TARGET='catrigl.o'
.ERROR_META_FILE='/usr/obj/bpim3_clang/arm.armv6/usr/src/lib/msun/catrigl.o.meta'
.MAKE.LEVEL='4'
MAKEFILE=''
.MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose'
.CURDIR='/usr/src/lib/msun'
.MAKE='make'
.OBJDIR='/usr/obj/bpim3_clang/arm.armv6/usr/src/lib/msun'
.TARGETS='all'
DESTDIR='/usr/obj/bpim3_clang/arm.armv6/usr/src/tmp'
LD_LIBRARY_PATH=''
MACHINE='arm'
MACHINE_ARCH='armv6'
MAKEOBJDIRPREFIX='/usr/obj/bpim3_clang/arm.armv6'
MAKESYSPATH='/usr/src/share/mk'
MAKE_VERSION='20161212'
PATH='/usr/obj/bpim3_clang/arm.armv6/usr/src/tmp/legacy/usr/sbin:/usr/obj/bpim3_clang/arm.armv6/usr/src/tmp/legacy/usr/bin:/usr/obj/bpim3_clang/arm.armv6/usr/src/tmp/legacy/bin:/usr/obj/bpim3_clang/arm.armv6/usr/src/tmp/usr/sbin:/usr/obj/bpim3_clang/arm.armv6/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin'
SRCTOP='/usr/src'
OBJTOP='/usr/obj/bpim3_clang/arm.armv6/usr/src'
.MAKE.MAKEFILES='/usr/src/share/mk/sys.mk /usr/src/share/mk/local.sys.env.mk 
/usr/src/share/mk/src.sys.env.mk 
/root/src.configs/src.conf.bpim3-clang-bootstrap.amd64-host 
/usr/src/share/mk/bsd.mkopt.mk /usr/src/share/mk/bsd.suffixes.mk 
/root/src.configs/make.conf /usr/src/share/mk/local.sys.mk 
/usr/src/share/mk/src.sys.mk /dev/null /usr/src/lib/msun/Makefile 
/usr/src/lib/msun/arm/Makefile.inc /usr/src/share/mk/src.opts.mk 
/usr/src/share/mk/bsd.own.mk /usr/src/share/mk/bsd.opts.mk 
/usr/src/share/mk/bsd.cpu.mk /usr/src/share/mk/bsd.compiler.mk 
/usr/src/share/mk/bsd.compiler.mk /usr/src/share/mk/bsd.lib.mk 
/usr/src/share/mk/bsd.init.mk /usr/src/share/mk/local.init.mk 
/usr/src/share/mk/src.init.mk /usr/src/lib/msun/../Makefile.inc 
/usr/src/share/mk/bsd.libnames.mk /usr/src/share/mk/src.libnames.mk 
/usr/src/share/mk/bsd.symver.mk /usr/src/share/mk/bsd.nls.mk 
/usr/src/share/mk/bsd.files.mk /usr/src/share/mk/bsd.incs.mk 
/usr/src/share/mk/bsd.confs.mk /usr/src/share/mk/bsd.links.mk /usr/src/s
 hare/mk/bsd.dep.mk /usr/src/share/mk/bsd.clang-analyze.mk 
/usr/src/share/mk/bsd.obj.mk /usr/src/share/mk/bsd.subdir.mk 
/usr/src/share/mk/bsd.sys.mk'
.PATH='. /usr/src/lib/msun /usr/src/lib/msun/arm /usr/src/lib/msun/bsdsrc 
/usr/src/lib/msun/src /usr/src/lib/msun/man'
1 error



===
Mark Millard
markmi at dsl-only.net

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313801 - head/lib/libc/sys

2017-02-15 Thread Ed Schouten
Author: ed
Date: Thu Feb 16 06:52:53 2017
New Revision: 313801
URL: https://svnweb.freebsd.org/changeset/base/313801

Log:
  Remove unnecessary #includes from the kqueue(2) man page.
  
  Now that  can be included on its own, adjust the manual
  page accordingly. Remove both unnecessary #include statements from the
  synopsis and the example code.
  
  While there, also add a note to the BUGS section to mention that
  previous versions of this header file still depend on .
  
  Reviewed by:  ngie, vangyzen
  Differential Revision:https://reviews.freebsd.org/D9605

Modified:
  head/lib/libc/sys/kqueue.2

Modified: head/lib/libc/sys/kqueue.2
==
--- head/lib/libc/sys/kqueue.2  Thu Feb 16 06:36:16 2017(r313800)
+++ head/lib/libc/sys/kqueue.2  Thu Feb 16 06:52:53 2017(r313801)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 3, 2016
+.Dd February 15, 2017
 .Dt KQUEUE 2
 .Os
 .Sh NAME
@@ -34,9 +34,7 @@
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
-.In sys/types.h
 .In sys/event.h
-.In sys/time.h
 .Ft int
 .Fn kqueue "void"
 .Ft int
@@ -633,15 +631,12 @@ If the time limit expires, then
 returns 0.
 .Sh EXAMPLES
 .Bd -literal -compact
-#include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
 
 int
 main(int argc, char **argv)
@@ -769,3 +764,9 @@ The
 .Fa timeout
 value is limited to 24 hours; longer timeouts will be silently
 reinterpreted as 24 hours.
+.Pp
+Previous versions of
+.In sys/event.h
+fail to parse without including
+.In sys/types.h
+manually.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r313798 - head/bin/ls

2017-02-15 Thread Konstantin Belousov
On Thu, Feb 16, 2017 at 06:32:39AM +, Konstantin Belousov wrote:
> Author: kib
> Date: Thu Feb 16 06:32:39 2017
> New Revision: 313798
> URL: https://svnweb.freebsd.org/changeset/base/313798
> 
> Log:
>   Use uintmax_t to print st_nlink.
>   
>   Sponsored by:   The FreeBSD Foundation
Reported and tested by: pho

Sorry.
>   MFC after:  1 week
> 
> Modified:
>   head/bin/ls/print.c
> 
> Modified: head/bin/ls/print.c
> ==
> --- head/bin/ls/print.c   Thu Feb 16 06:31:36 2017(r313797)
> +++ head/bin/ls/print.c   Thu Feb 16 06:32:39 2017(r313798)
> @@ -259,12 +259,12 @@ printlong(const DISPLAY *dp)
>   np = p->fts_pointer;
>   xo_attr("value", "%03o", (int) sp->st_mode & ALLPERMS);
>   if (f_numericonly) {
> - xo_emit("{t:mode/%s}{e:mode_octal/%03o} {t:links/%*u} 
> {td:user/%-*s}{e:user/%ju}  {td:group/%-*s}{e:group/%ju}  ",
> - buf, (int) sp->st_mode & ALLPERMS, dp->s_nlink, 
> sp->st_nlink,
> + xo_emit("{t:mode/%s}{e:mode_octal/%03o} {t:links/%*ju} 
> {td:user/%-*s}{e:user/%ju}  {td:group/%-*s}{e:group/%ju}  ",
> + buf, (int) sp->st_mode & ALLPERMS, dp->s_nlink, 
> (uintmax_t)sp->st_nlink,
>   dp->s_user, np->user, (uintmax_t)sp->st_uid, 
> dp->s_group, np->group, (uintmax_t)sp->st_gid);
>   } else {
> - xo_emit("{t:mode/%s}{e:mode_octal/%03o} {t:links/%*u} 
> {t:user/%-*s}  {t:group/%-*s}  ",
> - buf, (int) sp->st_mode & ALLPERMS, dp->s_nlink, 
> sp->st_nlink,
> + xo_emit("{t:mode/%s}{e:mode_octal/%03o} {t:links/%*ju} 
> {t:user/%-*s}  {t:group/%-*s}  ",
> + buf, (int) sp->st_mode & ALLPERMS, dp->s_nlink, 
> (uintmax_t)sp->st_nlink,
>   dp->s_user, np->user, dp->s_group, np->group);
>   }
>   if (S_ISBLK(sp->st_mode))
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313800 - head/sys/fs/nfsclient

2017-02-15 Thread Konstantin Belousov
Author: kib
Date: Thu Feb 16 06:36:16 2017
New Revision: 313800
URL: https://svnweb.freebsd.org/changeset/base/313800

Log:
  Do not access memory past the buffer end.
  Do not accept and silently truncate too long hostname.
  
  Reported and tested by:   pho
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/sys/fs/nfsclient/nfs_clvfsops.c

Modified: head/sys/fs/nfsclient/nfs_clvfsops.c
==
--- head/sys/fs/nfsclient/nfs_clvfsops.cThu Feb 16 06:34:20 2017
(r313799)
+++ head/sys/fs/nfsclient/nfs_clvfsops.cThu Feb 16 06:36:16 2017
(r313800)
@@ -1270,8 +1270,13 @@ nfs_mount(struct mount *mp)
error = EINVAL;
goto out;
}
-   bcopy(args.hostname, hst, MNAMELEN);
-   hst[MNAMELEN - 1] = '\0';
+   if (len >= MNAMELEN) {
+   vfs_mount_error(mp, "Hostname too long");
+   error = EINVAL;
+   goto out;
+   }
+   bcopy(args.hostname, hst, len);
+   hst[len] = '\0';
}
 
if (vfs_getopt(mp->mnt_optnew, "principal", (void **), NULL) == 0)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313799 - head/sys/fs/nfsclient

2017-02-15 Thread Konstantin Belousov
Author: kib
Date: Thu Feb 16 06:34:20 2017
New Revision: 313799
URL: https://svnweb.freebsd.org/changeset/base/313799

Log:
  Do not allocate char[MNAMELEN] on stack in nfsclient.
  
  Right now this is not critical, but will be after planned increase of
  MNAMELEN from 88 to 1k.
  
  Reported and tested by:   pho
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/sys/fs/nfsclient/nfs_clvfsops.c

Modified: head/sys/fs/nfsclient/nfs_clvfsops.c
==
--- head/sys/fs/nfsclient/nfs_clvfsops.cThu Feb 16 06:32:39 2017
(r313798)
+++ head/sys/fs/nfsclient/nfs_clvfsops.cThu Feb 16 06:34:20 2017
(r313799)
@@ -749,8 +749,7 @@ static int
 nfs_mount_parse_from(struct vfsoptlist *opts, char **hostnamep,
 struct sockaddr_in **sinp, char *dirpath, size_t dirpathsize, int *dirlenp)
 {
-   char nam[MNAMELEN + 1];
-   char *delimp, *hostp, *spec;
+   char *nam, *delimp, *hostp, *spec;
int error, have_bracket = 0, offset, rv, speclen;
struct sockaddr_in *sin;
size_t len;
@@ -758,6 +757,7 @@ nfs_mount_parse_from(struct vfsoptlist *
error = vfs_getopt(opts, "from", (void **), );
if (error != 0)
return (error);
+   nam = malloc(MNAMELEN + 1, M_TEMP, M_WAITOK);
 
/*
 * This part comes from sbin/mount_nfs/mount_nfs.c:getnfsargs().
@@ -776,6 +776,7 @@ nfs_mount_parse_from(struct vfsoptlist *
hostp = delimp + 1;
} else {
printf("%s: no : nfs-name\n", __func__);
+   free(nam, M_TEMP);
return (EINVAL);
}
*delimp = '\0';
@@ -791,6 +792,7 @@ nfs_mount_parse_from(struct vfsoptlist *
spec[speclen - 1] = '\0';
if (strlen(hostp) + strlen(spec) + 1 > MNAMELEN) {
printf("%s: %s:%s: name too long", __func__, hostp, spec);
+   free(nam, M_TEMP);
return (EINVAL);
}
/* Make both '@' and ':' notations equal */
@@ -816,6 +818,7 @@ nfs_mount_parse_from(struct vfsoptlist *
if (rv != 1) {
printf("%s: cannot parse '%s', inet_pton() returned %d\n",
__func__, hostp, rv);
+   free(nam, M_TEMP);
free(sin, M_SONAME);
return (EINVAL);
}
@@ -832,6 +835,7 @@ nfs_mount_parse_from(struct vfsoptlist *
strlcpy(dirpath, spec, dirpathsize);
*dirlenp = strlen(dirpath);
 
+   free(nam, M_TEMP);
return (0);
 }
 
@@ -874,7 +878,7 @@ nfs_mount(struct mount *mp)
struct sockaddr *nam = NULL;
struct vnode *vp;
struct thread *td;
-   char hst[MNAMELEN];
+   char *hst;
u_char nfh[NFSX_FHMAX], krbname[100], dirpath[100], srvkrbname[100];
char *cp, *opt, *name, *secname;
int nametimeo = NFS_DEFAULT_NAMETIMEO;
@@ -886,6 +890,7 @@ nfs_mount(struct mount *mp)
 
has_nfs_args_opt = 0;
has_nfs_from_opt = 0;
+   hst = malloc(MNAMELEN, M_TEMP, M_WAITOK);
if (vfs_filteropt(mp->mnt_optnew, nfs_opts)) {
error = EINVAL;
goto out;
@@ -1324,6 +1329,7 @@ out:
mp->mnt_kern_flag |= MNTK_NULL_NOCACHE;
MNT_IUNLOCK(mp);
}
+   free(hst, M_TEMP);
return (error);
 }
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313798 - head/bin/ls

2017-02-15 Thread Konstantin Belousov
Author: kib
Date: Thu Feb 16 06:32:39 2017
New Revision: 313798
URL: https://svnweb.freebsd.org/changeset/base/313798

Log:
  Use uintmax_t to print st_nlink.
  
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/bin/ls/print.c

Modified: head/bin/ls/print.c
==
--- head/bin/ls/print.c Thu Feb 16 06:31:36 2017(r313797)
+++ head/bin/ls/print.c Thu Feb 16 06:32:39 2017(r313798)
@@ -259,12 +259,12 @@ printlong(const DISPLAY *dp)
np = p->fts_pointer;
xo_attr("value", "%03o", (int) sp->st_mode & ALLPERMS);
if (f_numericonly) {
-   xo_emit("{t:mode/%s}{e:mode_octal/%03o} {t:links/%*u} 
{td:user/%-*s}{e:user/%ju}  {td:group/%-*s}{e:group/%ju}  ",
-   buf, (int) sp->st_mode & ALLPERMS, dp->s_nlink, 
sp->st_nlink,
+   xo_emit("{t:mode/%s}{e:mode_octal/%03o} {t:links/%*ju} 
{td:user/%-*s}{e:user/%ju}  {td:group/%-*s}{e:group/%ju}  ",
+   buf, (int) sp->st_mode & ALLPERMS, dp->s_nlink, 
(uintmax_t)sp->st_nlink,
dp->s_user, np->user, (uintmax_t)sp->st_uid, 
dp->s_group, np->group, (uintmax_t)sp->st_gid);
} else {
-   xo_emit("{t:mode/%s}{e:mode_octal/%03o} {t:links/%*u} 
{t:user/%-*s}  {t:group/%-*s}  ",
-   buf, (int) sp->st_mode & ALLPERMS, dp->s_nlink, 
sp->st_nlink,
+   xo_emit("{t:mode/%s}{e:mode_octal/%03o} {t:links/%*ju} 
{t:user/%-*s}  {t:group/%-*s}  ",
+   buf, (int) sp->st_mode & ALLPERMS, dp->s_nlink, 
(uintmax_t)sp->st_nlink,
dp->s_user, np->user, dp->s_group, np->group);
}
if (S_ISBLK(sp->st_mode))
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313797 - head/sys/fs/devfs

2017-02-15 Thread Konstantin Belousov
Author: kib
Date: Thu Feb 16 06:31:36 2017
New Revision: 313797
URL: https://svnweb.freebsd.org/changeset/base/313797

Log:
  Minor style fixes.
  
  Sponsored by: The FreeBSD Foundation
  MFC after:3 days

Modified:
  head/sys/fs/devfs/devfs_devs.c

Modified: head/sys/fs/devfs/devfs_devs.c
==
--- head/sys/fs/devfs/devfs_devs.c  Thu Feb 16 06:16:50 2017
(r313796)
+++ head/sys/fs/devfs/devfs_devs.c  Thu Feb 16 06:31:36 2017
(r313797)
@@ -208,7 +208,7 @@ devfs_newdirent(char *name, int namelen)
struct dirent d;
 
d.d_namlen = namelen;
-   i = sizeof (*de) + GENERIC_DIRSIZ(); 
+   i = sizeof(*de) + GENERIC_DIRSIZ();
de = malloc(i, M_DEVFS3, M_WAITOK | M_ZERO);
de->de_dirent = (struct dirent *)(de + 1);
de->de_dirent->d_namlen = namelen;
@@ -246,7 +246,8 @@ devfs_parent_dirent(struct devfs_dirent 
 }
 
 struct devfs_dirent *
-devfs_vmkdir(struct devfs_mount *dmp, char *name, int namelen, struct 
devfs_dirent *dotdot, u_int inode)
+devfs_vmkdir(struct devfs_mount *dmp, char *name, int namelen,
+struct devfs_dirent *dotdot, u_int inode)
 {
struct devfs_dirent *dd;
struct devfs_dirent *de;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313787 - head/usr.sbin/makefs

2017-02-15 Thread Ed Maste
Author: emaste
Date: Thu Feb 16 03:12:47 2017
New Revision: 313787
URL: https://svnweb.freebsd.org/changeset/base/313787

Log:
  makefs: use a macro to simplify per-fs function declarations
  
  makefs.h 1.28
  
  Obtained from:NetBSD

Modified:
  head/usr.sbin/makefs/makefs.h

Modified: head/usr.sbin/makefs/makefs.h
==
--- head/usr.sbin/makefs/makefs.h   Thu Feb 16 01:44:56 2017
(r313786)
+++ head/usr.sbin/makefs/makefs.h   Thu Feb 16 03:12:47 2017
(r313787)
@@ -158,16 +158,14 @@ int   set_option(option_t *, const char *
 fsnode *   walk_dir(const char *, const char *, fsnode *, fsnode *);
 void   free_fsnodes(fsnode *);
 
-void   ffs_prep_opts(fsinfo_t *);
-intffs_parse_opts(const char *, fsinfo_t *);
-void   ffs_cleanup_opts(fsinfo_t *);
-void   ffs_makefs(const char *, const char *, fsnode *, fsinfo_t *);
-
-void   cd9660_prep_opts(fsinfo_t *);
-intcd9660_parse_opts(const char *, fsinfo_t *);
-void   cd9660_cleanup_opts(fsinfo_t *);
-void   cd9660_makefs(const char *, const char *, fsnode *, fsinfo_t *);
+#define DECLARE_FUN(fs)
\
+void   fs ## _prep_opts(fsinfo_t *);   \
+intfs ## _parse_opts(const char *, fsinfo_t *);\
+void   fs ## _cleanup_opts(fsinfo_t *);\
+void   fs ## _makefs(const char *, const char *, fsnode *, fsinfo_t *)
 
+DECLARE_FUN(ffs);
+DECLARE_FUN(cd9660);
 
 extern u_int   debug;
 extern int dupsok;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313785 - in head/sys/dev: acpica pci

2017-02-15 Thread Warner Losh
Author: imp
Date: Wed Feb 15 23:49:28 2017
New Revision: 313785
URL: https://svnweb.freebsd.org/changeset/base/313785

Log:
  Use symbolic constants for OSC support / control negotiations.
  
  Differential Revision: https://reviews.freebsd.org/D9604

Modified:
  head/sys/dev/acpica/acpi_pcib_acpi.c
  head/sys/dev/pci/pcireg.h

Modified: head/sys/dev/acpica/acpi_pcib_acpi.c
==
--- head/sys/dev/acpica/acpi_pcib_acpi.cWed Feb 15 23:33:14 2017
(r313784)
+++ head/sys/dev/acpica/acpi_pcib_acpi.cWed Feb 15 23:49:28 2017
(r313785)
@@ -309,15 +309,19 @@ acpi_pcib_osc(struct acpi_hpcib_softc *s
0x96, 0x57, 0x74, 0x41, 0xc0, 0x3d, 0xd7, 0x66
};
 
+   /* Status Field */
+   cap_set[PCI_OSC_STATUS] = 0;
+
/* Support Field: Extended PCI Config Space, MSI */
-   cap_set[1] = 0x11;
+   cap_set[PCI_OSC_SUPPORT] = PCIM_OSC_SUPPORT_EXT_PCI_CONF |
+   PCIM_OSC_SUPPORT_MSI;
 
/* Control Field */
-   cap_set[2] = 0;
+   cap_set[PCI_OSC_CTL] = 0;
 
 #ifdef PCI_HP
/* Control Field: PCI Express Native Hot Plug */
-   cap_set[2] |= 0x1;
+   cap_set[PCI_OSC_CTL] |= PCIM_OSC_CTL_PCIE_HP;
 #endif
 
status = acpi_EvaluateOSC(sc->ap_handle, pci_host_bridge_uuid, 1,
@@ -330,10 +334,16 @@ acpi_pcib_osc(struct acpi_hpcib_softc *s
return;
}
 
-   if (cap_set[0] != 0) {
+   if (cap_set[PCI_OSC_STATUS] != 0) {
device_printf(sc->ap_dev, "_OSC returned error %#x\n",
cap_set[0]);
}
+
+#ifdef PCI_HP
+   if ((cap_set[PCI_OSC_CTL] & PCIM_OSC_CTL_PCIE_HP) == 0 && bootverbose) {
+   device_printf(sc->ap_dev, "_OSC didn't allow HP control\n");
+   }
+#endif
 }
 
 static int

Modified: head/sys/dev/pci/pcireg.h
==
--- head/sys/dev/pci/pcireg.h   Wed Feb 15 23:33:14 2017(r313784)
+++ head/sys/dev/pci/pcireg.h   Wed Feb 15 23:49:28 2017(r313785)
@@ -1040,3 +1040,19 @@
 #definePCIR_SRIOV_BARS 0x24
 #definePCIR_SRIOV_BAR(x)   (PCIR_SRIOV_BARS + (x) * 4)
 
+/*
+ * PCI Express Firmware Interface definitions
+ */
+#definePCI_OSC_STATUS  0
+#definePCI_OSC_SUPPORT 1
+#definePCIM_OSC_SUPPORT_EXT_PCI_CONF   0x01/* Extended PCI Config 
Space */
+#definePCIM_OSC_SUPPORT_ASPM   0x02/* Active State Power 
Management */
+#definePCIM_OSC_SUPPORT_CPMC   0x04/* Clock Power 
Management Cap */
+#definePCIM_OSC_SUPPORT_SEG_GROUP  0x08/* PCI Segment Groups 
supported */
+#definePCIM_OSC_SUPPORT_MSI0x10/* MSI signalling 
supported */
+#definePCI_OSC_CTL 2
+#definePCIM_OSC_CTL_PCIE_HP0x01/* PCIe Native Hot Plug 
*/
+#definePCIM_OSC_CTL_SHPC_HP0x02/* SHPC Native Hot Plug 
*/
+#definePCIM_OSC_CTL_PCIE_PME   0x04/* PCIe Native Power 
Mgt Events */
+#definePCIM_OSC_CTL_PCIE_AER   0x08/* PCIe Advanced Error 
Reporting */
+#definePCIM_OSC_CTL_PCIE_CAP_STRUCT0x10/* Various Capability 
Structures */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313784 - head/sys/sys

2017-02-15 Thread Mateusz Guzik
Author: mjg
Date: Wed Feb 15 23:33:14 2017
New Revision: 313784
URL: https://svnweb.freebsd.org/changeset/base/313784

Log:
  rwlock: tidy up r313392
  
  While a new bit was added and thread alignment got shifted to accomodate it,
  RW_READERS_SHIFT was not modified accordingly and clashed with the new flag.
  
  This was surprisingly harmless. If the lock was taken for writing, other flags
  were tested. If the lock was taken for reading, it would correctly work for
  readers > 1 and this was the only relevant test performed.

Modified:
  head/sys/sys/rwlock.h

Modified: head/sys/sys/rwlock.h
==
--- head/sys/sys/rwlock.h   Wed Feb 15 23:04:25 2017(r313783)
+++ head/sys/sys/rwlock.h   Wed Feb 15 23:33:14 2017(r313784)
@@ -65,7 +65,7 @@
 #defineRW_LOCK_WAITERS (RW_LOCK_READ_WAITERS | 
RW_LOCK_WRITE_WAITERS)
 
 #defineRW_OWNER(x) ((x) & ~RW_LOCK_FLAGMASK)
-#defineRW_READERS_SHIFT4
+#defineRW_READERS_SHIFT5
 #defineRW_READERS(x)   (RW_OWNER((x)) >> RW_READERS_SHIFT)
 #defineRW_READERS_LOCK(x)  ((x) << RW_READERS_SHIFT | RW_LOCK_READ)
 #defineRW_ONE_READER   (1 << RW_READERS_SHIFT)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r312679 - head/sys/arm/freescale/imx

2017-02-15 Thread Ian Lepore
> > Author: ian
> > Date: Tue Jan 24 02:09:30 2017
> > New Revision: 312679
> > URL: https://svnweb.freebsd.org/changeset/base/312679
[...]
On Wed, 2017-02-15 at 10:31 +, Yoshiro MIHIRA wrote:
> Hi.
> Ian
> 
> Thank you for your strong effort to support imx6 board.
> 
> I have SolidRun HummingBoard-i2(imx6dl-hummingboard).
> 
> I have reboot issue(never reset after reboot) and if I use Linux, I
> reproduce this issue So I reported this issue to SolidRun Forum.
> http://forum.solid-run.com/linux-on-cubox-i-and-hummingboard-f8/need-
> to-push-reset-button-to-reboot-linux-system-t3122.html
> But I could not get any information.
> 
> I tested latest kernel(r313280) unfortunately it was not solved.
> 
> Do you know other information about reset issue, please let me know.
> 
> Currently I need to push reset button when I restart system...
> 
> Yours
> Yoshiro MIHIRA
> 

[adding arm@ list]

Are you set up to build and test a custom kernel?  If so, try applying
the patch I'm attaching to this mail and let me know if it helps.  This
turns on a bit in the control register that is described in the manual
as "use a new more robust method to generate a software reset" (if it's
better, I wonder why they didn't make it the hardware default?).

-- Ian
Index: imx_machdep.c
===
--- imx_machdep.c	(revision 313569)
+++ imx_machdep.c	(working copy)
@@ -78,6 +78,7 @@ imx_wdog_cpu_reset(vm_offset_t wdcr_physaddr)
 	if ((pcr = devmap_ptov(wdcr_physaddr, sizeof(*pcr))) == NULL) {
 		printf("cpu_reset() can't find its control register... locking up now.");
 	} else {
+		*pcr |= 1 << 6;
 		*pcr &= ~WDOG_CR_SRS;
 		*pcr &= ~WDOG_CR_SRS;
 		*pcr &= ~WDOG_CR_SRS;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

svn commit: r313783 - in head: share/man/man4 share/man/man4/man4.i386 sys/conf sys/dev/aha sys/dev/buslogic sys/dev/ep sys/dev/mca sys/i386/bios sys/i386/conf sys/x86/isa sys/x86/x86 tools/kerneld...

2017-02-15 Thread Warner Losh
Author: imp
Date: Wed Feb 15 23:04:25 2017
New Revision: 313783
URL: https://svnweb.freebsd.org/changeset/base/313783

Log:
  Remove Micro Channel Architecture support. Of the commonly available
  machines, only a few 486 machines that used it, and those haven't had
  enough memory to run FreeBSD for quite some time (often limited to
  16MB).
  
  Not to be confused with the Machine Check Architecture, which is still
  very much alive and used (and untouched by this commit).
  
  No Objection From: arch@

Deleted:
  head/sys/dev/aha/aha_mca.c
  head/sys/dev/buslogic/bt_mca.c
  head/sys/dev/ep/if_ep_mca.c
  head/sys/dev/mca/
  head/sys/i386/bios/mca_machdep.c
  head/sys/i386/bios/mca_machdep.h
  head/tools/kerneldoc/subsys/Doxyfile-dev_mca
Modified:
  head/share/man/man4/aha.4
  head/share/man/man4/le.4
  head/share/man/man4/man4.i386/ep.4
  head/sys/conf/files
  head/sys/conf/files.i386
  head/sys/conf/options
  head/sys/i386/conf/NOTES
  head/sys/x86/isa/atpic.c
  head/sys/x86/isa/clock.c
  head/sys/x86/isa/nmi.c
  head/sys/x86/x86/legacy.c

Modified: head/share/man/man4/aha.4
==
--- head/share/man/man4/aha.4   Wed Feb 15 20:17:55 2017(r313782)
+++ head/share/man/man4/aha.4   Wed Feb 15 23:04:25 2017(r313783)
@@ -74,10 +74,6 @@ locations and attaches to the first unat
 The possible
 port addresses for this card are 0x330, 0x334, 0x230, 0x234, 0x130, and
 0x134.
-.Pp
-The AHA-1640 is an MCA bus card.
-Since the MCA bus is a self-identifying bus, no setting of hints is
-required.
 .Sh HARDWARE
 The
 .Nm

Modified: head/share/man/man4/le.4
==
--- head/share/man/man4/le.4Wed Feb 15 20:17:55 2017(r313782)
+++ head/share/man/man4/le.4Wed Feb 15 23:04:25 2017(r313783)
@@ -204,19 +204,6 @@ bus Ethernet adapters.
 .\" .It
 .\" .Tn DEC DE422
 .\" .El
-.\" .Ss MCA
-.\" The
-.\" .Tn MCA
-.\" bus Ethernet cards supported by the
-.\" .Nm
-.\" driver are:
-.\" .Pp
-.\" .Bl -bullet -compact
-.\" .It
-.\" .Tn SKNET Personal MC2
-.\" .It
-.\" .Tn SKNET MC2+
-.\" .El
 .Ss PCI
 The
 .Tn PCI

Modified: head/share/man/man4/man4.i386/ep.4
==
--- head/share/man/man4/man4.i386/ep.4  Wed Feb 15 20:17:55 2017
(r313782)
+++ head/share/man/man4/man4.i386/ep.4  Wed Feb 15 23:04:25 2017
(r313783)
@@ -95,8 +95,6 @@ driver supports Ethernet adapters based 
 .It
 3Com 3C509B-TP, 3C509B-BNC, 3C509B-Combo, 3C509B-TPO, 3C509B-TPC ISA
 .It
-3Com 3C529, 3C529-TP MCA
-.It
 3Com 3C562/3C563 PCMCIA
 .It
 3Com 3C574, 3C574TX, 3C574-TX, 3CCFE574BT, 3CXFE574BT, 3C3FE574BT PCMCIA

Modified: head/sys/conf/files
==
--- head/sys/conf/files Wed Feb 15 20:17:55 2017(r313782)
+++ head/sys/conf/files Wed Feb 15 23:04:25 2017(r313783)
@@ -694,7 +694,6 @@ dev/agp/agp.c   optional agp pci
 dev/agp/agp_if.m   optional agp pci
 dev/aha/aha.c  optional aha
 dev/aha/aha_isa.c  optional aha isa
-dev/aha/aha_mca.c  optional aha mca
 dev/ahb/ahb.c  optional ahb eisa
 dev/ahci/ahci.coptional ahci
 dev/ahci/ahciem.c  optional ahci
@@ -1265,7 +1264,6 @@ dev/bnxt/if_bnxt.coptional bnxt iflib 
 dev/buslogic/bt.c  optional bt
 dev/buslogic/bt_eisa.c optional bt eisa
 dev/buslogic/bt_isa.c  optional bt isa
-dev/buslogic/bt_mca.c  optional bt mca
 dev/buslogic/bt_pci.c  optional bt pci
 dev/bwi/bwimac.c   optional bwi
 dev/bwi/bwiphy.c   optional bwi
@@ -1609,7 +1607,6 @@ dev/en/midway.c   optional en
 dev/ep/if_ep.c optional ep
 dev/ep/if_ep_eisa.coptional ep eisa
 dev/ep/if_ep_isa.c optional ep isa
-dev/ep/if_ep_mca.c optional ep mca
 dev/ep/if_ep_pccard.c  optional ep pccard
 dev/esp/esp_pci.c  optional esp pci
 dev/esp/ncr53c9x.c optional esp
@@ -2176,7 +2173,6 @@ dev/malo/if_malo.coptional malo
 dev/malo/if_malohal.c  optional malo
 dev/malo/if_malo_pci.c optional malo pci
 dev/mc146818/mc146818.coptional mc146818
-dev/mca/mca_bus.c  optional mca
 dev/md/md.coptional md
 dev/mdio/mdio_if.m optional miiproxy | mdio
 dev/mdio/mdio.coptional miiproxy | mdio

Modified: head/sys/conf/files.i386
==
--- head/sys/conf/files.i386Wed Feb 15 20:17:55 2017(r313782)
+++ head/sys/conf/files.i386Wed Feb 15 23:04:25 2017(r313783)
@@ -474,7 +474,6 @@ acpi_wakedata.h optional acpi 

Re: svn commit: r313772 - head/sys/arm64/arm64

2017-02-15 Thread Mark Millard
On 2017-Feb-15, at 1:39 PM, Oliver Pinter  wrote:

> On 2/15/17, Mark Millard  wrote:
>>> Author: andrew
>>> Date: Wed Feb 15 14:56:47 2017
>>> New Revision: 313772
>>> URL:
>>> https://svnweb.freebsd.org/changeset/base/313772
>>> 
>>> Log:
>>>  Load the new sp_el0 with interrupts disabled in fork_trampoline. If an
>>>  interrupt arrives in fork_trampoline after sp_el0 was written we may
>>> then
>>>  switch to a new thread, enter userland so change this stack pointer,
>>> then
>>>  return to this code with the wrong value. This fixes this case by
>>> moving
>>>  the load of sp_el0 until after interrupts have been disabled.
>> 
>> https://svnweb.freebsd.org/base/stable/11/sys/arm64/arm64/swtch.S?revision=302408=markup
>> 
>> shows stable/11 has the same issue.
>> 
>> Is this to be MFC'd at some point?
>> 
>> 
>> stable/10 seems to have a different code structure:
>> 
>> https://svnweb.freebsd.org/base/stable/10/sys/amd64/amd64/
> 
> This is x86-64 aka amd64 in FreeBSD, in 10-STABLE only 32 bit ARM
> support exists, so there isn't arm64.

Clearly I was somewhat distracted and careless when I looked at
stable/10. Sorry for the noise in that part.

Still the stable/11 part does apply: at least I got something
right.

>> 
>> . . .

===
Mark Millard
markmi at dsl-only.net

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r313772 - head/sys/arm64/arm64

2017-02-15 Thread Oliver Pinter
On 2/15/17, Mark Millard  wrote:
>> Author: andrew
>> Date: Wed Feb 15 14:56:47 2017
>> New Revision: 313772
>> URL:
>> https://svnweb.freebsd.org/changeset/base/313772
>>
>> Log:
>>   Load the new sp_el0 with interrupts disabled in fork_trampoline. If an
>>   interrupt arrives in fork_trampoline after sp_el0 was written we may
>> then
>>   switch to a new thread, enter userland so change this stack pointer,
>> then
>>   return to this code with the wrong value. This fixes this case by
>> moving
>>   the load of sp_el0 until after interrupts have been disabled.
>
> https://svnweb.freebsd.org/base/stable/11/sys/arm64/arm64/swtch.S?revision=302408=markup
>
> shows stable/11 has the same issue.
>
> Is this to be MFC'd at some point?
>
>
> stable/10 seems to have a different code structure:
>
> https://svnweb.freebsd.org/base/stable/10/sys/amd64/amd64/

This is x86-64 aka amd64 in FreeBSD, in 10-STABLE only 32 bit ARM
support exists, so there isn't arm64.

>
> does not list swtch.S . So I'm unsure about its status for
> fork returning to the child process and its handling of the
> stack pointer to be restored.
>
> ===
> Mark Millard
> markmi at dsl-only.net
>
> ___
> svn-src-head@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r313772 - head/sys/arm64/arm64

2017-02-15 Thread Mark Millard
> Author: andrew
> Date: Wed Feb 15 14:56:47 2017
> New Revision: 313772
> URL: 
> https://svnweb.freebsd.org/changeset/base/313772
> 
> Log:
>   Load the new sp_el0 with interrupts disabled in fork_trampoline. If an
>   interrupt arrives in fork_trampoline after sp_el0 was written we may then
>   switch to a new thread, enter userland so change this stack pointer, then
>   return to this code with the wrong value. This fixes this case by moving
>   the load of sp_el0 until after interrupts have been disabled.

https://svnweb.freebsd.org/base/stable/11/sys/arm64/arm64/swtch.S?revision=302408=markup

shows stable/11 has the same issue.

Is this to be MFC'd at some point?


stable/10 seems to have a different code structure:

https://svnweb.freebsd.org/base/stable/10/sys/amd64/amd64/

does not list swtch.S . So I'm unsure about its status for
fork returning to the child process and its handling of the
stack pointer to be restored.

===
Mark Millard
markmi at dsl-only.net

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r311849 - in head: . sys/amd64/conf sys/arm64/conf sys/conf sys/dev/e1000 sys/i386/conf sys/mips/conf sys/modules sys/modules/em sys/modules/igb sys/powerpc/conf

2017-02-15 Thread Mark Millard
> Author: sbruno
> Date: Tue Jan 10 03:23:22 2017
> New Revision: 311849
> URL: https://svnweb.freebsd.org/changeset/base/311849
> 
> Log:
>   Migrate e1000 to the IFLIB framework:
>   . . .
>   - create a symbolic link in /boot/kernel from if_em.ko to if_igb.ko

If one used DESTDIR= pointing to a local directory for a cross
built installkernel for later copying to the system(s) that will
use the kernel one gets such things as:

# ls -l /usr/obj/DESTDIRs/clang-pine64-installkernel/boot/kernel/if_igb.ko 
lrwxr-xr-x  1 root  wheel  65 Feb 14 09:25 
/usr/obj/DESTDIRs/clang-pine64-installkernel/boot/kernel/if_igb.ko -> 
/usr/obj/DESTDIRs/clang-pine64-installkernel/boot/kernel/if_em.ko

But the target place(s) to later copy to is(are) unlikely to
have such a path.

Relative paths, hard links, or independent copies could avoid
such things.

===
Mark Millard
markmi at dsl-only.net

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313782 - in head/contrib/libarchive/libarchive: . test

2017-02-15 Thread Martin Matuska
Author: mm
Date: Wed Feb 15 20:17:55 2017
New Revision: 313782
URL: https://svnweb.freebsd.org/changeset/base/313782

Log:
  MFV r313781:
  Sync libarchive with vendor
  
  Vendor changes:
  Make SCHILY.acl.ace header more compact (NFSv4 ACLs)
  
  Vendor bugfixes:
  zip reader integer parsing fix (OSS-Fuzz 556)
  spelling fixes (issue #863)

Modified:
  head/contrib/libarchive/libarchive/archive_acl.c
  head/contrib/libarchive/libarchive/archive_entry.h
  head/contrib/libarchive/libarchive/archive_entry_acl.3
  head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c
  head/contrib/libarchive/libarchive/archive_read_support_format_zip.c
  head/contrib/libarchive/libarchive/archive_write_disk_acl.c
  head/contrib/libarchive/libarchive/archive_write_set_format_pax.c
  head/contrib/libarchive/libarchive/test/test_acl_pax_nfs4.tar.uu
  head/contrib/libarchive/libarchive/test/test_acl_platform_posix1e.c
  head/contrib/libarchive/libarchive/test/test_acl_text.c
Directory Properties:
  head/contrib/libarchive/   (props changed)

Modified: head/contrib/libarchive/libarchive/archive_acl.c
==
--- head/contrib/libarchive/libarchive/archive_acl.cWed Feb 15 20:00:36 
2017(r313781)
+++ head/contrib/libarchive/libarchive/archive_acl.cWed Feb 15 20:17:55 
2017(r313782)
@@ -83,6 +83,50 @@ static void  append_entry(char **p, const
int tag, int flags, const char *name, int perm, int id);
 static voidappend_id(char **p, int id);
 
+static const struct {
+   const int perm;
+   const char c;
+   const wchar_t wc;
+} nfsv4_acl_perm_map[] = {
+   { ARCHIVE_ENTRY_ACL_READ_DATA | ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, 'r',
+   L'r' },
+   { ARCHIVE_ENTRY_ACL_WRITE_DATA | ARCHIVE_ENTRY_ACL_ADD_FILE, 'w',
+   L'w' },
+   { ARCHIVE_ENTRY_ACL_EXECUTE, 'x', L'x' },
+   { ARCHIVE_ENTRY_ACL_APPEND_DATA | ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY,
+   'p', L'p' },
+   { ARCHIVE_ENTRY_ACL_DELETE, 'd', L'd' },
+   { ARCHIVE_ENTRY_ACL_DELETE_CHILD, 'D', L'D' },
+   { ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES, 'a', L'a' },
+   { ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES, 'A', L'A' },
+   { ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS, 'R', L'R' },
+   { ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS, 'W', L'W' },
+   { ARCHIVE_ENTRY_ACL_READ_ACL, 'c', L'c' },
+   { ARCHIVE_ENTRY_ACL_WRITE_ACL, 'C', L'C' },
+   { ARCHIVE_ENTRY_ACL_WRITE_OWNER, 'o', L'o' },
+   { ARCHIVE_ENTRY_ACL_SYNCHRONIZE, 's', L's' }
+};
+
+static const int nfsv4_acl_perm_map_size = (int)(sizeof(nfsv4_acl_perm_map) /
+sizeof(nfsv4_acl_perm_map[0]));
+
+static const struct {
+   const int perm;
+   const char c;
+   const wchar_t wc;
+} nfsv4_acl_flag_map[] = {
+   { ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, 'f', L'f' },
+   { ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, 'd', L'd' },
+   { ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, 'i', L'i' },
+   { ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, 'n', L'n' },
+   { ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS, 'S', L'S' },
+   { ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS, 'F', L'F' },
+   { ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, 'I', L'I' }
+};
+
+static const int nfsv4_acl_flag_map_size = (int)(sizeof(nfsv4_acl_flag_map) /
+sizeof(nfsv4_acl_flag_map[0]));
+
 void
 archive_acl_clear(struct archive_acl *acl)
 {
@@ -741,6 +785,8 @@ static void
 append_entry_w(wchar_t **wp, const wchar_t *prefix, int type,
 int tag, int flags, const wchar_t *wname, int perm, int id)
 {
+   int i;
+
if (prefix != NULL) {
wcscpy(*wp, prefix);
*wp += wcslen(*wp);
@@ -810,46 +856,20 @@ append_entry_w(wchar_t **wp, const wchar
*(*wp)++ = (perm & 0222) ? L'w' : L'-';
*(*wp)++ = (perm & 0111) ? L'x' : L'-';
} else {
-   /* NFS4 ACL perms */
-   *(*wp)++ = (perm & (ARCHIVE_ENTRY_ACL_READ_DATA |
-   ARCHIVE_ENTRY_ACL_LIST_DIRECTORY)) ? L'r' : L'-';
-   *(*wp)++ = (perm & (ARCHIVE_ENTRY_ACL_WRITE_DATA |
-   ARCHIVE_ENTRY_ACL_ADD_FILE)) ? L'w' : L'-';
-   *(*wp)++ = (perm & ARCHIVE_ENTRY_ACL_EXECUTE) ? L'x' : L'-';
-   *(*wp)++ = (perm & (ARCHIVE_ENTRY_ACL_APPEND_DATA |
-   ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY)) ? L'p' : L'-';
-   *(*wp)++ = (perm & ARCHIVE_ENTRY_ACL_DELETE) ? L'd' : L'-';
-   *(*wp)++ = (perm &
-   ARCHIVE_ENTRY_ACL_DELETE_CHILD) ? L'D' : L'-';
-   *(*wp)++ = (perm &
-   ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES) ? L'a' : L'-';
-   *(*wp)++ = (perm &
-   ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES) ? L'A' : L'-';
-   *(*wp)++ = (perm &
-   ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS) ? L'R' : L'-';
-   *(*wp)++ = (perm &
- 

svn commit: r313780 - in head: lib/libstand sbin/dump sbin/ffsinfo sbin/fsck_ffs sbin/fsdb sbin/fsirand sbin/growfs sbin/newfs sbin/newfs_nandfs sbin/quotacheck sbin/restore sbin/tunefs sys/boot/co...

2017-02-15 Thread Ed Maste
Author: emaste
Date: Wed Feb 15 19:50:26 2017
New Revision: 313780
URL: https://svnweb.freebsd.org/changeset/base/313780

Log:
  prefix UFS symbols with UFS_ to reduce namespace pollution
  
  Specifically:
ROOTINO -> UFS_ROOTINO
WINO -> UFS_WINO
NXADDR -> UFS_NXADDR
NDADDR -> UFS_NDADDR
NIADDR -> UFS_NIADDR
MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)
  
  Also prefix ext2's and nandfs's NDADDR and NIADDR with EXT2_ and NANDFS_
  
  Reviewed by:  kib, mckusick
  Obtained from:NetBSD
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D9536

Modified:
  head/lib/libstand/ext2fs.c
  head/lib/libstand/nandfs.c
  head/lib/libstand/ufs.c
  head/sbin/dump/traverse.c
  head/sbin/ffsinfo/ffsinfo.c
  head/sbin/fsck_ffs/dir.c
  head/sbin/fsck_ffs/fsutil.c
  head/sbin/fsck_ffs/gjournal.c
  head/sbin/fsck_ffs/inode.c
  head/sbin/fsck_ffs/main.c
  head/sbin/fsck_ffs/pass1.c
  head/sbin/fsck_ffs/pass1b.c
  head/sbin/fsck_ffs/pass2.c
  head/sbin/fsck_ffs/pass3.c
  head/sbin/fsck_ffs/pass4.c
  head/sbin/fsck_ffs/pass5.c
  head/sbin/fsck_ffs/suj.c
  head/sbin/fsdb/fsdb.c
  head/sbin/fsdb/fsdbutil.c
  head/sbin/fsirand/fsirand.c
  head/sbin/growfs/debug.c
  head/sbin/growfs/growfs.c
  head/sbin/newfs/mkfs.c
  head/sbin/newfs_nandfs/newfs_nandfs.c
  head/sbin/quotacheck/quotacheck.c
  head/sbin/restore/dirs.c
  head/sbin/restore/interactive.c
  head/sbin/restore/main.c
  head/sbin/restore/restore.c
  head/sbin/restore/symtab.c
  head/sbin/restore/tape.c
  head/sbin/restore/utilities.c
  head/sbin/tunefs/tunefs.c
  head/sys/boot/common/ufsread.c
  head/sys/fs/ext2fs/ext2_alloc.c
  head/sys/fs/ext2fs/ext2_balloc.c
  head/sys/fs/ext2fs/ext2_bmap.c
  head/sys/fs/ext2fs/ext2_inode.c
  head/sys/fs/ext2fs/ext2_inode_cnv.c
  head/sys/fs/ext2fs/inode.h
  head/sys/fs/nandfs/bmap.c
  head/sys/fs/nandfs/nandfs_fs.h
  head/sys/fs/nfsclient/nfs_clvfsops.c
  head/sys/ufs/ffs/ffs_alloc.c
  head/sys/ufs/ffs/ffs_balloc.c
  head/sys/ufs/ffs/ffs_inode.c
  head/sys/ufs/ffs/ffs_snapshot.c
  head/sys/ufs/ffs/ffs_softdep.c
  head/sys/ufs/ffs/ffs_vfsops.c
  head/sys/ufs/ffs/ffs_vnops.c
  head/sys/ufs/ffs/fs.h
  head/sys/ufs/ufs/dinode.h
  head/sys/ufs/ufs/ufs_bmap.c
  head/sys/ufs/ufs/ufs_lookup.c
  head/sys/ufs/ufs/ufs_vfsops.c
  head/sys/ufs/ufs/ufs_vnops.c
  head/usr.sbin/makefs/ffs.c
  head/usr.sbin/makefs/ffs/ffs_alloc.c
  head/usr.sbin/makefs/ffs/ffs_balloc.c
  head/usr.sbin/makefs/ffs/mkfs.c
  head/usr.sbin/makefs/ffs/ufs_bmap.c
  head/usr.sbin/makefs/makefs.h
  head/usr.sbin/quot/quot.c

Modified: head/lib/libstand/ext2fs.c
==
--- head/lib/libstand/ext2fs.c  Wed Feb 15 19:46:00 2017(r313779)
+++ head/lib/libstand/ext2fs.c  Wed Feb 15 19:50:26 2017(r313780)
@@ -130,8 +130,8 @@ struct fs_ops ext2fs_fsops = {
 #define EXT2_MINBSHIFT 10  /* mininum block shift */
 #define EXT2_MINFSHIFT 10  /* mininum frag shift */
 
-#define NDADDR 12  /* # of direct blocks */
-#define NIADDR 3   /* # of indirect blocks */
+#define EXT2_NDADDR12  /* # of direct blocks */
+#define EXT2_NIADDR3   /* # of indirect blocks */
 
 /*
  * file system block to disk address
@@ -162,7 +162,7 @@ struct fs_ops ext2fs_fsops = {
 #define fragroundup(fs, size)  /* roundup(size, fsize) */ \
(((size) + (fs)->fs_fmask) & ~(fs)->fs_fmask)
 #define dblksize(fs, dip, lbn) \
-   (((lbn) >= NDADDR || (dip)->di_size >= smalllblktosize(fs, (lbn) + 1)) \
+   (((lbn) >= EXT2_NDADDR || (dip)->di_size >= smalllblktosize(fs, (lbn) + 
1)) \
? (fs)->fs_bsize \
: (fragroundup(fs, blkoff(fs, (dip)->di_size
 
@@ -275,8 +275,8 @@ struct ext2dinode {
 
u_int32_t   di_osdep1;  /* os dependent stuff */
 
-   u_int32_t   di_db[NDADDR];  /* direct blocks */
-   u_int32_t   di_ib[NIADDR];  /* indirect blocks */
+   u_int32_t   di_db[EXT2_NDADDR]; /* direct blocks */
+   u_int32_t   di_ib[EXT2_NIADDR]; /* indirect blocks */
u_int32_t   di_version; /* version */
u_int32_t   di_facl;/* file acl */
u_int32_t   di_dacl;/* dir acl */
@@ -305,12 +305,12 @@ struct file {
struct  ext2fs *f_fs;   /* pointer to super-block */
struct  ext2blkgrp *f_bg;   /* pointer to blkgrp map */
struct  ext2dinode f_di;/* copy of on-disk inode */
-   int f_nindir[NIADDR];   /* number of blocks mapped by
+   int f_nindir[EXT2_NIADDR];  /* number of blocks mapped by
   indirect block at level i */
-   char*f_blk[NIADDR]; /* buffer for indirect block
+   char

svn commit: r313779 - head/sys/dev/iscsi

2017-02-15 Thread Alexander Motin
Author: mav
Date: Wed Feb 15 19:46:00 2017
New Revision: 313779
URL: https://svnweb.freebsd.org/changeset/base/313779

Log:
  Fix handling of negative sbspace() return values.
  
  I found that at least with Chelsio NICs TOE sockets quite often report
  negative sbspace() values.  Using unsigned variable to store it resulted
  in attempts to aggregate too much data in one sosend() call, that caused
  errors and following connection termination.
  
  MFC after:2 weeks

Modified:
  head/sys/dev/iscsi/icl_soft.c

Modified: head/sys/dev/iscsi/icl_soft.c
==
--- head/sys/dev/iscsi/icl_soft.c   Wed Feb 15 18:31:09 2017
(r313778)
+++ head/sys/dev/iscsi/icl_soft.c   Wed Feb 15 19:46:00 2017
(r313779)
@@ -892,7 +892,7 @@ icl_conn_send_pdus(struct icl_conn *ic, 
 {
struct icl_pdu *request, *request2;
struct socket *so;
-   size_t available, size, size2;
+   long available, size, size2;
int coalesced, error;
 
ICL_CONN_LOCK_ASSERT_NOT(ic);
@@ -931,7 +931,7 @@ icl_conn_send_pdus(struct icl_conn *ic, 
if (available < size) {
 #if 1
ICL_DEBUG("no space to send; "
-   "have %zd, need %zd",
+   "have %ld, need %ld",
available, size);
 #endif
so->so_snd.sb_lowat = size;
@@ -978,7 +978,7 @@ icl_conn_send_pdus(struct icl_conn *ic, 
}
 #if 0
if (coalesced > 1) {
-   ICL_DEBUG("coalesced %d PDUs into %zd bytes",
+   ICL_DEBUG("coalesced %d PDUs into %ld bytes",
coalesced, size);
}
 #endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r313330 - in head: contrib/netcat lib/libipsec sbin/ifconfig sbin/setkey share/man/man4 sys/conf sys/modules sys/modules/ipsec sys/modules/tcp/tcpmd5 sys/net sys/netinet sys/netinet/tc

2017-02-15 Thread Ed Maste
On 6 February 2017 at 03:49, Andrey V. Elsukov  wrote:
> Author: ae
> Date: Mon Feb  6 08:49:57 2017
> New Revision: 313330
> URL: https://svnweb.freebsd.org/changeset/base/313330
>
> Log:
>   Merge projects/ipsec into head/.

In tinderbox powerpc LINT kernel build is failing like so:

cc1: warnings being treated as errors
/scratch/tmp/emaste/freebsd/sys/netipsec/subr_ipsec.c:135: warning:
'ipsec_kmod_enter' defined but not used
/scratch/tmp/emaste/freebsd/sys/netipsec/subr_ipsec.c:149: warning:
'ipsec_kmod_exit' defined but not used
/scratch/tmp/emaste/freebsd/sys/netipsec/subr_ipsec.c:160: warning:
'ipsec_kmod_drain' defined but not used
*** [subr_ipsec.o] Error code 1
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313778 - head/sys/dev/mlx4/mlx4_ib

2017-02-15 Thread Hans Petter Selasky
Author: hselasky
Date: Wed Feb 15 18:31:09 2017
New Revision: 313778
URL: https://svnweb.freebsd.org/changeset/base/313778

Log:
  Improve code readability and fix compilation error when using clang 4.x.
  
  Found by: emaste @
  MFC after:1 week
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/dev/mlx4/mlx4_ib/mlx4_ib_mad.c

Modified: head/sys/dev/mlx4/mlx4_ib/mlx4_ib_mad.c
==
--- head/sys/dev/mlx4/mlx4_ib/mlx4_ib_mad.c Wed Feb 15 17:33:03 2017
(r313777)
+++ head/sys/dev/mlx4/mlx4_ib/mlx4_ib_mad.c Wed Feb 15 18:31:09 2017
(r313778)
@@ -614,7 +614,7 @@ static int mlx4_ib_demux_mad(struct ib_d
is_eth = 1;
 
if (is_eth) {
-   if (!wc->wc_flags & IB_WC_GRH) {
+   if (!(wc->wc_flags & IB_WC_GRH)) {
mlx4_ib_warn(ibdev, "RoCE grh not present.\n");
return -EINVAL;
}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313777 - head/sys/dev/vt

2017-02-15 Thread Ravi Pokala
Author: rpokala
Date: Wed Feb 15 17:33:03 2017
New Revision: 313777
URL: https://svnweb.freebsd.org/changeset/base/313777

Log:
  Un-break vt(4) for {powerpc,powerpc64,sparc64} LINT kernel builds
  
  The {powerpc,powerpc64,sparc64} LINT kernel builds fail with this error:
  
  sys/dev/vt/vt_buf.c:198: warning: 'vtbuf_htw' defined but not used
  
  Move vtbuf_htw() inside the '#if SC_NO_CUTPASTE' block where it belongs, and
  put it in the proper order.
  
  This fixes the immedate issue w/ vt(4), but all three then fail on different
  issues.
  
  Reviewed by:  emaste

Modified:
  head/sys/dev/vt/vt_buf.c

Modified: head/sys/dev/vt/vt_buf.c
==
--- head/sys/dev/vt/vt_buf.cWed Feb 15 16:55:24 2017(r313776)
+++ head/sys/dev/vt/vt_buf.cWed Feb 15 17:33:03 2017(r313777)
@@ -55,10 +55,10 @@ static MALLOC_DEFINE(M_VTBUF, "vtbuf", "
 } while (0)
 
 #ifndef SC_NO_CUTPASTE
+static int vtbuf_htw(const struct vt_buf *vb, int row);
 static int vtbuf_wth(const struct vt_buf *vb, int row);
 static int vtbuf_in_this_range(int begin, int test, int end, int sz);
 #endif
-static int vtbuf_htw(const struct vt_buf *vb, int row);
 
 /*
  * line4
@@ -161,6 +161,21 @@ vthistory_getpos(const struct vt_buf *vb
 }
 
 #ifndef SC_NO_CUTPASTE /* Only mouse support use it now. */
+/* Translate history row to current view row number. */
+static int
+vtbuf_htw(const struct vt_buf *vb, int row)
+{
+
+   /*
+* total 1000 rows.
+* History offset   roffset winrow
+*  205 200 ((205 - 200 + 1000) % 1000) = 5
+*  90  990 ((90 - 990 + 1000) % 1000) = 100
+*/
+   return ((row - vb->vb_roffset + vb->vb_history_size) %
+   vb->vb_history_size);
+}
+
 /* Translate current view row number to history row. */
 static int
 vtbuf_wth(const struct vt_buf *vb, int row)
@@ -192,21 +207,6 @@ vtbuf_in_this_range(int begin, int test,
 }
 #endif
 
-/* Translate history row to current view row number. */
-static int
-vtbuf_htw(const struct vt_buf *vb, int row)
-{
-
-   /*
-* total 1000 rows.
-* History offset   roffset winrow
-*  205 200 ((205 - 200 + 1000) % 1000) = 5
-*  90  990 ((90 - 990 + 1000) % 1000) = 100
-*/
-   return ((row - vb->vb_roffset + vb->vb_history_size) %
-   vb->vb_history_size);
-}
-
 int
 vtbuf_iscursor(const struct vt_buf *vb, int row, int col)
 {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313775 - head/sys/fs/devfs

2017-02-15 Thread Edward Tomasz Napierala
Author: trasz
Date: Wed Feb 15 16:52:21 2017
New Revision: 313775
URL: https://svnweb.freebsd.org/changeset/base/313775

Log:
  Change the "devfs_fsync: vop_stdfsync failed" from panic to a printf.
  It's not a proper fix, but should be better than what we have now.
  Since it got broken some six months ago it results in an incredibly
  annoying and trivially reproducible panic every time eg an USB disk
  gets disconnected.
  
  MFC after:2 weeks
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/fs/devfs/devfs_vnops.c

Modified: head/sys/fs/devfs/devfs_vnops.c
==
--- head/sys/fs/devfs/devfs_vnops.c Wed Feb 15 15:32:29 2017
(r313774)
+++ head/sys/fs/devfs/devfs_vnops.c Wed Feb 15 16:52:21 2017
(r313775)
@@ -693,7 +693,7 @@ devfs_fsync(struct vop_fsync_args *ap)
 
error = vop_stdfsync(ap);
if (bo->bo_dirty.bv_cnt != 0 || error != 0)
-   panic("devfs_fsync: vop_stdfsync failed.");
+   printf("devfs_fsync: vop_stdfsync failed.");
}
 
return (0);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r313771 - head/sys/dev/bxe

2017-02-15 Thread Roger Pau Monné
On Wed, Feb 15, 2017 at 02:34:40PM +, Roger Pau Monné wrote:
> Author: royger
> Date: Wed Feb 15 14:34:40 2017
> New Revision: 313771
> URL: https://svnweb.freebsd.org/changeset/base/313771
> 
> Log:
>   bxe: enable usage with NetXtreme II BCM57840 2x20GbE chip

FWIW, I see the following message at boot:

bxe0:  mem 0x9380-0x93ff,0x9300-0x937f,0x9500-0x9500 irq 16 
> at device 0.0 numa-domain 0 on pci5
bxe0: PCI BAR0 [10] memory allocated: 0x9380-0x93ff (8388608) -> 
0xf8009380
bxe0: PCI BAR2 [18] memory allocated: 0x9300-0x937f (8388608) -> 
0xf8009300
bxe0: PCI BAR4 [20] memory allocated: 0x9500-0x9500 (65536) -> 
0xf8009500
bxe0: ERROR: Invalid config for Switch Dependent mode
bxe0: Found 10GBase-CX4 media.
bxe0: Using defaults for TSO: 65518/35/2048
bxe0: bpf attached
bxe0: Ethernet address: 5c:b9:01:da:XX:XX
bxe0: attempting to allocate 5 MSI-X vectors (32 supported)
msi: routing MSI-X IRQ 264 to local APIC 34 vector 48
msi: routing MSI-X IRQ 265 to local APIC 36 vector 48
msi: routing MSI-X IRQ 266 to local APIC 38 vector 48
msi: routing MSI-X IRQ 267 to local APIC 40 vector 48
msi: routing MSI-X IRQ 268 to local APIC 48 vector 48
bxe0: using IRQs 264-268 for MSI-X
bxe0: MSI-X vectors Requested 5 and Allocated 5
random: harvesting attach, 8 bytes (4 bits) from bxe0
bxe1:  mem 0x9480-0x94ff,0x9400-0x947f,0x9501-0x9501 irq 17 
> at device 0.1 numa-domain 0 on pci5
bxe1: PCI BAR0 [10] memory allocated: 0x9480-0x94ff (8388608) -> 
0xf8009480
bxe1: PCI BAR2 [18] memory allocated: 0x9400-0x947f (8388608) -> 
0xf8009400
bxe1: PCI BAR4 [20] memory allocated: 0x9501-0x9501 (65536) -> 
0xf8009501
bxe1: ERROR: Invalid config for Switch Dependent mode
bxe1: Found 10GBase-CX4 media.
bxe1: Using defaults for TSO: 65518/35/2048
bxe1: bpf attached
bxe1: Ethernet address: 5c:b9:01:da:XX:XX
bxe1: attempting to allocate 5 MSI-X vectors (32 supported)
msi: routing MSI-X IRQ 269 to local APIC 50 vector 48
msi: routing MSI-X IRQ 270 to local APIC 52 vector 48
msi: routing MSI-X IRQ 271 to local APIC 54 vector 48
msi: routing MSI-X IRQ 272 to local APIC 56 vector 48
msi: routing MSI-X IRQ 273 to local APIC 0 vector 58
bxe1: using IRQs 269-273 for MSI-X
bxe1: MSI-X vectors Requested 5 and Allocated 5

But the card seems to be working fine AFAIK (I'm not able to do any kind of
benchmarking anyway). Adding the Broadcom guys in case they can provide some
input on this error message.

Thansk, Roger.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r313547 - head/sys/dev/vt

2017-02-15 Thread Ed Maste
On 10 February 2017 at 08:28, Aleksandr Rybalko  wrote:
> Author: ray
> Date: Fri Feb 10 13:28:30 2017
> New Revision: 313547
> URL: https://svnweb.freebsd.org/changeset/base/313547

sparc64 LINT kernel build failed with:

cc1: warnings being treated as errors
/scratch/tmp/emaste/freebsd/sys/dev/vt/vt_buf.c:198: warning:
'vtbuf_htw' defined but not used
*** [vt_buf.o] Error code 1
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r313761 - in head/lib/msun: . src

2017-02-15 Thread Ed Maste
On 15 February 2017 at 02:59, Mahdi Mokhtari  wrote:
> Author: mmokhi (ports committer)
> Date: Wed Feb 15 07:59:54 2017
> New Revision: 313761
> URL: https://svnweb.freebsd.org/changeset/base/313761
>
> Log:
>   Add casinl() cacosl() catanl() casinhl() cacoshl() catanhl() APIs to msun
>   to improve C11 conformance.

This breaks the build on at least mips:

/scratch/tmp/emaste/freebsd/lib/msun/src/catrigl.c:48:21: error:
invtrig.h: No such file or directory
/scratch/tmp/emaste/freebsd/lib/msun/src/catrigl.c:85:2: error: #error
"Unsupported long double format"
...
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313774 - head/contrib/tzcode/stdtime

2017-02-15 Thread Ed Maste
Author: emaste
Date: Wed Feb 15 15:32:29 2017
New Revision: 313774
URL: https://svnweb.freebsd.org/changeset/base/313774

Log:
  localtime: return NULL if time_t out of range of struct tm
  
  Previously we would truncate tm.tm_year for any time_t corresponding to
  a year that does not fit in int.  This issue was discovered because it
  caused the bash-static build to fail when linking with LLD.
  
  As reported by Rafael Espíndola:
  
  Configure has
  
  AC_FUNC_MKTIME
  
  which expands to a test of mktime that fails with the freebsd
  implementation. Given that, bash compiles a mktime.o file that
  defines just mktime and uses localtime. That goes in a .a file
  that is before libc.
  
  The freebsd libc defines mktime in localtime.o, which also defines
  localtime among other functions.
  
  When lld sees an undefined reference to mktime from libc, it uses
  the bash provided one and then tries to find a definition of
  localtime. It is found on libc's localtime.o, but now we have a
  duplicated error.
  
  The reason it works with bfd is that bash doesn't use mktime
  directly and the undefined reference from libc is resolved to the
  libc implementation. It would also fail to link if bash itself
  directly used mktime.
  
  The bash-static configure test verifies that, for many values of t, either
  localtime(t) returns NULL or mktime(localtime(t)) == t.  This test failed
  when localtime returned a truncated tm_year.
  
  This was fixed in tzcode in 2004 but has persisted in our tree since
  rS2708.
  
  Reported by:  Rafael Espíndola
  Reviewed by:  bapt
  MFC after:2 weeks
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D9534

Modified:
  head/contrib/tzcode/stdtime/localtime.c

Modified: head/contrib/tzcode/stdtime/localtime.c
==
--- head/contrib/tzcode/stdtime/localtime.c Wed Feb 15 15:18:43 2017
(r313773)
+++ head/contrib/tzcode/stdtime/localtime.c Wed Feb 15 15:32:29 2017
(r313774)
@@ -1453,14 +1453,13 @@ localtime(const time_t *const timep)
}
_RWLOCK_RDLOCK(_rwlock);
tzset_basic(1);
-   localsub(timep, 0L, p_tm);
+   p_tm = localsub(timep, 0L, p_tm);
_RWLOCK_UNLOCK(_rwlock);
-   return(p_tm);
} else {
tzset_basic(0);
-   localsub(timep, 0L, );
-   return();
+   p_tm = localsub(timep, 0L, );
}
+   return(p_tm);
 }
 
 /*
@@ -1472,7 +1471,7 @@ localtime_r(const time_t *const timep, s
 {
_RWLOCK_RDLOCK(_rwlock);
tzset_basic(1);
-   localsub(timep, 0L, tmp);
+   tmp = localsub(timep, 0L, tmp);
_RWLOCK_UNLOCK(_rwlock);
return tmp;
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

svn commit: r313772 - head/sys/arm64/arm64

2017-02-15 Thread Andrew Turner
Author: andrew
Date: Wed Feb 15 14:56:47 2017
New Revision: 313772
URL: https://svnweb.freebsd.org/changeset/base/313772

Log:
  Load the new sp_el0 with interrupts disabled in fork_trampoline. If an
  interrupt arrives in fork_trampoline after sp_el0 was written we may then
  switch to a new thread, enter userland so change this stack pointer, then
  return to this code with the wrong value. This fixes this case by moving
  the load of sp_el0 until after interrupts have been disabled.
  
  Reported by:  Mark Millard (mar...@dsl-only.net)
  Sponsored by: ABT Systems Ltd
  Differential Revision:https://reviews.freebsd.org/D9593

Modified:
  head/sys/arm64/arm64/swtch.S

Modified: head/sys/arm64/arm64/swtch.S
==
--- head/sys/arm64/arm64/swtch.SWed Feb 15 14:34:40 2017
(r313771)
+++ head/sys/arm64/arm64/swtch.SWed Feb 15 14:56:47 2017
(r313772)
@@ -241,11 +241,6 @@ ENTRY(fork_trampoline)
mov fp, #0  /* Stack traceback stops here. */
bl  _C_LABEL(fork_exit)
 
-   /* Restore sp and lr */
-   ldp x0, x1, [sp]
-   msr sp_el0, x0
-   mov lr, x1
-
/* Restore the registers other than x0 and x1 */
ldp x2, x3, [sp, #TF_X + 2 * 8]
ldp x4, x5, [sp, #TF_X + 4 * 8]
@@ -261,14 +256,18 @@ ENTRY(fork_trampoline)
ldp x24, x25, [sp, #TF_X + 24 * 8]
ldp x26, x27, [sp, #TF_X + 26 * 8]
ldp x28, x29, [sp, #TF_X + 28 * 8]
-   /* Skip x30 as it was restored above as lr */
 
/*
 * Disable interrupts to avoid
-* overwriting spsr_el1 by an IRQ exception.
+* overwriting spsr_el1 and sp_el0 by an IRQ exception.
 */
msr daifset, #2
 
+   /* Restore sp and lr */
+   ldp x0, x1, [sp]
+   msr sp_el0, x0
+   mov lr, x1
+
/* Restore elr and spsr */
ldp x0, x1, [sp, #16]
msr elr_el1, x0
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313771 - head/sys/dev/bxe

2017-02-15 Thread Roger Pau Monné
Author: royger
Date: Wed Feb 15 14:34:40 2017
New Revision: 313771
URL: https://svnweb.freebsd.org/changeset/base/313771

Log:
  bxe: enable usage with NetXtreme II BCM57840 2x20GbE chip
  
  Current bxe probe function won't attach to devices with the NetXtreme II
  BCM57840 2x20GbE chip, enable it by adding it's chip ID to the list of
  supported chips.
  
  Tested on:HP ProLiant WS460c Gen9
  Reviewed by:  gnn
  MFC after:1 week
  Sponsored by: Citrix Systems R
  Differential Revision:https://reviews.freebsd.org/D9609

Modified:
  head/sys/dev/bxe/bxe.c

Modified: head/sys/dev/bxe/bxe.c
==
--- head/sys/dev/bxe/bxe.c  Wed Feb 15 14:25:50 2017(r313770)
+++ head/sys/dev/bxe/bxe.c  Wed Feb 15 14:34:40 2017(r313771)
@@ -168,6 +168,12 @@ static struct bxe_device_type bxe_devs[]
 },
 {
 BRCM_VENDORID,
+CHIP_NUM_57840_2_20,
+PCI_ANY_ID, PCI_ANY_ID,
+"QLogic NetXtreme II BCM57840 2x20GbE"
+},
+{
+BRCM_VENDORID,
 CHIP_NUM_57840_MF,
 PCI_ANY_ID, PCI_ANY_ID,
 "QLogic NetXtreme II BCM57840 MF 10GbE"
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313770 - head/sys/amd64/linux

2017-02-15 Thread Edward Tomasz Napierala
Author: trasz
Date: Wed Feb 15 14:25:50 2017
New Revision: 313770
URL: https://svnweb.freebsd.org/changeset/base/313770

Log:
  Regen after r313769.
  
  MFC after:2 weeks
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/amd64/linux/linux_proto.h
  head/sys/amd64/linux/linux_systrace_args.c

Modified: head/sys/amd64/linux/linux_proto.h
==
--- head/sys/amd64/linux/linux_proto.h  Wed Feb 15 14:12:39 2017
(r313769)
+++ head/sys/amd64/linux/linux_proto.h  Wed Feb 15 14:25:50 2017
(r313770)
@@ -423,8 +423,8 @@ struct linux_times_args {
 struct linux_ptrace_args {
char req_l_[PADL_(l_long)]; l_long req; char req_r_[PADR_(l_long)];
char pid_l_[PADL_(l_long)]; l_long pid; char pid_r_[PADR_(l_long)];
-   char addr_l_[PADL_(l_long)]; l_long addr; char addr_r_[PADR_(l_long)];
-   char data_l_[PADL_(l_long)]; l_long data; char data_r_[PADR_(l_long)];
+   char addr_l_[PADL_(l_ulong)]; l_ulong addr; char 
addr_r_[PADR_(l_ulong)];
+   char data_l_[PADL_(l_ulong)]; l_ulong data; char 
data_r_[PADR_(l_ulong)];
 };
 struct linux_getuid_args {
register_t dummy;

Modified: head/sys/amd64/linux/linux_systrace_args.c
==
--- head/sys/amd64/linux/linux_systrace_args.c  Wed Feb 15 14:12:39 2017
(r313769)
+++ head/sys/amd64/linux/linux_systrace_args.c  Wed Feb 15 14:25:50 2017
(r313770)
@@ -874,8 +874,8 @@ systrace_args(int sysnum, void *params, 
struct linux_ptrace_args *p = params;
iarg[0] = p->req; /* l_long */
iarg[1] = p->pid; /* l_long */
-   iarg[2] = p->addr; /* l_long */
-   iarg[3] = p->data; /* l_long */
+   iarg[2] = p->addr; /* l_ulong */
+   iarg[3] = p->data; /* l_ulong */
*n_args = 4;
break;
}
@@ -3971,10 +3971,10 @@ systrace_entry_setargdesc(int sysnum, in
p = "l_long";
break;
case 2:
-   p = "l_long";
+   p = "l_ulong";
break;
case 3:
-   p = "l_long";
+   p = "l_ulong";
break;
default:
break;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r313768 - in head/sys: arm64/conf conf dev/axgbe

2017-02-15 Thread Andrew Turner
On Wed, 15 Feb 2017 13:56:04 + (UTC)
Andrew Turner  wrote:

> Author: andrew
> Date: Wed Feb 15 13:56:04 2017
> New Revision: 313768
> URL: https://svnweb.freebsd.org/changeset/base/313768
> 
> Log:
>   Port the Linux AMX 10G network driver to FreeBSD as axgbe. It is
> unlikely we will import a newer version of the Linux code so the
> linuxkpi was not used.

This should be "Port the Linux AMD 10G..."

Andrew
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313769 - head/sys/amd64/linux

2017-02-15 Thread Edward Tomasz Napierala
Author: trasz
Date: Wed Feb 15 14:12:39 2017
New Revision: 313769
URL: https://svnweb.freebsd.org/changeset/base/313769

Log:
  Fix definition of linux64 ptrace syscall.
  
  MFC after:2 weeks
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/amd64/linux/syscalls.master

Modified: head/sys/amd64/linux/syscalls.master
==
--- head/sys/amd64/linux/syscalls.masterWed Feb 15 13:56:04 2017
(r313768)
+++ head/sys/amd64/linux/syscalls.masterWed Feb 15 14:12:39 2017
(r313769)
@@ -219,7 +219,7 @@
 99 AUE_NULLSTD { int linux_sysinfo(struct l_sysinfo *info); }
 100AUE_NULLSTD { int linux_times(struct l_times_argv *buf); }
 101AUE_PTRACE  STD { int linux_ptrace(l_long req, l_long pid, \
-   l_long addr, l_long data); }
+   l_ulong addr, l_ulong data); }
 102AUE_GETUID  STD { int linux_getuid(void); }
 103AUE_NULLSTD { int linux_syslog(l_int type, char *buf, \
l_int len); }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313768 - in head/sys: arm64/conf conf dev/axgbe

2017-02-15 Thread Andrew Turner
Author: andrew
Date: Wed Feb 15 13:56:04 2017
New Revision: 313768
URL: https://svnweb.freebsd.org/changeset/base/313768

Log:
  Port the Linux AMX 10G network driver to FreeBSD as axgbe. It is unlikely
  we will import a newer version of the Linux code so the linuxkpi was not
  used.
  
  This is still missing 10G support, and multicast has not been tested.
  
  Reviewed by:  gnn
  Obtained from:ABT Systems Ltd
  Sponsored by: SoftIron Inc
  Differential Revision:https://reviews.freebsd.org/D8549

Added:
  head/sys/dev/axgbe/if_axgbe.c   (contents, props changed)
  head/sys/dev/axgbe/xgbe_osdep.h   (contents, props changed)
Modified:
  head/sys/arm64/conf/GENERIC
  head/sys/conf/files.arm64
  head/sys/dev/axgbe/xgbe-common.h   (contents, props changed)
  head/sys/dev/axgbe/xgbe-desc.c   (contents, props changed)
  head/sys/dev/axgbe/xgbe-dev.c   (contents, props changed)
  head/sys/dev/axgbe/xgbe-drv.c   (contents, props changed)
  head/sys/dev/axgbe/xgbe-mdio.c   (contents, props changed)
  head/sys/dev/axgbe/xgbe.h   (contents, props changed)

Modified: head/sys/arm64/conf/GENERIC
==
--- head/sys/arm64/conf/GENERIC Wed Feb 15 13:37:32 2017(r313767)
+++ head/sys/arm64/conf/GENERIC Wed Feb 15 13:56:04 2017(r313768)
@@ -119,6 +119,7 @@ options PCI_IOV # PCI SR-IOV support
 device mii
 device miibus  # MII bus support
 device awg # Allwinner EMAC Gigabit Ethernet
+device axgbe   # AMD Opteron A1100 integrated NIC
 device em  # Intel PRO/1000 Gigabit Ethernet Family
 device ix  # Intel 10Gb Ethernet Family
 device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet

Modified: head/sys/conf/files.arm64
==
--- head/sys/conf/files.arm64   Wed Feb 15 13:37:32 2017(r313767)
+++ head/sys/conf/files.arm64   Wed Feb 15 13:56:04 2017(r313768)
@@ -146,6 +146,11 @@ crypto/blowfish/bf_enc.c   optionalcrypto
 crypto/des/des_enc.c   optionalcrypto | ipsec | ipsec_support 
| netsmb
 dev/acpica/acpi_if.m   optionalacpi
 dev/ahci/ahci_generic.coptionalahci
+dev/axgbe/if_axgbe.c   optionalaxgbe
+dev/axgbe/xgbe-desc.c  optionalaxgbe
+dev/axgbe/xgbe-dev.c   optionalaxgbe
+dev/axgbe/xgbe-drv.c   optionalaxgbe
+dev/axgbe/xgbe-mdio.c  optionalaxgbe
 dev/cpufreq/cpufreq_dt.c   optionalcpufreq fdt
 dev/hwpmc/hwpmc_arm64.coptionalhwpmc
 dev/hwpmc/hwpmc_arm64_md.c optionalhwpmc

Added: head/sys/dev/axgbe/if_axgbe.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/axgbe/if_axgbe.c   Wed Feb 15 13:56:04 2017
(r313768)
@@ -0,0 +1,619 @@
+/*-
+ * Copyright (c) 2016,2017 SoftIron Inc.
+ * All rights reserved.
+ *
+ * This software was developed by Andrew Turner under
+ * the sponsorship of SoftIron Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+
+#include "miibus_if.h"
+
+#include "xgbe.h"
+#include "xgbe-common.h"
+
+static device_probe_t  axgbe_probe;
+static 

svn commit: r313767 - head/sys/dev/axgbe

2017-02-15 Thread Andrew Turner
Author: andrew
Date: Wed Feb 15 13:37:32 2017
New Revision: 313767
URL: https://svnweb.freebsd.org/changeset/base/313767

Log:
  Import the AMD 10G ethernet driver for the AMD Opteron A1100.
  
  This is from Linux git as of 5eb4dce3b3471ec9d1ea2945fa3d2bab4ac7e100
  
  Obtained from:Linux
  Sponsored by: SoftIron Inc

Added:
  head/sys/dev/axgbe/
  head/sys/dev/axgbe/xgbe-common.h   (contents, props changed)
  head/sys/dev/axgbe/xgbe-desc.c   (contents, props changed)
  head/sys/dev/axgbe/xgbe-dev.c   (contents, props changed)
  head/sys/dev/axgbe/xgbe-drv.c   (contents, props changed)
  head/sys/dev/axgbe/xgbe-mdio.c   (contents, props changed)
  head/sys/dev/axgbe/xgbe.h   (contents, props changed)

Added: head/sys/dev/axgbe/xgbe-common.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/axgbe/xgbe-common.hWed Feb 15 13:37:32 2017
(r313767)
@@ -0,0 +1,1304 @@
+/*
+ * AMD 10Gb Ethernet driver
+ *
+ * This file is available to you under your choice of the following two
+ * licenses:
+ *
+ * License 1: GPLv2
+ *
+ * Copyright (c) 2014-2016 Advanced Micro Devices, Inc.
+ *
+ * This file is free software; you may copy, redistribute and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see .
+ *
+ * This file incorporates work covered by the following copyright and
+ * permission notice:
+ * The Synopsys DWC ETHER XGMAC Software Driver and documentation
+ * (hereinafter "Software") is an unsupported proprietary work of Synopsys,
+ * Inc. unless otherwise expressly agreed to in writing between Synopsys
+ * and you.
+ *
+ * The Software IS NOT an item of Licensed Software or Licensed Product
+ * under any End User Software License Agreement or Agreement for Licensed
+ * Product with Synopsys or any supplement thereto.  Permission is hereby
+ * granted, free of charge, to any person obtaining a copy of this software
+ * annotated with this license and the Software, to deal in the Software
+ * without restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished
+ * to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THIS SOFTWARE IS BEING DISTRIBUTED BY SYNOPSYS SOLELY ON AN "AS IS"
+ * BASIS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE HEREBY DISCLAIMED. IN NO EVENT SHALL SYNOPSYS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * License 2: Modified BSD
+ *
+ * Copyright (c) 2014-2016 Advanced Micro Devices, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * * Neither the name of Advanced Micro Devices, Inc. nor the
+ *   names of its contributors may be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 

Re: svn commit: r312679 - head/sys/arm/freescale/imx

2017-02-15 Thread Yoshiro MIHIRA
Hi.
Ian

Thank you for your strong effort to support imx6 board.

I have SolidRun HummingBoard-i2(imx6dl-hummingboard).

I have reboot issue(never reset after reboot) and if I use Linux, I
reproduce this issue So I reported this issue to SolidRun Forum.
http://forum.solid-run.com/linux-on-cubox-i-and-hummingboard-f8/need-to-push-reset-button-to-reboot-linux-system-t3122.html
But I could not get any information.

I tested latest kernel(r313280) unfortunately it was not solved.

Do you know other information about reset issue, please let me know.

Currently I need to push reset button when I restart system...

Yours
Yoshiro MIHIRA

2017年1月24日(火) 11:09 Ian Lepore :

> Author: ian
> Date: Tue Jan 24 02:09:30 2017
> New Revision: 312679
> URL: https://svnweb.freebsd.org/changeset/base/312679
>
> Log:
>   Handle imx6 erratum ERR004346... to reboot, clear the SRS bit twice
> within
>   the same cycle of the 32khz clock.
>
>   I've never actually noticed this error happening, but it's an easy fix.
>
> Modified:
>   head/sys/arm/freescale/imx/imx_machdep.c
>
> Modified: head/sys/arm/freescale/imx/imx_machdep.c
>
> ==
> --- head/sys/arm/freescale/imx/imx_machdep.cTue Jan 24 01:39:40 2017
>   (r312678)
> +++ head/sys/arm/freescale/imx/imx_machdep.cTue Jan 24 02:09:30 2017
>   (r312679)
> @@ -69,11 +69,18 @@ imx_wdog_cpu_reset(vm_offset_t wdcr_phys
>  * Trigger an immediate reset by clearing the SRS bit in the
> watchdog
>  * control register.  The reset happens on the next cycle of the
> wdog
>  * 32KHz clock, so hang out in a spin loop until the reset takes
> effect.
> +*
> +* Imx6 erratum ERR004346 says the SRS bit has to be cleared twice
> +* within the same cycle of the 32khz clock to reliably trigger the
> +* reset.  Writing it 3 times in a row ensures at least 2 of the
> writes
> +* happen in the same 32k clock cycle.
>  */
> if ((pcr = devmap_ptov(wdcr_physaddr, sizeof(*pcr))) == NULL) {
> printf("cpu_reset() can't find its control register...
> locking up now.");
> } else {
> *pcr &= ~WDOG_CR_SRS;
> +   *pcr &= ~WDOG_CR_SRS;
> +   *pcr &= ~WDOG_CR_SRS;
> }
> for (;;)
> continue;
>
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Re: svn commit: r311849 - in head: . sys/amd64/conf sys/arm64/conf sys/conf sys/dev/e1000 sys/i386/conf sys/mips/conf sys/modules sys/modules/em sys/modules/igb sys/powerpc/conf

2017-02-15 Thread Roger Pau Monné
On Tue, Jan 10, 2017 at 03:23:22AM +, Sean Bruno wrote:
> Author: sbruno
> Date: Tue Jan 10 03:23:22 2017
> New Revision: 311849
> URL: https://svnweb.freebsd.org/changeset/base/311849
> 
> Log:
>   Migrate e1000 to the IFLIB framework:
>   - em(4) igb(4) and lem(4)
>   - deprecate the igb device from kernel configurations
>   - create a symbolic link in /boot/kernel from if_em.ko to if_igb.ko

This linking causes mfsBSD to choke when building an image from HEAD. It tries
to issue the following command:

${_v}${CP} -rp ${_BOOTDIR}/kernel ${WRKDIR}/disk/boot

Which fails when finding the symbol link. I can send a patch to change that to
-Rp, which would work fine, but wouldn't it be better to either completely
remove if_igb.ko, or simply copy if_em.ko to if_igb.ko?

I'm wondering if for example anyone strips down it's /boot/kernel/ manually, by
removing unused modules, and what would happen if if_em.ko is removed but not
if_igb.ko.

Roger.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313761 - in head/lib/msun: . src

2017-02-15 Thread Mahdi Mokhtari
Author: mmokhi (ports committer)
Date: Wed Feb 15 07:59:54 2017
New Revision: 313761
URL: https://svnweb.freebsd.org/changeset/base/313761

Log:
  Add casinl() cacosl() catanl() casinhl() cacoshl() catanhl() APIs to msun
  to improve C11 conformance.
  
  PR:   216850 216851 216852 216856 216857 216858
  Submitted by: mmokhi
  Reported by:  s...@troutmask.apl.washington.edu
  Reviewed by:  bde, mat, theraven
  Approved by:  bde (src committer), mat (mentor)
  Differential Revision:https://reviews.freebsd.org/D9491

Added:
  head/lib/msun/src/catrigl.c
 - copied, changed from r313732, head/lib/msun/src/catrigf.c
Modified:
  head/lib/msun/Makefile
  head/lib/msun/Symbol.map

Modified: head/lib/msun/Makefile
==
--- head/lib/msun/Makefile  Wed Feb 15 07:22:47 2017(r313760)
+++ head/lib/msun/Makefile  Wed Feb 15 07:59:54 2017(r313761)
@@ -107,7 +107,7 @@ COMMON_SRCS+=   e_acoshl.c e_acosl.c e_asi
 .endif
 
 # C99 complex functions
-COMMON_SRCS+=  catrig.c catrigf.c \
+COMMON_SRCS+=  catrig.c catrigf.c catrigl.c \
s_ccosh.c s_ccoshf.c s_cexp.c s_cexpf.c \
s_cimag.c s_cimagf.c s_cimagl.c \
s_conj.c s_conjf.c s_conjl.c \

Modified: head/lib/msun/Symbol.map
==
--- head/lib/msun/Symbol.mapWed Feb 15 07:22:47 2017(r313760)
+++ head/lib/msun/Symbol.mapWed Feb 15 07:59:54 2017(r313761)
@@ -285,3 +285,13 @@ FBSD_1.3 {
 FBSD_1.4 {
lgammal_r;
 };
+
+/* First added in 12.0-CURRENT */
+FBSD_1.5 {
+   cacoshl;
+   cacosl;
+   casinhl;
+   casinl;
+   catanl;
+   catanhl;
+};

Copied and modified: head/lib/msun/src/catrigl.c (from r313732, 
head/lib/msun/src/catrigf.c)
==
--- head/lib/msun/src/catrigf.c Tue Feb 14 16:49:32 2017(r313732, copy 
source)
+++ head/lib/msun/src/catrigl.c Wed Feb 15 07:59:54 2017(r313761)
@@ -1,5 +1,6 @@
 /*-
  * Copyright (c) 2012 Stephen Montgomery-Smith 
+ * Copyright (c) 2017 Mahdi Mokhtari 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -44,38 +45,53 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include "invtrig.h"
 #include "math.h"
 #include "math_private.h"
 
 #undef isinf
-#define isinf(x)   (fabsf(x) == INFINITY)
+#define isinf(x)   (fabsl(x) == INFINITY)
 #undef isnan
 #define isnan(x)   ((x) != (x))
 #defineraise_inexact() do { volatile float junk = 1 + tiny; } while(0)
 #undef signbit
-#define signbit(x) (__builtin_signbitf(x))
+#define signbit(x) (__builtin_signbitl(x))
 
-static const float
+static const long double
 A_crossover =  10,
 B_crossover =  0.6417,
-FOUR_SQRT_MIN =0x1p-61,
-QUARTER_SQRT_MAX = 0x1p61,
-m_e =  2.7182818285e0, /*  0xadf854.0p-22 */
-m_ln2 =6.9314718056e-1,/*  0xb17218.0p-24 */
-pio2_hi =  1.5707962513e0, /*  0xc90fda.0p-23 */
-RECIP_EPSILON =1 / FLT_EPSILON,
-SQRT_3_EPSILON =   5.9801995673e-4,/*  0x9cc471.0p-34 */
-SQRT_6_EPSILON =   8.4572793338e-4,/*  0xddb3d7.0p-34 */
-SQRT_MIN = 0x1p-63;
+FOUR_SQRT_MIN =0x1p-8189L,
+QUARTER_SQRT_MAX = 0x1p8189L,
+RECIP_EPSILON =1 / LDBL_EPSILON,
+SQRT_MIN = 0x1p-8191L;
+
+#if LDBL_MANT_DIG == 64
+static const union IEEEl2bits
+um_e = LD80C(0xadf85458a2bb4a9b,  1, 2.71828182845904523536e+0L),
+um_ln2 =   LD80C(0xb17217f7d1cf79ac, -1, 6.93147180559945309417e-1L);
+#definem_e um_e.e
+#definem_ln2   um_ln2.e
+static const long double
+/* The next 2 literals for non-i386.  Misrounding them on i386 is harmless. */
+SQRT_3_EPSILON = 5.70316273435758915310e-10,   /*  0x9cc470a0490973e8.0p-94 */
+SQRT_6_EPSILON = 8.06549008734932771664e-10;   /*  0xddb3d742c265539e.0p-94 */
+#elif LDBL_MANT_DIG == 113
+static const long double
+m_e =  2.71828182845904523536028747135266250e0L,   /* 
0x15bf0a8b1457695355fb8ac404e7a.0p-111 */
+m_ln2 =6.93147180559945309417232121458176568e-1L,  /* 
0x162e42fefa39ef35793c7673007e6.0p-113 */
+SQRT_3_EPSILON = 2.40370335797945490975336727199878124e-17,/*  
0x1bb67ae8584caa73b25742d7078b8.0p-168 */
+SQRT_6_EPSILON = 3.39934988877629587239082586223300391e-17;/*  
0x13988e1409212e7d0321914321a55.0p-167 */
+#else
+#error "Unsupported long double format"
+#endif
 
 static const volatile float
-pio2_lo =  7.5497899549e-8,/*  0xa22169.0p-47 */
 tiny = 0x1p-100;
 
-static float complex clog_for_large_values(float complex z);
+static long double complex clog_for_large_values(long double