svn commit: r336361 - in head/sys/ufs: ffs ufs

2018-07-16 Thread Kirk McKusick
Author: mckusick
Date: Tue Jul 17 04:43:58 2018
New Revision: 336361
URL: https://svnweb.freebsd.org/changeset/base/336361

Log:
  Add needed locking for um_flags added in -r335808.
  
  While here document required locking details in ufsmount structure.
  
  Reported by: kib
  Reviewed by: kib

Modified:
  head/sys/ufs/ffs/ffs_suspend.c
  head/sys/ufs/ufs/ufsmount.h

Modified: head/sys/ufs/ffs/ffs_suspend.c
==
--- head/sys/ufs/ffs/ffs_suspend.c  Tue Jul 17 02:20:51 2018
(r336360)
+++ head/sys/ufs/ffs/ffs_suspend.c  Tue Jul 17 04:43:58 2018
(r336361)
@@ -210,7 +210,9 @@ ffs_susp_suspend(struct mount *mp)
if ((error = vfs_write_suspend(mp, VS_SKIP_UNMOUNT)) != 0)
return (error);
 
+   UFS_LOCK(ump);
ump->um_flags |= UM_WRITESUSPENDED;
+   UFS_UNLOCK(ump);
 
return (0);
 }
@@ -255,7 +257,9 @@ ffs_susp_dtor(void *data)
 
vfs_write_resume(mp, 0);
vfs_unbusy(mp);
+   UFS_LOCK(ump);
ump->um_flags &= ~UM_WRITESUSPENDED;
+   UFS_UNLOCK(ump);
 
sx_xunlock(_susp_lock);
 }

Modified: head/sys/ufs/ufs/ufsmount.h
==
--- head/sys/ufs/ufs/ufsmount.h Tue Jul 17 02:20:51 2018(r336360)
+++ head/sys/ufs/ufs/ufsmount.h Tue Jul 17 04:43:58 2018(r336361)
@@ -64,31 +64,44 @@ struct inodedep;
 TAILQ_HEAD(inodedeplst, inodedep);
 LIST_HEAD(bmsafemaphd, bmsafemap);
 
-/* This structure describes the UFS specific mount structure data. */
+/*
+ * This structure describes the UFS specific mount structure data.
+ * The function operators are used to support different versions of
+ * UFS (UFS1, UFS2, etc).
+ *
+ * Lock reference:
+ * a - atomic operations
+ * c - set at allocation then constant until freed
+ * i - ufsmount interlock (UFS_LOCK / UFS_UNLOCK)
+ * q - associated quota file is locked
+ * r - ref to parent mount structure is held (vfs_busy / vfs_unbusy)
+ * u - managed by user process fsck_ufs
+ */
 struct ufsmount {
-   struct  mount *um_mountp;   /* filesystem vfs structure */
-   struct  cdev *um_dev;   /* device mounted */
-   struct  g_consumer *um_cp;
-   struct  bufobj *um_bo;  /* Buffer cache object */
-   struct  vnode *um_devvp;/* block device mounted vnode */
-   u_long  um_fstype;  /* type of filesystem */
-   struct  fs *um_fs;  /* pointer to superblock */
-   struct  ufs_extattr_per_mount um_extattr;   /* extended attrs */
-   u_long  um_nindir;  /* indirect ptrs per block */
-   u_long  um_bptrtodb;/* indir ptr to disk block */
-   u_long  um_seqinc;  /* inc between seq blocks */
-   struct  mtx um_lock;/* Protects ufsmount & fs */
-   pid_t   um_fsckpid; /* PID permitted fsck sysctls */
-   struct  mount_softdeps *um_softdep; /* softdep mgmt structure */
-   struct  vnode *um_quotas[MAXQUOTAS];/* pointer to quota files */
-   struct  ucred *um_cred[MAXQUOTAS];  /* quota file access cred */
-   time_t  um_btime[MAXQUOTAS];/* block quota time limit */
-   time_t  um_itime[MAXQUOTAS];/* inode quota time limit */
-   charum_qflags[MAXQUOTAS];   /* quota specific flags */
-   int64_t um_savedmaxfilesize;/* XXX - limit maxfilesize */
-   u_int   um_flags;   /* filesystem flags */
-   u_int   um_trim_inflight;   /* outstanding trim count */
-   struct  taskqueue *um_trim_tq;  /* trim request queue */
+   struct  mount *um_mountp;   /* (r) filesystem vfs struct */
+   struct  cdev *um_dev;   /* (r) device mounted */
+   struct  g_consumer *um_cp;  /* (r) GEOM access point */
+   struct  bufobj *um_bo;  /* (r) Buffer cache object */
+   struct  vnode *um_devvp;/* (r) blk dev mounted vnode */
+   u_long  um_fstype;  /* (c) type of filesystem */
+   struct  fs *um_fs;  /* (r) pointer to superblock */
+   struct  ufs_extattr_per_mount um_extattr; /* (c) extended attrs */
+   u_long  um_nindir;  /* (c) indirect ptrs per blk */
+   u_long  um_bptrtodb;/* (c) indir disk block ptr */
+   u_long  um_seqinc;  /* (c) inc between seq blocks */
+   struct  mtx um_lock;/* (c) Protects ufsmount & fs */
+   pid_t   um_fsckpid; /* (u) PID can do fsck sysctl */
+   struct  mount_softdeps *um_softdep; /* (c) softdep mgmt structure */
+   struct  vnode *um_quotas[MAXQUOTAS];

svn commit: r336360 - head/sys/sys

2018-07-16 Thread Pedro F. Giffuni
Author: pfg
Date: Tue Jul 17 02:20:51 2018
New Revision: 336360
URL: https://svnweb.freebsd.org/changeset/base/336360

Log:
  FreeBSD_version bump as per r336351,
  
  Updating the libstdc++ is likely to have consequences for archs that are
  still using the older GCC based toolchain.
  
  Requested by: mcl

Modified:
  head/sys/sys/param.h

Modified: head/sys/sys/param.h
==
--- head/sys/sys/param.hMon Jul 16 23:32:24 2018(r336359)
+++ head/sys/sys/param.hTue Jul 17 02:20:51 2018(r336360)
@@ -60,7 +60,7 @@
  * in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1200073  /* Master, propagated to newvers */
+#define __FreeBSD_version 1200074  /* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
___
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: r336351 - head/gnu/lib/libstdc++

2018-07-16 Thread Pedro Giffuni



On 16/07/2018 19:11, Mark Linimon wrote:

On Mon, Jul 16, 2018 at 06:53:28PM +, Pedro F. Giffuni wrote:

   Update libstdc++ configuration.

Will FreeBSD version be incremented for this?

mcl


I thought about it, but then I was not sure anyone will notice.

Nevermind, version bumps are cheap I will do it.

Pedro.
___
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: r336351 - head/gnu/lib/libstdc++

2018-07-16 Thread Mark Linimon
On Mon, Jul 16, 2018 at 06:53:28PM +, Pedro F. Giffuni wrote:
>   Update libstdc++ configuration.

Will FreeBSD version be incremented for this?

mcl
___
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: r336359 - head/sys/conf

2018-07-16 Thread Kyle Evans
Author: kevans
Date: Mon Jul 16 23:32:24 2018
New Revision: 336359
URL: https://svnweb.freebsd.org/changeset/base/336359

Log:
  Revert 336358 and step away fron machine for the day...
  
  VERSREQ < 7.+ physically will not work with new config(8) due to major bump,
  which is why I bumped it in the first place... Back to the original version

Modified:
  head/sys/conf/Makefile.amd64
  head/sys/conf/Makefile.arm
  head/sys/conf/Makefile.arm64
  head/sys/conf/Makefile.i386
  head/sys/conf/Makefile.mips
  head/sys/conf/Makefile.powerpc
  head/sys/conf/Makefile.riscv
  head/sys/conf/Makefile.sparc64

Modified: head/sys/conf/Makefile.amd64
==
--- head/sys/conf/Makefile.amd64Mon Jul 16 21:53:30 2018
(r336358)
+++ head/sys/conf/Makefile.amd64Mon Jul 16 23:32:24 2018
(r336359)
@@ -18,7 +18,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  600012
+%VERSREQ=  70
 
 STD8X16FONT?=  iso
 

Modified: head/sys/conf/Makefile.arm
==
--- head/sys/conf/Makefile.arm  Mon Jul 16 21:53:30 2018(r336358)
+++ head/sys/conf/Makefile.arm  Mon Jul 16 23:32:24 2018(r336359)
@@ -17,7 +17,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  600013
+%VERSREQ=  70
 
 STD8X16FONT?=  iso
 

Modified: head/sys/conf/Makefile.arm64
==
--- head/sys/conf/Makefile.arm64Mon Jul 16 21:53:30 2018
(r336358)
+++ head/sys/conf/Makefile.arm64Mon Jul 16 23:32:24 2018
(r336359)
@@ -18,7 +18,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  600012
+%VERSREQ=  70
 
 .if !defined(S)
 S= ../../..

Modified: head/sys/conf/Makefile.i386
==
--- head/sys/conf/Makefile.i386 Mon Jul 16 21:53:30 2018(r336358)
+++ head/sys/conf/Makefile.i386 Mon Jul 16 23:32:24 2018(r336359)
@@ -17,7 +17,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  600012
+%VERSREQ=  70
 
 STD8X16FONT?=  iso
 

Modified: head/sys/conf/Makefile.mips
==
--- head/sys/conf/Makefile.mips Mon Jul 16 21:53:30 2018(r336358)
+++ head/sys/conf/Makefile.mips Mon Jul 16 23:32:24 2018(r336359)
@@ -15,7 +15,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  600012
+%VERSREQ=  70
 
 STD8X16FONT?=  iso
 

Modified: head/sys/conf/Makefile.powerpc
==
--- head/sys/conf/Makefile.powerpc  Mon Jul 16 21:53:30 2018
(r336358)
+++ head/sys/conf/Makefile.powerpc  Mon Jul 16 23:32:24 2018
(r336359)
@@ -17,7 +17,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  600012
+%VERSREQ=  70
 
 STD8X16FONT?=  iso
 

Modified: head/sys/conf/Makefile.riscv
==
--- head/sys/conf/Makefile.riscvMon Jul 16 21:53:30 2018
(r336358)
+++ head/sys/conf/Makefile.riscvMon Jul 16 23:32:24 2018
(r336359)
@@ -19,7 +19,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  600012
+%VERSREQ=  70
 
 .if !defined(S)
 S= ../../..

Modified: head/sys/conf/Makefile.sparc64
==
--- head/sys/conf/Makefile.sparc64  Mon Jul 16 21:53:30 2018
(r336358)
+++ head/sys/conf/Makefile.sparc64  Mon Jul 16 23:32:24 2018
(r336359)
@@ -17,7 +17,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  600012
+%VERSREQ=  70
 
 STD8X16FONT?=  iso
 
___
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: r336358 - head/sys/conf

2018-07-16 Thread Kyle Evans
Author: kevans
Date: Mon Jul 16 21:53:30 2018
New Revision: 336358
URL: https://svnweb.freebsd.org/changeset/base/336358

Log:
  Partially revert r336353: sys/conf/* %VERSREQ bumps
  
  The changes made in r335998 don't strictly require a newer config(8),
  though it is advised. The %VERSREQ bumps were premature.

Modified:
  head/sys/conf/Makefile.amd64
  head/sys/conf/Makefile.arm
  head/sys/conf/Makefile.arm64
  head/sys/conf/Makefile.i386
  head/sys/conf/Makefile.mips
  head/sys/conf/Makefile.powerpc
  head/sys/conf/Makefile.riscv
  head/sys/conf/Makefile.sparc64

Modified: head/sys/conf/Makefile.amd64
==
--- head/sys/conf/Makefile.amd64Mon Jul 16 21:32:50 2018
(r336357)
+++ head/sys/conf/Makefile.amd64Mon Jul 16 21:53:30 2018
(r336358)
@@ -18,7 +18,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  70
+%VERSREQ=  600012
 
 STD8X16FONT?=  iso
 

Modified: head/sys/conf/Makefile.arm
==
--- head/sys/conf/Makefile.arm  Mon Jul 16 21:32:50 2018(r336357)
+++ head/sys/conf/Makefile.arm  Mon Jul 16 21:53:30 2018(r336358)
@@ -17,7 +17,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  70
+%VERSREQ=  600013
 
 STD8X16FONT?=  iso
 

Modified: head/sys/conf/Makefile.arm64
==
--- head/sys/conf/Makefile.arm64Mon Jul 16 21:32:50 2018
(r336357)
+++ head/sys/conf/Makefile.arm64Mon Jul 16 21:53:30 2018
(r336358)
@@ -18,7 +18,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  70
+%VERSREQ=  600012
 
 .if !defined(S)
 S= ../../..

Modified: head/sys/conf/Makefile.i386
==
--- head/sys/conf/Makefile.i386 Mon Jul 16 21:32:50 2018(r336357)
+++ head/sys/conf/Makefile.i386 Mon Jul 16 21:53:30 2018(r336358)
@@ -17,7 +17,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  70
+%VERSREQ=  600012
 
 STD8X16FONT?=  iso
 

Modified: head/sys/conf/Makefile.mips
==
--- head/sys/conf/Makefile.mips Mon Jul 16 21:32:50 2018(r336357)
+++ head/sys/conf/Makefile.mips Mon Jul 16 21:53:30 2018(r336358)
@@ -15,7 +15,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  70
+%VERSREQ=  600012
 
 STD8X16FONT?=  iso
 

Modified: head/sys/conf/Makefile.powerpc
==
--- head/sys/conf/Makefile.powerpc  Mon Jul 16 21:32:50 2018
(r336357)
+++ head/sys/conf/Makefile.powerpc  Mon Jul 16 21:53:30 2018
(r336358)
@@ -17,7 +17,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  70
+%VERSREQ=  600012
 
 STD8X16FONT?=  iso
 

Modified: head/sys/conf/Makefile.riscv
==
--- head/sys/conf/Makefile.riscvMon Jul 16 21:32:50 2018
(r336357)
+++ head/sys/conf/Makefile.riscvMon Jul 16 21:53:30 2018
(r336358)
@@ -19,7 +19,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  70
+%VERSREQ=  600012
 
 .if !defined(S)
 S= ../../..

Modified: head/sys/conf/Makefile.sparc64
==
--- head/sys/conf/Makefile.sparc64  Mon Jul 16 21:32:50 2018
(r336357)
+++ head/sys/conf/Makefile.sparc64  Mon Jul 16 21:53:30 2018
(r336358)
@@ -17,7 +17,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  70
+%VERSREQ=  600012
 
 STD8X16FONT?=  iso
 
___
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: r336357 - in head/sys/fs: nfs nfsserver

2018-07-16 Thread Rick Macklem
Author: rmacklem
Date: Mon Jul 16 21:32:50 2018
New Revision: 336357
URL: https://svnweb.freebsd.org/changeset/base/336357

Log:
  Modify the reasons for not issuing a delegation in the NFSv4.1 server.
  
  The ESXi NFSv4.1 client will generate warning messages when the reason for
  not issuing a delegation is two. Two refers to a resource limit and I do
  not see why it would be considered invalid. However it probably was not the
  best choice of reason for not issuing a delegation.
  This patch changes the reasons used to ones that the ESXi client doesn't
  complain about. This change does not affect the FreeBSD client and does
  not appear to affect behaviour of the Linux NFSv4.1 client.
  RFC5661 defines these "reasons" but does not give any guidance w.r.t. which
  ones are more appropriate to return to a client.
  
  Tested by:andreas.n...@frequentis.com
  PR:   226650
  MFC after:2 weeks

Modified:
  head/sys/fs/nfs/nfsproto.h
  head/sys/fs/nfsserver/nfs_nfsdserv.c
  head/sys/fs/nfsserver/nfs_nfsdstate.c

Modified: head/sys/fs/nfs/nfsproto.h
==
--- head/sys/fs/nfs/nfsproto.h  Mon Jul 16 19:47:57 2018(r336356)
+++ head/sys/fs/nfs/nfsproto.h  Mon Jul 16 21:32:50 2018(r336357)
@@ -568,6 +568,7 @@
 #defineNFSV4OPEN_WDRESOURCE0x0008
 #defineNFSV4OPEN_WDCONTENTION  0x0010
 #defineNFSV4OPEN_WDNOTWANTED   0x0020
+#defineNFSV4OPEN_WDSUPPFTYPE   0x0040
 
 /*
  * NFS V4 File Handle types

Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c
==
--- head/sys/fs/nfsserver/nfs_nfsdserv.cMon Jul 16 19:47:57 2018
(r336356)
+++ head/sys/fs/nfsserver/nfs_nfsdserv.cMon Jul 16 21:32:50 2018
(r336357)
@@ -3095,7 +3095,13 @@ nfsrvd_open(struct nfsrv_descript *nd, __unused int is
*tl = txdr_unsigned(NFSV4OPEN_DELEGATEWRITE);
else if (retext != 0) {
*tl = txdr_unsigned(NFSV4OPEN_DELEGATENONEEXT);
-   if ((rflags & NFSV4OPEN_WDCONTENTION) != 0) {
+   if ((rflags & NFSV4OPEN_WDNOTWANTED) != 0) {
+   NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED);
+   *tl = txdr_unsigned(NFSV4OPEN_NOTWANTED);
+   } else if ((rflags & NFSV4OPEN_WDSUPPFTYPE) != 0) {
+   NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED);
+   *tl = txdr_unsigned(NFSV4OPEN_NOTSUPPFTYPE);
+   } else if ((rflags & NFSV4OPEN_WDCONTENTION) != 0) {
NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
*tl++ = txdr_unsigned(NFSV4OPEN_CONTENTION);
*tl = newnfs_false;

Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c
==
--- head/sys/fs/nfsserver/nfs_nfsdstate.c   Mon Jul 16 19:47:57 2018
(r336356)
+++ head/sys/fs/nfsserver/nfs_nfsdstate.c   Mon Jul 16 21:32:50 2018
(r336357)
@@ -3097,7 +3097,13 @@ tryagain:
/*
 * This is where we can choose to issue a delegation.
 */
-   if (delegate == 0 || writedeleg == 0 ||
+   if ((new_stp->ls_flags & NFSLCK_WANTNODELEG) != 0)
+   *rflagsp |= NFSV4OPEN_WDNOTWANTED;
+   else if (nfsrv_issuedelegs == 0)
+   *rflagsp |= NFSV4OPEN_WDSUPPFTYPE;
+   else if (NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt))
+   *rflagsp |= NFSV4OPEN_WDRESOURCE;
+   else if (delegate == 0 || writedeleg == 0 ||
NFSVNO_EXRDONLY(exp) || (readonly != 0 &&
nfsrv_writedelegifpos == 0) ||
!NFSVNO_DELEGOK(vp) ||
@@ -3105,11 +3111,6 @@ tryagain:
(clp->lc_flags & (LCL_CALLBACKSON | LCL_CBDOWN)) !=
 LCL_CALLBACKSON)
*rflagsp |= NFSV4OPEN_WDCONTENTION;
-   else if (nfsrv_issuedelegs == 0 ||
-   NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt))
-   *rflagsp |= NFSV4OPEN_WDRESOURCE;
-   else if ((new_stp->ls_flags & NFSLCK_WANTNODELEG) != 0)
-   *rflagsp |= NFSV4OPEN_WDNOTWANTED;
else {
new_deleg->ls_stateid.seqid = delegstateidp->seqid = 1;
new_deleg->ls_stateid.other[0] = delegstateidp->other[0]
@@ -3160,16 +3161,17 @@ tryagain:
/*
 * This is where we can choose to issue a delegation.
 */
-   if (delegate == 0 

svn commit: r336356 - head/sys/dev/e1000

2018-07-16 Thread Marius Strobl
Author: marius
Date: Mon Jul 16 19:47:57 2018
New Revision: 336356
URL: https://svnweb.freebsd.org/changeset/base/336356

Log:
  Update igb_sctx_init for r336313, missed when incorporating shurd@'s
  feedback on the initial D15720.
  
  Reported by:  kib

Modified:
  head/sys/dev/e1000/if_em.c

Modified: head/sys/dev/e1000/if_em.c
==
--- head/sys/dev/e1000/if_em.c  Mon Jul 16 19:47:29 2018(r336355)
+++ head/sys/dev/e1000/if_em.c  Mon Jul 16 19:47:57 2018(r336356)
@@ -507,12 +507,13 @@ static struct if_shared_ctx em_sctx_init = {
 
 if_shared_ctx_t em_sctx = _sctx_init;
 
-
 static struct if_shared_ctx igb_sctx_init = {
.isc_magic = IFLIB_MAGIC,
.isc_q_align = PAGE_SIZE,
-   .isc_tx_maxsize = EM_TSO_SIZE,
+   .isc_tx_maxsize = EM_TSO_SIZE + sizeof(struct ether_vlan_header),
.isc_tx_maxsegsize = PAGE_SIZE,
+   .isc_tso_maxsize = EM_TSO_SIZE + sizeof(struct ether_vlan_header),
+   .isc_tso_maxsegsize = EM_TSO_SEG_SIZE,
.isc_rx_maxsize = MJUM9BYTES,
.isc_rx_nsegments = 1,
.isc_rx_maxsegsize = MJUM9BYTES,
___
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: r336355 - head/sys/cddl/dev/dtrace/powerpc

2018-07-16 Thread Justin Hibbits
Author: jhibbits
Date: Mon Jul 16 19:47:29 2018
New Revision: 336355
URL: https://svnweb.freebsd.org/changeset/base/336355

Log:
  dtrace/powerpc: Correct register indices for non-indexed registers in the 
trapframe
  
  Fix an off-by-one error, LR starts at index 32, not index 33, and the others
  follow suit.

Modified:
  head/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c

Modified: head/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c
==
--- head/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c   Mon Jul 16 19:21:50 
2018(r336354)
+++ head/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c   Mon Jul 16 19:47:29 
2018(r336355)
@@ -561,19 +561,19 @@ dtrace_getreg(struct trapframe *rp, uint_t reg)
return (rp->fixreg[reg]);
 
switch (reg) {
-   case 33:
+   case 32:
return (rp->lr);
-   case 34:
+   case 33:
return (rp->cr);
-   case 35:
+   case 34:
return (rp->xer);
-   case 36:
+   case 35:
return (rp->ctr);
-   case 37:
+   case 36:
return (rp->srr0);
-   case 38:
+   case 37:
return (rp->srr1);
-   case 39:
+   case 38:
return (rp->exc);
default:
DTRACE_CPUFLAG_SET(CPU_DTRACE_ILLOP);
___
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: r336354 - head/stand/i386/zfsboot

2018-07-16 Thread Li-Wen Hsu
Author: lwhsu (ports committer)
Date: Mon Jul 16 19:21:50 2018
New Revision: 336354
URL: https://svnweb.freebsd.org/changeset/base/336354

Log:
  zfsboot: fix build with WITHOUT_LOADER_GELI
  
  Reviewed by:  ian
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D16292

Modified:
  head/stand/i386/zfsboot/zfsboot.c

Modified: head/stand/i386/zfsboot/zfsboot.c
==
--- head/stand/i386/zfsboot/zfsboot.c   Mon Jul 16 19:05:50 2018
(r336353)
+++ head/stand/i386/zfsboot/zfsboot.c   Mon Jul 16 19:21:50 2018
(r336354)
@@ -708,7 +708,9 @@ main(void)
 setheap(heap_next, heap_end);
 
 zdsk = malloc(sizeof(struct zfsdsk));
+#ifdef LOADER_GELI_SUPPORT
 zdsk->gdev = NULL;
+#endif
 zdsk->dsk.drive = *(uint8_t *)PTOV(ARGS);
 zdsk->dsk.type = zdsk->dsk.drive & DRV_HARD ? TYPE_AD : TYPE_FD;
 zdsk->dsk.unit = zdsk->dsk.drive & DRV_MASK;
___
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: r336353 - in head: sys/conf usr.sbin/config

2018-07-16 Thread Kyle Evans
On Mon, Jul 16, 2018 at 2:05 PM, Kyle Evans  wrote:
> Author: kevans
> Date: Mon Jul 16 19:05:50 2018
> New Revision: 336353
> URL: https://svnweb.freebsd.org/changeset/base/336353
>
> Log:
>   config(8): Bump major version after r335998
>
>   config-generated hints.c/env.c from r335998 and later are incompatible with
>   earlier kernels due to no longer setting envmode/hintmode. A minor bump for
>   this is insufficient, as matching major version with a later minor version
>   is still viewed as backwards-compatible.
>
>   This was an MI kernel change, soo all VERSREQ's are bumped.
>

I jumped the gun here...

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D16214
___
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: r336353 - in head: sys/conf usr.sbin/config

2018-07-16 Thread Kyle Evans
Author: kevans
Date: Mon Jul 16 19:05:50 2018
New Revision: 336353
URL: https://svnweb.freebsd.org/changeset/base/336353

Log:
  config(8): Bump major version after r335998
  
  config-generated hints.c/env.c from r335998 and later are incompatible with
  earlier kernels due to no longer setting envmode/hintmode. A minor bump for
  this is insufficient, as matching major version with a later minor version
  is still viewed as backwards-compatible.
  
  This was an MI kernel change, soo all VERSREQ's are bumped.

Modified:
  head/sys/conf/Makefile.amd64
  head/sys/conf/Makefile.arm
  head/sys/conf/Makefile.arm64
  head/sys/conf/Makefile.i386
  head/sys/conf/Makefile.mips
  head/sys/conf/Makefile.powerpc
  head/sys/conf/Makefile.riscv
  head/sys/conf/Makefile.sparc64
  head/usr.sbin/config/configvers.h

Modified: head/sys/conf/Makefile.amd64
==
--- head/sys/conf/Makefile.amd64Mon Jul 16 19:01:05 2018
(r336352)
+++ head/sys/conf/Makefile.amd64Mon Jul 16 19:05:50 2018
(r336353)
@@ -18,7 +18,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  600012
+%VERSREQ=  70
 
 STD8X16FONT?=  iso
 

Modified: head/sys/conf/Makefile.arm
==
--- head/sys/conf/Makefile.arm  Mon Jul 16 19:01:05 2018(r336352)
+++ head/sys/conf/Makefile.arm  Mon Jul 16 19:05:50 2018(r336353)
@@ -17,7 +17,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  600013
+%VERSREQ=  70
 
 STD8X16FONT?=  iso
 

Modified: head/sys/conf/Makefile.arm64
==
--- head/sys/conf/Makefile.arm64Mon Jul 16 19:01:05 2018
(r336352)
+++ head/sys/conf/Makefile.arm64Mon Jul 16 19:05:50 2018
(r336353)
@@ -18,7 +18,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  600012
+%VERSREQ=  70
 
 .if !defined(S)
 S= ../../..

Modified: head/sys/conf/Makefile.i386
==
--- head/sys/conf/Makefile.i386 Mon Jul 16 19:01:05 2018(r336352)
+++ head/sys/conf/Makefile.i386 Mon Jul 16 19:05:50 2018(r336353)
@@ -17,7 +17,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  600012
+%VERSREQ=  70
 
 STD8X16FONT?=  iso
 

Modified: head/sys/conf/Makefile.mips
==
--- head/sys/conf/Makefile.mips Mon Jul 16 19:01:05 2018(r336352)
+++ head/sys/conf/Makefile.mips Mon Jul 16 19:05:50 2018(r336353)
@@ -15,7 +15,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  600012
+%VERSREQ=  70
 
 STD8X16FONT?=  iso
 

Modified: head/sys/conf/Makefile.powerpc
==
--- head/sys/conf/Makefile.powerpc  Mon Jul 16 19:01:05 2018
(r336352)
+++ head/sys/conf/Makefile.powerpc  Mon Jul 16 19:05:50 2018
(r336353)
@@ -17,7 +17,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  600012
+%VERSREQ=  70
 
 STD8X16FONT?=  iso
 

Modified: head/sys/conf/Makefile.riscv
==
--- head/sys/conf/Makefile.riscvMon Jul 16 19:01:05 2018
(r336352)
+++ head/sys/conf/Makefile.riscvMon Jul 16 19:05:50 2018
(r336353)
@@ -19,7 +19,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  600012
+%VERSREQ=  70
 
 .if !defined(S)
 S= ../../..

Modified: head/sys/conf/Makefile.sparc64
==
--- head/sys/conf/Makefile.sparc64  Mon Jul 16 19:01:05 2018
(r336352)
+++ head/sys/conf/Makefile.sparc64  Mon Jul 16 19:05:50 2018
(r336353)
@@ -17,7 +17,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  600012
+%VERSREQ=  70
 
 STD8X16FONT?=  iso
 

Modified: head/usr.sbin/config/configvers.h
==
--- head/usr.sbin/config/configvers.h   Mon Jul 16 19:01:05 2018
(r336352)
+++ head/usr.sbin/config/configvers.h   Mon Jul 16 19:05:50 2018
(r336353)
@@ -49,5 +49,5 @@
  *
  * $FreeBSD$
  */
-#defineCONFIGVERS  600015
+#defineCONFIGVERS  70
 #defineMAJOR_VERS(x)   ((x) / 10)
___
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: r336352 - in head/sys: geom/eli kgssapi/krb5

2018-07-16 Thread Conrad Meyer
Author: cem
Date: Mon Jul 16 19:01:05 2018
New Revision: 336352
URL: https://svnweb.freebsd.org/changeset/base/336352

Log:
  OCF: Convert consumers to the session id typedef
  
  These were missed in the earlier r336269.
  
  No functional change.
  
  Sponsored by: Dell EMC Isilon

Modified:
  head/sys/geom/eli/g_eli.h
  head/sys/geom/eli/g_eli_crypto.c
  head/sys/kgssapi/krb5/kcrypto_aes.c
  head/sys/kgssapi/krb5/kcrypto_des.c
  head/sys/kgssapi/krb5/kcrypto_des3.c

Modified: head/sys/geom/eli/g_eli.h
==
--- head/sys/geom/eli/g_eli.h   Mon Jul 16 18:53:28 2018(r336351)
+++ head/sys/geom/eli/g_eli.h   Mon Jul 16 19:01:05 2018(r336352)
@@ -179,7 +179,7 @@ struct g_eli_worker {
struct g_eli_softc  *w_softc;
struct proc *w_proc;
u_intw_number;
-   uint64_t w_sid;
+   crypto_session_t w_sid;
boolean_tw_active;
LIST_ENTRY(g_eli_worker) w_next;
 };

Modified: head/sys/geom/eli/g_eli_crypto.c
==
--- head/sys/geom/eli/g_eli_crypto.cMon Jul 16 18:53:28 2018
(r336351)
+++ head/sys/geom/eli/g_eli_crypto.cMon Jul 16 19:01:05 2018
(r336352)
@@ -64,7 +64,7 @@ g_eli_crypto_cipher(u_int algo, int enc, u_char *data,
struct cryptoini cri;
struct cryptop *crp;
struct cryptodesc *crd;
-   uint64_t sid;
+   crypto_session_t sid;
u_char *p;
int error;
 

Modified: head/sys/kgssapi/krb5/kcrypto_aes.c
==
--- head/sys/kgssapi/krb5/kcrypto_aes.c Mon Jul 16 18:53:28 2018
(r336351)
+++ head/sys/kgssapi/krb5/kcrypto_aes.c Mon Jul 16 19:01:05 2018
(r336352)
@@ -45,8 +45,8 @@ __FBSDID("$FreeBSD$");
 
 struct aes_state {
struct mtx  as_lock;
-   uint64_tas_session_aes;
-   uint64_tas_session_sha1;
+   crypto_session_t as_session_aes;
+   crypto_session_t as_session_sha1;
 };
 
 static void

Modified: head/sys/kgssapi/krb5/kcrypto_des.c
==
--- head/sys/kgssapi/krb5/kcrypto_des.c Mon Jul 16 18:53:28 2018
(r336351)
+++ head/sys/kgssapi/krb5/kcrypto_des.c Mon Jul 16 19:01:05 2018
(r336352)
@@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
 
 struct des1_state {
struct mtx  ds_lock;
-   uint64_tds_session;
+   crypto_session_t ds_session;
 };
 
 static void

Modified: head/sys/kgssapi/krb5/kcrypto_des3.c
==
--- head/sys/kgssapi/krb5/kcrypto_des3.cMon Jul 16 18:53:28 2018
(r336351)
+++ head/sys/kgssapi/krb5/kcrypto_des3.cMon Jul 16 19:01:05 2018
(r336352)
@@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$");
 
 struct des3_state {
struct mtx  ds_lock;
-   uint64_tds_session;
+   crypto_session_t ds_session;
 };
 
 static void
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r336348 - in head/sys: conf crypto/armv8 modules/armv8crypto

2018-07-16 Thread Ravi Pokala
-Original Message-
From:  on behalf of Andrew Turner 

Date: 2018-07-16, Monday at 08:39
To: , , 

Subject: svn commit: r336348 - in head/sys: conf crypto/armv8 
modules/armv8crypto

> Author: andrew
> Date: Mon Jul 16 15:39:33 2018
> New Revision: 336348
> URL: https://svnweb.freebsd.org/changeset/base/336348
> 
> Log:
>   Create an empty stdint.h for arm_neon.h to include.
>   
>   The armv8crypto module includes arm_neon.h for the compiler intrinsic
>   functions. This includes the userland stdint.h file that doesn't exist in
>   the kernel. Fix this by providing an empty stdint.h to be used when we
>   include arm_neon.h.
>   
>   Sponsored by:   DARPA, AFRL
>   Differential Revision:  https://reviews.freebsd.org/D16254

THANK YOU!!!

This one file was preventing being able to do tinderbox with just 
"UNIVERSE_TARGET=kernel-toolchain" followed by "-DMAKE_JUST_KERNELS". I've 
periodically mentioned this for like a year, but lacked the knowledge to fix it 
myself. :-)

-Ravi (rpokala@)


___
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: r336351 - head/gnu/lib/libstdc++

2018-07-16 Thread Pedro F. Giffuni
Author: pfg
Date: Mon Jul 16 18:53:28 2018
New Revision: 336351
URL: https://svnweb.freebsd.org/changeset/base/336351

Log:
  Update libstdc++ configuration.
  
  Its been quite a while since the last time we updated this and since then
  we have grown iconv and a bunch of complex math functions.
  
  This only applies to the platforms which still use GCC 4.2.1 in the
  toolchain.
  
  Differential Revision:https://reviews.freebsd.org/D16289

Modified:
  head/gnu/lib/libstdc++/config.h

Modified: head/gnu/lib/libstdc++/config.h
==
--- head/gnu/lib/libstdc++/config.h Mon Jul 16 18:53:17 2018
(r336350)
+++ head/gnu/lib/libstdc++/config.h Mon Jul 16 18:53:28 2018
(r336351)
@@ -28,7 +28,7 @@
 #define HAVE_ATANF 1
 
 /* Define to 1 if you have the `atanl' function. */
-/* #undef HAVE_ATANL */
+#define HAVE_ATANL 1
 
 /* Define to 1 if you have the `ceilf' function. */
 #define HAVE_CEILF 1
@@ -55,10 +55,10 @@
 #define HAVE_COSHF 1
 
 /* Define to 1 if you have the `coshl' function. */
-/* #undef HAVE_COSHL */
+#define HAVE_COSHL 1
 
 /* Define to 1 if you have the `cosl' function. */
-/* #undef HAVE_COSL */
+#define HAVE_COSL 1
 
 /* Define to 1 if you have the  header file. */
 /* #undef HAVE_ENDIAN_H */
@@ -137,13 +137,13 @@
 #define HAVE_HYPOTL 1
 
 /* Define to 1 if you have the `iconv' function. */
-/* #undef HAVE_ICONV */
+#define HAVE_ICONV 1
 
 /* Define to 1 if you have the `iconv_close' function. */
-/* #undef HAVE_ICONV_CLOSE */
+#define HAVE_ICONV_CLOSE 1
 
 /* Define to 1 if you have the `iconv_open' function. */
-/* #undef HAVE_ICONV_OPEN */
+#define HAVE_ICONV_OPEN 1
 
 /* Define to 1 if you have the  header file. */
 #define HAVE_IEEEFP_H 1
@@ -257,7 +257,7 @@
 #define HAVE_POWF 1
 
 /* Define to 1 if you have the `powl' function. */
-/* #undef HAVE_POWL */
+#define HAVE_POWL 1
 
 /* Define to 1 if you have the `qfpclass' function. */
 /* #undef HAVE_QFPCLASS */
@@ -269,13 +269,13 @@
 #define HAVE_SIGSETJMP 1
 
 /* Define to 1 if you have the `sincos' function. */
-/* #undef HAVE_SINCOS */
+#define HAVE_SINCOS 1
 
 /* Define to 1 if you have the `sincosf' function. */
-/* #undef HAVE_SINCOSF */
+#define HAVE_SINCOSF 1
 
 /* Define to 1 if you have the `sincosl' function. */
-/* #undef HAVE_SINCOSL */
+#define HAVE_SINCOSL 1
 
 /* Define to 1 if you have the `sinf' function. */
 #define HAVE_SINF 1
@@ -284,10 +284,10 @@
 #define HAVE_SINHF 1
 
 /* Define to 1 if you have the `sinhl' function. */
-/* #undef HAVE_SINHL */
+#define HAVE_SINHL 1
 
 /* Define to 1 if you have the `sinl' function. */
-/* #undef HAVE_SINL */
+#define HAVE_SINL 1
 
 /* Define to 1 if you have the `sqrtf' function. */
 #define HAVE_SQRTF 1
@@ -323,7 +323,7 @@
 #define HAVE_STRTOLD 1
 
 /* Define if strxfrm_l is available in . */
-/* #undef HAVE_STRXFRM_L */
+#define HAVE_STRXFRM_L 1
 
 /* Define to 1 if you have the  header file. */
 #define HAVE_SYS_FILIO_H 1
@@ -341,7 +341,7 @@
 /* #undef HAVE_SYS_MACHINE_H */
 
 /* Define to 1 if you have the  header file. */
-/* #undef HAVE_SYS_PARAM_H */
+#define HAVE_SYS_PARAM_H 1
 
 /* Define to 1 if you have the  header file. */
 #define HAVE_SYS_RESOURCE_H 1
@@ -362,9 +362,6 @@
 #define HAVE_SYS_UIO_H 1
 
 /* Define if S_IFREG is available in . */
-/* #undef HAVE_S_IFREG */
-
-/* Define if S_IFREG is available in . */
 #define HAVE_S_ISREG 1
 
 /* Define to 1 if you have the `tanf' function. */
@@ -374,10 +371,10 @@
 #define HAVE_TANHF 1
 
 /* Define to 1 if you have the `tanhl' function. */
-/* #undef HAVE_TANHL */
+#define HAVE_TANHL 1
 
 /* Define to 1 if you have the `tanl' function. */
-/* #undef HAVE_TANL */
+#define HAVE_TANL 1
 
 /* Define to 1 if the target supports thread-local storage. */
 #if !defined(__mips__)
@@ -731,7 +728,7 @@
 /* Define if C99 functions in  should be used in . Using
compiler builtins for these functions requires corresponding C99 library
functions to be present. */
-/* #undef _GLIBCXX_USE_C99_COMPLEX */
+#define _GLIBCXX_USE_C99_COMPLEX 1
 
 /* Define if C99 functions in  should be used in .
Using compiler builtins for these functions requires corresponding C99
___
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: r336350 - head/usr.sbin/sysrc

2018-07-16 Thread Devin Teske
Author: dteske
Date: Mon Jul 16 18:53:17 2018
New Revision: 336350
URL: https://svnweb.freebsd.org/changeset/base/336350

Log:
  sysrc(8): Send error message to stderr (not stdout)
  
  PR:   bin/229806
  Reported by:  Andreas Sommer 
  MFC after:3 days
  X-MFC-to: stable/11 stable/10 stable/9
  Sponsored by: Smule, Inc.

Modified:
  head/usr.sbin/sysrc/sysrc

Modified: head/usr.sbin/sysrc/sysrc
==
--- head/usr.sbin/sysrc/sysrc   Mon Jul 16 18:21:29 2018(r336349)
+++ head/usr.sbin/sysrc/sysrc   Mon Jul 16 18:53:17 2018(r336350)
@@ -874,7 +874,8 @@ while [ $# -gt 0 ]; do
*)
if ! IGNORED=$( f_sysrc_get "$NAME?" ); then
[ "$IGNORE_UNKNOWNS" -o "$QUIET" ] ||
-   echo "$pgm: unknown variable '$NAME'"
+   f_err "%s: unknown variable '%s'\n" \
+   "$pgm" "$NAME"
shift 1
status=$FAILURE
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: r336326 - head/sys/dev/ichiic

2018-07-16 Thread Warner Losh
On Mon, Jul 16, 2018, 10:57 AM John Baldwin  wrote:

> On 7/15/18 6:34 PM, Oleksandr Tymoshenko wrote:
> > Author: gonzo
> > Date: Mon Jul 16 01:34:45 2018
> > New Revision: 336326
> > URL: https://svnweb.freebsd.org/changeset/base/336326
> >
> > Log:
> >   Remove MODULE_PNP_INFO for ig4(4) driver
> >
> >   ig4(4) does not support suspend/resume but present on the hardware
> where
> >   such functionality is critical, like laptops. Remove PNP info to avoid
> >   breaking suspend/resume on the systems where ig4(4) load is not
> explicitly
> >   requested by the user.
> >
> >   PR: 229791
> >   Reported by:Ali Abdallah
>
> I wonder if we don't want instead a way to tag a module as "don't autoload"
> so that you can still have a way to say "show me which unprobed devices
> have modules available".  One option would be to have an rc.conf knob which
> is a regex that gets used with 'egrep -v' in the rc.d script on the output
> of devmatch.  This has the slight advantage that a user can customize it
> via rc.conf.  (For example, when working on cxgbe(4) on my dev boxes I
> don't
> want it to autoload, but in a production environment we might want it to
> autoload by default.)  Another option might be to add some new type of
> PNP info that is a boolean "autoload" that defaults to true and teach
> devmatch to honor the boolean.
>

How does this break suspend / resume? That makes no sense to me at all. I
think if this changes anything, it only we could fix that by accident.

I get wanting to have a blacklist, but that belongs in rc, not the driver.
That's on my soon list. But I need to implement the freeze thaw of proving
first so I can re.ove the ugly kludge for usb first so we can filter again.

We also need a newbus flag that says the device has been attached at least
once so kldunload works...

Warner

>
___
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: r336349 - head/sys/sys

2018-07-16 Thread Andrew Turner
Author: andrew
Date: Mon Jul 16 18:21:29 2018
New Revision: 336349
URL: https://svnweb.freebsd.org/changeset/base/336349

Log:
  Don't use the static keyword with DPCPU defines in arm64 modules.
  
  On arm64 compiler will create PC-relative loads and stores for static data.
  This means it doesn't emit a relocation. Unfortunately the in-kernel linker
  expects there to be one for DPCPU defines so it can modify its value so the
  code will use the correct DPCPU region.
  
  To workaround the lack of a relocation with static data remove it when
  building modules on arm64. The kernel is unaffected as it doesn't rely on
  modifying these relocations to find the data.
  
  PR:   225684
  Reported by:  Johannes Lundberg 
  Reported by:  Jose Luis Duran 
  Reported by:  Greg V 
  Reviewed by:  bz
  Sponsored by: ABT Systems Ltd
  Differential Revision:https://reviews.freebsd.org/D16145

Modified:
  head/sys/sys/pcpu.h

Modified: head/sys/sys/pcpu.h
==
--- head/sys/sys/pcpu.h Mon Jul 16 15:39:33 2018(r336348)
+++ head/sys/sys/pcpu.h Mon Jul 16 18:21:29 2018(r336349)
@@ -84,8 +84,26 @@ extern uintptr_t dpcpu_off[];
 /* struct _hack is to stop this from being used with the static keyword. */
 #defineDPCPU_DEFINE(t, n)  \
 struct _hack; t DPCPU_NAME(n) __section(DPCPU_SETNAME) __used
+#if defined(KLD_MODULE) && defined(__aarch64__)
+/*
+ * On some architectures the compiler will use PC-relative load to
+ * find the address of DPCPU data with the static keyword. We then
+ * use this to find the offset of the data in a per-CPU region.
+ * This works for in the kernel as we can allocate the space ahead
+ * of time, however modules need to allocate a sepatate space and
+ * then use relocations to fix the address of the data. As
+ * PC-relative data doesn't have a relocation there is nothing for
+ * the kernel module linker to fix so data is accessed from the
+ * wrong location.
+ *
+ * This is a workaround until a better solution can be found.
+*/
 #defineDPCPU_DEFINE_STATIC(t, n)   \
+t DPCPU_NAME(n) __section(DPCPU_SETNAME) __used
+#else
+#defineDPCPU_DEFINE_STATIC(t, n)   \
 static t DPCPU_NAME(n) __section(DPCPU_SETNAME) __used
+#endif
 
 /*
  * Accessors with a given base.
___
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: r336326 - head/sys/dev/ichiic

2018-07-16 Thread John Baldwin
On 7/15/18 6:34 PM, Oleksandr Tymoshenko wrote:
> Author: gonzo
> Date: Mon Jul 16 01:34:45 2018
> New Revision: 336326
> URL: https://svnweb.freebsd.org/changeset/base/336326
> 
> Log:
>   Remove MODULE_PNP_INFO for ig4(4) driver
>   
>   ig4(4) does not support suspend/resume but present on the hardware where
>   such functionality is critical, like laptops. Remove PNP info to avoid
>   breaking suspend/resume on the systems where ig4(4) load is not explicitly
>   requested by the user.
>   
>   PR: 229791
>   Reported by:Ali Abdallah

I wonder if we don't want instead a way to tag a module as "don't autoload"
so that you can still have a way to say "show me which unprobed devices
have modules available".  One option would be to have an rc.conf knob which
is a regex that gets used with 'egrep -v' in the rc.d script on the output
of devmatch.  This has the slight advantage that a user can customize it
via rc.conf.  (For example, when working on cxgbe(4) on my dev boxes I don't
want it to autoload, but in a production environment we might want it to
autoload by default.)  Another option might be to add some new type of
PNP info that is a boolean "autoload" that defaults to true and teach
devmatch to honor the boolean.

-- 
John Baldwin
___
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: r336348 - in head/sys: conf crypto/armv8 modules/armv8crypto

2018-07-16 Thread Andrew Turner
Author: andrew
Date: Mon Jul 16 15:39:33 2018
New Revision: 336348
URL: https://svnweb.freebsd.org/changeset/base/336348

Log:
  Create an empty stdint.h for arm_neon.h to include.
  
  The armv8crypto module includes arm_neon.h for the compiler intrinsic
  functions. This includes the userland stdint.h file that doesn't exist in
  the kernel. Fix this by providing an empty stdint.h to be used when we
  include arm_neon.h.
  
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D16254

Added:
  head/sys/crypto/armv8/stdint.h   (contents, props changed)
Modified:
  head/sys/conf/files.arm64
  head/sys/modules/armv8crypto/Makefile

Modified: head/sys/conf/files.arm64
==
--- head/sys/conf/files.arm64   Mon Jul 16 15:29:32 2018(r336347)
+++ head/sys/conf/files.arm64   Mon Jul 16 15:39:33 2018(r336348)
@@ -177,7 +177,7 @@ contrib/vchiq/interface/vchiq_arm/vchiq_util.c  optiona
 crypto/armv8/armv8_crypto.coptionalarmv8crypto
 armv8_crypto_wrap.ooptionalarmv8crypto \
dependency  "$S/crypto/armv8/armv8_crypto_wrap.c"   \
-   compile-with"${CC} -c 
${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} ${WERROR} 
${NO_WCAST_QUAL} ${PROF} -march=armv8-a+crypto ${.IMPSRC}" \
+   compile-with"${CC} -c 
${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} -I$S/crypto/armv8/ 
${WERROR} ${NO_WCAST_QUAL} ${PROF} -march=armv8-a+crypto ${.IMPSRC}" \
no-implicit-rule\
clean   "armv8_crypto_wrap.o"
 crypto/blowfish/bf_enc.c   optionalcrypto | ipsec | ipsec_support

Added: head/sys/crypto/armv8/stdint.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/crypto/armv8/stdint.h  Mon Jul 16 15:39:33 2018
(r336348)
@@ -0,0 +1,5 @@
+/*
+ * This is here as arm_neon.h includes . It can be empty as
+ * we already include the needed headers.
+ */
+/* $FreeBSD$ */

Modified: head/sys/modules/armv8crypto/Makefile
==
--- head/sys/modules/armv8crypto/Makefile   Mon Jul 16 15:29:32 2018
(r336347)
+++ head/sys/modules/armv8crypto/Makefile   Mon Jul 16 15:39:33 2018
(r336348)
@@ -11,6 +11,7 @@ OBJS+=armv8_crypto_wrap.o
 # Remove -nostdinc so we can get the intrinsics.
 armv8_crypto_wrap.o: armv8_crypto_wrap.c
${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} \
+   -I${SRCTOP}/sys/crypto/armv8 \
${WERROR} ${PROF} \
 -march=armv8-a+crypto ${.IMPSRC}
${CTFCONVERT_CMD}
___
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: r336347 - head

2018-07-16 Thread Warner Losh
Author: imp
Date: Mon Jul 16 15:29:32 2018
New Revision: 336347
URL: https://svnweb.freebsd.org/changeset/base/336347

Log:
  Add pointer to freebsd-numerics for libm.

Modified:
  head/MAINTAINERS

Modified: head/MAINTAINERS
==
--- head/MAINTAINERSMon Jul 16 15:02:21 2018(r336346)
+++ head/MAINTAINERSMon Jul 16 15:29:32 2018(r336347)
@@ -58,6 +58,7 @@ kqueuejmg Pre-commit review requested.  
Documentatio
 libdpv dteske  Pre-commit review requested. Keep in sync with dpv(1).
 libfetch   des Pre-commit review requested, email only.
 libfigpar  dteske  Pre-commit review requested.
+libm   freebsd-numericsSend email with patches to 
freebsd-numerics@
 libpam des Pre-commit review requested, email only.
 linprocfs  des Pre-commit review requested, email only.
 lprgad Pre-commit review requested, particularly for
___
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: r336339 - head/sys/arm/allwinner/clkng

2018-07-16 Thread Emmanuel Vadot
Author: manu
Date: Mon Jul 16 13:38:16 2018
New Revision: 336339
URL: https://svnweb.freebsd.org/changeset/base/336339

Log:
  allwinner: a83t: Fix PLL_CPU clocks
  
  The PLL_CPU clocks formula is 24Mhz * N and not 24Mhz / N
  Fix it by using a NKMP clock with fixed factor values for the one
  unused.

Modified:
  head/sys/arm/allwinner/clkng/ccu_a83t.c

Modified: head/sys/arm/allwinner/clkng/ccu_a83t.c
==
--- head/sys/arm/allwinner/clkng/ccu_a83t.c Mon Jul 16 13:21:49 2018
(r336338)
+++ head/sys/arm/allwinner/clkng/ccu_a83t.c Mon Jul 16 13:38:16 2018
(r336339)
@@ -206,24 +206,29 @@ FIXED_CLK(osc12m_clk,
 2, /* div */
 0);/* flags */
 
+/* CPU PLL are 24Mhz * N / P */
 static const char *pll_c0cpux_parents[] = {"osc24M"};
 static const char *pll_c1cpux_parents[] = {"osc24M"};
-NM_CLK(pll_c0cpux_clk,
+NKMP_CLK(pll_c0cpux_clk,
 CLK_PLL_C0CPUX,/* id */
 "pll_c0cpux", pll_c0cpux_parents,  /* name, parents */
 0x00,  /* offset */
 8, 8, 0, AW_CLK_FACTOR_ZERO_BASED, /* n factor */
-0, 0, 1, AW_CLK_FACTOR_FIXED,  /* m factor (fake) */
-0, 0,  /* mux */
+0, 0, 1, AW_CLK_FACTOR_FIXED,  /* k factor (fake) */
+0, 0, 1, AW_CLK_FACTOR_FIXED,  /* m factor */
+0, 0, 1, AW_CLK_FACTOR_FIXED,  /* p factor (fake) */
+0, 0,  /* lock */
 31,/* gate */
 AW_CLK_HAS_GATE | AW_CLK_SCALE_CHANGE);/* flags */
-NM_CLK(pll_c1cpux_clk,
+NKMP_CLK(pll_c1cpux_clk,
 CLK_PLL_C1CPUX,/* id */
 "pll_c1cpux", pll_c1cpux_parents,  /* name, parents */
 0x04,  /* offset */
 8, 8, 0, AW_CLK_FACTOR_ZERO_BASED, /* n factor */
-0, 0, 1, AW_CLK_FACTOR_FIXED,  /* m factor (fake) */
-0, 0,  /* mux */
+0, 0, 1, AW_CLK_FACTOR_FIXED,  /* k factor (fake) */
+0, 0, 1, AW_CLK_FACTOR_FIXED,  /* m factor */
+0, 0, 1, AW_CLK_FACTOR_FIXED,  /* p factor (fake) */
+0, 0,  /* lock */
 31,/* gate */
 AW_CLK_HAS_GATE | AW_CLK_SCALE_CHANGE);/* flags */
 
@@ -689,8 +694,8 @@ static struct aw_ccung_clk a83t_clks[] = {
{ .type = AW_CLK_NKMP, .clk.nkmp = _hsic_clk},
{ .type = AW_CLK_NKMP, .clk.nkmp = _de_clk},
{ .type = AW_CLK_NKMP, .clk.nkmp = _video1_clk},
-   { .type = AW_CLK_NM, .clk.nm = _c0cpux_clk},
-   { .type = AW_CLK_NM, .clk.nm = _c1cpux_clk},
+   { .type = AW_CLK_NKMP, .clk.nkmp = _c0cpux_clk},
+   { .type = AW_CLK_NKMP, .clk.nkmp = _c1cpux_clk},
{ .type = AW_CLK_NM, .clk.nm = _clk},
{ .type = AW_CLK_NM, .clk.nm = _clk},
{ .type = AW_CLK_NM, .clk.nm = _clk},
___
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: r336337 - head

2018-07-16 Thread Kyle Evans
Author: kevans
Date: Mon Jul 16 13:14:53 2018
New Revision: 336337
URL: https://svnweb.freebsd.org/changeset/base/336337

Log:
  Unconditionally build libnv in legacy
  
  Rather than using a config(8) built from new tree linking libnv built on
  host.

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Mon Jul 16 11:03:05 2018(r336336)
+++ head/Makefile.inc1  Mon Jul 16 13:14:53 2018(r336337)
@@ -1941,19 +1941,13 @@ update: .PHONY
 _elftoolchain_libs= lib/libelf lib/libdwarf
 .endif
 
-# An updated libnv is needed for the cnv(9) API used in config(8).
-# r335343 stabilized the cnvlist API used by config(8)
-.if ${BOOTSTRAPPING} < 1200070
-_libnv=lib/libnv
-.endif
-
 legacy: .PHONY
 .if ${BOOTSTRAPPING} < ${MINIMUM_SUPPORTED_OSREL} && ${BOOTSTRAPPING} != 0
@echo "ERROR: Source upgrades from versions prior to 
${MINIMUM_SUPPORTED_REL} are not supported."; \
false
 .endif
 
-.for _tool in tools/build ${_elftoolchain_libs} ${_libnv}
+.for _tool in tools/build ${_elftoolchain_libs} lib/libnv
${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,all,install)"; \
cd ${.CURDIR}/${_tool}; \
if [ -z "${NO_OBJWALK}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
___
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: r336336 - head/tools/build

2018-07-16 Thread Alex Richardson
Author: arichardson
Date: Mon Jul 16 11:03:05 2018
New Revision: 336336
URL: https://svnweb.freebsd.org/changeset/base/336336

Log:
  Fix buildworld on FreeBSD 10
  
  Since r336126 we depend on explicit_bzero() for the libmd
  bootstrap. Add it to -legacy if it is not found in /usr/include/strings.h.
  
  Reviewed By:  ian
  Approved By:  brooks (mentor)
  Differential Revision: https://reviews.freebsd.org/D16245

Added:
  head/tools/build/strings.h   (contents, props changed)
Modified:
  head/tools/build/Makefile

Modified: head/tools/build/Makefile
==
--- head/tools/build/Makefile   Mon Jul 16 10:57:26 2018(r336335)
+++ head/tools/build/Makefile   Mon Jul 16 11:03:05 2018(r336336)
@@ -41,6 +41,13 @@ SYSINCS+=stat.h
 SRCS+= futimens.c utimensat.c
 .endif
 
+_WITH_EXPLICIT_BZERO!= grep -c explicit_bzero /usr/include/strings.h || true
+.if ${_WITH_EXPLICIT_BZERO} == 0
+.PATH: ${SRCTOP}/sys/libkern
+INCS+= strings.h
+SRCS+= explicit_bzero.c
+.endif
+
 .if empty(SRCS)
 SRCS=  dummy.c
 .endif

Added: head/tools/build/strings.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/build/strings.h  Mon Jul 16 11:03:05 2018(r336336)
@@ -0,0 +1,42 @@
+/*-
+ * Copyright (c) 2015 Dimitry Andric 
+ * Copyright (c) 2018 Alex Richardson 
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _LEGACY_STRINGS_H_
+#define_LEGACY_STRINGS_H_
+
+#include_next 
+
+__BEGIN_DECLS
+
+#if __BSD_VISIBLE
+voidexplicit_bzero(void *, size_t);
+#endif /* __BSD_VISIBLE */
+
+__END_DECLS
+
+#endif /* !_LEGACY_STRINGS_H_ */
___
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: r336335 - in head: lib/libnv tools/build

2018-07-16 Thread Alex Richardson
Author: arichardson
Date: Mon Jul 16 10:57:26 2018
New Revision: 336335
URL: https://svnweb.freebsd.org/changeset/base/336335

Log:
  No longer install sys/nv.h and sys/cnv.h in lib/libnv/Makefile
  
  Use tools/build/Makefile to install the headers into ${WORLDTMP}/legacy
  instead. Compared to r336026 this has the minor advantage that it avoids
  unncessary header installation when building the non-bootstrap libnv.
  
  Reviewed By:  bdrewery, kevans
  Approved By:  brooks (mentor)
  Differential Revision: https://reviews.freebsd.org/D16187

Modified:
  head/lib/libnv/Makefile
  head/tools/build/Makefile

Modified: head/lib/libnv/Makefile
==
--- head/lib/libnv/Makefile Mon Jul 16 10:32:11 2018(r336334)
+++ head/lib/libnv/Makefile Mon Jul 16 10:57:26 2018(r336335)
@@ -17,9 +17,6 @@ SRCS+=msgio.c
 SRCS+= nvlist.c
 SRCS+= nvpair.c
 
-INCSDIR=   ${INCLUDEDIR}/sys
-INCS=  ${SRCTOP}/sys/sys/cnv.h ${SRCTOP}/sys/sys/nv.h
-
 HAS_TESTS=
 SUBDIR.${MK_TESTS}+= tests
 

Modified: head/tools/build/Makefile
==
--- head/tools/build/Makefile   Mon Jul 16 10:32:11 2018(r336334)
+++ head/tools/build/Makefile   Mon Jul 16 10:57:26 2018(r336335)
@@ -49,4 +49,7 @@ SRCS= dummy.c
 SUBDIR=cross-build
 .endif
 
+# Needed to build config (since it uses libnv)
+SYSINCS+=  ${SRCTOP}/sys/sys/nv.h ${SRCTOP}/sys/sys/cnv.h
+
 .include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"