svn commit: r333783 - in head: contrib/xz contrib/xz/src/common contrib/xz/src/liblzma/api contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/common contrib/xz/src/liblzma/lzma contrib/xz/src/l...

2018-05-18 Thread Xin LI
Author: delphij
Date: Fri May 18 06:10:16 2018
New Revision: 333783
URL: https://svnweb.freebsd.org/changeset/base/333783

Log:
  MFV r333779: xz 5.2.4.
  
  MFC after:2 weeks

Modified:
  head/contrib/xz/COPYING
  head/contrib/xz/ChangeLog
  head/contrib/xz/README
  head/contrib/xz/THANKS
  head/contrib/xz/src/common/tuklib_integer.h
  head/contrib/xz/src/liblzma/api/lzma.h
  head/contrib/xz/src/liblzma/api/lzma/base.h
  head/contrib/xz/src/liblzma/api/lzma/container.h
  head/contrib/xz/src/liblzma/api/lzma/index.h
  head/contrib/xz/src/liblzma/api/lzma/version.h
  head/contrib/xz/src/liblzma/common/alone_decoder.c
  head/contrib/xz/src/liblzma/common/auto_decoder.c
  head/contrib/xz/src/liblzma/common/common.c
  head/contrib/xz/src/liblzma/common/index_decoder.c
  head/contrib/xz/src/liblzma/common/stream_decoder.c
  head/contrib/xz/src/liblzma/lzma/lzma_decoder.c
  head/contrib/xz/src/liblzma/rangecoder/range_common.h
  head/contrib/xz/src/xz/file_io.c
  head/contrib/xz/src/xz/list.c
  head/contrib/xz/src/xz/xz.1
  head/contrib/xz/src/xzdec/xzdec.1
  head/lib/liblzma/config.h
Directory Properties:
  head/contrib/xz/   (props changed)

Modified: head/contrib/xz/COPYING
==
--- head/contrib/xz/COPYING Fri May 18 06:09:15 2018(r333782)
+++ head/contrib/xz/COPYING Fri May 18 06:10:16 2018(r333783)
@@ -47,7 +47,7 @@ XZ Utils Licensing
 naturally it is not legally required. Here is an example of a good
 notice to put into "about box" or into documentation:
 
-This software includes code from XZ Utils .
+This software includes code from XZ Utils .
 
 The following license texts are included in the following files:
   - COPYING.LGPLv2.1: GNU Lesser General Public License version 2.1

Modified: head/contrib/xz/ChangeLog
==
--- head/contrib/xz/ChangeLog   Fri May 18 06:09:15 2018(r333782)
+++ head/contrib/xz/ChangeLog   Fri May 18 06:10:16 2018(r333783)
@@ -1,3 +1,284 @@
+commit b5be61cc06088bb07f488f9baf7d447ff47b37c1
+Author: Lasse Collin 
+Date:   2018-04-29 19:00:06 +0300
+
+Bump version and soname for 5.2.4.
+
+ src/liblzma/Makefile.am| 2 +-
+ src/liblzma/api/lzma/version.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit c47fa6d06745bb2e99866e76b81ac7a9c5a8bfec
+Author: Lasse Collin 
+Date:   2018-04-29 18:48:00 +0300
+
+extra/scanlzma: Fix compiler warnings.
+
+ extra/scanlzma/scanlzma.c | 6 +-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+commit 7b350fe21aa4fd6495a3b6188a40e3f1ae7c0edf
+Author: Lasse Collin 
+Date:   2018-04-29 18:15:37 +0300
+
+Add NEWS for 5.2.4.
+
+ NEWS | 27 +++
+ 1 file changed, 27 insertions(+)
+
+commit 5801591162a280aa52d156dfde42c531ec7fd8b6
+Author: Lasse Collin 
+Date:   2018-02-06 19:36:30 +0200
+
+Update THANKS.
+
+ THANKS | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit c4a616f4536146f8906e1b4412eefeec07b28fae
+Author: Ben Boeckel 
+Date:   2018-01-29 13:58:18 -0500
+
+nothrow: use noexcept for C++11 and newer
+
+In C++11, the `throw()` specifier is deprecated and `noexcept` is
+preffered instead.
+
+ src/liblzma/api/lzma.h | 6 +-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+commit 0b8947782ff3c5ef830a7f85412e44dcf3cdeb77
+Author: Lasse Collin 
+Date:   2018-02-06 18:02:48 +0200
+
+liblzma: Remove incorrect #ifdef from range_common.h.
+
+In most cases it was harmless but it could affect some
+custom build systems.
+
+Thanks to Pippijn van Steenhoven.
+
+ src/liblzma/rangecoder/range_common.h | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+commit 48f3b9f73ffea7f55d5678997aba0e79d2e82168
+Author: Lasse Collin 
+Date:   2018-01-10 22:10:39 +0200
+
+Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit a3ce3e902342be37c626a561ce3d9ffcf27d0f94
+Author: Lasse Collin 
+Date:   2018-01-10 21:54:27 +0200
+
+tuklib_integer: New Intel C compiler needs immintrin.h.
+
+Thanks to Melanie Blower (Intel) for the patch.
+
+ src/common/tuklib_integer.h | 11 +++
+ 1 file changed, 11 insertions(+)
+
+commit 4505ca483985f88c6923c05a43b4327feaab83b1
+Author: Lasse Collin 
+Date:   2017-09-24 20:04:24 +0300
+
+Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 1ef3cc226e3ce173575c218238b71a4eecabc470
+Author: Lasse Collin 
+Date:   2017-09-16 20:36:20 +0300
+
+Windows: Fix paths in VS project files.
+
+Some paths use slashes instead of backslashes as 

svn commit: r333782 - head/sys/dev/cxgbe

2018-05-18 Thread Navdeep Parhar
Author: np
Date: Fri May 18 06:09:15 2018
New Revision: 333782
URL: https://svnweb.freebsd.org/changeset/base/333782

Log:
  cxgbe(4): Implement ifnet callbacks that deal with send tags.
  
  An etid (ethoffload tid) is allocated for a send tag and it acquires a
  reference on the traffic class that matches the send parameters
  associated with the tag.
  
  Sponsored by: Chelsio Communications

Modified:
  head/sys/dev/cxgbe/adapter.h
  head/sys/dev/cxgbe/offload.h
  head/sys/dev/cxgbe/t4_main.c
  head/sys/dev/cxgbe/t4_sched.c

Modified: head/sys/dev/cxgbe/adapter.h
==
--- head/sys/dev/cxgbe/adapter.hFri May 18 04:13:58 2018
(r333781)
+++ head/sys/dev/cxgbe/adapter.hFri May 18 06:09:15 2018
(r333782)
@@ -1236,6 +1236,15 @@ int t4_free_tx_sched(struct adapter *);
 void t4_update_tx_sched(struct adapter *);
 int t4_reserve_cl_rl_kbps(struct adapter *, int, u_int, int *);
 void t4_release_cl_rl_kbps(struct adapter *, int, int);
+#ifdef RATELIMIT
+void t4_init_etid_table(struct adapter *);
+void t4_free_etid_table(struct adapter *);
+int cxgbe_snd_tag_alloc(struct ifnet *, union if_snd_tag_alloc_params *,
+struct m_snd_tag **);
+int cxgbe_snd_tag_modify(struct m_snd_tag *, union if_snd_tag_modify_params *);
+int cxgbe_snd_tag_query(struct m_snd_tag *, union if_snd_tag_query_params *);
+void cxgbe_snd_tag_free(struct m_snd_tag *);
+#endif
 
 /* t4_filter.c */
 int get_filter_mode(struct adapter *, uint32_t *);

Modified: head/sys/dev/cxgbe/offload.h
==
--- head/sys/dev/cxgbe/offload.hFri May 18 04:13:58 2018
(r333781)
+++ head/sys/dev/cxgbe/offload.hFri May 18 06:09:15 2018
(r333782)
@@ -79,6 +79,38 @@ union aopen_entry {
union aopen_entry *next;
 };
 
+struct cxgbe_snd_tag {
+   struct m_snd_tag com;
+   struct adapter *adapter;
+   u_int flags;
+   struct mtx lock;
+   int port_id;
+   int etid;
+   struct sge_wrq *eo_txq;
+   uint16_t iqid;
+   int8_t schedcl;
+   uint64_t max_rate;  /* in bytes/s */
+   int8_t next_credits;/* need these many tx credits next */
+   uint8_t next_nsegs; /* next WR will have these many GL segs total */
+   uint8_t next_msegs; /* max segs for a single mbuf in next chain */
+   uint8_t tx_total;   /* total tx WR credits (in 16B units) */
+   uint8_t tx_credits; /* tx WR credits (in 16B units) available */
+   uint8_t tx_nocompl; /* tx WR credits since last compl request */
+   uint8_t ncompl; /* # of completions outstanding. */
+};
+
+static inline struct cxgbe_snd_tag *
+mst_to_cst(struct m_snd_tag *t)
+{
+
+   return (__containerof(t, struct cxgbe_snd_tag, com));
+}
+
+union etid_entry {
+   struct cxgbe_snd_tag *cst;
+   union etid_entry *next;
+};
+
 /*
  * Holds the size, base address, free list start, etc of the TID, server TID,
  * and active-open TID tables.  The tables themselves are allocated 
dynamically.
@@ -98,8 +130,8 @@ struct tid_info {
 
struct mtx atid_lock __aligned(CACHE_LINE_SIZE);
union aopen_entry *atid_tab;
-   u_int natids;
union aopen_entry *afree;
+   u_int natids;
u_int atids_in_use;
 
struct mtx ftid_lock __aligned(CACHE_LINE_SIZE);
@@ -115,9 +147,11 @@ struct tid_info {
/* ntids, tids_in_use */
 
struct mtx etid_lock __aligned(CACHE_LINE_SIZE);
-   struct etid_entry *etid_tab;
+   union etid_entry *etid_tab;
+   union etid_entry *efree;
u_int netids;
u_int etid_base;
+   u_int etids_in_use;
 };
 
 struct t4_range {

Modified: head/sys/dev/cxgbe/t4_main.c
==
--- head/sys/dev/cxgbe/t4_main.cFri May 18 04:13:58 2018
(r333781)
+++ head/sys/dev/cxgbe/t4_main.cFri May 18 06:09:15 2018
(r333782)
@@ -1105,6 +1105,9 @@ t4_attach(device_t dev)
 
t4_init_l2t(sc, M_WAITOK);
t4_init_tx_sched(sc);
+#ifdef RATELIMIT
+   t4_init_etid_table(sc);
+#endif
 
/*
 * Second pass over the ports.  This time we know the number of rx and
@@ -1375,6 +1378,9 @@ t4_detach_common(device_t dev)
 
if (sc->l2t)
t4_free_l2t(sc->l2t);
+#ifdef RATELIMIT
+   t4_free_etid_table(sc);
+#endif
 
 #if defined(TCP_OFFLOAD) || defined(RATELIMIT)
free(sc->sge.ofld_txq, M_CXGBE);
@@ -1486,6 +1492,12 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi)
ifp->if_transmit = cxgbe_transmit;
ifp->if_qflush = cxgbe_qflush;
ifp->if_get_counter = cxgbe_get_counter;
+#ifdef RATELIMIT
+   ifp->if_snd_tag_alloc = cxgbe_snd_tag_alloc;
+   ifp->if_snd_tag_modify = cxgbe_snd_tag_modify;
+   ifp->if_snd_tag_query = cxgbe_snd_tag_query;
+   ifp->if_snd_tag_free = 

svn commit: r333784 - head/sys/conf

2018-05-18 Thread Mateusz Guzik
Author: mjg
Date: Fri May 18 07:31:26 2018
New Revision: 333784
URL: https://svnweb.freebsd.org/changeset/base/333784

Log:
  amd64: tweak the read_frequently section
  
  1. align to 128 bytes to avoid possible waste from the preceeding section
  2. sort entries by alignment SORT_BY_ALIGNMENT, plugging the holes (most
  entries are one byte in size, but they got interleaved with bigger ones)
  
  Interestingly I was looking for a feature of the sort earlier and failed
  to find it. It turns out the script was already utilizing sorting in other
  places, so shame on me.
  
  Thanks for Travis Geiselbrecht for pointing me at the feature.

Modified:
  head/sys/conf/ldscript.amd64

Modified: head/sys/conf/ldscript.amd64
==
--- head/sys/conf/ldscript.amd64Fri May 18 06:10:16 2018
(r333783)
+++ head/sys/conf/ldscript.amd64Fri May 18 07:31:26 2018
(r333784)
@@ -146,10 +146,10 @@ SECTIONS
   .got: { *(.got) }
   . = DATA_SEGMENT_RELRO_END (24, .);
   .got.plt: { *(.got.plt) }
-  . = ALIGN(64);
+  . = ALIGN(128);
   .data.read_frequently :
   {
-*(.data.read_frequently)
+*(SORT_BY_ALIGNMENT(.data.read_frequently))
   }
   .data.read_mostly :
   {
___
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: r333787 - head/sbin/ifconfig

2018-05-18 Thread Andrey V. Elsukov
Author: ae
Date: Fri May 18 12:12:24 2018
New Revision: 333787
URL: https://svnweb.freebsd.org/changeset/base/333787

Log:
  Make the name of option that toggles IFCAP_HWRXTSTMP capability to
  match the name of this capability. It was added recently and is not merged
  to stable branch, so I hope it is not too late to change the name.
  
  Reviewed by:  kib
  Differential Revision:https://reviews.freebsd.org/D15475

Modified:
  head/sbin/ifconfig/ifconfig.c

Modified: head/sbin/ifconfig/ifconfig.c
==
--- head/sbin/ifconfig/ifconfig.c   Fri May 18 11:32:48 2018
(r333786)
+++ head/sbin/ifconfig/ifconfig.c   Fri May 18 12:12:24 2018
(r333787)
@@ -1487,8 +1487,8 @@ static struct cmd basic_cmds[] = {
DEF_CMD("-wol_magic",   -IFCAP_WOL_MAGIC,   setifcap),
DEF_CMD("txrtlmt",  IFCAP_TXRTLMT,  setifcap),
DEF_CMD("-txrtlmt", -IFCAP_TXRTLMT, setifcap),
-   DEF_CMD("hwrxtsmp", IFCAP_HWRXTSTMP,setifcap),
-   DEF_CMD("-hwrxtsmp",-IFCAP_HWRXTSTMP,   setifcap),
+   DEF_CMD("hwrxtstmp",IFCAP_HWRXTSTMP,setifcap),
+   DEF_CMD("-hwrxtstmp",   -IFCAP_HWRXTSTMP,   setifcap),
DEF_CMD("normal",   -IFF_LINK0, setifflags),
DEF_CMD("compress", IFF_LINK0,  setifflags),
DEF_CMD("noicmp",   IFF_LINK1,  setifflags),
___
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: r333786 - head/sys/arm64/conf

2018-05-18 Thread Andrew Turner
Author: andrew
Date: Fri May 18 11:32:48 2018
New Revision: 333786
URL: https://svnweb.freebsd.org/changeset/base/333786

Log:
  Enable the Qualcomm MSM UART driver. This is needed for some Qualcomm
  Snapdragon SoCs.
  
  Obtained from:ABT Systems Ltd
  Sponsored by: Turing Robotic Industries

Modified:
  head/sys/arm64/conf/GENERIC

Modified: head/sys/arm64/conf/GENERIC
==
--- head/sys/arm64/conf/GENERIC Fri May 18 10:17:13 2018(r333785)
+++ head/sys/arm64/conf/GENERIC Fri May 18 11:32:48 2018(r333786)
@@ -158,6 +158,7 @@ device  dwmmc
 
 # Serial (COM) ports
 device uart# Generic UART driver
+device uart_msm# Qualcomm MSM UART driver
 device uart_mvebu  # Armada 3700 UART driver
 device uart_ns8250 # ns8250-type UART driver
 device uart_snps
___
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: r333832 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 03:55:42 2018
New Revision: 333832
URL: https://svnweb.freebsd.org/changeset/base/333832

Log:
  remove unused variable

Modified:
  head/sys/kern/kern_shutdown.c

Modified: head/sys/kern/kern_shutdown.c
==
--- head/sys/kern/kern_shutdown.c   Sat May 19 03:52:55 2018
(r333831)
+++ head/sys/kern/kern_shutdown.c   Sat May 19 03:55:42 2018
(r333832)
@@ -1495,10 +1495,7 @@ dump_write(struct dumperinfo *di, void *virtual, vm_of
 int
 dump_finish(struct dumperinfo *di, struct kerneldumpheader *kdh)
 {
-   uint64_t extent;
int error;
-
-   extent = dtoh64(kdh->dumpextent);
 
if (di->kdcomp != NULL) {
error = compressor_flush(di->kdcomp->kdc_stream);
___
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: r333824 - head/sys/powerpc/include

2018-05-18 Thread Justin Hibbits
Author: jhibbits
Date: Sat May 19 03:23:46 2018
New Revision: 333824
URL: https://svnweb.freebsd.org/changeset/base/333824

Log:
  Add some Hypervisor interrupt definitions
  
  This mostly completes the interrupt definitions.  There are still some left 
out,
  less likely to be used in the near term.

Modified:
  head/sys/powerpc/include/trap.h

Modified: head/sys/powerpc/include/trap.h
==
--- head/sys/powerpc/include/trap.h Sat May 19 02:17:18 2018
(r333823)
+++ head/sys/powerpc/include/trap.h Sat May 19 03:23:46 2018
(r333824)
@@ -77,11 +77,18 @@
 #defineEXC_DSMISS  0x1200  /* Data store translation miss 
*/
 
 /* Power ISA 2.06+: */
+#defineEXC_HDSI0x0e00  /* Hypervisor Data Storage */
+#defineEXC_HISI0x0e20  /* Hypervisor Instruction 
Storage */
 #defineEXC_HEA 0x0e40  /* Hypervisor Emulation 
Assistance */
+#defineEXC_HMI 0x0e60  /* Hypervisor Maintenance */
 #defineEXC_VSX 0x0f40  /* VSX Unavailable */
 
 /* Power ISA 2.07+: */
 #defineEXC_FAC 0x0f60  /* Facility Unavailable */
+#defineEXC_HFAC0x0f80  /* Hypervisor Facility 
Unavailable */
+
+/* Power ISA 3.0+: */
+#defineEXC_HVI 0x0ea0  /* Hypervisor Virtualization */
 
 /* The following are available on 4xx and 85xx */
 #defineEXC_CRIT0x0100  /* Critical Input Interrupt */
___
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: r333864 - head/sys/net

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 05:27:49 2018
New Revision: 333864
URL: https://svnweb.freebsd.org/changeset/base/333864

Log:
  net: fix set but not used

Modified:
  head/sys/net/if_clone.c
  head/sys/net/if_epair.c
  head/sys/net/if_lagg.c
  head/sys/net/if_stf.c
  head/sys/net/if_vxlan.c
  head/sys/net/iflib.c

Modified: head/sys/net/if_clone.c
==
--- head/sys/net/if_clone.c Sat May 19 05:14:05 2018(r333863)
+++ head/sys/net/if_clone.c Sat May 19 05:27:49 2018(r333864)
@@ -416,7 +416,7 @@ if_clone_simple(const char *name, ifcs_create_t create
 
for (unit = 0; unit < minifs; unit++) {
char name[IFNAMSIZ];
-   int error;
+   int error __unused;
 
snprintf(name, IFNAMSIZ, "%s%d", ifc->ifc_name, unit);
error = if_clone_createif(ifc, name, IFNAMSIZ, NULL);

Modified: head/sys/net/if_epair.c
==
--- head/sys/net/if_epair.c Sat May 19 05:14:05 2018(r333863)
+++ head/sys/net/if_epair.c Sat May 19 05:27:49 2018(r333864)
@@ -251,7 +251,7 @@ static void
 epair_nh_sintr(struct mbuf *m)
 {
struct ifnet *ifp;
-   struct epair_softc *sc;
+   struct epair_softc *sc __unused;
 
ifp = m->m_pkthdr.rcvif;
(*ifp->if_input)(ifp, m);
@@ -296,7 +296,7 @@ epair_nh_drainedcpu(u_int cpuid)
 
IFQ_LOCK(>if_snd);
if (IFQ_IS_EMPTY(>if_snd)) {
-   struct epair_softc *sc;
+   struct epair_softc *sc __unused;
 
STAILQ_REMOVE(_dpcpu->epair_ifp_drain_list,
elm, epair_ifp_drain, ifp_next);
@@ -337,7 +337,7 @@ epair_remove_ifp_from_draining(struct ifnet *ifp)
STAILQ_FOREACH_SAFE(elm, _dpcpu->epair_ifp_drain_list,
ifp_next, tvar) {
if (ifp == elm->ifp) {
-   struct epair_softc *sc;
+   struct epair_softc *sc __unused;
 
STAILQ_REMOVE(
_dpcpu->epair_ifp_drain_list, elm,

Modified: head/sys/net/if_lagg.c
==
--- head/sys/net/if_lagg.c  Sat May 19 05:14:05 2018(r333863)
+++ head/sys/net/if_lagg.c  Sat May 19 05:27:49 2018(r333864)
@@ -1641,10 +1641,7 @@ static int
 lagg_transmit(struct ifnet *ifp, struct mbuf *m)
 {
struct lagg_softc *sc = (struct lagg_softc *)ifp->if_softc;
-   int error, len, mcast;
-
-   len = m->m_pkthdr.len;
-   mcast = (m->m_flags & (M_MCAST | M_BCAST)) ? 1 : 0;
+   int error;
 
LAGG_RLOCK();
/* We need a Tx algorithm and at least one port */

Modified: head/sys/net/if_stf.c
==
--- head/sys/net/if_stf.c   Sat May 19 05:14:05 2018(r333863)
+++ head/sys/net/if_stf.c   Sat May 19 05:27:49 2018(r333864)
@@ -272,7 +272,7 @@ static int
 stf_clone_destroy(struct if_clone *ifc, struct ifnet *ifp)
 {
struct stf_softc *sc = ifp->if_softc;
-   int err;
+   int err __unused;
 
err = encap_detach(sc->encap_cookie);
KASSERT(err == 0, ("Unexpected error detaching encap_cookie"));

Modified: head/sys/net/if_vxlan.c
==
--- head/sys/net/if_vxlan.c Sat May 19 05:14:05 2018(r333863)
+++ head/sys/net/if_vxlan.c Sat May 19 05:27:49 2018(r333864)
@@ -588,7 +588,7 @@ vxlan_ftable_update_locked(struct vxlan_softc *sc,
 struct rm_priotracker *tracker)
 {
struct vxlan_ftable_entry *fe;
-   int error;
+   int error __unused;
 
VXLAN_LOCK_ASSERT(sc);
 
@@ -863,8 +863,9 @@ static void
 vxlan_socket_destroy(struct vxlan_socket *vso)
 {
struct socket *so;
-   struct vxlan_socket_mc_info *mc;
+#ifdef INVARIANTS
int i;
+   struct vxlan_socket_mc_info *mc;
 
for (i = 0; i < VXLAN_SO_MC_MAX_GROUPS; i++) {
mc = >vxlso_mc[i];
@@ -878,7 +879,7 @@ vxlan_socket_destroy(struct vxlan_socket *vso)
("%s: socket %p vni_hash[%d] not empty",
 __func__, vso, i));
}
-
+#endif
so = vso->vxlso_sock;
if (so != NULL) {
vso->vxlso_sock = NULL;
@@ -2505,7 +2506,7 @@ vxlan_rcv_udp_packet(struct mbuf *m, int offset, struc
struct vxlan_socket *vso;
struct vxlan_header *vxh, vxlanhdr;
uint32_t vni;
-   int error;
+   int error __unused;
 
M_ASSERTPKTHDR(m);
vso = xvso;

Modified: head/sys/net/iflib.c
==
--- head/sys/net/iflib.c

svn commit: r333851 - head/sys/powerpc/include

2018-05-18 Thread Justin Hibbits
Author: jhibbits
Date: Sat May 19 04:56:10 2018
New Revision: 333851
URL: https://svnweb.freebsd.org/changeset/base/333851

Log:
  Add SPR_HSRR0/SPR_HSRR1 definitions
  
  Reported by:  Mark Millard
  Pointy-hat to:jhibbits

Modified:
  head/sys/powerpc/include/spr.h

Modified: head/sys/powerpc/include/spr.h
==
--- head/sys/powerpc/include/spr.h  Sat May 19 04:48:26 2018
(r333850)
+++ head/sys/powerpc/include/spr.h  Sat May 19 04:56:10 2018
(r333851)
@@ -239,6 +239,8 @@
 #define  EPCR_PMGS   0x0020
 #defineSPR_SPEFSCR 0x200   /* ..8 Signal Processing Engine 
FSCR. */
 
+#defineSPR_HSRR0   0x13a
+#defineSPR_HSRR1   0x13b
 #defineSPR_LPCR0x13e   /* Logical Partitioning Control 
*/
 #define  LPCR_LPES 0x008   /* Bit 60 */
 #defineSPR_LPID0x13f   /* Logical Partitioning Control 
*/
___
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: r333862 - head/sys/sys

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 05:12:57 2018
New Revision: 333862
URL: https://svnweb.freebsd.org/changeset/base/333862

Log:
  back out DBGSET macro

Modified:
  head/sys/sys/systm.h

Modified: head/sys/sys/systm.h
==
--- head/sys/sys/systm.hSat May 19 05:12:18 2018(r333861)
+++ head/sys/sys/systm.hSat May 19 05:12:57 2018(r333862)
@@ -85,7 +85,6 @@ void  kassert_panic(const char *fmt, ...)  __printflike
 #endif
 
 #ifdef INVARIANTS  /* The option is always available */
-#defineDBGSET(lhs, rhs) lhs = (rhs)
 #defineKASSERT(exp,msg) do {   
\
if (__predict_false(!(exp)))\
kassert_panic msg;  \
@@ -97,7 +96,6 @@ void  kassert_panic(const char *fmt, ...)  __printflike
}   \
 } while (0)
 #else
-#defineDBGSET(lhs, rhs) rhs
 #defineKASSERT(exp,msg) do { \
 } while (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: r333860 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 05:10:51 2018
New Revision: 333860
URL: https://svnweb.freebsd.org/changeset/base/333860

Log:
  sendfile: annotate unused value and ensure that npages is actually initialized

Modified:
  head/sys/kern/kern_sendfile.c

Modified: head/sys/kern/kern_sendfile.c
==
--- head/sys/kern/kern_sendfile.c   Sat May 19 05:09:10 2018
(r333859)
+++ head/sys/kern/kern_sendfile.c   Sat May 19 05:10:51 2018
(r333860)
@@ -341,7 +341,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, o
}
 
for (int i = 0; i < npages;) {
-   int j, a, count, rv;
+   int j, a, count, rv __unused;
 
/* Skip valid pages. */
if (vm_page_is_valid(pa[i], vmoff(i, off) & PAGE_MASK,
@@ -688,6 +688,7 @@ retry_space:
if (space == 0) {
sfio = NULL;
nios = 0;
+   npages = 0;
goto prepend_header;
}
hdr_uio = NULL;
___
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: r333861 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 05:12:18 2018
New Revision: 333861
URL: https://svnweb.freebsd.org/changeset/base/333861

Log:
  intr: eliminate / annotate unused stack locals

Modified:
  head/sys/kern/kern_intr.c

Modified: head/sys/kern/kern_intr.c
==
--- head/sys/kern/kern_intr.c   Sat May 19 05:10:51 2018(r333860)
+++ head/sys/kern/kern_intr.c   Sat May 19 05:12:18 2018(r333861)
@@ -949,7 +949,6 @@ intr_event_schedule_thread(struct intr_event *ie)
struct intr_thread *it;
struct thread *td;
struct thread *ctd;
-   struct proc *p;
 
/*
 * If no ithread or no handlers, then we have a stray interrupt.
@@ -961,7 +960,6 @@ intr_event_schedule_thread(struct intr_event *ie)
ctd = curthread;
it = ie->ie_thread;
td = it->it_thread;
-   p = td->td_proc;
 
/*
 * If any of the handlers for this ithread claim to be good
@@ -973,7 +971,7 @@ intr_event_schedule_thread(struct intr_event *ie)
random_harvest_queue(, sizeof(entropy), 2, 
RANDOM_INTERRUPT);
}
 
-   KASSERT(p != NULL, ("ithread %s has no process", ie->ie_name));
+   KASSERT(td->td_proc != NULL, ("ithread %s has no process", 
ie->ie_name));
 
/*
 * Set it_need to tell the thread to keep running if it is already
@@ -1215,7 +1213,7 @@ swi_sched(void *cookie, int flags)
struct intr_handler *ih = (struct intr_handler *)cookie;
struct intr_event *ie = ih->ih_event;
struct intr_entropy entropy;
-   int error;
+   int error __unused;
 
CTR3(KTR_INTR, "swi_sched: %s %s need=%d", ie->ie_name, ih->ih_name,
ih->ih_need);
@@ -1474,7 +1472,7 @@ intr_event_handle(struct intr_event *ie, struct trapfr
struct intr_handler *ih;
struct trapframe *oldframe;
struct thread *td;
-   int error, ret, thread;
+   int ret, thread;
 
td = curthread;
 
@@ -1547,7 +1545,9 @@ intr_event_handle(struct intr_event *ie, struct trapfr

/* Schedule the ithread if needed. */
if (thread) {
-   error = intr_event_schedule_thread(ie);
+   int error __unused;
+
+   error =  intr_event_schedule_thread(ie);
KASSERT(error == 0, ("bad stray interrupt"));
}
critical_exit();
___
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: r333830 - head/sys/sys

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 03:50:29 2018
New Revision: 333830
URL: https://svnweb.freebsd.org/changeset/base/333830

Log:
  add DBGSET macro to conditionally assign to a variable depending on INVARIANTS

Modified:
  head/sys/sys/systm.h

Modified: head/sys/sys/systm.h
==
--- head/sys/sys/systm.hSat May 19 03:49:36 2018(r333829)
+++ head/sys/sys/systm.hSat May 19 03:50:29 2018(r333830)
@@ -85,6 +85,7 @@ void  kassert_panic(const char *fmt, ...)  __printflike
 #endif
 
 #ifdef INVARIANTS  /* The option is always available */
+#defineDBGSET(lhs, rhs) lhs = (rhs)
 #defineKASSERT(exp,msg) do {   
\
if (__predict_false(!(exp)))\
kassert_panic msg;  \
@@ -96,6 +97,7 @@ void  kassert_panic(const char *fmt, ...)  __printflike
}   \
 } while (0)
 #else
+#defineDBGSET(lhs, rhs) rhs
 #defineKASSERT(exp,msg) do { \
 } while (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: r333846 - in head/sys/powerpc: aim powerpc

2018-05-18 Thread Justin Hibbits
Author: jhibbits
Date: Sat May 19 04:21:50 2018
New Revision: 333846
URL: https://svnweb.freebsd.org/changeset/base/333846

Log:
  Add hypervisor trap handling, using HSRR0/HSRR1
  
  Summary:
  Some hypervisor exceptions on POWER architecture only save state to 
HSRR0/HSRR1.
  Until we have bhyve on POWER, use a lightweight exception frontend which 
copies
  HSRR0/HSRR1 into SRR0/SRR1, and run the normal trap handler.
  
  The first user of this is the Hypervisor Virtualization Interrupt, which 
targets
  the XIVE interrupt controller on POWER9.
  
  Reviewed By: nwhitehorn
  Differential Revision: https://reviews.freebsd.org/D15487

Modified:
  head/sys/powerpc/aim/aim_machdep.c
  head/sys/powerpc/aim/trap_subr64.S
  head/sys/powerpc/powerpc/interrupt.c

Modified: head/sys/powerpc/aim/aim_machdep.c
==
--- head/sys/powerpc/aim/aim_machdep.c  Sat May 19 04:14:00 2018
(r333845)
+++ head/sys/powerpc/aim/aim_machdep.c  Sat May 19 04:21:50 2018
(r333846)
@@ -148,6 +148,7 @@ extern Elf_Addr _GLOBAL_OFFSET_TABLE_[];
 
 extern void*rstcode, *rstcodeend;
 extern void*trapcode, *trapcodeend;
+extern void*hypertrapcode, *hypertrapcodeend;
 extern void*generictrap, *generictrap64;
 extern void*alitrap, *aliend;
 extern void*dsitrap, *dsiend;
@@ -360,6 +361,11 @@ aim_cpu_init(vm_offset_t toc)
bcopy(, (void *)EXC_TRC, trap_offset);
bcopy(, (void *)EXC_BPT, trap_offset);
}
+   #else
+   trapsize = (size_t) - (size_t)
+   bcopy(, (void *)(EXC_HEA + trap_offset), trapsize);
+   bcopy(, (void *)(EXC_HMI + trap_offset), trapsize);
+   bcopy(, (void *)(EXC_HVI + trap_offset), trapsize);
#endif
 
bcopy(, (void *)(EXC_RST + trap_offset), (size_t) -

Modified: head/sys/powerpc/aim/trap_subr64.S
==
--- head/sys/powerpc/aim/trap_subr64.S  Sat May 19 04:14:00 2018
(r333845)
+++ head/sys/powerpc/aim/trap_subr64.S  Sat May 19 04:21:50 2018
(r333846)
@@ -446,6 +446,20 @@ CNAME(trapcode):
blrl/* Branch to generictrap */
 CNAME(trapcodeend):
 
+/* Same thing for traps setting HSRR0/HSS1 */
+   .globl  CNAME(hypertrapcode),CNAME(hypertrapcodeend)
+   .p2align 3
+CNAME(hypertrapcode):
+   mtsprg1 %r1 /* save SP */
+   mflr%r1 /* Save the old LR in r1 */
+   mtsprg2 %r1 /* And then in SPRG2 */
+   ld  %r1,TRAP_GENTRAP(0)
+   addi%r1,%r1,(generichypertrap-generictrap)
+   mtlr%r1
+   li  %r1, 0xe0   /* How to get the vector from LR */
+   blrl/* Branch to generictrap */
+CNAME(hypertrapcodeend):
+
 /*
  * For SLB misses: do special things for the kernel
  *
@@ -757,6 +771,13 @@ realtrap:
  * SPRG2 - Original LR
  */
 
+generichypertrap:
+   mtsprg3 %r1
+   mfspr   %r1, SPR_HSRR0
+   mtsrr0  %r1
+   mfspr   %r1, SPR_HSRR1
+   mtsrr1  %r1
+   mfsprg3 %r1
.globl  CNAME(generictrap)
 generictrap:
/* Save R1 for computing the exception vector */

Modified: head/sys/powerpc/powerpc/interrupt.c
==
--- head/sys/powerpc/powerpc/interrupt.cSat May 19 04:14:00 2018
(r333845)
+++ head/sys/powerpc/powerpc/interrupt.cSat May 19 04:21:50 2018
(r333846)
@@ -86,6 +86,7 @@ powerpc_interrupt(struct trapframe *framep)
 
switch (framep->exc) {
case EXC_EXI:
+   case EXC_HVI:
critical_enter();
PIC_DISPATCH(root_pic, framep);
critical_exit();
___
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: r333843 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 04:10:53 2018
New Revision: 333843
URL: https://svnweb.freebsd.org/changeset/base/333843

Log:
  mqueue: avoid unused variables

Modified:
  head/sys/kern/uipc_mqueue.c

Modified: head/sys/kern/uipc_mqueue.c
==
--- head/sys/kern/uipc_mqueue.c Sat May 19 04:09:58 2018(r333842)
+++ head/sys/kern/uipc_mqueue.c Sat May 19 04:10:53 2018(r333843)
@@ -1343,14 +1343,12 @@ mqfs_read(struct vop_read_args *ap)
char buf[80];
struct vnode *vp = ap->a_vp;
struct uio *uio = ap->a_uio;
-   struct mqfs_node *pn;
struct mqueue *mq;
int len, error;
 
if (vp->v_type != VREG)
return (EINVAL);
 
-   pn = VTON(vp);
mq = VTOMQ(vp);
snprintf(buf, sizeof(buf),
"QSIZE:%-10ld MAXMSG:%-10ld CURMSG:%-10ld MSGSIZE:%-10ld\n",
@@ -2439,11 +2437,13 @@ sys_kmq_notify(struct thread *td, struct kmq_notify_ar
 static void
 mqueue_fdclose(struct thread *td, int fd, struct file *fp)
 {
-   struct filedesc *fdp;
struct mqueue *mq;
+#ifdef INVARIANTS
+   struct filedesc *fdp;
  
fdp = td->td_proc->p_fd;
FILEDESC_LOCK_ASSERT(fdp);
+#endif
 
if (fp->f_ops == ) {
mq = FPTOMQ(fp);
___
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: r333842 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 04:09:58 2018
New Revision: 333842
URL: https://svnweb.freebsd.org/changeset/base/333842

Log:
  physio: avoid uninitialized variables

Modified:
  head/sys/kern/kern_physio.c

Modified: head/sys/kern/kern_physio.c
==
--- head/sys/kern/kern_physio.c Sat May 19 04:08:11 2018(r333841)
+++ head/sys/kern/kern_physio.c Sat May 19 04:09:58 2018(r333842)
@@ -51,6 +51,8 @@ physio(struct cdev *dev, struct uio *uio, int ioflag)
vm_prot_t prot;
 
csw = dev->si_devsw;
+   npages = 0;
+   sa = NULL;
/* check if character device is being destroyed */
if (csw == NULL)
return (ENXIO);
@@ -177,7 +179,7 @@ physio(struct cdev *dev, struct uio *uio, int ioflag)
error = EFAULT;
goto doerror;
}
-   if (pbuf) {
+   if (pbuf && sa) {
pmap_qenter((vm_offset_t)sa,
pages, npages);
bp->bio_data = sa + poff;
___
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: r333825 - head/sys/powerpc/ofw

2018-05-18 Thread Justin Hibbits
Author: jhibbits
Date: Sat May 19 03:45:38 2018
New Revision: 333825
URL: https://svnweb.freebsd.org/changeset/base/333825

Log:
  Add yet another option for gathering available memory
  
  On some POWER9 systems, 'reg' denotes the full memory in the system, while
  'linux,usable-memory' denotes the usable memory.  Some memory is reserved for
  NVLink usage, so is partitioned off.
  
  Submitted by: Breno Leitao

Modified:
  head/sys/powerpc/ofw/ofw_machdep.c

Modified: head/sys/powerpc/ofw/ofw_machdep.c
==
--- head/sys/powerpc/ofw/ofw_machdep.c  Sat May 19 03:23:46 2018
(r333824)
+++ head/sys/powerpc/ofw/ofw_machdep.c  Sat May 19 03:45:38 2018
(r333825)
@@ -342,6 +342,16 @@ ofw_mem_regions(struct mem_region *memp, int *memsz,
 
res = parse_ofw_memory(phandle, "reg", [msz]);
msz += res/sizeof(struct mem_region);
+
+   /*
+* On POWER9 Systems we might have both linux,usable-memory and
+* reg properties.  'reg' denotes all available memory, but we
+* must use 'linux,usable-memory', a subset, as some memory
+* regions are reserved for NVLink.
+*/
+   if (OF_getproplen(phandle, "linux,usable-memory") >= 0)
+   res = parse_ofw_memory(phandle, "linux,usable-memory",
+   [asz]);
if (OF_getproplen(phandle, "available") >= 0)
res = parse_ofw_memory(phandle, "available",
[asz]);
___
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: r333828 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 03:48:35 2018
New Revision: 333828
URL: https://svnweb.freebsd.org/changeset/base/333828

Log:
  sys_process.c fix set but not used warning

Modified:
  head/sys/kern/sys_process.c

Modified: head/sys/kern/sys_process.c
==
--- head/sys/kern/sys_process.c Sat May 19 03:47:37 2018(r333827)
+++ head/sys/kern/sys_process.c Sat May 19 03:48:35 2018(r333828)
@@ -321,7 +321,6 @@ proc_iop(struct thread *td, struct proc *p, vm_offset_
struct iovec iov;
struct uio uio;
ssize_t slen;
-   int error;
 
MPASS(len < SSIZE_MAX);
slen = (ssize_t)len;
@@ -335,7 +334,7 @@ proc_iop(struct thread *td, struct proc *p, vm_offset_
uio.uio_segflg = UIO_SYSSPACE;
uio.uio_rw = rw;
uio.uio_td = td;
-   error = proc_rwmem(p, );
+   proc_rwmem(p, );
if (uio.uio_resid == slen)
return (-1);
return (slen - uio.uio_resid);
___
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: r333831 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 03:52:55 2018
New Revision: 333831
URL: https://svnweb.freebsd.org/changeset/base/333831

Log:
  fix uninitialized variable warning in reader locks

Modified:
  head/sys/kern/kern_rwlock.c
  head/sys/kern/kern_sx.c

Modified: head/sys/kern/kern_rwlock.c
==
--- head/sys/kern/kern_rwlock.c Sat May 19 03:50:29 2018(r333830)
+++ head/sys/kern/kern_rwlock.c Sat May 19 03:52:55 2018(r333831)
@@ -887,7 +887,7 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOC
 #ifdef ADAPTIVE_RWLOCKS
int spintries = 0;
int i, n;
-   enum { READERS, WRITER } sleep_reason;
+   enum { READERS, WRITER } sleep_reason = READERS;
 #endif
uintptr_t x;
 #ifdef LOCK_PROFILING

Modified: head/sys/kern/kern_sx.c
==
--- head/sys/kern/kern_sx.c Sat May 19 03:50:29 2018(r333830)
+++ head/sys/kern/kern_sx.c Sat May 19 03:52:55 2018(r333831)
@@ -551,7 +551,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO
 #ifdef ADAPTIVE_SX
volatile struct thread *owner;
u_int i, n, spintries = 0;
-   enum { READERS, WRITER } sleep_reason;
+   enum { READERS, WRITER } sleep_reason = READERS;
bool adaptive;
 #endif
 #ifdef LOCK_PROFILING
@@ -568,7 +568,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO
int64_t all_time = 0;
 #endif
 #if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING)
-   uintptr_t state;
+   uintptr_t state = 0;
 #endif
int extra_work = 0;
 
@@ -944,7 +944,7 @@ _sx_slock_hard(struct sx *sx, int opts, uintptr_t x LO
int64_t all_time = 0;
 #endif
 #if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING)
-   uintptr_t state;
+   uintptr_t state = 0;
 #endif
int extra_work = 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: r333829 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 03:49:36 2018
New Revision: 333829
URL: https://svnweb.freebsd.org/changeset/base/333829

Log:
  fix uninitialized variable warning

Modified:
  head/sys/kern/subr_prf.c
  head/sys/kern/uipc_sockbuf.c

Modified: head/sys/kern/subr_prf.c
==
--- head/sys/kern/subr_prf.cSat May 19 03:48:35 2018(r333828)
+++ head/sys/kern/subr_prf.cSat May 19 03:49:36 2018(r333829)
@@ -660,6 +660,7 @@ kvprintf(char const *fmt, void (*func)(int, void*), vo
int stop = 0, retval = 0;
 
num = 0;
+   q = NULL;
if (!func)
d = (char *) arg;
else

Modified: head/sys/kern/uipc_sockbuf.c
==
--- head/sys/kern/uipc_sockbuf.cSat May 19 03:48:35 2018
(r333828)
+++ head/sys/kern/uipc_sockbuf.cSat May 19 03:49:36 2018
(r333829)
@@ -460,6 +460,7 @@ sbsetopt(struct socket *so, int cmd, u_long cc)
u_int *hiwat, *lowat;
int error;
 
+   sb = NULL;
SOCK_LOCK(so);
if (SOLISTENING(so)) {
switch (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: r333850 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 04:48:26 2018
New Revision: 333850
URL: https://svnweb.freebsd.org/changeset/base/333850

Log:
  tty: use __unused annotation instead to silence warnings

Modified:
  head/sys/kern/tty_inq.c
  head/sys/kern/tty_outq.c

Modified: head/sys/kern/tty_inq.c
==
--- head/sys/kern/tty_inq.c Sat May 19 04:47:34 2018(r333849)
+++ head/sys/kern/tty_inq.c Sat May 19 04:48:26 2018(r333850)
@@ -328,15 +328,13 @@ ttyinq_write(struct ttyinq *ti, const void *buf, size_
 int
 ttyinq_write_nofrag(struct ttyinq *ti, const void *buf, size_t nbytes, int 
quote)
 {
-#ifdef INVARIANTS
-   size_t ret;
-#endif
+   size_t ret __unused;
 
if (ttyinq_bytesleft(ti) < nbytes)
return (-1);
 
/* We should always be able to write it back. */
-   DBGSET(ret, ttyinq_write(ti, buf, nbytes, quote));
+   ret = ttyinq_write(ti, buf, nbytes, quote);
MPASS(ret == nbytes);
 
return (0);

Modified: head/sys/kern/tty_outq.c
==
--- head/sys/kern/tty_outq.cSat May 19 04:47:34 2018(r333849)
+++ head/sys/kern/tty_outq.cSat May 19 04:48:26 2018(r333850)
@@ -324,15 +324,13 @@ ttyoutq_write(struct ttyoutq *to, const void *buf, siz
 int
 ttyoutq_write_nofrag(struct ttyoutq *to, const void *buf, size_t nbytes)
 {
-#ifdef INVARIANTS
-   size_t ret;
-#endif
+   size_t ret __unused;
 
if (ttyoutq_bytesleft(to) < nbytes)
return (-1);
 
/* We should always be able to write it back. */
-   DBGSET(ret, ttyoutq_write(to, buf, nbytes));
+   ret = ttyoutq_write(to, buf, nbytes);
MPASS(ret == nbytes);
 
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"


svn commit: r333859 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 05:09:10 2018
New Revision: 333859
URL: https://svnweb.freebsd.org/changeset/base/333859

Log:
  umtx: don't call umtxq_getchain unless the value is needed

Modified:
  head/sys/kern/kern_umtx.c

Modified: head/sys/kern/kern_umtx.c
==
--- head/sys/kern/kern_umtx.c   Sat May 19 05:07:31 2018(r333858)
+++ head/sys/kern/kern_umtx.c   Sat May 19 05:09:10 2018(r333859)
@@ -662,11 +662,9 @@ umtxq_remove_queue(struct umtx_q *uq, int q)
 static int
 umtxq_count(struct umtx_key *key)
 {
-   struct umtxq_chain *uc;
struct umtxq_queue *uh;
 
-   uc = umtxq_getchain(key);
-   UMTXQ_LOCKED_ASSERT(uc);
+   UMTXQ_LOCKED_ASSERT(umtxq_getchain(key));
uh = umtxq_queue_lookup(key, UMTX_SHARED_QUEUE);
if (uh != NULL)
return (uh->length);
@@ -680,12 +678,10 @@ umtxq_count(struct umtx_key *key)
 static int
 umtxq_count_pi(struct umtx_key *key, struct umtx_q **first)
 {
-   struct umtxq_chain *uc;
struct umtxq_queue *uh;
 
*first = NULL;
-   uc = umtxq_getchain(key);
-   UMTXQ_LOCKED_ASSERT(uc);
+   UMTXQ_LOCKED_ASSERT(umtxq_getchain(key));
uh = umtxq_queue_lookup(key, UMTX_SHARED_QUEUE);
if (uh != NULL) {
*first = TAILQ_FIRST(>head);
@@ -727,14 +723,12 @@ umtxq_check_susp(struct thread *td)
 static int
 umtxq_signal_queue(struct umtx_key *key, int n_wake, int q)
 {
-   struct umtxq_chain *uc;
struct umtxq_queue *uh;
struct umtx_q *uq;
int ret;
 
ret = 0;
-   uc = umtxq_getchain(key);
-   UMTXQ_LOCKED_ASSERT(uc);
+   UMTXQ_LOCKED_ASSERT(umtxq_getchain(key));
uh = umtxq_queue_lookup(key, q);
if (uh != NULL) {
while ((uq = TAILQ_FIRST(>head)) != NULL) {
@@ -754,10 +748,8 @@ umtxq_signal_queue(struct umtx_key *key, int n_wake, i
 static inline void
 umtxq_signal_thread(struct umtx_q *uq)
 {
-   struct umtxq_chain *uc;
 
-   uc = umtxq_getchain(>uq_key);
-   UMTXQ_LOCKED_ASSERT(uc);
+   UMTXQ_LOCKED_ASSERT(umtxq_getchain(>uq_key));
umtxq_remove(uq);
wakeup(uq);
 }
@@ -1663,16 +1655,18 @@ static int
 umtxq_sleep_pi(struct umtx_q *uq, struct umtx_pi *pi, uint32_t owner,
 const char *wmesg, struct abs_timeout *timo, bool shared)
 {
-   struct umtxq_chain *uc;
struct thread *td, *td1;
struct umtx_q *uq1;
int error, pri;
+#ifdef INVARIANTS
+   struct umtxq_chain *uc;
 
+   uc = umtxq_getchain(>pi_key);
+#endif
error = 0;
td = uq->uq_thread;
KASSERT(td == curthread, ("inconsistent uq_thread"));
-   uc = umtxq_getchain(>uq_key);
-   UMTXQ_LOCKED_ASSERT(uc);
+   UMTXQ_LOCKED_ASSERT(umtxq_getchain(>uq_key));
KASSERT(uc->uc_busy != 0, ("umtx chain is not busy"));
umtxq_insert(uq);
mtx_lock(_lock);
@@ -1728,10 +1722,8 @@ umtxq_sleep_pi(struct umtx_q *uq, struct umtx_pi *pi, 
 static void
 umtx_pi_ref(struct umtx_pi *pi)
 {
-   struct umtxq_chain *uc;
 
-   uc = umtxq_getchain(>pi_key);
-   UMTXQ_LOCKED_ASSERT(uc);
+   UMTXQ_LOCKED_ASSERT(umtxq_getchain(>pi_key));
pi->pi_refcount++;
 }
 
___
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: r333857 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 05:07:03 2018
New Revision: 333857
URL: https://svnweb.freebsd.org/changeset/base/333857

Log:
  conf: revert last change and annotate unused var instead

Modified:
  head/sys/kern/kern_conf.c

Modified: head/sys/kern/kern_conf.c
==
--- head/sys/kern/kern_conf.c   Sat May 19 05:06:18 2018(r333856)
+++ head/sys/kern/kern_conf.c   Sat May 19 05:07:03 2018(r333857)
@@ -866,13 +866,11 @@ make_dev(struct cdevsw *devsw, int unit, uid_t uid, gi
 {
struct cdev *dev;
va_list ap;
-#ifdef INVARIANTS
-   int res;
-#endif
+   int res __unused;
 
va_start(ap, fmt);
-   DBGSET(res, make_dev_credv(0, , devsw, unit, NULL, uid, gid, mode, 
fmt,
-   ap));
+   res = make_dev_credv(0, , devsw, unit, NULL, uid, gid, mode, fmt,
+ ap);
va_end(ap);
KASSERT(res == 0 && dev != NULL,
("make_dev: failed make_dev_credv (error=%d)", res));
@@ -885,12 +883,10 @@ make_dev_cred(struct cdevsw *devsw, int unit, struct u
 {
struct cdev *dev;
va_list ap;
-#ifdef INVARIANTS
-   int res;
-#endif
+   int res __unused;
 
va_start(ap, fmt);
-   DBGSET(res, make_dev_credv(0, , devsw, unit, cr, uid, gid, mode, 
fmt, ap));
+   res = make_dev_credv(0, , devsw, unit, cr, uid, gid, mode, fmt, ap);
va_end(ap);
 
KASSERT(res == 0 && dev != NULL,
@@ -1000,11 +996,10 @@ make_dev_alias(struct cdev *pdev, const char *fmt, ...
 {
struct cdev *dev;
va_list ap;
-#ifdef INVARIANTS
-   int res;
-#endif
+   int res __unused;
+
va_start(ap, fmt);
-   DBGSET(res, make_dev_alias_v(MAKEDEV_WAITOK, , pdev, fmt, ap));
+   res = make_dev_alias_v(MAKEDEV_WAITOK, , pdev, fmt, ap);
va_end(ap);
 
KASSERT(res == 0 && dev != NULL,
___
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: r333858 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 05:07:31 2018
New Revision: 333858
URL: https://svnweb.freebsd.org/changeset/base/333858

Log:
  cpuset: revert and annotate instead

Modified:
  head/sys/kern/kern_cpuset.c

Modified: head/sys/kern/kern_cpuset.c
==
--- head/sys/kern/kern_cpuset.c Sat May 19 05:07:03 2018(r333857)
+++ head/sys/kern/kern_cpuset.c Sat May 19 05:07:31 2018(r333858)
@@ -1386,9 +1386,7 @@ cpuset_thread0(void)
 {
struct cpuset *set;
int i;
-#ifdef INVARIANTS
-   int error;
-#endif
+   int error __unused;
 
cpuset_zone = uma_zcreate("cpuset", sizeof(struct cpuset), NULL, NULL,
NULL, NULL, UMA_ALIGN_CACHE, 0);
@@ -1413,14 +1411,14 @@ cpuset_thread0(void)
 * Now derive a default (1), modifiable set from that to give out.
 */
set = uma_zalloc(cpuset_zone, M_WAITOK | M_ZERO);
-   DBGSET(error, _cpuset_create(set, cpuset_zero, NULL, NULL, 1));
+   error = _cpuset_create(set, cpuset_zero, NULL, NULL, 1);
KASSERT(error == 0, ("Error creating default set: %d\n", error));
cpuset_default = set;
/*
 * Create the kernel set (2).
 */
set = uma_zalloc(cpuset_zone, M_WAITOK | M_ZERO);
-   DBGSET(error, _cpuset_create(set, cpuset_zero, NULL, NULL, 2));
+   error = _cpuset_create(set, cpuset_zero, NULL, NULL, 2);
KASSERT(error == 0, ("Error creating kernel set: %d\n", error));
set->cs_domain = 
cpuset_kernel = set;
___
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: r333867 - head/sys/netinet

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 05:55:00 2018
New Revision: 333867
URL: https://svnweb.freebsd.org/changeset/base/333867

Log:
  tcp fastopen: fix may be uninitialized

Modified:
  head/sys/netinet/tcp_fastopen.c

Modified: head/sys/netinet/tcp_fastopen.c
==
--- head/sys/netinet/tcp_fastopen.c Sat May 19 05:37:58 2018
(r333866)
+++ head/sys/netinet/tcp_fastopen.c Sat May 19 05:55:00 2018
(r333867)
@@ -856,6 +856,7 @@ tcp_fastopen_connect(struct tcpcb *tp)
uint16_t server_mss;
uint64_t psk_cookie;

+   psk_cookie = 0;
inp = tp->t_inpcb;
cce = tcp_fastopen_ccache_lookup(>inp_inc, );
if (cce) {
@@ -875,7 +876,7 @@ tcp_fastopen_connect(struct tcpcb *tp)
server_mss = cce->server_mss;
CCB_UNLOCK(ccb);
if (tp->t_tfo_client_cookie_len ==
-   TCP_FASTOPEN_PSK_LEN) {
+   TCP_FASTOPEN_PSK_LEN && psk_cookie) {
tp->t_tfo_client_cookie_len =
TCP_FASTOPEN_COOKIE_LEN;
memcpy(tp->t_tfo_cookie.client, _cookie,
___
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: r333868 - head/sys/netinet

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 05:55:31 2018
New Revision: 333868
URL: https://svnweb.freebsd.org/changeset/base/333868

Log:
  tcp sysctl fix may be uninitialized

Modified:
  head/sys/netinet/tcp_subr.c

Modified: head/sys/netinet/tcp_subr.c
==
--- head/sys/netinet/tcp_subr.c Sat May 19 05:55:00 2018(r333867)
+++ head/sys/netinet/tcp_subr.c Sat May 19 05:55:31 2018(r333868)
@@ -539,9 +539,9 @@ sysctl_net_inet_list_func_info(SYSCTL_HANDLER_ARGS)
 * the list matches what we have recorded.
 */
rw_rlock(_function_lock);
-#ifdef INVARIANTS
+
cnt = 0;
-#else
+#ifndef INVARIANTS
if (req->oldptr == NULL) {
cnt = tcp_fb_cnt;
goto skip_loop;
@@ -1779,7 +1779,7 @@ tcp_discardcb(struct tcpcb *tp)
 #ifdef INET6
int isipv6 = (inp->inp_vflag & INP_IPV6) != 0;
 #endif /* INET6 */
-   int released;
+   int released __unused;
 
INP_WLOCK_ASSERT(inp);
 
___
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: r333823 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 02:17:18 2018
New Revision: 333823
URL: https://svnweb.freebsd.org/changeset/base/333823

Log:
  pidctrl Actually use the variables that we assign to as seatbelts to prevent 
divide
  by zero
  
  Reviewed by:  jeffr

Modified:
  head/sys/kern/subr_pidctrl.c

Modified: head/sys/kern/subr_pidctrl.c
==
--- head/sys/kern/subr_pidctrl.cSat May 19 02:15:40 2018
(r333822)
+++ head/sys/kern/subr_pidctrl.cSat May 19 02:17:18 2018
(r333823)
@@ -103,9 +103,9 @@ pidctrl_classic(struct pidctrl *pc, int input)
pc->pc_derivative = error - pc->pc_olderror;
 
/* Divide by inverse gain values to produce output. */
-   output = ((pc->pc_error / pc->pc_Kpd) +
-   (pc->pc_integral / pc->pc_Kid)) +
-   (pc->pc_derivative / pc->pc_Kdd);
+   output = ((pc->pc_error / Kpd) +
+   (pc->pc_integral / Kid)) +
+   (pc->pc_derivative / Kdd);
/* Save for sysctl. */
pc->pc_output = output;
pc->pc_input = input;
@@ -146,9 +146,9 @@ pidctrl_daemon(struct pidctrl *pc, int input)
pc->pc_derivative = error - pc->pc_olderror;
 
/* Divide by inverse gain values to produce output. */
-   output = ((error / pc->pc_Kpd) +
-   (pc->pc_integral / pc->pc_Kid)) +
-   (pc->pc_derivative / pc->pc_Kdd);
+   output = ((error / Kpd) +
+   (pc->pc_integral / Kid)) +
+   (pc->pc_derivative / Kdd);
output = MAX(output - pc->pc_output, 0);
pc->pc_output += output;
pc->pc_input = input;
___
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: r333840 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 04:07:00 2018
New Revision: 333840
URL: https://svnweb.freebsd.org/changeset/base/333840

Log:
  filt_timerdetach: only assign to old if we're going to check it in
  a KASSERT

Modified:
  head/sys/kern/kern_event.c

Modified: head/sys/kern/kern_event.c
==
--- head/sys/kern/kern_event.c  Sat May 19 04:05:36 2018(r333839)
+++ head/sys/kern/kern_event.c  Sat May 19 04:07:00 2018(r333840)
@@ -751,12 +751,14 @@ static void
 filt_timerdetach(struct knote *kn)
 {
struct kq_timer_cb_data *kc;
+#ifdef INVARIANTS
unsigned int old;
+#endif
 
kc = kn->kn_ptr.p_v;
callout_drain(>c);
free(kc, M_KQUEUE);
-   old = atomic_fetchadd_int(_ncallouts, -1);
+   DBGSET(old, atomic_fetchadd_int(_ncallouts, -1));
KASSERT(old > 0, ("Number of callouts cannot become negative"));
kn->kn_status |= KN_DETACHED;   /* knlist_remove sets it */
 }
___
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: r333852 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 04:59:39 2018
New Revision: 333852
URL: https://svnweb.freebsd.org/changeset/base/333852

Log:
  vfs: annotate variables only used by debug builds as __unused

Modified:
  head/sys/kern/vfs_bio.c
  head/sys/kern/vfs_lookup.c
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Sat May 19 04:56:10 2018(r333851)
+++ head/sys/kern/vfs_bio.c Sat May 19 04:59:39 2018(r333852)
@@ -1851,10 +1851,8 @@ bq_init(struct bufqueue *bq, int qindex, int subqueue,
 static void
 bd_init(struct bufdomain *bd)
 {
-   int domain;
int i;
 
-   domain = bd - bdomain;
bd->bd_cleanq = >bd_subq[mp_maxid + 1];
bq_init(bd->bd_cleanq, QUEUE_CLEAN, mp_maxid + 1, "bufq clean lock");
bq_init(>bd_dirtyq, QUEUE_DIRTY, -1, "bufq dirty lock");
@@ -2843,7 +2841,7 @@ vfs_vmio_iodone(struct buf *bp)
vm_ooffset_t foff;
vm_page_t m;
vm_object_t obj;
-   struct vnode *vp;
+   struct vnode *vp __unused;
int i, iosize, resid;
bool bogus;
 
@@ -5014,7 +5012,7 @@ bufsync(struct bufobj *bo, int waitfor)
 void
 bufstrategy(struct bufobj *bo, struct buf *bp)
 {
-   int i = 0;
+   int i __unused;
struct vnode *vp;
 
vp = bp->b_vp;

Modified: head/sys/kern/vfs_lookup.c
==
--- head/sys/kern/vfs_lookup.c  Sat May 19 04:56:10 2018(r333851)
+++ head/sys/kern/vfs_lookup.c  Sat May 19 04:59:39 2018(r333852)
@@ -92,9 +92,9 @@ static int
 crossmp_vop_lock1(struct vop_lock1_args *ap)
 {
struct vnode *vp;
-   struct lock *lk;
-   const char *file;
-   int flags, line;
+   struct lock *lk __unused;
+   const char *file __unused;
+   int flags, line __unused;
 
vp = ap->a_vp;
lk = vp->v_vnlock;
@@ -118,7 +118,7 @@ static int
 crossmp_vop_unlock(struct vop_unlock_args *ap)
 {
struct vnode *vp;
-   struct lock *lk;
+   struct lock *lk __unused;
int flags;
 
vp = ap->a_vp;

Modified: head/sys/kern/vfs_subr.c
==
--- head/sys/kern/vfs_subr.cSat May 19 04:56:10 2018(r333851)
+++ head/sys/kern/vfs_subr.cSat May 19 04:59:39 2018(r333852)
@@ -1405,7 +1405,7 @@ getnewvnode(const char *tag, struct mount *mp, struct 
struct thread *td;
struct lock_object *lo;
static int cyclecount;
-   int error;
+   int error __unused;
 
CTR3(KTR_VFS, "%s: mp %p with tag %s", __func__, mp, tag);
vp = NULL;
___
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: r333825 - head/sys/powerpc/ofw

2018-05-18 Thread Justin Hibbits
On Fri, May 18, 2018 at 10:45 PM, Justin Hibbits  wrote:
> Author: jhibbits
> Date: Sat May 19 03:45:38 2018
> New Revision: 333825
> URL: https://svnweb.freebsd.org/changeset/base/333825
>
> Log:
>   Add yet another option for gathering available memory
>
>   On some POWER9 systems, 'reg' denotes the full memory in the system, while
>   'linux,usable-memory' denotes the usable memory.  Some memory is reserved 
> for
>   NVLink usage, so is partitioned off.
>
>   Submitted by: Breno Leitao

Differential Revision: https://reviews.freebsd.org/D15482
___
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: r333827 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 03:47:37 2018
New Revision: 333827
URL: https://svnweb.freebsd.org/changeset/base/333827

Log:
  subr_epoch.c fix unused variable warnings

Modified:
  head/sys/kern/subr_epoch.c

Modified: head/sys/kern/subr_epoch.c
==
--- head/sys/kern/subr_epoch.c  Sat May 19 03:47:28 2018(r333826)
+++ head/sys/kern/subr_epoch.c  Sat May 19 03:47:37 2018(r333827)
@@ -136,7 +136,7 @@ static bool usedomains = true;
 static void
 epoch_init(void *arg __unused)
 {
-   int domain, count, cpu;
+   int domain, cpu;
 
block_count = counter_u64_alloc(M_WAITOK);
migrate_count = counter_u64_alloc(M_WAITOK);
@@ -146,7 +146,7 @@ epoch_init(void *arg __unused)
epoch_call_task_count = counter_u64_alloc(M_WAITOK);
if (usedomains == false)
goto done;
-   count = domain = 0;
+   domain = 0;
domoffsets[0] = 0;
for (domain = 0; domain < vm_ndomains; domain++) {
domcount[domain] = CPU_COUNT(_domain[domain]);
@@ -361,13 +361,11 @@ epoch_block_handler_preempt(struct ck_epoch *global __
void *arg __unused)
 {
epoch_record_t record;
-   struct epoch_pcpu_state *eps;
struct thread *td, *tdwait, *owner;
struct turnstile *ts;
struct lock_object *lock;
int spincount, gen;
 
-   eps = arg;
record = __containerof(cr, struct epoch_record, er_record);
td = curthread;
spincount = 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: r333834 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 03:57:41 2018
New Revision: 333834
URL: https://svnweb.freebsd.org/changeset/base/333834

Log:
  signotify: don't create a stack local that isn't used on non-debug builds

Modified:
  head/sys/kern/kern_sig.c

Modified: head/sys/kern/kern_sig.c
==
--- head/sys/kern/kern_sig.cSat May 19 03:56:39 2018(r333833)
+++ head/sys/kern/kern_sig.cSat May 19 03:57:41 2018(r333834)
@@ -605,11 +605,8 @@ cursig(struct thread *td)
 void
 signotify(struct thread *td)
 {
-   struct proc *p;
 
-   p = td->td_proc;
-
-   PROC_LOCK_ASSERT(p, MA_OWNED);
+   PROC_LOCK_ASSERT(td->td_proc, MA_OWNED);
 
if (SIGPENDING(td)) {
thread_lock(td);
___
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: r333836 - head/sys/powerpc/powernv

2018-05-18 Thread Justin Hibbits
Author: jhibbits
Date: Sat May 19 04:01:15 2018
New Revision: 333836
URL: https://svnweb.freebsd.org/changeset/base/333836

Log:
  powerpc64: Add OPAL definitions
  
  Summary:
  Add additional OPAL PCI definitions and expand the code to use them in order 
to
  ease the OPAL interface process for new comers.
  
  These definitions came directly from the OPAL code and they are the same for
  both PHB3 (POWER8) and PHB4 (POWER9).
  
  Submitted by: Breno Leitao
  Differential Revision: https://reviews.freebsd.org/D15432

Modified:
  head/sys/powerpc/powernv/opal.h
  head/sys/powerpc/powernv/opal_pci.c

Modified: head/sys/powerpc/powernv/opal.h
==
--- head/sys/powerpc/powernv/opal.h Sat May 19 03:58:40 2018
(r333835)
+++ head/sys/powerpc/powernv/opal.h Sat May 19 04:01:15 2018
(r333836)
@@ -79,6 +79,20 @@ int opal_call(uint64_t token, ...);
 #defineOPAL_UNMAP_PE   0
 #define OPAL_MAP_PE1
 
+#defineOPAL_PCI_BUS_ANY0
+#defineOPAL_PCI_BUS_3BITS  2
+#defineOPAL_PCI_BUS_4BITS  3
+#defineOPAL_PCI_BUS_5BITS  4
+#defineOPAL_PCI_BUS_6BITS  5
+#defineOPAL_PCI_BUS_7BITS  6
+#defineOPAL_PCI_BUS_ALL7 /* Match bus number exactly */
+
+#defineOPAL_IGNORE_RID_DEVICE_NUMBER   0
+#defineOPAL_COMPARE_RID_DEVICE_NUMBER  1
+
+#defineOPAL_IGNORE_RID_FUNC_NUMBER 0
+#defineOPAL_COMPARE_RID_FUNC_NUMBER1
+
 #defineOPAL_SUCCESS0
 #defineOPAL_PARAMETER  -1
 #defineOPAL_BUSY   -2

Modified: head/sys/powerpc/powernv/opal_pci.c
==
--- head/sys/powerpc/powernv/opal_pci.c Sat May 19 03:58:40 2018
(r333835)
+++ head/sys/powerpc/powernv/opal_pci.c Sat May 19 04:01:15 2018
(r333836)
@@ -254,8 +254,8 @@ opalpci_attach(device_t dev)
 * such time as we start wanting to do things like bhyve.
 */
err = opal_call(OPAL_PCI_SET_PE, sc->phb_id, OPAL_PCI_DEFAULT_PE,
-   0, 0, 0, 0, /* All devices */
-   OPAL_MAP_PE);
+   0, OPAL_PCI_BUS_ANY, OPAL_IGNORE_RID_DEVICE_NUMBER,
+   OPAL_IGNORE_RID_FUNC_NUMBER, OPAL_MAP_PE);
if (err != 0) {
device_printf(dev, "PE mapping failed: %d\n", err);
return (ENXIO);
___
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: r333837 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 04:02:29 2018
New Revision: 333837
URL: https://svnweb.freebsd.org/changeset/base/333837

Log:
  tty: conditionally assign to ret value only used by MPASS statement

Modified:
  head/sys/kern/tty_inq.c
  head/sys/kern/tty_outq.c

Modified: head/sys/kern/tty_inq.c
==
--- head/sys/kern/tty_inq.c Sat May 19 04:01:15 2018(r333836)
+++ head/sys/kern/tty_inq.c Sat May 19 04:02:29 2018(r333837)
@@ -328,13 +328,15 @@ ttyinq_write(struct ttyinq *ti, const void *buf, size_
 int
 ttyinq_write_nofrag(struct ttyinq *ti, const void *buf, size_t nbytes, int 
quote)
 {
+#ifdef INVARIANTS
size_t ret;
+#endif
 
if (ttyinq_bytesleft(ti) < nbytes)
return (-1);
 
/* We should always be able to write it back. */
-   ret = ttyinq_write(ti, buf, nbytes, quote);
+   DBGSET(ret, ttyinq_write(ti, buf, nbytes, quote));
MPASS(ret == nbytes);
 
return (0);

Modified: head/sys/kern/tty_outq.c
==
--- head/sys/kern/tty_outq.cSat May 19 04:01:15 2018(r333836)
+++ head/sys/kern/tty_outq.cSat May 19 04:02:29 2018(r333837)
@@ -324,13 +324,15 @@ ttyoutq_write(struct ttyoutq *to, const void *buf, siz
 int
 ttyoutq_write_nofrag(struct ttyoutq *to, const void *buf, size_t nbytes)
 {
+#ifdef INVARIANTS
size_t ret;
+#endif
 
if (ttyoutq_bytesleft(to) < nbytes)
return (-1);
 
/* We should always be able to write it back. */
-   ret = ttyoutq_write(to, buf, nbytes);
+   DBGSET(ret, ttyoutq_write(to, buf, nbytes));
MPASS(ret == nbytes);
 
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"


svn commit: r333833 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 03:56:39 2018
New Revision: 333833
URL: https://svnweb.freebsd.org/changeset/base/333833

Log:
  sysv_msg initialize saved_msgsz

Modified:
  head/sys/kern/sysv_msg.c

Modified: head/sys/kern/sysv_msg.c
==
--- head/sys/kern/sysv_msg.cSat May 19 03:55:42 2018(r333832)
+++ head/sys/kern/sysv_msg.cSat May 19 03:56:39 2018(r333833)
@@ -776,7 +776,7 @@ kern_msgsnd(struct thread *td, int msqid, const void *
struct prison *rpr;
short next;
 #ifdef RACCT
-   size_t saved_msgsz;
+   size_t saved_msgsz = 0;
 #endif
 
rpr = msg_find_prison(td->td_ucred);
___
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: r333835 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 03:58:40 2018
New Revision: 333835
URL: https://svnweb.freebsd.org/changeset/base/333835

Log:
  remove unused locked variable in lockmgr_unlock_fast_path

Modified:
  head/sys/kern/kern_lock.c

Modified: head/sys/kern/kern_lock.c
==
--- head/sys/kern/kern_lock.c   Sat May 19 03:57:41 2018(r333834)
+++ head/sys/kern/kern_lock.c   Sat May 19 03:58:40 2018(r333835)
@@ -1101,7 +1101,6 @@ lockmgr_unlock_fast_path(struct lock *lk, u_int flags,
 {
struct lock_class *class;
uintptr_t x, tid;
-   bool unlocked;
const char *file;
int line;
 
@@ -1112,12 +,10 @@ lockmgr_unlock_fast_path(struct lock *lk, u_int flags,
line = __LINE__;
 
_lockmgr_assert(lk, KA_LOCKED, file, line);
-   unlocked = false;
x = lk->lk_lock;
if (__predict_true(x & LK_SHARE) != 0) {
if (lockmgr_sunlock_try(lk, )) {
lockmgr_note_shared_release(lk, file, line);
-   unlocked = true;
} else {
return (lockmgr_sunlock_hard(lk, x, flags, ilk, file, 
line));
}
@@ -1126,7 +1123,6 @@ lockmgr_unlock_fast_path(struct lock *lk, u_int flags,
if (!lockmgr_recursed(lk) &&
atomic_cmpset_rel_ptr(>lk_lock, tid, LK_UNLOCKED)) {
lockmgr_note_exclusive_release(lk, file, line);
-   unlocked = true;
} else {
return (lockmgr_xunlock_hard(lk, x, flags, ilk, file, 
line));
}
___
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: r333863 - in head/sys: kern sys

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 05:14:05 2018
New Revision: 333863
URL: https://svnweb.freebsd.org/changeset/base/333863

Log:
  capsicum: propagate const correctness

Modified:
  head/sys/kern/kern_descrip.c
  head/sys/kern/sys_capability.c
  head/sys/sys/capsicum.h

Modified: head/sys/kern/kern_descrip.c
==
--- head/sys/kern/kern_descrip.cSat May 19 05:12:57 2018
(r333862)
+++ head/sys/kern/kern_descrip.cSat May 19 05:14:05 2018
(r333863)
@@ -2625,9 +2625,9 @@ fget_unlocked(struct filedesc *fdp, int fd, cap_rights
 struct file **fpp, seq_t *seqp)
 {
 #ifdef CAPABILITIES
-   struct filedescent *fde;
+   const struct filedescent *fde;
 #endif
-   struct fdescenttbl *fdt;
+   const struct fdescenttbl *fdt;
struct file *fp;
u_int count;
 #ifdef CAPABILITIES
@@ -2673,7 +2673,7 @@ fget_unlocked(struct filedesc *fdp, int fd, cap_rights
 * table before this fd was closed, so it possible that
 * there is a stale fp pointer in cached version.
 */
-   fdt = *(struct fdescenttbl * volatile 
*)&(fdp->fd_files);
+   fdt = *(const struct fdescenttbl * const volatile 
*)&(fdp->fd_files);
continue;
}
/*

Modified: head/sys/kern/sys_capability.c
==
--- head/sys/kern/sys_capability.c  Sat May 19 05:12:57 2018
(r333862)
+++ head/sys/kern/sys_capability.c  Sat May 19 05:14:05 2018
(r333863)
@@ -183,7 +183,7 @@ cap_check(const cap_rights_t *havep, const cap_rights_
  * Convert capability rights into VM access flags.
  */
 u_char
-cap_rights_to_vmprot(cap_rights_t *havep)
+cap_rights_to_vmprot(const cap_rights_t *havep)
 {
u_char maxprot;
 
@@ -204,14 +204,14 @@ cap_rights_to_vmprot(cap_rights_t *havep)
  * this one file.
  */
 
-cap_rights_t *
-cap_rights_fde(struct filedescent *fdep)
+const cap_rights_t *
+cap_rights_fde(const struct filedescent *fdep)
 {
 
return (>fde_rights);
 }
 
-cap_rights_t *
+const cap_rights_t *
 cap_rights(struct filedesc *fdp, int fd)
 {
 

Modified: head/sys/sys/capsicum.h
==
--- head/sys/sys/capsicum.h Sat May 19 05:12:57 2018(r333862)
+++ head/sys/sys/capsicum.h Sat May 19 05:14:05 2018(r333863)
@@ -444,14 +444,14 @@ int   cap_check(const cap_rights_t *havep, const 
cap_rig
 /*
  * Convert capability rights into VM access flags.
  */
-u_char cap_rights_to_vmprot(cap_rights_t *havep);
+u_char cap_rights_to_vmprot(const cap_rights_t *havep);
 
 /*
  * For the purposes of procstat(1) and similar tools, allow kern_descrip.c to
  * extract the rights from a capability.
  */
-cap_rights_t   *cap_rights_fde(struct filedescent *fde);
-cap_rights_t   *cap_rights(struct filedesc *fdp, int fd);
+const cap_rights_t *cap_rights_fde(const struct filedescent *fde);
+const cap_rights_t *cap_rights(struct filedesc *fdp, int fd);
 
 intcap_ioctl_check(struct filedesc *fdp, int fd, u_long cmd);
 intcap_fcntl_check_fde(struct filedescent *fde, int 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: r333865 - head/sys/dev/netmap

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 05:37:18 2018
New Revision: 333865
URL: https://svnweb.freebsd.org/changeset/base/333865

Log:
  netmap: compare e1 with e2, not with itself

Modified:
  head/sys/dev/netmap/netmap_freebsd.c

Modified: head/sys/dev/netmap/netmap_freebsd.c
==
--- head/sys/dev/netmap/netmap_freebsd.cSat May 19 05:27:49 2018
(r333864)
+++ head/sys/dev/netmap/netmap_freebsd.cSat May 19 05:37:18 2018
(r333865)
@@ -651,7 +651,7 @@ nm_os_extmem_nextpage(struct nm_os_extmem *e)
 int
 nm_os_extmem_isequal(struct nm_os_extmem *e1, struct nm_os_extmem *e2)
 {
-   return (e1->obj == e1->obj);
+   return (e1->obj == e2->obj);
 }
 
 int
___
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: r333841 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 04:08:11 2018
New Revision: 333841
URL: https://svnweb.freebsd.org/changeset/base/333841

Log:
  cache_lookup remove unused variable and initialize used

Modified:
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/vfs_cache.c
==
--- head/sys/kern/vfs_cache.c   Sat May 19 04:07:00 2018(r333840)
+++ head/sys/kern/vfs_cache.c   Sat May 19 04:08:11 2018(r333841)
@@ -752,6 +752,7 @@ cache_negative_shrink_select(int start, struct namecac
int i;
 
*ncpp = ncp = NULL;
+   neglist = NULL;
 
for (i = start; i < numneglists; i++) {
neglist = [i];
@@ -1230,7 +1231,7 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st
struct namecache_ts *ncp_ts;
struct namecache *ncp;
struct rwlock *blp;
-   struct mtx *dvlp, *dvlp2;
+   struct mtx *dvlp;
uint32_t hash;
int error, ltype;
 
@@ -1249,12 +1250,12 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st
 
 retry:
blp = NULL;
+   dvlp = NULL;
error = 0;
if (cnp->cn_namelen == 2 &&
cnp->cn_nameptr[0] == '.' && cnp->cn_nameptr[1] == '.') {
counter_u64_add(dotdothits, 1);
dvlp = VP2VNODELOCK(dvp);
-   dvlp2 = NULL;
mtx_lock(dvlp);
ncp = dvp->v_cache_dd;
if (ncp == NULL) {
@@ -1629,6 +1630,7 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, 
 
cache_celockstate_init();
ndd = NULL;
+   ncp_ts = NULL;
flag = 0;
if (cnp->cn_nameptr[0] == '.') {
if (cnp->cn_namelen == 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: r333844 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 04:13:20 2018
New Revision: 333844
URL: https://svnweb.freebsd.org/changeset/base/333844

Log:
  make_dev: avoid unused assignments on non debug builds

Modified:
  head/sys/kern/kern_conf.c

Modified: head/sys/kern/kern_conf.c
==
--- head/sys/kern/kern_conf.c   Sat May 19 04:10:53 2018(r333843)
+++ head/sys/kern/kern_conf.c   Sat May 19 04:13:20 2018(r333844)
@@ -866,11 +866,13 @@ make_dev(struct cdevsw *devsw, int unit, uid_t uid, gi
 {
struct cdev *dev;
va_list ap;
+#ifdef INVARIANTS
int res;
+#endif
 
va_start(ap, fmt);
-   res = make_dev_credv(0, , devsw, unit, NULL, uid, gid, mode, fmt,
-   ap);
+   DBGSET(res, make_dev_credv(0, , devsw, unit, NULL, uid, gid, mode, 
fmt,
+   ap));
va_end(ap);
KASSERT(res == 0 && dev != NULL,
("make_dev: failed make_dev_credv (error=%d)", res));
@@ -883,10 +885,12 @@ make_dev_cred(struct cdevsw *devsw, int unit, struct u
 {
struct cdev *dev;
va_list ap;
+#ifdef INVARIANTS
int res;
+#endif
 
va_start(ap, fmt);
-   res = make_dev_credv(0, , devsw, unit, cr, uid, gid, mode, fmt, ap);
+   DBGSET(res, make_dev_credv(0, , devsw, unit, cr, uid, gid, mode, 
fmt, ap));
va_end(ap);
 
KASSERT(res == 0 && dev != NULL,
@@ -996,10 +1000,11 @@ make_dev_alias(struct cdev *pdev, const char *fmt, ...
 {
struct cdev *dev;
va_list ap;
+#ifdef INVARIANTS
int res;
-
+#endif
va_start(ap, fmt);
-   res = make_dev_alias_v(MAKEDEV_WAITOK, , pdev, fmt, ap);
+   DBGSET(res, make_dev_alias_v(MAKEDEV_WAITOK, , pdev, fmt, ap));
va_end(ap);
 
KASSERT(res == 0 && dev != NULL,
___
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: r333848 - in head/sys: conf modules/bxe modules/drm2/i915kms modules/drm2/radeonkms

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 04:46:34 2018
New Revision: 333848
URL: https://svnweb.freebsd.org/changeset/base/333848

Log:
  disable set but not used on code that can't be changed

Modified:
  head/sys/conf/kern.mk
  head/sys/modules/bxe/Makefile
  head/sys/modules/drm2/i915kms/Makefile
  head/sys/modules/drm2/radeonkms/Makefile

Modified: head/sys/conf/kern.mk
==
--- head/sys/conf/kern.mk   Sat May 19 04:43:49 2018(r333847)
+++ head/sys/conf/kern.mk   Sat May 19 04:46:34 2018(r333848)
@@ -49,6 +49,7 @@ CLANG_NO_IAS34= -no-integrated-as
 .if ${COMPILER_VERSION} >= 40800
 # Catch-all for all the things that are in our tree, but for which we're
 # not yet ready for this compiler.
+NO_WUNUSED_BUT_SET_VARIABLE = -Wno-unused-but-set-variable
 CWARNEXTRA?=   -Wno-error=address  \
-Wno-error=aggressive-loop-optimizations\
-Wno-error=array-bounds \

Modified: head/sys/modules/bxe/Makefile
==
--- head/sys/modules/bxe/Makefile   Sat May 19 04:43:49 2018
(r333847)
+++ head/sys/modules/bxe/Makefile   Sat May 19 04:46:34 2018
(r333848)
@@ -19,3 +19,4 @@ SRCS  += bxe.c   \
 CFLAGS += -I${BXE}
 
 .include 
+CWARNFLAGS+=   ${NO_WUNUSED_BUT_SET_VARIABLE}

Modified: head/sys/modules/drm2/i915kms/Makefile
==
--- head/sys/modules/drm2/i915kms/Makefile  Sat May 19 04:43:49 2018
(r333847)
+++ head/sys/modules/drm2/i915kms/Makefile  Sat May 19 04:46:34 2018
(r333848)
@@ -68,3 +68,4 @@ CWARNFLAGS.i915_gem_tiling.c= ${NO_WTAUTOLOGICAL_POINT
 CWARNFLAGS.i915_gem_execbuffer.c=  ${NO_WTAUTOLOGICAL_POINTER_COMPARE}
 CWARNFLAGS.intel_display.c=${NO_WTAUTOLOGICAL_POINTER_COMPARE}
 CWARNFLAGS.intel_overlay.c=${NO_WTAUTOLOGICAL_POINTER_COMPARE}
+CWARNFLAGS+=   ${NO_WUNUSED_BUT_SET_VARIABLE}

Modified: head/sys/modules/drm2/radeonkms/Makefile
==
--- head/sys/modules/drm2/radeonkms/MakefileSat May 19 04:43:49 2018
(r333847)
+++ head/sys/modules/drm2/radeonkms/MakefileSat May 19 04:46:34 2018
(r333848)
@@ -118,3 +118,4 @@ CFLAGS+=-I${SRCTOP}/sys/dev/drm2/radeon
 CWARNFLAGS.radeon_cp.c=-Wno-unused-value
 CWARNFLAGS.r600_cp.c=  -Wno-unused-value
 CWARNFLAGS+=   ${CWARNFLAGS.${.IMPSRC:T}}
+CWARNFLAGS+=   ${NO_WUNUSED_BUT_SET_VARIABLE}
___
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: r333849 - head/sys/sys

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 04:47:34 2018
New Revision: 333849
URL: https://svnweb.freebsd.org/changeset/base/333849

Log:
  epoch: avoid warning when INVARIANTS is not enabled

Modified:
  head/sys/sys/epoch.h

Modified: head/sys/sys/epoch.h
==
--- head/sys/sys/epoch.hSat May 19 04:46:34 2018(r333848)
+++ head/sys/sys/epoch.hSat May 19 04:47:34 2018(r333849)
@@ -63,7 +63,7 @@ static __inline void
 epoch_enter_preempt(epoch_t epoch)
 {
struct thread *td;
-   int nesting;
+   int nesting __unused;
 
td = curthread;
nesting = td->td_epochnest++;
___
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: r333866 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 05:37:58 2018
New Revision: 333866
URL: https://svnweb.freebsd.org/changeset/base/333866

Log:
  AF_UNIX: switch to annotations to avoid warnings

Modified:
  head/sys/kern/uipc_usrreq.c

Modified: head/sys/kern/uipc_usrreq.c
==
--- head/sys/kern/uipc_usrreq.c Sat May 19 05:37:18 2018(r333865)
+++ head/sys/kern/uipc_usrreq.c Sat May 19 05:37:58 2018(r333866)
@@ -1678,9 +1678,7 @@ static void
 unp_disconnect(struct unpcb *unp, struct unpcb *unp2)
 {
struct socket *so, *so2;
-#ifdef INVARIANTS
-   int freed;
-#endif
+   int freed __unused;
 
KASSERT(unp2 != NULL, ("unp_disconnect: unp2 == NULL"));
 
@@ -1716,15 +1714,9 @@ unp_disconnect(struct unpcb *unp, struct unpcb *unp2)
soisdisconnected(so2);
break;
}
-#ifdef INVARIANTS  
-   freed =
-#endif 
-   unp_pcb_rele(unp);
+   freed = unp_pcb_rele(unp);
MPASS(freed == 0);
-#ifdef INVARIANTS  
-   freed =
-#endif
-   unp_pcb_rele(unp2);
+   freed = unp_pcb_rele(unp2);
MPASS(freed == 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: r333826 - head/sys/powerpc/ofw

2018-05-18 Thread Justin Hibbits
Author: jhibbits
Date: Sat May 19 03:47:28 2018
New Revision: 333826
URL: https://svnweb.freebsd.org/changeset/base/333826

Log:
  Fix a manual copy from the original diff for r333825
  
  The 'else' was in the original diff.
  
  Submitted by: Breno Leitao

Modified:
  head/sys/powerpc/ofw/ofw_machdep.c

Modified: head/sys/powerpc/ofw/ofw_machdep.c
==
--- head/sys/powerpc/ofw/ofw_machdep.c  Sat May 19 03:45:38 2018
(r333825)
+++ head/sys/powerpc/ofw/ofw_machdep.c  Sat May 19 03:47:28 2018
(r333826)
@@ -352,7 +352,7 @@ ofw_mem_regions(struct mem_region *memp, int *memsz,
if (OF_getproplen(phandle, "linux,usable-memory") >= 0)
res = parse_ofw_memory(phandle, "linux,usable-memory",
[asz]);
-   if (OF_getproplen(phandle, "available") >= 0)
+   else if (OF_getproplen(phandle, "available") >= 0)
res = parse_ofw_memory(phandle, "available",
[asz]);
else
___
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: r333845 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 04:14:00 2018
New Revision: 333845
URL: https://svnweb.freebsd.org/changeset/base/333845

Log:
  cpuset_thread0: avoid unused assignment on non debug build

Modified:
  head/sys/kern/kern_cpuset.c

Modified: head/sys/kern/kern_cpuset.c
==
--- head/sys/kern/kern_cpuset.c Sat May 19 04:13:20 2018(r333844)
+++ head/sys/kern/kern_cpuset.c Sat May 19 04:14:00 2018(r333845)
@@ -1385,8 +1385,10 @@ struct cpuset *
 cpuset_thread0(void)
 {
struct cpuset *set;
-   int error;
int i;
+#ifdef INVARIANTS
+   int error;
+#endif
 
cpuset_zone = uma_zcreate("cpuset", sizeof(struct cpuset), NULL, NULL,
NULL, NULL, UMA_ALIGN_CACHE, 0);
@@ -1411,14 +1413,14 @@ cpuset_thread0(void)
 * Now derive a default (1), modifiable set from that to give out.
 */
set = uma_zalloc(cpuset_zone, M_WAITOK | M_ZERO);
-   error = _cpuset_create(set, cpuset_zero, NULL, NULL, 1);
+   DBGSET(error, _cpuset_create(set, cpuset_zero, NULL, NULL, 1));
KASSERT(error == 0, ("Error creating default set: %d\n", error));
cpuset_default = set;
/*
 * Create the kernel set (2).
 */
set = uma_zalloc(cpuset_zone, M_WAITOK | M_ZERO);
-   error = _cpuset_create(set, cpuset_zero, NULL, NULL, 2);
+   DBGSET(error, _cpuset_create(set, cpuset_zero, NULL, NULL, 2));
KASSERT(error == 0, ("Error creating kernel set: %d\n", error));
set->cs_domain = 
cpuset_kernel = set;
___
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: r333847 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 04:43:49 2018
New Revision: 333847
URL: https://svnweb.freebsd.org/changeset/base/333847

Log:
  malloc: avoid possibly returning stack garbage if MALLOC_DEBUG is defined

Modified:
  head/sys/kern/kern_malloc.c

Modified: head/sys/kern/kern_malloc.c
==
--- head/sys/kern/kern_malloc.c Sat May 19 04:21:50 2018(r333846)
+++ head/sys/kern/kern_malloc.c Sat May 19 04:43:49 2018(r333847)
@@ -559,6 +559,7 @@ malloc(size_t size, struct malloc_type *mtp, int flags
 #endif
 
 #ifdef MALLOC_DEBUG
+   va = NULL;
if (malloc_dbg(, , mtp, flags) != 0)
return (va);
 #endif
@@ -604,6 +605,7 @@ malloc_domain(size_t size, struct malloc_type *mtp, in
 #endif
 
 #ifdef MALLOC_DEBUG
+   va = NULL;
if (malloc_dbg(, , mtp, flags) != 0)
return (va);
 #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"


svn commit: r333855 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 05:04:38 2018
New Revision: 333855
URL: https://svnweb.freebsd.org/changeset/base/333855

Log:
  lockf: annotate LOCKF_DEBUG only var

Modified:
  head/sys/kern/kern_lockf.c

Modified: head/sys/kern/kern_lockf.c
==
--- head/sys/kern/kern_lockf.c  Sat May 19 05:02:40 2018(r333854)
+++ head/sys/kern/kern_lockf.c  Sat May 19 05:04:38 2018(r333855)
@@ -2235,8 +2235,9 @@ graph_add_edge(struct owner_graph *g, struct owner_ver
 {
struct owner_edge *e;
struct owner_vertex_list deltaF, deltaB;
-   int nF, nB, n, vi, i;
+   int nF, n, vi, i;
int *indices;
+   int nB __unused;
 
sx_assert(_owner_graph_lock, SX_XLOCKED);
 
___
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: r333853 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 05:00:16 2018
New Revision: 333853
URL: https://svnweb.freebsd.org/changeset/base/333853

Log:
  turnstile / sleepqueue: annotate variables only used by debug builds

Modified:
  head/sys/kern/subr_sleepqueue.c
  head/sys/kern/subr_turnstile.c

Modified: head/sys/kern/subr_sleepqueue.c
==
--- head/sys/kern/subr_sleepqueue.c Sat May 19 04:59:39 2018
(r333852)
+++ head/sys/kern/subr_sleepqueue.c Sat May 19 05:00:16 2018
(r333853)
@@ -384,7 +384,7 @@ void
 sleepq_set_timeout_sbt(void *wchan, sbintime_t sbt, sbintime_t pr,
 int flags)
 {
-   struct sleepqueue_chain *sc;
+   struct sleepqueue_chain *sc __unused;
struct thread *td;
sbintime_t pr1;
 
@@ -780,7 +780,7 @@ sleepq_type(void *wchan)
 static int
 sleepq_resume_thread(struct sleepqueue *sq, struct thread *td, int pri)
 {
-   struct sleepqueue_chain *sc;
+   struct sleepqueue_chain *sc __unused;
 
MPASS(td != NULL);
MPASS(sq->sq_wchan != NULL);
@@ -974,7 +974,7 @@ sleepq_remove_matching(struct sleepqueue *sq, int queu
 static void
 sleepq_timeout(void *arg)
 {
-   struct sleepqueue_chain *sc;
+   struct sleepqueue_chain *sc __unused;
struct sleepqueue *sq;
struct thread *td;
void *wchan;

Modified: head/sys/kern/subr_turnstile.c
==
--- head/sys/kern/subr_turnstile.c  Sat May 19 04:59:39 2018
(r333852)
+++ head/sys/kern/subr_turnstile.c  Sat May 19 05:00:16 2018
(r333853)
@@ -804,7 +804,7 @@ turnstile_wait(struct turnstile *ts, struct thread *ow
 int
 turnstile_signal(struct turnstile *ts, int queue)
 {
-   struct turnstile_chain *tc;
+   struct turnstile_chain *tc __unused;
struct thread *td;
int empty;
 
@@ -855,7 +855,7 @@ turnstile_signal(struct turnstile *ts, int queue)
 void
 turnstile_broadcast(struct turnstile *ts, int queue)
 {
-   struct turnstile_chain *tc;
+   struct turnstile_chain *tc __unused;
struct turnstile *ts1;
struct thread *td;
 
___
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: r333856 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 05:06:18 2018
New Revision: 333856
URL: https://svnweb.freebsd.org/changeset/base/333856

Log:
  kevent: annotate unused stack local

Modified:
  head/sys/kern/kern_event.c

Modified: head/sys/kern/kern_event.c
==
--- head/sys/kern/kern_event.c  Sat May 19 05:04:38 2018(r333855)
+++ head/sys/kern/kern_event.c  Sat May 19 05:06:18 2018(r333856)
@@ -751,14 +751,12 @@ static void
 filt_timerdetach(struct knote *kn)
 {
struct kq_timer_cb_data *kc;
-#ifdef INVARIANTS
-   unsigned int old;
-#endif
+   unsigned int old __unused;
 
kc = kn->kn_ptr.p_v;
callout_drain(>c);
free(kc, M_KQUEUE);
-   DBGSET(old, atomic_fetchadd_int(_ncallouts, -1));
+   old = atomic_fetchadd_int(_ncallouts, -1);
KASSERT(old > 0, ("Number of callouts cannot become negative"));
kn->kn_status |= KN_DETACHED;   /* knlist_remove sets it */
 }
___
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: r333854 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 05:02:40 2018
New Revision: 333854
URL: https://svnweb.freebsd.org/changeset/base/333854

Log:
  capsicum: annotate variable only used by debug

Modified:
  head/sys/kern/subr_capability.c

Modified: head/sys/kern/subr_capability.c
==
--- head/sys/kern/subr_capability.c Sat May 19 05:00:16 2018
(r333853)
+++ head/sys/kern/subr_capability.c Sat May 19 05:02:40 2018
(r333854)
@@ -108,7 +108,7 @@ static void
 cap_rights_vset(cap_rights_t *rights, va_list ap)
 {
uint64_t right;
-   int i, n;
+   int i, n __unused;
 
assert(CAPVER(rights) == CAP_RIGHTS_VERSION_00);
 
@@ -133,7 +133,7 @@ static void
 cap_rights_vclear(cap_rights_t *rights, va_list ap)
 {
uint64_t right;
-   int i, n;
+   int i, n __unused;
 
assert(CAPVER(rights) == CAP_RIGHTS_VERSION_00);
 
@@ -158,7 +158,7 @@ static bool
 cap_rights_is_vset(const cap_rights_t *rights, va_list ap)
 {
uint64_t right;
-   int i, n;
+   int i, n __unused;
 
assert(CAPVER(rights) == CAP_RIGHTS_VERSION_00);
 
@@ -194,7 +194,7 @@ __cap_rights_sysinit(void *arg)
 cap_rights_t *
 __cap_rights_init(int version, cap_rights_t *rights, ...)
 {
-   unsigned int n;
+   unsigned int n __unused;
va_list ap;
 
assert(version == CAP_RIGHTS_VERSION_00);
___
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: r333869 - head/sys/netinet

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 05:56:21 2018
New Revision: 333869
URL: https://svnweb.freebsd.org/changeset/base/333869

Log:
  netinet silence warnings

Modified:
  head/sys/netinet/igmp.c
  head/sys/netinet/in.c
  head/sys/netinet/in_mcast.c
  head/sys/netinet/ip_mroute.c
  head/sys/netinet/sctp_indata.c
  head/sys/netinet/sctp_output.c
  head/sys/netinet/sctp_syscalls.c
  head/sys/netinet/sctputil.c
  head/sys/netinet/siftr.c
  head/sys/netinet/tcp_timewait.c

Modified: head/sys/netinet/igmp.c
==
--- head/sys/netinet/igmp.c Sat May 19 05:55:31 2018(r333868)
+++ head/sys/netinet/igmp.c Sat May 19 05:56:21 2018(r333869)
@@ -1846,7 +1846,7 @@ igmp_v3_process_group_timers(struct in_multi_head *inm
 * immediate transmission.
 */
if (query_response_timer_expired) {
-   int retval;
+   int retval __unused;
 
retval = igmp_v3_enqueue_group_record(qrq, inm, 0, 1,
(inm->inm_state == IGMP_SG_QUERY_PENDING_MEMBER));
@@ -2562,7 +2562,7 @@ igmp_final_leave(struct in_multi *inm, struct igmp_ifs
inm->inm_state = IGMP_NOT_MEMBER;
inm->inm_sctimer = 0;
} else {
-   int retval;
+   int retval __unused;
 
inm_acquire_locked(inm);
 
@@ -2635,7 +2635,7 @@ igmp_v3_enqueue_group_record(struct mbufq *mq, struct 
struct ifnet*ifp;
struct ip_msource   *ims, *nims;
struct mbuf *m0, *m, *md;
-   int  error, is_filter_list_change;
+   int  is_filter_list_change;
int  minrec0len, m0srcs, msrcs, nbytes, off;
int  record_has_sources;
int  now;
@@ -2645,7 +2645,6 @@ igmp_v3_enqueue_group_record(struct mbufq *mq, struct 
 
IN_MULTI_LIST_LOCK_ASSERT();
 
-   error = 0;
ifp = inm->inm_ifp;
is_filter_list_change = 0;
m = NULL;
@@ -3303,7 +3302,7 @@ igmp_v3_dispatch_general_query(struct igmp_ifsoftc *ig
struct ifmultiaddr  *ifma;
struct ifnet*ifp;
struct in_multi *inm;
-   int  retval, loop;
+   int  retval __unused, loop;
 
IN_MULTI_LIST_LOCK_ASSERT();
IGMP_LOCK_ASSERT();

Modified: head/sys/netinet/in.c
==
--- head/sys/netinet/in.c   Sat May 19 05:55:31 2018(r333868)
+++ head/sys/netinet/in.c   Sat May 19 05:56:21 2018(r333869)
@@ -1152,7 +1152,6 @@ in_lltable_match_prefix(const struct sockaddr *saddr,
 static void
 in_lltable_free_entry(struct lltable *llt, struct llentry *lle)
 {
-   struct ifnet *ifp;
size_t pkts_dropped;
 
LLE_WLOCK_ASSERT(lle);
@@ -1160,8 +1159,7 @@ in_lltable_free_entry(struct lltable *llt, struct llen
 
/* Unlink entry from table if not already */
if ((lle->la_flags & LLE_LINKED) != 0) {
-   ifp = llt->llt_ifp;
-   IF_AFDATA_WLOCK_ASSERT(ifp);
+   IF_AFDATA_WLOCK_ASSERT(llt->llt_ifp);
lltable_unlink_entry(llt, lle);
}
 

Modified: head/sys/netinet/in_mcast.c
==
--- head/sys/netinet/in_mcast.c Sat May 19 05:55:31 2018(r333868)
+++ head/sys/netinet/in_mcast.c Sat May 19 05:56:21 2018(r333869)
@@ -347,10 +347,10 @@ inm_lookup_locked(struct ifnet *ifp, const struct in_a
if (ifma->ifma_addr->sa_family != AF_INET ||
ifma->ifma_protospec == NULL)
continue;
-   inm = (struct in_multi *)ifma->ifma_protospec;
-   if (inm->inm_addr.s_addr == ina.s_addr)
-   break;
-   inm = NULL;
+   inm = (struct in_multi *)ifma->ifma_protospec;
+   if (inm->inm_addr.s_addr == ina.s_addr)
+   break;
+   inm = NULL;
}
return (inm);
 }

Modified: head/sys/netinet/ip_mroute.c
==
--- head/sys/netinet/ip_mroute.cSat May 19 05:55:31 2018
(r333868)
+++ head/sys/netinet/ip_mroute.cSat May 19 05:56:21 2018
(r333869)
@@ -1680,7 +1680,7 @@ send_packet(struct vif *vifp, struct mbuf *m)
 {
struct ip_moptions imo;
struct in_multi *imm[2];
-   int error;
+   int error __unused;
 
VIF_LOCK_ASSERT();
 

Modified: head/sys/netinet/sctp_indata.c

svn commit: r333871 - head/sys/amd64/amd64

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 05:58:05 2018
New Revision: 333871
URL: https://svnweb.freebsd.org/changeset/base/333871

Log:
  pmap: silence warnings

Modified:
  head/sys/amd64/amd64/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==
--- head/sys/amd64/amd64/pmap.c Sat May 19 05:57:26 2018(r333870)
+++ head/sys/amd64/amd64/pmap.c Sat May 19 05:58:05 2018(r333871)
@@ -7366,6 +7366,7 @@ pmap_activate_sw(struct thread *td)
u_int cpuid;
struct amd64tss *tssp;
 
+   rflags = 0;
oldpmap = PCPU_GET(curpmap);
pmap = vmspace_pmap(td->td_proc->p_vmspace);
if (oldpmap == pmap)
@@ -7680,7 +7681,7 @@ pmap_map_io_transient(vm_page_t page[], vm_offset_t va
vm_paddr_t paddr;
boolean_t needs_mapping;
pt_entry_t *pte;
-   int cache_bits, error, i;
+   int cache_bits, error __unused, i;
 
/*
 * Allocate any KVA space that we need, this is done in a separate
___
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: r333870 - in head/sys/dev: bnxt ixgbe netmap

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 05:57:26 2018
New Revision: 333870
URL: https://svnweb.freebsd.org/changeset/base/333870

Log:
  netmap and iflib drivers, silence unused var warnings

Modified:
  head/sys/dev/bnxt/bnxt_hwrm.c
  head/sys/dev/bnxt/bnxt_txrx.c
  head/sys/dev/ixgbe/ix_txrx.c
  head/sys/dev/ixgbe/ixgbe_x550.c
  head/sys/dev/netmap/if_ptnet.c

Modified: head/sys/dev/bnxt/bnxt_hwrm.c
==
--- head/sys/dev/bnxt/bnxt_hwrm.c   Sat May 19 05:56:21 2018
(r333869)
+++ head/sys/dev/bnxt/bnxt_hwrm.c   Sat May 19 05:57:26 2018
(r333870)
@@ -633,9 +633,7 @@ int
 bnxt_hwrm_vnic_cfg(struct bnxt_softc *softc, struct bnxt_vnic_info *vnic)
 {
struct hwrm_vnic_cfg_input req = {0};
-   struct hwrm_vnic_cfg_output *resp;
 
-   resp = (void *)softc->hwrm_cmd_resp.idi_vaddr;
bnxt_hwrm_cmd_hdr_init(softc, , HWRM_VNIC_CFG);
 
if (vnic->flags & BNXT_VNIC_FLAG_DEFAULT)
@@ -953,9 +951,7 @@ bnxt_hwrm_rss_cfg(struct bnxt_softc *softc, struct bnx
 uint32_t hash_type)
 {
struct hwrm_vnic_rss_cfg_input  req = {0};
-   struct hwrm_vnic_rss_cfg_output *resp;
 
-   resp = (void *)softc->hwrm_cmd_resp.idi_vaddr;
bnxt_hwrm_cmd_hdr_init(softc, , HWRM_VNIC_RSS_CFG);
 
req.hash_type = htole32(hash_type);

Modified: head/sys/dev/bnxt/bnxt_txrx.c
==
--- head/sys/dev/bnxt/bnxt_txrx.c   Sat May 19 05:56:21 2018
(r333869)
+++ head/sys/dev/bnxt/bnxt_txrx.c   Sat May 19 05:57:26 2018
(r333870)
@@ -263,7 +263,6 @@ bnxt_isc_rxd_refill(void *sc, if_rxd_update_t iru)
uint32_t pidx;
uint8_t flid;
uint64_t *paddrs;
-   caddr_t *vaddrs;
qidx_t  *frag_idxs;
 
rxqid = iru->iru_qsidx;
@@ -271,7 +270,6 @@ bnxt_isc_rxd_refill(void *sc, if_rxd_update_t iru)
len = iru->iru_buf_size;
pidx = iru->iru_pidx;
flid = iru->iru_flidx;
-   vaddrs = iru->iru_vaddrs;
paddrs = iru->iru_paddrs;
frag_idxs = iru->iru_idxs;
 
@@ -533,7 +531,6 @@ bnxt_pkt_get_tpa(struct bnxt_softc *softc, if_rxd_info
 {
struct rx_tpa_end_cmpl *agend =
&((struct rx_tpa_end_cmpl *)cpr->ring.vaddr)[cpr->cons];
-   struct rx_tpa_end_cmpl_hi *agendh;
struct rx_abuf_cmpl *acp;
struct bnxt_full_tpa_start *tpas;
uint32_t flags2;
@@ -566,7 +563,6 @@ bnxt_pkt_get_tpa(struct bnxt_softc *softc, if_rxd_info
/* Now the second 16-byte BD */
NEXT_CP_CONS_V(>ring, cpr->cons, cpr->v_bit);
ri->iri_cidx = RING_NEXT(>ring, ri->iri_cidx);
-   agendh = &((struct rx_tpa_end_cmpl_hi *)cpr->ring.vaddr)[cpr->cons];
 
flags2 = le32toh(tpas->high.flags2);
if ((flags2 & RX_TPA_START_CMPL_FLAGS2_META_FORMAT_MASK) ==

Modified: head/sys/dev/ixgbe/ix_txrx.c
==
--- head/sys/dev/ixgbe/ix_txrx.cSat May 19 05:56:21 2018
(r333869)
+++ head/sys/dev/ixgbe/ix_txrx.cSat May 19 05:57:26 2018
(r333870)
@@ -217,6 +217,7 @@ ixgbe_isc_txd_encap(void *arg, if_pkt_info_t pi)
}
 
olinfo_status |= IXGBE_ADVTXD_CC;
+   pidx_last = 0;
for (j = 0; j < nsegs; j++) {
bus_size_t seglen;
 

Modified: head/sys/dev/ixgbe/ixgbe_x550.c
==
--- head/sys/dev/ixgbe/ixgbe_x550.c Sat May 19 05:56:21 2018
(r333869)
+++ head/sys/dev/ixgbe/ixgbe_x550.c Sat May 19 05:57:26 2018
(r333870)
@@ -1134,7 +1134,7 @@ s32 ixgbe_write_iosf_sb_reg_x550(struct ixgbe_hw *hw, 
u32 device_type, u32 data)
 {
u32 gssr = IXGBE_GSSR_PHY1_SM | IXGBE_GSSR_PHY0_SM;
-   u32 command, error;
+   u32 command, error __unused;
s32 ret;
 
ret = ixgbe_acquire_swfw_semaphore(hw, gssr);
@@ -1180,7 +1180,7 @@ s32 ixgbe_read_iosf_sb_reg_x550(struct ixgbe_hw *hw, u
   u32 device_type, u32 *data)
 {
u32 gssr = IXGBE_GSSR_PHY1_SM | IXGBE_GSSR_PHY0_SM;
-   u32 command, error;
+   u32 command, error __unused;
s32 ret;
 
ret = ixgbe_acquire_swfw_semaphore(hw, gssr);

Modified: head/sys/dev/netmap/if_ptnet.c
==
--- head/sys/dev/netmap/if_ptnet.c  Sat May 19 05:56:21 2018
(r333869)
+++ head/sys/dev/netmap/if_ptnet.c  Sat May 19 05:57:26 2018
(r333870)
@@ -757,7 +757,7 @@ ptnet_ioctl(if_t ifp, u_long cmd, caddr_t data)
struct ptnet_softc *sc = if_getsoftc(ifp);
device_t dev = sc->dev;
struct ifreq *ifr = (struct ifreq *)data;
-   int mask, err = 0;
+   int mask __unused, err = 0;
 
switch (cmd) {
case SIOCSIFFLAGS:

svn commit: r333839 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 04:05:36 2018
New Revision: 333839
URL: https://svnweb.freebsd.org/changeset/base/333839

Log:
  getnextevent: put variable only used by KTR under ifdef KTR

Modified:
  head/sys/kern/kern_clocksource.c

Modified: head/sys/kern/kern_clocksource.c
==
--- head/sys/kern/kern_clocksource.cSat May 19 04:04:44 2018
(r333838)
+++ head/sys/kern/kern_clocksource.cSat May 19 04:05:36 2018
(r333839)
@@ -272,18 +272,22 @@ getnextevent(void)
 #ifdef SMP
int cpu;
 #endif
+#ifdef KTR
int c;
 
+   c = -1;
+#endif
state = DPCPU_PTR(timerstate);
event = state->nextevent;
-   c = -1;
 #ifdef SMP
if ((timer->et_flags & ET_FLAGS_PERCPU) == 0) {
CPU_FOREACH(cpu) {
state = DPCPU_ID_PTR(cpu, timerstate);
if (event > state->nextevent) {
event = state->nextevent;
+#ifdef KTR
c = cpu;
+#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"


svn commit: r333838 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 04:04:44 2018
New Revision: 333838
URL: https://svnweb.freebsd.org/changeset/base/333838

Log:
  simplify control flow so that gcc knows we never pass save to 
curthread_pflags_restore
  without initializing

Modified:
  head/sys/kern/subr_uio.c

Modified: head/sys/kern/subr_uio.c
==
--- head/sys/kern/subr_uio.cSat May 19 04:02:29 2018(r333837)
+++ head/sys/kern/subr_uio.cSat May 19 04:04:44 2018(r333838)
@@ -212,7 +212,7 @@ uiomove_faultflag(void *cp, int n, struct uio *uio, in
size_t cnt;
int error, newflags, save;
 
-   error = 0;
+   save = error = 0;
 
KASSERT(uio->uio_rw == UIO_READ || uio->uio_rw == UIO_WRITE,
("uiomove: mode"));
@@ -275,7 +275,7 @@ uiomove_faultflag(void *cp, int n, struct uio *uio, in
n -= cnt;
}
 out:
-   if (uio->uio_segflg == UIO_USERSPACE) 
+   if (save)
curthread_pflags_restore(save);
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: r333798 - head/usr.bin/ncal

2018-05-18 Thread Warner Losh
Author: imp
Date: Fri May 18 16:19:45 2018
New Revision: 333798
URL: https://svnweb.freebsd.org/changeset/base/333798

Log:
  Based on multiple sources including the State Gazette the last day of
  Julian calendar in Bulgaria was 31.03.1916.
  
  Submitted by: Konstantin Terziev
  Pull Request: https://github.com/freebsd/freebsd/pull/142
  
  (I independently confirmed the date and this was the right date to use for 
ncal)

Modified:
  head/usr.bin/ncal/ncal.c

Modified: head/usr.bin/ncal/ncal.c
==
--- head/usr.bin/ncal/ncal.cFri May 18 14:59:04 2018(r333797)
+++ head/usr.bin/ncal/ncal.cFri May 18 16:19:45 2018(r333798)
@@ -78,7 +78,7 @@ static struct djswitch {
{"AT", "Austria",   {1583, 10,  5}},
{"AU", "Australia", {1752,  9,  2}},
{"BE", "Belgium",   {1582, 12, 14}},
-   {"BG", "Bulgaria",  {1916,  3, 18}},
+   {"BG", "Bulgaria",  {1916,  3, 31}},
{"CA", "Canada",{1752,  9,  2}},
{"CH", "Switzerland",   {1655,  2, 28}},
{"CN", "China", {1911, 12, 18}},
___
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: r333799 - head/sys/vm

2018-05-18 Thread Mark Johnston
Author: markj
Date: Fri May 18 16:59:58 2018
New Revision: 333799
URL: https://svnweb.freebsd.org/changeset/base/333799

Log:
  Don't increment addl_page_shortage for wired pages.
  
  Such pages are dequeued as they're encountered during the inactive queue
  scan, so by the time we get to the active queue scan, they should have
  already been subtracted from the inactive queue length.
  
  Reviewed by:  alc
  Differential Revision:https://reviews.freebsd.org/D15479

Modified:
  head/sys/vm/vm_pageout.c

Modified: head/sys/vm/vm_pageout.c
==
--- head/sys/vm/vm_pageout.cFri May 18 16:19:45 2018(r333798)
+++ head/sys/vm/vm_pageout.cFri May 18 16:59:58 2018(r333799)
@@ -1201,7 +1201,7 @@ vm_pageout_scan(struct vm_domain *vmd, int pass, int s
}
 
/*
-* The addl_page_shortage is the number of temporarily
+* The addl_page_shortage is an estimate of the number of temporarily
 * stuck pages in the inactive queue.  In other words, the
 * number of pages from the inactive count that should be
 * discounted in setting the target for the active queue scan.
@@ -1275,7 +1275,6 @@ recheck:
goto reinsert;
}
if (m->wire_count != 0) {
-   addl_page_shortage++;
vm_page_dequeue_deferred(m);
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"


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

2018-05-18 Thread Olivier Houchard
Author: cognet
Date: Fri May 18 13:28:02 2018
New Revision: 333791
URL: https://svnweb.freebsd.org/changeset/base/333791

Log:
  Instead of ignoring the VFP registers, set the dumppcb's pcb_fpusaved
  field, so that they are saved, as they may be used in the kernel, in the
  EFI and the crypto code.
  
  Reviewed by:  andrew

Modified:
  head/sys/arm64/arm64/vfp.c

Modified: head/sys/arm64/arm64/vfp.c
==
--- head/sys/arm64/arm64/vfp.c  Fri May 18 13:03:04 2018(r333790)
+++ head/sys/arm64/arm64/vfp.c  Fri May 18 13:28:02 2018(r333791)
@@ -172,12 +172,11 @@ vfp_save_state(struct thread *td, struct pcb *pcb)
 
/* 
 * savectx() will be called on panic with dumppcb as an argument,
-* dumppcb doesn't have pcb_fpusaved set so don't make any attempt
-* to store the VFP registers in it, we probably don't care much
-* at that point, anyway.
+* dumppcb doesn't have pcb_fpusaved set, so set it to save
+* the VFP registers.
 */
if (pcb->pcb_fpusaved == NULL)
-   return;
+   pcb->pcb_fpusaved = >pcb_fpustate;
 
if (td == NULL)
td = curthread;
___
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: r333792 - head/sys/dev/bnxt

2018-05-18 Thread Sean Bruno
Author: sbruno
Date: Fri May 18 13:49:12 2018
New Revision: 333792
URL: https://svnweb.freebsd.org/changeset/base/333792

Log:
  bnxt(4)
  - Fix HWRM warning message during HW LRO configuration.
  
  Submitted by: bhargava.marre...@broadcom.com
  MFC after:1 week
  Sponsored by: Broadcom Limited
  Differential Revision:https://reviews.freebsd.org/D15466

Modified:
  head/sys/dev/bnxt/bnxt_hwrm.c

Modified: head/sys/dev/bnxt/bnxt_hwrm.c
==
--- head/sys/dev/bnxt/bnxt_hwrm.c   Fri May 18 13:28:02 2018
(r333791)
+++ head/sys/dev/bnxt/bnxt_hwrm.c   Fri May 18 13:49:12 2018
(r333792)
@@ -1017,6 +1017,10 @@ bnxt_hwrm_vnic_tpa_cfg(struct bnxt_softc *softc)
struct hwrm_vnic_tpa_cfg_input req = {0};
uint32_t flags;
 
+   if (softc->vnic_info.id == (uint16_t) HWRM_NA_SIGNATURE) {
+   return 0;
+   }
+
bnxt_hwrm_cmd_hdr_init(softc, , HWRM_VNIC_TPA_CFG);
 
if (softc->hw_lro.enable) {
___
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: r333793 - head/usr.sbin/pmcannotate

2018-05-18 Thread Andrew Gallatin
Author: gallatin
Date: Fri May 18 14:14:04 2018
New Revision: 333793
URL: https://svnweb.freebsd.org/changeset/base/333793

Log:
  Teach pmcannotate about $TMPDIR and _PATH_TMP
  
  Convert pmcannotate to using $TMPDIR and _PATH_TMP rather than hard
  coding /tmp for temporary files.  Pmcannotate sometimes needs quite a
  lot of space to store the output from objdump, and will fail in odd
  ways if that output is truncated due to lack of space in /tmp.
  
  Reviewed by:  jtl
  Sponsored by: Netflix

Modified:
  head/usr.sbin/pmcannotate/pmcannotate.c

Modified: head/usr.sbin/pmcannotate/pmcannotate.c
==
--- head/usr.sbin/pmcannotate/pmcannotate.c Fri May 18 13:49:12 2018
(r333792)
+++ head/usr.sbin/pmcannotate/pmcannotate.c Fri May 18 14:14:04 2018
(r333793)
@@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -47,7 +48,7 @@ __FBSDID("$FreeBSD$");
 #defineFNBUFF  512
 #defineLNBUFF  512
 
-#defineTMPPATH "/tmp/pmcannotate.XX"
+#defineTMPNAME "pmcannotate.XX"
 
 #defineFATAL(ptr, x ...) do {  
\
fqueue_deleteall(); \
@@ -671,7 +672,8 @@ usage(const char *progname)
 int
 main(int argc, char *argv[])
 {
-   char buffer[LNBUFF], fname[FNBUFF], tbfl[] = TMPPATH, tofl[] = TMPPATH;
+   char buffer[LNBUFF], fname[FNBUFF];
+   char *tbfl, *tofl, *tmpdir;
char tmpf[MAXPATHLEN * 2 + 50];
float limit;
char *bin, *exec, *kfile, *ofile;
@@ -721,6 +723,17 @@ main(int argc, char *argv[])
exec);
 
bzero(tmpf, sizeof(tmpf));
+   tmpdir = getenv("TMPDIR");
+   if (tmpdir == NULL) {
+   asprintf(, "%s/%s", _PATH_TMP, TMPNAME);
+   asprintf(, "%s/%s", _PATH_TMP, TMPNAME);
+   } else {
+   asprintf(, "%s/%s", tmpdir, TMPNAME);
+   asprintf(, "%s/%s", tmpdir, TMPNAME);
+   }
+   if (tofl == NULL || tbfl == NULL)
+   FATAL(exec, "%s: Cannot create tempfile templates\n",
+   exec);
if (mkstemp(tofl) == -1)
FATAL(exec, "%s: Impossible to create the tmp file\n",
exec);
___
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: r333794 - head/sys/dev/usb/net

2018-05-18 Thread Ed Maste
Author: emaste
Date: Fri May 18 14:30:45 2018
New Revision: 333794
URL: https://svnweb.freebsd.org/changeset/base/333794

Log:
  muge(4): sync register names with Microchip's lan7800.h
  
  Microchip provided a permissively-licensed lan78xx header, which has
  an 'ETH_' prefix on most definitions.  Follow suit in our driver.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/usb/net/if_muge.c
  head/sys/dev/usb/net/if_mugereg.h

Modified: head/sys/dev/usb/net/if_muge.c
==
--- head/sys/dev/usb/net/if_muge.c  Fri May 18 14:14:04 2018
(r333793)
+++ head/sys/dev/usb/net/if_muge.c  Fri May 18 14:30:45 2018
(r333794)
@@ -171,7 +171,7 @@ struct muge_softc {
uint32_tsc_rfe_ctl;
uint32_tsc_mdix_ctl;
uint32_tsc_rev_id;
-   uint32_tsc_mchash_table[DP_SEL_VHF_HASH_LEN];
+   uint32_tsc_mchash_table[ETH_DP_SEL_VHF_HASH_LEN];
uint32_tsc_pfilter_table[MUGE_NUM_PFILTER_ADDRS_][2];
 
uint32_tsc_flags;
@@ -385,13 +385,13 @@ lan78xx_eeprom_read_raw(struct muge_softc *sc, uint16_
if (!locked)
MUGE_LOCK(sc);
 
-   err = lan78xx_read_reg(sc, HW_CFG, );
+   err = lan78xx_read_reg(sc, ETH_HW_CFG, );
saved = val;
 
-   val &= ~(HW_CFG_LEDO_EN_ | HW_CFG_LED1_EN_);
-   err = lan78xx_write_reg(sc, HW_CFG, val);
+   val &= ~(ETH_HW_CFG_LEDO_EN_ | ETH_HW_CFG_LED1_EN_);
+   err = lan78xx_write_reg(sc, ETH_HW_CFG, val);
 
-   err = lan78xx_wait_for_bits(sc, E2P_CMD, E2P_CMD_BUSY_);
+   err = lan78xx_wait_for_bits(sc, ETH_E2P_CMD, ETH_E2P_CMD_BUSY_);
if (err != 0) {
muge_warn_printf(sc, "eeprom busy, failed to read data\n");
goto done;
@@ -399,28 +399,30 @@ lan78xx_eeprom_read_raw(struct muge_softc *sc, uint16_
 
/* Start reading the bytes, one at a time. */
for (i = 0; i < buflen; i++) {
-   val = E2P_CMD_BUSY_ | E2P_CMD_READ_;
-   val |= (E2P_CMD_ADDR_MASK_ & (off + i));
-   if ((err = lan78xx_write_reg(sc, E2P_CMD, val)) != 0)
+   val = ETH_E2P_CMD_BUSY_ | ETH_E2P_CMD_READ_;
+   val |= (ETH_E2P_CMD_ADDR_MASK_ & (off + i));
+   if ((err = lan78xx_write_reg(sc, ETH_E2P_CMD, val)) != 0)
goto done;
 
start_ticks = (usb_ticks_t)ticks;
do {
-   if ((err = lan78xx_read_reg(sc, E2P_CMD, )) != 0)
+   if ((err = lan78xx_read_reg(sc, ETH_E2P_CMD, )) !=
+   0)
goto done;
-   if (!(val & E2P_CMD_BUSY_) || (val & E2P_CMD_TIMEOUT_))
+   if (!(val & ETH_E2P_CMD_BUSY_) ||
+   (val & ETH_E2P_CMD_TIMEOUT_))
break;
 
uether_pause(>sc_ue, hz / 100);
} while (((usb_ticks_t)(ticks - start_ticks)) < max_ticks);
 
-   if (val & (E2P_CMD_BUSY_ | E2P_CMD_TIMEOUT_)) {
+   if (val & (ETH_E2P_CMD_BUSY_ | ETH_E2P_CMD_TIMEOUT_)) {
muge_warn_printf(sc, "eeprom command failed\n");
err = USB_ERR_IOERROR;
break;
}
 
-   if ((err = lan78xx_read_reg(sc, E2P_DATA, )) != 0)
+   if ((err = lan78xx_read_reg(sc, ETH_E2P_DATA, )) != 0)
goto done;
 
buf[i] = (val & 0xff);
@@ -429,7 +431,7 @@ lan78xx_eeprom_read_raw(struct muge_softc *sc, uint16_
 done:
if (!locked)
MUGE_UNLOCK(sc);
-   lan78xx_write_reg(sc, HW_CFG, saved);
+   lan78xx_write_reg(sc, ETH_HW_CFG, saved);
return (err);
 }
 
@@ -450,8 +452,8 @@ lan78xx_eeprom_read(struct muge_softc *sc, uint16_t of
uint8_t sig;
int ret;
 
-   ret = lan78xx_eeprom_read_raw(sc, E2P_INDICATOR_OFFSET, , 1);
-   if ((ret == 0) && (sig == E2P_INDICATOR)) {
+   ret = lan78xx_eeprom_read_raw(sc, ETH_E2P_INDICATOR_OFFSET, , 1);
+   if ((ret == 0) && (sig == ETH_E2P_INDICATOR)) {
ret = lan78xx_eeprom_read_raw(sc, off, buf, buflen);
muge_dbg_printf(sc, "EEPROM present\n");
} else {
@@ -587,11 +589,11 @@ lan78xx_setmacaddress(struct muge_softc *sc, const uin
MUGE_LOCK_ASSERT(sc, MA_OWNED);
 
val = (addr[3] << 24) | (addr[2] << 16) | (addr[1] << 8) | addr[0];
-   if ((err = lan78xx_write_reg(sc, RX_ADDRL, val)) != 0)
+   if ((err = lan78xx_write_reg(sc, ETH_RX_ADDRL, val)) != 0)
goto done;
 
val = (addr[5] << 8) | addr[4];
-   err = lan78xx_write_reg(sc, RX_ADDRH, val);
+   err = lan78xx_write_reg(sc, ETH_RX_ADDRH, val);
 
 done:
return (err);
@@ -617,26 

svn commit: r333814 - head/sys/dev/usb/template

2018-05-18 Thread Edward Tomasz Napierala
Author: trasz
Date: Fri May 18 20:24:19 2018
New Revision: 333814
URL: https://svnweb.freebsd.org/changeset/base/333814

Log:
  Stop claiming the device-side USB serial interfaces talk Hayes AT.
  
  There should be no functional difference.
  
  Reviewed by:  hselasky@
  MFC after:2 weeks
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/usb/template/usb_template_modem.c
  head/sys/dev/usb/template/usb_template_multi.c
  head/sys/dev/usb/template/usb_template_serialnet.c

Modified: head/sys/dev/usb/template/usb_template_modem.c
==
--- head/sys/dev/usb/template/usb_template_modem.c  Fri May 18 20:13:34 
2018(r333813)
+++ head/sys/dev/usb/template/usb_template_modem.c  Fri May 18 20:24:19 
2018(r333814)
@@ -170,7 +170,7 @@ static const struct usb_temp_interface_desc modem_ifac
.ppEndpoints = modem_iface_0_ep,
.bInterfaceClass = UICLASS_CDC,
.bInterfaceSubClass = UISUBCLASS_ABSTRACT_CONTROL_MODEL,
-   .bInterfaceProtocol = UIPROTO_CDC_AT,
+   .bInterfaceProtocol = UIPROTO_CDC_NONE,
.iInterface = MODEM_INTERFACE_INDEX,
 };
 

Modified: head/sys/dev/usb/template/usb_template_multi.c
==
--- head/sys/dev/usb/template/usb_template_multi.c  Fri May 18 20:13:34 
2018(r333813)
+++ head/sys/dev/usb/template/usb_template_multi.c  Fri May 18 20:24:19 
2018(r333814)
@@ -299,7 +299,7 @@ static const struct usb_temp_interface_desc modem_ifac
.ppEndpoints = modem_iface_0_ep,
.bInterfaceClass = UICLASS_CDC,
.bInterfaceSubClass = UISUBCLASS_ABSTRACT_CONTROL_MODEL,
-   .bInterfaceProtocol = UIPROTO_CDC_AT,
+   .bInterfaceProtocol = UIPROTO_CDC_NONE,
.iInterface = MULTI_MODEM_INDEX,
 };
 

Modified: head/sys/dev/usb/template/usb_template_serialnet.c
==
--- head/sys/dev/usb/template/usb_template_serialnet.c  Fri May 18 20:13:34 
2018(r333813)
+++ head/sys/dev/usb/template/usb_template_serialnet.c  Fri May 18 20:24:19 
2018(r333814)
@@ -296,7 +296,7 @@ static const struct usb_temp_interface_desc modem_ifac
.ppEndpoints = modem_iface_0_ep,
.bInterfaceClass = UICLASS_CDC,
.bInterfaceSubClass = UISUBCLASS_ABSTRACT_CONTROL_MODEL,
-   .bInterfaceProtocol = UIPROTO_CDC_AT,
+   .bInterfaceProtocol = UIPROTO_CDC_NONE,
.iInterface = SERIALNET_MODEM_INDEX,
 };
 
___
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: r333425 - in head/sys: cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs compat/cloudabi compat/linux compat/linuxkpi/common/include/linux dev/filemon dev/hwpmc fs

2018-05-18 Thread Ilya Bakulin
Hi Matt,
seems this commit has broken at least BeagleBone Black booting process. On
all revisions after it the kernel panics with this message:
http://dl.bakulin.de/bbb_panic.txt
 My suspicion is that there are quite a few new SYSINIT objects that are
created on startup, and as a result some kind of memory reservation gets
exhausted. I don't have immediate idea how to debug this further; just can
confirm that patching out this change allows the board to boot again.


On Wed, May 9, 2018 at 8:47 PM Matt Macy  wrote:

> Author: mmacy
> Date: Wed May  9 18:47:24 2018
> New Revision: 333425
> URL: https://svnweb.freebsd.org/changeset/base/333425
>
> Log:
>   Eliminate the overhead of gratuitous repeated reinitialization of
> cap_rights
>
>   - Add macros to allow preinitialization of cap_rights_t.
>
>   - Convert most commonly used code paths to use preinitialized
> cap_rights_t.
> A 3.6% speedup in fstat was measured with this change.
>
>   Reported by:  mjg
>   Reviewed by:  oshogbo
>   Approved by:  sbruno
>   MFC after:1 month
>
> Modified:
>   head/sys/cddl/compat/opensolaris/sys/file.h
>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c
>   head/sys/compat/cloudabi/cloudabi_file.c
>   head/sys/compat/linux/linux_event.c
>   head/sys/compat/linux/linux_file.c
>   head/sys/compat/linux/linux_ioctl.c
>   head/sys/compat/linux/linux_mmap.c
>   head/sys/compat/linux/linux_socket.c
>   head/sys/compat/linux/linux_stats.c
>   head/sys/compat/linuxkpi/common/include/linux/file.h
>   head/sys/dev/filemon/filemon.c
>   head/sys/dev/hwpmc/hwpmc_logging.c
>   head/sys/fs/fdescfs/fdesc_vnops.c
>   head/sys/fs/fuse/fuse_vfsops.c
>   head/sys/kern/kern_descrip.c
>   head/sys/kern/kern_event.c
>   head/sys/kern/kern_exec.c
>   head/sys/kern/kern_sendfile.c
>   head/sys/kern/kern_sig.c
>   head/sys/kern/subr_capability.c
>   head/sys/kern/sys_generic.c
>   head/sys/kern/sys_procdesc.c
>   head/sys/kern/uipc_mqueue.c
>   head/sys/kern/uipc_sem.c
>   head/sys/kern/uipc_syscalls.c
>   head/sys/kern/vfs_aio.c
>   head/sys/kern/vfs_syscalls.c
>   head/sys/netsmb/smb_dev.c
>   head/sys/sys/capsicum.h
>
> Modified: head/sys/cddl/compat/opensolaris/sys/file.h
>
> ==
> --- head/sys/cddl/compat/opensolaris/sys/file.h Wed May  9 18:41:04 2018
>   (r333424)
> +++ head/sys/cddl/compat/opensolaris/sys/file.h Wed May  9 18:47:24 2018
>   (r333425)
> @@ -52,10 +52,9 @@ static __inline void
>  releasef(int fd)
>  {
> struct file *fp;
> -   cap_rights_t rights;
>
> /* No CAP_ rights required, as we're only releasing. */
> -   if (fget(curthread, fd, cap_rights_init(), ) == 0) {
> +   if (fget(curthread, fd, _no_rights, ) == 0) {
> fdrop(fp, curthread);
> fdrop(fp, curthread);
> }
>
> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
>
> ==
> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
>  Wed May  9 18:41:04 2018(r333424)
> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
>  Wed May  9 18:47:24 2018(r333425)
> @@ -4446,7 +4446,6 @@ zfs_ioc_recv(zfs_cmd_t *zc)
> char *origin = NULL;
> char *tosnap;
> char tofs[ZFS_MAX_DATASET_NAME_LEN];
> -   cap_rights_t rights;
> boolean_t first_recvd_props = B_FALSE;
>
> if (dataset_namecheck(zc->zc_value, NULL, NULL) != 0 ||
> @@ -4467,7 +4466,7 @@ zfs_ioc_recv(zfs_cmd_t *zc)
>  #ifdef illumos
> fp = getf(fd);
>  #else
> -   fget_read(curthread, fd, cap_rights_init(, CAP_PREAD), );
> +   fget_read(curthread, fd, _pread_rights, );
>  #endif
> if (fp == NULL) {
> nvlist_free(props);
> @@ -4744,13 +4743,11 @@ zfs_ioc_send(zfs_cmd_t *zc)
> dsl_pool_rele(dp, FTAG);
> } else {
> file_t *fp;
> -   cap_rights_t rights;
>
>  #ifdef illumos
> fp = getf(zc->zc_cookie);
>  #else
> -   fget_write(curthread, zc->zc_cookie,
> -   cap_rights_init(, CAP_WRITE), );
> +   fget_write(curthread, zc->zc_cookie, _write_rights,
> );
>  #endif
> if (fp == NULL)
> return (SET_ERROR(EBADF));
> @@ -5387,15 +5384,13 @@ static int
>  zfs_ioc_diff(zfs_cmd_t *zc)
>  {
> file_t *fp;
> -   cap_rights_t rights;
> offset_t off;
> int error;
>
>  #ifdef illumos
> fp = getf(zc->zc_cookie);
>  #else
> -   fget_write(curthread, zc->zc_cookie,
> -   cap_rights_init(, CAP_WRITE), );
> +   fget_write(curthread, zc->zc_cookie, _write_rights, );
>  #endif
> if (fp == NULL)
> return (SET_ERROR(EBADF));
> @@ -5787,7 +5782,6 

svn commit: r333810 - head/sys/dev/cxgbe/tom

2018-05-18 Thread John Baldwin
Author: jhb
Date: Fri May 18 19:09:11 2018
New Revision: 333810
URL: https://svnweb.freebsd.org/changeset/base/333810

Log:
  Be more robust against garbage input on a TOE TLS TX socket.
  
  If a socket is closed or shutdown and a partial record (or what
  appears to be a partial record) is waiting in the socket buffer,
  discard the partial record and close the connection rather than
  waiting forever for the rest of the record.
  
  Reported by:  Harsh Jain @ Chelsio
  Sponsored by: Chelsio Communications

Modified:
  head/sys/dev/cxgbe/tom/t4_tls.c

Modified: head/sys/dev/cxgbe/tom/t4_tls.c
==
--- head/sys/dev/cxgbe/tom/t4_tls.c Fri May 18 18:48:00 2018
(r333809)
+++ head/sys/dev/cxgbe/tom/t4_tls.c Fri May 18 19:09:11 2018
(r333810)
@@ -1189,17 +1189,23 @@ t4_push_tls_records(struct adapter *sc, struct toepcb 
/*
 * A full TLS header is not yet queued, stop
 * for now until more data is added to the
-* socket buffer.
+* socket buffer.  However, if the connection
+* has been closed, we will never get the rest
+* of the header so just discard the partial
+* header and close the connection.
 */
 #ifdef VERBOSE_TRACES
-   CTR4(KTR_CXGBE, "%s: tid %d sbavail %d sb_off %d",
-   __func__, toep->tid, sbavail(sb), tls_ofld->sb_off);
+   CTR5(KTR_CXGBE, "%s: tid %d sbavail %d sb_off %d%s",
+   __func__, toep->tid, sbavail(sb), tls_ofld->sb_off,
+   toep->flags & TPF_SEND_FIN ? "" : " SEND_FIN");
 #endif
if (sowwakeup)
sowwakeup_locked(so);
else
SOCKBUF_UNLOCK(sb);
SOCKBUF_UNLOCK_ASSERT(sb);
+   if (toep->flags & TPF_SEND_FIN)
+   t4_close_conn(sc, toep);
return;
}
 
@@ -1216,19 +1222,25 @@ t4_push_tls_records(struct adapter *sc, struct toepcb 
/*
 * The full TLS record is not yet queued, stop
 * for now until more data is added to the
-* socket buffer.
+* socket buffer.  However, if the connection
+* has been closed, we will never get the rest
+* of the record so just discard the partial
+* record and close the connection.
 */
 #ifdef VERBOSE_TRACES
-   CTR5(KTR_CXGBE,
-   "%s: tid %d sbavail %d sb_off %d plen %d",
+   CTR6(KTR_CXGBE,
+   "%s: tid %d sbavail %d sb_off %d plen %d%s",
__func__, toep->tid, sbavail(sb), tls_ofld->sb_off,
-   plen);
+   plen, toep->flags & TPF_SEND_FIN ? "" :
+   " SEND_FIN");
 #endif
if (sowwakeup)
sowwakeup_locked(so);
else
SOCKBUF_UNLOCK(sb);
SOCKBUF_UNLOCK_ASSERT(sb);
+   if (toep->flags & TPF_SEND_FIN)
+   t4_close_conn(sc, toep);
return;
}
 
___
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: r333813 - in head/sys: arm/allwinner arm/at91 arm/cavium/cns11xx arm/ralink arm/ti/cpsw arm/xscale/ixp425 compat/linux contrib/ipfilter/netinet dev/ae dev/age dev/al_eth dev/alc dev/ale...

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Fri May 18 20:13:34 2018
New Revision: 333813
URL: https://svnweb.freebsd.org/changeset/base/333813

Log:
  ifnet: Replace if_addr_lock rwlock with epoch + mutex
  
  Run on LLNW canaries and tested by pho@
  
  gallatin:
  Using a 14-core, 28-HTT single socket E5-2697 v3 with a 40GbE MLX5
  based ConnectX 4-LX NIC, I see an almost 12% improvement in received
  packet rate, and a larger improvement in bytes delivered all the way
  to userspace.
  
  When the host receiving 64 streams of netperf -H $DUT -t UDP_STREAM -- -m 1,
  I see, using nstat -I mce0 1 before the patch:
  
  InMpps OMpps  InGbs  OGbs err TCP Est %CPU syscalls csw irq GBfree
  4.98   0.00   4.42   0.00 4235592 33   83.80 4720653 2149771   1235 247.32
  4.73   0.00   4.20   0.00 4025260 33   82.99 4724900 2139833   1204 247.32
  4.72   0.00   4.20   0.00 4035252 33   82.14 4719162 2132023   1264 247.32
  4.71   0.00   4.21   0.00 4073206 33   83.68 4744973 2123317   1347 247.32
  4.72   0.00   4.21   0.00 4061118 33   80.82 4713615 2188091   1490 247.32
  4.72   0.00   4.21   0.00 4051675 33   85.29 4727399 2109011   1205 247.32
  4.73   0.00   4.21   0.00 4039056 33   84.65 4724735 2102603   1053 247.32
  
  After the patch
  
  InMpps OMpps  InGbs  OGbs err TCP Est %CPU syscalls csw irq GBfree
  5.43   0.00   4.20   0.00 3313143 33   84.96 5434214 1900162   2656 245.51
  5.43   0.00   4.20   0.00 3308527 33   85.24 5439695 1809382   2521 245.51
  5.42   0.00   4.19   0.00 3316778 33   87.54 5416028 1805835   2256 245.51
  5.42   0.00   4.19   0.00 3317673 33   90.44 5426044 1763056   2332 245.51
  5.42   0.00   4.19   0.00 3314839 33   88.11 5435732 1792218   2499 245.52
  5.44   0.00   4.19   0.00 3293228 33   91.84 5426301 1668597   2121 245.52
  
  Similarly, netperf reports 230Mb/s before the patch, and 270Mb/s after the 
patch
  
  Reviewed by:  gallatin
  Sponsored by: Limelight Networks
  Differential Revision:https://reviews.freebsd.org/D15366

Modified:
  head/sys/arm/allwinner/if_emac.c
  head/sys/arm/at91/if_ate.c
  head/sys/arm/at91/if_macb.c
  head/sys/arm/cavium/cns11xx/if_ece.c
  head/sys/arm/ralink/if_fv.c
  head/sys/arm/ti/cpsw/if_cpsw.c
  head/sys/arm/xscale/ixp425/if_npe.c
  head/sys/compat/linux/linux_ioctl.c
  head/sys/contrib/ipfilter/netinet/ip_compat.h
  head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
  head/sys/dev/ae/if_ae.c
  head/sys/dev/age/if_age.c
  head/sys/dev/al_eth/al_eth.c
  head/sys/dev/alc/if_alc.c
  head/sys/dev/ale/if_ale.c
  head/sys/dev/altera/atse/if_atse.c
  head/sys/dev/ath/if_ath.c
  head/sys/dev/bce/if_bce.c
  head/sys/dev/bfe/if_bfe.c
  head/sys/dev/bm/if_bm.c
  head/sys/dev/bxe/bxe.c
  head/sys/dev/cas/if_cas.c
  head/sys/dev/cs/if_cs.c
  head/sys/dev/cxgb/cxgb_adapter.h
  head/sys/dev/cxgbe/t4_main.c
  head/sys/dev/cxgbe/tom/t4_tom.c
  head/sys/dev/dc/if_dc.c
  head/sys/dev/de/if_de.c
  head/sys/dev/dwc/if_dwc.c
  head/sys/dev/ed/if_ed.c
  head/sys/dev/et/if_et.c
  head/sys/dev/ex/if_ex.c
  head/sys/dev/fe/if_fe.c
  head/sys/dev/ffec/if_ffec.c
  head/sys/dev/gem/if_gem.c
  head/sys/dev/hme/if_hme.c
  head/sys/dev/hyperv/netvsc/if_hn.c
  head/sys/dev/if_ndis/if_ndis.c
  head/sys/dev/ixgbe/if_ixv.c
  head/sys/dev/ixl/if_ixlv.c
  head/sys/dev/ixl/ixl_pf_main.c
  head/sys/dev/jme/if_jme.c
  head/sys/dev/le/lance.c
  head/sys/dev/lge/if_lge.c
  head/sys/dev/liquidio/lio_ioctl.c
  head/sys/dev/malo/if_malo.c
  head/sys/dev/mge/if_mge.c
  head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c
  head/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c
  head/sys/dev/msk/if_msk.c
  head/sys/dev/mxge/if_mxge.c
  head/sys/dev/my/if_my.c
  head/sys/dev/nge/if_nge.c
  head/sys/dev/oce/oce_hw.c
  head/sys/dev/otus/if_otus.c
  head/sys/dev/pcn/if_pcn.c
  head/sys/dev/qlnx/qlnxe/qlnx_os.c
  head/sys/dev/qlxgb/qla_os.c
  head/sys/dev/qlxgbe/ql_os.c
  head/sys/dev/qlxge/qls_os.c
  head/sys/dev/re/if_re.c
  head/sys/dev/rl/if_rl.c
  head/sys/dev/rtwn/if_rtwn_rx.c
  head/sys/dev/sf/if_sf.c
  head/sys/dev/sfxge/sfxge_port.c
  head/sys/dev/sge/if_sge.c
  head/sys/dev/sis/if_sis.c
  head/sys/dev/sk/if_sk.c
  head/sys/dev/sn/if_sn.c
  head/sys/dev/ste/if_ste.c
  head/sys/dev/stge/if_stge.c
  head/sys/dev/ti/if_ti.c
  head/sys/dev/tl/if_tl.c
  head/sys/dev/tsec/if_tsec.c
  head/sys/dev/tx/if_tx.c
  head/sys/dev/txp/if_txp.c
  head/sys/dev/usb/net/if_aue.c
  head/sys/dev/usb/net/if_axe.c
  head/sys/dev/usb/net/if_axge.c
  head/sys/dev/usb/net/if_cue.c
  head/sys/dev/usb/net/if_kue.c
  head/sys/dev/usb/net/if_mos.c
  head/sys/dev/usb/net/if_rue.c
  head/sys/dev/usb/net/if_smsc.c
  head/sys/dev/usb/net/if_udav.c
  head/sys/dev/usb/net/if_ure.c
  head/sys/dev/usb/wlan/if_rsu.c
  head/sys/dev/usb/wlan/if_zyd.c
  head/sys/dev/vge/if_vge.c
  head/sys/dev/virtio/network/if_vtnet.c
  head/sys/dev/vmware/vmxnet3/if_vmx.c
  head/sys/dev/vr/if_vr.c
  head/sys/dev/vte/if_vte.c
  head/sys/dev/wb/if_wb.c
  head/sys/dev/wi/if_wi.c
  head/sys/dev/xe/if_xe.c
  

svn commit: r333800 - head/sys/dev/usb/net

2018-05-18 Thread Ed Maste
Author: emaste
Date: Fri May 18 17:07:59 2018
New Revision: 333800
URL: https://svnweb.freebsd.org/changeset/base/333800

Log:
  muge(4): style and comment cleanup
  
  And tag some spots to revisit with XXX.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/usb/net/if_muge.c

Modified: head/sys/dev/usb/net/if_muge.c
==
--- head/sys/dev/usb/net/if_muge.c  Fri May 18 16:59:58 2018
(r333799)
+++ head/sys/dev/usb/net/if_muge.c  Fri May 18 17:07:59 2018
(r333800)
@@ -152,19 +152,17 @@ do { \
 enum {
MUGE_BULK_DT_RD,
MUGE_BULK_DT_WR,
-   /*
-* the device does support interrupt endpoints,
-* but they're not needed as we poll on MII status.
-* MUGE_INTR_DT_WR,
-* MUGE_INTR_DT_RD,
-*/
+#if 0 /* Ignore interrupt endpoints for now as we poll on MII status. */
+   MUGE_INTR_DT_WR,
+   MUGE_INTR_DT_RD,
+#endif
MUGE_N_TRANSFER,
 };
 
 struct muge_softc {
struct usb_ethersc_ue;
struct mtx  sc_mtx;
-   struct usb_xfer  *sc_xfer[MUGE_N_TRANSFER];
+   struct usb_xfer *sc_xfer[MUGE_N_TRANSFER];
int sc_phyno;
 
/* Settings for the mac control (MAC_CSR) register. */
@@ -184,7 +182,6 @@ struct muge_softc {
 #define MUGE_UNLOCK(_sc)   mtx_unlock(&(_sc)->sc_mtx)
 #define MUGE_LOCK_ASSERT(_sc, t)   mtx_assert(&(_sc)->sc_mtx, t)
 
-
 static device_probe_t muge_probe;
 static device_attach_t muge_attach;
 static device_detach_t muge_detach;
@@ -460,7 +457,7 @@ lan78xx_eeprom_read(struct muge_softc *sc, uint16_t of
ret = -EINVAL;
muge_dbg_printf(sc, "EEPROM not present\n");
}
-   return ret;
+   return (ret);
 }
 
 /**
@@ -492,9 +489,9 @@ lan78xx_otp_read_raw(struct muge_softc *sc, uint16_t o
 
err = lan78xx_read_reg(sc, OTP_PWR_DN, );
 
-   /* checking if bit is set */
+   /* Checking if bit is set. */
if (val & OTP_PWR_DN_PWRDN_N) {
-   /* clearing it, then waiting for it to be cleared */
+   /* Clear it, then wait for it to be cleared. */
lan78xx_write_reg(sc, OTP_PWR_DN, 0);
err = lan78xx_wait_for_bits(sc, OTP_PWR_DN, OTP_PWR_DN_PWRDN_N);
if (err != 0) {
@@ -502,7 +499,7 @@ lan78xx_otp_read_raw(struct muge_softc *sc, uint16_t o
goto done;
}
}
-   /* start reading the bytes, one at a time */
+   /* Start reading the bytes, one at a time. */
for (i = 0; i < buflen; i++) {
err = lan78xx_write_reg(sc, OTP_ADDR1,
((off + i) >> 8) & OTP_ADDR1_15_11);
@@ -555,14 +552,14 @@ lan78xx_otp_read(struct muge_softc *sc, uint16_t off, 
if (err == 0) {
if (sig == OTP_INDICATOR_1) {
} else if (sig == OTP_INDICATOR_2) {
-   off += 0x100;
+   off += 0x100; /* XXX */
} else {
err = -EINVAL;
}
-   if(!err)
+   if (!err)
err = lan78xx_otp_read_raw(sc, off, buf, buflen);
}
-   return err;
+   return (err);
 }
 
 /**
@@ -617,8 +614,7 @@ lan78xx_set_rx_max_frame_length(struct muge_softc *sc,
uint32_t buf;
bool rxenabled;
 
-   /* first we have to disable rx before changing the length */
-
+   /* First we have to disable rx before changing the length. */
err = lan78xx_read_reg(sc, ETH_MAC_RX, );
rxenabled = ((buf & ETH_MAC_RX_EN_) != 0);
 
@@ -627,8 +623,7 @@ lan78xx_set_rx_max_frame_length(struct muge_softc *sc,
err = lan78xx_write_reg(sc, ETH_MAC_RX, buf);
}
 
-   /* setting max frame length */
-
+   /* Setting max frame length. */
buf &= ~ETH_MAC_RX_MAX_FR_SIZE_MASK_;
buf |= (((size + 4) << ETH_MAC_RX_MAX_FR_SIZE_SHIFT_) &
ETH_MAC_RX_MAX_FR_SIZE_MASK_);
@@ -641,7 +636,7 @@ lan78xx_set_rx_max_frame_length(struct muge_softc *sc,
err = lan78xx_write_reg(sc, ETH_MAC_RX, buf);
}
 
-   return 0;
+   return (0);
 }
 
 /**
@@ -733,7 +728,8 @@ lan78xx_miibus_writereg(device_t dev, int phy, int reg
val = htole32(val);
lan78xx_write_reg(sc, ETH_MII_DATA, val);
 
-   addr = (phy << 11) | (reg << 6) | ETH_MII_ACC_MII_WRITE_ | 
ETH_MII_ACC_MII_BUSY_;
+   addr = (phy << 11) | (reg << 6) |
+   ETH_MII_ACC_MII_WRITE_ | ETH_MII_ACC_MII_BUSY_;
lan78xx_write_reg(sc, ETH_MII_ACC, addr);
 
if (lan78xx_wait_for_bits(sc, ETH_MII_ACC, ETH_MII_ACC_MII_BUSY_) != 0)
@@ -808,11 +804,11 @@ lan78xx_miibus_statchg(device_t dev)
goto done;
}
 
-   /* Enable/disable full duplex operation and TX/RX pause */
+   /* Enable/disable full duplex operation 

svn commit: r333803 - head/usr.sbin/bsdinstall/partedit

2018-05-18 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Fri May 18 17:43:15 2018
New Revision: 333803
URL: https://svnweb.freebsd.org/changeset/base/333803

Log:
  Fix math error in the computation of the free space after the last partition
  on a disk. This resulted in one sector always remaining free at the end.
  
  PR:   bin/228322
  Submitted by: Rikiya Yonemoto
  MFC after:2 weeks

Modified:
  head/usr.sbin/bsdinstall/partedit/gpart_ops.c

Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c
==
--- head/usr.sbin/bsdinstall/partedit/gpart_ops.c   Fri May 18 17:29:43 
2018(r333802)
+++ head/usr.sbin/bsdinstall/partedit/gpart_ops.c   Fri May 18 17:43:15 
2018(r333803)
@@ -856,7 +856,7 @@ gpart_max_free(struct ggeom *geom, intmax_t *npartstar
}
 
if (end - lastend > maxsize) {
-   maxsize = end - lastend - 1;
+   maxsize = end - lastend;
maxstart = lastend + 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: r333802 - in head: share/man/man9 sys/dev/hwpmc sys/kern sys/net sys/sys sys/tests/epoch

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Fri May 18 17:29:43 2018
New Revision: 333802
URL: https://svnweb.freebsd.org/changeset/base/333802

Log:
  epoch(9): Make epochs non-preemptible by default
  
  There are risks associated with waiting on a preemptible epoch section.
  Change the name to make them not be the default and document the issue
  under CAVEATS.
  
  Reported by:  markj

Modified:
  head/share/man/man9/epoch.9
  head/sys/dev/hwpmc/hwpmc_mod.c
  head/sys/kern/subr_epoch.c
  head/sys/net/if.c
  head/sys/net/if_lagg.c
  head/sys/net/if_var.h
  head/sys/sys/epoch.h
  head/sys/sys/pmckern.h
  head/sys/tests/epoch/epoch_test.c

Modified: head/share/man/man9/epoch.9
==
--- head/share/man/man9/epoch.9 Fri May 18 17:23:23 2018(r333801)
+++ head/share/man/man9/epoch.9 Fri May 18 17:29:43 2018(r333802)
@@ -49,15 +49,15 @@
 .Ft void
 .Fn epoch_enter "epoch_t epoch"
 .Ft void
-.Fn epoch_enter_critical "epoch_t epoch"
+.Fn epoch_enter_preempt "epoch_t epoch"
 .Ft void
 .Fn epoch_exit "epoch_t epoch"
 .Ft void
-.Fn epoch_exit_critical "epoch_t epoch"
+.Fn epoch_exit_preempt "epoch_t epoch"
 .Ft void
 .Fn epoch_wait "epoch_t epoch"
 .Ft void
-.Fn epoch_wait_critical "epoch_t epoch"
+.Fn epoch_wait_preempt "epoch_t epoch"
 .Ft void
 .Fn epoch_call "epoch_t epoch" "epoch_context_t ctx" "void (*callback) 
(epoch_context_t)"
 .Ft int
@@ -73,20 +73,22 @@ Epochs are allocated with
 and freed with
 .Fn epoch_free .
 The flags passed to epoch_alloc determine whether preemption is
-allowed during a section (the default) or not, as specified by
-EPOCH_CRITICAL.
+allowed during a section or not (the dafult), as specified by
+EPOCH_PREEMPT.
 Threads indicate the start of an epoch critical section by calling
 .Fn epoch_enter .
 The end of a critical section is indicated by calling
 .Fn epoch_exit .
-The _critical variants can be used around code in which it is safe
-to have preemption disable.
+The _preempt variants can be used around code which requires preemption.
 A thread can wait until a grace period has elapsed
 since any threads have entered
 the epoch by calling
-.Fn epoch_wait .
-The use of a EPOCH_CRITICAL epoch type allows one to use
-.Fn epoch_wait_critical
+.Fn epoch_wait
+or
+.Fn epoch_wait_preempt ,
+depending on the epoch_type.
+The use of a default epoch type allows one to use
+.Fn epoch_wait
 which is guaranteed to have much shorter completion times since
 we know that none of the threads in an epoch section will be preempted
 before completing its section.
@@ -95,14 +97,14 @@ path it can ensure that a grace period has elapsed by 
 .Fn epoch_call
 with a callback with any work that needs to wait for an epoch to elapse.
 Only non-sleepable locks can be acquired during a section protected by
-.Fn epoch_enter
+.Fn epoch_enter_preempt
 and
-.Fn epoch_exit .
+.Fn epoch_exit_preempt .
 INVARIANTS can assert that a thread is in an epoch by using
 .Fn in_epoch .
 .Pp
-The epoch API currently does not support sleeping in epoch sections.
-A caller cannot do epoch_enter recursively on different epochs. A
+The epoch API currently does not support sleeping in epoch_preempt sections.
+A caller cannot do epoch_enter recursively on different preemptible epochs. A
 caller should never call
 .Fn epoch_wait
 in the middle of an epoch section as this will lead to a deadlock.
@@ -113,10 +115,16 @@ When modifying a list referenced from an epoch section
 routines must be used and the caller can no longer modify a list entry
 in place. An item to be modified must be handled with copy on write
 and frees must be deferred until after a grace period has elapsed.
-
 .Sh RETURN VALUES
 .Fn in_epoch
 will return 1 if curthread is in an epoch, 0 otherwise.
+.Sh CAVEATS
+One must be cautious when using
+.Fn epoch_wait_preempt
+threads are pinned during epoch sections so if a thread in a section is then
+preempted by a higher priority compute bound thread on that CPU it can be
+prevented from leaving the section. Thus the wait time for the waiter is
+potentially unbounded.
 .Sh EXAMPLES
 Async free example:
 

Modified: head/sys/dev/hwpmc/hwpmc_mod.c
==
--- head/sys/dev/hwpmc/hwpmc_mod.c  Fri May 18 17:23:23 2018
(r333801)
+++ head/sys/dev/hwpmc/hwpmc_mod.c  Fri May 18 17:29:43 2018
(r333802)
@@ -1717,12 +1717,12 @@ pmc_process_mmap(struct thread *td, struct pmckern_map
const struct pmc_process *pp;
 
freepath = fullpath = NULL;
-   epoch_exit(global_epoch);
+   epoch_exit_preempt(global_epoch_preempt);
pmc_getfilename((struct vnode *) pkm->pm_file, , );
 
pid = td->td_proc->p_pid;
 
-   epoch_enter(global_epoch);
+   epoch_enter_preempt(global_epoch_preempt);
/* Inform owners of all system-wide sampling PMCs. */
CK_LIST_FOREACH(po, _ss_owners, po_ssnext)
if (po->po_flags & 

Re: svn commit: r333801 - head/sys/contrib/dev/ath/ath_hal/ar9300

2018-05-18 Thread Ian Lepore
On Fri, 2018-05-18 at 17:23 +, Sean Bruno wrote:
> Author: sbruno
> Date: Fri May 18 17:23:23 2018
> New Revision: 333801
> URL: https://svnweb.freebsd.org/changeset/base/333801
> 
> Log:
>   Quiesce a couple pages of clang warnings with a cast.  Duplicates
>   linux maintainer commit:
>   
>   
> https://github.com/torvalds/linux/commit/627871b71c89a6ec12fbed75063f238e0c7127b2#diff-8c6ddb4c3ad69a6fb9f289475821db56
>   
>   ar9300template_aphrodite.h:575:40: warning: implicit conversion from 'int'
> to 'u_int8_t' (aka 'unsigned char') changes value from 3495 to 167
> [-Wconstant-conversion]
>   /* Data[8].ctl_edges[7].bChannel*/FREQ2FBIN(5795, 0)}
> ^~
>   ar9300eep.h:142:41: note: expanded from macro 'FREQ2FBIN'
>   (((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 5))
>   
>   Reviewed by:imp
>   MFC after:  1 week
>   Differential Revision:  https://reviews.freebsd.org/D15476
> 
> Modified:
>   head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h
> 
> Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h
> ==
> --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h   Fri May 18 
> 17:07:59 2018(r333800)
> +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h   Fri May 18 
> 17:23:23 2018(r333801)
> @@ -139,7 +139,7 @@ enum Ar9300EepromTemplate
>  #define OSPREY_CUSTOMER_DATA_SIZE20
>  
>  #define FREQ2FBIN(x,y) \
> -(((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 5))
> +(u_int8_t)(((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 
> 5))
>  #define FBIN2FREQ(x,y) \
>  (((y) == HAL_FREQ_BAND_2GHZ) ? (2300 + x) : (4800 + 5 * x))
>  #define OSPREY_MAX_CHAINS3
> 

How can this change possibly be correct? All the values involved are
compile-time constants, the compiler did the math and tells you the
result is 3495. Cast or not, that value is never going to fit into a
uint8_t. Sure this supresses the warning, but what about actually
fixing the overflow?

-- Ian
___
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: r333809 - head/sys/net

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Fri May 18 18:48:00 2018
New Revision: 333809
URL: https://svnweb.freebsd.org/changeset/base/333809

Log:
  epoch(9): allocate net epochs earlier in boot

Modified:
  head/sys/net/if.c

Modified: head/sys/net/if.c
==
--- head/sys/net/if.c   Fri May 18 18:27:17 2018(r333808)
+++ head/sys/net/if.c   Fri May 18 18:48:00 2018(r333809)
@@ -900,12 +900,20 @@ if_attach_internal(struct ifnet *ifp, int vmove, struc
 }
 
 static void
-if_attachdomain(void *dummy)
+if_epochalloc(void *dummy __unused)
 {
-   struct ifnet *ifp;
 
net_epoch_preempt = epoch_alloc(EPOCH_PREEMPT);
net_epoch = epoch_alloc(0);
+}
+SYSINIT(ifepochalloc, SI_SUB_TASKQ + 1, SI_ORDER_ANY,
+if_epochalloc, NULL);
+
+static void
+if_attachdomain(void *dummy)
+{
+   struct ifnet *ifp;
+
TAILQ_FOREACH(ifp, _ifnet, if_link)
if_attachdomain1(ifp);
 }
___
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: r333806 - in head/sys: dev/acpica dev/ofw fs/cuse i386/bios kern net

2018-05-18 Thread Ed Maste
Author: emaste
Date: Fri May 18 17:58:09 2018
New Revision: 333806
URL: https://svnweb.freebsd.org/changeset/base/333806

Log:
  Use NULL for SYSINIT's last arg, which is a pointer type
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/acpica/acpi.c
  head/sys/dev/ofw/ofw_fdt.c
  head/sys/fs/cuse/cuse.c
  head/sys/i386/bios/apm.c
  head/sys/kern/imgact_binmisc.c
  head/sys/kern/kern_linker.c
  head/sys/kern/kern_module.c
  head/sys/kern/kern_synch.c
  head/sys/kern/kern_sysctl.c
  head/sys/kern/link_elf.c
  head/sys/kern/link_elf_obj.c
  head/sys/kern/posix4_mib.c
  head/sys/kern/subr_pcpu.c
  head/sys/net/route.c
  head/sys/net/vnet.c

Modified: head/sys/dev/acpica/acpi.c
==
--- head/sys/dev/acpica/acpi.c  Fri May 18 17:51:42 2018(r333805)
+++ head/sys/dev/acpica/acpi.c  Fri May 18 17:58:09 2018(r333806)
@@ -4179,4 +4179,4 @@ acpi_pm_register(void *arg)
 power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, NULL);
 }
 
-SYSINIT(power, SI_SUB_KLD, SI_ORDER_ANY, acpi_pm_register, 0);
+SYSINIT(power, SI_SUB_KLD, SI_ORDER_ANY, acpi_pm_register, NULL);

Modified: head/sys/dev/ofw/ofw_fdt.c
==
--- head/sys/dev/ofw/ofw_fdt.c  Fri May 18 17:51:42 2018(r333805)
+++ head/sys/dev/ofw/ofw_fdt.c  Fri May 18 17:58:09 2018(r333806)
@@ -126,7 +126,7 @@ sysctl_register_fdt_oid(void *arg)
CTLTYPE_OPAQUE | CTLFLAG_RD, NULL, 0, sysctl_handle_dtb, "",
"Device Tree Blob");
 }
-SYSINIT(dtb_oid, SI_SUB_KMEM, SI_ORDER_ANY, sysctl_register_fdt_oid, 0);
+SYSINIT(dtb_oid, SI_SUB_KMEM, SI_ORDER_ANY, sysctl_register_fdt_oid, NULL);
 
 static int
 ofw_fdt_init(ofw_t ofw, void *data)

Modified: head/sys/fs/cuse/cuse.c
==
--- head/sys/fs/cuse/cuse.c Fri May 18 17:51:42 2018(r333805)
+++ head/sys/fs/cuse/cuse.c Fri May 18 17:58:09 2018(r333806)
@@ -252,7 +252,7 @@ cuse_kern_init(void *arg)
(CUSE_VERSION >> 16) & 0xFF, (CUSE_VERSION >> 8) & 0xFF,
(CUSE_VERSION >> 0) & 0xFF);
 }
-SYSINIT(cuse_kern_init, SI_SUB_DEVFS, SI_ORDER_ANY, cuse_kern_init, 0);
+SYSINIT(cuse_kern_init, SI_SUB_DEVFS, SI_ORDER_ANY, cuse_kern_init, NULL);
 
 static void
 cuse_kern_uninit(void *arg)

Modified: head/sys/i386/bios/apm.c
==
--- head/sys/i386/bios/apm.cFri May 18 17:51:42 2018(r333805)
+++ head/sys/i386/bios/apm.cFri May 18 17:58:09 2018(r333806)
@@ -1532,4 +1532,4 @@ apm_pm_register(void *arg)
power_pm_register(POWER_PM_TYPE_APM, apm_pm_func, NULL);
 }
 
-SYSINIT(power, SI_SUB_KLD, SI_ORDER_ANY, apm_pm_register, 0);
+SYSINIT(power, SI_SUB_KLD, SI_ORDER_ANY, apm_pm_register, NULL);

Modified: head/sys/kern/imgact_binmisc.c
==
--- head/sys/kern/imgact_binmisc.c  Fri May 18 17:51:42 2018
(r333805)
+++ head/sys/kern/imgact_binmisc.c  Fri May 18 17:58:09 2018
(r333806)
@@ -747,8 +747,10 @@ imgact_binmisc_fini(void *arg)
sx_destroy(_list_sx);
 }
 
-SYSINIT(imgact_binmisc, SI_SUB_EXEC, SI_ORDER_MIDDLE, imgact_binmisc_init, 0);
-SYSUNINIT(imgact_binmisc, SI_SUB_EXEC, SI_ORDER_MIDDLE, imgact_binmisc_fini, 
0);
+SYSINIT(imgact_binmisc, SI_SUB_EXEC, SI_ORDER_MIDDLE, imgact_binmisc_init,
+NULL);
+SYSUNINIT(imgact_binmisc, SI_SUB_EXEC, SI_ORDER_MIDDLE, imgact_binmisc_fini,
+NULL);
 
 /*
  * Tell kern_execve.c about it, with a little help from the linker.

Modified: head/sys/kern/kern_linker.c
==
--- head/sys/kern/kern_linker.c Fri May 18 17:51:42 2018(r333805)
+++ head/sys/kern/kern_linker.c Fri May 18 17:58:09 2018(r333806)
@@ -163,7 +163,7 @@ linker_init(void *arg)
TAILQ_INIT(_files);
 }
 
-SYSINIT(linker, SI_SUB_KLD, SI_ORDER_FIRST, linker_init, 0);
+SYSINIT(linker, SI_SUB_KLD, SI_ORDER_FIRST, linker_init, NULL);
 
 static void
 linker_stop_class_add(void *arg)
@@ -411,7 +411,7 @@ linker_init_kernel_modules(void)
 }
 
 SYSINIT(linker_kernel, SI_SUB_KLD, SI_ORDER_ANY, linker_init_kernel_modules,
-0);
+NULL);
 
 static int
 linker_load_file(const char *filename, linker_file_t *result)
@@ -1684,7 +1684,7 @@ fail:
/* woohoo! we made it! */
 }
 
-SYSINIT(preload, SI_SUB_KLD, SI_ORDER_MIDDLE, linker_preload, 0);
+SYSINIT(preload, SI_SUB_KLD, SI_ORDER_MIDDLE, linker_preload, NULL);
 
 /*
  * Handle preload files that failed to load any modules.
@@ -1719,7 +1719,7 @@ linker_preload_finish(void *arg)
  * becomes runnable in SI_SUB_KTHREAD_INIT, so go slightly before that.
  */
 SYSINIT(preload_finish, SI_SUB_KTHREAD_INIT - 100, SI_ORDER_MIDDLE,
-linker_preload_finish, 0);
+

svn commit: r333807 - head/sys/net

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Fri May 18 17:58:15 2018
New Revision: 333807
URL: https://svnweb.freebsd.org/changeset/base/333807

Log:
  epoch: move epoch variables to read mostly section

Modified:
  head/sys/net/if.c

Modified: head/sys/net/if.c
==
--- head/sys/net/if.c   Fri May 18 17:58:09 2018(r333806)
+++ head/sys/net/if.c   Fri May 18 17:58:15 2018(r333807)
@@ -104,8 +104,8 @@
 _Static_assert(sizeof(((struct ifreq *)0)->ifr_name) ==
 offsetof(struct ifreq, ifr_ifru), "gap between ifr_name and ifr_ifru");
 
-epoch_t net_epoch_preempt;
-epoch_t net_epoch;
+__read_mostly epoch_t net_epoch_preempt;
+__read_mostly epoch_t net_epoch;
 #ifdef COMPAT_FREEBSD32
 #include 
 #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"


svn commit: r333808 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Fri May 18 18:27:17 2018
New Revision: 333808
URL: https://svnweb.freebsd.org/changeset/base/333808

Log:
  epoch(9): assert that epoch is allocated post-configure

Modified:
  head/sys/kern/subr_epoch.c

Modified: head/sys/kern/subr_epoch.c
==
--- head/sys/kern/subr_epoch.c  Fri May 18 17:58:15 2018(r333807)
+++ head/sys/kern/subr_epoch.c  Fri May 18 18:27:17 2018(r333808)
@@ -267,8 +267,9 @@ epoch_enter_preempt_internal(epoch_t epoch, struct thr
 {
struct epoch_pcpu_state *eps;
 
-   MPASS(epoch->e_flags & EPOCH_PREEMPT);
+   MPASS(cold || epoch != NULL);
INIT_CHECK(epoch);
+   MPASS(epoch->e_flags & EPOCH_PREEMPT);
critical_enter();
td->td_pre_epoch_prio = td->td_priority;
eps = epoch->e_pcpu[curcpu];
@@ -300,6 +301,7 @@ epoch_enter(epoch_t epoch)
ck_epoch_section_t *section;
struct thread *td;
 
+   MPASS(cold || epoch != NULL);
section = NULL;
td = curthread;
critical_enter();
@@ -495,6 +497,8 @@ epoch_wait_preempt(epoch_t epoch)
 
locks = curthread->td_locks;
 #endif
+
+   MPASS(cold || epoch != NULL);
INIT_CHECK(epoch);
 
MPASS(epoch->e_flags & EPOCH_PREEMPT);
@@ -548,6 +552,8 @@ void
 epoch_wait(epoch_t epoch)
 {
 
+   MPASS(cold || epoch != NULL);
+   INIT_CHECK(epoch);
MPASS(epoch->e_flags == 0);
critical_enter();
ck_epoch_synchronize_wait(>e_epoch, epoch_block_handler, NULL);
___
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: r333801 - head/sys/contrib/dev/ath/ath_hal/ar9300

2018-05-18 Thread Sean Bruno
Author: sbruno
Date: Fri May 18 17:23:23 2018
New Revision: 333801
URL: https://svnweb.freebsd.org/changeset/base/333801

Log:
  Quiesce a couple pages of clang warnings with a cast.  Duplicates
  linux maintainer commit:
  
  
https://github.com/torvalds/linux/commit/627871b71c89a6ec12fbed75063f238e0c7127b2#diff-8c6ddb4c3ad69a6fb9f289475821db56
  
  ar9300template_aphrodite.h:575:40: warning: implicit conversion from 'int'
to 'u_int8_t' (aka 'unsigned char') changes value from 3495 to 167
[-Wconstant-conversion]
  /* Data[8].ctl_edges[7].bChannel*/FREQ2FBIN(5795, 0)}
^~
  ar9300eep.h:142:41: note: expanded from macro 'FREQ2FBIN'
  (((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 5))
  
  Reviewed by:  imp
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D15476

Modified:
  head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h

Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h
==
--- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h Fri May 18 17:07:59 
2018(r333800)
+++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h Fri May 18 17:23:23 
2018(r333801)
@@ -139,7 +139,7 @@ enum Ar9300EepromTemplate
 #define OSPREY_CUSTOMER_DATA_SIZE20
 
 #define FREQ2FBIN(x,y) \
-(((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 5))
+(u_int8_t)(((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 5))
 #define FBIN2FREQ(x,y) \
 (((y) == HAL_FREQ_BAND_2GHZ) ? (2300 + x) : (4800 + 5 * x))
 #define OSPREY_MAX_CHAINS3
___
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: r333801 - head/sys/contrib/dev/ath/ath_hal/ar9300

2018-05-18 Thread Sean Bruno


On 05/18/18 11:29, Ian Lepore wrote:
> On Fri, 2018-05-18 at 17:23 +, Sean Bruno wrote:
>> Author: sbruno
>> Date: Fri May 18 17:23:23 2018
>> New Revision: 333801
>> URL: https://svnweb.freebsd.org/changeset/base/333801
>>
>> Log:
>>   Quiesce a couple pages of clang warnings with a cast.  Duplicates
>>   linux maintainer commit:
>>   
>>   
>> https://github.com/torvalds/linux/commit/627871b71c89a6ec12fbed75063f238e0c7127b2#diff-8c6ddb4c3ad69a6fb9f289475821db56
>>   
>>   ar9300template_aphrodite.h:575:40: warning: implicit conversion from 'int'
>> to 'u_int8_t' (aka 'unsigned char') changes value from 3495 to 167
>> [-Wconstant-conversion]
>>   /* Data[8].ctl_edges[7].bChannel*/FREQ2FBIN(5795, 0)}
>> ^~
>>   ar9300eep.h:142:41: note: expanded from macro 'FREQ2FBIN'
>>   (((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 5))
>>   
>>   Reviewed by:   imp
>>   MFC after: 1 week
>>   Differential Revision: https://reviews.freebsd.org/D15476
>>
>> Modified:
>>   head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h
>>
>> Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h
>> ==
>> --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h  Fri May 18 
>> 17:07:59 2018(r333800)
>> +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h  Fri May 18 
>> 17:23:23 2018(r333801)
>> @@ -139,7 +139,7 @@ enum Ar9300EepromTemplate
>>  #define OSPREY_CUSTOMER_DATA_SIZE20
>>  
>>  #define FREQ2FBIN(x,y) \
>> -(((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 5))
>> +(u_int8_t)(((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 
>> 5))
>>  #define FBIN2FREQ(x,y) \
>>  (((y) == HAL_FREQ_BAND_2GHZ) ? (2300 + x) : (4800 + 5 * x))
>>  #define OSPREY_MAX_CHAINS3
>>
> 
> How can this change possibly be correct? All the values involved are
> compile-time constants, the compiler did the math and tells you the
> result is 3495. Cast or not, that value is never going to fit into a
> uint8_t. Sure this supresses the warning, but what about actually
> fixing the overflow?
> 
> -- Ian
> 
> 


An excellent question all around.  It appears that the maintainer at
Qualcom acked the linux commit, so I'm not sure how to interpret all of
this.

sean



signature.asc
Description: OpenPGP digital signature


svn commit: r333804 - head/usr.sbin/bsdinstall

2018-05-18 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Fri May 18 17:46:40 2018
New Revision: 333804
URL: https://svnweb.freebsd.org/changeset/base/333804

Log:
  Use sysrc(8) in the documentation rather than echoing things to rc.conf
  in order to encourage good habits.
  
  PR:   228325
  Submitted by: Mateusz Piotrowski
  MFC after:2 weeks

Modified:
  head/usr.sbin/bsdinstall/bsdinstall.8

Modified: head/usr.sbin/bsdinstall/bsdinstall.8
==
--- head/usr.sbin/bsdinstall/bsdinstall.8   Fri May 18 17:43:15 2018
(r333803)
+++ head/usr.sbin/bsdinstall/bsdinstall.8   Fri May 18 17:46:40 2018
(r333804)
@@ -333,8 +333,8 @@ PARTITIONS=ada0
 DISTRIBUTIONS="kernel.txz base.txz"
 
 #!/bin/sh
-echo "ifconfig_em0=DHCP" >> /etc/rc.conf
-echo "sshd_enable=YES" >> /etc/rc.conf
+sysrc ifconfig_em0=DHCP
+sysrc sshd_enable=YES
 pkg install puppet
 .Ed
 .Pp
___
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: r333805 - head/sys/amd64/conf

2018-05-18 Thread Ed Maste
Author: emaste
Date: Fri May 18 17:51:42 2018
New Revision: 333805
URL: https://svnweb.freebsd.org/changeset/base/333805

Log:
  amd64 GENERIC: correct whitespace on smartpqi entry

Modified:
  head/sys/amd64/conf/GENERIC

Modified: head/sys/amd64/conf/GENERIC
==
--- head/sys/amd64/conf/GENERIC Fri May 18 17:46:40 2018(r333804)
+++ head/sys/amd64/conf/GENERIC Fri May 18 17:51:42 2018(r333805)
@@ -166,7 +166,7 @@ device  iir # Intel 
Integrated RAID
 device ips # IBM (Adaptec) ServeRAID
 device mly # Mylex AcceleRAID/eXtremeRAID
 device twa # 3ware 9000 series PATA/SATA RAID
-device  smartpqi# Microsemi smartpqi driver
+device smartpqi# Microsemi smartpqi driver
 device tws # LSI 3ware 9750 SATA+SAS 6Gb/s RAID 
controller
 
 # RAID controllers
___
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: r333816 - head/sys/kern

2018-05-18 Thread Mateusz Guzik
Author: mjg
Date: Fri May 18 22:57:52 2018
New Revision: 333816
URL: https://svnweb.freebsd.org/changeset/base/333816

Log:
  lockmgr: avoid atomic on unlock in the slow path
  
  The code is pretty much guaranteed not to be able to unlock.
  
  This is a minor nit. The code still performs way too many reads.
  The altered exclusive-locked condition is supposed to be always
  true as well, to be cleaned up at a later date.

Modified:
  head/sys/kern/kern_lock.c

Modified: head/sys/kern/kern_lock.c
==
--- head/sys/kern/kern_lock.c   Fri May 18 22:22:08 2018(r333815)
+++ head/sys/kern/kern_lock.c   Fri May 18 22:57:52 2018(r333816)
@@ -132,9 +132,11 @@ CTASSERT(LK_UNLOCKED == (LK_UNLOCKED &
 #definelockmgr_disowned(lk)
\
(((lk)->lk_lock & ~(LK_FLAGMASK & ~LK_SHARE)) == LK_KERNPROC)
 
-#definelockmgr_xlocked(lk) 
\
-   (((lk)->lk_lock & ~(LK_FLAGMASK & ~LK_SHARE)) == (uintptr_t)curthread)
+#definelockmgr_xlocked_v(v)
\
+   (((v) & ~(LK_FLAGMASK & ~LK_SHARE)) == (uintptr_t)curthread)
 
+#definelockmgr_xlocked(lk) lockmgr_xlocked_v((lk)->lk_lock)
+
 static voidassert_lockmgr(const struct lock_object *lock, int how);
 #ifdef DDB
 static voiddb_show_lockmgr(const struct lock_object *lock);
@@ -1021,7 +1023,7 @@ lockmgr_xunlock_hard(struct lock *lk, uintptr_t x, u_i
 * The lock is held in exclusive mode.
 * If the lock is recursed also, then unrecurse it.
 */
-   if (lockmgr_xlocked(lk) && lockmgr_recursed(lk)) {
+   if (lockmgr_xlocked_v(x) && lockmgr_recursed(lk)) {
LOCK_LOG2(lk, "%s: %p unrecursing", __func__, lk);
lk->lk_recurse--;
goto out;
@@ -1029,7 +1031,7 @@ lockmgr_xunlock_hard(struct lock *lk, uintptr_t x, u_i
if (tid != LK_KERNPROC)
lock_profile_release_lock(>lock_object);
 
-   if (atomic_cmpset_rel_ptr(>lk_lock, tid, LK_UNLOCKED))
+   if (x == tid && atomic_cmpset_rel_ptr(>lk_lock, tid, LK_UNLOCKED))
goto out;
 
sleepq_lock(>lock_object);
___
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: r333820 - in head: contrib/bmake contrib/bmake/mk usr.bin/bmake

2018-05-18 Thread Simon J. Gerraty
Author: sjg
Date: Sat May 19 00:26:00 2018
New Revision: 333820
URL: https://svnweb.freebsd.org/changeset/base/333820

Log:
  Merge bmake-20180512
  
  Skip polling job token pipe,
  better handle sysV style includes with variables.

Added:
  head/contrib/bmake/mk/dirdeps-options.mk
 - copied unchanged from r333814, 
vendor/NetBSD/bmake/dist/mk/dirdeps-options.mk
Modified:
  head/contrib/bmake/ChangeLog
  head/contrib/bmake/VERSION
  head/contrib/bmake/bmake.1
  head/contrib/bmake/job.c
  head/contrib/bmake/make.1
  head/contrib/bmake/mk/ChangeLog
  head/contrib/bmake/mk/FILES
  head/contrib/bmake/mk/cython.mk
  head/contrib/bmake/mk/dirdeps.mk
  head/contrib/bmake/mk/gendirdeps.mk
  head/contrib/bmake/mk/install-mk
  head/contrib/bmake/mk/ldorder.mk
  head/contrib/bmake/mk/meta.autodep.mk
  head/contrib/bmake/mk/own.mk
  head/contrib/bmake/parse.c
  head/usr.bin/bmake/Makefile.config
Directory Properties:
  head/contrib/bmake/   (props changed)

Modified: head/contrib/bmake/ChangeLog
==
--- head/contrib/bmake/ChangeLogSat May 19 00:04:01 2018
(r333819)
+++ head/contrib/bmake/ChangeLogSat May 19 00:26:00 2018
(r333820)
@@ -1,3 +1,16 @@
+2018-05-12  Simon J. Gerraty  
+
+   * VERSION: 20180512
+ Merge with NetBSD make, pick up
+ o job.c: skip polling job token pipe
+
+2018-04-05  Simon J. Gerraty  
+
+   * VERSION: 20180405
+ Merge with NetBSD make, pick up
+ o parse.c: be more cautious about detecting depenency line
+   rather than sysV style include.
+
 2018-02-22  Simon J. Gerraty  
 
* VERSION: 20180222

Modified: head/contrib/bmake/VERSION
==
--- head/contrib/bmake/VERSION  Sat May 19 00:04:01 2018(r333819)
+++ head/contrib/bmake/VERSION  Sat May 19 00:26:00 2018(r333820)
@@ -1,2 +1,2 @@
 # keep this compatible with sh and make
-_MAKE_VERSION=20180222
+_MAKE_VERSION=20180512

Modified: head/contrib/bmake/bmake.1
==
--- head/contrib/bmake/bmake.1  Sat May 19 00:04:01 2018(r333819)
+++ head/contrib/bmake/bmake.1  Sat May 19 00:26:00 2018(r333820)
@@ -1,4 +1,4 @@
-.\"$NetBSD: make.1,v 1.271 2017/07/03 21:34:20 wiz Exp $
+.\"$NetBSD: make.1,v 1.272 2018/04/02 04:26:17 dholland Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"The Regents of the University of California.  All rights reserved.
@@ -1865,7 +1865,8 @@ expression is applied.
 Similarly, if the form is
 .Ql Ic .ifmake
 or
-.Ql Ic .ifnmake , the
+.Ql Ic .ifnmake ,
+the
 .Dq make
 expression is applied.
 .Pp

Modified: head/contrib/bmake/job.c
==
--- head/contrib/bmake/job.cSat May 19 00:04:01 2018(r333819)
+++ head/contrib/bmake/job.cSat May 19 00:26:00 2018(r333820)
@@ -1,4 +1,4 @@
-/* $NetBSD: job.c,v 1.192 2018/02/08 09:05:21 dholland Exp $   */
+/* $NetBSD: job.c,v 1.195 2018/05/13 22:13:28 sjg Exp $*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: job.c,v 1.192 2018/02/08 09:05:21 dholland Exp 
$";
+static char rcsid[] = "$NetBSD: job.c,v 1.195 2018/05/13 22:13:28 sjg Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)job.c  8.2 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: job.c,v 1.192 2018/02/08 09:05:21 dholland Exp $");
+__RCSID("$NetBSD: job.c,v 1.195 2018/05/13 22:13:28 sjg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -2998,7 +2998,6 @@ Job_TokenWithdraw(void)
}
if (DEBUG(JOB))
fprintf(debug_file, "(%d) blocked for token\n", getpid());
-   wantToken = 1;
return FALSE;
 }
 

Modified: head/contrib/bmake/make.1
==
--- head/contrib/bmake/make.1   Sat May 19 00:04:01 2018(r333819)
+++ head/contrib/bmake/make.1   Sat May 19 00:26:00 2018(r333820)
@@ -1,4 +1,4 @@
-.\"$NetBSD: make.1,v 1.271 2017/07/03 21:34:20 wiz Exp $
+.\"$NetBSD: make.1,v 1.272 2018/04/02 04:26:17 dholland Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"The Regents of the University of California.  All rights reserved.
@@ -1876,7 +1876,8 @@ expression is applied.
 Similarly, if the form is
 .Ql Ic .ifmake
 or
-.Ql Ic .ifnmake , the
+.Ql Ic .ifnmake ,
+the
 .Dq make
 expression is applied.
 .Pp

Modified: head/contrib/bmake/mk/ChangeLog
==
--- head/contrib/bmake/mk/ChangeLog Sat May 19 00:04:01 2018
(r333819)
+++ head/contrib/bmake/mk/ChangeLog Sat May 19 

svn commit: r333822 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 02:15:40 2018
New Revision: 333822
URL: https://svnweb.freebsd.org/changeset/base/333822

Log:
  fix gcc8 unused variable and set but not used variable in unix sockets
  add copyright from lock rewrite while here

Modified:
  head/sys/kern/uipc_usrreq.c

Modified: head/sys/kern/uipc_usrreq.c
==
--- head/sys/kern/uipc_usrreq.c Sat May 19 00:47:24 2018(r333821)
+++ head/sys/kern/uipc_usrreq.c Sat May 19 02:15:40 2018(r333822)
@@ -4,7 +4,7 @@
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
  * The Regents of the University of California.
  * Copyright (c) 2004-2009 Robert N. M. Watson
- * All rights reserved.
+ * Copyright (c) 2018 Matthew Macy
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -765,6 +765,7 @@ uipc_detach(struct socket *so)
KASSERT(unp != NULL, ("uipc_detach: unp == NULL"));
 
vp = NULL;
+   vplock = NULL;
local_unp_rights = 0;
 
UNP_LINK_WLOCK();
@@ -787,7 +788,8 @@ uipc_detach(struct socket *so)
}
if (unp->unp_vnode != vp &&
unp->unp_vnode != NULL) {
-   mtx_unlock(vplock);
+   if (vplock)
+   mtx_unlock(vplock);
UNP_PCB_UNLOCK(unp);
if (unp2)
UNP_PCB_UNLOCK(unp2);
@@ -1676,7 +1678,9 @@ static void
 unp_disconnect(struct unpcb *unp, struct unpcb *unp2)
 {
struct socket *so, *so2;
-   int rele, freed;
+#ifdef INVARIANTS
+   int freed;
+#endif
 
KASSERT(unp2 != NULL, ("unp_disconnect: unp2 == NULL"));
 
@@ -1688,7 +1692,6 @@ unp_disconnect(struct unpcb *unp, struct unpcb *unp2)
 
MPASS(unp->unp_conn == unp2);
unp->unp_conn = NULL;
-   rele = 0;
so = unp->unp_socket;
so2 = unp2->unp_socket;
switch (unp->unp_socket->so_type) {
@@ -1713,9 +1716,15 @@ unp_disconnect(struct unpcb *unp, struct unpcb *unp2)
soisdisconnected(so2);
break;
}
-   freed = unp_pcb_rele(unp);
+#ifdef INVARIANTS  
+   freed =
+#endif 
+   unp_pcb_rele(unp);
MPASS(freed == 0);
-   freed = unp_pcb_rele(unp2);
+#ifdef INVARIANTS  
+   freed =
+#endif
+   unp_pcb_rele(unp2);
MPASS(freed == 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: r333817 - head/sys/sys

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Fri May 18 23:17:49 2018
New Revision: 333817
URL: https://svnweb.freebsd.org/changeset/base/333817

Log:
  Annotate td_pre_epoch_prio in struct thread
  
  Reported by:  jhb

Modified:
  head/sys/sys/proc.h

Modified: head/sys/sys/proc.h
==
--- head/sys/sys/proc.h Fri May 18 22:57:52 2018(r333816)
+++ head/sys/sys/proc.h Fri May 18 23:17:49 2018(r333817)
@@ -322,7 +322,7 @@ struct thread {
u_char  td_pri_class;   /* (t) Scheduling class. */
u_char  td_user_pri;/* (t) User pri from estcpu and nice. */
u_char  td_base_user_pri; /* (t) Base user pri */
-   u_char  td_pre_epoch_prio;
+   u_char  td_pre_epoch_prio; /* (k) User pri on entry to epoch */
uintptr_t   td_rb_list; /* (k) Robust list head. */
uintptr_t   td_rbp_list;/* (k) Robust priv list head. */
uintptr_t   td_rb_inact;/* (k) Current in-action mutex loc. */
___
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: r333757 - head/sys/sys

2018-05-18 Thread John Baldwin
On Thursday, May 17, 2018 07:30:57 PM Matt Macy wrote:
> Author: mmacy
> Date: Thu May 17 19:30:57 2018
> New Revision: 333757
> URL: https://svnweb.freebsd.org/changeset/base/333757
> 
> Log:
>   epoch(9): missed add from r333755
>   
>   Reported by:flo
>   Approved by:sbruno
> 
> Modified:
>   head/sys/sys/proc.h
> 
> Modified: head/sys/sys/proc.h
> ==
> --- head/sys/sys/proc.h   Thu May 17 19:10:13 2018(r333756)
> +++ head/sys/sys/proc.h   Thu May 17 19:30:57 2018(r333757)
> @@ -322,6 +322,7 @@ struct thread {
>   u_char  td_pri_class;   /* (t) Scheduling class. */
>   u_char  td_user_pri;/* (t) User pri from estcpu and nice. */
>   u_char  td_base_user_pri; /* (t) Base user pri */
> + u_char  td_pre_epoch_prio;
>   uintptr_t   td_rb_list; /* (k) Robust list head. */
>   uintptr_t   td_rbp_list;/* (k) Robust priv list head. */
>   uintptr_t   td_rb_inact;/* (k) Current in-action mutex loc. */

Can you annotate the locking for this field for future readers?

-- 
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"


Re: svn commit: r333757 - head/sys/sys

2018-05-18 Thread Matthew Macy
Sorry, will do

On Fri, May 18, 2018 at 15:29 John Baldwin  wrote:

> On Thursday, May 17, 2018 07:30:57 PM Matt Macy wrote:
> > Author: mmacy
> > Date: Thu May 17 19:30:57 2018
> > New Revision: 333757
> > URL: https://svnweb.freebsd.org/changeset/base/333757
> >
> > Log:
> >   epoch(9): missed add from r333755
> >
> >   Reported by:flo
> >   Approved by:sbruno
> >
> > Modified:
> >   head/sys/sys/proc.h
> >
> > Modified: head/sys/sys/proc.h
> >
> ==
> > --- head/sys/sys/proc.h   Thu May 17 19:10:13 2018(r333756)
> > +++ head/sys/sys/proc.h   Thu May 17 19:30:57 2018(r333757)
> > @@ -322,6 +322,7 @@ struct thread {
> >   u_char  td_pri_class;   /* (t) Scheduling class. */
> >   u_char  td_user_pri;/* (t) User pri from estcpu and
> nice. */
> >   u_char  td_base_user_pri; /* (t) Base user pri */
> > + u_char  td_pre_epoch_prio;
> >   uintptr_t   td_rb_list; /* (k) Robust list head. */
> >   uintptr_t   td_rbp_list;/* (k) Robust priv list head. */
> >   uintptr_t   td_rb_inact;/* (k) Current in-action mutex
> loc. */
>
> Can you annotate the locking for this field for future readers?
>
> --
> 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: r333819 - in head/sys: conf modules/blake2 modules/crypto modules/drm2/i915kms modules/ipfilter

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 00:04:01 2018
New Revision: 333819
URL: https://svnweb.freebsd.org/changeset/base/333819

Log:
  Silence non-actionable warnings in vendor code
  
  We can't modify vendor code so there's no signal in warnings from it.
  Similarly -Waddress-of-packed-member is not useful on networking code
  as access to packed structures is fundamental to its operation.

Modified:
  head/sys/conf/files
  head/sys/conf/kern.mk
  head/sys/modules/blake2/Makefile
  head/sys/modules/crypto/Makefile
  head/sys/modules/drm2/i915kms/Makefile
  head/sys/modules/ipfilter/Makefile

Modified: head/sys/conf/files
==
--- head/sys/conf/files Fri May 18 23:42:08 2018(r333818)
+++ head/sys/conf/files Sat May 19 00:04:01 2018(r333819)
@@ -565,7 +565,7 @@ contrib/ipfilter/netinet/ip_lookup.c optional ipfilter
 contrib/ipfilter/netinet/ip_pool.c optional ipfilter inet \
compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter"
 contrib/ipfilter/netinet/ip_htable.c optional ipfilter inet \
-   compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter"
+   compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter 
${NO_WTAUTOLOGICAL_POINTER_COMPARE}"
 contrib/ipfilter/netinet/ip_sync.c optional ipfilter inet \
compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter"
 contrib/ipfilter/netinet/mlfk_ipl.c optional ipfilter inet \

Modified: head/sys/conf/kern.mk
==
--- head/sys/conf/kern.mk   Fri May 18 23:42:08 2018(r333818)
+++ head/sys/conf/kern.mk   Sat May 19 00:04:01 2018(r333819)
@@ -18,12 +18,13 @@ CWARNFLAGS?=-Wall -Wredundant-decls 
-Wnested-externs 
 # a false positive.
 .if ${COMPILER_TYPE} == "clang"
 NO_WCONSTANT_CONVERSION=   -Wno-error-constant-conversion
-NO_WSHIFT_COUNT_NEGATIVE=  -Wno-error-shift-count-negative
-NO_WSHIFT_COUNT_OVERFLOW=  -Wno-error-shift-count-overflow
-NO_WSELF_ASSIGN=   -Wno-error-self-assign
+NO_WSHIFT_COUNT_NEGATIVE=  -Wno-shift-count-negative
+NO_WSHIFT_COUNT_OVERFLOW=  -Wno-shift-count-overflow
+NO_WSELF_ASSIGN=   -Wno-self-assign
 NO_WUNNEEDED_INTERNAL_DECL=-Wno-error-unneeded-internal-declaration
 NO_WSOMETIMES_UNINITIALIZED=   -Wno-error-sometimes-uninitialized
 NO_WCAST_QUAL= -Wno-error-cast-qual
+NO_WTAUTOLOGICAL_POINTER_COMPARE= -Wno-tautological-pointer-compare
 # Several other warnings which might be useful in some cases, but not severe
 # enough to error out the whole kernel build.  Display them anyway, so there is
 # some incentive to fix them eventually.
@@ -34,7 +35,7 @@ CWARNEXTRA?=  -Wno-error-tautological-compare -Wno-erro
 CWARNEXTRA+=   -Wno-error-shift-negative-value
 .endif
 .if ${COMPILER_VERSION} >= 4
-CWARNEXTRA+=   -Wno-error-address-of-packed-member
+CWARNEXTRA+=   -Wno-address-of-packed-member
 .endif
 
 CLANG_NO_IAS= -no-integrated-as

Modified: head/sys/modules/blake2/Makefile
==
--- head/sys/modules/blake2/MakefileFri May 18 23:42:08 2018
(r333818)
+++ head/sys/modules/blake2/MakefileSat May 19 00:04:01 2018
(r333819)
@@ -87,4 +87,5 @@ WARNS ?= 6
 .include 
 
 CWARNFLAGS.blake2-dispatch.c   +=  -Wno-unused-const-variable
+CWARNFLAGS.blake2s-ref.c   +=  -Wno-cast-qual -Wno-unused-function
 CWARNFLAGS +=  -Wno-cast-qual

Modified: head/sys/modules/crypto/Makefile
==
--- head/sys/modules/crypto/MakefileFri May 18 23:42:08 2018
(r333818)
+++ head/sys/modules/crypto/MakefileSat May 19 00:04:01 2018
(r333819)
@@ -40,8 +40,8 @@ SRCS  += blake2-sw.c
 CFLAGS.blake2b-ref.c   += -I${SRCTOP}/sys/crypto/blake2 -DSUFFIX=_ref
 CFLAGS.blake2s-ref.c   += -I${SRCTOP}/sys/crypto/blake2 -DSUFFIX=_ref
 CFLAGS.blake2-sw.c += -I${SRCTOP}/sys/crypto/blake2
-CWARNFLAGS.blake2b-ref.c   += -Wno-cast-qual
-CWARNFLAGS.blake2s-ref.c   += -Wno-cast-qual
+CWARNFLAGS.blake2b-ref.c   += -Wno-cast-qual -Wno-unused-function
+CWARNFLAGS.blake2s-ref.c   += -Wno-cast-qual -Wno-unused-function
 SRCS   += chacha.c
 SRCS   += chacha-sw.c
 SRCS   += opt_param.h cryptodev_if.h bus_if.h device_if.h

Modified: head/sys/modules/drm2/i915kms/Makefile
==
--- head/sys/modules/drm2/i915kms/Makefile  Fri May 18 23:42:08 2018
(r333818)
+++ head/sys/modules/drm2/i915kms/Makefile  Sat May 19 00:04:01 2018
(r333819)
@@ -63,3 +63,8 @@ SRCS  +=  
\
 CWARNFLAGS.i915_debug.c=   -Wno-unused-function
 CWARNFLAGS.intel_lvds.c=   -Wno-unused
 CWARNFLAGS.intel_tv.c= -Wno-unused