svn commit: r318013 - head/sys/dev/iwm

2017-05-08 Thread Adrian Chadd
Author: adrian
Date: Tue May  9 05:32:35 2017
New Revision: 318013
URL: https://svnweb.freebsd.org/changeset/base/318013

Log:
  [iwm] Move in_phyctxt from struct iwm_node to phy_ctxt in struct iwm_vap.
  
  * This better matches how things are organized in Linux's iwlwifi.
  
  Obtained from:dragonflybsd.git 
0cf16dd2e0e09a3e5140e50222ac2e69bcdb19a2

Modified:
  head/sys/dev/iwm/if_iwm.c
  head/sys/dev/iwm/if_iwm_binding.c
  head/sys/dev/iwm/if_iwm_binding.h
  head/sys/dev/iwm/if_iwmvar.h

Modified: head/sys/dev/iwm/if_iwm.c
==
--- head/sys/dev/iwm/if_iwm.c   Tue May  9 05:31:38 2017(r318012)
+++ head/sys/dev/iwm/if_iwm.c   Tue May  9 05:32:35 2017(r318013)
@@ -355,7 +355,7 @@ static int  iwm_mvm_add_int_sta_common(st
struct iwm_int_sta *,
   const uint8_t *, uint16_t, uint16_t);
 static int iwm_mvm_add_aux_sta(struct iwm_softc *);
-static int iwm_mvm_update_quotas(struct iwm_softc *, struct iwm_node *);
+static int iwm_mvm_update_quotas(struct iwm_softc *, struct iwm_vap *);
 static int iwm_auth(struct ieee80211vap *, struct iwm_softc *);
 static int iwm_assoc(struct ieee80211vap *, struct iwm_softc *);
 static int iwm_release(struct iwm_softc *, struct iwm_node *);
@@ -1286,6 +1286,7 @@ iwm_stop_device(struct iwm_softc *sc)
 */
if (vap) {
struct iwm_vap *iv = IWM_VAP(vap);
+   iv->phy_ctxt = NULL;
iv->is_uploaded = 0;
}
 
@@ -4014,7 +4015,7 @@ iwm_mvm_add_aux_sta(struct iwm_softc *sc
  */
 
 static int
-iwm_mvm_update_quotas(struct iwm_softc *sc, struct iwm_node *in)
+iwm_mvm_update_quotas(struct iwm_softc *sc, struct iwm_vap *ivp)
 {
struct iwm_time_quota_cmd cmd;
int i, idx, ret, num_active_macs, quota, quota_rem;
@@ -4025,10 +4026,10 @@ iwm_mvm_update_quotas(struct iwm_softc *
memset(&cmd, 0, sizeof(cmd));
 
/* currently, PHY ID == binding ID */
-   if (in) {
-   id = in->in_phyctxt->id;
+   if (ivp) {
+   id = ivp->phy_ctxt->id;
KASSERT(id < IWM_MAX_BINDINGS, ("invalid id"));
-   colors[id] = in->in_phyctxt->color;
+   colors[id] = ivp->phy_ctxt->color;
 
if (1)
n_ifs[id] = 1;
@@ -4153,9 +4154,9 @@ iwm_auth(struct ieee80211vap *vap, struc
"%s: failed update phy ctxt\n", __func__);
goto out;
}
-   in->in_phyctxt = &sc->sc_phyctxt[0];
+   iv->phy_ctxt = &sc->sc_phyctxt[0];
 
-   if ((error = iwm_mvm_binding_update(sc, in)) != 0) {
+   if ((error = iwm_mvm_binding_update(sc, iv)) != 0) {
device_printf(sc->sc_dev,
"%s: binding update cmd\n", __func__);
goto out;
@@ -4184,9 +4185,9 @@ iwm_auth(struct ieee80211vap *vap, struc
error = ETIMEDOUT;
goto out;
}
-   in->in_phyctxt = &sc->sc_phyctxt[0];
+   iv->phy_ctxt = &sc->sc_phyctxt[0];
 
-   if ((error = iwm_mvm_binding_add_vif(sc, in)) != 0) {
+   if ((error = iwm_mvm_binding_add_vif(sc, iv)) != 0) {
device_printf(sc->sc_dev,
"%s: binding add cmd\n", __func__);
goto out;
@@ -4590,7 +4591,7 @@ iwm_newstate(struct ieee80211vap *vap, e
in = IWM_NODE(vap->iv_bss);
iwm_mvm_enable_beacon_filter(sc, in);
iwm_mvm_power_update_mac(sc);
-   iwm_mvm_update_quotas(sc, in);
+   iwm_mvm_update_quotas(sc, ivp);
iwm_setrates(sc, in);
 
cmd.data[0] = &in->in_lq;
@@ -5761,7 +5762,6 @@ iwm_intr(void *arg)
device_printf(sc->sc_dev, "%s: controller panicked, iv_state = 
%d; "
"restarting\n", __func__, vap->iv_state);
 
-   /* XXX TODO: turn this into a callout/taskqueue */
ieee80211_restart_all(ic);
return;
}

Modified: head/sys/dev/iwm/if_iwm_binding.c
==
--- head/sys/dev/iwm/if_iwm_binding.c   Tue May  9 05:31:38 2017
(r318012)
+++ head/sys/dev/iwm/if_iwm_binding.c   Tue May  9 05:32:35 2017
(r318013)
@@ -162,10 +162,10 @@ __FBSDID("$FreeBSD$");
  */
 
 int
-iwm_mvm_binding_cmd(struct iwm_softc *sc, struct iwm_node *in, uint32_t action)
+iwm_mvm_binding_cmd(struct iwm_softc *sc, struct iwm_vap *ivp, uint32_t action)
 {
struct iwm_binding_cmd cmd;
-   struct iwm_mvm_phy_ctxt *phyctxt = in->in_phyctxt;
+   struct iwm_mvm_phy_ctxt *phyctxt = ivp->phy_ctxt;
int i, ret;
uint32_t statu

svn commit: r318012 - head/sys/dev/iwm

2017-05-08 Thread Adrian Chadd
Author: adrian
Date: Tue May  9 05:31:38 2017
New Revision: 318012
URL: https://svnweb.freebsd.org/changeset/base/318012

Log:
  [iwm] Allow listening on both chains/atennas to get diversity.
  
  This might improve throughput slightly when far from the accesspoint,
  apparently by allowing the firmware to listen on either of the two
  antennas (if there are two, i.e. on 7260/7265/8260), whichever has
  a better reception.
  
  Obtained from:dragonflybsd.git 
3b7fc5aac51f81062da0a2c8fdac23e683fbd548

Modified:
  head/sys/dev/iwm/if_iwm_phy_ctxt.c
  head/sys/dev/iwm/if_iwm_util.c
  head/sys/dev/iwm/if_iwm_util.h

Modified: head/sys/dev/iwm/if_iwm_phy_ctxt.c
==
--- head/sys/dev/iwm/if_iwm_phy_ctxt.c  Tue May  9 05:22:51 2017
(r318011)
+++ head/sys/dev/iwm/if_iwm_phy_ctxt.c  Tue May  9 05:31:38 2017
(r318012)
@@ -218,6 +218,18 @@ iwm_mvm_phy_ctxt_cmd_data(struct iwm_sof
idle_cnt = chains_static;
active_cnt = chains_dynamic;
 
+   /* In scenarios where we only ever use a single-stream rates,
+* i.e. legacy 11b/g/a associations, single-stream APs or even
+* static SMPS, enable both chains to get diversity, improving
+* the case where we're far enough from the AP that attenuation
+* between the two antennas is sufficiently different to impact
+* performance.
+*/
+   if (active_cnt == 1 && iwm_mvm_rx_diversity_allowed(sc)) {
+   idle_cnt = 2;
+   active_cnt = 2;
+   }
+
cmd->rxchain_info = htole32(iwm_mvm_get_valid_rx_ant(sc) <<
IWM_PHY_RX_CHAIN_VALID_POS);
cmd->rxchain_info |= htole32(idle_cnt << IWM_PHY_RX_CHAIN_CNT_POS);

Modified: head/sys/dev/iwm/if_iwm_util.c
==
--- head/sys/dev/iwm/if_iwm_util.c  Tue May  9 05:22:51 2017
(r318011)
+++ head/sys/dev/iwm/if_iwm_util.c  Tue May  9 05:31:38 2017
(r318012)
@@ -153,6 +153,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -487,3 +488,17 @@ iwm_dma_contig_free(struct iwm_dma_info 
dma->tag = NULL;
}
 }
+
+boolean_t
+iwm_mvm_rx_diversity_allowed(struct iwm_softc *sc)
+{
+   if (num_of_ant(iwm_mvm_get_valid_rx_ant(sc)) == 1)
+   return FALSE;
+
+   /*
+* XXX Also return FALSE when SMPS (Spatial Multiplexing Powersave)
+* is used on any vap (in the future).
+*/
+
+   return TRUE;
+}

Modified: head/sys/dev/iwm/if_iwm_util.h
==
--- head/sys/dev/iwm/if_iwm_util.h  Tue May  9 05:22:51 2017
(r318011)
+++ head/sys/dev/iwm/if_iwm_util.h  Tue May  9 05:31:38 2017
(r318012)
@@ -120,6 +120,8 @@ extern  int iwm_dma_contig_alloc(bus_dma_
 bus_size_t size, bus_size_t alignment);
 extern void iwm_dma_contig_free(struct iwm_dma_info *);
 
+extern boolean_t iwm_mvm_rx_diversity_allowed(struct iwm_softc *sc);
+
 extern uint8_t iwm_ridx2rate(struct ieee80211_rateset *rs, int ridx);
 
 static inline uint8_t
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r318011 - head/sys/modules/tests

2017-05-08 Thread Ngie Cooper
Author: ngie
Date: Tue May  9 05:22:51 2017
New Revision: 318011
URL: https://svnweb.freebsd.org/changeset/base/318011

Log:
  Mark this Makefile SUBDIR_PARALLEL
  
  I inserted the necessary SUBDIR+= .WAIT in the previous commit
  
  MFC after:3 weeks
  Sponsored by: Dell EMC Isilon

Modified:
  head/sys/modules/tests/Makefile

Modified: head/sys/modules/tests/Makefile
==
--- head/sys/modules/tests/Makefile Tue May  9 05:08:47 2017
(r318010)
+++ head/sys/modules/tests/Makefile Tue May  9 05:22:51 2017
(r318011)
@@ -4,4 +4,6 @@ SUBDIR+=framework
 SUBDIR+=   .WAIT
 SUBDIR+=   callout_test
 
+SUBDIR_PARALLEL=
+
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r318008 - head/sys/modules

2017-05-08 Thread Ngie Cooper (yaneurabeya)

> On May 8, 2017, at 22:06, O. Hartmann  wrote:
> 
> On Tue, 9 May 2017 04:59:05 + (UTC)
> Ngie Cooper  wrote:

…

> Ooopsie ... ;-)
> 
> Something went wrong after I sucked in this commit just a few seconds ago,
> compiling kernel failed:

You’re fast. Fixed in r318009 5 minutes ago.
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r318010 - head/sys/tests/callout_test

2017-05-08 Thread Ngie Cooper
Author: ngie
Date: Tue May  9 05:08:47 2017
New Revision: 318010
URL: https://svnweb.freebsd.org/changeset/base/318010

Log:
  style(9): sort headers
  
  MFC after:3 weeks
  Sponsored by: Dell EMC Isilon

Modified:
  head/sys/tests/callout_test/callout_test.c

Modified: head/sys/tests/callout_test/callout_test.c
==
--- head/sys/tests/callout_test/callout_test.c  Tue May  9 05:03:35 2017
(r318009)
+++ head/sys/tests/callout_test/callout_test.c  Tue May  9 05:08:47 2017
(r318010)
@@ -27,23 +27,23 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
-#include 
 #include 
-#include 
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r318008 - head/sys/modules

2017-05-08 Thread O. Hartmann
On Tue, 9 May 2017 04:59:05 + (UTC)
Ngie Cooper  wrote:

> Author: ngie
> Date: Tue May  9 04:59:05 2017
> New Revision: 318008
> URL: https://svnweb.freebsd.org/changeset/base/318008
> 
> Log:
>   Only compile tests/ if MK_TESTS != no or ALL_MODULES is defined
>   
>   MFC after:  3 weeks
>   Sponsored by:   Dell EMC Isilon
> 
> Modified:
>   head/sys/modules/Makefile
> 
> Modified: head/sys/modules/Makefile
> ==
> --- head/sys/modules/Makefile Tue May  9 04:56:14 2017(r318007)
> +++ head/sys/modules/Makefile Tue May  9 04:59:05 2017(r318008)
> @@ -356,8 +356,6 @@ SUBDIR=   \
>   sysvipc \
>   tcp \
>   ${_ti} \
> - tests/framework \
> - tests/callout_test \
>   tl \
>   tmpfs \
>   ${_toecore} \
> @@ -516,6 +514,10 @@ _rtwnfw= rtwnfw
>  _cxgbe=  cxgbe
>  .endif
>  
> +.if ${MK_TESTS} != "no" || defined(ALL_MODULES)
> +SUBDIR+= tests
> +.endif
> +
>  .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
>  SUBDIR+= zfs
>  .endif
> ___
> svn-src-h...@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"

Ooopsie ... ;-)

Something went wrong after I sucked in this commit just a few seconds ago,
compiling kernel failed:

[...]
usr/src/sys" WITH_EXTRA_TCP_STACKS="YES" make  obj
make[3]: "/usr/src/sys/modules/Makefile" line 517: Malformed conditional
(${MK_TESTS} != "no" || defined(ALL_MODULES)) make[3]: Fatal errors encountered
-- cannot continue make[3]: stopped in /usr/src/sys/modules
.ERROR_TARGET=''
.ERROR_META_FILE=''
.MAKE.LEVEL='3'
MAKEFILE=''
.MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose'
.CURDIR='/usr/src/sys/modules'
.MAKE='make'
.OBJDIR='/usr/obj/usr/src/sys/FREYJA/modules/usr/src/sys/modules'
.TARGETS='obj'
DESTDIR=''
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r318009 - head/sys/conf

2017-05-08 Thread Ngie Cooper
Author: ngie
Date: Tue May  9 05:03:35 2017
New Revision: 318009
URL: https://svnweb.freebsd.org/changeset/base/318009

Log:
  Add MK_TESTS to kern.opts.mk to support r31800
  
  MFC after:3 weeks
  MFC with: r318008
  Pointyhat to: ngie
  Sponsored by: Dell EMC Isilon

Modified:
  head/sys/conf/kern.opts.mk

Modified: head/sys/conf/kern.opts.mk
==
--- head/sys/conf/kern.opts.mk  Tue May  9 04:59:05 2017(r318008)
+++ head/sys/conf/kern.opts.mk  Tue May  9 05:03:35 2017(r318009)
@@ -41,6 +41,7 @@ __DEFAULT_YES_OPTIONS = \
 PF \
 SOURCELESS_HOST \
 SOURCELESS_UCODE \
+TESTS \
 USB_GADGET_EXAMPLES \
 ZFS
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r318008 - head/sys/modules

2017-05-08 Thread Ngie Cooper
Author: ngie
Date: Tue May  9 04:59:05 2017
New Revision: 318008
URL: https://svnweb.freebsd.org/changeset/base/318008

Log:
  Only compile tests/ if MK_TESTS != no or ALL_MODULES is defined
  
  MFC after:3 weeks
  Sponsored by: Dell EMC Isilon

Modified:
  head/sys/modules/Makefile

Modified: head/sys/modules/Makefile
==
--- head/sys/modules/Makefile   Tue May  9 04:56:14 2017(r318007)
+++ head/sys/modules/Makefile   Tue May  9 04:59:05 2017(r318008)
@@ -356,8 +356,6 @@ SUBDIR= \
sysvipc \
tcp \
${_ti} \
-   tests/framework \
-   tests/callout_test \
tl \
tmpfs \
${_toecore} \
@@ -516,6 +514,10 @@ _rtwnfw=   rtwnfw
 _cxgbe=cxgbe
 .endif
 
+.if ${MK_TESTS} != "no" || defined(ALL_MODULES)
+SUBDIR+=   tests
+.endif
+
 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
 SUBDIR+=   zfs
 .endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r318007 - head/sys/modules/tests

2017-05-08 Thread Ngie Cooper
Author: ngie
Date: Tue May  9 04:56:14 2017
New Revision: 318007
URL: https://svnweb.freebsd.org/changeset/base/318007

Log:
  Add intermediary Makefile for compiling all items in the directory
  
  MFC after:3 weeks
  Sponsored by: Dell EMC Isilon

Added:
  head/sys/modules/tests/Makefile   (contents, props changed)

Added: head/sys/modules/tests/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/modules/tests/Makefile Tue May  9 04:56:14 2017
(r318007)
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+SUBDIR+=   framework
+SUBDIR+=   .WAIT
+SUBDIR+=   callout_test
+
+.include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r318006 - head/sys/tests/framework

2017-05-08 Thread Ngie Cooper
Author: ngie
Date: Tue May  9 04:54:29 2017
New Revision: 318006
URL: https://svnweb.freebsd.org/changeset/base/318006

Log:
  style(9): sort headers and remove duplicates
  
  MFC after:3 weeks
  Sponsored by: Dell EMC Isilon

Modified:
  head/sys/tests/framework/kern_testfrwk.c

Modified: head/sys/tests/framework/kern_testfrwk.c
==
--- head/sys/tests/framework/kern_testfrwk.cTue May  9 04:15:07 2017
(r318005)
+++ head/sys/tests/framework/kern_testfrwk.cTue May  9 04:54:29 2017
(r318006)
@@ -27,22 +27,20 @@
 #include 
 __FBSDID("$FreeBSD$");
 
-#include 
-#include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
+#include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #ifdef SMP
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r318005 - head/sys/dev/iwm

2017-05-08 Thread Adrian Chadd
Author: adrian
Date: Tue May  9 04:15:07 2017
New Revision: 318005
URL: https://svnweb.freebsd.org/changeset/base/318005

Log:
  [iwm] Add basic powermanagement support via ifconfig wlan0 powersave.
  
  * The DEVICE_POWER_FLAGS_CAM_MSK flag was removed in the upstream iwlwifi
in Linux commit ceef91c89480dd18bb3ac51e91280a233d0ca41f.
  
  * Add sc_ps_disabled flag to struct iwm_softc, which corresponds to
mvm->ps_disabled in struct iwl_mvm in Linux iwlwifi.
  
  * Adds a hw.iwm.power_scheme tunable which corresponds to the power_scheme
module parameter in Linux iwlwifi. Set this to 1 for completely
disabling power management, 2 (default) for balanced powermanagement,
and 3 for lowerpower mode (which does dtim period skipping).
  
  * Imports the constants.h file from iwlwifi as if_iwm_constants.h.
  
  * This doesn't allow changing the powermanagement setting while connected,
also one can only choose between enabled and disabled powersaving with
ifconfig (so switching between balanced and low-power mode requires
rebooting to change the tunable).
  
  * After any changes to powermanagement (i.e. "ifconfig wlan0 powersave" to
enable powermanagement, or "ifconfig wlan0 -powersave" for disabling
powermanagement), one has to disconnect and reconnect to the accespoint
for the change to take effect.
  
  Obtained from:dragonflybsd.git 
d7002a7990d077c92585978ea998474af50f91e0

Added:
  head/sys/dev/iwm/if_iwm_constants.h   (contents, props changed)
Modified:
  head/sys/dev/iwm/if_iwm.c
  head/sys/dev/iwm/if_iwm_power.c
  head/sys/dev/iwm/if_iwm_power.h
  head/sys/dev/iwm/if_iwmreg.h
  head/sys/dev/iwm/if_iwmvar.h

Modified: head/sys/dev/iwm/if_iwm.c
==
--- head/sys/dev/iwm/if_iwm.c   Tue May  9 04:11:53 2017(r318004)
+++ head/sys/dev/iwm/if_iwm.c   Tue May  9 04:15:07 2017(r318005)
@@ -4171,6 +4171,12 @@ iwm_auth(struct ieee80211vap *vap, struc
"%s: failed to add MAC\n", __func__);
goto out;
}
+   if ((error = iwm_mvm_power_update_mac(sc)) != 0) {
+   device_printf(sc->sc_dev,
+   "%s: failed to update power management\n",
+   __func__);
+   goto out;
+   }
if ((error = iwm_mvm_phy_ctxt_changed(sc, &sc->sc_phyctxt[0],
in->in_ni.ni_chan, 1, 1)) != 0) {
device_printf(sc->sc_dev,
@@ -4582,8 +4588,8 @@ iwm_newstate(struct ieee80211vap *vap, e
}
 
in = IWM_NODE(vap->iv_bss);
-   iwm_mvm_power_mac_update_mode(sc, in);
iwm_mvm_enable_beacon_filter(sc, in);
+   iwm_mvm_power_update_mac(sc);
iwm_mvm_update_quotas(sc, in);
iwm_setrates(sc, in);
 
@@ -4871,6 +4877,7 @@ iwm_init_hw(struct iwm_softc *sc)
 * image just loaded
 */
iwm_stop_device(sc);
+   sc->sc_ps_disabled = FALSE;
if ((error = iwm_start_hw(sc)) != 0) {
device_printf(sc->sc_dev, "could not initialize hardware\n");
return error;
@@ -6122,6 +6129,7 @@ iwm_attach(device_t dev)
IEEE80211_C_STA |
IEEE80211_C_WPA |   /* WPA/RSN */
IEEE80211_C_WME |
+   IEEE80211_C_PMGT |
IEEE80211_C_SHSLOT |/* short slot time supported */
IEEE80211_C_SHPREAMBLE  /* short preamble supported */
 // IEEE80211_C_BGSCAN  /* capable of bg scanning */

Added: head/sys/dev/iwm/if_iwm_constants.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/iwm/if_iwm_constants.h Tue May  9 04:15:07 2017
(r318005)
@@ -0,0 +1,154 @@
+/*-
+ * Based on BSD-licensed source modules in the Linux iwlwifi driver,
+ * which were used as the reference documentation for this implementation.
+ *
+ **
+ *
+ * This file is provided under a dual BSD/GPLv2 license.  When using or
+ * redistributing this file, you may do so under either license.
+ *
+ * GPL LICENSE SUMMARY
+ *
+ * Copyright(c) 2013 - 2014 Intel Corporation. All rights reserved.
+ * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
+ * Copyright(c) 2015Intel Deutschland GmbH
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public Lice

svn commit: r318004 - head/contrib/netbsd-tests/usr.bin/grep

2017-05-08 Thread Ngie Cooper
Author: ngie
Date: Tue May  9 04:11:53 2017
New Revision: 318004
URL: https://svnweb.freebsd.org/changeset/base/318004

Log:
  Remove expected failure that no longer fails with gnu grep in base
  
  Reported by:  Jenkins
  Submitted by: Kyle Evans 
  Sponsored by: Dell EMC Isilon

Modified:
  head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh

Modified: head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh
==
--- head/contrib/netbsd-tests/usr.bin/grep/t_grep.shTue May  9 02:42:53 
2017(r318003)
+++ head/contrib/netbsd-tests/usr.bin/grep/t_grep.shTue May  9 04:11:53 
2017(r318004)
@@ -399,11 +399,6 @@ wflag_emptypat_head()
 }
 wflag_emptypat_body()
 {
-   grep_type
-   if [ $? -eq $GREP_TYPE_GNU_FREEBSD ]; then
-   atf_expect_fail "this test does not pass with GNU grep in base"
-   fi
-
printf "" > test1
printf "\n" > test2
printf "qaz" > test3
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r318003 - head/sys/dev/iwm

2017-05-08 Thread Adrian Chadd
Author: adrian
Date: Tue May  9 02:42:53 2017
New Revision: 318003
URL: https://svnweb.freebsd.org/changeset/base/318003

Log:
  [iwm] Add iwm_nic_unlock() calls missing from previous commit.
  
  Obtained from:dragonflybsd.git 
f88ab372284e63c4c13da93e9026a203b9b4cdc5

Modified:
  head/sys/dev/iwm/if_iwm.c
  head/sys/dev/iwm/if_iwm_pcie_trans.c

Modified: head/sys/dev/iwm/if_iwm.c
==
--- head/sys/dev/iwm/if_iwm.c   Tue May  9 02:41:33 2017(r318002)
+++ head/sys/dev/iwm/if_iwm.c   Tue May  9 02:42:53 2017(r318003)
@@ -1327,6 +1327,7 @@ iwm_stop_device(struct iwm_softc *sc)
if (iwm_nic_lock(sc)) {
iwm_write_prph(sc, IWM_APMG_CLK_DIS_REG,
IWM_APMG_CLK_VAL_DMA_CLK_RQT);
+   iwm_nic_unlock(sc);
}
DELAY(5);
}
@@ -2597,6 +2598,7 @@ iwm_pcie_load_given_ucode(struct iwm_sof
iwm_write_prph(sc,
   IWM_LMPM_SECURE_UCODE_LOAD_CPU2_HDR_ADDR,
   IWM_LMPM_SECURE_CPU2_HDR_MEM_SPACE);
+   iwm_nic_unlock(sc);
}
 
/* load to FW the binary sections of CPU2 */
@@ -2629,6 +2631,7 @@ iwm_pcie_load_given_ucode_8000(struct iw
if (iwm_nic_lock(sc)) {
iwm_write_prph(sc, IWM_RELEASE_CPU_RESET,
IWM_RELEASE_CPU_RESET_BIT);
+   iwm_nic_unlock(sc);
}
 
/* load to FW the binary Secured sections of CPU1 */
@@ -2887,6 +2890,7 @@ iwm_mvm_load_ucode_wait_alive(struct iwm
if (iwm_nic_lock(sc)) {
a = iwm_read_prph(sc, IWM_SB_CPU_1_STATUS);
b = iwm_read_prph(sc, IWM_SB_CPU_2_STATUS);
+   iwm_nic_unlock(sc);
}
device_printf(sc->sc_dev,
"SecBoot CPU1 Status: 0x%x, CPU2 Status: 0x%x\n",

Modified: head/sys/dev/iwm/if_iwm_pcie_trans.c
==
--- head/sys/dev/iwm/if_iwm_pcie_trans.cTue May  9 02:41:33 2017
(r318002)
+++ head/sys/dev/iwm/if_iwm_pcie_trans.cTue May  9 02:42:53 2017
(r318003)
@@ -502,11 +502,13 @@ iwm_apm_init(struct iwm_softc *sc)
if (iwm_nic_lock(sc)) {
iwm_read_prph(sc, IWM_OSC_CLK);
iwm_read_prph(sc, IWM_OSC_CLK);
+   iwm_nic_unlock(sc);
}
iwm_set_bits_prph(sc, IWM_OSC_CLK, IWM_OSC_CLK_FORCE_CONTROL);
if (iwm_nic_lock(sc)) {
iwm_read_prph(sc, IWM_OSC_CLK);
iwm_read_prph(sc, IWM_OSC_CLK);
+   iwm_nic_unlock(sc);
}
}
 
@@ -521,6 +523,7 @@ iwm_apm_init(struct iwm_softc *sc)
if (iwm_nic_lock(sc)) {
iwm_write_prph(sc, IWM_APMG_CLK_EN_REG,
IWM_APMG_CLK_VAL_DMA_CLK_RQT);
+   iwm_nic_unlock(sc);
}
DELAY(20);
 
@@ -532,6 +535,7 @@ iwm_apm_init(struct iwm_softc *sc)
if (iwm_nic_lock(sc)) {
iwm_write_prph(sc, IWM_APMG_RTC_INT_STT_REG,
IWM_APMG_RTC_INT_STT_RFKILL);
+   iwm_nic_unlock(sc);
}
}
  out:
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r318002 - head/sys/dev/iwm

2017-05-08 Thread Adrian Chadd
Author: adrian
Date: Tue May  9 02:41:33 2017
New Revision: 318002
URL: https://svnweb.freebsd.org/changeset/base/318002

Log:
  [iwm] iwm_{read,write}_prph() don't grab the nic lock in iwm themselves.
  
  * Fix a couple of cases where the nic lock ended up not being grabbed
during an iwm_read_prph() or iwm_write_prph().
  
  Obtained from:dragonflybsd.git 
6c5470f2db219c61e362c981fea969d97e1b8293

Modified:
  head/sys/dev/iwm/if_iwm.c
  head/sys/dev/iwm/if_iwm_pcie_trans.c

Modified: head/sys/dev/iwm/if_iwm.c
==
--- head/sys/dev/iwm/if_iwm.c   Tue May  9 02:38:23 2017(r318001)
+++ head/sys/dev/iwm/if_iwm.c   Tue May  9 02:41:33 2017(r318002)
@@ -1294,9 +1294,9 @@ iwm_stop_device(struct iwm_softc *sc)
 
/* stop tx and rx.  tx and rx bits, as usual, are from if_iwn */
 
-   iwm_write_prph(sc, IWM_SCD_TXFACT, 0);
-
if (iwm_nic_lock(sc)) {
+   iwm_write_prph(sc, IWM_SCD_TXFACT, 0);
+
/* Stop each Tx DMA channel */
for (chnl = 0; chnl < IWM_FH_TCSR_CHNL_NUM; chnl++) {
IWM_WRITE(sc,
@@ -1324,8 +1324,10 @@ iwm_stop_device(struct iwm_softc *sc)
 
if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) {
/* Power-down device's busmaster DMA clocks */
-   iwm_write_prph(sc, IWM_APMG_CLK_DIS_REG,
-   IWM_APMG_CLK_VAL_DMA_CLK_RQT);
+   if (iwm_nic_lock(sc)) {
+   iwm_write_prph(sc, IWM_APMG_CLK_DIS_REG,
+   IWM_APMG_CLK_VAL_DMA_CLK_RQT);
+   }
DELAY(5);
}
 
@@ -1622,8 +1624,6 @@ iwm_trans_pcie_fw_alive(struct iwm_softc
 
iwm_ict_reset(sc);
 
-   iwm_nic_unlock(sc);
-
sc->scd_base_addr = iwm_read_prph(sc, IWM_SCD_SRAM_BASE_ADDR);
if (scd_base_addr != 0 &&
scd_base_addr != sc->scd_base_addr) {
@@ -1632,6 +1632,8 @@ iwm_trans_pcie_fw_alive(struct iwm_softc
__func__, sc->scd_base_addr, scd_base_addr);
}
 
+   iwm_nic_unlock(sc);
+
/* reset context data, TX status and translation data */
error = iwm_write_mem(sc,
sc->scd_base_addr + IWM_SCD_CONTEXT_MEM_LOWER_BOUND,
@@ -2591,9 +2593,11 @@ iwm_pcie_load_given_ucode(struct iwm_sof
 
if (image->is_dual_cpus) {
/* set CPU2 header address */
-iwm_write_prph(sc,
-  IWM_LMPM_SECURE_UCODE_LOAD_CPU2_HDR_ADDR,
-  IWM_LMPM_SECURE_CPU2_HDR_MEM_SPACE);
+   if (iwm_nic_lock(sc)) {
+   iwm_write_prph(sc,
+  IWM_LMPM_SECURE_UCODE_LOAD_CPU2_HDR_ADDR,
+  IWM_LMPM_SECURE_CPU2_HDR_MEM_SPACE);
+   }
 
/* load to FW the binary sections of CPU2 */
ret = iwm_pcie_load_cpu_sections(sc, image, 2,
@@ -2622,7 +2626,10 @@ iwm_pcie_load_given_ucode_8000(struct iw
 
/* configure the ucode to be ready to get the secured image */
/* release CPU reset */
-   iwm_write_prph(sc, IWM_RELEASE_CPU_RESET, IWM_RELEASE_CPU_RESET_BIT);
+   if (iwm_nic_lock(sc)) {
+   iwm_write_prph(sc, IWM_RELEASE_CPU_RESET,
+   IWM_RELEASE_CPU_RESET_BIT);
+   }
 
/* load to FW the binary Secured sections of CPU1 */
ret = iwm_pcie_load_cpu_sections_8000(sc, image, 1,
@@ -2876,10 +2883,14 @@ iwm_mvm_load_ucode_wait_alive(struct iwm
IWM_LOCK(sc);
if (error) {
if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) {
+   uint32_t a = 0x5a5a5a5a, b = 0x5a5a5a5a;
+   if (iwm_nic_lock(sc)) {
+   a = iwm_read_prph(sc, IWM_SB_CPU_1_STATUS);
+   b = iwm_read_prph(sc, IWM_SB_CPU_2_STATUS);
+   }
device_printf(sc->sc_dev,
"SecBoot CPU1 Status: 0x%x, CPU2 Status: 0x%x\n",
-   iwm_read_prph(sc, IWM_SB_CPU_1_STATUS),
-   iwm_read_prph(sc, IWM_SB_CPU_2_STATUS));
+   a, b);
}
sc->cur_ucode = old_type;
return error;

Modified: head/sys/dev/iwm/if_iwm_pcie_trans.c
==
--- head/sys/dev/iwm/if_iwm_pcie_trans.cTue May  9 02:38:23 2017
(r318001)
+++ head/sys/dev/iwm/if_iwm_pcie_trans.cTue May  9 02:41:33 2017
(r318002)
@@ -499,11 +499,15 @@ iwm_apm_init(struct iwm_softc *sc)
 * just to discard the value. But that's the way the hardware
 * seems to like it.
 */
-   iwm_read_prph(sc, IWM_OSC_CLK);
-   iwm_read_prph(sc, IWM_OSC_CLK)

svn commit: r318001 - head/sys/dev/iwm

2017-05-08 Thread Adrian Chadd
Author: adrian
Date: Tue May  9 02:38:23 2017
New Revision: 318001
URL: https://svnweb.freebsd.org/changeset/base/318001

Log:
  [iwm] include opt_iwm.h and opt_wlan.h consistently in all files.

Modified:
  head/sys/dev/iwm/if_iwm.c
  head/sys/dev/iwm/if_iwm_7000.c
  head/sys/dev/iwm/if_iwm_8000.c
  head/sys/dev/iwm/if_iwm_binding.c
  head/sys/dev/iwm/if_iwm_fw.c
  head/sys/dev/iwm/if_iwm_led.c
  head/sys/dev/iwm/if_iwm_mac_ctxt.c
  head/sys/dev/iwm/if_iwm_notif_wait.c
  head/sys/dev/iwm/if_iwm_pcie_trans.c
  head/sys/dev/iwm/if_iwm_phy_ctxt.c
  head/sys/dev/iwm/if_iwm_phy_db.c
  head/sys/dev/iwm/if_iwm_power.c
  head/sys/dev/iwm/if_iwm_scan.c
  head/sys/dev/iwm/if_iwm_time_event.c
  head/sys/dev/iwm/if_iwm_util.c

Modified: head/sys/dev/iwm/if_iwm.c
==
--- head/sys/dev/iwm/if_iwm.c   Tue May  9 01:48:23 2017(r318000)
+++ head/sys/dev/iwm/if_iwm.c   Tue May  9 02:38:23 2017(r318001)
@@ -106,6 +106,7 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_wlan.h"
+#include "opt_iwm.h"
 
 #include 
 #include 

Modified: head/sys/dev/iwm/if_iwm_7000.c
==
--- head/sys/dev/iwm/if_iwm_7000.c  Tue May  9 01:48:23 2017
(r318000)
+++ head/sys/dev/iwm/if_iwm_7000.c  Tue May  9 02:38:23 2017
(r318001)
@@ -72,6 +72,9 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_wlan.h"
+#include "opt_iwm.h"
+
 #include 
 
 #include "if_iwm_config.h"

Modified: head/sys/dev/iwm/if_iwm_8000.c
==
--- head/sys/dev/iwm/if_iwm_8000.c  Tue May  9 01:48:23 2017
(r318000)
+++ head/sys/dev/iwm/if_iwm_8000.c  Tue May  9 02:38:23 2017
(r318001)
@@ -71,6 +71,9 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_wlan.h"
+#include "opt_iwm.h"
+
 #include 
 
 #include "if_iwm_config.h"

Modified: head/sys/dev/iwm/if_iwm_binding.c
==
--- head/sys/dev/iwm/if_iwm_binding.c   Tue May  9 01:48:23 2017
(r318000)
+++ head/sys/dev/iwm/if_iwm_binding.c   Tue May  9 02:38:23 2017
(r318001)
@@ -106,6 +106,7 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_wlan.h"
+#include "opt_iwm.h"
 
 #include 
 #include 

Modified: head/sys/dev/iwm/if_iwm_fw.c
==
--- head/sys/dev/iwm/if_iwm_fw.cTue May  9 01:48:23 2017
(r318000)
+++ head/sys/dev/iwm/if_iwm_fw.cTue May  9 02:38:23 2017
(r318001)
@@ -74,6 +74,7 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_wlan.h"
+#include "opt_iwm.h"
 
 #include 
 #include 

Modified: head/sys/dev/iwm/if_iwm_led.c
==
--- head/sys/dev/iwm/if_iwm_led.c   Tue May  9 01:48:23 2017
(r318000)
+++ head/sys/dev/iwm/if_iwm_led.c   Tue May  9 02:38:23 2017
(r318001)
@@ -89,6 +89,9 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_wlan.h"
+#include "opt_iwm.h"
+
 #include 
 #include 
 #include 

Modified: head/sys/dev/iwm/if_iwm_mac_ctxt.c
==
--- head/sys/dev/iwm/if_iwm_mac_ctxt.c  Tue May  9 01:48:23 2017
(r318000)
+++ head/sys/dev/iwm/if_iwm_mac_ctxt.c  Tue May  9 02:38:23 2017
(r318001)
@@ -106,6 +106,7 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_wlan.h"
+#include "opt_iwm.h"
 
 #include 
 #include 

Modified: head/sys/dev/iwm/if_iwm_notif_wait.c
==
--- head/sys/dev/iwm/if_iwm_notif_wait.cTue May  9 01:48:23 2017
(r318000)
+++ head/sys/dev/iwm/if_iwm_notif_wait.cTue May  9 02:38:23 2017
(r318001)
@@ -70,6 +70,7 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_wlan.h"
+#include "opt_iwm.h"
 
 #include 
 #include 

Modified: head/sys/dev/iwm/if_iwm_pcie_trans.c
==
--- head/sys/dev/iwm/if_iwm_pcie_trans.cTue May  9 01:48:23 2017
(r318000)
+++ head/sys/dev/iwm/if_iwm_pcie_trans.cTue May  9 02:38:23 2017
(r318001)
@@ -106,6 +106,7 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_wlan.h"
+#include "opt_iwm.h"
 
 #include 
 #include 

Modified: head/sys/dev/iwm/if_iwm_phy_ctxt.c
==
--- head/sys/dev/iwm/if_iwm_phy_ctxt.c  Tue May  9 01:48:23 2017
(r318000)
+++ head/sys/dev/iwm/if_iwm_phy_ctxt.c  Tue May  9 02:38:23 2017
(r318001)
@@ -106,6 +106,7 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_wlan.h"
+#include "opt_iwm.h"
 
 #include 
 #include 

Modified: head/sys/dev/iwm/if_iwm_phy_db.c
==
--- head/sys/dev/iwm/if_iwm_ph

svn commit: r318000 - in head: bin/dd lib/libbsnmp/libbsnmp lib/libsysdecode libexec/dma/dma-mbox-create rescue/rescue sbin/dumpon sbin/hastctl sbin/hastd sys/boot/i386/loader sys/boot/i386/zfsload...

2017-05-08 Thread Bryan Drewery
Author: bdrewery
Date: Tue May  9 01:48:23 2017
New Revision: 318000
URL: https://svnweb.freebsd.org/changeset/base/318000

Log:
  DIRDEPS_BUILD: Update dependencies.
  
  Sponsored by: Dell EMC Isilon

Modified:
  head/bin/dd/Makefile.depend
  head/lib/libbsnmp/libbsnmp/Makefile.depend
  head/lib/libsysdecode/Makefile.depend
  head/libexec/dma/dma-mbox-create/Makefile.depend
  head/rescue/rescue/Makefile.depend
  head/sbin/dumpon/Makefile.depend
  head/sbin/hastctl/Makefile.depend
  head/sbin/hastd/Makefile.depend
  head/sys/boot/i386/loader/Makefile.depend
  head/sys/boot/i386/zfsloader/Makefile.depend
  head/usr.bin/fold/Makefile.depend
  head/usr.bin/grep/Makefile.depend
  head/usr.bin/hexdump/Makefile.depend
  head/usr.bin/iconv/Makefile.depend
  head/usr.bin/ident/Makefile.depend
  head/usr.bin/ktrdump/Makefile.depend
  head/usr.bin/lam/Makefile.depend
  head/usr.bin/last/Makefile.depend
  head/usr.bin/ministat/Makefile.depend
  head/usr.bin/pom/Makefile.depend
  head/usr.sbin/amd/amq/Makefile.depend
  head/usr.sbin/amd/fixmount/Makefile.depend
  head/usr.sbin/amd/fsinfo/Makefile.depend
  head/usr.sbin/amd/hlfsd/Makefile.depend
  head/usr.sbin/amd/libamu/Makefile.depend
  head/usr.sbin/amd/mk-amd-map/Makefile.depend
  head/usr.sbin/amd/pawd/Makefile.depend
  head/usr.sbin/amd/wire-test/Makefile.depend
  head/usr.sbin/arp/Makefile.depend
  head/usr.sbin/bhyve/Makefile.depend
  head/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile.depend
  head/usr.sbin/rpc.statd/Makefile.depend
  head/usr.sbin/traceroute/Makefile.depend

Modified: head/bin/dd/Makefile.depend
==
--- head/bin/dd/Makefile.depend Tue May  9 01:48:14 2017(r317999)
+++ head/bin/dd/Makefile.depend Tue May  9 01:48:23 2017(r318000)
@@ -8,6 +8,7 @@ DIRDEPS = \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
+   lib/libcapsicum \
lib/libcompiler_rt \
 
 

Modified: head/lib/libbsnmp/libbsnmp/Makefile.depend
==
--- head/lib/libbsnmp/libbsnmp/Makefile.depend  Tue May  9 01:48:14 2017
(r317999)
+++ head/lib/libbsnmp/libbsnmp/Makefile.depend  Tue May  9 01:48:23 2017
(r318000)
@@ -5,6 +5,7 @@ DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
+   include/arpa \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \

Modified: head/lib/libsysdecode/Makefile.depend
==
--- head/lib/libsysdecode/Makefile.depend   Tue May  9 01:48:14 2017
(r317999)
+++ head/lib/libsysdecode/Makefile.depend   Tue May  9 01:48:23 2017
(r318000)
@@ -3,13 +3,128 @@
 
 DIRDEPS = \
gnu/lib/csu \
+   gnu/lib/libdialog \
gnu/lib/libgcc \
+   gnu/lib/libgomp \
+   gnu/lib/libregex \
+   gnu/lib/libssp \
+   gnu/lib/libstdc++ \
+   gnu/lib/libsupc++ \
include \
+   include/arpa \
+   include/gssapi \
+   include/protocols \
include/rpc \
+   include/rpcsvc \
include/xlocale \
+   kerberos5/lib/libasn1 \
+   kerberos5/lib/libgssapi_krb5 \
+   kerberos5/lib/libhdb \
+   kerberos5/lib/libheimbase \
+   kerberos5/lib/libheimntlm \
+   kerberos5/lib/libhx509 \
+   kerberos5/lib/libkadm5clnt \
+   kerberos5/lib/libkafs5 \
+   kerberos5/lib/libkdc \
+   kerberos5/lib/libkrb5 \
+   kerberos5/lib/libroken \
+   kerberos5/lib/libwind \
lib/${CSU_DIR} \
+   lib/atf/libatf-c \
+   lib/lib80211 \
+   lib/libalias/libalias \
+   lib/libarchive \
+   lib/libbegemot \
+   lib/libblacklist \
+   lib/libblocksruntime \
+   lib/libbluetooth \
+   lib/libbsdstat \
+   lib/libbsm \
+   lib/libbsnmp/libbsnmp \
+   lib/libbz2 \
lib/libc \
+   lib/libc++ \
+   lib/libcalendar \
+   lib/libcam \
+   lib/libcapsicum \
+   lib/libcasper/libcasper \
+   lib/libcasper/services/cap_dns \
+   lib/libcasper/services/cap_grp \
+   lib/libcasper/services/cap_pwd \
+   lib/libcasper/services/cap_random \
+   lib/libcasper/services/cap_sysctl \
+   lib/libcom_err \
lib/libcompiler_rt \
+   lib/libcuse \
+   lib/libdevctl \
+   lib/libdevdctl \
+   lib/libdevinfo \
+   lib/libdevstat \
+   lib/libdpv \
+   lib/libdwarf \
+   lib/libedit \
+   lib/libedit/edit/readline \
+   lib/libefivar \
+   lib/libelf \
+   lib/libelftc \
+   lib/libevent \
+   lib/libexecinfo \
+   lib/libexpat \
+   lib/libfetch \
+   lib/libfigpar \
+   lib/libgeom \
+   lib/libgpio \
+   lib/libjail \
+   lib/libkvm \
+   lib/liblzma \
+   lib/libmagic \
+   lib/libmd \
+   lib/libmemstat \
+   lib/libmilter \
+   lib/libmp \
+   lib/libmt \

svn commit: r317999 - in head: lib/libzstd sbin/decryptcore share/doc/pjdfstest targets/pseudo/clang targets/pseudo/userland targets/pseudo/userland/share usr.bin/getaddrinfo usr.bin/zstd usr.sbin/...

2017-05-08 Thread Bryan Drewery
Author: bdrewery
Date: Tue May  9 01:48:14 2017
New Revision: 317999
URL: https://svnweb.freebsd.org/changeset/base/317999

Log:
  DIRDEPS_BUILD: Connect new directories.
  
  Sponsored by: Dell EMC Isilon

Added:
  head/lib/libzstd/Makefile.depend   (contents, props changed)
  head/sbin/decryptcore/Makefile.depend   (contents, props changed)
  head/share/doc/pjdfstest/Makefile.depend   (contents, props changed)
  head/usr.bin/getaddrinfo/Makefile.depend   (contents, props changed)
  head/usr.bin/zstd/Makefile.depend   (contents, props changed)
  head/usr.sbin/prometheus_sysctl_exporter/Makefile.depend   (contents, props 
changed)
Modified:
  head/targets/pseudo/clang/Makefile.depend
  head/targets/pseudo/userland/Makefile.depend
  head/targets/pseudo/userland/share/Makefile.depend

Added: head/lib/libzstd/Makefile.depend
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libzstd/Makefile.dependTue May  9 01:48:14 2017
(r317999)
@@ -0,0 +1,19 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+   gnu/lib/csu \
+   gnu/lib/libgcc \
+   include \
+   include/xlocale \
+   lib/${CSU_DIR} \
+   lib/libc \
+   lib/libcompiler_rt \
+   lib/libthr \
+
+
+.include 
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif

Added: head/sbin/decryptcore/Makefile.depend
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sbin/decryptcore/Makefile.depend   Tue May  9 01:48:14 2017
(r317999)
@@ -0,0 +1,21 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+   gnu/lib/csu \
+   gnu/lib/libgcc \
+   include \
+   include/xlocale \
+   lib/${CSU_DIR} \
+   lib/libc \
+   lib/libcompiler_rt \
+   lib/libpjdlog \
+   lib/libutil \
+   secure/lib/libcrypto \
+
+
+.include 
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif

Added: head/share/doc/pjdfstest/Makefile.depend
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/doc/pjdfstest/Makefile.dependTue May  9 01:48:14 2017
(r317999)
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include 
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif

Modified: head/targets/pseudo/clang/Makefile.depend
==
--- head/targets/pseudo/clang/Makefile.depend   Tue May  9 01:48:02 2017
(r317998)
+++ head/targets/pseudo/clang/Makefile.depend   Tue May  9 01:48:14 2017
(r317999)
@@ -27,19 +27,23 @@ DIRDEPS+= \
usr.bin/clang/llvm-bcanalyzer \
usr.bin/clang/llvm-cov \
usr.bin/clang/llvm-cxxdump \
+   usr.bin/clang/llvm-cxxfilt \
usr.bin/clang/llvm-diff \
usr.bin/clang/llvm-dis \
usr.bin/clang/llvm-dwarfdump \
usr.bin/clang/llvm-extract \
usr.bin/clang/llvm-link \
usr.bin/clang/llvm-lto \
+   usr.bin/clang/llvm-lto2 \
usr.bin/clang/llvm-mc \
+   usr.bin/clang/llvm-modextract \
usr.bin/clang/llvm-nm \
usr.bin/clang/llvm-objdump \
usr.bin/clang/llvm-pdbdump \
usr.bin/clang/llvm-profdata \
usr.bin/clang/llvm-rtdyld \
usr.bin/clang/llvm-symbolizer \
+   usr.bin/clang/llvm-xray \
usr.bin/clang/opt \
 
 .endif

Modified: head/targets/pseudo/userland/Makefile.depend
==
--- head/targets/pseudo/userland/Makefile.dependTue May  9 01:48:02 
2017(r317998)
+++ head/targets/pseudo/userland/Makefile.dependTue May  9 01:48:14 
2017(r317999)
@@ -54,6 +54,7 @@ DIRDEPS+= \
sbin/clri \
sbin/comcontrol \
sbin/conscontrol \
+   sbin/decryptcore \
sbin/ddb \
sbin/devd \
sbin/devfs \
@@ -229,6 +230,7 @@ DIRDEPS+= \
usr.bin/ftp \
usr.bin/gcore \
usr.bin/gencat \
+   usr.bin/getaddrinfo \
usr.bin/getconf \
usr.bin/getent \
usr.bin/getopt \
@@ -432,6 +434,7 @@ DIRDEPS+= \
usr.bin/ypcat \
usr.bin/ypmatch \
usr.bin/ypwhich \
+   usr.bin/zstd \
usr.sbin/IPXrouted \
usr.sbin/ac \
usr.sbin/accton \
@@ -707,6 +710,7 @@ DIRDEPS+= \
usr.sbin/praliases \
usr.sbin/praudit \
usr.sbin/procctl \
+   usr.sbin/prometheus_sysctl_exporter \
usr.sbin/pstat \
usr.sbin/pw \
usr.sbin/pwd_mkdb \
@@ -801,6 +805,11 @@ DIRDEPS+= \
${DEP_RELDIR}/secure \
${DEP_RELD

svn commit: r317998 - head/secure/lib/libssh

2017-05-08 Thread Bryan Drewery
Author: bdrewery
Date: Tue May  9 01:48:02 2017
New Revision: 317998
URL: https://svnweb.freebsd.org/changeset/base/317998

Log:
  Fix invalid .o SRCS from r314527.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/secure/lib/libssh/Makefile

Modified: head/secure/lib/libssh/Makefile
==
--- head/secure/lib/libssh/Makefile Tue May  9 01:08:45 2017
(r317997)
+++ head/secure/lib/libssh/Makefile Tue May  9 01:48:02 2017
(r317998)
@@ -13,7 +13,7 @@ SRCS+=authfd.c authfile.c bufaux.c bufb
compat.c crc32.c deattack.c fatal.c hostfile.c \
log.c match.c md-sha256.c moduli.c nchan.c packet.c opacket.c \
readpass.c rsa.c ttymodes.c xmalloc.c addrmatch.c \
-   atomicio.c key.c dispatch.c mac.c uidswap.c uuencode.c misc.c utf8.o \
+   atomicio.c key.c dispatch.c mac.c uidswap.c uuencode.c misc.c utf8.c \
monitor_fdpass.c rijndael.c ssh-dss.c ssh-ecdsa.c ssh-rsa.c dh.c \
msg.c progressmeter.c dns.c entropy.c umac.c umac128.c \
ssh-pkcs11.c smult_curve25519_ref.c \
@@ -23,7 +23,7 @@ SRCS+=authfd.c authfile.c bufaux.c bufb
kex.c kexdh.c kexgex.c kexecdh.c kexc25519.c \
kexdhc.c kexgexc.c kexecdhc.c kexc25519c.c \
kexdhs.c kexgexs.c kexecdhs.c kexc25519s.c \
-   platform-pledge.c platform-tracing.o
+   platform-pledge.c platform-tracing.c
 PACKAGE=   ssh
 
 # gss-genr.c should be in $SRCS but causes linking problems, so it is
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317997 - stable/11/usr.bin/proccontrol

2017-05-08 Thread Brooks Davis
Author: brooks
Date: Tue May  9 01:08:45 2017
New Revision: 317997
URL: https://svnweb.freebsd.org/changeset/base/317997

Log:
  MFC r317706:
  
  Use MAN= rather than MK_MAN=no to not install a manpage.

Modified:
  stable/11/usr.bin/proccontrol/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.bin/proccontrol/Makefile
==
--- stable/11/usr.bin/proccontrol/Makefile  Tue May  9 01:01:41 2017
(r317996)
+++ stable/11/usr.bin/proccontrol/Makefile  Tue May  9 01:08:45 2017
(r317997)
@@ -2,6 +2,6 @@
 
 PROG=   proccontrol
 WARNS?=6
-MK_MAN=no
+MAN=
 
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317996 - head/sys/dev/qlxgbe

2017-05-08 Thread David C Somayajulu
Author: davidcs
Date: Tue May  9 01:01:41 2017
New Revision: 317996
URL: https://svnweb.freebsd.org/changeset/base/317996

Log:
  Fix bug where MTX_DEF lock was held while taskqueue_drain() was invoked.
  Check IFF_DRV_RUNNING flag is set prior to calling ql_hw_set_multi()
  
  MFC after:3 days

Modified:
  head/sys/dev/qlxgbe/ql_isr.c
  head/sys/dev/qlxgbe/ql_os.c

Modified: head/sys/dev/qlxgbe/ql_isr.c
==
--- head/sys/dev/qlxgbe/ql_isr.cTue May  9 00:51:10 2017
(r317995)
+++ head/sys/dev/qlxgbe/ql_isr.cTue May  9 01:01:41 2017
(r317996)
@@ -987,7 +987,8 @@ ql_isr(void *arg)
 
fp = &ha->tx_fp[idx];
 
-   if (fp->fp_taskqueue != NULL)
+   if ((fp->fp_taskqueue != NULL) &&
+   (ifp->if_drv_flags & IFF_DRV_RUNNING))
taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task);
 
return;

Modified: head/sys/dev/qlxgbe/ql_os.c
==
--- head/sys/dev/qlxgbe/ql_os.c Tue May  9 00:51:10 2017(r317995)
+++ head/sys/dev/qlxgbe/ql_os.c Tue May  9 01:01:41 2017(r317996)
@@ -925,7 +925,9 @@ qla_set_multi(qla_host_t *ha, uint32_t a
if_maddr_runlock(ifp);
 
QLA_LOCK(ha);
-   ret = ql_hw_set_multi(ha, mta, mcnt, add_multi);
+   if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
+   ret = ql_hw_set_multi(ha, mta, mcnt, add_multi);
+   }
QLA_UNLOCK(ha);
 
return (ret);
@@ -1031,20 +1033,16 @@ qla_ioctl(struct ifnet *ifp, u_long cmd,
QL_DPRINT4(ha, (ha->pci_dev,
"%s: %s (0x%lx)\n", __func__, "SIOCADDMULTI", cmd));
 
-   if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
-   if (qla_set_multi(ha, 1))
-   ret = EINVAL;
-   }
+   if (qla_set_multi(ha, 1))
+   ret = EINVAL;
break;
 
case SIOCDELMULTI:
QL_DPRINT4(ha, (ha->pci_dev,
"%s: %s (0x%lx)\n", __func__, "SIOCDELMULTI", cmd));
 
-   if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
-   if (qla_set_multi(ha, 0))
-   ret = EINVAL;
-   }
+   if (qla_set_multi(ha, 0))
+   ret = EINVAL;
break;
 
case SIOCSIFMEDIA:
@@ -1529,9 +1527,9 @@ qla_stop(qla_host_t *ha)
 
ha->flags.qla_interface_up = 0;
 
+   QLA_UNLOCK(ha);
qla_drain_fp_taskqueues(ha);
-
-   ql_hw_stop_rcv(ha);
+   QLA_LOCK(ha);
 
ql_del_hw_if(ha);
 
@@ -1922,8 +1920,6 @@ qla_error_recovery(void *context, int pe
ha->hw.imd_compl = 1;
qla_mdelay(__func__, 300);
 
-   ql_hw_stop_rcv(ha);
-
ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING);
 
for (i = 0; i < ha->hw.num_sds_rings; i++) {
@@ -1943,6 +1939,8 @@ qla_error_recovery(void *context, int pe
 
 QLA_UNLOCK(ha);
 
+   qla_drain_fp_taskqueues(ha);
+
if ((ha->pci_func & 0x1) == 0) {
 
if (!ha->msg_from_peer) {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317995 - stable/10/sys/dev/ixgbe

2017-05-08 Thread Eric Joyner
Author: erj
Date: Tue May  9 00:51:10 2017
New Revision: 317995
URL: https://svnweb.freebsd.org/changeset/base/317995

Log:
  ixv(4): Fix more tinderbox builds by adding missing declarations.
  
  Sponsored by: Intel Corporation

Modified:
  stable/10/sys/dev/ixgbe/ixv_osdep.h

Modified: stable/10/sys/dev/ixgbe/ixv_osdep.h
==
--- stable/10/sys/dev/ixgbe/ixv_osdep.h Tue May  9 00:29:29 2017
(r317994)
+++ stable/10/sys/dev/ixgbe/ixv_osdep.h Tue May  9 00:51:10 2017
(r317995)
@@ -162,6 +162,12 @@ struct ixgbe_osdep
 struct ixgbe_hw; 
 
 /* These routines are needed by the shared code */
+extern u16 ixv_read_pci_cfg(struct ixgbe_hw *, u32);
+#define IXGBE_READ_PCIE_WORD ixv_read_pci_cfg
+
+extern void ixv_write_pci_cfg(struct ixgbe_hw *, u32, u16);
+#define IXGBE_WRITE_PCIE_WORD ixv_write_pci_cfg
+
 #define IXGBE_WRITE_FLUSH(a) IXGBE_READ_REG(a, IXGBE_STATUS)
 
 extern u32 ixv_read_reg(struct ixgbe_hw *, u32);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317994 - stable/11/sys/boot/fdt

2017-05-08 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Tue May  9 00:29:29 2017
New Revision: 317994
URL: https://svnweb.freebsd.org/changeset/base/317994

Log:
  MFC r315019:
  
  [loader][fdt] Fix applying overlays without __local_fixups__ node
  
  Do not return error if __local_fixups__ node is missing in DTB overlay
  because local fixup data is optional.
  
  Reported by:  Manuel Stuhn

Modified:
  stable/11/sys/boot/fdt/fdt_overlay.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/boot/fdt/fdt_overlay.c
==
--- stable/11/sys/boot/fdt/fdt_overlay.cMon May  8 23:57:54 2017
(r317993)
+++ stable/11/sys/boot/fdt/fdt_overlay.cTue May  9 00:29:29 2017
(r317994)
@@ -358,21 +358,26 @@ static int
 fdt_overlay_do_local_fixups(void *main_fdtp, void *overlay_fdtp)
 {
int overlay_local_fixups_o;
-   int len;
+   int len, rv;
const char *fixups;
uint32_t phandle_offset;
 
overlay_local_fixups_o = fdt_path_offset(overlay_fdtp, 
"/__local_fixups__");
 
-   if (overlay_local_fixups_o < 0)
-   return (-1);
+   if (overlay_local_fixups_o < 0) {
+   /* If not local fixups - do nothing */
+   if (overlay_local_fixups_o == -FDT_ERR_NOTFOUND)
+   return (0);
+   return (overlay_local_fixups_o);
+   }
 
phandle_offset = fdt_max_phandle(main_fdtp);
fdt_increase_phandles(overlay_fdtp, phandle_offset);
fixups = fdt_getprop_w(overlay_fdtp, overlay_local_fixups_o, "fixup", 
&len);
if (fixups) {
-   if (fdt_do_local_fixup(overlay_fdtp, fixups, len, 
phandle_offset) < 0)
-   return (-1);
+   rv = fdt_do_local_fixup(overlay_fdtp, fixups, len, 
phandle_offset);
+   if (rv < 0)
+   return (rv);
}
 
return (0);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317993 - stable/11/gnu/usr.bin/dtc

2017-05-08 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Mon May  8 23:57:54 2017
New Revision: 317993
URL: https://svnweb.freebsd.org/changeset/base/317993

Log:
  MFC r315010:
  
  [dtc] regenerate version file if upstream Makefile has been changed
  
  Keep version file in sync by adding dependency to upstream Makefile

Modified:
  stable/11/gnu/usr.bin/dtc/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/gnu/usr.bin/dtc/Makefile
==
--- stable/11/gnu/usr.bin/dtc/Makefile  Mon May  8 22:44:16 2017
(r317992)
+++ stable/11/gnu/usr.bin/dtc/Makefile  Mon May  8 23:57:54 2017
(r317993)
@@ -34,7 +34,7 @@ OBJS+= dtc-parser.tab.o dtc-lexer.lex.o
 CLEANFILES+= dtc-parser.tab.o dtc-lexer.lex.o dtc-parser.tab.c \
dtc-parser.tab.h dtc-lexer.lex.c ${DTCVERSIONFILE}
 
-${DTCVERSIONFILE}:
+${DTCVERSIONFILE}: ${DTCDIR}/Makefile
@echo '#define DTC_VERSION "DTC ${DTCVERSION}"' > ${DTCVERSIONFILE}
 
 dtc-parser.tab.o:  dtc-parser.tab.c dtc-parser.tab.h
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r317967 - in head/usr.sbin/makefs: . ffs

2017-05-08 Thread Ed Maste
On 8 May 2017 at 14:42, Ngie Cooper  wrote:
> Author: ngie
> Date: Mon May  8 18:42:38 2017
> New Revision: 317967
> URL: https://svnweb.freebsd.org/changeset/base/317967
>
> Log:
>   Restore `sectorsize` global to unbreak makefs after r317744
>
>   This also unbreaks the fstyp tests.

Sorry about that and thank you for reverting that piece. I suppose it
must have been fixed by further WIP in my branch, and I missed it
while trying to commit independent changes.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317992 - stable/9/sys/dev/qlxgbe

2017-05-08 Thread David C Somayajulu
Author: davidcs
Date: Mon May  8 22:44:16 2017
New Revision: 317992
URL: https://svnweb.freebsd.org/changeset/base/317992

Log:
  MFC r317180
  Cleanup QLA_LOCK/QLA_UNLOCK macros
  remove unused QLA_TX_LOCK/QLA_TX_UNLOCK macros
  format qla_error_recovery()

Modified:
  stable/9/sys/dev/qlxgbe/ql_hw.c
  stable/9/sys/dev/qlxgbe/ql_ioctl.c
  stable/9/sys/dev/qlxgbe/ql_os.c
  stable/9/sys/dev/qlxgbe/ql_os.h
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)

Modified: stable/9/sys/dev/qlxgbe/ql_hw.c
==
--- stable/9/sys/dev/qlxgbe/ql_hw.c Mon May  8 22:41:13 2017
(r317991)
+++ stable/9/sys/dev/qlxgbe/ql_hw.c Mon May  8 22:44:16 2017
(r317992)
@@ -183,9 +183,9 @@ qla_sysctl_stop_pegs(SYSCTL_HANDLER_ARGS
 
if (ret == 1) {
ha = (qla_host_t *)arg1;
-   (void)QLA_LOCK(ha, __func__, 0);
+   QLA_LOCK(ha);
qla_stop_pegs(ha);  
-   QLA_UNLOCK(ha, __func__);
+   QLA_UNLOCK(ha);
}
 
return err;

Modified: stable/9/sys/dev/qlxgbe/ql_ioctl.c
==
--- stable/9/sys/dev/qlxgbe/ql_ioctl.c  Mon May  8 22:41:13 2017
(r317991)
+++ stable/9/sys/dev/qlxgbe/ql_ioctl.c  Mon May  8 22:44:16 2017
(r317992)
@@ -233,10 +233,10 @@ ql_eioctl(struct cdev *dev, u_long cmd, 
break;
}
 
-   (void)QLA_LOCK(ha, __func__, 0);
+   QLA_LOCK(ha);
if (!ha->hw.mdump_done)
ha->qla_initiate_recovery = 1;
-   QLA_UNLOCK(ha, __func__);
+   QLA_UNLOCK(ha);

 #define QLNX_DUMP_WAIT_SECS30
 
@@ -254,9 +254,9 @@ ql_eioctl(struct cdev *dev, u_long cmd, 
break;
}

-   (void)QLA_LOCK(ha, __func__, 0);
+   QLA_LOCK(ha);
ha->hw.mdump_done = 0;
-   QLA_UNLOCK(ha, __func__);
+   QLA_UNLOCK(ha);
 
if ((rval = copyout(ha->hw.mdump_template,
fw_dump->minidump, ha->hw.mdump_template_size))) {

Modified: stable/9/sys/dev/qlxgbe/ql_os.c
==
--- stable/9/sys/dev/qlxgbe/ql_os.c Mon May  8 22:41:13 2017
(r317991)
+++ stable/9/sys/dev/qlxgbe/ql_os.c Mon May  8 22:44:16 2017
(r317992)
@@ -519,9 +519,9 @@ qla_pci_detach(device_t dev)
 
ifp = ha->ifp;
 
-   (void)QLA_LOCK(ha, __func__, 0);
+   QLA_LOCK(ha);
qla_stop(ha);
-   QLA_UNLOCK(ha, __func__);
+   QLA_UNLOCK(ha);
 
qla_release(ha);
 
@@ -895,9 +895,9 @@ qla_init(void *arg)
 
QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__));
 
-   (void)QLA_LOCK(ha, __func__, 0);
+   QLA_LOCK(ha);
qla_init_locked(ha);
-   QLA_UNLOCK(ha, __func__);
+   QLA_UNLOCK(ha);
 
QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__));
 }
@@ -929,13 +929,9 @@ qla_set_multi(qla_host_t *ha, uint32_t a
 
if_maddr_runlock(ifp);
 
-   //if (QLA_LOCK(ha, __func__, 1) == 0) {
-   //  ret = ql_hw_set_multi(ha, mta, mcnt, add_multi);
-   //  QLA_UNLOCK(ha, __func__);
-   //}
-   QLA_LOCK(ha, __func__, 1);
+   QLA_LOCK(ha);
ret = ql_hw_set_multi(ha, mta, mcnt, add_multi);
-   QLA_UNLOCK(ha, __func__);
+   QLA_UNLOCK(ha);
 
return (ret);
 }
@@ -958,9 +954,9 @@ qla_ioctl(struct ifnet *ifp, u_long cmd,
if (ifa->ifa_addr->sa_family == AF_INET) {
ifp->if_flags |= IFF_UP;
if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
-   (void)QLA_LOCK(ha, __func__, 0);
+   QLA_LOCK(ha);
qla_init_locked(ha);
-   QLA_UNLOCK(ha, __func__);
+   QLA_UNLOCK(ha);
}
QL_DPRINT4(ha, (ha->pci_dev,
"%s: SIOCSIFADDR (0x%lx) ipv4 [0x%08x]\n",
@@ -980,10 +976,12 @@ qla_ioctl(struct ifnet *ifp, u_long cmd,
if (ifr->ifr_mtu > QLA_MAX_MTU) {
ret = EINVAL;
} else {
-   (void) QLA_LOCK(ha, __func__, 0);
+   QLA_LOCK(ha);
+
ifp->if_mtu = ifr->ifr_mtu;
ha->max_frame_size =
ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;
+
if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) {
ret = ql_set_max_mtu(ha, ha->max_frame_size,
ha->hw.rcv_cntxt_id);
@@ -995,7 +993,7 @@ qla_ioctl(struct ifnet *ifp, u_long

svn commit: r317991 - stable/10/sys/dev/qlxgbe

2017-05-08 Thread David C Somayajulu
Author: davidcs
Date: Mon May  8 22:41:13 2017
New Revision: 317991
URL: https://svnweb.freebsd.org/changeset/base/317991

Log:
  MFC r317180
Cleanup QLA_LOCK/QLA_UNLOCK macros
remove unused QLA_TX_LOCK/QLA_TX_UNLOCK macros
format qla_error_recovery()

Modified:
  stable/10/sys/dev/qlxgbe/ql_hw.c
  stable/10/sys/dev/qlxgbe/ql_ioctl.c
  stable/10/sys/dev/qlxgbe/ql_os.c
  stable/10/sys/dev/qlxgbe/ql_os.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/qlxgbe/ql_hw.c
==
--- stable/10/sys/dev/qlxgbe/ql_hw.cMon May  8 22:37:37 2017
(r317990)
+++ stable/10/sys/dev/qlxgbe/ql_hw.cMon May  8 22:41:13 2017
(r317991)
@@ -183,9 +183,9 @@ qla_sysctl_stop_pegs(SYSCTL_HANDLER_ARGS
 
if (ret == 1) {
ha = (qla_host_t *)arg1;
-   (void)QLA_LOCK(ha, __func__, 0);
+   QLA_LOCK(ha);
qla_stop_pegs(ha);  
-   QLA_UNLOCK(ha, __func__);
+   QLA_UNLOCK(ha);
}
 
return err;

Modified: stable/10/sys/dev/qlxgbe/ql_ioctl.c
==
--- stable/10/sys/dev/qlxgbe/ql_ioctl.c Mon May  8 22:37:37 2017
(r317990)
+++ stable/10/sys/dev/qlxgbe/ql_ioctl.c Mon May  8 22:41:13 2017
(r317991)
@@ -233,10 +233,10 @@ ql_eioctl(struct cdev *dev, u_long cmd, 
break;
}
 
-   (void)QLA_LOCK(ha, __func__, 0);
+   QLA_LOCK(ha);
if (!ha->hw.mdump_done)
ha->qla_initiate_recovery = 1;
-   QLA_UNLOCK(ha, __func__);
+   QLA_UNLOCK(ha);

 #define QLNX_DUMP_WAIT_SECS30
 
@@ -254,9 +254,9 @@ ql_eioctl(struct cdev *dev, u_long cmd, 
break;
}

-   (void)QLA_LOCK(ha, __func__, 0);
+   QLA_LOCK(ha);
ha->hw.mdump_done = 0;
-   QLA_UNLOCK(ha, __func__);
+   QLA_UNLOCK(ha);
 
if ((rval = copyout(ha->hw.mdump_template,
fw_dump->minidump, ha->hw.mdump_template_size))) {

Modified: stable/10/sys/dev/qlxgbe/ql_os.c
==
--- stable/10/sys/dev/qlxgbe/ql_os.cMon May  8 22:37:37 2017
(r317990)
+++ stable/10/sys/dev/qlxgbe/ql_os.cMon May  8 22:41:13 2017
(r317991)
@@ -519,9 +519,9 @@ qla_pci_detach(device_t dev)
 
ifp = ha->ifp;
 
-   (void)QLA_LOCK(ha, __func__, 0);
+   QLA_LOCK(ha);
qla_stop(ha);
-   QLA_UNLOCK(ha, __func__);
+   QLA_UNLOCK(ha);
 
qla_release(ha);
 
@@ -895,9 +895,9 @@ qla_init(void *arg)
 
QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__));
 
-   (void)QLA_LOCK(ha, __func__, 0);
+   QLA_LOCK(ha);
qla_init_locked(ha);
-   QLA_UNLOCK(ha, __func__);
+   QLA_UNLOCK(ha);
 
QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__));
 }
@@ -929,13 +929,9 @@ qla_set_multi(qla_host_t *ha, uint32_t a
 
if_maddr_runlock(ifp);
 
-   //if (QLA_LOCK(ha, __func__, 1) == 0) {
-   //  ret = ql_hw_set_multi(ha, mta, mcnt, add_multi);
-   //  QLA_UNLOCK(ha, __func__);
-   //}
-   QLA_LOCK(ha, __func__, 1);
+   QLA_LOCK(ha);
ret = ql_hw_set_multi(ha, mta, mcnt, add_multi);
-   QLA_UNLOCK(ha, __func__);
+   QLA_UNLOCK(ha);
 
return (ret);
 }
@@ -958,9 +954,9 @@ qla_ioctl(struct ifnet *ifp, u_long cmd,
if (ifa->ifa_addr->sa_family == AF_INET) {
ifp->if_flags |= IFF_UP;
if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
-   (void)QLA_LOCK(ha, __func__, 0);
+   QLA_LOCK(ha);
qla_init_locked(ha);
-   QLA_UNLOCK(ha, __func__);
+   QLA_UNLOCK(ha);
}
QL_DPRINT4(ha, (ha->pci_dev,
"%s: SIOCSIFADDR (0x%lx) ipv4 [0x%08x]\n",
@@ -980,10 +976,12 @@ qla_ioctl(struct ifnet *ifp, u_long cmd,
if (ifr->ifr_mtu > QLA_MAX_MTU) {
ret = EINVAL;
} else {
-   (void) QLA_LOCK(ha, __func__, 0);
+   QLA_LOCK(ha);
+
ifp->if_mtu = ifr->ifr_mtu;
ha->max_frame_size =
ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;
+
if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) {
ret = ql_set_max_mtu(ha, ha->max_frame_size,
ha->hw.rcv_cntxt_id);
@@ -995,7 +993,7 @@ qla_ioctl(struct ifnet *ifp, u_long cmd,
  

svn commit: r317990 - stable/11/sys/dev/qlxgbe

2017-05-08 Thread David C Somayajulu
Author: davidcs
Date: Mon May  8 22:37:37 2017
New Revision: 317990
URL: https://svnweb.freebsd.org/changeset/base/317990

Log:
  MFC r317180
  Cleanup QLA_LOCK/QLA_UNLOCK macros
  remove unused QLA_TX_LOCK/QLA_TX_UNLOCK macros
  format qla_error_recovery()

Modified:
  stable/11/sys/dev/qlxgbe/ql_hw.c
  stable/11/sys/dev/qlxgbe/ql_ioctl.c
  stable/11/sys/dev/qlxgbe/ql_os.c
  stable/11/sys/dev/qlxgbe/ql_os.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/qlxgbe/ql_hw.c
==
--- stable/11/sys/dev/qlxgbe/ql_hw.cMon May  8 22:35:15 2017
(r317989)
+++ stable/11/sys/dev/qlxgbe/ql_hw.cMon May  8 22:37:37 2017
(r317990)
@@ -183,9 +183,9 @@ qla_sysctl_stop_pegs(SYSCTL_HANDLER_ARGS
 
if (ret == 1) {
ha = (qla_host_t *)arg1;
-   (void)QLA_LOCK(ha, __func__, 0);
+   QLA_LOCK(ha);
qla_stop_pegs(ha);  
-   QLA_UNLOCK(ha, __func__);
+   QLA_UNLOCK(ha);
}
 
return err;

Modified: stable/11/sys/dev/qlxgbe/ql_ioctl.c
==
--- stable/11/sys/dev/qlxgbe/ql_ioctl.c Mon May  8 22:35:15 2017
(r317989)
+++ stable/11/sys/dev/qlxgbe/ql_ioctl.c Mon May  8 22:37:37 2017
(r317990)
@@ -233,10 +233,10 @@ ql_eioctl(struct cdev *dev, u_long cmd, 
break;
}
 
-   (void)QLA_LOCK(ha, __func__, 0);
+   QLA_LOCK(ha);
if (!ha->hw.mdump_done)
ha->qla_initiate_recovery = 1;
-   QLA_UNLOCK(ha, __func__);
+   QLA_UNLOCK(ha);

 #define QLNX_DUMP_WAIT_SECS30
 
@@ -254,9 +254,9 @@ ql_eioctl(struct cdev *dev, u_long cmd, 
break;
}

-   (void)QLA_LOCK(ha, __func__, 0);
+   QLA_LOCK(ha);
ha->hw.mdump_done = 0;
-   QLA_UNLOCK(ha, __func__);
+   QLA_UNLOCK(ha);
 
if ((rval = copyout(ha->hw.mdump_template,
fw_dump->minidump, ha->hw.mdump_template_size))) {

Modified: stable/11/sys/dev/qlxgbe/ql_os.c
==
--- stable/11/sys/dev/qlxgbe/ql_os.cMon May  8 22:35:15 2017
(r317989)
+++ stable/11/sys/dev/qlxgbe/ql_os.cMon May  8 22:37:37 2017
(r317990)
@@ -519,9 +519,9 @@ qla_pci_detach(device_t dev)
 
ifp = ha->ifp;
 
-   (void)QLA_LOCK(ha, __func__, 0);
+   QLA_LOCK(ha);
qla_stop(ha);
-   QLA_UNLOCK(ha, __func__);
+   QLA_UNLOCK(ha);
 
qla_release(ha);
 
@@ -890,9 +890,9 @@ qla_init(void *arg)
 
QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__));
 
-   (void)QLA_LOCK(ha, __func__, 0);
+   QLA_LOCK(ha);
qla_init_locked(ha);
-   QLA_UNLOCK(ha, __func__);
+   QLA_UNLOCK(ha);
 
QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__));
 }
@@ -924,13 +924,9 @@ qla_set_multi(qla_host_t *ha, uint32_t a
 
if_maddr_runlock(ifp);
 
-   //if (QLA_LOCK(ha, __func__, 1) == 0) {
-   //  ret = ql_hw_set_multi(ha, mta, mcnt, add_multi);
-   //  QLA_UNLOCK(ha, __func__);
-   //}
-   QLA_LOCK(ha, __func__, 1);
+   QLA_LOCK(ha);
ret = ql_hw_set_multi(ha, mta, mcnt, add_multi);
-   QLA_UNLOCK(ha, __func__);
+   QLA_UNLOCK(ha);
 
return (ret);
 }
@@ -953,9 +949,9 @@ qla_ioctl(struct ifnet *ifp, u_long cmd,
if (ifa->ifa_addr->sa_family == AF_INET) {
ifp->if_flags |= IFF_UP;
if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
-   (void)QLA_LOCK(ha, __func__, 0);
+   QLA_LOCK(ha);
qla_init_locked(ha);
-   QLA_UNLOCK(ha, __func__);
+   QLA_UNLOCK(ha);
}
QL_DPRINT4(ha, (ha->pci_dev,
"%s: SIOCSIFADDR (0x%lx) ipv4 [0x%08x]\n",
@@ -975,10 +971,12 @@ qla_ioctl(struct ifnet *ifp, u_long cmd,
if (ifr->ifr_mtu > QLA_MAX_MTU) {
ret = EINVAL;
} else {
-   (void) QLA_LOCK(ha, __func__, 0);
+   QLA_LOCK(ha);
+
ifp->if_mtu = ifr->ifr_mtu;
ha->max_frame_size =
ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;
+
if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) {
ret = ql_set_max_mtu(ha, ha->max_frame_size,
ha->hw.rcv_cntxt_id);
@@ -990,7 +988,7 @@ qla_ioctl(struct ifnet *ifp, u_long cmd,

svn commit: r317989 - stable/11/sys/dev/evdev

2017-05-08 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Mon May  8 22:35:15 2017
New Revision: 317989
URL: https://svnweb.freebsd.org/changeset/base/317989

Log:
  MFC r315176-r315178
  
  r315176:
  [evdev] Do not ignore result evdev_register in UI_DEV_CREATE handler
  
  Make sure that uinput state field reflects actual state by checking
  evdev_register result for errors
  
  Submitted by: Vladimir Kondratiev 
  Differential Revision:https://reviews.freebsd.org/D9320
  
  r315177:
  [evdev] Fix race condition between client's event queue reading and dropping
  
  Submitted by: Vladimir Kondratiev 
  Differential Revision:https://reviews.freebsd.org/D9320
  
  r315178:
  [evdev] Fix Right Alt and Keypad Enter event codes for atkbd(4) and kbdmux(4) 
drivers
  
  Submitted by: Vladimir Kondratiev 
  Differential Revision:https://reviews.freebsd.org/D9320

Modified:
  stable/11/sys/dev/evdev/cdev.c
  stable/11/sys/dev/evdev/evdev_utils.c
  stable/11/sys/dev/evdev/uinput.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/evdev/cdev.c
==
--- stable/11/sys/dev/evdev/cdev.c  Mon May  8 22:24:06 2017
(r317988)
+++ stable/11/sys/dev/evdev/cdev.c  Mon May  8 22:35:15 2017
(r317989)
@@ -162,7 +162,7 @@ static int
 evdev_read(struct cdev *dev, struct uio *uio, int ioflag)
 {
struct evdev_client *client;
-   struct input_event *event;
+   struct input_event event;
int ret = 0;
int remaining;
 
@@ -197,13 +197,14 @@ evdev_read(struct cdev *dev, struct uio 
}
 
while (ret == 0 && !EVDEV_CLIENT_EMPTYQ(client) && remaining > 0) {
-   event = &client->ec_buffer[client->ec_buffer_head];
+   memcpy(&event, &client->ec_buffer[client->ec_buffer_head],
+   sizeof(struct input_event));
client->ec_buffer_head =
(client->ec_buffer_head + 1) % client->ec_buffer_size;
remaining--;
 
EVDEV_CLIENT_UNLOCKQ(client);
-   ret = uiomove(event, sizeof(struct input_event), uio);
+   ret = uiomove(&event, sizeof(struct input_event), uio);
EVDEV_CLIENT_LOCKQ(client);
}
 

Modified: stable/11/sys/dev/evdev/evdev_utils.c
==
--- stable/11/sys/dev/evdev/evdev_utils.c   Mon May  8 22:24:06 2017
(r317988)
+++ stable/11/sys/dev/evdev/evdev_utils.c   Mon May  8 22:35:15 2017
(r317989)
@@ -159,7 +159,7 @@ static uint16_t evdev_at_set1_scancodes[
KEY_PREVIOUSSONG,   NONE,   NONE,   NONE,
NONE,   NONE,   NONE,   NONE,
NONE,   KEY_NEXTSONG,   NONE,   NONE,
-   NONE,   KEY_KPENTER,KEY_RIGHTCTRL,  NONE,
+   KEY_KPENTER,KEY_RIGHTCTRL,  NONE,   NONE,
/* 0x20 - 0x3f. 0xE0 prefixed */
KEY_MUTE,   KEY_CALC,   KEY_PLAYPAUSE,  NONE,
KEY_STOPCD, NONE,   NONE,   NONE,

Modified: stable/11/sys/dev/evdev/uinput.c
==
--- stable/11/sys/dev/evdev/uinput.cMon May  8 22:24:06 2017
(r317988)
+++ stable/11/sys/dev/evdev/uinput.cMon May  8 22:35:15 2017
(r317989)
@@ -501,9 +501,10 @@ uinput_ioctl_sub(struct uinput_cdev_stat
 
evdev_set_methods(state->ucs_evdev, state, &uinput_ev_methods);
evdev_set_flag(state->ucs_evdev, EVDEV_FLAG_SOFTREPEAT);
-   evdev_register(state->ucs_evdev);
-   state->ucs_state = UINPUT_RUNNING;
-   return (0);
+   ret = evdev_register(state->ucs_evdev);
+   if (ret == 0)
+   state->ucs_state = UINPUT_RUNNING;
+   return (ret);
 
case UI_DEV_DESTROY:
if (state->ucs_state != UINPUT_RUNNING)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317988 - stable/11/sys/cam/ctl

2017-05-08 Thread Alexander Motin
Author: mav
Date: Mon May  8 22:24:06 2017
New Revision: 317988
URL: https://svnweb.freebsd.org/changeset/base/317988

Log:
  MFC r317370: Change ctl_free_lun() locking.
  
  This fixes potential callout_drain() sleep under non-sleepable lock.
  
  PR:   218167

Modified:
  stable/11/sys/cam/ctl/ctl.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cam/ctl/ctl.c
==
--- stable/11/sys/cam/ctl/ctl.c Mon May  8 22:23:01 2017(r317987)
+++ stable/11/sys/cam/ctl/ctl.c Mon May  8 22:24:06 2017(r317988)
@@ -4731,18 +4731,20 @@ ctl_free_lun(struct ctl_lun *lun)
struct ctl_lun *nlun;
int i;
 
-   mtx_assert(&softc->ctl_lock, MA_OWNED);
+   KASSERT(TAILQ_EMPTY(&lun->ooa_queue),
+   ("Freeing a LUN %p with outstanding I/O!\n", lun));
 
+   mtx_lock(&softc->ctl_lock);
STAILQ_REMOVE(&softc->lun_list, lun, ctl_lun, links);
-
ctl_clear_mask(softc->ctl_lun_mask, lun->lun);
-
softc->ctl_luns[lun->lun] = NULL;
-
-   if (!TAILQ_EMPTY(&lun->ooa_queue))
-   panic("Freeing a LUN %p with outstanding I/O!!\n", lun);
-
softc->num_luns--;
+   STAILQ_FOREACH(nlun, &softc->lun_list, links) {
+   mtx_lock(&nlun->lun_lock);
+   ctl_est_ua_all(nlun, -1, CTL_UA_LUN_CHANGE);
+   mtx_unlock(&nlun->lun_lock);
+   }
+   mtx_unlock(&softc->ctl_lock);
 
/*
 * Tell the backend to free resources, if this LUN has a backend.
@@ -4752,7 +4754,6 @@ ctl_free_lun(struct ctl_lun *lun)
 
lun->ie_reportcnt = UINT32_MAX;
callout_drain(&lun->ie_callout);
-
ctl_tpc_lun_shutdown(lun);
mtx_destroy(&lun->lun_lock);
free(lun->lun_devid, M_CTL);
@@ -4765,12 +4766,6 @@ ctl_free_lun(struct ctl_lun *lun)
if (lun->flags & CTL_LUN_MALLOCED)
free(lun, M_CTL);
 
-   STAILQ_FOREACH(nlun, &softc->lun_list, links) {
-   mtx_lock(&nlun->lun_lock);
-   ctl_est_ua_all(nlun, -1, CTL_UA_LUN_CHANGE);
-   mtx_unlock(&nlun->lun_lock);
-   }
-
return (0);
 }
 
@@ -5027,9 +5022,7 @@ ctl_invalidate_lun(struct ctl_be_lun *be
 */
if (TAILQ_EMPTY(&lun->ooa_queue)) {
mtx_unlock(&lun->lun_lock);
-   mtx_lock(&softc->ctl_lock);
ctl_free_lun(lun);
-   mtx_unlock(&softc->ctl_lock);
} else
mtx_unlock(&lun->lun_lock);
 
@@ -13068,9 +13061,7 @@ ctl_process_done(union ctl_io *io)
if ((lun->flags & CTL_LUN_INVALID)
 && TAILQ_EMPTY(&lun->ooa_queue)) {
mtx_unlock(&lun->lun_lock);
-   mtx_lock(&softc->ctl_lock);
ctl_free_lun(lun);
-   mtx_unlock(&softc->ctl_lock);
} else
mtx_unlock(&lun->lun_lock);
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317987 - stable/11/sys/cam/ctl

2017-05-08 Thread Alexander Motin
Author: mav
Date: Mon May  8 22:23:01 2017
New Revision: 317987
URL: https://svnweb.freebsd.org/changeset/base/317987

Log:
  MFC r317369: Slightly compact the code.

Modified:
  stable/11/sys/cam/ctl/ctl_backend_block.c
  stable/11/sys/cam/ctl/ctl_backend_ramdisk.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cam/ctl/ctl_backend_block.c
==
--- stable/11/sys/cam/ctl/ctl_backend_block.c   Mon May  8 21:58:29 2017
(r317986)
+++ stable/11/sys/cam/ctl/ctl_backend_block.c   Mon May  8 22:23:01 2017
(r317987)
@@ -2650,11 +2650,8 @@ bailout_error:
 static void
 ctl_be_block_lun_shutdown(void *be_lun)
 {
-   struct ctl_be_block_lun *lun;
-   struct ctl_be_block_softc *softc;
-
-   lun = (struct ctl_be_block_lun *)be_lun;
-   softc = lun->softc;
+   struct ctl_be_block_lun *lun = be_lun;
+   struct ctl_be_block_softc *softc = lun->softc;
 
mtx_lock(&softc->lock);
lun->flags |= CTL_BE_BLOCK_LUN_UNCONFIGURED;

Modified: stable/11/sys/cam/ctl/ctl_backend_ramdisk.c
==
--- stable/11/sys/cam/ctl/ctl_backend_ramdisk.c Mon May  8 21:58:29 2017
(r317986)
+++ stable/11/sys/cam/ctl/ctl_backend_ramdisk.c Mon May  8 22:23:01 2017
(r317987)
@@ -1287,13 +1287,8 @@ bailout_error:
 static void
 ctl_backend_ramdisk_lun_shutdown(void *be_lun)
 {
-   struct ctl_be_ramdisk_lun *lun;
-   struct ctl_be_ramdisk_softc *softc;
-   int do_free;
-
-   lun = (struct ctl_be_ramdisk_lun *)be_lun;
-   softc = lun->softc;
-   do_free = 0;
+   struct ctl_be_ramdisk_lun *lun = be_lun;
+   struct ctl_be_ramdisk_softc *softc = lun->softc;
 
mtx_lock(&softc->lock);
lun->flags |= CTL_BE_RAMDISK_LUN_UNCONFIGURED;
@@ -1303,12 +1298,9 @@ ctl_backend_ramdisk_lun_shutdown(void *b
STAILQ_REMOVE(&softc->lun_list, lun, ctl_be_ramdisk_lun,
  links);
softc->num_luns--;
-   do_free = 1;
+   free(be_lun, M_RAMDISK);
}
mtx_unlock(&softc->lock);
-
-   if (do_free != 0)
-   free(be_lun, M_RAMDISK);
 }
 
 static void
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r317809 - head/share/man/man7

2017-05-08 Thread Konstantin Belousov
On Mon, May 08, 2017 at 11:52:10PM +0300, Konstantin Belousov wrote:
> On Mon, May 08, 2017 at 01:37:15PM -0700, John Baldwin wrote:
> > On Thursday, May 04, 2017 09:31:50 PM Konstantin Belousov wrote:
> > > Author: kib
> > > Date: Thu May  4 21:31:50 2017
> > > New Revision: 317809
> > > URL: https://svnweb.freebsd.org/changeset/base/317809
> > > 
> > > Log:
> > >   Provide introduction for the arch(7) manpage.
> > >   
> > >   Start with some words about linear address space and its layout, then
> > >   explain pointers models and ABIs, providing explanation to the
> > >   structure of the tables.
> > >   
> > >   Reviewed by:emaste, imp
> > >   'Future-proof' cheri wording by:brooks
> > >   Sponsored by:   The FreeBSD Foundation
> > >   MFC after:  2 weeks
> > >   Differential revision:  https://reviews.freebsd.org/D10596
> > 
> > Note that mips n32 is neither ILP32 or LP64, it P32L64.  (Similar to x32
> > for x86 if we were to ever add that.)  Thus, we support 3 ABIs rather
> > than just 2.
> 
> I trust your information about MIPS n32, but x32 uses ILP32 model.
In fact, from all documents that I can found about n32, it seems that
long == pointer == 32bit.  This is mentioned in the MIPSpro N32 ABI Handbook
and in the MIPS Tech document MD00305 'MIPS ABIs Described'.

The only strange thing for n32 is that register_t is 64bit, and vm_paddr_t
is similar to PAE.

> In particular, sizeof(long) == 4, according to the AMD64 ABI Draft 0.99.8,
> which includes both LP64 and ILP32 (x32) ABI description.
> 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317986 - stable/10/sys/fs/nfsserver

2017-05-08 Thread Rick Macklem
Author: rmacklem
Date: Mon May  8 21:58:29 2017
New Revision: 317986
URL: https://svnweb.freebsd.org/changeset/base/317986

Log:
  MFC: r317382
  Allow use of a write open stateid for reading in the NFSv4 server.
  
  The NFSv4 RFCs give a server the option of allowing the use of an open
  stateid for write access to be used for a Read operation.
  This patch enables this by default and adds a sysctl to disable it,
  for anyone who does not want this capability.
  Allowing this is particularily useful for a pNFS Data Server (DS), since
  they are not permitted to allow the use of special stateids.
  Discovered during recent testing of the pNFS server under development.

Modified:
  stable/10/sys/fs/nfsserver/nfs_nfsdstate.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/nfsserver/nfs_nfsdstate.c
==
--- stable/10/sys/fs/nfsserver/nfs_nfsdstate.c  Mon May  8 21:49:55 2017
(r317985)
+++ stable/10/sys/fs/nfsserver/nfs_nfsdstate.c  Mon May  8 21:58:29 2017
(r317986)
@@ -80,6 +80,11 @@ SYSCTL_INT(_vfs_nfsd, OID_AUTO, writedel
 &nfsrv_writedelegifpos, 0,
 "Issue a write delegation for read opens if possible");
 
+static int nfsrv_allowreadforwriteopen = 1;
+SYSCTL_INT(_vfs_nfsd, OID_AUTO, allowreadforwriteopen, CTLFLAG_RW,
+&nfsrv_allowreadforwriteopen, 0,
+"Allow Reads to be done with Write Access StateIDs");
+
 /*
  * Hash lists for nfs V4.
  */
@@ -1869,7 +1874,8 @@ tryagain:
   mystp->ls_flags & NFSLCK_ACCESSBITS)) ||
((new_stp->ls_flags & (NFSLCK_CHECK|NFSLCK_READACCESS)) ==
  (NFSLCK_CHECK | NFSLCK_READACCESS) &&
-!(mystp->ls_flags & NFSLCK_READACCESS)) ||
+!(mystp->ls_flags & NFSLCK_READACCESS) &&
+nfsrv_allowreadforwriteopen == 0) ||
((new_stp->ls_flags & (NFSLCK_CHECK|NFSLCK_WRITEACCESS)) ==
  (NFSLCK_CHECK | NFSLCK_WRITEACCESS) &&
 !(mystp->ls_flags & NFSLCK_WRITEACCESS))) {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317985 - stable/11/sys/fs/nfsserver

2017-05-08 Thread Rick Macklem
Author: rmacklem
Date: Mon May  8 21:49:55 2017
New Revision: 317985
URL: https://svnweb.freebsd.org/changeset/base/317985

Log:
  MFC: r317382
  Allow use of a write open stateid for reading in the NFSv4 server.
  
  The NFSv4 RFCs give a server the option of allowing the use of an open
  stateid for write access to be used for a Read operation.
  This patch enables this by default and adds a sysctl to disable it,
  for anyone who does not want this capability.
  Allowing this is particularily useful for a pNFS Data Server (DS), since
  they are not permitted to allow the use of special stateids.
  Discovered during recent testing of the pNFS server under development.

Modified:
  stable/11/sys/fs/nfsserver/nfs_nfsdstate.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/fs/nfsserver/nfs_nfsdstate.c
==
--- stable/11/sys/fs/nfsserver/nfs_nfsdstate.c  Mon May  8 21:40:42 2017
(r317984)
+++ stable/11/sys/fs/nfsserver/nfs_nfsdstate.c  Mon May  8 21:49:55 2017
(r317985)
@@ -75,6 +75,11 @@ SYSCTL_INT(_vfs_nfsd, OID_AUTO, writedel
 &nfsrv_writedelegifpos, 0,
 "Issue a write delegation for read opens if possible");
 
+static int nfsrv_allowreadforwriteopen = 1;
+SYSCTL_INT(_vfs_nfsd, OID_AUTO, allowreadforwriteopen, CTLFLAG_RW,
+&nfsrv_allowreadforwriteopen, 0,
+"Allow Reads to be done with Write Access StateIDs");
+
 /*
  * Hash lists for nfs V4.
  */
@@ -1872,7 +1877,8 @@ tryagain:
   mystp->ls_flags & NFSLCK_ACCESSBITS)) ||
((new_stp->ls_flags & (NFSLCK_CHECK|NFSLCK_READACCESS)) ==
  (NFSLCK_CHECK | NFSLCK_READACCESS) &&
-!(mystp->ls_flags & NFSLCK_READACCESS)) ||
+!(mystp->ls_flags & NFSLCK_READACCESS) &&
+nfsrv_allowreadforwriteopen == 0) ||
((new_stp->ls_flags & (NFSLCK_CHECK|NFSLCK_WRITEACCESS)) ==
  (NFSLCK_CHECK | NFSLCK_WRITEACCESS) &&
 !(mystp->ls_flags & NFSLCK_WRITEACCESS))) {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317984 - in stable/10/sys/fs: nfs nfsclient

2017-05-08 Thread Rick Macklem
Author: rmacklem
Date: Mon May  8 21:40:42 2017
New Revision: 317984
URL: https://svnweb.freebsd.org/changeset/base/317984

Log:
  MFC: r317345
  Make the NFSv4 client to use a write open for reading if allowed by the 
server.
  
  An NFSv4 server has the option of allowing a Read to be done using a Write
  Open. If this is not allowed, the server will return NFSERR_OPENMODE.
  This patch attempts the read with a write open and then disables this
  if the server replies NFSERR_OPENMODE.
  This change will avoid some uses of the special stateids. This will be
  useful for pNFS/DS Reads, since they cannot use special stateids.
  It will also be useful for any NFSv4 server that does not support reading
  via the special stateids. It has been tested against both types of NFSv4 
server.

Modified:
  stable/10/sys/fs/nfs/nfsport.h
  stable/10/sys/fs/nfsclient/nfs_clrpcops.c
  stable/10/sys/fs/nfsclient/nfs_clstate.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/nfs/nfsport.h
==
--- stable/10/sys/fs/nfs/nfsport.h  Mon May  8 21:29:29 2017
(r317983)
+++ stable/10/sys/fs/nfs/nfsport.h  Mon May  8 21:40:42 2017
(r317984)
@@ -832,6 +832,7 @@ int newnfs_realign(struct mbuf **, int);
  */
 #defineNFSSTA_HASWRITEVERF 0x0004  /* Has write verifier */
 #defineNFSSTA_GOTFSINFO0x0010  /* Got the fsinfo */
+#defineNFSSTA_OPENMODE 0x0020  /* Must use correct open 
mode */
 #defineNFSSTA_NOLAYOUTCOMMIT   0x0400  /* Don't do LayoutCommit */
 #defineNFSSTA_SESSPERSIST  0x0800  /* Has a persistent session 
*/
 #defineNFSSTA_TIMEO0x1000  /* Experiencing a timeout */
@@ -862,6 +863,7 @@ int newnfs_realign(struct mbuf **, int);
 #defineNFSHASNOLAYOUTCOMMIT(n) ((n)->nm_state & NFSSTA_NOLAYOUTCOMMIT)
 #defineNFSHASSESSPERSIST(n)((n)->nm_state & NFSSTA_SESSPERSIST)
 #defineNFSHASPNFS(n)   ((n)->nm_state & NFSSTA_PNFS)
+#defineNFSHASOPENMODE(n)   ((n)->nm_state & NFSSTA_OPENMODE)
 #defineNFSHASONEOPENOWN(n) (((n)->nm_flag & NFSMNT_ONEOPENOWN) != 
0 && \
(n)->nm_minorvers > 0)
 

Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c
==
--- stable/10/sys/fs/nfsclient/nfs_clrpcops.c   Mon May  8 21:29:29 2017
(r317983)
+++ stable/10/sys/fs/nfsclient/nfs_clrpcops.c   Mon May  8 21:40:42 2017
(r317984)
@@ -1131,6 +1131,11 @@ nfsrpc_setattr(vnode_t vp, struct vattr 
else
error = nfsrpc_setaclrpc(vp, cred, p, aclp, &stateid,
stuff);
+   if (error == NFSERR_OPENMODE && mode == NFSV4OPEN_ACCESSREAD) {
+   NFSLOCKMNT(nmp);
+   nmp->nm_state |= NFSSTA_OPENMODE;
+   NFSUNLOCKMNT(nmp);
+   }
if (error == NFSERR_STALESTATEID)
nfscl_initiate_recovery(nmp->nm_clp);
if (lckp != NULL)
@@ -1151,7 +1156,9 @@ nfsrpc_setattr(vnode_t vp, struct vattr 
error == NFSERR_BADSESSION ||
(error == NFSERR_OLDSTATEID && retrycnt < 20) ||
((error == NFSERR_EXPIRED || error == NFSERR_BADSTATEID) &&
-expireret == 0 && clidrev != 0 && retrycnt < 4));
+expireret == 0 && clidrev != 0 && retrycnt < 4) ||
+   (error == NFSERR_OPENMODE && mode == NFSV4OPEN_ACCESSREAD &&
+retrycnt < 4));
if (error && retrycnt >= 4)
error = EIO;
return (error);
@@ -1388,6 +1395,11 @@ nfsrpc_read(vnode_t vp, struct uio *uiop
&lckp);
error = nfsrpc_readrpc(vp, uiop, newcred, &stateid, p, nap,
attrflagp, stuff);
+   if (error == NFSERR_OPENMODE) {
+   NFSLOCKMNT(nmp);
+   nmp->nm_state |= NFSSTA_OPENMODE;
+   NFSUNLOCKMNT(nmp);
+   }
if (error == NFSERR_STALESTATEID)
nfscl_initiate_recovery(nmp->nm_clp);
if (lckp != NULL)
@@ -1406,7 +1418,8 @@ nfsrpc_read(vnode_t vp, struct uio *uiop
error == NFSERR_BADSESSION ||
(error == NFSERR_OLDSTATEID && retrycnt < 20) ||
((error == NFSERR_EXPIRED || error == NFSERR_BADSTATEID) &&
-expireret == 0 && clidrev != 0 && retrycnt < 4));
+expireret == 0 && clidrev != 0 && retrycnt < 4) ||
+   (error == NFSERR_OPENMODE && retrycnt < 4));
if (error && retrycnt >= 4)
error = EIO;
if (NFSHASNFSV4(nmp))
@@ -5591,6 +5604,11 @@ nfscl_doiods(vnode_t vp, struct uio *uio
if (lastbyte > layp->nfsly_la

svn commit: r317983 - in stable/11/sys/fs: nfs nfsclient

2017-05-08 Thread Rick Macklem
Author: rmacklem
Date: Mon May  8 21:29:29 2017
New Revision: 317983
URL: https://svnweb.freebsd.org/changeset/base/317983

Log:
  MFC: r317345
  Make the NFSv4 client to use a write open for reading if allowed by the 
server.
  
  An NFSv4 server has the option of allowing a Read to be done using a Write
  Open. If this is not allowed, the server will return NFSERR_OPENMODE.
  This patch attempts the read with a write open and then disables this
  if the server replies NFSERR_OPENMODE.
  This change will avoid some uses of the special stateids. This will be
  useful for pNFS/DS Reads, since they cannot use special stateids.
  It will also be useful for any NFSv4 server that does not support reading
  via the special stateids. It has been tested against both types of NFSv4 
server.

Modified:
  stable/11/sys/fs/nfs/nfsport.h
  stable/11/sys/fs/nfsclient/nfs_clrpcops.c
  stable/11/sys/fs/nfsclient/nfs_clstate.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/fs/nfs/nfsport.h
==
--- stable/11/sys/fs/nfs/nfsport.h  Mon May  8 21:08:39 2017
(r317982)
+++ stable/11/sys/fs/nfs/nfsport.h  Mon May  8 21:29:29 2017
(r317983)
@@ -899,6 +899,7 @@ int newnfs_realign(struct mbuf **, int);
  */
 #defineNFSSTA_HASWRITEVERF 0x0004  /* Has write verifier */
 #defineNFSSTA_GOTFSINFO0x0010  /* Got the fsinfo */
+#defineNFSSTA_OPENMODE 0x0020  /* Must use correct open 
mode */
 #defineNFSSTA_NOLAYOUTCOMMIT   0x0400  /* Don't do LayoutCommit */
 #defineNFSSTA_SESSPERSIST  0x0800  /* Has a persistent session 
*/
 #defineNFSSTA_TIMEO0x1000  /* Experiencing a timeout */
@@ -929,6 +930,7 @@ int newnfs_realign(struct mbuf **, int);
 #defineNFSHASNOLAYOUTCOMMIT(n) ((n)->nm_state & NFSSTA_NOLAYOUTCOMMIT)
 #defineNFSHASSESSPERSIST(n)((n)->nm_state & NFSSTA_SESSPERSIST)
 #defineNFSHASPNFS(n)   ((n)->nm_state & NFSSTA_PNFS)
+#defineNFSHASOPENMODE(n)   ((n)->nm_state & NFSSTA_OPENMODE)
 #defineNFSHASONEOPENOWN(n) (((n)->nm_flag & NFSMNT_ONEOPENOWN) != 
0 && \
(n)->nm_minorvers > 0)
 

Modified: stable/11/sys/fs/nfsclient/nfs_clrpcops.c
==
--- stable/11/sys/fs/nfsclient/nfs_clrpcops.c   Mon May  8 21:08:39 2017
(r317982)
+++ stable/11/sys/fs/nfsclient/nfs_clrpcops.c   Mon May  8 21:29:29 2017
(r317983)
@@ -1134,6 +1134,11 @@ nfsrpc_setattr(vnode_t vp, struct vattr 
else
error = nfsrpc_setaclrpc(vp, cred, p, aclp, &stateid,
stuff);
+   if (error == NFSERR_OPENMODE && mode == NFSV4OPEN_ACCESSREAD) {
+   NFSLOCKMNT(nmp);
+   nmp->nm_state |= NFSSTA_OPENMODE;
+   NFSUNLOCKMNT(nmp);
+   }
if (error == NFSERR_STALESTATEID)
nfscl_initiate_recovery(nmp->nm_clp);
if (lckp != NULL)
@@ -1154,7 +1159,9 @@ nfsrpc_setattr(vnode_t vp, struct vattr 
error == NFSERR_BADSESSION ||
(error == NFSERR_OLDSTATEID && retrycnt < 20) ||
((error == NFSERR_EXPIRED || error == NFSERR_BADSTATEID) &&
-expireret == 0 && clidrev != 0 && retrycnt < 4));
+expireret == 0 && clidrev != 0 && retrycnt < 4) ||
+   (error == NFSERR_OPENMODE && mode == NFSV4OPEN_ACCESSREAD &&
+retrycnt < 4));
if (error && retrycnt >= 4)
error = EIO;
return (error);
@@ -1391,6 +1398,11 @@ nfsrpc_read(vnode_t vp, struct uio *uiop
&lckp);
error = nfsrpc_readrpc(vp, uiop, newcred, &stateid, p, nap,
attrflagp, stuff);
+   if (error == NFSERR_OPENMODE) {
+   NFSLOCKMNT(nmp);
+   nmp->nm_state |= NFSSTA_OPENMODE;
+   NFSUNLOCKMNT(nmp);
+   }
if (error == NFSERR_STALESTATEID)
nfscl_initiate_recovery(nmp->nm_clp);
if (lckp != NULL)
@@ -1409,7 +1421,8 @@ nfsrpc_read(vnode_t vp, struct uio *uiop
error == NFSERR_BADSESSION ||
(error == NFSERR_OLDSTATEID && retrycnt < 20) ||
((error == NFSERR_EXPIRED || error == NFSERR_BADSTATEID) &&
-expireret == 0 && clidrev != 0 && retrycnt < 4));
+expireret == 0 && clidrev != 0 && retrycnt < 4) ||
+   (error == NFSERR_OPENMODE && retrycnt < 4));
if (error && retrycnt >= 4)
error = EIO;
if (NFSHASNFSV4(nmp))
@@ -5594,6 +5607,11 @@ nfscl_doiods(vnode_t vp, struct uio *uio
if (lastbyte > layp->nfsly_la

svn commit: r317982 - in head/sys: kern sys

2017-05-08 Thread Marius Strobl
Author: marius
Date: Mon May  8 21:08:39 2017
New Revision: 317982
URL: https://svnweb.freebsd.org/changeset/base/317982

Log:
  - Also outside of the KOBJOPLOOKUP macro - which in turn is used by
the code auto-generated for *.m - kobj_lookup_method(9) is useful;
for example in back-ends or base class device drivers in order to
determine whether a default method has been overridden. Thus, allow
for the kobj_method_t pointer argument - used by KOBJOPLOOKUP in
order to update the cache entry - of kobj_lookup_method(9), to be
NULL. Actually, that pointer is redundant as it's just set to the
same kobj_method_t that the kobj_lookup_method(9) function returns
in the first place, but probably it serves to reduce the number of
instructions generated for KOBJOPLOOKUP.
  - For the same reason, move updating kobj_lookup_{hits,misses} (if
KOBJ_STATS is defined) from kobj_lookup_method(9) to KOBJOPLOOKUP.
As a side-effect, this gets rid of the convoluted approach of always
incrementing kobj_lookup_hits in KOBJOPLOOKUP and then in case of
a cache miss, decrementing it in kobj_lookup_method(9) again.

Modified:
  head/sys/kern/subr_kobj.c
  head/sys/sys/kobj.h

Modified: head/sys/kern/subr_kobj.c
==
--- head/sys/kern/subr_kobj.c   Mon May  8 20:58:32 2017(r317981)
+++ head/sys/kern/subr_kobj.c   Mon May  8 21:08:39 2017(r317982)
@@ -213,19 +213,11 @@ kobj_lookup_method(kobj_class_t cls,
 {
kobj_method_t *ce;
 
-#ifdef KOBJ_STATS
-   /*
-* Correct for the 'hit' assumption in KOBJOPLOOKUP and record
-* a 'miss'.
-*/
-   kobj_lookup_hits--;
-   kobj_lookup_misses++;
-#endif
-
ce = kobj_lookup_method_mi(cls, desc);
if (!ce)
ce = &desc->deflt;
-   *cep = ce;
+   if (cep)
+   *cep = ce;
return ce;
 }
 

Modified: head/sys/sys/kobj.h
==
--- head/sys/sys/kobj.h Mon May  8 20:58:32 2017(r317981)
+++ head/sys/sys/kobj.h Mon May  8 21:08:39 2017(r317982)
@@ -226,10 +226,12 @@ extern u_int kobj_lookup_misses;
kobj_method_t **_cep =  \
&OPS->cache[_desc->id & (KOBJ_CACHE_SIZE-1)];   \
kobj_method_t *_ce = *_cep; \
-   kobj_lookup_hits++; /* assume hit */\
-   if (_ce->desc != _desc) \
+   if (_ce->desc != _desc) {   \
_ce = kobj_lookup_method(OPS->cls,  \
 _cep, _desc);  \
+   kobj_lookup_misses++;   \
+   } else  \
+   kobj_lookup_hits++; \
_m = _ce->func; \
 } while(0)
 #else
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317981 - head/sys/modules/mmcsd

2017-05-08 Thread Marius Strobl
Author: marius
Date: Mon May  8 20:58:32 2017
New Revision: 317981
URL: https://svnweb.freebsd.org/changeset/base/317981

Log:
  Revise r315430; there's no need to build mmc_subr.c into both mmc.ko
  and mmcsd.ko.

Modified:
  head/sys/modules/mmcsd/Makefile

Modified: head/sys/modules/mmcsd/Makefile
==
--- head/sys/modules/mmcsd/Makefile Mon May  8 20:44:21 2017
(r317980)
+++ head/sys/modules/mmcsd/Makefile Mon May  8 20:58:32 2017
(r317981)
@@ -3,6 +3,6 @@
 .PATH: ${SRCTOP}/sys/dev/mmc
 
 KMOD=  mmcsd
-SRCS=  bus_if.h device_if.h mmc_subr.c mmcbr_if.h mmcbus_if.h mmcsd.c
+SRCS=  bus_if.h device_if.h mmcbr_if.h mmcbus_if.h mmcsd.c
 
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r317809 - head/share/man/man7

2017-05-08 Thread Konstantin Belousov
On Mon, May 08, 2017 at 01:37:15PM -0700, John Baldwin wrote:
> On Thursday, May 04, 2017 09:31:50 PM Konstantin Belousov wrote:
> > Author: kib
> > Date: Thu May  4 21:31:50 2017
> > New Revision: 317809
> > URL: https://svnweb.freebsd.org/changeset/base/317809
> > 
> > Log:
> >   Provide introduction for the arch(7) manpage.
> >   
> >   Start with some words about linear address space and its layout, then
> >   explain pointers models and ABIs, providing explanation to the
> >   structure of the tables.
> >   
> >   Reviewed by:  emaste, imp
> >   'Future-proof' cheri wording by:  brooks
> >   Sponsored by: The FreeBSD Foundation
> >   MFC after:2 weeks
> >   Differential revision:https://reviews.freebsd.org/D10596
> 
> Note that mips n32 is neither ILP32 or LP64, it P32L64.  (Similar to x32
> for x86 if we were to ever add that.)  Thus, we support 3 ABIs rather
> than just 2.

I trust your information about MIPS n32, but x32 uses ILP32 model.
In particular, sizeof(long) == 4, according to the AMD64 ABI Draft 0.99.8,
which includes both LP64 and ILP32 (x32) ABI description.

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


svn commit: r317980 - head/share/mk

2017-05-08 Thread Bryan Drewery
Author: bdrewery
Date: Mon May  8 20:44:21 2017
New Revision: 317980
URL: https://svnweb.freebsd.org/changeset/base/317980

Log:
  Fix syntax error in parse_path after r316952.
  
  Also fix bad whitespace in sort_unique after r314809.
  
  The parse_path syntax error came up in DIRDEPS_BUILD as the following
  and emptied out all Makefile.depend files due to it:
  
# python share/mk/meta2deps.py
  File "share/mk/meta2deps.py", line 538
rdir = os.path.realpath(dir)
^
IndentationError: unexpected indent
  
  Sponsored by: Dell EMC Isilon

Modified:
  head/share/mk/meta2deps.py

Modified: head/share/mk/meta2deps.py
==
--- head/share/mk/meta2deps.py  Mon May  8 20:44:12 2017(r317979)
+++ head/share/mk/meta2deps.py  Mon May  8 20:44:21 2017(r317980)
@@ -143,7 +143,7 @@ def sort_unique(list, cmp=None, key=None
 for e in list:
 if e == le:
 continue
-   le = e
+le = e
 nl.append(e)
 return nl
 
@@ -535,7 +535,7 @@ class MetaFile:
 # to the src dir, we may need to add dependencies for each
 rdir = dir
 dir = abspath(dir, cwd, self.last_dir, self.debug, self.debug_out)
-rdir = os.path.realpath(dir)
+rdir = os.path.realpath(dir)
 if rdir == dir:
 rdir = None
 # now put path back together
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317979 - head/targets/pseudo/userland

2017-05-08 Thread Bryan Drewery
Author: bdrewery
Date: Mon May  8 20:44:12 2017
New Revision: 317979
URL: https://svnweb.freebsd.org/changeset/base/317979

Log:
  Remove MK_MANDOCDB option missed in r315057

Modified:
  head/targets/pseudo/userland/Makefile.depend

Modified: head/targets/pseudo/userland/Makefile.depend
==
--- head/targets/pseudo/userland/Makefile.dependMon May  8 20:30:30 
2017(r317978)
+++ head/targets/pseudo/userland/Makefile.dependMon May  8 20:44:12 
2017(r317979)
@@ -2,14 +2,9 @@
 
 # This file is not autogenerated - take care!
 
-.if !defined(MK_MANDOCDB)
 .include 
-.endif
 
 DIRDEPS=
-.if ${MK_MANDOCDB} == "no"
-DIRDEPS+= usr.bin/makewhatis
-.endif
 DIRDEPS+= \
bin/cat \
bin/chflags \
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r317938 - head/share/man/man7

2017-05-08 Thread John Baldwin
On Monday, May 08, 2017 02:17:10 PM Ed Maste wrote:
> Author: emaste
> Date: Mon May  8 14:17:10 2017
> New Revision: 317938
> URL: https://svnweb.freebsd.org/changeset/base/317938
> 
> Log:
>   arch(7): correct initial versions for alpha and pc98
>   
>   Submitted by:   imp
> 
> Modified:
>   head/share/man/man7/arch.7
> 
> Modified: head/share/man/man7/arch.7
> ==
> --- head/share/man/man7/arch.7Mon May  8 13:09:27 2017
> (r317937)
> +++ head/share/man/man7/arch.7Mon May  8 14:17:10 2017
> (r317938)
> @@ -90,7 +90,7 @@ architectures, the final release.
>  .Pp
>  .Bl -column -offset indent "Sy Architecture" "Sy Initial Release" "Sy Final 
> Release"
>  .It Sy Architecture Ta Sy Initial Release Ta Sy Final Release
> -.It alpha   Ta 1.0   Ta 6.4
> +.It alpha   Ta 3.x   Ta 6.4

3.2 for alpha?  Alpha is mentioned explicitly in the release notes for
3.2, 3.3, and 3.4, and the commit to add "multi-architecture" support to
src/release/Makefile was MFC'd stable/3 in between 3.1 and 3.2.

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


Re: svn commit: r317809 - head/share/man/man7

2017-05-08 Thread John Baldwin
On Thursday, May 04, 2017 09:31:50 PM Konstantin Belousov wrote:
> Author: kib
> Date: Thu May  4 21:31:50 2017
> New Revision: 317809
> URL: https://svnweb.freebsd.org/changeset/base/317809
> 
> Log:
>   Provide introduction for the arch(7) manpage.
>   
>   Start with some words about linear address space and its layout, then
>   explain pointers models and ABIs, providing explanation to the
>   structure of the tables.
>   
>   Reviewed by:emaste, imp
>   'Future-proof' cheri wording by:brooks
>   Sponsored by:   The FreeBSD Foundation
>   MFC after:  2 weeks
>   Differential revision:  https://reviews.freebsd.org/D10596

Note that mips n32 is neither ILP32 or LP64, it P32L64.  (Similar to x32
for x86 if we were to ever add that.)  Thus, we support 3 ABIs rather
than just 2.

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


svn commit: r317978 - stable/10/sys/fs/nfsclient

2017-05-08 Thread Rick Macklem
Author: rmacklem
Date: Mon May  8 20:30:30 2017
New Revision: 317978
URL: https://svnweb.freebsd.org/changeset/base/317978

Log:
  MFC: r317305
  Fix the NFSv4.1/pNFS client return layout on close.
  
  The "return layout on close" case in the pNFS client was badly broken.
  Fortunately, extant pNFS servers that I have tested against do not
  do this. This patch fixes it. It also changes the way the layout stateid.seqid
  is set for LayoutReturn. I think this change is correct w.r.t. the RFC,
  but I am not 100% sure.
  This was found during recent testing of the pNFS server under development.

Modified:
  stable/10/sys/fs/nfsclient/nfs_clstate.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/nfsclient/nfs_clstate.c
==
--- stable/10/sys/fs/nfsclient/nfs_clstate.cMon May  8 20:21:10 2017
(r317977)
+++ stable/10/sys/fs/nfsclient/nfs_clstate.cMon May  8 20:30:30 2017
(r317978)
@@ -88,6 +88,8 @@ extern struct nfsstats newnfsstats;
 extern struct nfsreqhead nfsd_reqq;
 extern u_int32_t newnfs_false, newnfs_true;
 extern int nfscl_debuglevel;
+extern int nfscl_enablecallb;
+extern int nfs_numnfscbd;
 NFSREQSPINLOCK;
 NFSCLSTATEMUTEX;
 int nfscl_inited = 0;
@@ -118,7 +120,8 @@ static struct nfsclclient *nfscl_getclnt
 static struct nfsclclient *nfscl_getclntsess(uint8_t *);
 static struct nfscldeleg *nfscl_finddeleg(struct nfsclclient *, u_int8_t *,
 int);
-static void nfscl_retoncloselayout(struct nfsclclient *, uint8_t *, int);
+static void nfscl_retoncloselayout(vnode_t, struct nfsclclient *, uint8_t *,
+int, struct nfsclrecalllayout **);
 static void nfscl_reldevinfo_locked(struct nfscldevinfo *);
 static struct nfscllayout *nfscl_findlayout(struct nfsclclient *, u_int8_t *,
 int);
@@ -3121,6 +3124,7 @@ nfscl_doclose(vnode_t vp, struct nfsclcl
struct nfsclopen *op;
struct nfscldeleg *dp;
struct nfsfh *nfhp;
+   struct nfsclrecalllayout *recallp;
int error;
 
error = nfscl_getcl(vnode_mount(vp), NULL, NULL, 1, &clp);
@@ -3129,6 +3133,7 @@ nfscl_doclose(vnode_t vp, struct nfsclcl
*clpp = clp;
 
nfhp = VTONFS(vp)->n_fhp;
+   recallp = malloc(sizeof(*recallp), M_NFSLAYRECALL, M_WAITOK);
NFSLOCKCLSTATE();
/*
 * First get rid of the local Open structures, which should be no
@@ -3148,7 +3153,7 @@ nfscl_doclose(vnode_t vp, struct nfsclcl
}
 
/* Return any layouts marked return on close. */
-   nfscl_retoncloselayout(clp, nfhp->nfh_fh, nfhp->nfh_len);
+   nfscl_retoncloselayout(vp, clp, nfhp->nfh_fh, nfhp->nfh_len, &recallp);
 
/* Now process the opens against the server. */
 lookformore:
@@ -3171,6 +3176,11 @@ lookformore:
}
}
NFSUNLOCKCLSTATE();
+   /*
+* recallp has been set NULL by nfscl_retoncloselayout() if it was
+* used by the function, but calling free() with a NULL pointer is ok.
+*/
+   free(recallp, M_NFSLAYRECALL);
return (0);
 }
 
@@ -4890,28 +4900,32 @@ nfscl_getlayout(struct nfsclclient *clp,
 }
 
 /*
- * Search for a layout by MDS file handle. If one is found that is marked
- * "return on close", delete it, since it should now be forgotten.
+ * Search for a layout by MDS file handle. If one is found, mark in to be
+ * recalled, if it already marked "return on close".
  */
 static void
-nfscl_retoncloselayout(struct nfsclclient *clp, uint8_t *fhp, int fhlen)
+nfscl_retoncloselayout(vnode_t vp, struct nfsclclient *clp, uint8_t *fhp,
+int fhlen, struct nfsclrecalllayout **recallpp)
 {
struct nfscllayout *lyp;
+   uint32_t iomode;
 
-tryagain:
+   if (vp->v_type != VREG || !NFSHASPNFS(VFSTONFS(vnode_mount(vp))) ||
+   nfscl_enablecallb == 0 || nfs_numnfscbd == 0 ||
+   (VTONFS(vp)->n_flag & NNOLAYOUT) != 0)
+   return;
lyp = nfscl_findlayout(clp, fhp, fhlen);
-   if (lyp != NULL && (lyp->nfsly_flags & NFSLY_RETONCLOSE) != 0) {
-   /*
-* Wait for outstanding I/O ops to be done.
-*/
-   if (lyp->nfsly_lock.nfslock_usecnt != 0 ||
-   lyp->nfsly_lock.nfslock_lock != 0) {
-   lyp->nfsly_lock.nfslock_lock |= NFSV4LOCK_WANTED;
-   (void)mtx_sleep(&lyp->nfsly_lock,
-   NFSCLSTATEMUTEXPTR, PZERO, "nfslyc", 0);
-   goto tryagain;
-   }
-   nfscl_freelayout(lyp);
+   if (lyp != NULL && (lyp->nfsly_flags & (NFSLY_RETONCLOSE |
+   NFSLY_RECALL)) == NFSLY_RETONCLOSE) {
+   iomode = 0;
+   if (!LIST_EMPTY(&lyp->nfsly_flayread))
+   iomode |= NFSLAYOUTIOMODE_READ;
+   if (!LIST_EMPTY(&lyp->nfsly_flayrw))
+   iomode |= NFSLAYOUTIOMODE_RW;
+   (void)nfscl_la

svn commit: r317977 - stable/11/sys/fs/nfsclient

2017-05-08 Thread Rick Macklem
Author: rmacklem
Date: Mon May  8 20:21:10 2017
New Revision: 317977
URL: https://svnweb.freebsd.org/changeset/base/317977

Log:
  MFC: r317305
  Fix the NFSv4.1/pNFS client return layout on close.
  
  The "return layout on close" case in the pNFS client was badly broken.
  Fortunately, extant pNFS servers that I have tested against do not
  do this. This patch fixes it. It also changes the way the layout stateid.seqid
  is set for LayoutReturn. I think this change is correct w.r.t. the RFC,
  but I am not 100% sure.
  This was found during recent testing of the pNFS server under development.

Modified:
  stable/11/sys/fs/nfsclient/nfs_clstate.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/fs/nfsclient/nfs_clstate.c
==
--- stable/11/sys/fs/nfsclient/nfs_clstate.cMon May  8 20:09:23 2017
(r317976)
+++ stable/11/sys/fs/nfsclient/nfs_clstate.cMon May  8 20:21:10 2017
(r317977)
@@ -88,6 +88,8 @@ extern struct nfsstatsv1 nfsstatsv1;
 extern struct nfsreqhead nfsd_reqq;
 extern u_int32_t newnfs_false, newnfs_true;
 extern int nfscl_debuglevel;
+extern int nfscl_enablecallb;
+extern int nfs_numnfscbd;
 NFSREQSPINLOCK;
 NFSCLSTATEMUTEX;
 int nfscl_inited = 0;
@@ -118,7 +120,8 @@ static struct nfsclclient *nfscl_getclnt
 static struct nfsclclient *nfscl_getclntsess(uint8_t *);
 static struct nfscldeleg *nfscl_finddeleg(struct nfsclclient *, u_int8_t *,
 int);
-static void nfscl_retoncloselayout(struct nfsclclient *, uint8_t *, int);
+static void nfscl_retoncloselayout(vnode_t, struct nfsclclient *, uint8_t *,
+int, struct nfsclrecalllayout **);
 static void nfscl_reldevinfo_locked(struct nfscldevinfo *);
 static struct nfscllayout *nfscl_findlayout(struct nfsclclient *, u_int8_t *,
 int);
@@ -3121,6 +3124,7 @@ nfscl_doclose(vnode_t vp, struct nfsclcl
struct nfsclopen *op;
struct nfscldeleg *dp;
struct nfsfh *nfhp;
+   struct nfsclrecalllayout *recallp;
int error;
 
error = nfscl_getcl(vnode_mount(vp), NULL, NULL, 1, &clp);
@@ -3129,6 +3133,7 @@ nfscl_doclose(vnode_t vp, struct nfsclcl
*clpp = clp;
 
nfhp = VTONFS(vp)->n_fhp;
+   recallp = malloc(sizeof(*recallp), M_NFSLAYRECALL, M_WAITOK);
NFSLOCKCLSTATE();
/*
 * First get rid of the local Open structures, which should be no
@@ -3148,7 +3153,7 @@ nfscl_doclose(vnode_t vp, struct nfsclcl
}
 
/* Return any layouts marked return on close. */
-   nfscl_retoncloselayout(clp, nfhp->nfh_fh, nfhp->nfh_len);
+   nfscl_retoncloselayout(vp, clp, nfhp->nfh_fh, nfhp->nfh_len, &recallp);
 
/* Now process the opens against the server. */
 lookformore:
@@ -3171,6 +3176,11 @@ lookformore:
}
}
NFSUNLOCKCLSTATE();
+   /*
+* recallp has been set NULL by nfscl_retoncloselayout() if it was
+* used by the function, but calling free() with a NULL pointer is ok.
+*/
+   free(recallp, M_NFSLAYRECALL);
return (0);
 }
 
@@ -4890,28 +4900,32 @@ nfscl_getlayout(struct nfsclclient *clp,
 }
 
 /*
- * Search for a layout by MDS file handle. If one is found that is marked
- * "return on close", delete it, since it should now be forgotten.
+ * Search for a layout by MDS file handle. If one is found, mark in to be
+ * recalled, if it already marked "return on close".
  */
 static void
-nfscl_retoncloselayout(struct nfsclclient *clp, uint8_t *fhp, int fhlen)
+nfscl_retoncloselayout(vnode_t vp, struct nfsclclient *clp, uint8_t *fhp,
+int fhlen, struct nfsclrecalllayout **recallpp)
 {
struct nfscllayout *lyp;
+   uint32_t iomode;
 
-tryagain:
+   if (vp->v_type != VREG || !NFSHASPNFS(VFSTONFS(vnode_mount(vp))) ||
+   nfscl_enablecallb == 0 || nfs_numnfscbd == 0 ||
+   (VTONFS(vp)->n_flag & NNOLAYOUT) != 0)
+   return;
lyp = nfscl_findlayout(clp, fhp, fhlen);
-   if (lyp != NULL && (lyp->nfsly_flags & NFSLY_RETONCLOSE) != 0) {
-   /*
-* Wait for outstanding I/O ops to be done.
-*/
-   if (lyp->nfsly_lock.nfslock_usecnt != 0 ||
-   lyp->nfsly_lock.nfslock_lock != 0) {
-   lyp->nfsly_lock.nfslock_lock |= NFSV4LOCK_WANTED;
-   (void)mtx_sleep(&lyp->nfsly_lock,
-   NFSCLSTATEMUTEXPTR, PZERO, "nfslyc", 0);
-   goto tryagain;
-   }
-   nfscl_freelayout(lyp);
+   if (lyp != NULL && (lyp->nfsly_flags & (NFSLY_RETONCLOSE |
+   NFSLY_RECALL)) == NFSLY_RETONCLOSE) {
+   iomode = 0;
+   if (!LIST_EMPTY(&lyp->nfsly_flayread))
+   iomode |= NFSLAYOUTIOMODE_READ;
+   if (!LIST_EMPTY(&lyp->nfsly_flayrw))
+   iomode |= NFSLAYOUTIOMODE_RW;
+   (void)nfscl_l

svn commit: r317976 - stable/11/sys/arm/arm

2017-05-08 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Mon May  8 20:09:23 2017
New Revision: 317976
URL: https://svnweb.freebsd.org/changeset/base/317976

Log:
  MFC r310791:
  
  [qemu] Fix VERSATILEPB kernel boot in QEMU broken by r300968
  
  QEMU does not implement hardware debug registers so when
  dbg_monitor_is_enabled is called kernel receives "invalid instruction"
  exception. QEMU implements only DIDR register and on read returns all
  zeroes to indicate that it doesn't support other registers. Real
  hardware has Version bits set.

Modified:
  stable/11/sys/arm/arm/debug_monitor.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/arm/arm/debug_monitor.c
==
--- stable/11/sys/arm/arm/debug_monitor.c   Mon May  8 19:57:43 2017
(r317975)
+++ stable/11/sys/arm/arm/debug_monitor.c   Mon May  8 20:09:23 2017
(r317976)
@@ -792,10 +792,21 @@ dbg_get_ossr(void)
 static __inline boolean_t
 dbg_arch_supported(void)
 {
+   uint32_t dbg_didr;
 
switch (dbg_model) {
case ID_DFR0_CP_DEBUG_M_V6:
case ID_DFR0_CP_DEBUG_M_V6_1:
+   dbg_didr = cp14_dbgdidr_get();
+   /*
+* read-all-zeroes is used by QEMU
+* to indicate that ARMv6 debug support
+* is not implemented. Real hardware has at
+* least version bits set
+*/
+   if (dbg_didr == 0)
+   return (FALSE);
+   return (TRUE);
case ID_DFR0_CP_DEBUG_M_V7:
case ID_DFR0_CP_DEBUG_M_V7_1:   /* fall through */
return (TRUE);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317974 - stable/11/sys/arm/broadcom/bcm2835

2017-05-08 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Mon May  8 19:57:15 2017
New Revision: 317974
URL: https://svnweb.freebsd.org/changeset/base/317974

Log:
  MFC r308424, r310636
  
  r308424:
  Fix locking in bcm2835_audio driver
  
  - Move all VCHI activity to worker thread: channel methods are called with
  non-sleepable lock held and VCHI uses sleepable lock.
  
  - In worker thread use sx(9) lock instead of mutex(9) for the same reason.
  
  PR:   213801, 205979
  
  r310636:
  [rpi] Fix bcm2835_audio locking and samples starvation
  
  Rework general approach to locking and working with audio worker thread:
  
  - Use flags to signal requested worker action
  - Fix submitted buffer calculations to avoid samples starvation
  - Protect buffer pointers with locks to fix race condition between callback
and audio worker thread
  - Remove unnecessary vchi_service_use
  - Do not use lock to serialize VCHI requests since only one thread issues 
them now
  - Fix unloading signaling per hselasky@ suggestion
  - Add output to detect inconsistent callback data caused by possible firmware 
bug
https://github.com/raspberrypi/firmware/issues/696
  - Add stats/debug sysctls to troubleshoot possible bugs
  
  PR:   213687, 205979, 215194

Modified:
  stable/11/sys/arm/broadcom/bcm2835/bcm2835_audio.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/arm/broadcom/bcm2835/bcm2835_audio.c
==
--- stable/11/sys/arm/broadcom/bcm2835/bcm2835_audio.c  Mon May  8 19:50:35 
2017(r317973)
+++ stable/11/sys/arm/broadcom/bcm2835/bcm2835_audio.c  Mon May  8 19:57:15 
2017(r317974)
@@ -40,13 +40,33 @@
 
 SND_DECLARE_FILE("$FreeBSD$");
 
+/* Audio destination */
 #defineDEST_AUTO   0
 #defineDEST_HEADPHONES 1
 #defineDEST_HDMI   2
 
+/* Playback state */
+#definePLAYBACK_IDLE   0
+#definePLAYBACK_PLAYING1
+#definePLAYBACK_STOPPING   2
+
+/* Worker thread state */
+#defineWORKER_RUNNING  0
+#defineWORKER_STOPPING 1
+#defineWORKER_STOPPED  2
+
+/*
+ * Worker thread flags, set to 1 in flags_pending
+ * when driver requests one or another operation
+ * from worker. Cleared to 0 once worker performs
+ * the operations.
+ */
+#defineAUDIO_PARAMS(1 << 0)
+#defineAUDIO_PLAY  (1 << 1)
+#defineAUDIO_STOP  (1 << 2)
+
 #defineVCHIQ_AUDIO_PACKET_SIZE 4000
-#defineVCHIQ_AUDIO_BUFFER_SIZE 128000
-#defineVCHIQ_AUDIO_PREBUFFER   10 /* Number of pre-buffered audio 
messages */
+#defineVCHIQ_AUDIO_BUFFER_SIZE 10*VCHIQ_AUDIO_PACKET_SIZE
 
 #defineVCHIQ_AUDIO_MAX_VOLUME  
 /* volume in terms of 0.01dB */
@@ -77,22 +97,25 @@ static struct pcmchan_caps bcm2835_audio
 
 struct bcm2835_audio_info;
 
-#definePLAYBACK_IDLE   0
-#definePLAYBACK_STARTING   1
-#definePLAYBACK_PLAYING2
-#definePLAYBACK_STOPPING   3
-
 struct bcm2835_audio_chinfo {
struct bcm2835_audio_info *parent;
struct pcm_channel *channel;
struct snd_dbuf *buffer;
uint32_t fmt, spd, blksz;
 
-   uint32_t complete_pos;
-   uint32_t free_buffer;
-   uint32_t buffered_ptr;
+   /* Pointer to first unsubmitted sample */
+   uint32_t unsubmittedptr;
+   /*
+* Number of bytes in "submitted but not played"
+* pseudo-buffer
+*/
+   int available_space;
int playback_state;
-   int prebuffered;
+   uint64_t callbacks;
+   uint64_t submitted_samples;
+   uint64_t retrieved_samples;
+   uint64_t underruns;
+   int starved;
 };
 
 struct bcm2835_audio_info {
@@ -100,29 +123,25 @@ struct bcm2835_audio_info {
unsigned int bufsz;
struct bcm2835_audio_chinfo pch;
uint32_t dest, volume;
-   struct mtx *lock;
struct intr_config_hook intr_hook;
 
/* VCHI data */
-   struct mtx vchi_lock;
-
VCHI_INSTANCE_T vchi_instance;
VCHI_CONNECTION_T *vchi_connection;
VCHI_SERVICE_HANDLE_T vchi_handle;
 
-   struct mtx data_lock;
-   struct cv data_cv;
+   struct mtx lock;
+   struct cv worker_cv;
 
-   /* Unloadign module */
-   int unloading;
-};
+   uint32_t flags_pending;
 
-#define bcm2835_audio_lock(_ess) snd_mtxlock((_ess)->lock)
-#define bcm2835_audio_unlock(_ess) snd_mtxunlock((_ess)->lock)
-#define bcm2835_audio_lock_assert(_ess) snd_mtxassert((_ess)->lock)
+   /* Worker thread state */
+   int worker_state;
+};
 
-#define VCHIQ_VCHI_LOCK(sc)mtx_lock(&(sc)->vchi_lock)
-#define VCHIQ_VCHI_UNLOCK(sc)  mtx_unlock(&(sc)->vchi_lock)
+#define BCM2835_AUDIO_LOCK(sc) mtx_lock(&(sc)->lock)
+#define BCM2835_AUDIO_LOCKED(sc)   mtx_assert(&(sc)->lock, MA_OWNED)

svn commit: r317975 - stable/10/sys/fs/nfsclient

2017-05-08 Thread Rick Macklem
Author: rmacklem
Date: Mon May  8 19:57:43 2017
New Revision: 317975
URL: https://svnweb.freebsd.org/changeset/base/317975

Log:
  MFC: r317296
  Fix some krpc leaks for the NFSv4.1/pNFS client.
  
  The NFSv4.1/pNFS client wasn't doing a newnfs_disconnect() call for the
  connection to the Data Server (DS) under some circumstances. The main
  effect of this was a leak of malloc'd structures in the krpc. This patch
  adds the newnfs_disconnect() calls to fix this.
  Detected during recent testing against the pNFS server under development.

Modified:
  stable/10/sys/fs/nfsclient/nfs_clrpcops.c
  stable/10/sys/fs/nfsclient/nfs_clvfsops.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c
==
--- stable/10/sys/fs/nfsclient/nfs_clrpcops.c   Mon May  8 19:57:15 2017
(r317974)
+++ stable/10/sys/fs/nfsclient/nfs_clrpcops.c   Mon May  8 19:57:43 2017
(r317975)
@@ -5396,10 +5396,13 @@ nfsrpc_fillsa(struct nfsmount *nmp, stru
NFSCL_DEBUG(3, "DS connect=%d\n", error);
 
/* Now, do the exchangeid and create session. */
-   if (error == 0)
+   if (error == 0) {
error = nfsrpc_exchangeid(nmp, clp, nrp, NFSV4EXCH_USEPNFSDS,
&dsp, nrp->nr_cred, p);
-   NFSCL_DEBUG(3, "DS exchangeid=%d\n", error);
+   NFSCL_DEBUG(3, "DS exchangeid=%d\n", error);
+   if (error != 0)
+   newnfs_disconnect(nrp);
+   }
if (error == 0) {
dsp->nfsclds_sockp = nrp;
NFSLOCKMNT(nmp);
@@ -5442,8 +5445,10 @@ nfsrpc_fillsa(struct nfsmount *nmp, stru
TAILQ_INSERT_TAIL(&nmp->nm_sess, dsp, nfsclds_list);
NFSUNLOCKMNT(nmp);
*dspp = dsp;
-   } else if (dsp != NULL)
+   } else if (dsp != NULL) {
+   newnfs_disconnect(nrp);
nfscl_freenfsclds(dsp);
+   }
return (error);
 }
 

Modified: stable/10/sys/fs/nfsclient/nfs_clvfsops.c
==
--- stable/10/sys/fs/nfsclient/nfs_clvfsops.c   Mon May  8 19:57:15 2017
(r317974)
+++ stable/10/sys/fs/nfsclient/nfs_clvfsops.c   Mon May  8 19:57:43 2017
(r317975)
@@ -1527,8 +1527,12 @@ bad:
NFSUNLOCKCLSTATE();
free(nmp->nm_clp, M_NFSCLCLIENT);
}
-   TAILQ_FOREACH_SAFE(dsp, &nmp->nm_sess, nfsclds_list, tdsp)
+   TAILQ_FOREACH_SAFE(dsp, &nmp->nm_sess, nfsclds_list, tdsp) {
+   if (dsp != TAILQ_FIRST(&nmp->nm_sess) &&
+   dsp->nfsclds_sockp != NULL)
+   newnfs_disconnect(dsp->nfsclds_sockp);
nfscl_freenfsclds(dsp);
+   }
FREE(nmp, M_NEWNFSMNT);
FREE(nam, M_SONAME);
return (error);
@@ -1593,8 +1597,12 @@ nfs_unmount(struct mount *mp, int mntfla
AUTH_DESTROY(nmp->nm_sockreq.nr_auth);
mtx_destroy(&nmp->nm_sockreq.nr_mtx);
mtx_destroy(&nmp->nm_mtx);
-   TAILQ_FOREACH_SAFE(dsp, &nmp->nm_sess, nfsclds_list, tdsp)
+   TAILQ_FOREACH_SAFE(dsp, &nmp->nm_sess, nfsclds_list, tdsp) {
+   if (dsp != TAILQ_FIRST(&nmp->nm_sess) &&
+   dsp->nfsclds_sockp != NULL)
+   newnfs_disconnect(dsp->nfsclds_sockp);
nfscl_freenfsclds(dsp);
+   }
FREE(nmp, M_NEWNFSMNT);
 out:
return (error);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317973 - stable/11/sys/fs/nfsclient

2017-05-08 Thread Rick Macklem
Author: rmacklem
Date: Mon May  8 19:50:35 2017
New Revision: 317973
URL: https://svnweb.freebsd.org/changeset/base/317973

Log:
  MFC: r317296
  Fix some krpc leaks for the NFSv4.1/pNFS client.
  
  The NFSv4.1/pNFS client wasn't doing a newnfs_disconnect() call for the
  connection to the Data Server (DS) under some circumstances. The main
  effect of this was a leak of malloc'd structures in the krpc. This patch
  adds the newnfs_disconnect() calls to fix this.
  Detected during recent testing against the pNFS server under development.

Modified:
  stable/11/sys/fs/nfsclient/nfs_clrpcops.c
  stable/11/sys/fs/nfsclient/nfs_clvfsops.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/fs/nfsclient/nfs_clrpcops.c
==
--- stable/11/sys/fs/nfsclient/nfs_clrpcops.c   Mon May  8 19:46:33 2017
(r317972)
+++ stable/11/sys/fs/nfsclient/nfs_clrpcops.c   Mon May  8 19:50:35 2017
(r317973)
@@ -5399,10 +5399,13 @@ nfsrpc_fillsa(struct nfsmount *nmp, stru
NFSCL_DEBUG(3, "DS connect=%d\n", error);
 
/* Now, do the exchangeid and create session. */
-   if (error == 0)
+   if (error == 0) {
error = nfsrpc_exchangeid(nmp, clp, nrp, NFSV4EXCH_USEPNFSDS,
&dsp, nrp->nr_cred, p);
-   NFSCL_DEBUG(3, "DS exchangeid=%d\n", error);
+   NFSCL_DEBUG(3, "DS exchangeid=%d\n", error);
+   if (error != 0)
+   newnfs_disconnect(nrp);
+   }
if (error == 0) {
dsp->nfsclds_sockp = nrp;
NFSLOCKMNT(nmp);
@@ -5445,8 +5448,10 @@ nfsrpc_fillsa(struct nfsmount *nmp, stru
TAILQ_INSERT_TAIL(&nmp->nm_sess, dsp, nfsclds_list);
NFSUNLOCKMNT(nmp);
*dspp = dsp;
-   } else if (dsp != NULL)
+   } else if (dsp != NULL) {
+   newnfs_disconnect(nrp);
nfscl_freenfsclds(dsp);
+   }
return (error);
 }
 

Modified: stable/11/sys/fs/nfsclient/nfs_clvfsops.c
==
--- stable/11/sys/fs/nfsclient/nfs_clvfsops.c   Mon May  8 19:46:33 2017
(r317972)
+++ stable/11/sys/fs/nfsclient/nfs_clvfsops.c   Mon May  8 19:50:35 2017
(r317973)
@@ -1643,8 +1643,12 @@ bad:
NFSUNLOCKCLSTATE();
free(nmp->nm_clp, M_NFSCLCLIENT);
}
-   TAILQ_FOREACH_SAFE(dsp, &nmp->nm_sess, nfsclds_list, tdsp)
+   TAILQ_FOREACH_SAFE(dsp, &nmp->nm_sess, nfsclds_list, tdsp) {
+   if (dsp != TAILQ_FIRST(&nmp->nm_sess) &&
+   dsp->nfsclds_sockp != NULL)
+   newnfs_disconnect(dsp->nfsclds_sockp);
nfscl_freenfsclds(dsp);
+   }
FREE(nmp, M_NEWNFSMNT);
FREE(nam, M_SONAME);
return (error);
@@ -1709,8 +1713,12 @@ nfs_unmount(struct mount *mp, int mntfla
AUTH_DESTROY(nmp->nm_sockreq.nr_auth);
mtx_destroy(&nmp->nm_sockreq.nr_mtx);
mtx_destroy(&nmp->nm_mtx);
-   TAILQ_FOREACH_SAFE(dsp, &nmp->nm_sess, nfsclds_list, tdsp)
+   TAILQ_FOREACH_SAFE(dsp, &nmp->nm_sess, nfsclds_list, tdsp) {
+   if (dsp != TAILQ_FIRST(&nmp->nm_sess) &&
+   dsp->nfsclds_sockp != NULL)
+   newnfs_disconnect(dsp->nfsclds_sockp);
nfscl_freenfsclds(dsp);
+   }
FREE(nmp, M_NEWNFSMNT);
 out:
return (error);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317970 - stable/11/sys/contrib/vchiq/interface/vchiq_arm

2017-05-08 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Mon May  8 19:22:59 2017
New Revision: 317970
URL: https://svnweb.freebsd.org/changeset/base/317970

Log:
  MFC r310560:
  
  [vchi] replace non-reproducible __DATE__/__TIME__ with hardcoded string
  
  Although vchiq_build_date and vchiq_build_time are not used in current
  vchi driver at the moment, make sure these value will not leak into
  build later on if at some point they will be refered in some new
  imported code
  
  PR:   215494
  Reported by:  emaste

Modified:
  stable/11/sys/contrib/vchiq/interface/vchiq_arm/vchiq_version.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/contrib/vchiq/interface/vchiq_arm/vchiq_version.c
==
--- stable/11/sys/contrib/vchiq/interface/vchiq_arm/vchiq_version.c Mon May 
 8 19:20:55 2017(r317969)
+++ stable/11/sys/contrib/vchiq/interface/vchiq_arm/vchiq_version.c Mon May 
 8 19:22:59 2017(r317970)
@@ -35,8 +35,8 @@
 
 VC_DEBUG_DECLARE_STRING_VAR( vchiq_build_hostname, "dc4-arm-01" );
 VC_DEBUG_DECLARE_STRING_VAR( vchiq_build_version, 
"9245b4c35b99b3870e1f7dc598c5692b3c66a6f0 (tainted)" );
-VC_DEBUG_DECLARE_STRING_VAR( vchiq_build_time,__TIME__ );
-VC_DEBUG_DECLARE_STRING_VAR( vchiq_build_date,__DATE__ );
+VC_DEBUG_DECLARE_STRING_VAR( vchiq_build_time,"not available" );
+VC_DEBUG_DECLARE_STRING_VAR( vchiq_build_date,"not available" );
 
 const char *vchiq_get_build_hostname( void )
 {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317968 - head

2017-05-08 Thread John Baldwin
Author: jhb
Date: Mon May  8 18:51:13 2017
New Revision: 317968
URL: https://svnweb.freebsd.org/changeset/base/317968

Log:
  Honor WITHOUT_LIB32 on mips64.
  
  The closing paren for the list of architectures that should enable LIB32
  by default was in the wrong place resulting in LIB32 always be enabled on
  mips64 regardless of WITH_LIB32/WITHOUT_LIB32.
  
  Submitted by: Alex Richardson 
  Obtained from:CheriBSD
  Sponsored by: DARPA / AFRL

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Mon May  8 18:42:38 2017(r317967)
+++ head/Makefile.inc1  Mon May  8 18:51:13 2017(r317968)
@@ -628,7 +628,7 @@ XCFLAGS+=   ${BFLAGS}
 .endif
 
 .if ${MK_LIB32} != "no" && (${TARGET_ARCH} == "amd64" || \
-${TARGET_ARCH} == "powerpc64") || ${TARGET_ARCH:Mmips64*} != ""
+${TARGET_ARCH} == "powerpc64" || ${TARGET_ARCH:Mmips64*} != "")
 LIBCOMPAT= 32
 .include "Makefile.libcompat"
 .elif ${MK_LIBSOFT} != "no" && ${TARGET_ARCH} == "armv6"
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r317744 - in head/usr.sbin/makefs: . ffs

2017-05-08 Thread Ngie Cooper (yaneurabeya)

> On May 8, 2017, at 11:24, Ngie Cooper (yaneurabeya)  
> wrote:
> 
>> 
>> On May 3, 2017, at 07:21, Ed Maste  wrote:
>> 
>> Author: emaste
>> Date: Wed May  3 14:21:18 2017
>> New Revision: 317744
>> URL: https://svnweb.freebsd.org/changeset/base/317744
>> 
>> Log:
>> makefs: make buf generic
>> 
>> it has nothing to do with ffs and will eventually be moved.
>> gc sectorsize.
>> 
>> NetBSD versions:
>> ffs.c1.58
>> ffs/buf.c1.14 1.18
>> ffs/buf.h1.8
>> 
>> Obtained from:   NetBSD
>> Sponsored by:The FreeBSD Foundation
> 
> This commit broke building releases and a number of tests: 
> https://ci.freebsd.org/job/FreeBSD-head-amd64-test/3003/ .
> Thanks,
> -Ngie

I reverted the `sectorsize` portion of this change in r317967 to 
unbreak the makefs and the fstyp tests. It seems that ffs_validate(..) isn’t 
called in all cases properly, or the structure isn’t being initialized properly.
Thanks,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r317967 - in head/usr.sbin/makefs: . ffs

2017-05-08 Thread Ngie Cooper
Author: ngie
Date: Mon May  8 18:42:38 2017
New Revision: 317967
URL: https://svnweb.freebsd.org/changeset/base/317967

Log:
  Restore `sectorsize` global to unbreak makefs after r317744
  
  This also unbreaks the fstyp tests.
  
  Reported by:  Alastair Hogge , Jenkins
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/makefs/ffs.c
  head/usr.sbin/makefs/ffs/buf.c

Modified: head/usr.sbin/makefs/ffs.c
==
--- head/usr.sbin/makefs/ffs.c  Mon May  8 18:30:56 2017(r317966)
+++ head/usr.sbin/makefs/ffs.c  Mon May  8 18:42:38 2017(r317967)
@@ -143,7 +143,7 @@ static  void*ffs_build_dinode2(struct u
 fsnode *, fsinfo_t *);
 
 
-
+intsectorsize; /* XXX: for buf.c::getblk() */
/* publicly visible functions */
 
 void
@@ -426,6 +426,8 @@ ffs_validate(const char *dir, fsnode *ro
printf("ffs_validate: dir %s; %lld bytes, %lld inodes\n",
dir, (long long)fsopts->size, (long long)fsopts->inodes);
}
+   sectorsize = fsopts->sectorsize;/* XXX - see earlier */
+
/* now check calculated sizes vs requested sizes */
if (fsopts->maxsize > 0 && fsopts->size > fsopts->maxsize) {
errx(1, "`%s' size of %lld is larger than the maxsize of %lld.",

Modified: head/usr.sbin/makefs/ffs/buf.c
==
--- head/usr.sbin/makefs/ffs/buf.c  Mon May  8 18:30:56 2017
(r317966)
+++ head/usr.sbin/makefs/ffs/buf.c  Mon May  8 18:42:38 2017
(r317967)
@@ -52,6 +52,8 @@ __FBSDID("$FreeBSD$");
 #include "makefs.h"
 #include "buf.h"
 
+extern int sectorsize; /* XXX: from ffs.c & mkfs.c */
+
 static TAILQ_HEAD(buftailhead,buf) buftail;
 
 int
@@ -60,7 +62,6 @@ bread(struct vnode *vp, daddr_t blkno, i
 {
off_t   offset;
ssize_t rv;
-   fsinfo_t *fs = vp->fs;
 
assert (bpp != NULL);
 
@@ -68,7 +69,7 @@ bread(struct vnode *vp, daddr_t blkno, i
printf("%s: blkno %lld size %d\n", __func__, (long long)blkno,
size);
*bpp = getblk(vp, blkno, size, 0, 0, 0);
-   offset = (*bpp)->b_blkno * fs->sectorsize;
+   offset = (*bpp)->b_blkno * sectorsize;  /* XXX */
if (debug & DEBUG_BUF_BREAD)
printf("%s: blkno %lld offset %lld bcount %ld\n", __func__,
(long long)(*bpp)->b_blkno, (long long) offset,
@@ -125,10 +126,9 @@ bwrite(struct buf *bp)
 {
off_t   offset;
ssize_t rv;
-   fsinfo_t *fs = bp->b_fs;
 
assert (bp != NULL);
-   offset = bp->b_blkno * fs->sectorsize;
+   offset = bp->b_blkno * sectorsize;  /* XXX */
if (debug & DEBUG_BUF_BWRITE)
printf("bwrite: blkno %lld offset %lld bcount %ld\n",
(long long)bp->b_blkno, (long long) offset,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317966 - stable/10/sbin/camcontrol

2017-05-08 Thread Kenneth D. Merry
Author: ken
Date: Mon May  8 18:30:56 2017
New Revision: 317966
URL: https://svnweb.freebsd.org/changeset/base/317966

Log:
  MFC r317854:
  
When editing a mode page on a tape drive, do not clear the device
specific parameter.
  
Tape drives include write protect (WP), Buffered Mode and Speed
settings in the device-specific parameter.  Clearing this
parameter on a mode select can have the effect of turning off
write protect or buffered mode, or changing the speed setting of
the tape drive.
  
Disks report DPO/FUA support via the device specific parameter
for MODE SENSE, but the bit is reserved for MODE SELECT.  So we
clear this for disks (and other non-tape devices) to avoid
potential errors from the target device.
  
sbin/camcontrol/modeedit.c:
Clear the device-specific parameter in the mode page
header if we're not operating on a tape drive.
  
  Sponsored by: Spectra Logic

Modified:
  stable/10/sbin/camcontrol/modeedit.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/camcontrol/modeedit.c
==
--- stable/10/sbin/camcontrol/modeedit.cMon May  8 18:30:55 2017
(r317965)
+++ stable/10/sbin/camcontrol/modeedit.cMon May  8 18:30:56 2017
(r317966)
@@ -629,8 +629,21 @@ editlist_save(struct cam_device *device,
 
/* Recalculate headers & offsets. */
mh->data_length = 0;/* Reserved for MODE SELECT command. */
-   mh->dev_spec = 0;   /* Clear device-specific parameters. */
mh->blk_desc_len = 0;   /* No block descriptors. */
+   /*
+* Tape drives include write protect (WP), Buffered Mode and Speed
+* settings in the device-specific parameter.  Clearing this
+* parameter on a mode select can have the effect of turning off
+* write protect or buffered mode, or changing the speed setting of
+* the tape drive.
+*
+* Disks report DPO/FUA support via the device specific parameter
+* for MODE SENSE, but the bit is reserved for MODE SELECT.  So we
+* clear this for disks (and other non-tape devices) to avoid
+* potential errors from the target device.
+*/
+   if (device->pd_type != T_SEQUENTIAL)
+   mh->dev_spec = 0;
mph = MODE_PAGE_HEADER(mh);
mph->page_code &= ~SMPH_PS; /* Reserved for MODE SELECT command. */
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317965 - stable/11/sbin/camcontrol

2017-05-08 Thread Kenneth D. Merry
Author: ken
Date: Mon May  8 18:30:55 2017
New Revision: 317965
URL: https://svnweb.freebsd.org/changeset/base/317965

Log:
  MFC r317854:
  
When editing a mode page on a tape drive, do not clear the device
specific parameter.
  
Tape drives include write protect (WP), Buffered Mode and Speed
settings in the device-specific parameter.  Clearing this
parameter on a mode select can have the effect of turning off
write protect or buffered mode, or changing the speed setting of
the tape drive.
  
Disks report DPO/FUA support via the device specific parameter
for MODE SENSE, but the bit is reserved for MODE SELECT.  So we
clear this for disks (and other non-tape devices) to avoid
potential errors from the target device.
  
sbin/camcontrol/modeedit.c:
Clear the device-specific parameter in the mode page
header if we're not operating on a tape drive.
  
  Sponsored by: Spectra Logic

Modified:
  stable/11/sbin/camcontrol/modeedit.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/camcontrol/modeedit.c
==
--- stable/11/sbin/camcontrol/modeedit.cMon May  8 17:55:51 2017
(r317964)
+++ stable/11/sbin/camcontrol/modeedit.cMon May  8 18:30:55 2017
(r317965)
@@ -629,8 +629,21 @@ editlist_save(struct cam_device *device,
 
/* Recalculate headers & offsets. */
mh->data_length = 0;/* Reserved for MODE SELECT command. */
-   mh->dev_spec = 0;   /* Clear device-specific parameters. */
mh->blk_desc_len = 0;   /* No block descriptors. */
+   /*
+* Tape drives include write protect (WP), Buffered Mode and Speed
+* settings in the device-specific parameter.  Clearing this
+* parameter on a mode select can have the effect of turning off
+* write protect or buffered mode, or changing the speed setting of
+* the tape drive.
+*
+* Disks report DPO/FUA support via the device specific parameter
+* for MODE SENSE, but the bit is reserved for MODE SELECT.  So we
+* clear this for disks (and other non-tape devices) to avoid
+* potential errors from the target device.
+*/
+   if (device->pd_type != T_SEQUENTIAL)
+   mh->dev_spec = 0;
mph = MODE_PAGE_HEADER(mh);
mph->page_code &= ~SMPH_PS; /* Reserved for MODE SELECT command. */
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r317744 - in head/usr.sbin/makefs: . ffs

2017-05-08 Thread Ngie Cooper (yaneurabeya)

> On May 3, 2017, at 07:21, Ed Maste  wrote:
> 
> Author: emaste
> Date: Wed May  3 14:21:18 2017
> New Revision: 317744
> URL: https://svnweb.freebsd.org/changeset/base/317744
> 
> Log:
>  makefs: make buf generic
> 
>  it has nothing to do with ffs and will eventually be moved.
>  gc sectorsize.
> 
>  NetBSD versions:
>  ffs.c1.58
>  ffs/buf.c1.14 1.18
>  ffs/buf.h1.8
> 
>  Obtained from:   NetBSD
>  Sponsored by:The FreeBSD Foundation

This commit broke building releases and a number of tests: 
https://ci.freebsd.org/job/FreeBSD-head-amd64-test/3003/ .
Thanks,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r317963 - in stable/11: share/man/man4 sys/cam/scsi usr.bin/mt

2017-05-08 Thread Kenneth D. Merry
Author: ken
Date: Mon May  8 17:55:49 2017
New Revision: 317963
URL: https://svnweb.freebsd.org/changeset/base/317963

Log:
  MFC r317848:
  
Add basic programmable early warning error injection to the sa(4) driver.
  
This will help application developers simulate end of tape conditions.
  
To inject an error in sa0:
  
sysctl kern.cam.sa.0.inject_eom=1
  
This will return the next read or write request queued with 0 bytes
written.  Any subsequent writes or reads will go along as usual.
  
This will also cause the early warning position flag to get set
for the next position query.  So, 'mt status' will show the BPEW
(Beyond Programmable Early Warning) flag on the first query after
an error injection.  After that, the position flags will be as they
are in the underlying tape drive.
  
Also, update the sa(4) man page to describe tape parameters,
which can be set via 'mt param'.
  
sys/cam/scsi/scsi_sa.c:
In saregister(), create the inject_eom sysctl variable.
  
In sastart(), check to see whether inject_eom is set.  If
so, return the read or write with 0 bytes written to
indicate EOM.  Set the set_pews_status flag so that we
fake PEWS status in the next position call for reads, and the
next 3 calls for writes.  This allows the user to see the BPEW
flag one time via 'mt status'.
  
In sagetpos(), check the set_pews_status flag and fake
PEWS status and decrement the counter if it is set.
  
share/man/man4/sa.4:
Document the inject_eom sysctl variable.
  
Document all of the parameters currently supported via
'mt param'.
  
usr.bin/mt/mt.1:
Point the user to the sa(4) man page for more details on
supported parameters.
  
  Sponsored by: Spectra Logic

Modified:
  stable/11/share/man/man4/sa.4
  stable/11/sys/cam/scsi/scsi_sa.c
  stable/11/usr.bin/mt/mt.1
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/man/man4/sa.4
==
--- stable/11/share/man/man4/sa.4   Mon May  8 17:21:57 2017
(r317962)
+++ stable/11/share/man/man4/sa.4   Mon May  8 17:55:49 2017
(r317963)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 12, 2015
+.Dd May 5, 2017
 .Dt SA 4
 .Os
 .Sh NAME
@@ -242,6 +242,87 @@ These devices include the QIC family of 
 block devices.
 This has not been determined yet, and they are treated
 as separate behaviors by the driver at this time.)
+.Sh PARAMETERS
+The
+.Nm
+driver supports a number of parameters.
+The user can query parameters using
+.Dq mt param -l
+(which uses the
+.Dv MTIOCPARAMGET
+ioctl) and the user can set parameters using
+.Dq mt param -s 
+(which uses the
+.Dv MTIOCPARAMSET
+ioctl).
+See
+.Xr mt 1
+and
+.Xr mtio 4
+for more details on the interface.
+.Pp
+Supported parameters:
+.Bl -tag -width 5n
+.It sili
+The default is 0.
+When set to 1, it sets the Suppress Incorrect Length Indicator (SILI) bit
+on tape reads.
+Tape drives normally return sense data (which contains the residual) when the
+application reads a block that is not the same length as the amount of data
+requested.
+The SILI bit supresses that notification in most cases.
+See the SSC-5 spec (available at t10.org), specifically the section on the
+READ(6) command, for more information.
+.It eot_warn
+The default is 0.
+By default, the
+.Nm
+driver reports entering Programmable Early Warning, Early Warning and End
+of Media conditions by returning a write with 0 bytes written, and
+.Dv errno
+set to 0.
+If 
+.Va eot_warn
+is set to 1, the
+.Nm
+driver will set
+.Dv errno
+to 
+.Dv ENOSPC
+when it enters any of the out of space conditions.
+.It protection.protection_supported
+This is a read-only parameter, and is set to 1 if the tape drive supports
+protection information.
+.It protection.prot_method
+If protection is supported, set this to the desired protection method
+supported by the tape drive.
+As of SSC-5r03 (available at t10.org), the protection method values are:
+.Bl -tag -width 3n
+.It 0
+No protection.
+.It 1
+Reed-Solomon CRC, 4 bytes in length.
+.It 2
+CRC32C, 4 bytes in length.
+.El
+.It protection.pi_length
+Length of the protection information, see above for lengths.
+.It protection.lbp_w
+If set to 1, enable logical block protection on writes.
+The CRC must be appended to the end of the block written to the tape driver.
+The tape drive will verify the CRC when it receives the block.
+.It protection.lbp_r
+If set to 1, enable logical block protection on reads.
+The CRC will be appended to the end of the block read from the tape driver.
+The application should verify the CRC when it receives the block.
+.It protection.rdbp
+If set to 1, enable logical block protection on the RECOVER BUFFERED DATA
+command.
+The
+.Nm
+driver does not currently use the
+RECOVER BUFFERED DATA command.
+.El
 .Sh IOCTLS
 The
 .N

svn commit: r317964 - in stable/10: share/man/man4 sys/cam/scsi usr.bin/mt

2017-05-08 Thread Kenneth D. Merry
Author: ken
Date: Mon May  8 17:55:51 2017
New Revision: 317964
URL: https://svnweb.freebsd.org/changeset/base/317964

Log:
  MFC r317848:
  
Add basic programmable early warning error injection to the sa(4) driver.
  
This will help application developers simulate end of tape conditions.
  
To inject an error in sa0:
  
sysctl kern.cam.sa.0.inject_eom=1
  
This will return the next read or write request queued with 0 bytes
written.  Any subsequent writes or reads will go along as usual.
  
This will also cause the early warning position flag to get set
for the next position query.  So, 'mt status' will show the BPEW
(Beyond Programmable Early Warning) flag on the first query after
an error injection.  After that, the position flags will be as they
are in the underlying tape drive.
  
Also, update the sa(4) man page to describe tape parameters,
which can be set via 'mt param'.
  
sys/cam/scsi/scsi_sa.c:
In saregister(), create the inject_eom sysctl variable.
  
In sastart(), check to see whether inject_eom is set.  If
so, return the read or write with 0 bytes written to
indicate EOM.  Set the set_pews_status flag so that we
fake PEWS status in the next position call for reads, and the
next 3 calls for writes.  This allows the user to see the BPEW
flag one time via 'mt status'.
  
In sagetpos(), check the set_pews_status flag and fake
PEWS status and decrement the counter if it is set.
  
share/man/man4/sa.4:
Document the inject_eom sysctl variable.
  
Document all of the parameters currently supported via
'mt param'.
  
usr.bin/mt/mt.1:
Point the user to the sa(4) man page for more details on
supported parameters.
  
  Sponsored by: Spectra Logic

Modified:
  stable/10/share/man/man4/sa.4
  stable/10/sys/cam/scsi/scsi_sa.c
  stable/10/usr.bin/mt/mt.1
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/man/man4/sa.4
==
--- stable/10/share/man/man4/sa.4   Mon May  8 17:55:49 2017
(r317963)
+++ stable/10/share/man/man4/sa.4   Mon May  8 17:55:51 2017
(r317964)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 12, 2015
+.Dd May 5, 2017
 .Dt SA 4
 .Os
 .Sh NAME
@@ -242,6 +242,87 @@ These devices include the QIC family of 
 block devices.
 This has not been determined yet, and they are treated
 as separate behaviors by the driver at this time.)
+.Sh PARAMETERS
+The
+.Nm
+driver supports a number of parameters.
+The user can query parameters using
+.Dq mt param -l
+(which uses the
+.Dv MTIOCPARAMGET
+ioctl) and the user can set parameters using
+.Dq mt param -s 
+(which uses the
+.Dv MTIOCPARAMSET
+ioctl).
+See
+.Xr mt 1
+and
+.Xr mtio 4
+for more details on the interface.
+.Pp
+Supported parameters:
+.Bl -tag -width 5n
+.It sili
+The default is 0.
+When set to 1, it sets the Suppress Incorrect Length Indicator (SILI) bit
+on tape reads.
+Tape drives normally return sense data (which contains the residual) when the
+application reads a block that is not the same length as the amount of data
+requested.
+The SILI bit supresses that notification in most cases.
+See the SSC-5 spec (available at t10.org), specifically the section on the
+READ(6) command, for more information.
+.It eot_warn
+The default is 0.
+By default, the
+.Nm
+driver reports entering Programmable Early Warning, Early Warning and End
+of Media conditions by returning a write with 0 bytes written, and
+.Dv errno
+set to 0.
+If 
+.Va eot_warn
+is set to 1, the
+.Nm
+driver will set
+.Dv errno
+to 
+.Dv ENOSPC
+when it enters any of the out of space conditions.
+.It protection.protection_supported
+This is a read-only parameter, and is set to 1 if the tape drive supports
+protection information.
+.It protection.prot_method
+If protection is supported, set this to the desired protection method
+supported by the tape drive.
+As of SSC-5r03 (available at t10.org), the protection method values are:
+.Bl -tag -width 3n
+.It 0
+No protection.
+.It 1
+Reed-Solomon CRC, 4 bytes in length.
+.It 2
+CRC32C, 4 bytes in length.
+.El
+.It protection.pi_length
+Length of the protection information, see above for lengths.
+.It protection.lbp_w
+If set to 1, enable logical block protection on writes.
+The CRC must be appended to the end of the block written to the tape driver.
+The tape drive will verify the CRC when it receives the block.
+.It protection.lbp_r
+If set to 1, enable logical block protection on reads.
+The CRC will be appended to the end of the block read from the tape driver.
+The application should verify the CRC when it receives the block.
+.It protection.rdbp
+If set to 1, enable logical block protection on the RECOVER BUFFERED DATA
+command.
+The
+.Nm
+driver does not currently use the
+RECOVER BUFFERED DATA command.
+.El
 .Sh IOCTLS
 The
 .N

svn commit: r317962 - stable/10/sys/cam/scsi

2017-05-08 Thread Kenneth D. Merry
Author: ken
Date: Mon May  8 17:21:57 2017
New Revision: 317962
URL: https://svnweb.freebsd.org/changeset/base/317962

Log:
  MFC r317799:
  
Add the SCSI Solid State Media Log page (0x11) definition.
  
sys/cam/scsi/scsi_all.h:
Add the SCSI Solid State Media log page (0x11) structure
definition.  This gives the percentage used (in terms of
lifetime flash wear) of an SSD.
  
  Sponsored by: Spectra Logic

Modified:
  stable/10/sys/cam/scsi/scsi_all.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/scsi/scsi_all.h
==
--- stable/10/sys/cam/scsi/scsi_all.h   Mon May  8 17:21:55 2017
(r317961)
+++ stable/10/sys/cam/scsi/scsi_all.h   Mon May  8 17:21:57 2017
(r317962)
@@ -565,6 +565,7 @@ struct scsi_log_sense
 #defineSLS_ERROR_LASTN_PAGE0x07
 #defineSLS_LOGICAL_BLOCK_PROVISIONING  0x0c
 #defineSLS_SELF_TEST_PAGE  0x10
+#defineSLS_SOLID_STATE_MEDIA   0x11
 #defineSLS_STAT_AND_PERF   0x19
 #defineSLS_IE_PAGE 0x2f
 #defineSLS_PAGE_CTRL_MASK  0xC0
@@ -624,6 +625,13 @@ struct scsi_log_param_header {
u_int8_t param_len;
 };
 
+struct scsi_log_media_pct_used {
+   struct scsi_log_param_header hdr;
+#defineSLP_SS_MEDIA_PCT_USED   0x0001
+   uint8_t reserved[3];
+   uint8_t pct_used;
+};
+
 struct scsi_log_stat_and_perf {
struct scsi_log_param_header hdr;
 #defineSLP_SAP 0x0001
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317961 - stable/11/sys/cam/scsi

2017-05-08 Thread Kenneth D. Merry
Author: ken
Date: Mon May  8 17:21:55 2017
New Revision: 317961
URL: https://svnweb.freebsd.org/changeset/base/317961

Log:
  MFC r317799:
  
Add the SCSI Solid State Media Log page (0x11) definition.
  
sys/cam/scsi/scsi_all.h:
Add the SCSI Solid State Media log page (0x11) structure
definition.  This gives the percentage used (in terms of
lifetime flash wear) of an SSD.
  
  Sponsored by: Spectra Logic

Modified:
  stable/11/sys/cam/scsi/scsi_all.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cam/scsi/scsi_all.h
==
--- stable/11/sys/cam/scsi/scsi_all.h   Mon May  8 17:14:01 2017
(r317960)
+++ stable/11/sys/cam/scsi/scsi_all.h   Mon May  8 17:21:55 2017
(r317961)
@@ -565,6 +565,7 @@ struct scsi_log_sense
 #defineSLS_ERROR_LASTN_PAGE0x07
 #defineSLS_LOGICAL_BLOCK_PROVISIONING  0x0c
 #defineSLS_SELF_TEST_PAGE  0x10
+#defineSLS_SOLID_STATE_MEDIA   0x11
 #defineSLS_STAT_AND_PERF   0x19
 #defineSLS_IE_PAGE 0x2f
 #defineSLS_PAGE_CTRL_MASK  0xC0
@@ -624,6 +625,13 @@ struct scsi_log_param_header {
u_int8_t param_len;
 };
 
+struct scsi_log_media_pct_used {
+   struct scsi_log_param_header hdr;
+#defineSLP_SS_MEDIA_PCT_USED   0x0001
+   uint8_t reserved[3];
+   uint8_t pct_used;
+};
+
 struct scsi_log_stat_and_perf {
struct scsi_log_param_header hdr;
 #defineSLP_SAP 0x0001
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r317942 - in head/usr.bin/csplit: . tests

2017-05-08 Thread Ngie Cooper (yaneurabeya)

> On May 8, 2017, at 08:51, Conrad Meyer  wrote:
> 
> Author: cem
> Date: Mon May  8 15:51:29 2017
> New Revision: 317942
> URL: https://svnweb.freebsd.org/changeset/base/317942
> 
> Log:
>  csplit(1): Fix extraneous output in edge case
> 
>  When the input to csplit contains fewer lines than the number of matches
>  specified, extra output was mistakenly included in some output files.
> 
>  Fix the bug and add a simple ATF regression test.
> 
>  PR:  219024
>  Submitted by:J.R. Oldroyd 
> 
> Added:
>  head/usr.bin/csplit/tests/
>  head/usr.bin/csplit/tests/Makefile   (contents, props changed)
>  head/usr.bin/csplit/tests/csplit_test.sh   (contents, props changed)
> Modified:
>  head/usr.bin/csplit/Makefile
>  head/usr.bin/csplit/csplit.c

Conrad,
Please add new directory entries to etc/mtree/BSD.tests.dist and do a 
full buildworld/installworld cycle next time to avoid build breakage (this 
isn’t the first time this has happened). Fixed up in r317949.
Thanks,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r317959 - in vendor/lldb/dist: include/lldb/API include/lldb/Core include/lldb/Expression include/lldb/Host include/lldb/Host/common include/lldb/Target include/lldb/Utility packages/Py...

2017-05-08 Thread Dimitry Andric
Author: dim
Date: Mon May  8 17:13:54 2017
New Revision: 317959
URL: https://svnweb.freebsd.org/changeset/base/317959

Log:
  Vendor import of lldb trunk r302418:
  https://llvm.org/svn/llvm-project/lldb/trunk@302418

Added:
  vendor/lldb/dist/unittests/Host/MainLoopTest.cpp   (contents, props changed)
Modified:
  vendor/lldb/dist/include/lldb/API/SBAddress.h
  vendor/lldb/dist/include/lldb/API/SBInstruction.h
  vendor/lldb/dist/include/lldb/API/SBInstructionList.h
  vendor/lldb/dist/include/lldb/Core/Disassembler.h
  vendor/lldb/dist/include/lldb/Expression/Expression.h
  vendor/lldb/dist/include/lldb/Host/MainLoop.h
  vendor/lldb/dist/include/lldb/Host/common/UDPSocket.h
  vendor/lldb/dist/include/lldb/Target/ThreadPlanCallFunction.h
  vendor/lldb/dist/include/lldb/Target/ThreadPlanCallUserExpression.h
  vendor/lldb/dist/include/lldb/Utility/TaskPool.h
  
vendor/lldb/dist/packages/Python/lldbsuite/test/expression_command/multiline/TestMultilineExpressions.py
  
vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py
  
vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py
  
vendor/lldb/dist/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py
  vendor/lldb/dist/scripts/interface/SBInstruction.i
  vendor/lldb/dist/scripts/interface/SBInstructionList.i
  vendor/lldb/dist/source/API/SBAddress.cpp
  vendor/lldb/dist/source/API/SBInstruction.cpp
  vendor/lldb/dist/source/API/SBInstructionList.cpp
  vendor/lldb/dist/source/API/SBProcess.cpp
  vendor/lldb/dist/source/Core/Disassembler.cpp
  vendor/lldb/dist/source/Host/common/Editline.cpp
  vendor/lldb/dist/source/Host/common/MainLoop.cpp
  vendor/lldb/dist/source/Host/common/UDPSocket.cpp
  vendor/lldb/dist/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp
  
vendor/lldb/dist/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
  vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  vendor/lldb/dist/source/Target/ThreadPlanCallUserExpression.cpp
  vendor/lldb/dist/source/Utility/TaskPool.cpp
  vendor/lldb/dist/unittests/Host/CMakeLists.txt
  vendor/lldb/dist/unittests/Utility/TaskPoolTest.cpp
  vendor/lldb/dist/www/lldb-gdb.html

Modified: vendor/lldb/dist/include/lldb/API/SBAddress.h
==
--- vendor/lldb/dist/include/lldb/API/SBAddress.h   Mon May  8 17:13:50 
2017(r317958)
+++ vendor/lldb/dist/include/lldb/API/SBAddress.h   Mon May  8 17:13:54 
2017(r317959)
@@ -103,6 +103,8 @@ protected:
 
   const lldb_private::Address *operator->() const;
 
+  friend bool operator==(const SBAddress &lhs, const SBAddress &rhs);
+
   lldb_private::Address *get();
 
   lldb_private::Address &ref();
@@ -117,6 +119,8 @@ private:
   std::unique_ptr m_opaque_ap;
 };
 
+bool operator==(const SBAddress &lhs, const SBAddress &rhs);
+
 } // namespace lldb
 
 #endif // LLDB_SBAddress_h_

Modified: vendor/lldb/dist/include/lldb/API/SBInstruction.h
==
--- vendor/lldb/dist/include/lldb/API/SBInstruction.h   Mon May  8 17:13:50 
2017(r317958)
+++ vendor/lldb/dist/include/lldb/API/SBInstruction.h   Mon May  8 17:13:54 
2017(r317959)
@@ -53,6 +53,8 @@ public:
 
   bool HasDelaySlot();
 
+  bool CanSetBreakpoint();
+
   void Print(FILE *out);
 
   bool GetDescription(lldb::SBStream &description);

Modified: vendor/lldb/dist/include/lldb/API/SBInstructionList.h
==
--- vendor/lldb/dist/include/lldb/API/SBInstructionList.h   Mon May  8 
17:13:50 2017(r317958)
+++ vendor/lldb/dist/include/lldb/API/SBInstructionList.h   Mon May  8 
17:13:54 2017(r317959)
@@ -32,6 +32,15 @@ public:
 
   lldb::SBInstruction GetInstructionAtIndex(uint32_t idx);
 
+  // --
+  // Returns the number of instructions between the start and end address.
+  // If canSetBreakpoint is true then the count will be the number of 
+  // instructions on which a breakpoint can be set.
+  // --
+  size_t GetInstructionsCount(const SBAddress &start,
+  const SBAddress &end,
+  bool canSetBreakpoint = false);  
 
+
   void Clear();
 
   void AppendInstruction(lldb::SBInstruction inst);

Modified: vendor/lldb/dist/include/lldb/Core/Disassembler.h
==
--- vendor/lldb/dist/include/lldb/Core/Disassembler.h   Mon May  8 17:13:50 
2017(r317958)
+++ vendor/lldb/dist/include/lldb/Core/Disassembler.h   Mon May  8 17:13:54 
2017(r317959)
@@ -173,6 +173,8 @@ public:
 
   virtual bool HasDelaySlot()

svn commit: r317960 - vendor/lldb/lldb-trunk-r302418

2017-05-08 Thread Dimitry Andric
Author: dim
Date: Mon May  8 17:14:01 2017
New Revision: 317960
URL: https://svnweb.freebsd.org/changeset/base/317960

Log:
  Tag lldb trunk r302418.

Added:
  vendor/lldb/lldb-trunk-r302418/
 - copied from r317959, vendor/lldb/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317958 - vendor/lld/lld-trunk-r302418

2017-05-08 Thread Dimitry Andric
Author: dim
Date: Mon May  8 17:13:50 2017
New Revision: 317958
URL: https://svnweb.freebsd.org/changeset/base/317958

Log:
  Tag lld trunk r302418.

Added:
  vendor/lld/lld-trunk-r302418/
 - copied from r317957, vendor/lld/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317953 - in vendor/compiler-rt/dist: include/xray lib/asan lib/builtins lib/cfi lib/scudo lib/ubsan lib/xray test/asan/TestCases/Linux test/builtins/Unit test/sanitizer_common/TestCase...

2017-05-08 Thread Dimitry Andric
Author: dim
Date: Mon May  8 17:13:22 2017
New Revision: 317953
URL: https://svnweb.freebsd.org/changeset/base/317953

Log:
  Vendor import of compiler-rt trunk r302418:
  https://llvm.org/svn/llvm-project/compiler-rt/trunk@302418

Added:
  vendor/compiler-rt/dist/lib/scudo/scudo_tls_android.cpp   (contents, props 
changed)
  vendor/compiler-rt/dist/lib/scudo/scudo_tls_android.inc   (contents, props 
changed)
  vendor/compiler-rt/dist/lib/scudo/scudo_tls_context_android.inc   (contents, 
props changed)
  vendor/compiler-rt/dist/lib/scudo/scudo_tls_context_linux.inc   (contents, 
props changed)
  vendor/compiler-rt/dist/lib/scudo/scudo_tls_linux.inc   (contents, props 
changed)
  vendor/compiler-rt/dist/lib/ubsan/ubsan_diag_standalone.cc   (contents, props 
changed)
  vendor/compiler-rt/dist/test/asan/TestCases/Linux/longjmp_chk.c   (contents, 
props changed)
  
vendor/compiler-rt/dist/test/sanitizer_common/TestCases/sanitizer_coverage_no_prune.cc
   (contents, props changed)
  vendor/compiler-rt/dist/test/ubsan/TestCases/Misc/Linux/print_stack_trace.cc  
 (contents, props changed)
  vendor/compiler-rt/dist/test/ubsan/TestCases/Misc/bool.m
  vendor/compiler-rt/dist/test/xray/TestCases/Linux/coverage-sample.cc   
(contents, props changed)
  vendor/compiler-rt/dist/test/xray/TestCases/Linux/func-id-utils.cc   
(contents, props changed)
Deleted:
  vendor/compiler-rt/dist/lib/scudo/scudo_tls_linux.h
Modified:
  vendor/compiler-rt/dist/include/xray/xray_interface.h
  vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc
  vendor/compiler-rt/dist/lib/asan/asan_interceptors.h
  vendor/compiler-rt/dist/lib/builtins/CMakeLists.txt
  vendor/compiler-rt/dist/lib/builtins/emutls.c
  vendor/compiler-rt/dist/lib/builtins/int_types.h
  vendor/compiler-rt/dist/lib/cfi/cfi_blacklist.txt
  vendor/compiler-rt/dist/lib/scudo/CMakeLists.txt
  vendor/compiler-rt/dist/lib/scudo/scudo_allocator.cpp
  vendor/compiler-rt/dist/lib/scudo/scudo_allocator.h
  vendor/compiler-rt/dist/lib/scudo/scudo_tls.h
  vendor/compiler-rt/dist/lib/scudo/scudo_tls_linux.cpp
  vendor/compiler-rt/dist/lib/ubsan/CMakeLists.txt
  vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers.cc
  vendor/compiler-rt/dist/lib/xray/xray_init.cc
  vendor/compiler-rt/dist/lib/xray/xray_interface.cc
  vendor/compiler-rt/dist/lib/xray/xray_interface_internal.h
  vendor/compiler-rt/dist/test/builtins/Unit/divxc3_test.c
  vendor/compiler-rt/dist/test/builtins/Unit/fixunstfti_test.c
  vendor/compiler-rt/dist/test/builtins/Unit/fixunsxfti_test.c
  vendor/compiler-rt/dist/test/builtins/Unit/fixxfti_test.c
  vendor/compiler-rt/dist/test/builtins/Unit/floattixf_test.c
  vendor/compiler-rt/dist/test/builtins/Unit/floatuntixf_test.c
  vendor/compiler-rt/dist/test/builtins/Unit/mulxc3_test.c

Modified: vendor/compiler-rt/dist/include/xray/xray_interface.h
==
--- vendor/compiler-rt/dist/include/xray/xray_interface.h   Mon May  8 
17:13:19 2017(r317952)
+++ vendor/compiler-rt/dist/include/xray/xray_interface.h   Mon May  8 
17:13:22 2017(r317953)
@@ -15,10 +15,11 @@
 #define XRAY_XRAY_INTERFACE_H
 
 #include 
+#include 
 
 extern "C" {
 
-// Synchronize this with AsmPrinter::SledKind in LLVM.
+/// Synchronize this with AsmPrinter::SledKind in LLVM.
 enum XRayEntryType {
   ENTRY = 0,
   EXIT = 1,
@@ -26,32 +27,43 @@ enum XRayEntryType {
   LOG_ARGS_ENTRY = 3,
 };
 
-// Provide a function to invoke for when instrumentation points are hit. This 
is
-// a user-visible control surface that overrides the default implementation. 
The
-// function provided should take the following arguments:
-//
-//   - function id: an identifier that indicates the id of a function; this id
-//  is generated by xray; the mapping between the function id
-//  and the actual function pointer is available through
-//  __xray_table.
-//   - entry type: identifies what kind of instrumentation point was 
encountered
-// (function entry, function exit, etc.). See the enum
-// XRayEntryType for more details.
-//
-// The user handler must handle correctly spurious calls after this handler is
-// removed or replaced with another handler, because it would be too costly for
-// XRay runtime to avoid spurious calls.
-// To prevent circular calling, the handler function itself and all its
-// direct&indirect callees must not be instrumented with XRay, which can be
-// achieved by marking them all with: __attribute__((xray_never_instrument))
-//
-// Returns 1 on success, 0 on error.
+/// Provide a function to invoke for when instrumentation points are hit. This
+/// is a user-visible control surface that overrides the default 
implementation.
+/// The function provided should take the following arguments:
+///
+///   - function id: an identifier that indicates the id of a function; this id
+///  is generated by xray; the mapping betw

svn commit: r317957 - in vendor/lld/dist: . COFF ELF include/lld/Core include/lld/Support lib/Core test/ELF test/ELF/Inputs test/ELF/linkerscript test/ELF/linkerscript/Inputs test/ELF/lto test/ELF/...

2017-05-08 Thread Dimitry Andric
Author: dim
Date: Mon May  8 17:13:44 2017
New Revision: 317957
URL: https://svnweb.freebsd.org/changeset/base/317957

Log:
  Vendor import of lld trunk r302418:
  https://llvm.org/svn/llvm-project/lld/trunk@302418

Added:
  vendor/lld/dist/include/lld/Core/TaskGroup.h   (contents, props changed)
  vendor/lld/dist/lib/Core/TaskGroup.cpp   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/i386-static-tls-model1.s   (contents, props 
changed)
  vendor/lld/dist/test/ELF/Inputs/i386-static-tls-model2.s   (contents, props 
changed)
  vendor/lld/dist/test/ELF/Inputs/i386-static-tls-model3.s   (contents, props 
changed)
  vendor/lld/dist/test/ELF/Inputs/i386-static-tls-model4.s   (contents, props 
changed)
  vendor/lld/dist/test/ELF/i386-static-tls-model.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/Inputs/compress-debug-sections.s   
(contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/compress-debug-sections.s   (contents, 
props changed)
  vendor/lld/dist/test/ELF/lto/Inputs/duplicated-name.ll
  vendor/lld/dist/test/ELF/lto/duplicated-name.ll
Deleted:
  vendor/lld/dist/include/lld/Support/
Modified:
  vendor/lld/dist/CMakeLists.txt
  vendor/lld/dist/COFF/Chunks.h
  vendor/lld/dist/COFF/ICF.cpp
  vendor/lld/dist/COFF/PDB.cpp
  vendor/lld/dist/ELF/Config.h
  vendor/lld/dist/ELF/Driver.cpp
  vendor/lld/dist/ELF/InputFiles.cpp
  vendor/lld/dist/ELF/InputFiles.h
  vendor/lld/dist/ELF/LinkerScript.cpp
  vendor/lld/dist/ELF/LinkerScript.h
  vendor/lld/dist/ELF/Options.td
  vendor/lld/dist/ELF/OutputSections.cpp
  vendor/lld/dist/ELF/Relocations.cpp
  vendor/lld/dist/ELF/SymbolTable.cpp
  vendor/lld/dist/ELF/Symbols.cpp
  vendor/lld/dist/ELF/SyntheticSections.cpp
  vendor/lld/dist/ELF/Target.cpp
  vendor/lld/dist/ELF/Target.h
  vendor/lld/dist/ELF/Writer.cpp
  vendor/lld/dist/ELF/Writer.h
  vendor/lld/dist/include/lld/Core/Parallel.h
  vendor/lld/dist/lib/Core/CMakeLists.txt
  vendor/lld/dist/test/ELF/defsym.s
  vendor/lld/dist/test/ELF/i386-tls-ie-shared.s
  vendor/lld/dist/test/ELF/lto/archive-no-index.ll
  vendor/lld/dist/test/ELF/lto/thin-archivecollision.ll
  vendor/lld/dist/test/ELF/tls-dynamic-i686.s
  vendor/lld/dist/test/ELF/tls-offset.s
  vendor/lld/dist/test/ELF/tls-opt-iele-i686-nopic.s
  vendor/lld/dist/unittests/CoreTests/CMakeLists.txt

Modified: vendor/lld/dist/CMakeLists.txt
==
--- vendor/lld/dist/CMakeLists.txt  Mon May  8 17:13:41 2017
(r317956)
+++ vendor/lld/dist/CMakeLists.txt  Mon May  8 17:13:44 2017
(r317957)
@@ -221,3 +221,4 @@ endif()
 add_subdirectory(docs)
 add_subdirectory(COFF)
 add_subdirectory(ELF)
+

Modified: vendor/lld/dist/COFF/Chunks.h
==
--- vendor/lld/dist/COFF/Chunks.h   Mon May  8 17:13:41 2017
(r317956)
+++ vendor/lld/dist/COFF/Chunks.h   Mon May  8 17:13:44 2017
(r317957)
@@ -201,7 +201,7 @@ private:
 
   // Used for ICF (Identical COMDAT Folding)
   void replace(SectionChunk *Other);
-  uint32_t Color[2] = {0, 0};
+  uint32_t Class[2] = {0, 0};
 
   // Sym points to a section symbol if this is a COMDAT chunk.
   DefinedRegular *Sym = nullptr;

Modified: vendor/lld/dist/COFF/ICF.cpp
==
--- vendor/lld/dist/COFF/ICF.cppMon May  8 17:13:41 2017
(r317956)
+++ vendor/lld/dist/COFF/ICF.cppMon May  8 17:13:44 2017
(r317957)
@@ -49,10 +49,10 @@ private:
 
   size_t findBoundary(size_t Begin, size_t End);
 
-  void forEachColorRange(size_t Begin, size_t End,
+  void forEachClassRange(size_t Begin, size_t End,
  std::function Fn);
 
-  void forEachColor(std::function Fn);
+  void forEachClass(std::function Fn);
 
   std::vector Chunks;
   int Cnt = 0;
@@ -85,7 +85,7 @@ bool ICF::isEligible(SectionChunk *C) {
   return C->isCOMDAT() && C->isLive() && Global && Executable && !Writable;
 }
 
-// Split a range into smaller ranges by recoloring sections
+// Split an equivalence class into smaller classes.
 void ICF::segregate(size_t Begin, size_t End, bool Constant) {
   while (Begin < End) {
 // Divide [Begin, End) into two. Let Mid be the start index of the
@@ -101,7 +101,7 @@ void ICF::segregate(size_t Begin, size_t
 // Split [Begin, End) into [Begin, Mid) and [Mid, End).
 uint32_t Id = NextId++;
 for (size_t I = Begin; I < Mid; ++I)
-  Chunks[I]->Color[(Cnt + 1) % 2] = Id;
+  Chunks[I]->Class[(Cnt + 1) % 2] = Id;
 
 // If we created a group, we need to iterate the main loop again.
 if (Mid != End)
@@ -130,7 +130,7 @@ bool ICF::equalsConstant(const SectionCh
 if (auto *D1 = dyn_cast(B1))
   if (auto *D2 = dyn_cast(B2))
 return D1->getValue() == D2->getValue() &&
-   D1->getChunk()->Color[Cnt % 2] == D2->getChunk()->Color[Cnt % 
2];
+   D1->getC

svn commit: r317951 - in vendor/clang/dist: docs include/clang/AST include/clang/ASTMatchers include/clang/Basic include/clang/Driver include/clang/Frontend include/clang/Lex include/clang/Sema inc...

2017-05-08 Thread Dimitry Andric
Author: dim
Date: Mon May  8 17:13:11 2017
New Revision: 317951
URL: https://svnweb.freebsd.org/changeset/base/317951

Log:
  Vendor import of clang trunk r302418:
  https://llvm.org/svn/llvm-project/cfe/trunk@302418

Added:
  vendor/clang/dist/lib/Headers/lwpintrin.h   (contents, props changed)
  vendor/clang/dist/test/CodeGen/aarch64-args.cpp   (contents, props changed)
  vendor/clang/dist/test/CodeGen/lwp-builtins.c   (contents, props changed)
  vendor/clang/dist/test/FixIt/fixit-availability.c   (contents, props changed)
  vendor/clang/dist/test/FixIt/fixit-availability.mm
  vendor/clang/dist/test/Index/KeepGoingWithLotsOfErrors.mm
  vendor/clang/dist/test/Modules/Inputs/preprocess/file2.h   (contents, props 
changed)
  vendor/clang/dist/test/OpenMP/varargs.cpp   (contents, props changed)
  vendor/clang/dist/test/SemaCXX/warn-zero-nullptr.cpp   (contents, props 
changed)
Modified:
  vendor/clang/dist/docs/LanguageExtensions.rst
  vendor/clang/dist/docs/LibASTMatchersReference.html
  vendor/clang/dist/docs/SanitizerCoverage.rst
  vendor/clang/dist/docs/ThreadSafetyAnalysis.rst
  vendor/clang/dist/include/clang/AST/ODRHash.h
  vendor/clang/dist/include/clang/ASTMatchers/ASTMatchers.h
  vendor/clang/dist/include/clang/Basic/Attr.td
  vendor/clang/dist/include/clang/Basic/AttrDocs.td
  vendor/clang/dist/include/clang/Basic/BuiltinsARM.def
  vendor/clang/dist/include/clang/Basic/BuiltinsX86.def
  vendor/clang/dist/include/clang/Basic/BuiltinsX86_64.def
  vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td
  vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td
  vendor/clang/dist/include/clang/Driver/CC1Options.td
  vendor/clang/dist/include/clang/Driver/Distro.h
  vendor/clang/dist/include/clang/Driver/Multilib.h
  vendor/clang/dist/include/clang/Driver/Options.td
  vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def
  vendor/clang/dist/include/clang/Frontend/FrontendAction.h
  vendor/clang/dist/include/clang/Lex/HeaderSearch.h
  vendor/clang/dist/include/clang/Lex/Lexer.h
  vendor/clang/dist/include/clang/Lex/ModuleMap.h
  vendor/clang/dist/include/clang/Lex/Preprocessor.h
  vendor/clang/dist/include/clang/Sema/Sema.h
  vendor/clang/dist/include/clang/Tooling/FixIt.h
  vendor/clang/dist/lib/ASTMatchers/Dynamic/Registry.cpp
  vendor/clang/dist/lib/Basic/Diagnostic.cpp
  vendor/clang/dist/lib/Basic/DiagnosticIDs.cpp
  vendor/clang/dist/lib/Basic/Targets.cpp
  vendor/clang/dist/lib/CodeGen/BackendUtil.cpp
  vendor/clang/dist/lib/CodeGen/CGBlocks.cpp
  vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp
  vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp
  vendor/clang/dist/lib/CodeGen/CodeGenFunction.h
  vendor/clang/dist/lib/CodeGen/TargetInfo.cpp
  vendor/clang/dist/lib/Driver/Distro.cpp
  vendor/clang/dist/lib/Driver/Multilib.cpp
  vendor/clang/dist/lib/Driver/SanitizerArgs.cpp
  vendor/clang/dist/lib/Driver/ToolChains/CrossWindows.cpp
  vendor/clang/dist/lib/Driver/ToolChains/Gnu.cpp
  vendor/clang/dist/lib/Format/FormatToken.h
  vendor/clang/dist/lib/Format/FormatTokenLexer.cpp
  vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp
  vendor/clang/dist/lib/Frontend/FrontendAction.cpp
  vendor/clang/dist/lib/Frontend/FrontendActions.cpp
  vendor/clang/dist/lib/Frontend/PrintPreprocessedOutput.cpp
  vendor/clang/dist/lib/Frontend/Rewrite/FrontendActions.cpp
  vendor/clang/dist/lib/Frontend/Rewrite/InclusionRewriter.cpp
  vendor/clang/dist/lib/Headers/CMakeLists.txt
  vendor/clang/dist/lib/Headers/arm_acle.h
  vendor/clang/dist/lib/Headers/x86intrin.h
  vendor/clang/dist/lib/Index/IndexDecl.cpp
  vendor/clang/dist/lib/Lex/HeaderSearch.cpp
  vendor/clang/dist/lib/Lex/Lexer.cpp
  vendor/clang/dist/lib/Lex/ModuleMap.cpp
  vendor/clang/dist/lib/Lex/PPDirectives.cpp
  vendor/clang/dist/lib/Lex/PPLexerChange.cpp
  vendor/clang/dist/lib/Lex/PPMacroExpansion.cpp
  vendor/clang/dist/lib/Lex/Pragma.cpp
  vendor/clang/dist/lib/Lex/Preprocessor.cpp
  vendor/clang/dist/lib/Lex/TokenLexer.cpp
  vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp
  vendor/clang/dist/lib/Sema/Sema.cpp
  vendor/clang/dist/lib/Sema/SemaChecking.cpp
  vendor/clang/dist/lib/Sema/SemaDecl.cpp
  vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp
  vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp
  vendor/clang/dist/lib/Sema/SemaExpr.cpp
  vendor/clang/dist/lib/Sema/SemaStmt.cpp
  vendor/clang/dist/lib/Tooling/JSONCompilationDatabase.cpp
  vendor/clang/dist/test/CodeGen/arm_acle.c
  vendor/clang/dist/test/CodeGen/mozilla-ms-inline-asm.c
  vendor/clang/dist/test/CodeGen/ms-inline-asm-64.c
  vendor/clang/dist/test/CodeGen/ms-inline-asm-avx512.c
  vendor/clang/dist/test/CodeGen/ms-inline-asm.c
  vendor/clang/dist/test/CodeGen/ms-inline-asm.cpp
  vendor/clang/dist/test/CodeGen/thinlto_backend.ll
  vendor/clang/dist/test/CodeGenCXX/ms-inline-asm-fields.cpp
  vendor/clang/dist/test/CodeGenObjC/arc-foreach.m
  vendor/clang/dist/test/CodeGenOpenCL/kernel-attributes.cl
  vendor/clang/dist/test/Driver/android-ndk-standalone.cpp
  vendor/clang/dist/test/Driver

svn commit: r317954 - vendor/compiler-rt/compiler-rt-trunk-r302418

2017-05-08 Thread Dimitry Andric
Author: dim
Date: Mon May  8 17:13:29 2017
New Revision: 317954
URL: https://svnweb.freebsd.org/changeset/base/317954

Log:
  Tag compiler-rt trunk r302418.

Added:
  vendor/compiler-rt/compiler-rt-trunk-r302418/
 - copied from r317953, vendor/compiler-rt/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317956 - vendor/libc++/libc++-trunk-r302418

2017-05-08 Thread Dimitry Andric
Author: dim
Date: Mon May  8 17:13:41 2017
New Revision: 317956
URL: https://svnweb.freebsd.org/changeset/base/317956

Log:
  Tag libc++ trunk r302418.

Added:
  vendor/libc++/libc++-trunk-r302418/
 - copied from r317955, vendor/libc++/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317955 - in vendor/libc++/dist: . docs docs/DesignDocs include include/experimental include/support/win32 lib src src/experimental/filesystem src/support/runtime test/libcxx/algorithms...

2017-05-08 Thread Dimitry Andric
Author: dim
Date: Mon May  8 17:13:34 2017
New Revision: 317955
URL: https://svnweb.freebsd.org/changeset/base/317955

Log:
  Vendor import of libc++ trunk r302418:
  https://llvm.org/svn/llvm-project/libcxx/trunk@302418

Added:
  vendor/libc++/dist/docs/DesignDocs/AvailabilityMarkup.rst
  vendor/libc++/dist/install-appveyor-reqs.cmd
  vendor/libc++/dist/src/support/runtime/exception_pointer_msvc.ipp
  
vendor/libc++/dist/test/libcxx/experimental/containers/sequences/dynarray/lit.local.cfg
  
vendor/libc++/dist/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minmax_showbase.pass.cpp
   (contents, props changed)
  
vendor/libc++/dist/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/lit.local.cfg
  
vendor/libc++/dist/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/lit.local.cfg
  
vendor/libc++/dist/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/lit.local.cfg
  
vendor/libc++/dist/test/support/test.workarounds/c1xx_broken_is_trivially_copyable.pass.cpp
   (contents, props changed)
Modified:
  vendor/libc++/dist/CMakeLists.txt
  vendor/libc++/dist/appveyor.yml
  vendor/libc++/dist/docs/index.rst
  vendor/libc++/dist/include/__config
  vendor/libc++/dist/include/__locale
  vendor/libc++/dist/include/__threading_support
  vendor/libc++/dist/include/exception
  vendor/libc++/dist/include/experimental/dynarray
  vendor/libc++/dist/include/experimental/optional
  vendor/libc++/dist/include/functional
  vendor/libc++/dist/include/future
  vendor/libc++/dist/include/istream
  vendor/libc++/dist/include/locale
  vendor/libc++/dist/include/memory
  vendor/libc++/dist/include/new
  vendor/libc++/dist/include/ostream
  vendor/libc++/dist/include/random
  vendor/libc++/dist/include/shared_mutex
  vendor/libc++/dist/include/streambuf
  vendor/libc++/dist/include/support/win32/locale_win32.h
  vendor/libc++/dist/include/typeinfo
  vendor/libc++/dist/lib/CMakeLists.txt
  vendor/libc++/dist/src/exception.cpp
  vendor/libc++/dist/src/experimental/filesystem/operations.cpp
  vendor/libc++/dist/src/locale.cpp
  vendor/libc++/dist/src/memory.cpp
  
vendor/libc++/dist/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp
  
vendor/libc++/dist/test/libcxx/containers/sequences/list/list.cons/db_copy.pass.cpp
  
vendor/libc++/dist/test/libcxx/containers/sequences/list/list.cons/db_move.pass.cpp
  
vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/emplace_db1.pass.cpp
  
vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db1.pass.cpp
  
vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db2.pass.cpp
  
vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db1.pass.cpp
  
vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db2.pass.cpp
  
vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db3.pass.cpp
  
vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db4.pass.cpp
  
vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_iter_iter_db1.pass.cpp
  
vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_rvalue_db1.pass.cpp
  
vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_size_value_db1.pass.cpp
  
vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_value_db1.pass.cpp
  
vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/pop_back_db1.pass.cpp
  
vendor/libc++/dist/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list.pass.cpp
  
vendor/libc++/dist/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter.pass.cpp
  
vendor/libc++/dist/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter_iter.pass.cpp
  
vendor/libc++/dist/test/libcxx/debug/containers/db_associative_container_tests.pass.cpp
  
vendor/libc++/dist/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp
  vendor/libc++/dist/test/libcxx/debug/containers/db_string.pass.cpp
  
vendor/libc++/dist/test/libcxx/debug/containers/db_unord_container_tests.pass.cpp
  vendor/libc++/dist/test/libcxx/debug/debug_abort.pass.cpp
  vendor/libc++/dist/test/libcxx/debug/debug_throw.pass.cpp
  vendor/libc++/dist/test/libcxx/debug/debug_throw_register.pass.cpp
  
vendor/libc++/dist/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp
  
vendor/libc++/dist/test/libcxx/experimental/containers/sequences/dynarray/dynarray.cons/default.pass.cpp
  
vendor/libc++/dist/test/libcxx/experimental/containers/sequences/dynarray/dynarray.cons/default_throws_bad_alloc.pass.cpp
  
vendor/libc++/dist/test/libcxx/experimental/containers/sequences/dynarray/dynarray.data/default.pas

svn commit: r317952 - vendor/clang/clang-trunk-r302418

2017-05-08 Thread Dimitry Andric
Author: dim
Date: Mon May  8 17:13:19 2017
New Revision: 317952
URL: https://svnweb.freebsd.org/changeset/base/317952

Log:
  Tag clang trunk r302418.

Added:
  vendor/clang/clang-trunk-r302418/
 - copied from r317951, vendor/clang/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317948 - in vendor/llvm/dist: docs examples/Kaleidoscope/BuildingAJIT/Chapter1 examples/Kaleidoscope/BuildingAJIT/Chapter2 examples/Kaleidoscope/BuildingAJIT/Chapter3 examples/Kaleidos...

2017-05-08 Thread Dimitry Andric
Author: dim
Date: Mon May  8 17:12:57 2017
New Revision: 317948
URL: https://svnweb.freebsd.org/changeset/base/317948

Log:
  Vendor import of llvm trunk r302418:
  https://llvm.org/svn/llvm-project/llvm/trunk@302418

Added:
  vendor/llvm/dist/include/llvm/CodeGen/MIRPrinter.h   (contents, props changed)
  vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/DbiModuleList.h   
(contents, props changed)
  vendor/llvm/dist/lib/DebugInfo/PDB/Native/DbiModuleList.cpp   (contents, 
props changed)
  vendor/llvm/dist/lib/Target/Hexagon/HexagonDepIICHVX.td
  vendor/llvm/dist/lib/Target/Hexagon/HexagonDepIICScalar.td
  vendor/llvm/dist/lib/Target/Hexagon/HexagonDepTimingClasses.h   (contents, 
props changed)
  vendor/llvm/dist/test/Analysis/ScalarEvolution/ZeroStep.ll
  vendor/llvm/dist/test/CodeGen/AArch64/fadd-combines.ll
  vendor/llvm/dist/test/CodeGen/AMDGPU/scratch-simple.ll
  vendor/llvm/dist/test/CodeGen/AMDGPU/waitcnt-looptest.ll
  vendor/llvm/dist/test/CodeGen/ARM/acle-intrinsics-v5.ll
  vendor/llvm/dist/test/CodeGen/ARM/acle-intrinsics.ll
  vendor/llvm/dist/test/CodeGen/ARM/alloca-align.ll
  vendor/llvm/dist/test/CodeGen/Hexagon/branch-folder-hoist-kills.mir
  vendor/llvm/dist/test/CodeGen/Hexagon/rdf-cover-use.ll
  vendor/llvm/dist/test/CodeGen/MIR/X86/auto-successor.mir
  vendor/llvm/dist/test/CodeGen/MIR/X86/branch-probabilities.mir
  vendor/llvm/dist/test/CodeGen/PowerPC/restore-r30.ll
  vendor/llvm/dist/test/CodeGen/SystemZ/copy-physreg-128.ll
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/gep.ll
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-gep.mir
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-mul-scalar.mir
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-mul-v128.mir
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-mul-v256.mir
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-mul-v512.mir
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/mul-scalar.ll
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/mul-vec.ll
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/regbankselect-AVX2.mir
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/regbankselect-AVX512.mir
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-gep.mir
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-mul-scalar.mir
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-mul-vec.mir
  vendor/llvm/dist/test/CodeGen/X86/avx2-schedule.ll
  vendor/llvm/dist/test/CodeGen/X86/build-vector-128.ll
  vendor/llvm/dist/test/CodeGen/X86/build-vector-256.ll
  vendor/llvm/dist/test/CodeGen/X86/build-vector-512.ll
  vendor/llvm/dist/test/CodeGen/X86/ms-inline-asm-avx512.ll
  vendor/llvm/dist/test/CodeGen/X86/pr32907.ll
  vendor/llvm/dist/test/CodeGen/X86/regcall-no-plt.ll
  vendor/llvm/dist/test/CodeGen/X86/xray-custom-log.ll
  vendor/llvm/dist/test/CodeGen/X86/xray-loop-detection.ll
  vendor/llvm/dist/test/DebugInfo/COFF/synthetic.ll
  
vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-decompression-error.elf-x86-64 
  (contents, props changed)
  vendor/llvm/dist/test/DebugInfo/dwarfdump-decompression-error.test
  vendor/llvm/dist/test/Linker/metadata-global.ll
  vendor/llvm/dist/test/MC/AArch64/crc.s   (contents, props changed)
  vendor/llvm/dist/test/MC/ARM/ltorg-range.s   (contents, props changed)
  vendor/llvm/dist/test/MC/AsmParser/altmacro_string.s   (contents, props 
changed)
  vendor/llvm/dist/test/MC/AsmParser/negative_altmacro_string.s   (contents, 
props changed)
  vendor/llvm/dist/test/ObjectYAML/wasm/name_section.yaml
  vendor/llvm/dist/test/Transforms/ArgumentPromotion/pr32917.ll
  vendor/llvm/dist/test/Transforms/LoopIdiom/unsafe.ll
  vendor/llvm/dist/test/tools/llvm-objdump/WebAssembly/
  vendor/llvm/dist/test/tools/llvm-objdump/WebAssembly/symbol-table.test
  vendor/llvm/dist/test/tools/llvm-readobj/Inputs/resources/
  vendor/llvm/dist/test/tools/llvm-readobj/Inputs/resources/cursor_small.bmp   
(contents, props changed)
  vendor/llvm/dist/test/tools/llvm-readobj/Inputs/resources/okay_small.bmp   
(contents, props changed)
  
vendor/llvm/dist/test/tools/llvm-readobj/Inputs/resources/test_resource.obj.coff
   (contents, props changed)
  vendor/llvm/dist/test/tools/llvm-readobj/Inputs/resources/test_resource.rc
  vendor/llvm/dist/test/tools/llvm-readobj/Inputs/resources/test_resource.res   
(contents, props changed)
Deleted:
  vendor/llvm/dist/lib/CodeGen/MIRPrinter.h
  vendor/llvm/dist/lib/Target/AArch64/AArch64AddressTypePromotion.cpp
  vendor/llvm/dist/test/CodeGen/AMDGPU/local-stack-slot-bug.ll
  vendor/llvm/dist/test/CodeGen/ARM/sat-arith.ll
  vendor/llvm/dist/test/CodeGen/MIR/Generic/branch-probabilities.ll
  vendor/llvm/dist/test/MC/AArch64/cyclone-crc.s
  
vendor/llvm/dist/test/Transforms/InstCombine/2005-06-16-SetCCOrSetCCMiscompile.ll
Modified:
  vendor/llvm/dist/docs/Lexicon.rst
  vendor/llvm/dist/docs/MIRLangRef.rst
  vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter1/toy.cpp
  vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp
  vendor/llvm/dist/examples/Kaleidosc

svn commit: r317949 - head/etc/mtree

2017-05-08 Thread Ngie Cooper
Author: ngie
Date: Mon May  8 17:13:00 2017
New Revision: 317949
URL: https://svnweb.freebsd.org/changeset/base/317949

Log:
  Fix the build after r317942 by adding usr.bin/csplit to BSD.tests.dist
  
  Pointyhat to: cem
  MFC with: r317942
  Sponsored by: Dell EMC Isilon

Modified:
  head/etc/mtree/BSD.tests.dist

Modified: head/etc/mtree/BSD.tests.dist
==
--- head/etc/mtree/BSD.tests.dist   Mon May  8 17:12:57 2017
(r317948)
+++ head/etc/mtree/BSD.tests.dist   Mon May  8 17:13:00 2017
(r317949)
@@ -612,6 +612,8 @@
 ..
 comm
 ..
+csplit
+..
 cut
 ..
 diff
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317950 - vendor/llvm/llvm-trunk-r302418

2017-05-08 Thread Dimitry Andric
Author: dim
Date: Mon May  8 17:13:05 2017
New Revision: 317950
URL: https://svnweb.freebsd.org/changeset/base/317950

Log:
  Tag llvm trunk r302418.

Added:
  vendor/llvm/llvm-trunk-r302418/
 - copied from r317949, vendor/llvm/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317947 - stable/10/sbin/camcontrol

2017-05-08 Thread Kenneth D. Merry
Author: ken
Date: Mon May  8 17:02:03 2017
New Revision: 317947
URL: https://svnweb.freebsd.org/changeset/base/317947

Log:
  MFC r317774, r317776
  
  r317774:
Add the ability to rescan or reset devices specified by peripheral
name and unit number in camcontrol(8).
  
Previously camcontrol(8) only supported rescanning or resetting
devices specified by bus:target:lun.  This is because for
rescanning at least, you don't have a peripheral name and unit
number (e.g. da4) for devices that don't exist yet.
  
That is still the case after this change, but in other cases, when
the device does exist in the CAM EDT (Existing Device Table), we
do a careful lookup of the bus/target/lun if the user supplies a
peripheral name and unit number to find the bus:target:lun and then
issue the requested reset or rescan.
  
The lookup is done without actually opening the device in question,
since a rescan is often done to make a device go away after it has
been pulled.  (This is especially true for busses/controllers, like
parallel SCSI controllers, that don't automatically detect changes
in topology.)  Opening a device that is no longer there to
determine the bus/target/lun might result in error recovery actions
when the user really just wanted to make the device go away.
  
sbin/camcontrol/camcontrol.c:
In dorescan_or_reset(), if the use hasn't specified a
numeric argument, assume he has specified a device.  Lookup
the pass(4) instance for that device using the transport
layer CAMGETPASSTHRU ioctl.  If that is successful, we can
use the returned bus:target:lun to rescan or reset the
device.
  
Under the hood, resetting a device using XPT_RESET_DEV is
actually sent via the pass(4) device anyway.  But this
provides a way for the user to specify devices in a more
convenient way, and can work on device rescans when the
device is going away, assuming it still exists in the EDT.
  
sbin/camcontrol/camcontrol.8:
Update the man page for the rescan and reset subcommands
to reflect that you can now use a device name and unit
number with them.
  
  Sponsored by: Spectra Logic
  
  r317776:
Bump the camcontrol(8) man page date.
  
  Sponsored by: Spectra Logic

Modified:
  stable/10/sbin/camcontrol/camcontrol.8
  stable/10/sbin/camcontrol/camcontrol.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/camcontrol/camcontrol.8
==
--- stable/10/sbin/camcontrol/camcontrol.8  Mon May  8 17:02:01 2017
(r317946)
+++ stable/10/sbin/camcontrol/camcontrol.8  Mon May  8 17:02:03 2017
(r317947)
@@ -102,10 +102,10 @@
 .Op device id
 .Nm
 .Ic rescan
-.Aq all | bus Ns Op :target:lun
+.Aq all | device id | bus Ns Op :target:lun
 .Nm
 .Ic reset
-.Aq all | bus Ns Op :target:lun
+.Aq all | device id | bus Ns Op :target:lun
 .Nm
 .Ic defects
 .Op device id
@@ -553,12 +553,20 @@ start bit cleared and the load/eject bit
 .It Ic rescan
 Tell the kernel to scan all busses in the system (with the
 .Ar all
-argument), the given bus (XPT_SCAN_BUS), or bus:target:lun
+argument), the given bus (XPT_SCAN_BUS), bus:target:lun or device
 (XPT_SCAN_LUN) for new devices or devices that have gone away.
 The user
 may specify a scan of all busses, a single bus, or a lun.
 Scanning all luns
 on a target is not supported.
+.Pp
+If a device is specified by peripheral name and unit number, for instance
+da4, it may only be rescanned if that device currently exists in the CAM EDT
+(Existing Device Table).
+If the device is no longer there (see
+.Nm
+devlist ),
+you must use the bus:target:lun form to rescan it.
 .It Ic reprobe
 Tell the kernel to refresh the information about the device and
 notify the upper layer,
@@ -568,8 +576,8 @@ the disk size visible to the rest of the
 .It Ic reset
 Tell the kernel to reset all busses in the system (with the
 .Ar all
-argument) or the given bus (XPT_RESET_BUS) by issuing a SCSI bus
-reset for that bus, or to reset the given bus:target:lun
+argument), the given bus (XPT_RESET_BUS) by issuing a SCSI bus
+reset for that bus, or to reset the given bus:target:lun or device
 (XPT_RESET_DEV), typically by issuing a BUS DEVICE RESET message after
 connecting to that device.
 Note that this can have a destructive impact

Modified: stable/10/sbin/camcontrol/camcontrol.c
==
--- stable/10/sbin/camcontrol/camcontrol.c  Mon May  8 17:02:01 2017
(r317946)
+++ stable/10/sbin/camcontrol/camcontrol.c  Mon May  8 17:02:03 2017
(r317947)
@@ -3126,12 +3126,107 @@ dorescan_or_reset(int argc, char **argv,
tstr++;
if (strncasecmp(tstr, "all", strlen("all")) == 0)
arglist |= CAM_ARG_BUS;
-   else {
+  

svn commit: r317946 - stable/11/sbin/camcontrol

2017-05-08 Thread Kenneth D. Merry
Author: ken
Date: Mon May  8 17:02:01 2017
New Revision: 317946
URL: https://svnweb.freebsd.org/changeset/base/317946

Log:
  MFC r317774, r317776
  
  r317774:
Add the ability to rescan or reset devices specified by peripheral
name and unit number in camcontrol(8).
  
Previously camcontrol(8) only supported rescanning or resetting
devices specified by bus:target:lun.  This is because for
rescanning at least, you don't have a peripheral name and unit
number (e.g. da4) for devices that don't exist yet.
  
That is still the case after this change, but in other cases, when
the device does exist in the CAM EDT (Existing Device Table), we
do a careful lookup of the bus/target/lun if the user supplies a
peripheral name and unit number to find the bus:target:lun and then
issue the requested reset or rescan.
  
The lookup is done without actually opening the device in question,
since a rescan is often done to make a device go away after it has
been pulled.  (This is especially true for busses/controllers, like
parallel SCSI controllers, that don't automatically detect changes
in topology.)  Opening a device that is no longer there to
determine the bus/target/lun might result in error recovery actions
when the user really just wanted to make the device go away.
  
sbin/camcontrol/camcontrol.c:
In dorescan_or_reset(), if the use hasn't specified a
numeric argument, assume he has specified a device.  Lookup
the pass(4) instance for that device using the transport
layer CAMGETPASSTHRU ioctl.  If that is successful, we can
use the returned bus:target:lun to rescan or reset the
device.
  
Under the hood, resetting a device using XPT_RESET_DEV is
actually sent via the pass(4) device anyway.  But this
provides a way for the user to specify devices in a more
convenient way, and can work on device rescans when the
device is going away, assuming it still exists in the EDT.
  
sbin/camcontrol/camcontrol.8:
Update the man page for the rescan and reset subcommands
to reflect that you can now use a device name and unit
number with them.
  
  Sponsored by: Spectra Logic
  
  r317776:
Bump the camcontrol(8) man page date.
  
  Sponsored by: Spectra Logic

Modified:
  stable/11/sbin/camcontrol/camcontrol.8
  stable/11/sbin/camcontrol/camcontrol.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/camcontrol/camcontrol.8
==
--- stable/11/sbin/camcontrol/camcontrol.8  Mon May  8 16:57:33 2017
(r317945)
+++ stable/11/sbin/camcontrol/camcontrol.8  Mon May  8 17:02:01 2017
(r317946)
@@ -102,10 +102,10 @@
 .Op device id
 .Nm
 .Ic rescan
-.Aq all | bus Ns Op :target:lun
+.Aq all | device id | bus Ns Op :target:lun
 .Nm
 .Ic reset
-.Aq all | bus Ns Op :target:lun
+.Aq all | device id | bus Ns Op :target:lun
 .Nm
 .Ic defects
 .Op device id
@@ -578,12 +578,20 @@ start bit cleared and the load/eject bit
 .It Ic rescan
 Tell the kernel to scan all busses in the system (with the
 .Ar all
-argument), the given bus (XPT_SCAN_BUS), or bus:target:lun
+argument), the given bus (XPT_SCAN_BUS), bus:target:lun or device
 (XPT_SCAN_LUN) for new devices or devices that have gone away.
 The user
 may specify a scan of all busses, a single bus, or a lun.
 Scanning all luns
 on a target is not supported.
+.Pp
+If a device is specified by peripheral name and unit number, for instance
+da4, it may only be rescanned if that device currently exists in the CAM EDT
+(Existing Device Table).
+If the device is no longer there (see
+.Nm
+devlist ),
+you must use the bus:target:lun form to rescan it.
 .It Ic reprobe
 Tell the kernel to refresh the information about the device and
 notify the upper layer,
@@ -593,8 +601,8 @@ the disk size visible to the rest of the
 .It Ic reset
 Tell the kernel to reset all busses in the system (with the
 .Ar all
-argument) or the given bus (XPT_RESET_BUS) by issuing a SCSI bus
-reset for that bus, or to reset the given bus:target:lun
+argument), the given bus (XPT_RESET_BUS) by issuing a SCSI bus
+reset for that bus, or to reset the given bus:target:lun or device
 (XPT_RESET_DEV), typically by issuing a BUS DEVICE RESET message after
 connecting to that device.
 Note that this can have a destructive impact

Modified: stable/11/sbin/camcontrol/camcontrol.c
==
--- stable/11/sbin/camcontrol/camcontrol.c  Mon May  8 16:57:33 2017
(r317945)
+++ stable/11/sbin/camcontrol/camcontrol.c  Mon May  8 17:02:01 2017
(r317946)
@@ -3131,12 +3131,107 @@ dorescan_or_reset(int argc, char **argv,
tstr++;
if (strncasecmp(tstr, "all", strlen("all")) == 0)
arglist |= CAM_ARG_BUS;
-   else {
+  

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

2017-05-08 Thread Ed Maste
Author: emaste
Date: Mon May  8 16:57:33 2017
New Revision: 317945
URL: https://svnweb.freebsd.org/changeset/base/317945

Log:
  makefs: further size_t warning cleanup (missing from r317944)
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.sbin/makefs/walk.c

Modified: head/usr.sbin/makefs/walk.c
==
--- head/usr.sbin/makefs/walk.c Mon May  8 16:34:39 2017(r317944)
+++ head/usr.sbin/makefs/walk.c Mon May  8 16:57:33 2017(r317945)
@@ -79,13 +79,14 @@ walk_dir(const char *root, const char *d
charpath[MAXPATHLEN + 1];
struct stat stbuf;
char*name, *rp;
-   int dot, len;
+   size_t  len;
+   int dot;
 
assert(root != NULL);
assert(dir != NULL);
 
-   len = (size_t)snprintf(path, sizeof(path), "%s/%s", root, dir);
-   if (len >= (int)sizeof(path))
+   len = snprintf(path, sizeof(path), "%s/%s", root, dir);
+   if (len >= sizeof(path))
errx(1, "Pathname too long.");
if (debug & DEBUG_WALK_DIR)
printf("walk_dir: %s %p\n", path, parent);
@@ -119,8 +120,8 @@ walk_dir(const char *root, const char *d
}
if (debug & DEBUG_WALK_DIR_NODE)
printf("scanning %s/%s/%s\n", root, dir, name);
-   if (snprintf(path + len, sizeof(path) - len, "/%s", name) >=
-   (int)sizeof(path) - len)
+   if ((size_t)snprintf(path + len, sizeof(path) - len, "/%s",
+   name) >= sizeof(path) - len)
errx(1, "Pathname too long.");
if (lstat(path, &stbuf) == -1)
err(1, "Can't lstat `%s'", path);
@@ -396,8 +397,8 @@ apply_specdir(const char *dir, NODE *spe
if (strcmp(curnode->name, curfsnode->name) == 0)
break;
}
-   if (snprintf(path, sizeof(path), "%s/%s",
-   dir, curnode->name) >= sizeof(path))
+   if ((size_t)snprintf(path, sizeof(path), "%s/%s", dir,
+   curnode->name) >= sizeof(path))
errx(1, "Pathname too long.");
if (curfsnode == NULL) {/* need new entry */
struct stat stbuf;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2017-05-08 Thread Ed Maste
Author: emaste
Date: Mon May  8 16:34:39 2017
New Revision: 317944
URL: https://svnweb.freebsd.org/changeset/base/317944

Log:
  makefs: cast snprintf return value to size_t to clear warning
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.sbin/makefs/ffs.c
  head/usr.sbin/makefs/walk.c

Modified: head/usr.sbin/makefs/ffs.c
==
--- head/usr.sbin/makefs/ffs.c  Mon May  8 16:06:20 2017(r317943)
+++ head/usr.sbin/makefs/ffs.c  Mon May  8 16:34:39 2017(r317944)
@@ -846,8 +846,8 @@ ffs_populate_dir(const char *dir, fsnode
for (cur = root; cur != NULL; cur = cur->next) {
if (cur->child == NULL)
continue;
-   if (snprintf(path, sizeof(path), "%s/%s", dir, cur->name)
-   >= sizeof(path))
+   if ((size_t)snprintf(path, sizeof(path), "%s/%s", dir,
+   cur->name) >= sizeof(path))
errx(1, "Pathname too long.");
if (! ffs_populate_dir(path, cur->child, fsopts))
return (0);

Modified: head/usr.sbin/makefs/walk.c
==
--- head/usr.sbin/makefs/walk.c Mon May  8 16:06:20 2017(r317943)
+++ head/usr.sbin/makefs/walk.c Mon May  8 16:34:39 2017(r317944)
@@ -84,7 +84,7 @@ walk_dir(const char *root, const char *d
assert(root != NULL);
assert(dir != NULL);
 
-   len = snprintf(path, sizeof(path), "%s/%s", root, dir);
+   len = (size_t)snprintf(path, sizeof(path), "%s/%s", root, dir);
if (len >= (int)sizeof(path))
errx(1, "Pathname too long.");
if (debug & DEBUG_WALK_DIR)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317943 - stable/11/contrib/llvm/lib/Target/PowerPC

2017-05-08 Thread Dimitry Andric
Author: dim
Date: Mon May  8 16:06:20 2017
New Revision: 317943
URL: https://svnweb.freebsd.org/changeset/base/317943

Log:
  MFC r317810:
  
  Pull in r302183 from upstream llvm trunk (by Krzysztof Parzyszek):
  
[PPC] When restoring R30 (PIC base pointer), mark it as 
  
This happened on the PPC32/SVR4 path and was discovered when building
FreeBSD on PPC32. It was a typo-class error in the frame lowering
code.
  
This fixes PR26519.
  
  Reported by:  Mark Millard
  PR:   206990

Modified:
  stable/11/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
==
--- stable/11/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp  Mon May 
 8 15:51:29 2017(r317942)
+++ stable/11/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp  Mon May 
 8 16:06:20 2017(r317943)
@@ -1467,8 +1467,7 @@ void PPCFrameLowering::emitEpilogue(Mach
   }
 
   if (FI->usesPICBase())
-BuildMI(MBB, MBBI, dl, LoadInst)
-  .addReg(PPC::R30)
+BuildMI(MBB, MBBI, dl, LoadInst, PPC::R30)
   .addImm(PBPOffset)
   .addReg(RBReg);
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317942 - in head/usr.bin/csplit: . tests

2017-05-08 Thread Conrad Meyer
Author: cem
Date: Mon May  8 15:51:29 2017
New Revision: 317942
URL: https://svnweb.freebsd.org/changeset/base/317942

Log:
  csplit(1): Fix extraneous output in edge case
  
  When the input to csplit contains fewer lines than the number of matches
  specified, extra output was mistakenly included in some output files.
  
  Fix the bug and add a simple ATF regression test.
  
  PR:   219024
  Submitted by: J.R. Oldroyd 

Added:
  head/usr.bin/csplit/tests/
  head/usr.bin/csplit/tests/Makefile   (contents, props changed)
  head/usr.bin/csplit/tests/csplit_test.sh   (contents, props changed)
Modified:
  head/usr.bin/csplit/Makefile
  head/usr.bin/csplit/csplit.c

Modified: head/usr.bin/csplit/Makefile
==
--- head/usr.bin/csplit/MakefileMon May  8 14:48:39 2017
(r317941)
+++ head/usr.bin/csplit/MakefileMon May  8 15:51:29 2017
(r317942)
@@ -1,5 +1,11 @@
 # $FreeBSD$
 
+.include 
+
 PROG=  csplit
 
+.if ${MK_TESTS} != "no"
+SUBDIR+= tests
+.endif
+
 .include 

Modified: head/usr.bin/csplit/csplit.c
==
--- head/usr.bin/csplit/csplit.cMon May  8 14:48:39 2017
(r317941)
+++ head/usr.bin/csplit/csplit.cMon May  8 15:51:29 2017
(r317942)
@@ -399,8 +399,10 @@ do_rexp(const char *expr)
first = 0;
}
 
-   if (p == NULL)
+   if (p == NULL) {
+   toomuch(NULL, 0);
errx(1, "%s: no match", re);
+   }
 
if (ofs <= 0) {
/*

Added: head/usr.bin/csplit/tests/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/csplit/tests/Makefile  Mon May  8 15:51:29 2017
(r317942)
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+PACKAGE=   tests
+
+ATF_TESTS_SH=  csplit_test
+
+.include 

Added: head/usr.bin/csplit/tests/csplit_test.sh
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/csplit/tests/csplit_test.shMon May  8 15:51:29 2017
(r317942)
@@ -0,0 +1,60 @@
+# Copyright (c) 2017 Conrad Meyer 
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+
+atf_test_case lines_lt_count
+lines_lt_count_head()
+{
+   atf_set "descr" \
+   "Test an edge case where input has fewer lines than count"
+}
+lines_lt_count_body()
+{
+   cat > expectfile00 << HERE
+one
+two
+HERE
+   cat > expectfile01 << HERE
+xxx 1
+three
+four
+HERE
+   cat > expectfile02 << HERE
+xxx 2
+five
+six
+HERE
+   echo -e "one\ntwo\nxxx 1\nthree\nfour\nxxx 2\nfive\nsix" | \
+   csplit -k - '/xxx/' '{10}'
+
+   atf_check cmp expectfile00 xx00
+   atf_check cmp expectfile01 xx01
+   atf_check cmp expectfile02 xx02
+}
+
+atf_init_test_cases()
+{
+   atf_add_test_case lines_lt_count
+}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317940 - stable/11/sys/cam/scsi

2017-05-08 Thread Kenneth D. Merry
Author: ken
Date: Mon May  8 14:48:37 2017
New Revision: 317940
URL: https://svnweb.freebsd.org/changeset/base/317940

Log:
  MFC r317745:
  
Don't bother retrying errors for encrypted drives that are locked.
  
sys/cam/scsi/scsi_all.c:
In the asc_table, if we get a 0x20,0x02 error ("Access denied -
no access rights"), don't bother retrying.  Instead, immediately
fail the command.
  
This is the error returned by Self Encrypting Drives (SED) when
they are locked.
  
  Sponsored by: Spectra Logic

Modified:
  stable/11/sys/cam/scsi/scsi_all.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cam/scsi/scsi_all.c
==
--- stable/11/sys/cam/scsi/scsi_all.c   Mon May  8 14:33:38 2017
(r317939)
+++ stable/11/sys/cam/scsi/scsi_all.c   Mon May  8 14:48:37 2017
(r317940)
@@ -1614,7 +1614,7 @@ static struct asc_table_entry asc_table[
{ SST(0x20, 0x01, SS_RDEF,  /* XXX TBD */
"Access denied - initiator pending-enrolled") },
/* DT PWROMAEBK   */
-   { SST(0x20, 0x02, SS_RDEF,  /* XXX TBD */
+   { SST(0x20, 0x02, SS_FATAL | EPERM,
"Access denied - no access rights") },
/* DT PWROMAEBK   */
{ SST(0x20, 0x03, SS_RDEF,  /* XXX TBD */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317941 - stable/10/sys/cam/scsi

2017-05-08 Thread Kenneth D. Merry
Author: ken
Date: Mon May  8 14:48:39 2017
New Revision: 317941
URL: https://svnweb.freebsd.org/changeset/base/317941

Log:
  MFC r317745:
  
Don't bother retrying errors for encrypted drives that are locked.
  
sys/cam/scsi/scsi_all.c:
In the asc_table, if we get a 0x20,0x02 error ("Access denied -
no access rights"), don't bother retrying.  Instead, immediately
fail the command.
  
This is the error returned by Self Encrypting Drives (SED) when
they are locked.
  
  Sponsored by: Spectra Logic

Modified:
  stable/10/sys/cam/scsi/scsi_all.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/scsi/scsi_all.c
==
--- stable/10/sys/cam/scsi/scsi_all.c   Mon May  8 14:48:37 2017
(r317940)
+++ stable/10/sys/cam/scsi/scsi_all.c   Mon May  8 14:48:39 2017
(r317941)
@@ -1613,7 +1613,7 @@ static struct asc_table_entry asc_table[
{ SST(0x20, 0x01, SS_RDEF,  /* XXX TBD */
"Access denied - initiator pending-enrolled") },
/* DT PWROMAEBK   */
-   { SST(0x20, 0x02, SS_RDEF,  /* XXX TBD */
+   { SST(0x20, 0x02, SS_FATAL | EPERM,
"Access denied - no access rights") },
/* DT PWROMAEBK   */
{ SST(0x20, 0x03, SS_RDEF,  /* XXX TBD */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317939 - in head: share/misc usr.bin/calendar/calendars

2017-05-08 Thread Danilo G. Baio
Author: dbaio (ports committer)
Date: Mon May  8 14:33:38 2017
New Revision: 317939
URL: https://svnweb.freebsd.org/changeset/base/317939

Log:
  Add myself (dbaio) as a new ports committer
  
  Approved by:  garga (mentor)
  Differential Revision:https://reviews.freebsd.org/D10633

Modified:
  head/share/misc/committers-ports.dot
  head/usr.bin/calendar/calendars/calendar.freebsd

Modified: head/share/misc/committers-ports.dot
==
--- head/share/misc/committers-ports.dotMon May  8 14:17:10 2017
(r317938)
+++ head/share/misc/committers-ports.dotMon May  8 14:33:38 2017
(r317939)
@@ -84,6 +84,7 @@ daichi [label="Daichi Goto\ndaichi@FreeB
 danfe [label="Alexey Dokuchaev\nda...@freebsd.org\n2004/08/20"]
 danilo [label="Danilo E. Gondolfo\ndan...@freebsd.org\n2013/09/23"]
 db [label="Diane Bruce\n...@freebsd.org\n2007/01/18"]
+dbaio [label="Danilo G. Baio\ndb...@freebsd.org\n2017/05/03"]
 dbn [label="David Naylor\n...@freebsd.org\n2013/01/14"]
 decke [label="Bernhard Froehlich\nde...@freebsd.org\n2010/03/21"]
 delphij [label="Xin Li\ndelp...@freebsd.org\n2006/05/01"]
@@ -402,6 +403,7 @@ gabor -> scheidell
 
 garga -> acm
 garga -> alepulver
+garga -> dbaio
 garga -> mandree
 garga -> mm
 garga -> rnoland

Modified: head/usr.bin/calendar/calendars/calendar.freebsd
==
--- head/usr.bin/calendar/calendars/calendar.freebsdMon May  8 14:17:10 
2017(r317938)
+++ head/usr.bin/calendar/calendars/calendar.freebsdMon May  8 14:33:38 
2017(r317939)
@@ -145,6 +145,7 @@
 04/29  Adam Weinberger  born in Berkeley, California, 
United States, 1980
 04/29  Eric Anholt  born in Portland, Oregon, United 
States, 1983
 05/01  Randall Stewart  born in Spokane, Washington, United 
States, 1959
+05/02  Danilo G. Baio  born in Maringa, Parana, Brazil, 1986
 05/02  Wojciech A. Koszek  born in Czestochowa, Poland, 
1987
 05/03  Brian Dean  born in Elkins, West Virginia, United 
States, 1966
 05/03  Patrick Kelsey  born in Freehold, New Jersey, 
United States, 1976
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317938 - head/share/man/man7

2017-05-08 Thread Ed Maste
Author: emaste
Date: Mon May  8 14:17:10 2017
New Revision: 317938
URL: https://svnweb.freebsd.org/changeset/base/317938

Log:
  arch(7): correct initial versions for alpha and pc98
  
  Submitted by: imp

Modified:
  head/share/man/man7/arch.7

Modified: head/share/man/man7/arch.7
==
--- head/share/man/man7/arch.7  Mon May  8 13:09:27 2017(r317937)
+++ head/share/man/man7/arch.7  Mon May  8 14:17:10 2017(r317938)
@@ -90,7 +90,7 @@ architectures, the final release.
 .Pp
 .Bl -column -offset indent "Sy Architecture" "Sy Initial Release" "Sy Final 
Release"
 .It Sy Architecture Ta Sy Initial Release Ta Sy Final Release
-.It alpha   Ta 1.0   Ta 6.4
+.It alpha   Ta 3.x   Ta 6.4
 .It amd64   Ta 5.1
 .It arm Ta 6.0
 .It armeb   Ta 8.0
@@ -107,7 +107,7 @@ architectures, the final release.
 .It mips64elTa 9.0
 .It mips64elhf  Ta 12.0
 .It mips64hfTa 12.0
-.It pc98Ta 5.0   Ta 11.x
+.It pc98Ta 2.2   Ta 11.x
 .It powerpc Ta 6.0
 .It powerpcspe  Ta 12.0
 .It powerpc64   Ta 6.0
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317937 - in head/usr.sbin/makefs: . cd9660

2017-05-08 Thread Ed Maste
Author: emaste
Date: Mon May  8 13:09:27 2017
New Revision: 317937
URL: https://svnweb.freebsd.org/changeset/base/317937

Log:
  makefs: use size_t as appropriate to clean up warnings
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.sbin/makefs/cd9660/cd9660_eltorito.c
  head/usr.sbin/makefs/ffs.c

Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c
==
--- head/usr.sbin/makefs/cd9660/cd9660_eltorito.c   Mon May  8 10:51:30 
2017(r317936)
+++ head/usr.sbin/makefs/cd9660/cd9660_eltorito.c   Mon May  8 13:09:27 
2017(r317937)
@@ -224,7 +224,7 @@ cd9660_boot_setup_validation_entry(char 
boot_catalog_validation_entry *ve;
int16_t checksum;
unsigned char *csptr;
-   int i;
+   size_t i;
entry = cd9660_init_boot_catalog_entry();
 
ve = &entry->entry_data.VE;

Modified: head/usr.sbin/makefs/ffs.c
==
--- head/usr.sbin/makefs/ffs.c  Mon May  8 10:51:30 2017(r317936)
+++ head/usr.sbin/makefs/ffs.c  Mon May  8 13:09:27 2017(r317937)
@@ -621,7 +621,7 @@ ffs_size_dir(fsnode *root, fsinfo_t *fso
if (node->type == S_IFREG)
ADDSIZE(node->inode->st.st_size);
if (node->type == S_IFLNK) {
-   int slen;
+   size_t slen;
 
slen = strlen(node->symlink) + 1;
if (slen >= (ffs_opts->version == 1 ?
@@ -644,7 +644,7 @@ static void *
 ffs_build_dinode1(struct ufs1_dinode *dinp, dirbuf_t *dbufp, fsnode *cur,
 fsnode *root, fsinfo_t *fsopts)
 {
-   int slen;
+   size_t slen;
void *membuf;
struct stat *st = stampst.st_ino != 0 ? &stampst : &cur->inode->st;
 
@@ -692,7 +692,7 @@ static void *
 ffs_build_dinode2(struct ufs2_dinode *dinp, dirbuf_t *dbufp, fsnode *cur,
 fsnode *root, fsinfo_t *fsopts)
 {
-   int slen;
+   size_t slen;
void *membuf;
struct stat *st = stampst.st_ino != 0 ? &stampst : &cur->inode->st;
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317936 - stable/11/sys/compat/linux

2017-05-08 Thread Dmitry Chagin
Author: dchagin
Date: Mon May  8 10:51:30 2017
New Revision: 317936
URL: https://svnweb.freebsd.org/changeset/base/317936

Log:
  MFC r317645:
  
  Fix NULL pointer dereference in futex_wake_op() in case when the same
  address specified for arguments uaddr and uaddr2.
  
  PR:   218987

Modified:
  stable/11/sys/compat/linux/linux_futex.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/linux/linux_futex.c
==
--- stable/11/sys/compat/linux/linux_futex.cMon May  8 09:14:41 2017
(r317935)
+++ stable/11/sys/compat/linux/linux_futex.cMon May  8 10:51:30 2017
(r317936)
@@ -952,6 +952,11 @@ retry1:
args->uaddr, args->val, args->uaddr2, args->val3,
args->timeout);
 
+   if (args->uaddr == args->uaddr2) {
+   LIN_SDT_PROBE1(futex, linux_sys_futex, return, EINVAL);
+   return (EINVAL);
+   }
+
 retry2:
error = futex_get(args->uaddr, NULL, &f, flags | 
FUTEX_DONTLOCK);
if (error) {
@@ -959,9 +964,7 @@ retry2:
return (error);
}
 
-   if (args->uaddr != args->uaddr2)
-   error = futex_get(args->uaddr2, NULL, &f2,
-   flags | FUTEX_DONTLOCK);
+   error = futex_get(args->uaddr2, NULL, &f2, flags | 
FUTEX_DONTLOCK);
if (error) {
futex_put(f, NULL);
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317935 - head/usr.bin/resizewin

2017-05-08 Thread Edward Tomasz Napierala
Author: trasz
Date: Mon May  8 09:14:41 2017
New Revision: 317935
URL: https://svnweb.freebsd.org/changeset/base/317935

Log:
  Sort variable declarations; no functional changes.
  
  MFC after:2 weeks
  Sponsored by: DARPA, AFRL

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

Modified: head/usr.bin/resizewin/resizewin.c
==
--- head/usr.bin/resizewin/resizewin.c  Mon May  8 08:58:51 2017
(r317934)
+++ head/usr.bin/resizewin/resizewin.c  Mon May  8 09:14:41 2017
(r317935)
@@ -61,9 +61,9 @@ main(int argc, char **argv)
 {
struct termios old, new;
struct winsize w;
-   int ret, fd, ch, cnt, error, zflag;
-   char data[20];
struct timeval then, now;
+   char data[20];
+   int ch, cnt, error, fd, ret, zflag;
 
error = 0;
zflag = 0;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r317934 - head/usr.bin/resizewin

2017-05-08 Thread Edward Tomasz Napierala
Author: trasz
Date: Mon May  8 08:58:51 2017
New Revision: 317934
URL: https://svnweb.freebsd.org/changeset/base/317934

Log:
  Add resizewin -z. It makes resizewin not do anything if the terminal
  size is already set to something other than zero. It's supposed to be
  called from eg /etc/profile - it's not neccessary to query terminal
  size when logging in over the network, because the protocol used already
  takes care of this, but it's neccessary when logging over a serial line.
  
  Reviewed by:  cem, Daniel O'Connor 
  MFC after:2 weeks
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D10637

Modified:
  head/usr.bin/resizewin/resizewin.1
  head/usr.bin/resizewin/resizewin.c

Modified: head/usr.bin/resizewin/resizewin.1
==
--- head/usr.bin/resizewin/resizewin.1  Mon May  8 08:34:50 2017
(r317933)
+++ head/usr.bin/resizewin/resizewin.1  Mon May  8 08:58:51 2017
(r317934)
@@ -27,17 +27,27 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 9, 2016
+.Dd May 8, 2017
 .Dt RESIZEWIN 1
 .Os
 .Sh NAME
 .Nm resizewin
 .Nd update the kernel window size for the current TTY
+.Sh SYNOPSIS
+.Nm
+.Op Fl z
 .Sh DESCRIPTION
 Query the terminal emulator window size with the
 .Dv TIOCSWINSZ
 ioctl and set the window size known by the kernel to the new values.
 The terminal is assumed to be VT100/ANSI compatible.
+.Pp
+The following options are available:
+.Bl -tag -width ".Fl z"
+.It Fl z
+Do nothing unless the current kernel terminal size is zero.
+.El
+.Pp
 .Nm
 is functionally similar to
 .Xr resize 1 ,

Modified: head/usr.bin/resizewin/resizewin.c
==
--- head/usr.bin/resizewin/resizewin.c  Mon May  8 08:34:50 2017
(r317933)
+++ head/usr.bin/resizewin/resizewin.c  Mon May  8 08:58:51 2017
(r317934)
@@ -47,20 +47,50 @@ static const char query[] =
 "\033[999;999H"/* Move cursor */
 "\033[6n"  /* Get cursor position */
 "\0338";   /* Restore cursor position */
+
+static void
+usage(void)
+{
+
+   fprintf(stderr, "usage: resizewin [-z]\n");
+   exit(1);
+}
+
 int
-main(__unused int argc, __unused char **argv)
+main(int argc, char **argv)
 {
struct termios old, new;
struct winsize w;
-   int ret, fd, cnt, error;
+   int ret, fd, ch, cnt, error, zflag;
char data[20];
struct timeval then, now;
 
error = 0;
+   zflag = 0;
+   while ((ch = getopt(argc, argv, "z")) != -1) {
+   switch (ch) {
+   case 'z':
+   zflag = 1;
+   break;
+   case '?':
+   default:
+   usage();
+   }
+   }
+   argc -= optind;
+   if (argc != 0)
+   usage();
 
if ((fd = open("/dev/tty", O_RDWR | O_NONBLOCK)) == -1)
exit(1);
 
+   if (zflag) {
+   if (ioctl(fd, TIOCGWINSZ, &w) == -1)
+   exit(1);
+   if (w.ws_row != 0 && w.ws_col != 0)
+   exit(0);
+   }
+
/* Disable echo */
if (tcgetattr(fd, &old) == -1)
exit(1);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r317909 - head/usr.bin/resizewin

2017-05-08 Thread Edward Tomasz Napierala
On 0507T2028, Jilles Tjoelker wrote:
> On Sun, May 07, 2017 at 09:01:43PM +0300, Konstantin Belousov wrote:
> > On Sun, May 07, 2017 at 05:21:23PM +, Edward Tomasz Napierala wrote:
> > > Author: trasz
> > > Date: Sun May  7 17:21:22 2017
> > > New Revision: 317909
> > > URL: https://svnweb.freebsd.org/changeset/base/317909
> 
> > > Log:
> > >   Make resizewin(1) discard the terminal queues, to lower the chance
> > >   for "unable to parse response" error which happens when youre typing
> > >   too fast for the machine you're running it on.
> 
> > >   Reviewed by:cem, Daniel O'Connor 
> > >   MFC after:  2 weeks
> > >   Sponsored by:   DARPA, AFRL
> > >   Differential Revision:  https://reviews.freebsd.org/D10624
> 
> > > Modified:
> > >   head/usr.bin/resizewin/resizewin.c
> > > 
> > > Modified: head/usr.bin/resizewin/resizewin.c
> > > ==
> > > --- head/usr.bin/resizewin/resizewin.cSun May  7 14:59:45 2017
> > > (r317908)
> > > +++ head/usr.bin/resizewin/resizewin.cSun May  7 17:21:22 2017
> > > (r317909)
> > > @@ -52,7 +52,7 @@ main(__unused int argc, __unused char **
> > >  {
> > >   struct termios old, new;
> > >   struct winsize w;
> > > - int ret, fd, cnt, error;
> > > + int ret, fd, cnt, error, what;
> > >   char data[20];
> > >   struct timeval then, now;
> > >  
> > > @@ -71,6 +71,12 @@ main(__unused int argc, __unused char **
> > >   if (tcsetattr(fd, TCSANOW, &new) == -1)
> > >   exit(1);
> > >  
> > > + /* Discard input received so far */
> > > + what = FREAD | FWRITE;
> > > + error = ioctl(fd, TIOCFLUSH, &what);
> > This is correctly spelled tcflush(fd, TCIOFLUSH);
> 
> Alternatively, the above TCSANOW could be changed to TCSAFLUSH. The
> effect is slightly different in that pending output is drained instead
> of discarded.
> 
> In any case, the TIOCFLUSH ioctl is non-standard and should not be used
> directly.

I've changed it to use tcflush(3), as suggested by kib@, as it keeps
the current (tested) behaviour.  I'll try to investigate TCSANOW as
well, thanks!

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


svn commit: r317933 - head/usr.bin/resizewin

2017-05-08 Thread Edward Tomasz Napierala
Author: trasz
Date: Mon May  8 08:34:50 2017
New Revision: 317933
URL: https://svnweb.freebsd.org/changeset/base/317933

Log:
  Use tcflush(3) instead of (nonstandard) TIOCFLUSH.
  
  Reported by:  kib
  MFC after:2 weeks
  Sponsored by: DARPA, AFRL

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

Modified: head/usr.bin/resizewin/resizewin.c
==
--- head/usr.bin/resizewin/resizewin.c  Mon May  8 01:29:40 2017
(r317932)
+++ head/usr.bin/resizewin/resizewin.c  Mon May  8 08:34:50 2017
(r317933)
@@ -52,7 +52,7 @@ main(__unused int argc, __unused char **
 {
struct termios old, new;
struct winsize w;
-   int ret, fd, cnt, error, what;
+   int ret, fd, cnt, error;
char data[20];
struct timeval then, now;
 
@@ -72,10 +72,9 @@ main(__unused int argc, __unused char **
exit(1);
 
/* Discard input received so far */
-   what = FREAD | FWRITE;
-   error = ioctl(fd, TIOCFLUSH, &what);
+   error = tcflush(fd, TCIOFLUSH);
if (error != 0)
-   warn("ioctl");
+   warn("tcflush");
 
if (write(fd, query, sizeof(query)) != sizeof(query)) {
error = 1;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r317901 - head/usr.bin/resizewin

2017-05-08 Thread Edward Tomasz Napierala
On 0507T0919, Conrad Meyer wrote:
> On Sun, May 7, 2017 at 2:19 AM, Edward Tomasz Napierala
>  wrote:
> > Author: trasz
> > Date: Sun May  7 09:19:42 2017
> > New Revision: 317901
> > URL: https://svnweb.freebsd.org/changeset/base/317901
> >
> > Log:
> >   Improve error reporting in resizewin(1).
> >
> >   Reviewed by:  cem (earlier version)
> 
> Also reviewed by: Daniel O'Connor (the original author) :-).

Right, sorry; I somehow hadn't noticed one of the the 'accepted' checkboxes.

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