svn commit: r306550 - head/sys/arm/nvidia/tegra124

2016-09-30 Thread Michal Meloun
Author: mmel
Date: Sat Oct  1 03:35:03 2016
New Revision: 306550
URL: https://svnweb.freebsd.org/changeset/base/306550

Log:
  TEGRA: Extend timeout for PLLs lock to 5 ms. Real lock time for PLLA
  has been very near to old limit.

Modified:
  head/sys/arm/nvidia/tegra124/tegra124_clk_pll.c

Modified: head/sys/arm/nvidia/tegra124/tegra124_clk_pll.c
==
--- head/sys/arm/nvidia/tegra124/tegra124_clk_pll.c Sat Oct  1 03:24:53 
2016(r306549)
+++ head/sys/arm/nvidia/tegra124/tegra124_clk_pll.c Sat Oct  1 03:35:03 
2016(r306550)
@@ -86,7 +86,7 @@ enum pll_type {
 #definePLLRE_IDDQ_BIT  16
 #definePLLSS_IDDQ_BIT  19
 
-#definePLL_LOCK_TIMEOUT 1000
+#definePLL_LOCK_TIMEOUT5000
 
 /* Post divider <-> register value mapping. */
 struct pdiv_table {
___
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: r306549 - stable/11/sys/dev/usb/wlan

2016-09-30 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Oct  1 03:24:53 2016
New Revision: 306549
URL: https://svnweb.freebsd.org/changeset/base/306549

Log:
  MFC r306320:
  
  rsu: do not restart calibration task when going out of RUN state.
  
  Clear 'sc_calibrating' flag and stop calibration task when interface
  is not associated; this fixes possible panic after detach.
  
  Reported and tested by:   hselasky
  Reviewed by:  adrian

Modified:
  stable/11/sys/dev/usb/wlan/if_rsu.c

Modified: stable/11/sys/dev/usb/wlan/if_rsu.c
==
--- stable/11/sys/dev/usb/wlan/if_rsu.c Sat Oct  1 01:30:34 2016
(r306548)
+++ stable/11/sys/dev/usb/wlan/if_rsu.c Sat Oct  1 03:24:53 2016
(r306549)
@@ -1270,9 +1270,12 @@ rsu_newstate(struct ieee80211vap *vap, e
default:
break;
}
-   sc->sc_calibrating = 1;
-   /* Start periodic calibration. */
-   taskqueue_enqueue_timeout(taskqueue_thread, &sc->calib_task, hz);
+   if (startcal != 0) {
+   sc->sc_calibrating = 1;
+   /* Start periodic calibration. */
+   taskqueue_enqueue_timeout(taskqueue_thread, &sc->calib_task,
+   hz);
+   }
RSU_UNLOCK(sc);
IEEE80211_LOCK(ic);
return (uvp->newstate(vap, nstate, arg));
___
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: r306548 - head/sys/netinet6

2016-09-30 Thread Mark Johnston
Author: markj
Date: Sat Oct  1 01:30:34 2016
New Revision: 306548
URL: https://svnweb.freebsd.org/changeset/base/306548

Log:
  nd6_dad_timer(): don't assert that the address is tentative.
  
  It appears that this assertion can be tripped in some cases when
  multiple interfaces are on the same link. Until this is resolved, revert a
  part of r306305 and simply log a message if the DAD timer fires on a
  non-tentative address.
  
  Reported by:  jhb
  X-MFC With:   r306305

Modified:
  head/sys/netinet6/nd6_nbr.c

Modified: head/sys/netinet6/nd6_nbr.c
==
--- head/sys/netinet6/nd6_nbr.c Sat Oct  1 01:24:24 2016(r306547)
+++ head/sys/netinet6/nd6_nbr.c Sat Oct  1 01:30:34 2016(r306548)
@@ -1316,8 +1316,6 @@ nd6_dad_timer(struct dadq *dp)
char ip6buf[INET6_ADDRSTRLEN];
 
KASSERT(ia != NULL, ("DAD entry %p with no address", dp));
-   KASSERT((ia->ia6_flags & IN6_IFF_TENTATIVE) != 0,
-   ("DAD entry %p for non-tentative address", dp));
 
if (ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) {
/* Do not need DAD for ifdisabled interface. */
@@ -1332,6 +1330,13 @@ nd6_dad_timer(struct dadq *dp)
ifa->ifa_ifp ? if_name(ifa->ifa_ifp) : "???");
goto err;
}
+   if ((ia->ia6_flags & IN6_IFF_TENTATIVE) == 0) {
+   log(LOG_ERR, "nd6_dad_timer: called with non-tentative address "
+   "%s(%s)\n",
+   ip6_sprintf(ip6buf, &ia->ia_addr.sin6_addr),
+   ifa->ifa_ifp ? if_name(ifa->ifa_ifp) : "???");
+   goto err;
+   }
 
/* Stop DAD if the interface is down even after dad_maxtry attempts. */
if ((dp->dad_ns_tcount > V_dad_maxtry) &&
___
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: r306545 - head/sys/dev/fdt

2016-09-30 Thread Justin Hibbits
Author: jhibbits
Date: Sat Oct  1 01:10:51 2016
New Revision: 306545
URL: https://svnweb.freebsd.org/changeset/base/306545

Log:
  Revert r306473.
  
  Some objections were noted, and it was purely a cosmetic change anyway.

Modified:
  head/sys/dev/fdt/simplebus.c

Modified: head/sys/dev/fdt/simplebus.c
==
--- head/sys/dev/fdt/simplebus.cSat Oct  1 00:14:01 2016
(r306544)
+++ head/sys/dev/fdt/simplebus.cSat Oct  1 01:10:51 2016
(r306545)
@@ -265,15 +265,6 @@ simplebus_add_device(device_t dev, phand
 
if ((ndi = simplebus_setup_dinfo(dev, node, di)) == NULL)
return (NULL);
-
-   /*
-* If the order is unspecified, use the cell-index field, if available.
-* The cell-index property is not part of any standard, but is widely
-* used in NXP/Freescale and Marvell device trees.
-*/
-   if (order == -1)
-   OF_getencprop(node, "cell-index", &order, sizeof(order));
-
cdev = device_add_child_ordered(dev, order, name, unit);
if (cdev == NULL) {
device_printf(dev, "<%s>: device_add_child failed\n",
___
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: r306538 - head/lib/libstand

2016-09-30 Thread Bruce Evans

On Fri, 30 Sep 2016, Toomas Soome wrote:


Author: tsoome
Date: Fri Sep 30 23:19:08 2016
New Revision: 306538
URL: https://svnweb.freebsd.org/changeset/base/306538

Log:
 cstyle fix of cd9660_open in libstand

 rS306534 did create bad cstyle by my mistake, correcting it.

Modified: head/lib/libstand/cd9660.c
==
--- head/lib/libstand/cd9660.c  Fri Sep 30 23:01:37 2016(r306537)
+++ head/lib/libstand/cd9660.c  Fri Sep 30 23:19:08 2016(r306538)
@@ -356,11 +356,11 @@ cd9660_open(const char *path, struct ope

/* if the new block is zero length, its padding */
if (isonum_711(dp->length) == 0) {
-   /* skip to next block, if any */
-   off = boff * ISO_DEFAULT_BLOCK_SIZE;
-   continue;
+   /* skip to next block, if any */
+   off = boff * ISO_DEFAULT_BLOCK_SIZE;
+   continue;
} else {
-   off += isonum_711(dp->length);
+   off += isonum_711(dp->length);
}
}
if (off >= dsize) {


Fixing the remaining style bugs gives:

[Delete blank line here.]
/* If the new block has zero length, it is padding. */
if (isonum_711(dp->length) == 0) {
/* Skip to next block, if any. */
off = boff * ISO_DEFAULT_BLOCK_SIZE;
continue;
}
off += isonum_711(dp->length);

Bruce
___
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: r306544 - in head/contrib/libucl: . haskell include m4 python python/src python/tests src tests/schema

2016-09-30 Thread Baptiste Daroussin
Author: bapt
Date: Sat Oct  1 00:14:01 2016
New Revision: 306544
URL: https://svnweb.freebsd.org/changeset/base/306544

Log:
  Import libucl 20160812

Added:
  head/contrib/libucl/haskell/
 - copied from r306543, vendor/libucl/dist/haskell/
  head/contrib/libucl/m4/gcov.m4
 - copied unchanged from r306543, vendor/libucl/dist/m4/gcov.m4
  head/contrib/libucl/python/tests/
 - copied from r306543, vendor/libucl/dist/python/tests/
Deleted:
  head/contrib/libucl/python/test.sh
  head/contrib/libucl/python/test_uclmodule.py
Modified:
  head/contrib/libucl/CMakeLists.txt
  head/contrib/libucl/Makefile.unix
  head/contrib/libucl/Makefile.w32
  head/contrib/libucl/README.md
  head/contrib/libucl/include/ucl++.h
  head/contrib/libucl/include/ucl.h
  head/contrib/libucl/python/setup.py
  head/contrib/libucl/python/src/uclmodule.c
  head/contrib/libucl/src/ucl_parser.c
  head/contrib/libucl/src/ucl_schema.c
  head/contrib/libucl/src/ucl_util.c
  head/contrib/libucl/tests/schema/patternProperties.json
  head/contrib/libucl/tests/schema/refRemote.json
Directory Properties:
  head/contrib/libucl/   (props changed)

Modified: head/contrib/libucl/CMakeLists.txt
==
--- head/contrib/libucl/CMakeLists.txt  Sat Oct  1 00:12:03 2016
(r306543)
+++ head/contrib/libucl/CMakeLists.txt  Sat Oct  1 00:14:01 2016
(r306544)
@@ -205,8 +205,7 @@ SET(UCLSRC src/ucl_util.c
src/ucl_hash.c
src/ucl_schema.c
src/ucl_msgpack.c
-   src/ucl_sexp.c
-   src/xxhash.c)
+   src/ucl_sexp.c)
 
 
 SET (LIB_TYPE STATIC)

Modified: head/contrib/libucl/Makefile.unix
==
--- head/contrib/libucl/Makefile.unix   Sat Oct  1 00:12:03 2016
(r306543)
+++ head/contrib/libucl/Makefile.unix   Sat Oct  1 00:14:01 2016
(r306544)
@@ -1,7 +1,7 @@
 CC ?= gcc
 DESTDIR ?= /usr/local
 LD ?= gcc
-C_COMMON_FLAGS ?= -fPIC -Wall -W -Wno-unused-parameter -Wno-pointer-sign 
-I./include -I./uthash -I./src
+C_COMMON_FLAGS ?= -fPIC -Wall -W -Wno-unused-parameter -Wno-pointer-sign 
-I./include -I./uthash -I./src -I./klib
 MAJOR_VERSION = 0
 MINOR_VERSION = 2
 PATCH_VERSION = 9
@@ -25,13 +25,12 @@ HDEPS = $(SRCDIR)/ucl_hash.h \
$(SRCDIR)/ucl_chartable.h \
$(SRCDIR)/ucl_internal.h \
$(INCLUDEDIR)/ucl.h \
-   $(SRCDIR)/xxhash.h
+   $(SRCDIR)/mum.h
 OBJECTS = $(OBJDIR)/ucl_hash.o \
$(OBJDIR)/ucl_util.o \
$(OBJDIR)/ucl_parser.o \
$(OBJDIR)/ucl_emitter.o \
-   $(OBJDIR)/ucl_schema.o \
-   $(OBJDIR)/xxhash.o
+   $(OBJDIR)/ucl_schema.o
 
 all: $(OBJDIR) $(OBJDIR)/$(SONAME)
 
@@ -55,8 +54,6 @@ $(OBJDIR)/ucl_hash.o: $(SRCDIR)/ucl_hash
$(CC) -o $(OBJDIR)/ucl_hash.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) 
$(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_hash.c
 $(OBJDIR)/ucl_schema.o: $(SRCDIR)/ucl_schema.c $(HDEPS)
$(CC) -o $(OBJDIR)/ucl_schema.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) 
$(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_schema.c
-$(OBJDIR)/xxhash.o: $(SRCDIR)/xxhash.c $(HDEPS)
-   $(CC) -o $(OBJDIR)/xxhash.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) 
$(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/xxhash.c
 
 clean:
$(RM) $(OBJDIR)/*.o $(OBJDIR)/$(SONAME_FULL) $(OBJDIR)/$(SONAME) 
$(OBJDIR)/chargen $(OBJDIR)/test_basic $(OBJDIR)/test_speed $(OBJDIR)/objdump 
$(OBJDIR)/test_generate $(OBJDIR)/test_schema || true

Modified: head/contrib/libucl/Makefile.w32
==
--- head/contrib/libucl/Makefile.w32Sat Oct  1 00:12:03 2016
(r306543)
+++ head/contrib/libucl/Makefile.w32Sat Oct  1 00:14:01 2016
(r306544)
@@ -28,14 +28,13 @@ HDEPS = $(SRCDIR)/ucl_hash.h \
$(SRCDIR)/ucl_chartable.h \
$(SRCDIR)/ucl_internal.h \
$(INCLUDEDIR)/ucl.h \
-   $(SRCDIR)/xxhash.h
+   $(SRCDIR)/mum.h
 OBJECTS = $(OBJDIR)/ucl_hash.o \
$(OBJDIR)/ucl_util.o \
$(OBJDIR)/ucl_parser.o \
$(OBJDIR)/ucl_emitter.o \
$(OBJDIR)/ucl_emitter_utils.o \
-   $(OBJDIR)/ucl_schema.o \
-   $(OBJDIR)/xxhash.o
+   $(OBJDIR)/ucl_schema.o
 
 all: $(OBJDIR) $(OBJDIR)/$(SONAME)
 

Modified: head/contrib/libucl/README.md
==
--- head/contrib/libucl/README.md   Sat Oct  1 00:12:03 2016
(r306543)
+++ head/contrib/libucl/README.md   Sat Oct  1 00:14:01 2016
(r306544)
@@ -12,7 +12,7 @@
- [Named keys hierarchy](#named-keys-hierarchy)
- [Convenient numbers and booleans](#convenient-numbe

svn commit: r306543 - in vendor/libucl/20160812: . haskell include lua m4 python python/src python/tests src tests tests/basic tests/schema uthash utils

2016-09-30 Thread Baptiste Daroussin
Author: bapt
Date: Sat Oct  1 00:12:03 2016
New Revision: 306543
URL: https://svnweb.freebsd.org/changeset/base/306543

Log:
  tag import of libucl 20160812

Added:
  vendor/libucl/20160812/
 - copied from r294088, vendor/libucl/dist/
  vendor/libucl/20160812/haskell/
 - copied from r306542, vendor/libucl/dist/haskell/
  vendor/libucl/20160812/m4/gcov.m4
 - copied unchanged from r306542, vendor/libucl/dist/m4/gcov.m4
  vendor/libucl/20160812/python/tests/
 - copied from r306542, vendor/libucl/dist/python/tests/
  vendor/libucl/20160812/src/mum.h
 - copied unchanged from r306542, vendor/libucl/dist/src/mum.h
  vendor/libucl/20160812/tests/basic/escapes.in
 - copied unchanged from r298162, vendor/libucl/dist/tests/basic/escapes.in
  vendor/libucl/20160812/tests/basic/escapes.res
 - copied unchanged from r298162, vendor/libucl/dist/tests/basic/escapes.res
  vendor/libucl/20160812/tests/basic/load.in
 - copied unchanged from r298162, vendor/libucl/dist/tests/basic/load.in
  vendor/libucl/20160812/tests/basic/load.inc
 - copied unchanged from r298162, vendor/libucl/dist/tests/basic/load.inc
  vendor/libucl/20160812/tests/basic/load.res
 - copied unchanged from r298162, vendor/libucl/dist/tests/basic/load.res
Replaced:
  vendor/libucl/20160812/CMakeLists.txt
 - copied unchanged from r306542, vendor/libucl/dist/CMakeLists.txt
  vendor/libucl/20160812/ChangeLog.md
 - copied unchanged from r298162, vendor/libucl/dist/ChangeLog.md
  vendor/libucl/20160812/Makefile.am
 - copied unchanged from r298162, vendor/libucl/dist/Makefile.am
  vendor/libucl/20160812/Makefile.unix
 - copied unchanged from r306542, vendor/libucl/dist/Makefile.unix
  vendor/libucl/20160812/Makefile.w32
 - copied unchanged from r306542, vendor/libucl/dist/Makefile.w32
  vendor/libucl/20160812/README.md
 - copied unchanged from r306542, vendor/libucl/dist/README.md
  vendor/libucl/20160812/configure.ac
 - copied unchanged from r298162, vendor/libucl/dist/configure.ac
  vendor/libucl/20160812/include/ucl++.h
 - copied unchanged from r306542, vendor/libucl/dist/include/ucl++.h
  vendor/libucl/20160812/include/ucl.h
 - copied unchanged from r306542, vendor/libucl/dist/include/ucl.h
  vendor/libucl/20160812/lua/lua_ucl.c
 - copied unchanged from r298162, vendor/libucl/dist/lua/lua_ucl.c
  vendor/libucl/20160812/python/setup.py
 - copied unchanged from r306542, vendor/libucl/dist/python/setup.py
  vendor/libucl/20160812/python/src/uclmodule.c
 - copied unchanged from r306542, vendor/libucl/dist/python/src/uclmodule.c
  vendor/libucl/20160812/src/Makefile.am
 - copied unchanged from r301333, vendor/libucl/dist/src/Makefile.am
  vendor/libucl/20160812/src/ucl_emitter.c
 - copied unchanged from r298162, vendor/libucl/dist/src/ucl_emitter.c
  vendor/libucl/20160812/src/ucl_emitter_streamline.c
 - copied unchanged from r298162, 
vendor/libucl/dist/src/ucl_emitter_streamline.c
  vendor/libucl/20160812/src/ucl_hash.c
 - copied unchanged from r301333, vendor/libucl/dist/src/ucl_hash.c
  vendor/libucl/20160812/src/ucl_hash.h
 - copied unchanged from r298162, vendor/libucl/dist/src/ucl_hash.h
  vendor/libucl/20160812/src/ucl_internal.h
 - copied unchanged from r301333, vendor/libucl/dist/src/ucl_internal.h
  vendor/libucl/20160812/src/ucl_msgpack.c
 - copied unchanged from r301333, vendor/libucl/dist/src/ucl_msgpack.c
  vendor/libucl/20160812/src/ucl_parser.c
 - copied unchanged from r306542, vendor/libucl/dist/src/ucl_parser.c
  vendor/libucl/20160812/src/ucl_schema.c
 - copied unchanged from r306542, vendor/libucl/dist/src/ucl_schema.c
  vendor/libucl/20160812/src/ucl_sexp.c
 - copied unchanged from r298162, vendor/libucl/dist/src/ucl_sexp.c
  vendor/libucl/20160812/src/ucl_util.c
 - copied unchanged from r306542, vendor/libucl/dist/src/ucl_util.c
  vendor/libucl/20160812/tests/basic.test
 - copied unchanged from r298162, vendor/libucl/dist/tests/basic.test
  vendor/libucl/20160812/tests/basic/18.in
 - copied unchanged from r298162, vendor/libucl/dist/tests/basic/18.in
  vendor/libucl/20160812/tests/basic/18.res
 - copied unchanged from r298162, vendor/libucl/dist/tests/basic/18.res
  vendor/libucl/20160812/tests/basic/2.res
 - copied unchanged from r298162, vendor/libucl/dist/tests/basic/2.res
  vendor/libucl/20160812/tests/basic/9.in
 - copied unchanged from r298162, vendor/libucl/dist/tests/basic/9.in
  vendor/libucl/20160812/tests/basic/9.res
 - copied unchanged from r298162, vendor/libucl/dist/tests/basic/9.res
  vendor/libucl/20160812/tests/generate.res
 - copied unchanged from r298162, vendor/libucl/dist/tests/generate.res
  vendor/libucl/20160812/tests/schema.test
 - copied unchanged from r298162, vendor/libucl/dist/tests/schema.test
  vendor/libucl/20160812/tests/schema/definitions.json
 - copied unchanged from r298162, 
vendor/libucl/dist/tests/schema/definitions.json
  vendor/libucl/20

svn commit: r306542 - in vendor/libucl/dist: . haskell include m4 python python/src python/tests src tests/schema

2016-09-30 Thread Baptiste Daroussin
Author: bapt
Date: Sat Oct  1 00:11:09 2016
New Revision: 306542
URL: https://svnweb.freebsd.org/changeset/base/306542

Log:
  Update libucl to snapshot 20160812

Added:
  vendor/libucl/dist/haskell/
  vendor/libucl/dist/haskell/hucl.hs
  vendor/libucl/dist/m4/gcov.m4
  vendor/libucl/dist/python/tests/
  vendor/libucl/dist/python/tests/__init__.py   (contents, props changed)
  vendor/libucl/dist/python/tests/compat.py   (contents, props changed)
  vendor/libucl/dist/python/tests/test_dump.py   (contents, props changed)
  vendor/libucl/dist/python/tests/test_load.py   (contents, props changed)
  vendor/libucl/dist/python/tests/test_validation.py   (contents, props changed)
Deleted:
  vendor/libucl/dist/python/test.sh
  vendor/libucl/dist/python/test_uclmodule.py
Modified:
  vendor/libucl/dist/CMakeLists.txt
  vendor/libucl/dist/Makefile.unix
  vendor/libucl/dist/Makefile.w32
  vendor/libucl/dist/README.md
  vendor/libucl/dist/include/ucl++.h
  vendor/libucl/dist/include/ucl.h
  vendor/libucl/dist/python/setup.py
  vendor/libucl/dist/python/src/uclmodule.c
  vendor/libucl/dist/src/mum.h
  vendor/libucl/dist/src/ucl_parser.c
  vendor/libucl/dist/src/ucl_schema.c
  vendor/libucl/dist/src/ucl_util.c
  vendor/libucl/dist/tests/schema/patternProperties.json
  vendor/libucl/dist/tests/schema/refRemote.json

Modified: vendor/libucl/dist/CMakeLists.txt
==
--- vendor/libucl/dist/CMakeLists.txt   Fri Sep 30 23:38:26 2016
(r306541)
+++ vendor/libucl/dist/CMakeLists.txt   Sat Oct  1 00:11:09 2016
(r306542)
@@ -205,8 +205,7 @@ SET(UCLSRC src/ucl_util.c
src/ucl_hash.c
src/ucl_schema.c
src/ucl_msgpack.c
-   src/ucl_sexp.c
-   src/xxhash.c)
+   src/ucl_sexp.c)
 
 
 SET (LIB_TYPE STATIC)

Modified: vendor/libucl/dist/Makefile.unix
==
--- vendor/libucl/dist/Makefile.unixFri Sep 30 23:38:26 2016
(r306541)
+++ vendor/libucl/dist/Makefile.unixSat Oct  1 00:11:09 2016
(r306542)
@@ -1,7 +1,7 @@
 CC ?= gcc
 DESTDIR ?= /usr/local
 LD ?= gcc
-C_COMMON_FLAGS ?= -fPIC -Wall -W -Wno-unused-parameter -Wno-pointer-sign 
-I./include -I./uthash -I./src
+C_COMMON_FLAGS ?= -fPIC -Wall -W -Wno-unused-parameter -Wno-pointer-sign 
-I./include -I./uthash -I./src -I./klib
 MAJOR_VERSION = 0
 MINOR_VERSION = 2
 PATCH_VERSION = 9
@@ -25,13 +25,12 @@ HDEPS = $(SRCDIR)/ucl_hash.h \
$(SRCDIR)/ucl_chartable.h \
$(SRCDIR)/ucl_internal.h \
$(INCLUDEDIR)/ucl.h \
-   $(SRCDIR)/xxhash.h
+   $(SRCDIR)/mum.h
 OBJECTS = $(OBJDIR)/ucl_hash.o \
$(OBJDIR)/ucl_util.o \
$(OBJDIR)/ucl_parser.o \
$(OBJDIR)/ucl_emitter.o \
-   $(OBJDIR)/ucl_schema.o \
-   $(OBJDIR)/xxhash.o
+   $(OBJDIR)/ucl_schema.o
 
 all: $(OBJDIR) $(OBJDIR)/$(SONAME)
 
@@ -55,8 +54,6 @@ $(OBJDIR)/ucl_hash.o: $(SRCDIR)/ucl_hash
$(CC) -o $(OBJDIR)/ucl_hash.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) 
$(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_hash.c
 $(OBJDIR)/ucl_schema.o: $(SRCDIR)/ucl_schema.c $(HDEPS)
$(CC) -o $(OBJDIR)/ucl_schema.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) 
$(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_schema.c
-$(OBJDIR)/xxhash.o: $(SRCDIR)/xxhash.c $(HDEPS)
-   $(CC) -o $(OBJDIR)/xxhash.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) 
$(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/xxhash.c
 
 clean:
$(RM) $(OBJDIR)/*.o $(OBJDIR)/$(SONAME_FULL) $(OBJDIR)/$(SONAME) 
$(OBJDIR)/chargen $(OBJDIR)/test_basic $(OBJDIR)/test_speed $(OBJDIR)/objdump 
$(OBJDIR)/test_generate $(OBJDIR)/test_schema || true

Modified: vendor/libucl/dist/Makefile.w32
==
--- vendor/libucl/dist/Makefile.w32 Fri Sep 30 23:38:26 2016
(r306541)
+++ vendor/libucl/dist/Makefile.w32 Sat Oct  1 00:11:09 2016
(r306542)
@@ -28,14 +28,13 @@ HDEPS = $(SRCDIR)/ucl_hash.h \
$(SRCDIR)/ucl_chartable.h \
$(SRCDIR)/ucl_internal.h \
$(INCLUDEDIR)/ucl.h \
-   $(SRCDIR)/xxhash.h
+   $(SRCDIR)/mum.h
 OBJECTS = $(OBJDIR)/ucl_hash.o \
$(OBJDIR)/ucl_util.o \
$(OBJDIR)/ucl_parser.o \
$(OBJDIR)/ucl_emitter.o \
$(OBJDIR)/ucl_emitter_utils.o \
-   $(OBJDIR)/ucl_schema.o \
-   $(OBJDIR)/xxhash.o
+   $(OBJDIR)/ucl_schema.o
 
 all: $(OBJDIR) $(OBJDIR)/$(SONAME)
 

Modified: vendor/libucl/dist/README.md
==
--- vendor/libucl/dist/README.mdFri Sep 30 23:38:26 2016
(r306541)
+++ vendor/libucl/dist/README.m

svn commit: r306541 - head/contrib/dma

2016-09-30 Thread Baptiste Daroussin
Author: bapt
Date: Fri Sep 30 23:38:26 2016
New Revision: 306541
URL: https://svnweb.freebsd.org/changeset/base/306541

Log:
  Import dma 20160929
  
  MFC after:1 week

Modified:
  head/contrib/dma/dma-mbox-create.c
Directory Properties:
  head/contrib/dma/   (props changed)

Modified: head/contrib/dma/dma-mbox-create.c
==
--- head/contrib/dma/dma-mbox-create.c  Fri Sep 30 23:36:28 2016
(r306540)
+++ head/contrib/dma/dma-mbox-create.c  Fri Sep 30 23:38:26 2016
(r306541)
@@ -89,9 +89,7 @@ main(int argc, char **argv)
struct group *gr;
uid_t user_uid;
gid_t mail_gid;
-   int error;
-   char fn[PATH_MAX+1];
-   int f;
+   int f, maildirfd;
 
openlog("dma-mbox-create", 0, LOG_MAIL);
 
@@ -131,26 +129,22 @@ main(int argc, char **argv)
if (!pw)
logfail(EX_NOUSER, "cannot find user `%s'", user);
 
-   user_uid = pw->pw_uid;
+   maildirfd = open(_PATH_MAILDIR, O_RDONLY);
+   if (maildirfd < 0)
+   logfail(EX_NOINPUT, "cannot open maildir %s", _PATH_MAILDIR);
 
-   error = snprintf(fn, sizeof(fn), "%s/%s", _PATH_MAILDIR, user);
-   if (error < 0 || (size_t)error >= sizeof(fn)) {
-   if (error >= 0) {
-   errno = 0;
-   logfail(EX_USAGE, "mbox path too long");
-   }
-   logfail(EX_CANTCREAT, "cannot build mbox path for `%s/%s'", 
_PATH_MAILDIR, user);
-   }
+   user_uid = pw->pw_uid;
 
-   f = open(fn, O_RDONLY|O_CREAT|O_NOFOLLOW, 0600);
+   f = openat(maildirfd, user, O_RDONLY|O_CREAT|O_NOFOLLOW, 0600);
if (f < 0)
-   logfail(EX_NOINPUT, "cannt open mbox `%s'", fn);
+   logfail(EX_NOINPUT, "cannot open mbox `%s'", user);
 
if (fchown(f, user_uid, mail_gid))
-   logfail(EX_OSERR, "cannot change owner of mbox `%s'", fn);
+   logfail(EX_OSERR, "cannot change owner of mbox `%s'", user);
 
if (fchmod(f, 0620))
-   logfail(EX_OSERR, "cannot change permissions of mbox `%s'", fn);
+   logfail(EX_OSERR, "cannot change permissions of mbox `%s'",
+   user);
 
/* file should be present with the right owner and permissions */
 
___
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: r306540 - vendor/dma/20160929

2016-09-30 Thread Baptiste Daroussin
Author: bapt
Date: Fri Sep 30 23:36:28 2016
New Revision: 306540
URL: https://svnweb.freebsd.org/changeset/base/306540

Log:
  tag import of dma 20160929

Added:
  vendor/dma/20160929/
 - copied from r306538, vendor/dma/dist/
Replaced:
  vendor/dma/20160929/dma-mbox-create.c
 - copied unchanged from r306539, vendor/dma/dist/dma-mbox-create.c

Copied: vendor/dma/20160929/dma-mbox-create.c (from r306539, 
vendor/dma/dist/dma-mbox-create.c)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ vendor/dma/20160929/dma-mbox-create.c   Fri Sep 30 23:36:28 2016
(r306540, copy of r306539, vendor/dma/dist/dma-mbox-create.c)
@@ -0,0 +1,154 @@
+/*
+ * Copyright (c) 2010-2014, Simon Schubert <2...@0x2c.org>.
+ * Copyright (c) 2008 The DragonFly Project.  All rights reserved.
+ *
+ * This code is derived from software contributed to The DragonFly Project
+ * by Simon Schubert <2...@0x2c.org>.
+ *
+ * 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.
+ * 3. Neither the name of The DragonFly Project nor the names of its
+ *contributors may be used to endorse or promote products derived
+ *from this software without specific, prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS 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.
+ */
+
+/*
+ * This binary is setuid root.  Use extreme caution when touching
+ * user-supplied information.  Keep the root window as small as possible.
+ */
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "dma.h"
+
+
+static void
+logfail(int exitcode, const char *fmt, ...)
+{
+   int oerrno = errno;
+   va_list ap;
+   char outs[1024];
+
+   outs[0] = 0;
+   if (fmt != NULL) {
+   va_start(ap, fmt);
+   vsnprintf(outs, sizeof(outs), fmt, ap);
+   va_end(ap);
+   }
+
+   errno = oerrno;
+   if (*outs != 0)
+   syslog(LOG_ERR, errno ? "%s: %m" : "%s", outs);
+   else
+   syslog(LOG_ERR, errno ? "%m" : "unknown error");
+
+   exit(exitcode);
+}
+
+/*
+ * Create a mbox in /var/mail for a given user, or make sure
+ * the permissions are correct for dma.
+ */
+
+int
+main(int argc, char **argv)
+{
+   const char *user;
+   struct passwd *pw;
+   struct group *gr;
+   uid_t user_uid;
+   gid_t mail_gid;
+   int f, maildirfd;
+
+   openlog("dma-mbox-create", 0, LOG_MAIL);
+
+   errno = 0;
+   gr = getgrnam(DMA_GROUP);
+   if (!gr)
+   logfail(EX_CONFIG, "cannot find dma group `%s'", DMA_GROUP);
+
+   mail_gid = gr->gr_gid;
+
+   if (setgid(mail_gid) != 0)
+   logfail(EX_NOPERM, "cannot set gid to %d (%s)", mail_gid, 
DMA_GROUP);
+   if (getegid() != mail_gid)
+   logfail(EX_NOPERM, "cannot set gid to %d (%s), still at %d", 
mail_gid, DMA_GROUP, getegid());
+
+   /*
+* We take exactly one argument: the username.
+*/
+   if (argc != 2) {
+   errno = 0;
+   logfail(EX_USAGE, "no arguments");
+   }
+   user = argv[1];
+
+   syslog(LOG_NOTICE, "creating mbox for `%s'", user);
+
+   /* the username may not contain a pathname separator */
+   if (strchr(user, '/')) {
+   errno = 0;
+   logfail(EX_DATAERR, "path separator in username `%s'", user);
+   exit(1);
+   }
+
+   /* verify the user exists */
+   errno = 0;
+   pw = getpwnam(user);
+   if (!pw)
+   logfail(EX_NOUSER, "cannot find user `%s'", user);
+
+   maildirfd = open(_PATH_MAILDIR, O_RDONLY);
+   if (maildirfd < 0)
+   logfail(E

svn commit: r306539 - vendor/dma/dist

2016-09-30 Thread Baptiste Daroussin
Author: bapt
Date: Fri Sep 30 23:35:47 2016
New Revision: 306539
URL: https://svnweb.freebsd.org/changeset/base/306539

Log:
  Import dma snapshot 20160929

Modified:
  vendor/dma/dist/dma-mbox-create.c

Modified: vendor/dma/dist/dma-mbox-create.c
==
--- vendor/dma/dist/dma-mbox-create.c   Fri Sep 30 23:19:08 2016
(r306538)
+++ vendor/dma/dist/dma-mbox-create.c   Fri Sep 30 23:35:47 2016
(r306539)
@@ -89,9 +89,7 @@ main(int argc, char **argv)
struct group *gr;
uid_t user_uid;
gid_t mail_gid;
-   int error;
-   char fn[PATH_MAX+1];
-   int f;
+   int f, maildirfd;
 
openlog("dma-mbox-create", 0, LOG_MAIL);
 
@@ -131,26 +129,22 @@ main(int argc, char **argv)
if (!pw)
logfail(EX_NOUSER, "cannot find user `%s'", user);
 
-   user_uid = pw->pw_uid;
+   maildirfd = open(_PATH_MAILDIR, O_RDONLY);
+   if (maildirfd < 0)
+   logfail(EX_NOINPUT, "cannot open maildir %s", _PATH_MAILDIR);
 
-   error = snprintf(fn, sizeof(fn), "%s/%s", _PATH_MAILDIR, user);
-   if (error < 0 || (size_t)error >= sizeof(fn)) {
-   if (error >= 0) {
-   errno = 0;
-   logfail(EX_USAGE, "mbox path too long");
-   }
-   logfail(EX_CANTCREAT, "cannot build mbox path for `%s/%s'", 
_PATH_MAILDIR, user);
-   }
+   user_uid = pw->pw_uid;
 
-   f = open(fn, O_RDONLY|O_CREAT|O_NOFOLLOW, 0600);
+   f = openat(maildirfd, user, O_RDONLY|O_CREAT|O_NOFOLLOW, 0600);
if (f < 0)
-   logfail(EX_NOINPUT, "cannt open mbox `%s'", fn);
+   logfail(EX_NOINPUT, "cannot open mbox `%s'", user);
 
if (fchown(f, user_uid, mail_gid))
-   logfail(EX_OSERR, "cannot change owner of mbox `%s'", fn);
+   logfail(EX_OSERR, "cannot change owner of mbox `%s'", user);
 
if (fchmod(f, 0620))
-   logfail(EX_OSERR, "cannot change permissions of mbox `%s'", fn);
+   logfail(EX_OSERR, "cannot change permissions of mbox `%s'",
+   user);
 
/* file should be present with the right owner and permissions */
 
___
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: r306515 - head/sys/dev/bxe

2016-09-30 Thread Baptiste Daroussin
On Fri, Sep 30, 2016 at 06:08:17PM +, David C Somayajulu wrote:
> Author: davidcs
> Date: Fri Sep 30 18:08:16 2016
> New Revision: 306515
> URL: https://svnweb.freebsd.org/changeset/base/306515
> 
> Log:
>   Revert commit
>   r306284 - Fixes for issues under high workloads
>   
>   Will fix and recommit patch
> 
> Modified:
>   head/sys/dev/bxe/bxe.c
>   head/sys/dev/bxe/bxe.h
>   head/sys/dev/bxe/bxe_stats.h
> 

Thanks!

Best regards,
Bapt


signature.asc
Description: PGP signature


svn commit: r306538 - head/lib/libstand

2016-09-30 Thread Toomas Soome
Author: tsoome
Date: Fri Sep 30 23:19:08 2016
New Revision: 306538
URL: https://svnweb.freebsd.org/changeset/base/306538

Log:
  cstyle fix of cd9660_open in libstand
  
  rS306534 did create bad cstyle by my mistake, correcting it.
  
  Reviewed by:  allanjude
  Approved by:  allanjude (mentor)
  Differential Revision:https://reviews.freebsd.org/D8103

Modified:
  head/lib/libstand/cd9660.c

Modified: head/lib/libstand/cd9660.c
==
--- head/lib/libstand/cd9660.c  Fri Sep 30 23:01:37 2016(r306537)
+++ head/lib/libstand/cd9660.c  Fri Sep 30 23:19:08 2016(r306538)
@@ -356,11 +356,11 @@ cd9660_open(const char *path, struct ope
 
/* if the new block is zero length, its padding */
if (isonum_711(dp->length) == 0) {
-   /* skip to next block, if any */
-   off = boff * ISO_DEFAULT_BLOCK_SIZE;
-   continue;
+   /* skip to next block, if any */
+   off = boff * ISO_DEFAULT_BLOCK_SIZE;
+   continue;
} else {
-   off += isonum_711(dp->length);
+   off += isonum_711(dp->length);
}
}
if (off >= dsize) {
___
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: r306537 - head/lib/libc/sys

2016-09-30 Thread Conrad E. Meyer
Author: cem
Date: Fri Sep 30 23:01:37 2016
New Revision: 306537
URL: https://svnweb.freebsd.org/changeset/base/306537

Log:
  open.2: Document Capsicum behavior
  
  Document open(2) and openat(2) behavior in Capsicum capability mode.
  
  Reviewed by:  ed (previous version), emaste, rwatson (previous version),
wblock
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D7947

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

Modified: head/lib/libc/sys/open.2
==
--- head/lib/libc/sys/open.2Fri Sep 30 22:40:58 2016(r306536)
+++ head/lib/libc/sys/open.2Fri Sep 30 23:01:37 2016(r306537)
@@ -28,7 +28,7 @@
 .\" @(#)open.2 8.2 (Berkeley) 11/16/93
 .\" $FreeBSD$
 .\"
-.Dd April 2, 2015
+.Dd September 30, 2016
 .Dt OPEN 2
 .Os
 .Sh NAME
@@ -95,6 +95,28 @@ parameter, the current working directory
 and the behavior is identical to a call to
 .Fn open .
 .Pp
+In
+.Xr capsicum 4
+capability mode,
+.Fn open
+is not permitted.
+The
+.Fa path
+argument to
+.Fn openat
+must be strictly relative to a file descriptor
+.Fa fd ,
+as defined in
+.Pa sys/kern/vfs_lookup.c .
+.Fa path
+must not be an absolute path and must not contain ".." components.
+Additionally, no symbolic link in
+.Fa path
+may contain ".." components either.
+.Fa fd
+must not be
+.Dv AT_FDCWD .
+.Pp
 The flags specified are formed by
 .Em or Ns 'ing
 the following values
@@ -447,8 +469,18 @@ nor a file descriptor associated with a 
 .It Bq Er ENOTDIR
 .Dv O_DIRECTORY
 is specified and the file is not a directory.
+.It Bq Er ECAPMODE
+.Dv AT_FDCWD
+is specified and the process is in capability mode.
+.It Bq Er ECAPMODE
+.Fn open
+was called and the process is in capability mode.
+.It Bq Er ENOTCAPABLE
+.Fa path
+is an absolute path or contained "..".
 .El
 .Sh SEE ALSO
+.Xr capsicum 4 ,
 .Xr chmod 2 ,
 .Xr close 2 ,
 .Xr dup 2 ,
___
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: r306536 - in stable/10: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/c...

2016-09-30 Thread Jung-uk Kim
Author: jkim
Date: Fri Sep 30 22:40:58 2016
New Revision: 306536
URL: https://svnweb.freebsd.org/changeset/base/306536

Log:
  MFC:  r284583, r285797, r285799, r287168, r298714, r298720, r298838,
r300879
  
  Merge ACPICA up to 20160527.
  
  Requested by: mav

Added:
  stable/10/sys/contrib/dev/acpica/common/acfileio.c
 - copied unchanged from r298714, 
head/sys/contrib/dev/acpica/common/acfileio.c
  stable/10/sys/contrib/dev/acpica/common/dmtables.c
 - copied unchanged from r298714, 
head/sys/contrib/dev/acpica/common/dmtables.c
  stable/10/sys/contrib/dev/acpica/compiler/aslcstyle.y
 - copied unchanged from r298714, 
head/sys/contrib/dev/acpica/compiler/aslcstyle.y
  stable/10/sys/contrib/dev/acpica/compiler/asldebug.c
 - copied unchanged from r298714, 
head/sys/contrib/dev/acpica/compiler/asldebug.c
  stable/10/sys/contrib/dev/acpica/compiler/aslexternal.c
 - copied unchanged from r298714, 
head/sys/contrib/dev/acpica/compiler/aslexternal.c
  stable/10/sys/contrib/dev/acpica/compiler/aslpld.c
 - copied unchanged from r298714, 
head/sys/contrib/dev/acpica/compiler/aslpld.c
  stable/10/sys/contrib/dev/acpica/compiler/aslresources.y
 - copied unchanged from r298714, 
head/sys/contrib/dev/acpica/compiler/aslresources.y
  stable/10/sys/contrib/dev/acpica/compiler/aslxrefout.c
 - copied unchanged from r298714, 
head/sys/contrib/dev/acpica/compiler/aslxrefout.c
  stable/10/sys/contrib/dev/acpica/compiler/dttable1.c
 - copied unchanged from r298714, 
head/sys/contrib/dev/acpica/compiler/dttable1.c
  stable/10/sys/contrib/dev/acpica/compiler/dttable2.c
 - copied unchanged from r298714, 
head/sys/contrib/dev/acpica/compiler/dttable2.c
  stable/10/sys/contrib/dev/acpica/components/debugger/dbobject.c
 - copied, changed from r285797, 
head/sys/contrib/dev/acpica/components/debugger/dbobject.c
  stable/10/sys/contrib/dev/acpica/components/dispatcher/dsdebug.c
 - copied, changed from r285797, 
head/sys/contrib/dev/acpica/components/dispatcher/dsdebug.c
  stable/10/sys/contrib/dev/acpica/components/executer/exconcat.c
 - copied unchanged from r298714, 
head/sys/contrib/dev/acpica/components/executer/exconcat.c
  stable/10/sys/contrib/dev/acpica/components/executer/extrace.c
 - copied unchanged from r298714, 
head/sys/contrib/dev/acpica/components/executer/extrace.c
  stable/10/sys/contrib/dev/acpica/components/utilities/utascii.c
 - copied unchanged from r298714, 
head/sys/contrib/dev/acpica/components/utilities/utascii.c
  stable/10/sys/contrib/dev/acpica/components/utilities/utnonansi.c
 - copied, changed from r285797, 
head/sys/contrib/dev/acpica/components/utilities/utnonansi.c
  stable/10/sys/contrib/dev/acpica/include/acclib.h
 - copied, changed from r284583, 
head/sys/contrib/dev/acpica/include/acclib.h
  stable/10/sys/libkern/strncat.c
 - copied unchanged from r298714, head/sys/libkern/strncat.c
Deleted:
  stable/10/sys/contrib/dev/acpica/components/disassembler/dmobject.c
  stable/10/sys/contrib/dev/acpica/components/utilities/utfileio.c
Modified:
  stable/10/sys/conf/files
  stable/10/sys/contrib/dev/acpica/acpica_prep.sh
  stable/10/sys/contrib/dev/acpica/changes.txt
  stable/10/sys/contrib/dev/acpica/common/acgetline.c
  stable/10/sys/contrib/dev/acpica/common/adfile.c
  stable/10/sys/contrib/dev/acpica/common/adisasm.c
  stable/10/sys/contrib/dev/acpica/common/adwalk.c
  stable/10/sys/contrib/dev/acpica/common/ahids.c
  stable/10/sys/contrib/dev/acpica/common/ahpredef.c
  stable/10/sys/contrib/dev/acpica/common/ahtable.c
  stable/10/sys/contrib/dev/acpica/common/ahuuids.c
  stable/10/sys/contrib/dev/acpica/common/cmfsize.c
  stable/10/sys/contrib/dev/acpica/common/dmextern.c
  stable/10/sys/contrib/dev/acpica/common/dmrestag.c
  stable/10/sys/contrib/dev/acpica/common/dmtable.c
  stable/10/sys/contrib/dev/acpica/common/dmtbdump.c
  stable/10/sys/contrib/dev/acpica/common/dmtbinfo.c
  stable/10/sys/contrib/dev/acpica/common/getopt.c
  stable/10/sys/contrib/dev/acpica/compiler/aslanalyze.c
  stable/10/sys/contrib/dev/acpica/compiler/aslascii.c
  stable/10/sys/contrib/dev/acpica/compiler/aslbtypes.c
  stable/10/sys/contrib/dev/acpica/compiler/aslcodegen.c
  stable/10/sys/contrib/dev/acpica/compiler/aslcompile.c
  stable/10/sys/contrib/dev/acpica/compiler/aslcompiler.h
  stable/10/sys/contrib/dev/acpica/compiler/aslcompiler.l
  stable/10/sys/contrib/dev/acpica/compiler/asldefine.h
  stable/10/sys/contrib/dev/acpica/compiler/aslerror.c
  stable/10/sys/contrib/dev/acpica/compiler/aslfileio.c
  stable/10/sys/contrib/dev/acpica/compiler/aslfiles.c
  stable/10/sys/contrib/dev/acpica/compiler/aslfold.c
  stable/10/sys/contrib/dev/acpica/compiler/aslglobal.h
  stable/10/sys/contrib/dev/acpica/compiler/aslhex.c
  stable/10/sys/contrib/dev/acpica/compiler/asllength.c
  stable/10/sys/contrib/dev/acpica/compiler/asllisting.c
  stable/10/sys/contrib/dev/acpica/compiler/asllistsup.c
  stable/10/sys/contrib/dev/acpica/compiler/aslload.c
  stab

svn commit: r306535 - in stable/11: share/man/man9 sys/kern

2016-09-30 Thread John Baldwin
Author: jhb
Date: Fri Sep 30 22:29:19 2016
New Revision: 306535
URL: https://svnweb.freebsd.org/changeset/base/306535

Log:
  MFC 305751: Make device_quiet() an attachment property.
  
  In particular, reset the DF_QUIET flag when detaching from a device so
  that a driver that marks a device quiet doesn't dictate policy for a
  different driver that may claim the device in the future.
  
  Sponsored by: Chelsio Communications

Modified:
  stable/11/share/man/man9/device_quiet.9
  stable/11/sys/kern/subr_bus.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/man/man9/device_quiet.9
==
--- stable/11/share/man/man9/device_quiet.9 Fri Sep 30 22:28:20 2016
(r306534)
+++ stable/11/share/man/man9/device_quiet.9 Fri Sep 30 22:29:19 2016
(r306535)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 21, 1999
+.Dd September 12, 2016
 .Dt DEVICE_QUIET 9
 .Os
 .Sh NAME
@@ -49,16 +49,18 @@
 Each device has a quiet flag associated with it.
 A device is
 verbose by default when it is created but may be quieted to prevent
-the device identification string to be printed during probe.
+printing of the device identification string during attach
+and printing of a message during detach.
 To quiet a device, call
-.Fn device_quiet ,
-to re-enable to probe message (to make the message appear again, for
-example after a
-.Xr device_detach 9 )
+.Fn device_quiet
+during a device driver probe routine.
+To re-enable probe messages,
 call
 .Fn device_verbose .
 To test to see if a device is quieted, call
 .Fn device_is_quiet .
+.Pp
+Devices are implicitly marked verbose after a driver detaches.
 .Sh SEE ALSO
 .Xr device 9
 .Sh AUTHORS

Modified: stable/11/sys/kern/subr_bus.c
==
--- stable/11/sys/kern/subr_bus.c   Fri Sep 30 22:28:20 2016
(r306534)
+++ stable/11/sys/kern/subr_bus.c   Fri Sep 30 22:29:19 2016
(r306535)
@@ -2146,6 +2146,12 @@ device_probe_child(device_t dev, device_
}
 
/*
+* Reset DF_QUIET in case this driver doesn't
+* end up as the best driver.
+*/
+   device_verbose(child);
+
+   /*
 * Probes that return BUS_PROBE_NOWILDCARD or lower
 * only match on devices whose driver was explicitly
 * specified.
@@ -2970,6 +2976,7 @@ device_detach(device_t dev)
if (!(dev->flags & DF_FIXEDCLASS))
devclass_delete_device(dev->devclass, dev);
 
+   device_verbose(dev);
dev->state = DS_NOTPRESENT;
(void)device_set_driver(dev, NULL);
device_sysctl_fini(dev);
___
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: r306534 - head/lib/libstand

2016-09-30 Thread Toomas Soome
Author: tsoome
Date: Fri Sep 30 22:28:20 2016
New Revision: 306534
URL: https://svnweb.freebsd.org/changeset/base/306534

Log:
  cd9660_open should check for padding
  
  The libstand cd9660 reader code must check for extents having padding.
  
  Reviewed by:  jhb
  Approved by:  allanjude (mentor)
  Differential Revision:https://reviews.freebsd.org/D8101

Modified:
  head/lib/libstand/cd9660.c

Modified: head/lib/libstand/cd9660.c
==
--- head/lib/libstand/cd9660.c  Fri Sep 30 22:05:47 2016(r306533)
+++ head/lib/libstand/cd9660.c  Fri Sep 30 22:28:20 2016(r306534)
@@ -353,7 +353,15 @@ cd9660_open(const char *path, struct ope
 
dp = (struct iso_directory_record *)
((char *) dp + isonum_711(dp->length));
-   off += isonum_711(dp->length);
+
+   /* if the new block is zero length, its padding */
+   if (isonum_711(dp->length) == 0) {
+   /* skip to next block, if any */
+   off = boff * ISO_DEFAULT_BLOCK_SIZE;
+   continue;
+   } else {
+   off += isonum_711(dp->length);
+   }
}
if (off >= dsize) {
rc = ENOENT;
___
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: r306533 - in stable: 10/lib/libdevctl 10/sys/kern 10/sys/sys 10/usr.sbin/devctl 11/lib/libdevctl 11/sys/kern 11/sys/sys 11/usr.sbin/devctl

2016-09-30 Thread John Baldwin
Author: jhb
Date: Fri Sep 30 22:05:47 2016
New Revision: 306533
URL: https://svnweb.freebsd.org/changeset/base/306533

Log:
  MFC 305034: Implement 'devctl clear driver' to undo a previous 'set driver'.
  
  Add a new 'clear driver' command for devctl along with the accompanying
  ioctl and devctl_clear_driver() library routine to reset a device to
  use a wildcard devclass instead of a fixed devclass.  This can be used
  to undo a previous 'set driver' command.  After the device's name has
  been reset to permit wildcard names, it is reprobed so that it can
  attach to newly-available (to it) device drivers.
  
  Sponsored by: Chelsio Communications

Modified:
  stable/10/lib/libdevctl/devctl.3
  stable/10/lib/libdevctl/devctl.c
  stable/10/lib/libdevctl/devctl.h
  stable/10/sys/kern/subr_bus.c
  stable/10/sys/sys/bus.h
  stable/10/usr.sbin/devctl/devctl.8
  stable/10/usr.sbin/devctl/devctl.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/lib/libdevctl/devctl.3
  stable/11/lib/libdevctl/devctl.c
  stable/11/lib/libdevctl/devctl.h
  stable/11/sys/kern/subr_bus.c
  stable/11/sys/sys/bus.h
  stable/11/usr.sbin/devctl/devctl.8
  stable/11/usr.sbin/devctl/devctl.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/10/lib/libdevctl/devctl.3
==
--- stable/10/lib/libdevctl/devctl.3Fri Sep 30 21:14:42 2016
(r306532)
+++ stable/10/lib/libdevctl/devctl.3Fri Sep 30 22:05:47 2016
(r306533)
@@ -25,12 +25,13 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 2, 2016
+.Dd August 29, 2016
 .Dt DEVCTL 3
 .Os
 .Sh NAME
 .Nm devctl ,
 .Nm devctl_attach ,
+.Nm devctl_clear_driver ,
 .Nm devctl_detach ,
 .Nm devctl_disable ,
 .Nm devctl_enable ,
@@ -43,6 +44,8 @@
 .Ft int
 .Fn devctl_attach "const char *device"
 .Ft int
+.Fn devctl_clear_driver "const char *device" "bool force"
+.Ft int
 .Fn devctl_detach "const char *device" "bool force"
 .Ft int
 .Fn devctl_disable "const char *device" "bool force_detach"
@@ -133,9 +136,26 @@ If the device is already attached and
 is true,
 the device will be detached from its current device driver before it is
 attached to the new device driver.
+.Pp
+The
+.Fn devctl_clear_driver
+function resets a device so that it can be attached to any valid device
+driver rather than only drivers with a previously specified name.
+This function is used to undo a previous call to
+.Fn devctl_set_driver .
+If the device is already attached and
+.Fa force
+is false,
+the request will fail.
+If the device is already attached and
+.Fa force
+is true,
+the device will be detached from its current device driver.
+After the device's name is reset,
+it is reprobed and attached to a suitable device driver if one is found.
 .Sh RETURN VALUES
-.Rv -std devctl_attach devctl_detach devctl_disable devctl_enable \
-devctl_set_driver
+.Rv -std devctl_attach  devctl_clear_driver devctl_detach \
+devctl_disable devctl_enable devctl_set_driver
 .Sh ERRORS
 In addition to specific errors noted below,
 all of the
@@ -244,6 +264,24 @@ The device is disabled.
 .It Bq Er ENXIO
 The new device driver failed to attach.
 .El
+.Pp
+The
+.Fn devctl_clear_driver
+function may fail if:
+.Bl -tag -width Er
+.It Bq Er EBUSY
+The device is currently attached to a device driver and
+.Fa force
+is false.
+.It Bq Er EBUSY
+The current device driver for
+.Fa device
+is busy and cannot detach at this time.
+.It Bq Er EINVAL
+The device is not configured for a specific device driver name.
+.It Bq Er ENXIO
+The device driver chosen after reprobing failed to attach.
+.El
 .Sh SEE ALSO
 .Xr devinfo 3 ,
 .Xr devstat 3 ,

Modified: stable/10/lib/libdevctl/devctl.c
==
--- stable/10/lib/libdevctl/devctl.cFri Sep 30 21:14:42 2016
(r306532)
+++ stable/10/lib/libdevctl/devctl.cFri Sep 30 22:05:47 2016
(r306533)
@@ -108,3 +108,11 @@ devctl_set_driver(const char *device, co
req.dr_flags |= DEVF_SET_DRIVER_DETACH;
return (devctl_request(DEV_SET_DRIVER, &req));
 }
+
+int
+devctl_clear_driver(const char *device, bool force)
+{
+
+   return (devctl_simple_request(DEV_CLEAR_DRIVER, device, force ?
+   DEVF_CLEAR_DRIVER_DETACH : 0));
+}

Modified: stable/10/lib/libdevctl/devctl.h
==
--- stable/10/lib/libdevctl/devctl.hFri Sep 30 21:14:42 2016
(r306532)
+++ stable/10/lib/libdevctl/devctl.hFri Sep 30 22:05:47 2016
(r306533)
@@ -36,5 +36,6 @@ int   devctl_detach(const char *device, bo
 intdevctl_enable(const char *device);
 intdevctl_disable(const char *device, bool force_detach);
 intdevctl_set_driver(const char *device, const char *driver, bool force);
+intdevctl_clear_driver(const char *device, bool force);
 
 #endif /* !__DEVCTL_H

svn commit: r306533 - in stable: 10/lib/libdevctl 10/sys/kern 10/sys/sys 10/usr.sbin/devctl 11/lib/libdevctl 11/sys/kern 11/sys/sys 11/usr.sbin/devctl

2016-09-30 Thread John Baldwin
Author: jhb
Date: Fri Sep 30 22:05:47 2016
New Revision: 306533
URL: https://svnweb.freebsd.org/changeset/base/306533

Log:
  MFC 305034: Implement 'devctl clear driver' to undo a previous 'set driver'.
  
  Add a new 'clear driver' command for devctl along with the accompanying
  ioctl and devctl_clear_driver() library routine to reset a device to
  use a wildcard devclass instead of a fixed devclass.  This can be used
  to undo a previous 'set driver' command.  After the device's name has
  been reset to permit wildcard names, it is reprobed so that it can
  attach to newly-available (to it) device drivers.
  
  Sponsored by: Chelsio Communications

Modified:
  stable/11/lib/libdevctl/devctl.3
  stable/11/lib/libdevctl/devctl.c
  stable/11/lib/libdevctl/devctl.h
  stable/11/sys/kern/subr_bus.c
  stable/11/sys/sys/bus.h
  stable/11/usr.sbin/devctl/devctl.8
  stable/11/usr.sbin/devctl/devctl.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/lib/libdevctl/devctl.3
  stable/10/lib/libdevctl/devctl.c
  stable/10/lib/libdevctl/devctl.h
  stable/10/sys/kern/subr_bus.c
  stable/10/sys/sys/bus.h
  stable/10/usr.sbin/devctl/devctl.8
  stable/10/usr.sbin/devctl/devctl.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/11/lib/libdevctl/devctl.3
==
--- stable/11/lib/libdevctl/devctl.3Fri Sep 30 21:14:42 2016
(r306532)
+++ stable/11/lib/libdevctl/devctl.3Fri Sep 30 22:05:47 2016
(r306533)
@@ -25,12 +25,13 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 27, 2016
+.Dd August 29, 2016
 .Dt DEVCTL 3
 .Os
 .Sh NAME
 .Nm devctl ,
 .Nm devctl_attach ,
+.Nm devctl_clear_driver ,
 .Nm devctl_delete ,
 .Nm devctl_detach ,
 .Nm devctl_disable ,
@@ -47,6 +48,8 @@
 .Ft int
 .Fn devctl_attach "const char *device"
 .Ft int
+.Fn devctl_clear_driver "const char *device" "bool force"
+.Ft int
 .Fn devctl_delete "const char *device" "bool force"
 .Ft int
 .Fn devctl_detach "const char *device" "bool force"
@@ -166,12 +169,30 @@ the device will be detached from its cur
 attached to the new device driver.
 .Pp
 The
+.Fn devctl_clear_driver
+function resets a device so that it can be attached to any valid device
+driver rather than only drivers with a previously specified name.
+This function is used to undo a previous call to
+.Fn devctl_set_driver .
+If the device is already attached and
+.Fa force
+is false,
+the request will fail.
+If the device is already attached and
+.Fa force
+is true,
+the device will be detached from its current device driver.
+After the device's name is reset,
+it is reprobed and attached to a suitable device driver if one is found.
+.Pp
+The
 .Fn devctl_rescan
 function rescans a bus device checking for devices that have been added or
 removed.
 .Sh RETURN VALUES
-.Rv -std devctl_attach devctl_delete devctl_detach devctl_disable \
-devctl_enable devctl_suspend devctl_rescan devctl_resume devctl_set_driver
+.Rv -std devctl_attach devctl_clear_driver devctl_delete devctl_detach \
+devctl_disable devctl_enable devctl_suspend devctl_rescan devctl_resume \
+devctl_set_driver
 .Sh ERRORS
 In addition to specific errors noted below,
 all of the
@@ -302,6 +323,24 @@ The new device driver failed to attach.
 .El
 .Pp
 The
+.Fn devctl_clear_driver
+function may fail if:
+.Bl -tag -width Er
+.It Bq Er EBUSY
+The device is currently attached to a device driver and
+.Fa force
+is false.
+.It Bq Er EBUSY
+The current device driver for
+.Fa device
+is busy and cannot detach at this time.
+.It Bq Er EINVAL
+The device is not configured for a specific device driver name.
+.It Bq Er ENXIO
+The device driver chosen after reprobing failed to attach.
+.El
+.Pp
+The
 .Fn devctl_rescan
 function may fail if:
 .Bl -tag -width Er

Modified: stable/11/lib/libdevctl/devctl.c
==
--- stable/11/lib/libdevctl/devctl.cFri Sep 30 21:14:42 2016
(r306532)
+++ stable/11/lib/libdevctl/devctl.cFri Sep 30 22:05:47 2016
(r306533)
@@ -124,6 +124,14 @@ devctl_set_driver(const char *device, co
 }
 
 int
+devctl_clear_driver(const char *device, bool force)
+{
+
+   return (devctl_simple_request(DEV_CLEAR_DRIVER, device, force ?
+   DEVF_CLEAR_DRIVER_DETACH : 0));
+}
+
+int
 devctl_rescan(const char *device)
 {
 

Modified: stable/11/lib/libdevctl/devctl.h
==
--- stable/11/lib/libdevctl/devctl.hFri Sep 30 21:14:42 2016
(r306532)
+++ stable/11/lib/libdevctl/devctl.hFri Sep 30 22:05:47 2016
(r306533)
@@ -38,6 +38,7 @@ int   devctl_disable(const char *device, b
 intdevctl_suspend(const char *device);
 intdevctl_resume(const char *device);
 intdevctl_set_driver(const char *device, const char *driver, bool force);
+intdevctl_clear_driver(const char *devi

svn commit: r306532 - head/sys/arm/broadcom/bcm2835

2016-09-30 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Fri Sep 30 21:14:42 2016
New Revision: 306532
URL: https://svnweb.freebsd.org/changeset/base/306532

Log:
  Add dependency to evdev module

Modified:
  head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c

Modified: head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c
==
--- head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c  Fri Sep 30 21:13:19 
2016(r306531)
+++ head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c  Fri Sep 30 21:14:42 
2016(r306532)
@@ -335,3 +335,4 @@ static driver_t ft5406ts_driver = {
 };
 
 DRIVER_MODULE(ft5406ts, ofwbus, ft5406ts_driver, ft5406ts_devclass, 0, 0);
+MODULE_DEPEND(ft5406ts, evdev, 1, 1, 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"


svn commit: r306531 - head/sys/arm/ti

2016-09-30 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Fri Sep 30 21:13:19 2016
New Revision: 306531
URL: https://svnweb.freebsd.org/changeset/base/306531

Log:
  Add dependency to evdev module (if required)

Modified:
  head/sys/arm/ti/ti_adc.c

Modified: head/sys/arm/ti/ti_adc.c
==
--- head/sys/arm/ti/ti_adc.cFri Sep 30 21:04:56 2016(r306530)
+++ head/sys/arm/ti/ti_adc.cFri Sep 30 21:13:19 2016(r306531)
@@ -958,3 +958,6 @@ static devclass_t ti_adc_devclass;
 DRIVER_MODULE(ti_adc, simplebus, ti_adc_driver, ti_adc_devclass, 0, 0);
 MODULE_VERSION(ti_adc, 1);
 MODULE_DEPEND(ti_adc, simplebus, 1, 1, 1);
+#ifdef EVDEV
+MODULE_DEPEND(ti_adc, evdev, 1, 1, 1);
+#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: r306530 - in head/sys/dev: evdev usb/input

2016-09-30 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Fri Sep 30 21:04:56 2016
New Revision: 306530
URL: https://svnweb.freebsd.org/changeset/base/306530

Log:
  Declare a module for evdev and add dependency to ukbd(4) and ums(4)
  
  Prepare for making evdev a module. "Pure" evdev device drivers (like
  touchscreen) and evdev itself can be built as a modules regardless of
  "options EVDEV" in kernel config. So if people does not require evdev
  functionality in hybrid drivers like ums and ukbd they can, for instance,
  kldload evdev and utouchscreen to run FreeBSD in kiosk mode.

Modified:
  head/sys/dev/evdev/evdev.c
  head/sys/dev/usb/input/ukbd.c
  head/sys/dev/usb/input/ums.c

Modified: head/sys/dev/evdev/evdev.c
==
--- head/sys/dev/evdev/evdev.c  Fri Sep 30 21:00:09 2016(r306529)
+++ head/sys/dev/evdev/evdev.c  Fri Sep 30 21:04:56 2016(r306530)
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -916,3 +917,23 @@ evdev_stop_repeat(struct evdev_dev *evde
evdev->ev_rep_key = KEY_RESERVED;
}
 }
+
+static int
+evdev_modevent(module_t mod, int type, void *unused)
+{
+switch (type) {
+case MOD_LOAD:
+return 0;
+case MOD_UNLOAD:
+return 0;
+}
+return EINVAL;
+}
+
+static moduledata_t evdev_mod = {
+"evdev",
+evdev_modevent,
+0
+};
+DECLARE_MODULE(evdev, evdev_mod, SI_SUB_DRIVERS, SI_ORDER_ANY);
+MODULE_VERSION(evdev, 1);

Modified: head/sys/dev/usb/input/ukbd.c
==
--- head/sys/dev/usb/input/ukbd.c   Fri Sep 30 21:00:09 2016
(r306529)
+++ head/sys/dev/usb/input/ukbd.c   Fri Sep 30 21:04:56 2016
(r306530)
@@ -2300,5 +2300,8 @@ static driver_t ukbd_driver = {
 
 DRIVER_MODULE(ukbd, uhub, ukbd_driver, ukbd_devclass, ukbd_driver_load, 0);
 MODULE_DEPEND(ukbd, usb, 1, 1, 1);
+#ifdef EVDEV
+MODULE_DEPEND(ukbd, evdev, 1, 1, 1);
+#endif
 MODULE_VERSION(ukbd, 1);
 USB_PNP_HOST_INFO(ukbd_devs);

Modified: head/sys/dev/usb/input/ums.c
==
--- head/sys/dev/usb/input/ums.cFri Sep 30 21:00:09 2016
(r306529)
+++ head/sys/dev/usb/input/ums.cFri Sep 30 21:04:56 2016
(r306530)
@@ -1199,5 +1199,8 @@ static driver_t ums_driver = {
 
 DRIVER_MODULE(ums, uhub, ums_driver, ums_devclass, NULL, 0);
 MODULE_DEPEND(ums, usb, 1, 1, 1);
+#ifdef EVDEV
+MODULE_DEPEND(ums, evdev, 1, 1, 1);
+#endif
 MODULE_VERSION(ums, 1);
 USB_PNP_HOST_INFO(ums_devs);
___
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: r306529 - head/sys/cam

2016-09-30 Thread Mark Johnston
Author: markj
Date: Fri Sep 30 21:00:09 2016
New Revision: 306529
URL: https://svnweb.freebsd.org/changeset/base/306529

Log:
  cam_periph_ccbwait could return while ccb in progress
  
  In cam_periph_runccb, cam_periph_ccbwait was using the value of the ccb
  pinfo.index and status fields to determine whether the ccb was done,
  but these fields are updated without a contending lock and could glitch
  into states that would be erroneously interpreted as done.  Instead,
  have cam_periph_ccbwait look for the explicit result of the function
  cam_periph_done.
  
  Submitted by: Ryan Libby 
  Reviewed by:  mav
  MFC after:3 weeks
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D8020

Modified:
  head/sys/cam/cam_periph.c
  head/sys/cam/cam_periph.h

Modified: head/sys/cam/cam_periph.c
==
--- head/sys/cam/cam_periph.c   Fri Sep 30 20:35:12 2016(r306528)
+++ head/sys/cam/cam_periph.c   Fri Sep 30 21:00:09 2016(r306529)
@@ -975,16 +975,6 @@ cam_periph_unmapmem(union ccb *ccb, stru
PRELE(curproc);
 }
 
-void
-cam_periph_ccbwait(union ccb *ccb)
-{
-
-   if ((ccb->ccb_h.pinfo.index != CAM_UNQUEUED_INDEX)
-|| ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_INPROG))
-   xpt_path_sleep(ccb->ccb_h.path, &ccb->ccb_h.cbfcnp, PRIBIO,
-   "cbwait", 0);
-}
-
 int
 cam_periph_ioctl(struct cam_periph *periph, u_long cmd, caddr_t addr,
 int (*error_routine)(union ccb *ccb, 
@@ -1048,13 +1038,38 @@ cam_periph_ioctl(struct cam_periph *peri
 }
 
 static void
+cam_periph_done_panic(struct cam_periph *periph, union ccb *done_ccb)
+{
+
+   panic("%s: already done with ccb %p", __func__, done_ccb);
+}
+
+static void
 cam_periph_done(struct cam_periph *periph, union ccb *done_ccb)
 {
 
/* Caller will release the CCB */
+   xpt_path_assert(done_ccb->ccb_h.path, MA_OWNED);
+   done_ccb->ccb_h.cbfcnp = cam_periph_done_panic;
wakeup(&done_ccb->ccb_h.cbfcnp);
 }
 
+static void
+cam_periph_ccbwait(union ccb *ccb)
+{
+
+   if ((ccb->ccb_h.func_code & XPT_FC_QUEUED) != 0) {
+   while (ccb->ccb_h.cbfcnp != cam_periph_done_panic)
+   xpt_path_sleep(ccb->ccb_h.path, &ccb->ccb_h.cbfcnp,
+   PRIBIO, "cbwait", 0);
+   }
+   KASSERT(ccb->ccb_h.pinfo.index == CAM_UNQUEUED_INDEX &&
+   (ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_INPROG,
+   ("%s: proceeding with incomplete ccb: ccb=%p, func_code=%#x, "
+"status=%#x, index=%d", __func__, ccb, ccb->ccb_h.func_code,
+ccb->ccb_h.status, ccb->ccb_h.pinfo.index));
+}
+
 int
 cam_periph_runccb(union ccb *ccb,
  int (*error_routine)(union ccb *ccb,
@@ -1069,6 +1084,9 @@ cam_periph_runccb(union ccb *ccb,
  
starttime = NULL;
xpt_path_assert(ccb->ccb_h.path, MA_OWNED);
+   KASSERT((ccb->ccb_h.flags & CAM_UNLOCKED) == 0,
+   ("%s: ccb=%p, func_code=%#x, flags=%#x", __func__, ccb,
+ccb->ccb_h.func_code, ccb->ccb_h.flags));
 
/*
 * If the user has supplied a stats structure, and if we understand
@@ -1088,9 +1106,10 @@ cam_periph_runccb(union ccb *ccb,
cam_periph_ccbwait(ccb);
if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP)
error = 0;
-   else if (error_routine != NULL)
+   else if (error_routine != NULL) {
+   ccb->ccb_h.cbfcnp = cam_periph_done;
error = (*error_routine)(ccb, camflags, sense_flags);
-   else
+   } else
error = 0;
 
} while (error == ERESTART);

Modified: head/sys/cam/cam_periph.h
==
--- head/sys/cam/cam_periph.h   Fri Sep 30 20:35:12 2016(r306528)
+++ head/sys/cam/cam_periph.h   Fri Sep 30 21:00:09 2016(r306529)
@@ -166,7 +166,6 @@ voidcam_periph_unmapmem(union ccb *ccb
struct cam_periph_map_info *mapinfo);
 union ccb  *cam_periph_getccb(struct cam_periph *periph,
   u_int32_t priority);
-void   cam_periph_ccbwait(union ccb *ccb);
 intcam_periph_runccb(union ccb *ccb,
  int (*error_routine)(union ccb *ccb,
   cam_flags camflags,
___
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: r306528 - head/usr.sbin/sesutil

2016-09-30 Thread Alexander Motin
Author: mav
Date: Fri Sep 30 20:35:12 2016
New Revision: 306528
URL: https://svnweb.freebsd.org/changeset/base/306528

Log:
  Fix `sesutil fault` operation.
  
  Fault and ident bits are located in different control bytes, so previous
  code was just doing nothing, writing into reserved bit.
  
  MFC after:1 week

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

Modified: head/usr.sbin/sesutil/sesutil.c
==
--- head/usr.sbin/sesutil/sesutil.c Fri Sep 30 20:20:07 2016
(r306527)
+++ head/usr.sbin/sesutil/sesutil.c Fri Sep 30 20:35:12 2016
(r306528)
@@ -118,10 +118,16 @@ do_led(int fd, unsigned int idx, bool on
err(EXIT_FAILURE, "ENCIOC_GETELMSTAT");
}
o.cstat[0] |= 0x80;
-   if (onoff) {
-   o.cstat[2] |= (setfault ? 0x20 : 0x02);
+   if (setfault) {
+   if (onoff)
+   o.cstat[3] |= 0x20;
+   else
+   o.cstat[3] &= 0xdf;
} else {
-   o.cstat[2] &= (setfault ? 0xdf : 0xfd);
+   if (onoff)
+   o.cstat[2] |= 0x02;
+   else
+   o.cstat[2] &= 0xfd;
}
 
if (ioctl(fd, ENCIOC_SETELMSTAT, (caddr_t) &o) < 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: r306527 - head/lib/msun/src

2016-09-30 Thread Ed Maste
Author: emaste
Date: Fri Sep 30 20:20:07 2016
New Revision: 306527
URL: https://svnweb.freebsd.org/changeset/base/306527

Log:
  libm: remove unused variables for LDBL_MANT_DIG != 113
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/lib/msun/src/e_coshl.c
  head/lib/msun/src/e_sinhl.c
  head/lib/msun/src/s_tanhl.c

Modified: head/lib/msun/src/e_coshl.c
==
--- head/lib/msun/src/e_coshl.c Fri Sep 30 20:06:05 2016(r306526)
+++ head/lib/msun/src/e_coshl.c Fri Sep 30 20:20:07 2016(r306527)
@@ -86,7 +86,9 @@ long double
 coshl(long double x)
 {
long double hi,lo,x2,x4;
+#if LDBL_MANT_DIG == 113
double dx2;
+#endif
uint16_t ix;
 
GET_LDBL_EXPSIGN(ix,x);

Modified: head/lib/msun/src/e_sinhl.c
==
--- head/lib/msun/src/e_sinhl.c Fri Sep 30 20:06:05 2016(r306526)
+++ head/lib/msun/src/e_sinhl.c Fri Sep 30 20:20:07 2016(r306527)
@@ -85,7 +85,10 @@ long double
 sinhl(long double x)
 {
long double hi,lo,x2,x4;
-   double dx2,s;
+#if LDBL_MANT_DIG == 113
+   double dx2;
+#endif
+   double s;
int16_t ix,jx;
 
GET_LDBL_EXPSIGN(jx,x);

Modified: head/lib/msun/src/s_tanhl.c
==
--- head/lib/msun/src/s_tanhl.c Fri Sep 30 20:06:05 2016(r306526)
+++ head/lib/msun/src/s_tanhl.c Fri Sep 30 20:20:07 2016(r306527)
@@ -113,7 +113,9 @@ long double
 tanhl(long double x)
 {
long double hi,lo,s,x2,x4,z;
+#if LDBL_MANT_DIG == 113
double dx2;
+#endif
int16_t jx,ix;
 
GET_LDBL_EXPSIGN(jx,x);
___
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: r306526 - head/share/misc

2016-09-30 Thread Sevan Janiyan
Author: sevan (doc committer)
Date: Fri Sep 30 20:06:05 2016
New Revision: 306526
URL: https://svnweb.freebsd.org/changeset/base/306526

Log:
  Add NetBSD 5.1.4, 5.2.2 & 7.0.1 releases to the tree.
  Ammend the position of NetBSD 6.0.2 release in the tree as it came
  after OpenBSD[1] & DragonFlyBSD[2] release according to the release
  information.
  The entries for the 6.0.5 & 6.1.5 releases were incorrect (fetched from
  NetBSD CVS copy) and confirmed with history page[3]
  
  [1] http://www.openbsd.org/53.html
  [2] https://www.dragonflybsd.org/releases/
  [3] http://netbsd.org/releases/formal.html#history
  
  Approved by:  bcr (mentor)
  Differential Revision:https://reviews.freebsd.org/D8099

Modified:
  head/share/misc/bsd-family-tree

Modified: head/share/misc/bsd-family-tree
==
--- head/share/misc/bsd-family-tree Fri Sep 30 19:59:56 2016
(r306525)
+++ head/share/misc/bsd-family-tree Fri Sep 30 20:06:05 2016
(r306526)
@@ -258,6 +258,9 @@ FreeBSD 5.2   |  |  
  | |  8.3 |  | |  ||   |
  | |   |  |  | |   NetBSD  |   |
  | |   |  |  | |5.1.3  |   |
+ | |   |  |  | |  ||   |
+ | |   |  |  | |   NetBSD  |   |
+ | |   |  |  | |5.1.4  |   |
  | |   |  |  | |   OpenBSD 5.1 |
  | |   |   Mac OS X  | `.  |   |
  | |   | 10.8|   \ |   |
@@ -268,14 +271,17 @@ FreeBSD 5.2   |  |  
  | |   |  |  | | |||   |
  | |   |  |  | | | NetBSD  |   |
  | |   |  |  | | |  5.2.1  |   |
+ | |   |  |  | | |||   |
+ | |   |  |  | | | NetBSD  |   |
+ | |   |  |  | | |  5.2.2  |   |
  | |   |  |  | | | |   |
  | |   |  |  | |  \|   |
  | |   |  |  | |   NetBSD  |   |
  | |   |  |  | |6.0.1  |   |
- | |   |  |  | |  ||   |
+ | |   |  |  | |  |   OpenBSD 5.3  DragonFly 3.4.1
  | |   |  |  | |   NetBSD  |   |
  | |   |  |  | |6.0.2  |   |
- | |   |  |  | |  |   OpenBSD 5.3  DragonFly 3.4.1
+ | |   |  |  | |  ||   | 
  | |   |  |  | |   NetBSD  |   |
  | |   |  |  | |6.0.3  |   |
  | |   |  |  | |  ||   |
@@ -338,6 +344,7 @@ FreeBSD 5.2   |  |  
  | |  |  | |   DragonFly 4.4.1
  |  FreeBSD   |  |OpenBSD 5.9  |
  |   10.3 |  | |   |
+ ||   NetBSD 7.0.1 |   |
  ||  | |   DragonFly 4.6.0
  *--FreeBSD   |  |OpenBSD 6.0  |
  |   11.0 |  | |   |
@@ -661,12 +668,14 @@ Mac OS X 10.9 2013-10-22 [APL]
 OpenBSD 5.42013-11-01 [OBD]
 DragonFly 3.6.02013-11-25 [DFB]
 FreeBSD 10.0   2014-01-20 [FBD]
-NetBSD 6.0.4   2014-01-27 [NBD]
-NetBSD 6.1.3   2014-01-27 [NBD]
+NetBSD 5.1.4   2014-01-25 [NBD]
+NetBSD 5.2.2   2014-01-25 [NBD]
+NetBSD 6.0.4   2014-01-25 [NBD]
+NetBSD 6.1.3   2014-01-25 [NBD]
 DragonFly 3.6.12014-02-22 [DFB]
 DragonFly 3.6.22014-04-10 [DFB]
-NetBSD 6.0.5   2014-04-19 [NDB]
-NetBSD 6.1.4   2014-04-19 [NDB]
+NetBSD 6.0.5   2014-04-12 [NDB]
+NetBSD 6.1.4   2014-04-12 [NDB]
 OpenBSD 5.52014-05-01 [OBD]
 DragonFly 3.8.02014-06-04 [DFB]
 DragonFly 3.8.12014-06-16 [DFB]
@@ -691,6 +700,7 @@ OpenBSD 5.8 2015-10-18 [OBD]
 DragonFly 4.4.12015-12-07 [DFB]
 OpenBSD 5.92016-03-29 [OBD]
 FreeBSD 10.3   2016-04-04 [FBD]
+NetBSD 7.0.1   2016-05-22 [NBD]
 DragonFly 4.6.02016-08-02 [DFB]
 OpenBSD 6.02016-09-01 [OBD]
 
__

svn commit: r306525 - in head/lib: . librss

2016-09-30 Thread Adrian Chadd
Author: adrian
Date: Fri Sep 30 19:59:56 2016
New Revision: 306525
URL: https://svnweb.freebsd.org/changeset/base/306525

Log:
  Add librss, a simple wrapper around RSS APIs so applications can begin 
auto-tuning.
  
  I've used this in a handful of RSS test applications.  It is just some
  very simple functions to fetch the RSS configuration, query the per-bucket
  CPU set, and mark sockets as local to an RSS bucket.  It should be sufficient
  for both thread-based and process-based workloads.
  
  (Yes, I wrote a manpage.)
  
  This is based on some early RSS API and wrapper API work I did whilst
  I was at Netflix.  Thanks to Netflix for the very original work that
  spawned this; thanks to Peter Grehan for his feedback about RSS APIs
  and thanks to Jack Vogel and Navdeep Parhar for the NIC-facing side of the
  APIs.  These fed into the simple userland API I wrote up here.
  
  Reviewed by:  gallatin

Added:
  head/lib/librss/
  head/lib/librss/Makefile   (contents, props changed)
  head/lib/librss/librss.3   (contents, props changed)
  head/lib/librss/librss.c   (contents, props changed)
  head/lib/librss/librss.h   (contents, props changed)
Modified:
  head/lib/Makefile

Modified: head/lib/Makefile
==
--- head/lib/Makefile   Fri Sep 30 19:46:50 2016(r306524)
+++ head/lib/Makefile   Fri Sep 30 19:59:56 2016(r306525)
@@ -89,6 +89,7 @@ SUBDIR=   ${SUBDIR_BOOTSTRAP} \
libprocstat \
${_libradius} \
librpcsvc \
+   librss \
librt \
${_librtld_db} \
libsbuf \

Added: head/lib/librss/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/librss/MakefileFri Sep 30 19:59:56 2016(r306525)
@@ -0,0 +1,13 @@
+# $FreeBSD$
+
+PACKAGE=   lib${LIB}
+SHLIBDIR?= /lib
+
+.include 
+
+LIB=   rss
+SHLIB_MAJOR=   1
+
+SRCS=librss.c
+
+.include 

Added: head/lib/librss/librss.3
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/librss/librss.3Fri Sep 30 19:59:56 2016(r306525)
@@ -0,0 +1,153 @@
+.\" $FreeBSD$
+.\"
+.Dd September 29, 2016
+.Dt LIBRSS 3
+.Os
+.Sh NAME
+.Nm librss
+.Nd Provide Receive-side scaling awareness to userland applications
+.Sh LIBRARY
+.Lb librss
+.Sh SYNOPSIS
+.In librss.h
+.Ft struct rss_config *
+.Fn rss_config_get "void"
+.Ft void
+.Fn rss_config_free "struct rss_config *cfg"
+.Ft int
+.Fn rss_config_get_bucket_count "struct rss_config *cfg"
+.Ft int
+.Fn rss_set_bucket_rebalance_cb "rss_bucket_rebalance_cb_t *cb" "void *cbdata"
+.Ft int
+.Fn rss_sock_set_bindmulti "int fd" "int af" "int val"
+.Ft int
+.Fn rss_sock_set_rss_bucket "int fd" "int af" "int rss_bucket"
+.Ft int
+.Fn rss_sock_set_recvrss "int fd" "int af" "int val"
+.Sh DESCRIPTION
+The
+.Nm
+library and the functions it provides are used for both fetching
+the system RSS configuration and interacting with RSS aware
+sockets.
+.Pp
+Applications will typically call
+.Fn rss_config_get
+to fetch the current RSS configuration from the system and perform
+initial setup.
+This typically involves spawning worker threads, one per RSS bucket,
+and optionally binding them to the per-bucket CPU set.
+.Pp
+The
+.Vt rss_config
+struct is defined as:
+.Bd -literal
+struct rss_config {
+   int rss_ncpus;
+   int rss_nbuckets;
+   int rss_basecpu;
+   int *rss_bucket_map;
+};
+.Ed
+.Pp
+Applications will typically use the
+.Fn rss_config_get_bucket_count
+function to fetch the number of RSS buckets, create one thread
+per RSS bucket for RSS aware work, then one RSS aware socket to receive
+UDP datagrams or TCP connections
+in each particular RSS bucket / thread.
+.Pp
+The
+.Fn rss_get_bucket_cpuset
+function sets the given cpuset up for the given
+RSS bucket and behaviour.
+Typically applications will wish to just query for
+.Vt RSS_BUCKET_TYPE_KERNEL_ALL
+unless they wish to potentially setup different
+worker threads for transmit and receive.
+.Pp
+The
+.Vt rss_bucket_type_t
+enum is defined as:
+.Bd -literal
+typedef enum {
+RSS_BUCKET_TYPE_NONE = 0,
+RSS_BUCKET_TYPE_KERNEL_ALL = 1,
+RSS_BUCKET_TYPE_KERNEL_TX = 2,
+RSS_BUCKET_TYPE_KERNEL_RX = 3,
+RSS_BUCKET_TYPE_MAX = 3,
+} rss_bucket_type_t;
+.Ed
+.Pp
+The rebalance callback
+.Vt rss_bucket_rebalance_cb_t
+is defined as:
+.Bd -literal
+typedef void rss_bucket_rebalance_cb_t(void *arg);
+.Ed
+.Pp
+The
+.Fn rss_set_bucket_rebalance_cb
+function sets an optional callback that will be called if the kernel
+rebalances RSS buckets.
+This is intended as a future expansion to rebalance buckets rather than
+reprogram the RSS key, so typically the only work to be performed
+is to rebind worker threads to an updated cpuset.
+.Pp
+Once RSS setup is completed

svn commit: r306524 - vendor-sys/acpica/20160930

2016-09-30 Thread Jung-uk Kim
Author: jkim
Date: Fri Sep 30 19:46:50 2016
New Revision: 306524
URL: https://svnweb.freebsd.org/changeset/base/306524

Log:
  Tag ACPICA 20160930.

Added:
  vendor-sys/acpica/20160930/
 - copied from r306523, vendor-sys/acpica/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: r306523 - in vendor-sys/acpica/dist: . source/common source/compiler source/components/disassembler source/components/executer source/components/parser source/components/tables source/c...

2016-09-30 Thread Jung-uk Kim
Author: jkim
Date: Fri Sep 30 19:46:13 2016
New Revision: 306523
URL: https://svnweb.freebsd.org/changeset/base/306523

Log:
  Import ACPICA 20160930.

Modified:
  vendor-sys/acpica/dist/changes.txt
  vendor-sys/acpica/dist/source/common/acfileio.c
  vendor-sys/acpica/dist/source/compiler/aslmaputils.c
  vendor-sys/acpica/dist/source/compiler/asloperands.c
  vendor-sys/acpica/dist/source/compiler/asloptions.c
  vendor-sys/acpica/dist/source/compiler/aslrules.y
  vendor-sys/acpica/dist/source/compiler/aslxref.c
  vendor-sys/acpica/dist/source/components/disassembler/dmbuffer.c
  vendor-sys/acpica/dist/source/components/disassembler/dmcstyle.c
  vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c
  vendor-sys/acpica/dist/source/components/disassembler/dmresrcl.c
  vendor-sys/acpica/dist/source/components/executer/exconfig.c
  vendor-sys/acpica/dist/source/components/parser/psxface.c
  vendor-sys/acpica/dist/source/components/tables/tbdata.c
  vendor-sys/acpica/dist/source/components/tables/tbfind.c
  vendor-sys/acpica/dist/source/components/tables/tbxfload.c
  vendor-sys/acpica/dist/source/components/utilities/utstrtoul64.c
  vendor-sys/acpica/dist/source/include/acconfig.h
  vendor-sys/acpica/dist/source/include/acglobal.h
  vendor-sys/acpica/dist/source/include/aclocal.h
  vendor-sys/acpica/dist/source/include/acpixf.h
  vendor-sys/acpica/dist/source/include/platform/acmacosx.h
  vendor-sys/acpica/dist/source/os_specific/service_layers/osunixxf.c
  vendor-sys/acpica/dist/source/tools/acpibin/abcompare.c
  vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c
  vendor-sys/acpica/dist/source/tools/acpinames/anmain.c
  vendor-sys/acpica/dist/source/tools/acpisrc/asfile.c

Modified: vendor-sys/acpica/dist/changes.txt
==
--- vendor-sys/acpica/dist/changes.txt  Fri Sep 30 19:21:02 2016
(r306522)
+++ vendor-sys/acpica/dist/changes.txt  Fri Sep 30 19:46:13 2016
(r306523)
@@ -1,4 +1,83 @@
 
+30 September 2016. Summary of changes for version 20160930:
+
+
+1) ACPICA kernel-resident subsystem:
+
+Fixed a regression in the internal AcpiTbFindTable function where a non 
+AE_OK exception could inadvertently be returned even if the function did 
+not fail. This problem affects the following operators:
+DataTableRegion
+LoadTable
+
+Fixed a regression in the LoadTable operator where a load to any 
+namespace location other than the root no longer worked properly.
+
+Increased the maximum loop count value that will result in the 
+AE_AML_INFINITE_LOOP exception. This is a mechanism that is intended to 
+prevent infinite loops within the AML interpreter and thus the host OS 
+kernel. The value is increased from 0x to 0xF loops (65,535 to 
+1,048,575).
+
+Moved the AcpiGbl_MaxLoopIterations configuration variable to the public 
+acpixf.h file. This allows hosts to easily configure the maximum loop 
+count at runtime.
+
+Removed an illegal character in the strtoul64.c file. This character 
+caused errors with some C compilers.
+
+Example Code and Data Size: These are the sizes for the OS-independent 
+acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The 
+debug version of the code includes the debug output trace mechanism and 
+has a much larger code and data size.
+
+  Current Release:
+Non-Debug Version: 140.4K Code, 58.1K Data, 198.5K Total
+Debug Version: 200.7K Code, 82.1K Data, 282.8K Total
+  Previous Release:
+Non-Debug Version: 140.0K Code, 58.1K Data, 198.1K Total
+Debug Version: 200.3K Code, 82.1K Data, 282.4K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+Disassembler: Fixed a problem with the conversion of Else{If{ blocks into 
+the simpler ASL ElseIf keyword. During the conversion, a trailing If 
+block could be lost and missing from the disassembled output.
+
+iASL: Fixed a missing parser rule for the ObjectType operator. For ASL+, 
+the missing rule caused a parse error when using the Index operator as an 
+operand to ObjectType. This construct now compiles properly. Example:
+ObjectType(PKG1[4]).
+
+iASL: Correctly handle unresolved symbols in the hardware map file (-lm 
+option). Previously, unresolved symbols could cause a protection fault. 
+Such symbols are now marked as unresolved in the map file.
+
+iASL: Implemented support to allow control method invocations as an 
+operand to the ASL DeRefOf operator. Example:
+DeRefOf(MTH1(Local0))
+
+Disassembler: Improved support for the ToPLD ASL macro. Detection of a 
+possible _PLD buffer now includes examination of both the normal buffer 
+length (16 or 20) as well as the surrounding AML package length.
+
+Disassembler: Fixed a problem with the decoding of complex expressions 
+within the Divide operator for ASL+. For the case where both the quotient 
+and remainder targets are specified, the entire statement cannot be 
+disassembled

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

2016-09-30 Thread David C Somayajulu
Author: davidcs
Date: Fri Sep 30 19:21:02 2016
New Revision: 306522
URL: https://svnweb.freebsd.org/changeset/base/306522

Log:
  Upgrade Firmware/Bootloader/ResetSeq/Minidump to revision 5.4.62
  
  MFC after:5 days

Modified:
  head/sys/dev/qlxgbe/ql_boot.c
  head/sys/dev/qlxgbe/ql_fw.c
  head/sys/dev/qlxgbe/ql_minidump.c
  head/sys/dev/qlxgbe/ql_reset.c

Modified: head/sys/dev/qlxgbe/ql_boot.c
==
--- head/sys/dev/qlxgbe/ql_boot.c   Fri Sep 30 18:58:50 2016
(r306521)
+++ head/sys/dev/qlxgbe/ql_boot.c   Fri Sep 30 19:21:02 2016
(r306522)
@@ -35,13 +35,13 @@ __FBSDID("$FreeBSD$");
 
 unsigned int ql83xx_bootloader_version_major = 5;
 unsigned int ql83xx_bootloader_version_minor = 4;
-unsigned int ql83xx_bootloader_version_sub = 58;
+unsigned int ql83xx_bootloader_version_sub = 62;
 unsigned char ql83xx_bootloader[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0,
-  0x04, 0x00, 0xc0, 0x81, 0x05, 0x1f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00,
+  0x04, 0x00, 0xc0, 0x83, 0x05, 0x1f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x80, 0x1e, 0x02, 0x21, 0x00, 0x08, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x20, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70,
@@ -71,7 +71,7 @@ unsigned char ql83xx_bootloader[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x83, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,
+  0x8b, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -703,11 +703,11 @@ unsigned char ql83xx_bootloader[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0,
   0x00, 0x00, 0x80, 0x02, 0xe0, 0x0e, 0x07, 0x84, 0x0b, 0x08, 0x60, 0x00,
   0xa0, 0xc3, 0x01, 0x81, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x4f, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0c, 0x00, 0x0d, 0x01,
+  0x57, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0c, 0x00, 0x0d, 0x01,
   0x40, 0x04, 0x1a, 0x03, 0x00, 0x10, 0x78, 0x02, 0x00, 0x82, 0x01, 0xa0,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x4c, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,
+  0x54, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0,
   0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1384,7 +1384,7 @@ unsigned char ql83xx_bootloader[] = {
   0x00, 0x81, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x14,
   0xe0, 0x11, 0x20, 0xa2, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
   0xbb, 0x11, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x40, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60,
+  0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60,
   0x00, 0x02, 0x00, 0x80, 0x40, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x80, 0x0b, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00,
@@ -1421,14 +1421,14 @@ unsigned char ql83xx_bootloader[] = {
   0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
   0xce, 0x11, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0xc0, 0x1f, 0x02, 0x16, 0x04, 0x00, 0x00, 0x00, 0x60,
-  0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00,
+  0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x7c, 0x00,
   0x00, 0x00, 0x00, 0x60, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x49, 0x07,
+  0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x49, 0x07,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50,
   0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x07, 0x00, 0x00, 0x26, 0x00,
   0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x78, 0x00, 0x00, 0x80, 0x01, 0xa0, 0x20, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60,
+  0x

svn commit: r306521 - in head/sys: amd64/amd64 amd64/include x86/include x86/x86

2016-09-30 Thread Conrad E. Meyer
Author: cem
Date: Fri Sep 30 18:58:50 2016
New Revision: 306521
URL: https://svnweb.freebsd.org/changeset/base/306521

Log:
  Revert r306516 for now, it is incomplete on i386
  
  Noted by: kib

Modified:
  head/sys/amd64/amd64/mp_machdep.c
  head/sys/amd64/include/pcpu.h
  head/sys/x86/include/x86_smp.h
  head/sys/x86/x86/mp_x86.c

Modified: head/sys/amd64/amd64/mp_machdep.c
==
--- head/sys/amd64/amd64/mp_machdep.c   Fri Sep 30 18:47:34 2016
(r306520)
+++ head/sys/amd64/amd64/mp_machdep.c   Fri Sep 30 18:58:50 2016
(r306521)
@@ -409,7 +409,6 @@ void
 invltlb_invpcid_handler(void)
 {
struct invpcid_descr d;
-   uint64_t generation;
 
 #ifdef COUNT_XINVLTLB_HITS
xhits_gbl[PCPU_GET(cpuid)]++;
@@ -418,20 +417,17 @@ invltlb_invpcid_handler(void)
(*ipi_invltlb_counts[PCPU_GET(cpuid)])++;
 #endif /* COUNT_IPIS */
 
-   generation = smp_tlb_generation;
d.pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid;
d.pad = 0;
d.addr = 0;
invpcid(&d, smp_tlb_pmap == kernel_pmap ? INVPCID_CTXGLOB :
INVPCID_CTX);
-   PCPU_SET(smp_tlb_done, generation);
+   atomic_add_int(&smp_tlb_wait, 1);
 }
 
 void
 invltlb_pcid_handler(void)
 {
-   uint64_t generation;
-  
 #ifdef COUNT_XINVLTLB_HITS
xhits_gbl[PCPU_GET(cpuid)]++;
 #endif /* COUNT_XINVLTLB_HITS */
@@ -439,7 +435,6 @@ invltlb_pcid_handler(void)
(*ipi_invltlb_counts[PCPU_GET(cpuid)])++;
 #endif /* COUNT_IPIS */
 
-   generation = smp_tlb_generation;
if (smp_tlb_pmap == kernel_pmap) {
invltlb_glob();
} else {
@@ -455,5 +450,5 @@ invltlb_pcid_handler(void)
smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid);
}
}
-   PCPU_SET(smp_tlb_done, generation);
+   atomic_add_int(&smp_tlb_wait, 1);
 }

Modified: head/sys/amd64/include/pcpu.h
==
--- head/sys/amd64/include/pcpu.h   Fri Sep 30 18:47:34 2016
(r306520)
+++ head/sys/amd64/include/pcpu.h   Fri Sep 30 18:58:50 2016
(r306521)
@@ -65,8 +65,7 @@
u_int   pc_vcpu_id; /* Xen vCPU ID */   \
uint32_t pc_pcid_next;  \
uint32_t pc_pcid_gen;   \
-   uint64_t pc_smp_tlb_done;   /* TLB op acknowledgement */\
-   char__pad[141]  /* be divisor of PAGE_SIZE  \
+   char__pad[149]  /* be divisor of PAGE_SIZE  \
   after cache alignment */
 
 #definePC_DBREG_CMD_NONE   0

Modified: head/sys/x86/include/x86_smp.h
==
--- head/sys/x86/include/x86_smp.h  Fri Sep 30 18:47:34 2016
(r306520)
+++ head/sys/x86/include/x86_smp.h  Fri Sep 30 18:58:50 2016
(r306521)
@@ -35,7 +35,7 @@ extern volatile int aps_ready;
 extern struct mtx ap_boot_mtx;
 extern int cpu_logical;
 extern int cpu_cores;
-extern volatile uint64_t smp_tlb_generation;
+extern volatile int smp_tlb_wait;
 extern struct pmap *smp_tlb_pmap;
 extern u_int xhits_gbl[];
 extern u_int xhits_pg[];

Modified: head/sys/x86/x86/mp_x86.c
==
--- head/sys/x86/x86/mp_x86.c   Fri Sep 30 18:47:34 2016(r306520)
+++ head/sys/x86/x86/mp_x86.c   Fri Sep 30 18:58:50 2016(r306521)
@@ -1304,15 +1304,12 @@ cpususpend_handler(void)
 void
 invlcache_handler(void)
 {
-   uint64_t generation;
-  
 #ifdef COUNT_IPIS
(*ipi_invlcache_counts[PCPU_GET(cpuid)])++;
 #endif /* COUNT_IPIS */
 
-   generation = smp_tlb_generation;
wbinvd();
-   PCPU_SET(smp_tlb_done, generation);
+   atomic_add_int(&smp_tlb_wait, 1);
 }
 
 /*
@@ -1370,7 +1367,7 @@ SYSINIT(mp_ipi_intrcnt, SI_SUB_INTR, SI_
 /* Variables needed for SMP tlb shootdown. */
 static vm_offset_t smp_tlb_addr1, smp_tlb_addr2;
 pmap_t smp_tlb_pmap;
-volatile uint64_t smp_tlb_generation;
+volatile int smp_tlb_wait;
 
 #ifdef __amd64__
 #defineread_eflags() read_rflags()
@@ -1380,16 +1377,15 @@ static void
 smp_targeted_tlb_shootdown(cpuset_t mask, u_int vector, pmap_t pmap,
 vm_offset_t addr1, vm_offset_t addr2)
 {
-   cpuset_t other_cpus;
-   volatile uint64_t *p_cpudone;
-   uint64_t generation;
-   int cpu;
+   int cpu, ncpu, othercpus;
+
+   othercpus = mp_ncpus - 1;   /* does not shootdown self */
 
/*
 * Check for other cpus.  Return if none.
 */
if (CPU_ISFULLSET(&mask)) {
-   if (mp_ncpus <= 1)
+   if (othercpus < 1)
return;
} else {
CPU_CLR(PCPU_GET(cpuid), &mask);
@@ -1403,28 +1

svn commit: r306520 - in stable: 10/share/man/man9 10/sys/amd64/vmm/io 10/sys/dev/pci 11/share/man/man9 11/sys/amd64/vmm/io 11/sys/dev/pci

2016-09-30 Thread John Baldwin
Author: jhb
Date: Fri Sep 30 18:47:34 2016
New Revision: 306520
URL: https://svnweb.freebsd.org/changeset/base/306520

Log:
  MFC 305502: Reset PCI pass through devices via PCI-e FLR during VM start/end.
  
  Add routines to trigger a function level reset (FLR) of a PCI-express
  device via the PCI-express device control register.  This also includes
  support routines to wait for pending transactions to complete as well
  as calculating the maximum completion timeout permitted by a device.
  
  Change the ppt(4) driver to reset pass through devices before attaching
  to a VM during startup and before detaching from a VM during shutdown.
  
  Sponsored by: Chelsio Communications

Modified:
  stable/11/share/man/man9/Makefile
  stable/11/share/man/man9/pci.9
  stable/11/sys/amd64/vmm/io/ppt.c
  stable/11/sys/dev/pci/pci.c
  stable/11/sys/dev/pci/pcireg.h
  stable/11/sys/dev/pci/pcivar.h
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/share/man/man9/Makefile
  stable/10/share/man/man9/pci.9
  stable/10/sys/amd64/vmm/io/ppt.c
  stable/10/sys/dev/pci/pci.c
  stable/10/sys/dev/pci/pcireg.h
  stable/10/sys/dev/pci/pcivar.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/11/share/man/man9/Makefile
==
--- stable/11/share/man/man9/Makefile   Fri Sep 30 18:43:39 2016
(r306519)
+++ stable/11/share/man/man9/Makefile   Fri Sep 30 18:47:34 2016
(r306520)
@@ -1319,7 +1319,10 @@ MLINKS+=pci.9 pci_alloc_msi.9 \
pci.9 pci_set_max_read_req.9 \
pci.9 pci_write_config.9 \
pci.9 pcie_adjust_config.9 \
+   pci.9 pcie_flr.9 \
+   pci.9 pcie_max_completion_timeout.9 \
pci.9 pcie_read_config.9 \
+   pci.9 pcie_wait_for_pending_transactions.9 \
pci.9 pcie_write_config.9
 MLINKS+=pci_iov_schema.9 pci_iov_schema_alloc_node.9 \
pci_iov_schema.9 pci_iov_schema_add_bool.9 \

Modified: stable/11/share/man/man9/pci.9
==
--- stable/11/share/man/man9/pci.9  Fri Sep 30 18:43:39 2016
(r306519)
+++ stable/11/share/man/man9/pci.9  Fri Sep 30 18:47:34 2016
(r306520)
@@ -66,7 +66,10 @@
 .Nm pci_set_powerstate ,
 .Nm pci_write_config ,
 .Nm pcie_adjust_config ,
+.Nm pcie_flr ,
+.Nm pcie_get_max_completion_timeout ,
 .Nm pcie_read_config ,
+.Nm pcie_wait_for_pending_transactions ,
 .Nm pcie_write_config
 .Nd PCI bus interface
 .Sh SYNOPSIS
@@ -145,8 +148,14 @@
 .Fa "uint32_t val"
 .Fa "int width"
 .Fc
+.Ft bool
+.Fn pcie_flr "device_t dev" "u_int max_delay" "bool force"
+.Ft int
+.Fn pcie_get_max_completion_timeout "device_t dev"
 .Ft uint32_t
 .Fn pcie_read_config "device_t dev" "int reg" "int width"
+.Ft bool
+.Fn pcie_wait_for_pending_transactions "device_t dev" "u_int max_delay"
 .Ft void
 .Fn pcie_write_config "device_t dev" "int reg" "uint32_t val" "int width"
 .Ft void
@@ -431,6 +440,51 @@ keyword,
 then
 .Fn pci_get_vpd_readonly
 returns an error.
+.Pp
+The
+.Fn pcie_get_max_completion_timeout
+function returns the maximum completion timeout configured for the device
+.Fa dev
+in microseconds.
+If the
+.Fa dev
+device is not a PCI-express device,
+.Fn pcie_get_max_completion_timeout
+returns zero.
+When completion timeouts are disabled for
+.Fa dev ,
+this function returns the maxmimum timeout that would be used if timeouts
+were enabled.
+.Pp
+The
+.Fn pcie_wait_for_pending_transactions
+function waits for any pending transactions initiated by the
+.Fa dev
+device to complete.
+The function checks for pending transactions by polling the transactions
+pending flag in the PCI-express device status register.
+It returns
+.Dv true
+once the transaction pending flag is clear.
+If transactions are still pending after
+.Fa max_delay
+milliseconds,
+.Fn pcie_wait_for_pending_transactions
+returns
+.Dv false .
+If
+.Fa max_delay
+is set to zero,
+.Fn pcie_wait_for_pending_transactions
+performs a single check;
+otherwise,
+this function may sleep while polling the transactions pending flag.
+.Nm pcie_wait_for_pending_transactions
+returns
+.Dv true
+if
+.Fa dev
+is not a PCI-express device.
 .Ss Device Configuration
 The
 .Fn pci_enable_busmaster
@@ -662,6 +716,51 @@ is invoked,
 then the device will be transitioned to
 .Dv PCI_POWERSTATE_D0
 before any config registers are restored.
+.Pp
+The
+.Fn pcie_flr
+function requests a Function Level Reset
+.Pq FLR
+of
+.Fa dev .
+If
+.Fa dev
+is not a PCI-express device or does not support Function Level Resets via
+the PCI-express device control register,
+.Dv false
+is returned.
+Pending transactions are drained by disabling busmastering and calling
+.Fn pcie_wait_for_pending_transactions
+before resetting the device.
+The
+.Fa max_delay
+argument specifies the maximum timeout to wait for pending transactions as
+described for
+.Fn pcie_wait_for_pending_transact

svn commit: r306520 - in stable: 10/share/man/man9 10/sys/amd64/vmm/io 10/sys/dev/pci 11/share/man/man9 11/sys/amd64/vmm/io 11/sys/dev/pci

2016-09-30 Thread John Baldwin
Author: jhb
Date: Fri Sep 30 18:47:34 2016
New Revision: 306520
URL: https://svnweb.freebsd.org/changeset/base/306520

Log:
  MFC 305502: Reset PCI pass through devices via PCI-e FLR during VM start/end.
  
  Add routines to trigger a function level reset (FLR) of a PCI-express
  device via the PCI-express device control register.  This also includes
  support routines to wait for pending transactions to complete as well
  as calculating the maximum completion timeout permitted by a device.
  
  Change the ppt(4) driver to reset pass through devices before attaching
  to a VM during startup and before detaching from a VM during shutdown.
  
  Sponsored by: Chelsio Communications

Modified:
  stable/10/share/man/man9/Makefile
  stable/10/share/man/man9/pci.9
  stable/10/sys/amd64/vmm/io/ppt.c
  stable/10/sys/dev/pci/pci.c
  stable/10/sys/dev/pci/pcireg.h
  stable/10/sys/dev/pci/pcivar.h
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/share/man/man9/Makefile
  stable/11/share/man/man9/pci.9
  stable/11/sys/amd64/vmm/io/ppt.c
  stable/11/sys/dev/pci/pci.c
  stable/11/sys/dev/pci/pcireg.h
  stable/11/sys/dev/pci/pcivar.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/10/share/man/man9/Makefile
==
--- stable/10/share/man/man9/Makefile   Fri Sep 30 18:43:39 2016
(r306519)
+++ stable/10/share/man/man9/Makefile   Fri Sep 30 18:47:34 2016
(r306520)
@@ -1037,7 +1037,10 @@ MLINKS+=pci.9 pci_alloc_msi.9 \
pci.9 pci_set_max_read_req.9 \
pci.9 pci_write_config.9 \
pci.9 pcie_adjust_config.9 \
+   pci.9 pcie_flr.9 \
+   pci.9 pcie_max_completion_timeout.9 \
pci.9 pcie_read_config.9 \
+   pci.9 pcie_wait_for_pending_transactions.9 \
pci.9 pcie_write_config.9
 MLINKS+=pfil.9 pfil_add_hook.9 \
pfil.9 pfil_hook_get.9 \

Modified: stable/10/share/man/man9/pci.9
==
--- stable/10/share/man/man9/pci.9  Fri Sep 30 18:43:39 2016
(r306519)
+++ stable/10/share/man/man9/pci.9  Fri Sep 30 18:47:34 2016
(r306520)
@@ -62,7 +62,10 @@
 .Nm pci_set_powerstate ,
 .Nm pci_write_config ,
 .Nm pcie_adjust_config ,
+.Nm pcie_flr ,
+.Nm pcie_get_max_completion_timeout ,
 .Nm pcie_read_config ,
+.Nm pcie_wait_for_pending_transactions ,
 .Nm pcie_write_config
 .Nd PCI bus interface
 .Sh SYNOPSIS
@@ -139,8 +142,14 @@
 .Fa "uint32_t val"
 .Fa "int width"
 .Fc
+.Ft bool
+.Fn pcie_flr "device_t dev" "u_int max_delay" "bool force"
+.Ft int
+.Fn pcie_get_max_completion_timeout "device_t dev"
 .Ft uint32_t
 .Fn pcie_read_config "device_t dev" "int reg" "int width"
+.Ft bool
+.Fn pcie_wait_for_pending_transactions "device_t dev" "u_int max_delay"
 .Ft void
 .Fn pcie_write_config "device_t dev" "int reg" "uint32_t val" "int width"
 .Sh DESCRIPTION
@@ -393,6 +402,51 @@ keyword,
 then
 .Fn pci_get_vpd_readonly
 returns an error.
+.Pp
+The
+.Fn pcie_get_max_completion_timeout
+function returns the maximum completion timeout configured for the device
+.Fa dev
+in microseconds.
+If the
+.Fa dev
+device is not a PCI-express device,
+.Fn pcie_get_max_completion_timeout
+returns zero.
+When completion timeouts are disabled for
+.Fa dev ,
+this function returns the maxmimum timeout that would be used if timeouts
+were enabled.
+.Pp
+The
+.Fn pcie_wait_for_pending_transactions
+function waits for any pending transactions initiated by the
+.Fa dev
+device to complete.
+The function checks for pending transactions by polling the transactions
+pending flag in the PCI-express device status register.
+It returns
+.Dv true
+once the transaction pending flag is clear.
+If transactions are still pending after
+.Fa max_delay
+milliseconds,
+.Fn pcie_wait_for_pending_transactions
+returns
+.Dv false .
+If
+.Fa max_delay
+is set to zero,
+.Fn pcie_wait_for_pending_transactions
+performs a single check;
+otherwise,
+this function may sleep while polling the transactions pending flag.
+.Nm pcie_wait_for_pending_transactions
+returns
+.Dv true
+if
+.Fa dev
+is not a PCI-express device.
 .Ss Device Configuration
 The
 .Fn pci_enable_busmaster
@@ -541,6 +595,51 @@ is invoked,
 then the device will be transitioned to
 .Dv PCI_POWERSTATE_D0
 before any config registers are restored.
+.Pp
+The
+.Fn pcie_flr
+function requests a Function Level Reset
+.Pq FLR
+of
+.Fa dev .
+If
+.Fa dev
+is not a PCI-express device or does not support Function Level Resets via
+the PCI-express device control register,
+.Dv false
+is returned.
+Pending transactions are drained by disabling busmastering and calling
+.Fn pcie_wait_for_pending_transactions
+before resetting the device.
+The
+.Fa max_delay
+argument specifies the maximum timeout to wait for pending transactions as
+described for
+.Fn pcie_wait_for_pending_transactions .
+If
+.Fn pcie_wait_for_pendi

svn commit: r306519 - head/sys/net80211

2016-09-30 Thread Andriy Voskoboinyk
Author: avos
Date: Fri Sep 30 18:43:39 2016
New Revision: 306519
URL: https://svnweb.freebsd.org/changeset/base/306519

Log:
  net80211: do not cancel scan when packet is sent.
  
  Restore pre-r300383 behavior when a frame is sent:
  - stop scan;
  - send frame;
  - when beacon arrives and our bit in TIM is not set - restart the scan.
  
  NOTE:
  Ideally, this should introduce new interface (ieee80211_pause_anyscan());
  however, since ieee80211_cancel_anyscan() is not used by drivers and only
  called by ieee80211_start_pkt() the current patch overrides it's behavior
  instead.
  
  Tested with Intel 3945BG, STA mode
  
  Reviewed by:  adrian
  Differential Revision:https://reviews.freebsd.org/D7979

Modified:
  head/sys/net80211/ieee80211_scan_sw.c

Modified: head/sys/net80211/ieee80211_scan_sw.c
==
--- head/sys/net80211/ieee80211_scan_sw.c   Fri Sep 30 18:36:23 2016
(r306518)
+++ head/sys/net80211/ieee80211_scan_sw.c   Fri Sep 30 18:43:39 2016
(r306519)
@@ -57,9 +57,11 @@ struct scan_state {
u_int   ss_iflags;  /* flags used internally */
 #defineISCAN_MINDWELL  0x0001  /* min dwell time 
reached */
 #defineISCAN_DISCARD   0x0002  /* discard rx'd frames 
*/
-#defineISCAN_CANCEL0x0004  /* cancel current scan 
*/
-#defineISCAN_ABORT 0x0008  /* end the scan 
immediately */
-#defineISCAN_RUNNING   0x0010  /* scan was started */
+#define ISCAN_INTERRUPT0x0004  /* interrupt current 
scan */
+#defineISCAN_CANCEL0x0008  /* cancel current scan 
*/
+#define ISCAN_PAUSE(ISCAN_INTERRUPT | ISCAN_CANCEL)
+#defineISCAN_ABORT 0x0010  /* end the scan 
immediately */
+#defineISCAN_RUNNING   0x0020  /* scan was started */
 
unsigned long   ss_chanmindwell;  /* min dwell on curchan */
unsigned long   ss_scanend; /* time scan must stop */
@@ -415,27 +417,31 @@ cancel_scan(struct ieee80211vap *vap, in
 {
struct ieee80211com *ic = vap->iv_ic;
struct ieee80211_scan_state *ss = ic->ic_scan;
+   struct scan_state *ss_priv = SCAN_PRIVATE(ss);
+   int signal;
 
IEEE80211_LOCK(ic);
+   signal = any ? ISCAN_PAUSE : ISCAN_CANCEL;
if ((ic->ic_flags & IEEE80211_F_SCAN) &&
(any || ss->ss_vap == vap) &&
-   (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL) == 0) {
+   (ss_priv->ss_iflags & signal) == 0) {
IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN,
-   "%s: cancel %s scan\n", func,
+   "%s: %s %s scan\n", func,
+   any ? "pause" : "cancel",
ss->ss_flags & IEEE80211_SCAN_ACTIVE ?
"active" : "passive");
 
/* clear bg scan NOPICK */
ss->ss_flags &= ~IEEE80211_SCAN_NOPICK;
-   /* mark cancel request and wake up the scan task */
-   scan_signal_locked(ss, ISCAN_CANCEL);
+   /* mark request and wake up the scan task */
+   scan_signal_locked(ss, signal);
} else {
IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN,
-   "%s: called; F_SCAN=%d, vap=%s, CANCEL=%d\n",
+   "%s: called; F_SCAN=%d, vap=%s, signal=%d\n",
func,
!! (ic->ic_flags & IEEE80211_F_SCAN),
(ss->ss_vap == vap ? "match" : "nomatch"),
-   !! (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL));
+   !! (ss_priv->ss_iflags & signal));
}
IEEE80211_UNLOCK(ic);
 }
@@ -868,9 +874,11 @@ scan_done(struct ieee80211_scan_state *s
if (ss->ss_next >= ss->ss_last)
ic->ic_flags_ext &= ~IEEE80211_FEXT_BGSCAN;
 
-   ieee80211_notify_scan_done(vap);
+   /* send 'scan done' event if not interrupted due to traffic. */
+   if (!(ss_priv->ss_iflags & ISCAN_INTERRUPT))
+   ieee80211_notify_scan_done(vap);
}
-   ss_priv->ss_iflags &= ~(ISCAN_CANCEL|ISCAN_ABORT);
+   ss_priv->ss_iflags &= ~(ISCAN_PAUSE | ISCAN_ABORT);
ss_priv->ss_scanend = 0;
ss->ss_flags &= ~(IEEE80211_SCAN_ONCE | IEEE80211_SCAN_PICK1ST);
IEEE80211_UNLOCK(ic);
___
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: r306518 - head/share/misc

2016-09-30 Thread Sevan Janiyan
Author: sevan (doc committer)
Date: Fri Sep 30 18:36:23 2016
New Revision: 306518
URL: https://svnweb.freebsd.org/changeset/base/306518

Log:
  Add myself to the list & note who is my mentor.
  
  Approved by:  bcr (mentor)

Modified:
  head/share/misc/committers-doc.dot

Modified: head/share/misc/committers-doc.dot
==
--- head/share/misc/committers-doc.dot  Fri Sep 30 18:14:05 2016
(r306517)
+++ head/share/misc/committers-doc.dot  Fri Sep 30 18:36:23 2016
(r306518)
@@ -85,6 +85,7 @@ pluknet [label="Sergey Kandaurov\nplukne
 remko [label="Remko Lodder\nre...@freebsd.org\n2004/10/16"]
 rene [label="Rene Ladan\nr...@freebsd.org\n2008/11/03"]
 ryusuke [label="Ryusuke Suzuki\nryus...@freebsd.org\n2009/12/21"]
+sevan [label="Sevan Janiyan\nse...@freebsd.org\n2016/09/16"]
 simon [label="Simon L. Nielsen\nsi...@freebsd.org\n2003/07/20"]
 skreuzer [label="Steven Kreuzer\nskreu...@freebsd.org\n2014/01/15"]
 taras [label="Taras Korenko\nta...@freebsd.org\n2010/06/25"]
@@ -104,6 +105,7 @@ bcr -> crees
 bcr -> jgh
 bcr -> allanjude
 bcr -> bhd
+bcr -> sevan
 
 blackend -> ale
 
___
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: r306517 - stable/11/sys/netinet

2016-09-30 Thread Hiren Panchasara
Author: hiren
Date: Fri Sep 30 18:14:05 2016
New Revision: 306517
URL: https://svnweb.freebsd.org/changeset/base/306517

Log:
  MFC r304855
  
  Update TCPS_HAVERCVDFIN() macro to correctly include all states a connection
  can be in after receiving a FIN.
  
  FWIW, NetBSD has this change for quite some time.
  
  This has been tested at Netflix and Limelight in production traffic.

Modified:
  stable/11/sys/netinet/tcp_fsm.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet/tcp_fsm.h
==
--- stable/11/sys/netinet/tcp_fsm.h Fri Sep 30 18:12:16 2016
(r306516)
+++ stable/11/sys/netinet/tcp_fsm.h Fri Sep 30 18:14:05 2016
(r306517)
@@ -73,7 +73,8 @@
 
 #defineTCPS_HAVERCVDSYN(s) ((s) >= TCPS_SYN_RECEIVED)
 #defineTCPS_HAVEESTABLISHED(s) ((s) >= TCPS_ESTABLISHED)
-#defineTCPS_HAVERCVDFIN(s) ((s) >= TCPS_TIME_WAIT)
+#defineTCPS_HAVERCVDFIN(s) \
+((s) == TCPS_CLOSE_WAIT || ((s) >= TCPS_CLOSING && (s) != TCPS_FIN_WAIT_2))
 
 #ifdef TCPOUTFLAGS
 /*
___
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: r306516 - in head/sys: amd64/amd64 amd64/include x86/include x86/x86

2016-09-30 Thread Conrad E. Meyer
Author: cem
Date: Fri Sep 30 18:12:16 2016
New Revision: 306516
URL: https://svnweb.freebsd.org/changeset/base/306516

Log:
  Reduce the cost of TLB invalidation on x86 by using per-CPU completion flags
  
  Reduce contention during TLB invalidation operations by using a per-CPU
  completion flag, rather than a single atomically-updated variable.
  
  On a Westmere system (2 sockets x 4 cores x 1 threads), dtrace measurements
  show that smp_tlb_shootdown is about 50% faster with this patch; observations
  with VTune show that the percentage of time spent in invlrng_single_page on an
  interrupt (actually doing invalidation, rather than synchronization) increases
  from 31% with the old mechanism to 71% with the new one.  (Running a basic 
file
  server workload.)
  
  Submitted by: Anton Rang 
  Reviewed by:  cem (earlier version), kib
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D8041

Modified:
  head/sys/amd64/amd64/mp_machdep.c
  head/sys/amd64/include/pcpu.h
  head/sys/x86/include/x86_smp.h
  head/sys/x86/x86/mp_x86.c

Modified: head/sys/amd64/amd64/mp_machdep.c
==
--- head/sys/amd64/amd64/mp_machdep.c   Fri Sep 30 18:08:16 2016
(r306515)
+++ head/sys/amd64/amd64/mp_machdep.c   Fri Sep 30 18:12:16 2016
(r306516)
@@ -409,6 +409,7 @@ void
 invltlb_invpcid_handler(void)
 {
struct invpcid_descr d;
+   uint64_t generation;
 
 #ifdef COUNT_XINVLTLB_HITS
xhits_gbl[PCPU_GET(cpuid)]++;
@@ -417,17 +418,20 @@ invltlb_invpcid_handler(void)
(*ipi_invltlb_counts[PCPU_GET(cpuid)])++;
 #endif /* COUNT_IPIS */
 
+   generation = smp_tlb_generation;
d.pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid;
d.pad = 0;
d.addr = 0;
invpcid(&d, smp_tlb_pmap == kernel_pmap ? INVPCID_CTXGLOB :
INVPCID_CTX);
-   atomic_add_int(&smp_tlb_wait, 1);
+   PCPU_SET(smp_tlb_done, generation);
 }
 
 void
 invltlb_pcid_handler(void)
 {
+   uint64_t generation;
+  
 #ifdef COUNT_XINVLTLB_HITS
xhits_gbl[PCPU_GET(cpuid)]++;
 #endif /* COUNT_XINVLTLB_HITS */
@@ -435,6 +439,7 @@ invltlb_pcid_handler(void)
(*ipi_invltlb_counts[PCPU_GET(cpuid)])++;
 #endif /* COUNT_IPIS */
 
+   generation = smp_tlb_generation;
if (smp_tlb_pmap == kernel_pmap) {
invltlb_glob();
} else {
@@ -450,5 +455,5 @@ invltlb_pcid_handler(void)
smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid);
}
}
-   atomic_add_int(&smp_tlb_wait, 1);
+   PCPU_SET(smp_tlb_done, generation);
 }

Modified: head/sys/amd64/include/pcpu.h
==
--- head/sys/amd64/include/pcpu.h   Fri Sep 30 18:08:16 2016
(r306515)
+++ head/sys/amd64/include/pcpu.h   Fri Sep 30 18:12:16 2016
(r306516)
@@ -65,7 +65,8 @@
u_int   pc_vcpu_id; /* Xen vCPU ID */   \
uint32_t pc_pcid_next;  \
uint32_t pc_pcid_gen;   \
-   char__pad[149]  /* be divisor of PAGE_SIZE  \
+   uint64_t pc_smp_tlb_done;   /* TLB op acknowledgement */\
+   char__pad[141]  /* be divisor of PAGE_SIZE  \
   after cache alignment */
 
 #definePC_DBREG_CMD_NONE   0

Modified: head/sys/x86/include/x86_smp.h
==
--- head/sys/x86/include/x86_smp.h  Fri Sep 30 18:08:16 2016
(r306515)
+++ head/sys/x86/include/x86_smp.h  Fri Sep 30 18:12:16 2016
(r306516)
@@ -35,7 +35,7 @@ extern volatile int aps_ready;
 extern struct mtx ap_boot_mtx;
 extern int cpu_logical;
 extern int cpu_cores;
-extern volatile int smp_tlb_wait;
+extern volatile uint64_t smp_tlb_generation;
 extern struct pmap *smp_tlb_pmap;
 extern u_int xhits_gbl[];
 extern u_int xhits_pg[];

Modified: head/sys/x86/x86/mp_x86.c
==
--- head/sys/x86/x86/mp_x86.c   Fri Sep 30 18:08:16 2016(r306515)
+++ head/sys/x86/x86/mp_x86.c   Fri Sep 30 18:12:16 2016(r306516)
@@ -1304,12 +1304,15 @@ cpususpend_handler(void)
 void
 invlcache_handler(void)
 {
+   uint64_t generation;
+  
 #ifdef COUNT_IPIS
(*ipi_invlcache_counts[PCPU_GET(cpuid)])++;
 #endif /* COUNT_IPIS */
 
+   generation = smp_tlb_generation;
wbinvd();
-   atomic_add_int(&smp_tlb_wait, 1);
+   PCPU_SET(smp_tlb_done, generation);
 }
 
 /*
@@ -1367,7 +1370,7 @@ SYSINIT(mp_ipi_intrcnt, SI_SUB_INTR, SI_
 /* Variables needed for SMP tlb shootdown. */
 static vm_offset_t smp_tlb_addr1, smp_tlb_addr2;
 pmap_t smp_tlb_pmap;
-volatile int smp_tlb_wait;
+volatile uint64_t

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

2016-09-30 Thread David C Somayajulu
Author: davidcs
Date: Fri Sep 30 18:08:16 2016
New Revision: 306515
URL: https://svnweb.freebsd.org/changeset/base/306515

Log:
  Revert commit
r306284 - Fixes for issues under high workloads
  
  Will fix and recommit patch

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

Modified: head/sys/dev/bxe/bxe.c
==
--- head/sys/dev/bxe/bxe.c  Fri Sep 30 17:49:04 2016(r306514)
+++ head/sys/dev/bxe/bxe.c  Fri Sep 30 18:08:16 2016(r306515)
@@ -27,7 +27,7 @@
 #include 
 __FBSDID("$FreeBSD$");
 
-#define BXE_DRIVER_VERSION "1.78.89"
+#define BXE_DRIVER_VERSION "1.78.81"
 
 #include "bxe.h"
 #include "ecore_sp.h"
@@ -489,16 +489,7 @@ static const struct {
 { STATS_OFFSET32(mbuf_alloc_tpa),
 4, STATS_FLAGS_FUNC, "mbuf_alloc_tpa"},
 { STATS_OFFSET32(tx_queue_full_return),
-4, STATS_FLAGS_FUNC, "tx_queue_full_return"},
-{ STATS_OFFSET32(bxe_tx_mq_start_lock_failures),
-4, STATS_FLAGS_FUNC, "bxe_tx_mq_start_lock_failures"},
-{ STATS_OFFSET32(tx_request_link_down_failures),
-4, STATS_FLAGS_FUNC, "tx_request_link_down_failures"},
-{ STATS_OFFSET32(bd_avail_too_less_failures),
-4, STATS_FLAGS_FUNC, "bd_avail_too_less_failures"},
-{ STATS_OFFSET32(tx_mq_not_empty),
-4, STATS_FLAGS_FUNC, "tx_mq_not_empty"}
-
+4, STATS_FLAGS_FUNC, "tx_queue_full_return"}
 };
 
 static const struct {
@@ -611,15 +602,7 @@ static const struct {
 { Q_STATS_OFFSET32(mbuf_alloc_tpa),
 4, "mbuf_alloc_tpa"},
 { Q_STATS_OFFSET32(tx_queue_full_return),
-4, "tx_queue_full_return"},
-{ Q_STATS_OFFSET32(bxe_tx_mq_start_lock_failures),
-4, "bxe_tx_mq_start_lock_failures"},
-{ Q_STATS_OFFSET32(tx_request_link_down_failures),
-4, "tx_request_link_down_failures"},
-{ Q_STATS_OFFSET32(bd_avail_too_less_failures),
-4, "bd_avail_too_less_failures"},
-{ Q_STATS_OFFSET32(tx_mq_not_empty),
-4, "tx_mq_not_empty"}
+4, "tx_queue_full_return"}
 };
 
 #define BXE_NUM_ETH_STATS   ARRAY_SIZE(bxe_eth_stats_arr)
@@ -5638,18 +5621,11 @@ bxe_tx_mq_start_locked(struct bxe_softc 
 return (EINVAL);
 }
 
-if (m != NULL) {
-rc = drbr_enqueue(ifp, tx_br, m);
-if (rc != 0) {
-fp->eth_q_stats.tx_soft_errors++;
-goto bxe_tx_mq_start_locked_exit;
-}
-}
-
 if (!sc->link_vars.link_up ||
 (if_getdrvflags(ifp) &
 (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != IFF_DRV_RUNNING) {
-fp->eth_q_stats.tx_request_link_down_failures++;
+if (m != NULL)
+rc = drbr_enqueue(ifp, tx_br, m);
 goto bxe_tx_mq_start_locked_exit;
 }
 
@@ -5659,22 +5635,24 @@ bxe_tx_mq_start_locked(struct bxe_softc 
 fp->eth_q_stats.tx_max_drbr_queue_depth = depth;
 }
 
-/* keep adding entries while there are frames to send */
-while ((next = drbr_peek(ifp, tx_br)) != NULL) {
-/* handle any completions if we're running low */
-tx_bd_avail = bxe_tx_avail(sc, fp);
-if (tx_bd_avail < BXE_TX_CLEANUP_THRESHOLD) {
-/* bxe_txeof will set IFF_DRV_OACTIVE appropriately */
-bxe_txeof(sc, fp);
-tx_bd_avail = bxe_tx_avail(sc, fp);
-if (tx_bd_avail < (BXE_TSO_MAX_SEGMENTS + 1)) {
-fp->eth_q_stats.bd_avail_too_less_failures++;
-m_freem(next);
-drbr_advance(ifp, tx_br);
-rc = ENOBUFS;
-break;
-}
+if (m == NULL) {
+/* no new work, check for pending frames */
+next = drbr_dequeue_drv(ifp, tx_br);
+} else if (drbr_needs_enqueue_drv(ifp, tx_br)) {
+/* have both new and pending work, maintain packet order */
+rc = drbr_enqueue(ifp, tx_br, m);
+if (rc != 0) {
+fp->eth_q_stats.tx_soft_errors++;
+goto bxe_tx_mq_start_locked_exit;
 }
+next = drbr_dequeue_drv(ifp, tx_br);
+} else {
+/* new work only and nothing pending */
+next = m;
+}
+
+/* keep adding entries while there are frames to send */
+while (next != NULL) {
 
 /* the mbuf now belongs to us */
 fp->eth_q_stats.mbuf_alloc_tx++;
@@ -5689,12 +5667,12 @@ bxe_tx_mq_start_locked(struct bxe_softc 
 fp->eth_q_stats.tx_encap_failures++;
 if (next != NULL) {
 /* mark the TX queue as full and save the frame */
-ifp->if_drv_flags |= IFF_DRV_OACTIVE;
-drbr_putback(ifp, tx_br, next);
+if_setdrvflagbits(ifp, IFF_DRV_OACTIVE, 0);
+/* XXX this may reorder the frame */
+rc = drbr_enqueue(ifp, tx_br, next);
 fp->eth_q_stats.mbuf_a

Re: svn commit: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs

2016-09-30 Thread Larry Rosenman

On 2016-09-30 14:01, Mateusz Guzik wrote:

On Fri, Sep 30, 2016 at 01:58:16PM -0400, Larry Rosenman wrote:

On 2016-09-30 13:55, Mateusz Guzik wrote:
>On Fri, Sep 30, 2016 at 01:36:26PM -0400, Larry Rosenman wrote:
>>On 2016-09-30 13:28, Mateusz Guzik wrote:
>>>On Fri, Sep 30, 2016 at 01:18:45PM -0400, Shawn Webb wrote:
On Fri, Sep 30, 2016 at 05:11:03PM +, Mateusz Guzik wrote:
> Author: mjg
> Date: Fri Sep 30 17:11:03 2016
> New Revision: 306509
> URL: https://svnweb.freebsd.org/changeset/base/306509
>
> Log:
>   vfs: remove the __bo_vnode field from struct vnode
>
>   The pointer can be obtained using __containerof instead.
>
>   Reviewed by: kib

Should __FreeBSD_Version be bumped?

>>>
>>>Unlikely. It can be in an odd case it turns out there is a module which
>>>is using the field.
>>
>>Can someone do me a favor and make sure sysutils/lsof still
>>compiles/works?
>>
>>I'm OOT at the moment, and have a test IPv6 patch on my 12 system.
>
>I just ran lsof and it worked fine at least for the basic case.
>
>Apparently it indeed still goes through kernel memory. Did anyone ask
>the author what kind of interfaces would they want to NOT have to do
>this?
>
>Also, it looks like it constains some kind of a loop to imitate
>closefrom.
>
>On truss I see over 3.7 milion (yes, MILION) calls to close. Like this:
>close(3773297)   ERR#9 'Bad file
>descriptor'
>close(3773298)   ERR#9 'Bad file
>descriptor'
>close(3773299)   ERR#9 'Bad file
>descriptor'
>close(3773300)   ERR#9 'Bad file
>descriptor'
>close(3773301)   ERR#9 'Bad file
>descriptor'
>close(3773302)   ERR#9 'Bad file
>descriptor'
>close(3773303)   ERR#9 'Bad file
>descriptor'
>[snip]
>
>At least for freebsd this can be patched with the use of closefrom() on
>all supported releases.
>
>Arguably this may be a side effect of limits set too high, perhaps
>linux
>sets them sigifnicanly lower and the problem is not that terrible.

We've had this discussion before (re: interfaces). I thought the
current versions of lsof only close
the first 1k FD's.  (what version of lsof is this? on 12-CURRENT?)



This is 4.90.g,8 "formally" built for 11.0. The typical limit for fd is
1024 on linux, while it is higher on fbsd. I presume it goes up to the
limit. (as in, ulimit -n)

So what's up with the discussion on interfaces?

The current state seems detrimental to everyone.


Vic Abell (Author, Retired from Purdue, 70+ yrs old) has to maintain 
portability to

other OS's, and every time we go through this discussion it drops off.

You are welcome to try again, but I wouldn't bet on it.

Vic Abell 


--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 214-642-9640 E-Mail: l...@lerctr.org
US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281
___
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: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs

2016-09-30 Thread Mateusz Guzik
On Fri, Sep 30, 2016 at 01:58:16PM -0400, Larry Rosenman wrote:
> On 2016-09-30 13:55, Mateusz Guzik wrote:
> >On Fri, Sep 30, 2016 at 01:36:26PM -0400, Larry Rosenman wrote:
> >>On 2016-09-30 13:28, Mateusz Guzik wrote:
> >>>On Fri, Sep 30, 2016 at 01:18:45PM -0400, Shawn Webb wrote:
> On Fri, Sep 30, 2016 at 05:11:03PM +, Mateusz Guzik wrote:
> > Author: mjg
> > Date: Fri Sep 30 17:11:03 2016
> > New Revision: 306509
> > URL: https://svnweb.freebsd.org/changeset/base/306509
> >
> > Log:
> >   vfs: remove the __bo_vnode field from struct vnode
> >
> >   The pointer can be obtained using __containerof instead.
> >
> >   Reviewed by:  kib
> 
> Should __FreeBSD_Version be bumped?
> 
> >>>
> >>>Unlikely. It can be in an odd case it turns out there is a module which
> >>>is using the field.
> >>
> >>Can someone do me a favor and make sure sysutils/lsof still
> >>compiles/works?
> >>
> >>I'm OOT at the moment, and have a test IPv6 patch on my 12 system.
> >
> >I just ran lsof and it worked fine at least for the basic case.
> >
> >Apparently it indeed still goes through kernel memory. Did anyone ask
> >the author what kind of interfaces would they want to NOT have to do
> >this?
> >
> >Also, it looks like it constains some kind of a loop to imitate
> >closefrom.
> >
> >On truss I see over 3.7 milion (yes, MILION) calls to close. Like this:
> >close(3773297)   ERR#9 'Bad file
> >descriptor'
> >close(3773298)   ERR#9 'Bad file
> >descriptor'
> >close(3773299)   ERR#9 'Bad file
> >descriptor'
> >close(3773300)   ERR#9 'Bad file
> >descriptor'
> >close(3773301)   ERR#9 'Bad file
> >descriptor'
> >close(3773302)   ERR#9 'Bad file
> >descriptor'
> >close(3773303)   ERR#9 'Bad file
> >descriptor'
> >[snip]
> >
> >At least for freebsd this can be patched with the use of closefrom() on
> >all supported releases.
> >
> >Arguably this may be a side effect of limits set too high, perhaps
> >linux
> >sets them sigifnicanly lower and the problem is not that terrible.
> 
> We've had this discussion before (re: interfaces). I thought the
> current versions of lsof only close
> the first 1k FD's.  (what version of lsof is this? on 12-CURRENT?)
> 

This is 4.90.g,8 "formally" built for 11.0. The typical limit for fd is
1024 on linux, while it is higher on fbsd. I presume it goes up to the
limit. (as in, ulimit -n)

So what's up with the discussion on interfaces?

The current state seems detrimental to everyone.

-- 
Mateusz Guzik 
___
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: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs

2016-09-30 Thread Larry Rosenman

On 2016-09-30 13:55, Mateusz Guzik wrote:

On Fri, Sep 30, 2016 at 01:36:26PM -0400, Larry Rosenman wrote:

On 2016-09-30 13:28, Mateusz Guzik wrote:
>On Fri, Sep 30, 2016 at 01:18:45PM -0400, Shawn Webb wrote:
>>On Fri, Sep 30, 2016 at 05:11:03PM +, Mateusz Guzik wrote:
>>> Author: mjg
>>> Date: Fri Sep 30 17:11:03 2016
>>> New Revision: 306509
>>> URL: https://svnweb.freebsd.org/changeset/base/306509
>>>
>>> Log:
>>>   vfs: remove the __bo_vnode field from struct vnode
>>>
>>>   The pointer can be obtained using __containerof instead.
>>>
>>>   Reviewed by: kib
>>
>>Should __FreeBSD_Version be bumped?
>>
>
>Unlikely. It can be in an odd case it turns out there is a module which
>is using the field.

Can someone do me a favor and make sure sysutils/lsof still
compiles/works?

I'm OOT at the moment, and have a test IPv6 patch on my 12 system.


I just ran lsof and it worked fine at least for the basic case.

Apparently it indeed still goes through kernel memory. Did anyone ask
the author what kind of interfaces would they want to NOT have to do
this?

Also, it looks like it constains some kind of a loop to imitate
closefrom.

On truss I see over 3.7 milion (yes, MILION) calls to close. Like this:
close(3773297)   ERR#9 'Bad file 
descriptor'
close(3773298)   ERR#9 'Bad file 
descriptor'
close(3773299)   ERR#9 'Bad file 
descriptor'
close(3773300)   ERR#9 'Bad file 
descriptor'
close(3773301)   ERR#9 'Bad file 
descriptor'
close(3773302)   ERR#9 'Bad file 
descriptor'
close(3773303)   ERR#9 'Bad file 
descriptor'

[snip]

At least for freebsd this can be patched with the use of closefrom() on
all supported releases.

Arguably this may be a side effect of limits set too high, perhaps 
linux

sets them sigifnicanly lower and the problem is not that terrible.


We've had this discussion before (re: interfaces). I thought the current 
versions of lsof only close

the first 1k FD's.  (what version of lsof is this? on 12-CURRENT?)


--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 214-642-9640 E-Mail: l...@lerctr.org
US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281
___
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: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs

2016-09-30 Thread Mateusz Guzik
On Fri, Sep 30, 2016 at 01:36:26PM -0400, Larry Rosenman wrote:
> On 2016-09-30 13:28, Mateusz Guzik wrote:
> >On Fri, Sep 30, 2016 at 01:18:45PM -0400, Shawn Webb wrote:
> >>On Fri, Sep 30, 2016 at 05:11:03PM +, Mateusz Guzik wrote:
> >>> Author: mjg
> >>> Date: Fri Sep 30 17:11:03 2016
> >>> New Revision: 306509
> >>> URL: https://svnweb.freebsd.org/changeset/base/306509
> >>>
> >>> Log:
> >>>   vfs: remove the __bo_vnode field from struct vnode
> >>>
> >>>   The pointer can be obtained using __containerof instead.
> >>>
> >>>   Reviewed by:kib
> >>
> >>Should __FreeBSD_Version be bumped?
> >>
> >
> >Unlikely. It can be in an odd case it turns out there is a module which
> >is using the field.
> 
> Can someone do me a favor and make sure sysutils/lsof still
> compiles/works?
> 
> I'm OOT at the moment, and have a test IPv6 patch on my 12 system.

I just ran lsof and it worked fine at least for the basic case.

Apparently it indeed still goes through kernel memory. Did anyone ask
the author what kind of interfaces would they want to NOT have to do
this?

Also, it looks like it constains some kind of a loop to imitate
closefrom.

On truss I see over 3.7 milion (yes, MILION) calls to close. Like this:
close(3773297)   ERR#9 'Bad file descriptor'
close(3773298)   ERR#9 'Bad file descriptor'
close(3773299)   ERR#9 'Bad file descriptor'
close(3773300)   ERR#9 'Bad file descriptor'
close(3773301)   ERR#9 'Bad file descriptor'
close(3773302)   ERR#9 'Bad file descriptor'
close(3773303)   ERR#9 'Bad file descriptor'
[snip]

At least for freebsd this can be patched with the use of closefrom() on
all supported releases.

Arguably this may be a side effect of limits set too high, perhaps linux
sets them sigifnicanly lower and the problem is not that terrible.

-- 
Mateusz Guzik 
___
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: r306514 - head/sys/cam

2016-09-30 Thread Warner Losh
Author: imp
Date: Fri Sep 30 17:49:04 2016
New Revision: 306514
URL: https://svnweb.freebsd.org/changeset/base/306514

Log:
  Compute two new metrics. Disk load, the average number of transactions
  we have queued up normaliazed to the queue size. Also compute buckets
  of latency to help compute, in userland, estimates of Median, P90, P95
  and P99 values.
  
  Sponsored by: Netflix, Inc

Modified:
  head/sys/cam/cam_iosched.c

Modified: head/sys/cam/cam_iosched.c
==
--- head/sys/cam/cam_iosched.c  Fri Sep 30 17:30:39 2016(r306513)
+++ head/sys/cam/cam_iosched.c  Fri Sep 30 17:49:04 2016(r306514)
@@ -42,12 +42,14 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -73,14 +75,31 @@ SYSCTL_INT(_kern_cam, OID_AUTO, do_dynam
 &do_dynamic_iosched, 1,
 "Enable Dynamic I/O scheduler optimizations.");
 
+/*
+ * For an EMA, with an alpha of alpha, we know
+ * alpha = 2 / (N + 1)
+ * or
+ * N = 1 + (2 / alpha)
+ * where N is the number of samples that 86% of the current
+ * EMA is derived from.
+ *
+ * So we invent[*] alpha_bits:
+ * alpha_bits = -log_2(alpha)
+ * alpha = 2^-alpha_bits
+ * So
+ * N = 1 + 2^(alpha_bits + 1)
+ *
+ * The default 9 gives a 1025 lookback for 86% of the data.
+ * For a brief intro: https://en.wikipedia.org/wiki/Moving_average
+ *
+ * [*] Steal from the load average code and many other places.
+ */
 static int alpha_bits = 9;
 TUNABLE_INT("kern.cam.iosched_alpha_bits", &alpha_bits);
 SYSCTL_INT(_kern_cam, OID_AUTO, iosched_alpha_bits, CTLFLAG_RW,
 &alpha_bits, 1,
 "Bits in EMA's alpha.");
 
-
-
 struct iop_stats;
 struct cam_iosched_softc;
 
@@ -208,11 +227,17 @@ struct iop_stats 
/*
 * Statistics on different bits of the process.
 */
-   /* Exp Moving Average, alpha = 1 / (1 << alpha_bits) */
+   /* Exp Moving Average, see alpha_bits for more details */
sbintime_t  ema;
sbintime_t  emss;   /* Exp Moving sum of the squares */
sbintime_t  sd; /* Last computed sd */
 
+   uint32_tstate_flags;
+#define IOP_RATE_LIMITED   1u
+
+#define LAT_BUCKETS 12 /* < 1ms < 2ms ... 512ms < 1024ms > 
1024ms */
+   uint64_tlatencies[LAT_BUCKETS];
+
struct cam_iosched_softc *softc;
 };
 
@@ -258,6 +283,7 @@ struct cam_iosched_softc
int read_bias;  /* Read bias setting */
int current_read_bias;  /* Current read bias state */
int total_ticks;
+   int load;   /* EMA of 'load average' of 
disk / 2^16 */
 
struct bio_queue_head write_queue;
struct iop_stats read_stats, write_stats, trim_stats;
@@ -509,6 +535,7 @@ cam_iosched_ticker(void *arg)
 {
struct cam_iosched_softc *isc = arg;
sbintime_t now, delta;
+   int pending;
 
callout_reset(&isc->ticker, hz / isc->quanta - 1, cam_iosched_ticker, 
isc);
 
@@ -525,6 +552,36 @@ cam_iosched_ticker(void *arg)
 
cam_iosched_schedule(isc, isc->periph);
 
+   /*
+* isc->load is an EMA of the pending I/Os at each tick. The number of
+* pending I/Os is the sum of the I/Os queued to the hardware, and those
+* in the software queue that could be queued to the hardware if there
+* were slots.
+*
+* ios_stats.pending is a count of requests in the SIM right now for
+* each of these types of I/O. So the total pending count is the sum of
+* these I/Os and the sum of the queued I/Os still in the software queue
+* for those operations that aren't being rate limited at the moment.
+*
+* The reason for the rate limiting bit is because those I/Os
+* aren't part of the software queued load (since we could
+* give them to hardware, but choose not to).
+*
+* Note: due to a bug in counting pending TRIM in the device, we
+* don't include them in this count. We count each BIO_DELETE in
+* the pending count, but the periph drivers collapse them down
+* into one TRIM command. That one trim command gets the completion
+* so the counts get off.
+*/
+   pending = isc->read_stats.pending + isc->write_stats.pending /* + 
isc->trim_stats.pending */;
+   pending += !!(isc->read_stats.state_flags & IOP_RATE_LIMITED) * 
isc->read_stats.queued +
+   !!(isc->write_stats.state_flags & IOP_RATE_LIMITED) * 
isc->write_stats.queued /* +
+   !!(isc->trim_stats.state_flags & IOP_RATE_LIMITED) * 
isc->trim_stats.queued */ ;
+   pending <<= 16;
+   pending /= isc->periph->path->device->ccbq.total_openings;
+
+   isc->load = (pending + (isc->load << 13) - isc->load)

Re: svn commit: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs

2016-09-30 Thread Larry Rosenman

On 2016-09-30 13:28, Mateusz Guzik wrote:

On Fri, Sep 30, 2016 at 01:18:45PM -0400, Shawn Webb wrote:

On Fri, Sep 30, 2016 at 05:11:03PM +, Mateusz Guzik wrote:
> Author: mjg
> Date: Fri Sep 30 17:11:03 2016
> New Revision: 306509
> URL: https://svnweb.freebsd.org/changeset/base/306509
>
> Log:
>   vfs: remove the __bo_vnode field from struct vnode
>
>   The pointer can be obtained using __containerof instead.
>
>   Reviewed by: kib

Should __FreeBSD_Version be bumped?



Unlikely. It can be in an odd case it turns out there is a module which
is using the field.


Can someone do me a favor and make sure sysutils/lsof still 
compiles/works?


I'm OOT at the moment, and have a test IPv6 patch on my 12 system.

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 214-642-9640 E-Mail: l...@lerctr.org
US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281
___
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: r306474 - head/sys/dev/atkbdc

2016-09-30 Thread John Baldwin
On Friday, September 30, 2016 03:03:42 AM Oleksandr Tymoshenko wrote:
> Author: gonzo
> Date: Fri Sep 30 03:03:42 2016
> New Revision: 306474
> URL: https://svnweb.freebsd.org/changeset/base/306474
> 
> Log:
>   Replace explicit TUNABLE_INT to sysctl with CTLFLAG_TUN
>   
>   - Replace tunables-only hw.psm.synaptics_support, hw.psm.trackpoint_support,
>   and hw.psm.elantech_support with respective sysctls declared with
>   CTLFLAG_TUN. It simplifies checking them in userland, also makes them
>   easier to get discovered by user
>   - Get rid of debug.psm.loglevel and hw.psm.tap_enabled TUNABLE_INT
>   declaration by adding CTLFLAG_TUN to read/write sysctls that were
>   already declared for these tunables.
>   
>   Suggested by: jhb

Thanks!

-- 
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: r306473 - head/sys/dev/fdt

2016-09-30 Thread John Baldwin
On Thursday, September 29, 2016 11:38:13 PM Justin Hibbits wrote:
> If I remember correctly, newbus will throw an error if you try to create
> two devices with the same number. Applying the logic of using the
> cell-index property for all device nodes, if two sub buses from simplebus
> have the same set of child nodes, with the same cell-index property values,
> one set of children would error and not attach.  Of course this change is
> only for simplebus, so shouldn't have too big an impact.

Yes, new-bus doesn't let you add devices with the same unit.  We used to
force the unit of PCI bridges/buses but removed all that to better cope
with multi-domain systems.  I think in general it's best to use wildcard
units outside of something like hints.

-- 
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: r306513 - head/sys/arm/ti/cpsw

2016-09-30 Thread Luiz Otavio O Souza
Author: loos
Date: Fri Sep 30 17:30:39 2016
New Revision: 306513
URL: https://svnweb.freebsd.org/changeset/base/306513

Log:
  Remove the GLOBAL queue lock which just adds unnecessary complexity to code
  (when used together with the individual tx and rx locks).
  
  Sponsored by: Rubicon Communications, LLC (Netgate)

Modified:
  head/sys/arm/ti/cpsw/if_cpsw.c

Modified: head/sys/arm/ti/cpsw/if_cpsw.c
==
--- head/sys/arm/ti/cpsw/if_cpsw.c  Fri Sep 30 17:27:17 2016
(r306512)
+++ head/sys/arm/ti/cpsw/if_cpsw.c  Fri Sep 30 17:30:39 2016
(r306513)
@@ -301,25 +301,6 @@ cpsw_debugf(const char *fmt, ...)
 #defineCPSW_RX_UNLOCK(sc)  mtx_unlock(&(sc)->rx.lock)
 #defineCPSW_RX_LOCK_ASSERT(sc) mtx_assert(&(sc)->rx.lock, MA_OWNED)
 
-#defineCPSW_GLOBAL_LOCK(sc) do {   
\
-   if ((mtx_owned(&(sc)->tx.lock) ? 1 : 0) !=  \
-   (mtx_owned(&(sc)->rx.lock) ? 1 : 0)) {  \
-   panic("cpsw deadlock possibility detection!");  \
-   }   \
-   mtx_lock(&(sc)->tx.lock);   \
-   mtx_lock(&(sc)->rx.lock);   \
-} while (0)
-
-#defineCPSW_GLOBAL_UNLOCK(sc) do { 
\
-   CPSW_RX_UNLOCK(sc); \
-   CPSW_TX_UNLOCK(sc); \
-} while (0)
-
-#defineCPSW_GLOBAL_LOCK_ASSERT(sc) do {
\
-   CPSW_TX_LOCK_ASSERT(sc);\
-   CPSW_RX_LOCK_ASSERT(sc);\
-} while (0)
-
 #define CPSW_PORT_LOCK(_sc) do {   \
mtx_assert(&(_sc)->lock, MA_NOTOWNED);  \
mtx_lock(&(_sc)->lock); \
@@ -1179,7 +1160,7 @@ cpsw_rx_teardown_locked(struct cpsw_soft
cpsw_write_4(sc, CPSW_CPDMA_RX_TEARDOWN, 0);
for (;;) {
received = cpsw_rx_dequeue(sc);
-   CPSW_GLOBAL_UNLOCK(sc);
+   CPSW_RX_UNLOCK(sc);
while (received != NULL) {
next = received->m_nextpkt;
received->m_nextpkt = NULL;
@@ -1188,7 +1169,7 @@ cpsw_rx_teardown_locked(struct cpsw_soft
if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
received = next;
}
-   CPSW_GLOBAL_LOCK(sc);
+   CPSW_RX_LOCK(sc);
if (!sc->rx.running) {
CPSW_DEBUGF(sc,
("finished RX teardown (%d retries)", i));
@@ -1245,10 +1226,12 @@ cpswp_stop_locked(struct cpswp_softc *sc
 
/* Tear down the RX/TX queues. */
if (cpsw_ports_down(sc->swsc)) {
-   CPSW_GLOBAL_LOCK(sc->swsc);
+   CPSW_RX_LOCK(sc->swsc);
cpsw_rx_teardown_locked(sc->swsc);
+   CPSW_RX_UNLOCK(sc->swsc);
+   CPSW_TX_LOCK(sc->swsc);
cpsw_tx_teardown_locked(sc->swsc);
-   CPSW_GLOBAL_UNLOCK(sc->swsc);
+   CPSW_TX_UNLOCK(sc->swsc);
}
 
/* Stop MAC RX/TX modules. */
@@ -2155,7 +2138,7 @@ cpsw_tx_watchdog(void *msc)
struct cpsw_softc *sc;
 
sc = msc;
-   CPSW_GLOBAL_LOCK(sc);
+   CPSW_TX_LOCK(sc);
if (sc->tx.active_queue_len == 0 || !sc->tx.running) {
sc->watchdog.timer = 0; /* Nothing to do. */
} else if (sc->tx.queue_removes > sc->tx.queue_removes_at_last_tick) {
@@ -2172,7 +2155,7 @@ cpsw_tx_watchdog(void *msc)
}
}
sc->tx.queue_removes_at_last_tick = sc->tx.queue_removes;
-   CPSW_GLOBAL_UNLOCK(sc);
+   CPSW_TX_UNLOCK(sc);
 
/* Schedule another timeout one second from now */
callout_reset(&sc->watchdog.callout, hz, cpsw_tx_watchdog, sc);
___
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: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs

2016-09-30 Thread Mateusz Guzik
On Fri, Sep 30, 2016 at 01:18:45PM -0400, Shawn Webb wrote:
> On Fri, Sep 30, 2016 at 05:11:03PM +, Mateusz Guzik wrote:
> > Author: mjg
> > Date: Fri Sep 30 17:11:03 2016
> > New Revision: 306509
> > URL: https://svnweb.freebsd.org/changeset/base/306509
> > 
> > Log:
> >   vfs: remove the __bo_vnode field from struct vnode
> >   
> >   The pointer can be obtained using __containerof instead.
> >   
> >   Reviewed by:  kib
> 
> Should __FreeBSD_Version be bumped?
> 

Unlikely. It can be in an odd case it turns out there is a module which
is using the field.

-- 
Mateusz Guzik 
___
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: r306512 - in head/sys: kern sys

2016-09-30 Thread Mateusz Guzik
Author: mjg
Date: Fri Sep 30 17:27:17 2016
New Revision: 306512
URL: https://svnweb.freebsd.org/changeset/base/306512

Log:
  vfs: batch free vnodes in per-mnt lists
  
  Previously free vnodes would always by directly returned to the global
  LRU list. With this change up to mnt_free_list_batch vnodes are collected
  first.
  
  syncer runs always return the batch regardless of its size.
  
  While vnodes on per-mnt lists are not counted as free, they can be
  returned in case of vnode shortage.
  
  Reviewed by:  kib
  Tested by:pho

Modified:
  head/sys/kern/vfs_mount.c
  head/sys/kern/vfs_subr.c
  head/sys/sys/mount.h
  head/sys/sys/vnode.h

Modified: head/sys/kern/vfs_mount.c
==
--- head/sys/kern/vfs_mount.c   Fri Sep 30 17:19:43 2016(r306511)
+++ head/sys/kern/vfs_mount.c   Fri Sep 30 17:27:17 2016(r306512)
@@ -109,6 +109,7 @@ mount_init(void *mem, int size, int flag
 
mp = (struct mount *)mem;
mtx_init(&mp->mnt_mtx, "struct mount mtx", NULL, MTX_DEF);
+   mtx_init(&mp->mnt_listmtx, "struct mount vlist mtx", NULL, MTX_DEF);
lockinit(&mp->mnt_explock, PVFS, "explock", 0, 0);
return (0);
 }
@@ -120,6 +121,7 @@ mount_fini(void *mem, int size)
 
mp = (struct mount *)mem;
lockdestroy(&mp->mnt_explock);
+   mtx_destroy(&mp->mnt_listmtx);
mtx_destroy(&mp->mnt_mtx);
 }
 
@@ -461,6 +463,8 @@ vfs_mount_alloc(struct vnode *vp, struct
mp->mnt_nvnodelistsize = 0;
TAILQ_INIT(&mp->mnt_activevnodelist);
mp->mnt_activevnodelistsize = 0;
+   TAILQ_INIT(&mp->mnt_tmpfreevnodelist);
+   mp->mnt_tmpfreevnodelistsize = 0;
mp->mnt_ref = 0;
(void) vfs_busy(mp, MBF_NOWAIT);
atomic_add_acq_int(&vfsp->vfc_refcount, 1);

Modified: head/sys/kern/vfs_subr.c
==
--- head/sys/kern/vfs_subr.cFri Sep 30 17:19:43 2016(r306511)
+++ head/sys/kern/vfs_subr.cFri Sep 30 17:27:17 2016(r306512)
@@ -112,6 +112,7 @@ static void vfs_knllock(void *arg);
 static voidvfs_knlunlock(void *arg);
 static voidvfs_knl_assert_locked(void *arg);
 static voidvfs_knl_assert_unlocked(void *arg);
+static voidvnlru_return_batches(struct vfsops *mnt_op);
 static voiddestroy_vpollinfo(struct vpollinfo *vi);
 
 /*
@@ -127,6 +128,10 @@ static u_long vnodes_created;
 SYSCTL_ULONG(_vfs, OID_AUTO, vnodes_created, CTLFLAG_RD, &vnodes_created,
 0, "Number of vnodes created by getnewvnode");
 
+static u_long mnt_free_list_batch = 128;
+SYSCTL_ULONG(_vfs, OID_AUTO, mnt_free_list_batch, CTLFLAG_RW,
+&mnt_free_list_batch, 0, "Limit of vnodes held on mnt's free list");
+
 /*
  * Conversion tables for conversion from vnode types to inode formats
  * and back.
@@ -953,7 +958,9 @@ vnlru_free_locked(int count, struct vfso
 {
struct vnode *vp;
struct mount *mp;
+   bool tried_batches;
 
+   tried_batches = false;
mtx_assert(&vnode_free_list_mtx, MA_OWNED);
if (count > max_vnlru_free)
count = max_vnlru_free;
@@ -963,8 +970,16 @@ vnlru_free_locked(int count, struct vfso
 * The list can be modified while the free_list_mtx
 * has been dropped and vp could be NULL here.
 */
-   if (!vp)
-   break;
+   if (vp == NULL) {
+   if (tried_batches)
+   break;
+   mtx_unlock(&vnode_free_list_mtx);
+   vnlru_return_batches(mnt_op);
+   tried_batches = true;
+   mtx_lock(&vnode_free_list_mtx);
+   continue;
+   }
+
VNASSERT(vp->v_op != NULL, vp,
("vnlru_free: vnode already reclaimed."));
KASSERT((vp->v_iflag & VI_FREE) != 0,
@@ -1041,6 +1056,63 @@ vspace(void)
return (space);
 }
 
+static void
+vnlru_return_batch_locked(struct mount *mp)
+{
+   struct vnode *vp;
+
+   mtx_assert(&mp->mnt_listmtx, MA_OWNED);
+
+   if (mp->mnt_tmpfreevnodelistsize == 0)
+   return;
+
+   mtx_lock(&vnode_free_list_mtx);
+   TAILQ_FOREACH(vp, &mp->mnt_tmpfreevnodelist, v_actfreelist) {
+   VNASSERT((vp->v_mflag & VMP_TMPMNTFREELIST) != 0, vp,
+   ("vnode without VMP_TMPMNTFREELIST on 
mnt_tmpfreevnodelist"));
+   vp->v_mflag &= ~VMP_TMPMNTFREELIST;
+   }
+   TAILQ_CONCAT(&vnode_free_list, &mp->mnt_tmpfreevnodelist, 
v_actfreelist);
+   freevnodes += mp->mnt_tmpfreevnodelistsize;
+   mp->mnt_tmpfreevnodelistsize = 0;
+   mtx_unlock(&vnode_free_list_mtx);
+}
+
+static void
+vnlru_return_batch(struct mount *mp)
+{
+
+   mtx_lock(&mp->mnt_listmtx);
+   vnlru_return_batch_locked(mp);
+   mtx_unlock(&mp->mnt_listmtx);
+}

svn commit: r306511 - head/sys/arm/ti/cpsw

2016-09-30 Thread Luiz Otavio O Souza
Author: loos
Date: Fri Sep 30 17:19:43 2016
New Revision: 306511
URL: https://svnweb.freebsd.org/changeset/base/306511

Log:
  Fix a typo in CPSW_DEBUG MACRO and then replace all the CPSWP_DEBUG() calls
  with CPSW_DEBUG().
  
  Sponsored by: Rubicon Communications, LLC (Netgate)

Modified:
  head/sys/arm/ti/cpsw/if_cpsw.c

Modified: head/sys/arm/ti/cpsw/if_cpsw.c
==
--- head/sys/arm/ti/cpsw/if_cpsw.c  Fri Sep 30 17:16:02 2016
(r306510)
+++ head/sys/arm/ti/cpsw/if_cpsw.c  Fri Sep 30 17:19:43 2016
(r306511)
@@ -255,8 +255,6 @@ static struct cpsw_stat {
  * Basic debug support.
  */
 
-#defineIF_DEBUG(_sc)   if ((_sc)->if_flags & IFF_DEBUG)
-
 static void
 cpsw_debugf_head(const char *funcname)
 {
@@ -278,20 +276,12 @@ cpsw_debugf(const char *fmt, ...)
 }
 
 #defineCPSW_DEBUGF(_sc, a) do {
\
-   if (sc->debug) {\
+   if ((_sc)->debug) { \
cpsw_debugf_head(__func__); \
cpsw_debugf a;  \
}   \
 } while (0)
 
-#defineCPSWP_DEBUGF(_sc, a) do {   
\
-   IF_DEBUG((_sc)) {   \
-   cpsw_debugf_head(__func__); \
-   cpsw_debugf a;  \
-   }   \
-} while (0)
-
-
 /*
  * Locking macros
  */
@@ -1052,7 +1042,7 @@ cpswp_detach(device_t dev)
struct cpswp_softc *sc;
 
sc = device_get_softc(dev);
-   CPSWP_DEBUGF(sc, (""));
+   CPSW_DEBUGF(sc->swsc, (""));
if (device_is_attached(dev)) {
ether_ifdetach(sc->ifp);
CPSW_PORT_LOCK(sc);
@@ -1098,7 +1088,7 @@ cpswp_init(void *arg)
 {
struct cpswp_softc *sc = arg;
 
-   CPSWP_DEBUGF(sc, (""));
+   CPSW_DEBUGF(sc->swsc, (""));
CPSW_PORT_LOCK(sc);
cpswp_init_locked(arg);
CPSW_PORT_UNLOCK(sc);
@@ -,7 +1101,7 @@ cpswp_init_locked(void *arg)
struct ifnet *ifp;
uint32_t reg;
 
-   CPSWP_DEBUGF(sc, (""));
+   CPSW_DEBUGF(sc->swsc, (""));
CPSW_PORT_LOCK_ASSERT(sc);
ifp = sc->ifp;
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
@@ -1240,7 +1230,7 @@ cpswp_stop_locked(struct cpswp_softc *sc
uint32_t reg;
 
ifp = sc->ifp;
-   CPSWP_DEBUGF(sc, (""));
+   CPSW_DEBUGF(sc->swsc, (""));
CPSW_PORT_LOCK_ASSERT(sc);
 
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
@@ -1362,7 +1352,7 @@ cpswp_ioctl(struct ifnet *ifp, u_long co
if (ifp->if_flags & IFF_UP) {
if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
changed = ifp->if_flags ^ sc->if_flags;
-   CPSWP_DEBUGF(sc,
+   CPSW_DEBUGF(sc->swsc,
("SIOCSIFFLAGS: UP & RUNNING 
(changed=0x%x)",
changed));
if (changed & IFF_PROMISC)
@@ -1372,12 +1362,12 @@ cpswp_ioctl(struct ifnet *ifp, u_long co
cpsw_set_allmulti(sc,
ifp->if_flags & IFF_ALLMULTI);
} else {
-   CPSWP_DEBUGF(sc,
+   CPSW_DEBUGF(sc->swsc,
("SIOCSIFFLAGS: UP but not RUNNING; 
starting up"));
cpswp_init_locked(sc);
}
} else if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
-   CPSWP_DEBUGF(sc,
+   CPSW_DEBUGF(sc->swsc,
("SIOCSIFFLAGS: not UP but RUNNING; shutting 
down"));
cpswp_stop_locked(sc);
}
@@ -1488,7 +1478,7 @@ cpswp_miibus_statchg(device_t dev)
uint32_t mac_control, reg;
 
sc = device_get_softc(dev);
-   CPSWP_DEBUGF(sc, (""));
+   CPSW_DEBUGF(sc->swsc, (""));
 
reg = CPSW_SL_MACCONTROL(sc->unit);
mac_control = cpsw_read_4(sc->swsc, reg);
@@ -1766,7 +1756,7 @@ cpswp_tx_enqueue(struct cpswp_softc *sc)
"Can't defragment packet; dropping\n");
m_freem(slot->mbuf);
} else {
-   CPSWP_DEBUGF(sc,
+   CPSW_DEBUGF(sc->swsc,
("Requeueing defragmented packet"));
IF_PREPEND(&sc->ifp->if_snd, m0);
   

Re: svn commit: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs

2016-09-30 Thread Shawn Webb
On Fri, Sep 30, 2016 at 05:11:03PM +, Mateusz Guzik wrote:
> Author: mjg
> Date: Fri Sep 30 17:11:03 2016
> New Revision: 306509
> URL: https://svnweb.freebsd.org/changeset/base/306509
> 
> Log:
>   vfs: remove the __bo_vnode field from struct vnode
>   
>   The pointer can be obtained using __containerof instead.
>   
>   Reviewed by:kib

Should __FreeBSD_Version be bumped?

Thanks,

-- 
Shawn Webb
Cofounder and Security Engineer
HardenedBSD

GPG Key ID:  0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE


signature.asc
Description: PGP signature


svn commit: r306510 - head/sys/arm/ti/cpsw

2016-09-30 Thread Luiz Otavio O Souza
Author: loos
Date: Fri Sep 30 17:16:02 2016
New Revision: 306510
URL: https://svnweb.freebsd.org/changeset/base/306510

Log:
  Sort and remove unnecessary includes.
  
  No functional changes.
  
  Sponsored by: Rubicon Communications, LLC (Netgate)

Modified:
  head/sys/arm/ti/cpsw/if_cpsw.c

Modified: head/sys/arm/ti/cpsw/if_cpsw.c
==
--- head/sys/arm/ti/cpsw/if_cpsw.c  Fri Sep 30 17:11:03 2016
(r306509)
+++ head/sys/arm/ti/cpsw/if_cpsw.c  Fri Sep 30 17:16:02 2016
(r306510)
@@ -48,35 +48,27 @@
 __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 
-#include 
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
 
 #include 
 #include 
@@ -273,7 +265,6 @@ cpsw_debugf_head(const char *funcname)
printf("%02d:%02d:%02d %s ", t / (60 * 60), (t / 60) % 60, t % 60, 
funcname);
 }
 
-#include 
 static void
 cpsw_debugf(const char *fmt, ...)
 {
___
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: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs

2016-09-30 Thread Mateusz Guzik
Author: mjg
Date: Fri Sep 30 17:11:03 2016
New Revision: 306509
URL: https://svnweb.freebsd.org/changeset/base/306509

Log:
  vfs: remove the __bo_vnode field from struct vnode
  
  The pointer can be obtained using __containerof instead.
  
  Reviewed by:  kib

Modified:
  head/sys/fs/nandfs/nandfs_subr.c
  head/sys/kern/vfs_bio.c
  head/sys/kern/vfs_subr.c
  head/sys/sys/bufobj.h
  head/sys/sys/vnode.h
  head/sys/ufs/ffs/ffs_snapshot.c
  head/sys/ufs/ffs/ffs_vfsops.c

Modified: head/sys/fs/nandfs/nandfs_subr.c
==
--- head/sys/fs/nandfs/nandfs_subr.cFri Sep 30 16:35:30 2016
(r306508)
+++ head/sys/fs/nandfs/nandfs_subr.cFri Sep 30 17:11:03 2016
(r306509)
@@ -80,7 +80,7 @@ nandfs_bufsync(struct bufobj *bo, int wa
struct vnode *vp;
int error = 0;
 
-   vp = bo->__bo_vnode;
+   vp = bo2vnode(bo);
 
ASSERT_VOP_LOCKED(vp, __func__);
error = nandfs_sync_file(vp);

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Fri Sep 30 16:35:30 2016(r306508)
+++ head/sys/kern/vfs_bio.c Fri Sep 30 17:11:03 2016(r306509)
@@ -4544,7 +4544,7 @@ int
 bufsync(struct bufobj *bo, int waitfor)
 {
 
-   return (VOP_FSYNC(bo->__bo_vnode, waitfor, curthread));
+   return (VOP_FSYNC(bo2vnode(bo), waitfor, curthread));
 }
 
 void

Modified: head/sys/kern/vfs_subr.c
==
--- head/sys/kern/vfs_subr.cFri Sep 30 16:35:30 2016(r306508)
+++ head/sys/kern/vfs_subr.cFri Sep 30 17:11:03 2016(r306509)
@@ -372,7 +372,6 @@ vnode_init(void *mem, int size, int flag
 * Initialize bufobj.
 */
bo = &vp->v_bufobj;
-   bo->__bo_vnode = vp;
rw_init(BO_LOCKPTR(bo), "bufobj interlock");
bo->bo_private = vp;
TAILQ_INIT(&bo->bo_clean.bv_hd);
@@ -2052,7 +2051,7 @@ sync_vnode(struct synclist *slp, struct 
*bo = LIST_FIRST(slp);
if (*bo == NULL)
return (0);
-   vp = (*bo)->__bo_vnode; /* XXX */
+   vp = bo2vnode(*bo);
if (VOP_ISLOCKED(vp) != 0 || VI_TRYLOCK(vp) == 0)
return (1);
/*

Modified: head/sys/sys/bufobj.h
==
--- head/sys/sys/bufobj.h   Fri Sep 30 16:35:30 2016(r306508)
+++ head/sys/sys/bufobj.h   Fri Sep 30 17:11:03 2016(r306509)
@@ -94,11 +94,6 @@ struct bufobj {
struct vm_object *bo_object;/* v Place to store VM object */
LIST_ENTRY(bufobj) bo_synclist; /* S dirty vnode list */
void*bo_private;/* private pointer */
-   struct vnode*__bo_vnode;/*
-* XXX: This vnode pointer is here
-* XXX: only to keep the syncer working
-* XXX: for now.
-*/
struct bufv bo_clean;   /* i Clean buffers */
struct bufv bo_dirty;   /* i Dirty buffers */
longbo_numoutput;   /* i Writes in progress */

Modified: head/sys/sys/vnode.h
==
--- head/sys/sys/vnode.hFri Sep 30 16:35:30 2016(r306508)
+++ head/sys/sys/vnode.hFri Sep 30 17:11:03 2016(r306509)
@@ -179,6 +179,8 @@ struct vnode {
 #definev_rdev  v_un.vu_cdev
 #definev_fifoinfo  v_un.vu_fifoinfo
 
+#definebo2vnode(bo)__containerof((bo), struct vnode, v_bufobj)
+
 /* XXX: These are temporary to avoid a source sweep at this time */
 #define v_object   v_bufobj.bo_object
 

Modified: head/sys/ufs/ffs/ffs_snapshot.c
==
--- head/sys/ufs/ffs/ffs_snapshot.c Fri Sep 30 16:35:30 2016
(r306508)
+++ head/sys/ufs/ffs/ffs_snapshot.c Fri Sep 30 17:11:03 2016
(r306509)
@@ -2170,7 +2170,7 @@ ffs_bdflush(bo, bp)
 
td = curthread;
vp = bp->b_vp;
-   devvp = bo->__bo_vnode;
+   devvp = bo2vnode(bo);
KASSERT(vp == devvp, ("devvp != vp %p %p", bo, bp));
 
VI_LOCK(devvp);

Modified: head/sys/ufs/ffs/ffs_vfsops.c
==
--- head/sys/ufs/ffs/ffs_vfsops.c   Fri Sep 30 16:35:30 2016
(r306508)
+++ head/sys/ufs/ffs/ffs_vfsops.c   Fri Sep 30 17:11:03 2016
(r306509)
@@ -2177,7 +2177,7 @@ ffs_geom_strategy(struct bufobj *bo, str
struct buf *tbp;
int nocopy;
 
-   vp = bo->__bo_vnode;
+   vp = bo2vnode(bo);
if (bp->b_iocmd == BIO_WRITE) {
if ((bp->b_flags & B_VALIDSUSPWRT) == 0 &&

svn commit: r306508 - head/contrib/blacklist/bin

2016-09-30 Thread Kurt Lidl
Author: lidl
Date: Fri Sep 30 16:35:30 2016
New Revision: 306508
URL: https://svnweb.freebsd.org/changeset/base/306508

Log:
  Fix blacklistd's state restoral at startup
  
  The blacklistd daemon attempted to restore the filtering rules
  before the database of blocked addresses was opened, so no rules
  were being reloaded.  Now the rules are properly recreated when the
  daemon is started with '-r'.
  
  This bug was fixed locally, and then sent upstream to NetBSD.
  This changeset is the import the NetBSD version of the change,
  which added debugging output to alert about a null database.
  
  Reviewed by:  emaste
  Obtained from:NetBSD
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation

Modified:
  head/contrib/blacklist/bin/blacklistd.c
  head/contrib/blacklist/bin/state.c

Modified: head/contrib/blacklist/bin/blacklistd.c
==
--- head/contrib/blacklist/bin/blacklistd.c Fri Sep 30 16:31:12 2016
(r306507)
+++ head/contrib/blacklist/bin/blacklistd.c Fri Sep 30 16:35:30 2016
(r306508)
@@ -1,4 +1,4 @@
-/* $NetBSD: blacklistd.c,v 1.34 2016/04/04 15:52:56 christos Exp $ */
+/* $NetBSD: blacklistd.c,v 1.35 2016/09/26 19:43:43 christos Exp $ */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include "config.h"
 #endif
 #include 
-__RCSID("$NetBSD: blacklistd.c,v 1.34 2016/04/04 15:52:56 christos Exp $");
+__RCSID("$NetBSD: blacklistd.c,v 1.35 2016/09/26 19:43:43 christos Exp $");
 
 #include 
 #include 
@@ -473,9 +473,6 @@ main(int argc, char *argv[])
flags |= O_TRUNC;
}
 
-   if (restore)
-   rules_restore();
-
struct pollfd *pfd = NULL;
bl_t *bl = NULL;
size_t nfd = 0;
@@ -500,6 +497,9 @@ main(int argc, char *argv[])
if (state == NULL)
return EXIT_FAILURE;
 
+   if (restore)
+   rules_restore();
+
if (!debug) {
if (daemon(0, 0) == -1)
err(EXIT_FAILURE, "daemon failed");

Modified: head/contrib/blacklist/bin/state.c
==
--- head/contrib/blacklist/bin/state.c  Fri Sep 30 16:31:12 2016
(r306507)
+++ head/contrib/blacklist/bin/state.c  Fri Sep 30 16:35:30 2016
(r306508)
@@ -1,4 +1,4 @@
-/* $NetBSD: state.c,v 1.18 2016/04/04 15:52:56 christos Exp $  */
+/* $NetBSD: state.c,v 1.19 2016/09/26 19:43:43 christos Exp $  */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: state.c,v 1.18 2016/04/04 15:52:56 christos Exp $");
+__RCSID("$NetBSD: state.c,v 1.19 2016/09/26 19:43:43 christos Exp $");
 
 #include 
 #include 
@@ -200,8 +200,10 @@ state_iterate(DB *db, struct conf *c, st
int rv;
DBT k, v;
 
-   if (db == NULL)
+   if (db == NULL) {
+   (*lfun)(LOG_ERR, "%s: called with no database file", __func__);
return -1;
+   }
 
first = first ? R_FIRST : R_NEXT;
 
___
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: r306507 - head/contrib/blacklist/bin

2016-09-30 Thread Kurt Lidl
Author: lidl
Date: Fri Sep 30 16:31:12 2016
New Revision: 306507
URL: https://svnweb.freebsd.org/changeset/base/306507

Log:
  Update blacklistd.8 with changes from NetBSD
  
  Obtained from:NetBSD
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D8079

Modified:
  head/contrib/blacklist/bin/blacklistd.8

Modified: head/contrib/blacklist/bin/blacklistd.8
==
--- head/contrib/blacklist/bin/blacklistd.8 Fri Sep 30 16:02:25 2016
(r306506)
+++ head/contrib/blacklist/bin/blacklistd.8 Fri Sep 30 16:31:12 2016
(r306507)
@@ -1,4 +1,4 @@
-.\" $NetBSD: blacklistd.8,v 1.15 2016/03/11 17:16:40 christos Exp $
+.\" $NetBSD: blacklistd.8,v 1.18 2016/07/30 06:09:29 dholland Exp $
 .\"
 .\" Copyright (c) 2015 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -47,7 +47,7 @@
 .Nm
 is a daemon similar to
 .Xr syslogd 8
-that listens to a sockets at paths specified in the
+that listens to sockets at paths specified in the
 .Ar sockpathsfile
 for notifications from other daemons about successful or failed connection
 attempts.
@@ -218,7 +218,8 @@ Socket to receive connection notificatio
 .Nm
 first appeared in
 .Nx 7 .
-.Fx support for
+.Fx
+support for
 .Nm
 was implemented in
 .Fx 11 .
___
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: r306506 - head/lib/libc/sys

2016-09-30 Thread Konstantin Belousov
Author: kib
Date: Fri Sep 30 16:02:25 2016
New Revision: 306506
URL: https://svnweb.freebsd.org/changeset/base/306506

Log:
  Reword the statement.
  
  Submitted by: wblock
  MFC after:3 days

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

Modified: head/lib/libc/sys/thr_suspend.2
==
--- head/lib/libc/sys/thr_suspend.2 Fri Sep 30 15:47:13 2016
(r306505)
+++ head/lib/libc/sys/thr_suspend.2 Fri Sep 30 16:02:25 2016
(r306506)
@@ -61,9 +61,9 @@ system call puts the calling thread in a
 not eligible for CPU time.
 This state is exited by another thread calling
 .Xr thr_wake 2 ,
-by expiration of the timeout specified in the
+when the time interval specified by
 .Fa timeout
-argument,
+has elapsed,
 or by the delivery of a signal to the suspended thread.
 .Pp
 If the
___
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: r306505 - head/lib/libc/sys

2016-09-30 Thread Konstantin Belousov
Author: kib
Date: Fri Sep 30 15:47:13 2016
New Revision: 306505
URL: https://svnweb.freebsd.org/changeset/base/306505

Log:
  Add an article.
  
  Submitted by: wblock
  MFC after:3 days

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

Modified: head/lib/libc/sys/cap_enter.2
==
--- head/lib/libc/sys/cap_enter.2   Fri Sep 30 15:41:12 2016
(r306504)
+++ head/lib/libc/sys/cap_enter.2   Fri Sep 30 15:47:13 2016
(r306505)
@@ -73,7 +73,7 @@ sandbox.
 If the
 .Dv kern.trap_enocap
 sysctl MIB is set to a non-zero value, then for any process executing in a
-capability mode sandbox, any syscall which results in either
+capability mode sandbox, any syscall which results in either an
 .Er ENOTCAPABLE
 or
 .Er ECAPMODE
___
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: r306504 - head/sys/boot/efi/loader

2016-09-30 Thread Warner Losh
Author: imp
Date: Fri Sep 30 15:41:12 2016
New Revision: 306504
URL: https://svnweb.freebsd.org/changeset/base/306504

Log:
  Fix a cluster of bugs in list EFI environment variables:
  1. Size returned for variable name is in bytes, not CHAR16 (the
 UEFI standard is unclear on this, where it is clear on the size of
 the variable).
  2. Dynamically allocate the buffers so we can grow them if someone
 defines a super-long variable name.
  
  These two fixes allow me to examine all the variables in my BIOS and
  also removes the repeated printing of variables.

Modified:
  head/sys/boot/efi/loader/main.c

Modified: head/sys/boot/efi/loader/main.c
==
--- head/sys/boot/efi/loader/main.c Fri Sep 30 14:00:23 2016
(r306503)
+++ head/sys/boot/efi/loader/main.c Fri Sep 30 15:41:12 2016
(r306504)
@@ -814,8 +814,10 @@ command_efi_show(int argc, char *argv[])
EFI_GUIDvarguid = { 0,0,0,{0,0,0,0,0,0,0,0} };
EFI_GUIDmatchguid = { 0,0,0,{0,0,0,0,0,0,0,0} };
uint32_tuuid_status;
-   CHAR16  varname[128];
+   CHAR16  *varname;
+   CHAR16  *newnm;
CHAR16  varnamearg[128];
+   UINTN   varalloc;
UINTN   varsz;
 
while ((ch = getopt(argc, argv, "ag:lv:")) != -1) {
@@ -910,10 +912,33 @@ command_efi_show(int argc, char *argv[])
 * to specify the initial call must be a poiner to a NULL
 * character.
 */
-   varsz = nitems(varname);
+   varalloc = 1024;
+   varname = malloc(varalloc);
+   if (varname == NULL) {
+   printf("Can't allocate memory to get variables\n");
+   pager_close();
+   return (CMD_ERROR);
+   }
varname[0] = 0;
-   while ((status = RS->GetNextVariableName(&varsz, varname, &varguid)) !=
-   EFI_NOT_FOUND) {
+   while (1) {
+   varsz = varalloc;
+   status = RS->GetNextVariableName(&varsz, varname, &varguid);
+   if (status == EFI_BUFFER_TOO_SMALL) {
+   varalloc = varsz;
+   newnm = malloc(varalloc);
+   if (newnm == NULL) {
+   printf("Can't allocate memory to get 
variables\n");
+   free(varname);
+   pager_close();
+   return (CMD_ERROR);
+   }
+   memcpy(newnm, varname, varsz);
+   free(varname);
+   varname = newnm;
+   continue; /* Try again with bigger buffer */
+   }
+   if (status != EFI_SUCCESS)
+   break;
if (aflag) {
if (efi_print_var(varname, &varguid, lflag) != CMD_OK)
break;
@@ -934,6 +959,7 @@ command_efi_show(int argc, char *argv[])
}
}
}
+   free(varname);
pager_close();
 
return (CMD_OK);
___
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: r306284 - head/sys/dev/bxe

2016-09-30 Thread Konstantin Belousov
On Fri, Sep 30, 2016 at 04:01:27PM +0200, Baptiste Daroussin wrote:
> On Fri, Sep 23, 2016 at 11:18:54PM +, David C Somayajulu wrote:
> > Author: davidcs
> > Date: Fri Sep 23 23:18:54 2016
> > New Revision: 306284
> > URL: https://svnweb.freebsd.org/changeset/base/306284
> > 
> > Log:
> >   Fixes for issues under high workloads
> >   
> >   MFC after:5 days
> 
> Please do not MFC as this change makes the kernel panic as soon as one setup 
> the
> network:
> 
> I had to revert the patch to get my machine running again
> 
> bxe0@pci0:1:0:0:class=0x02 card=0x06361028 chip=0x168e14e4 
> rev=0x10 hdr=0x00
>   vendor = 'Broadcom Corporation'
>   device = 'NetXtreme II BCM57810 10 Gigabit Ethernet'
>   class  = network
>   subclass   = ethernet
> bxe1@pci0:1:0:1:class=0x02 card=0x06361028 chip=0x168e14e4 
> rev=0x10 hdr=0x00
>   vendor = 'Broadcom Corporation'
>   device = 'NetXtreme II BCM57810 10 Gigabit Ethernet'
>   class  = network
>   subclass   = ethernet
> 
> With the following trace:
> _callout_init_lock() at _callout_init_lock+0xa8/frame 0xfe201bde8370
> _timeout_task_init() at _timeout_task_init+0x31/frame 0xfe201bde8390
> bxe_nic_load() at bxe_nic_load+0x128a/frame 0xfe201bde8610
> bxe_init_locked() at bxe_init_locked+0xd16/frame 0xfe201bde8690
> bxe_init() at bxe_init+0x2f/frame 0xfe201bde86b0
> ether_ioctl() at ether_ioctl+0x4c/frame 0xfe201bde86e0
> in_control() at in_control+0x882/frame 0xfe201bde8760
> ifioctl() at ifioctl+0xdc1/frame 0xfe201bde87f0
> kern_ioctl() at kern_ioctl+0x246/frame 0xfe201bde8850
> 

The issue seems to be that the bxe_interrupt_attach() creates fast
taskqueue, i.e. the taskqueue lock is spinlock.  Then the queue is
passed to TIMEOUT_TASK_INIT(), which can only operate with the
sleepable mutex locks.
___
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: r306284 - head/sys/dev/bxe

2016-09-30 Thread Baptiste Daroussin
On Fri, Sep 23, 2016 at 11:18:54PM +, David C Somayajulu wrote:
> Author: davidcs
> Date: Fri Sep 23 23:18:54 2016
> New Revision: 306284
> URL: https://svnweb.freebsd.org/changeset/base/306284
> 
> Log:
>   Fixes for issues under high workloads
>   
>   MFC after:5 days

Please do not MFC as this change makes the kernel panic as soon as one setup the
network:

I had to revert the patch to get my machine running again

bxe0@pci0:1:0:0:class=0x02 card=0x06361028 chip=0x168e14e4 rev=0x10 
hdr=0x00
  vendor = 'Broadcom Corporation'
  device = 'NetXtreme II BCM57810 10 Gigabit Ethernet'
  class  = network
  subclass   = ethernet
bxe1@pci0:1:0:1:class=0x02 card=0x06361028 chip=0x168e14e4 rev=0x10 
hdr=0x00
  vendor = 'Broadcom Corporation'
  device = 'NetXtreme II BCM57810 10 Gigabit Ethernet'
  class  = network
  subclass   = ethernet

With the following trace:
_callout_init_lock() at _callout_init_lock+0xa8/frame 0xfe201bde8370
_timeout_task_init() at _timeout_task_init+0x31/frame 0xfe201bde8390
bxe_nic_load() at bxe_nic_load+0x128a/frame 0xfe201bde8610
bxe_init_locked() at bxe_init_locked+0xd16/frame 0xfe201bde8690
bxe_init() at bxe_init+0x2f/frame 0xfe201bde86b0
ether_ioctl() at ether_ioctl+0x4c/frame 0xfe201bde86e0
in_control() at in_control+0x882/frame 0xfe201bde8760
ifioctl() at ifioctl+0xdc1/frame 0xfe201bde87f0
kern_ioctl() at kern_ioctl+0x246/frame 0xfe201bde8850

Best regards,
Bapt


signature.asc
Description: PGP signature


svn commit: r306502 - head/usr.bin/primes

2016-09-30 Thread Ed Maste
Author: emaste
Date: Fri Sep 30 13:50:59 2016
New Revision: 306502
URL: https://svnweb.freebsd.org/changeset/base/306502

Log:
  primes: trivially capsicumize
  
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D7982

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

Modified: head/usr.bin/primes/primes.c
==
--- head/usr.bin/primes/primes.cFri Sep 30 13:49:50 2016
(r306501)
+++ head/usr.bin/primes/primes.cFri Sep 30 13:50:59 2016
(r306502)
@@ -61,6 +61,7 @@ static const char rcsid[] =
  * validation check: there are 664579 primes between 0 and 10^7
  */
 
+#include 
 #include 
 #include 
 #include 
@@ -70,6 +71,7 @@ static const char rcsid[] =
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include "primes.h"
@@ -99,6 +101,12 @@ main(int argc, char *argv[])
int ch;
char *p;
 
+   /* Cache NLS data, for strerror, for err(3), before cap_enter. */
+   (void)catopen("libc", NL_CAT_LOCALE);
+
+   if (cap_enter() < 0 && errno != ENOSYS)
+   err(1, "cap_enter");
+
while ((ch = getopt(argc, argv, "h")) != -1)
switch (ch) {
case '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: r299064 - head/sys/kern

2016-09-30 Thread Roger Pau Monné
On Sat, Sep 03, 2016 at 01:29:45AM +0200, Oliver Pinter wrote:
> Hi!
> 
> This commit never gets MFCd back to 10-STABLE. Do you still plan to do it?

Ops, sorry for the delay, should be MFC'ed now.

Thanks, Roger.
___
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: r306501 - stable/10/sys/kern

2016-09-30 Thread Roger Pau Monné
Author: royger
Date: Fri Sep 30 13:49:50 2016
New Revision: 306501
URL: https://svnweb.freebsd.org/changeset/base/306501

Log:
  MFC r299064
  
  rtc: fix inverted resolution check

Modified:
  stable/10/sys/kern/subr_rtc.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/subr_rtc.c
==
--- stable/10/sys/kern/subr_rtc.c   Fri Sep 30 13:47:52 2016
(r306500)
+++ stable/10/sys/kern/subr_rtc.c   Fri Sep 30 13:49:50 2016
(r306501)
@@ -84,7 +84,7 @@ clock_register(device_t dev, long res)/
 {
 
if (clock_dev != NULL) {
-   if (clock_res > res) {
+   if (clock_res <= res) {
if (bootverbose)
device_printf(dev, "not installed as "
"time-of-day clock: clock %s has higher "
___
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: r306499 - head/sys/xen/interface/io

2016-09-30 Thread Roger Pau Monné
Author: royger
Date: Fri Sep 30 13:41:24 2016
New Revision: 306499
URL: https://svnweb.freebsd.org/changeset/base/306499

Log:
  xen/vchan: change license of header from Lesser GPL v2.1 to BSD
  
  This is a license change only commit, which can be found upstream in the Xen
  tree as 937324f032f4f77866e80e39de0d697fa5131df1.
  
  Sponsored by: Citrix Systems R&D

Modified:
  head/sys/xen/interface/io/libxenvchan.h

Modified: head/sys/xen/interface/io/libxenvchan.h
==
--- head/sys/xen/interface/io/libxenvchan.h Fri Sep 30 13:37:50 2016
(r306498)
+++ head/sys/xen/interface/io/libxenvchan.h Fri Sep 30 13:41:24 2016
(r306499)
@@ -10,18 +10,23 @@
  *
  * @section LICENSE
  *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library 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
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; If not, see 
.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
  *
  * @section 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: r306498 - head/sys/dev/ral

2016-09-30 Thread Andriy Voskoboinyk
Author: avos
Date: Fri Sep 30 13:37:50 2016
New Revision: 306498
URL: https://svnweb.freebsd.org/changeset/base/306498

Log:
  ral (rt2860): eliminate duplicate ieee80211_process_callback() call
  (left after r287197)
  
  MFC after:1 week

Modified:
  head/sys/dev/ral/rt2860.c

Modified: head/sys/dev/ral/rt2860.c
==
--- head/sys/dev/ral/rt2860.c   Fri Sep 30 13:16:04 2016(r306497)
+++ head/sys/dev/ral/rt2860.c   Fri Sep 30 13:37:50 2016(r306498)
@@ -1140,10 +1140,6 @@ rt2860_tx_intr(struct rt2860_softc *sc, 
bus_dmamap_sync(sc->txwi_dmat, data->map,
BUS_DMASYNC_POSTWRITE);
bus_dmamap_unload(sc->txwi_dmat, data->map);
-   if (data->m->m_flags & M_TXCB) {
-   ieee80211_process_callback(data->ni, data->m,
-   0);
-   }
ieee80211_tx_complete(data->ni, data->m, 0);
data->ni = NULL;
data->m = 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: r306497 - head/usr.sbin/crunch/crunchgen

2016-09-30 Thread Ed Maste
Author: emaste
Date: Fri Sep 30 13:16:04 2016
New Revision: 306497
URL: https://svnweb.freebsd.org/changeset/base/306497

Log:
  crunchgen: do not strip crunched binary (it will be done by install)
  
  Reviewed by:  adrian, imp (earlier)
  Differential Revision:https://reviews.freebsd.org/D2003

Modified:
  head/usr.sbin/crunch/crunchgen/crunchgen.c

Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c
==
--- head/usr.sbin/crunch/crunchgen/crunchgen.c  Fri Sep 30 13:05:32 2016
(r306496)
+++ head/usr.sbin/crunch/crunchgen/crunchgen.c  Fri Sep 30 13:16:04 2016
(r306497)
@@ -985,7 +985,6 @@ top_makefile_rules(FILE *outmk)
prog_t *p;
 
fprintf(outmk, "LD?= ld\n");
-   fprintf(outmk, "STRIPBIN?= strip\n");
if ( subtract_strlst(&libs, &libs_so) )
fprintf(outmk, "# NOTE: Some LIBS declarations below overridden 
by LIBS_SO\n");
 
@@ -1033,7 +1032,6 @@ top_makefile_rules(FILE *outmk)
fprintf(outmk, "\t$(CC) -static -o %s %s.o $(CRUNCHED_OBJS) $(LIBS)\n",
execfname, execfname);
fprintf(outmk, ".endif\n");
-   fprintf(outmk, "\t$(STRIPBIN) %s\n", execfname);
fprintf(outmk, "realclean: clean subclean\n");
fprintf(outmk, "clean:\n\trm -f %s *.lo *.o *_stub.c\n", execfname);
fprintf(outmk, "subclean: $(SUBCLEAN_TARGETS)\n");
___
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: r306496 - head/lib/libc/sys

2016-09-30 Thread Dag-Erling Smørgrav
Author: des
Date: Fri Sep 30 13:05:32 2016
New Revision: 306496
URL: https://svnweb.freebsd.org/changeset/base/306496

Log:
  Reinstate Xr macros that were accidentally removed in a previous
  commit.  Add some missing cross-references to the SEE ALSO section.
  Bump date now that there are content changes.
  
  MFC after:1 week

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

Modified: head/lib/libc/sys/sigaction.2
==
--- head/lib/libc/sys/sigaction.2   Fri Sep 30 13:04:18 2016
(r306495)
+++ head/lib/libc/sys/sigaction.2   Fri Sep 30 13:05:32 2016
(r306496)
@@ -28,7 +28,7 @@
 .\"From: @(#)sigaction.2   8.2 (Berkeley) 4/3/94
 .\" $FreeBSD$
 .\"
-.Dd September 6, 2013
+.Dd September 30, 2016
 .Dt SIGACTION 2
 .Os
 .Sh NAME
@@ -331,10 +331,10 @@ with names as in the include file
 .It Dv SIGTTIN Ta stop process Ta background read attempted from control 
terminal
 .It Dv SIGTTOU Ta stop process Ta background write attempted to control 
terminal
 .It Dv SIGIO Ta discard signal Ta I/O is possible on a descriptor (see Xr 
fcntl 2 )
-.It Dv SIGXCPU Ta terminate process Ta cpu time limit exceeded (see  setrlimit 
2 )
-.It Dv SIGXFSZ Ta terminate process Ta file size limit exceeded (see  
setrlimit 2 )
-.It Dv SIGVTALRM Ta terminate process Ta virtual time alarm (see  setitimer 2 )
-.It Dv SIGPROF Ta terminate process Ta profiling timer alarm (see  setitimer 2 
)
+.It Dv SIGXCPU Ta terminate process Ta cpu time limit exceeded (see Xr 
setrlimit 2 )
+.It Dv SIGXFSZ Ta terminate process Ta file size limit exceeded (see Xr 
setrlimit 2 )
+.It Dv SIGVTALRM Ta terminate process Ta virtual time alarm (see Xr setitimer 
2 )
+.It Dv SIGPROF Ta terminate process Ta profiling timer alarm (see Xr setitimer 
2 )
 .It Dv SIGWINCH Ta discard signal Ta window size change
 .It Dv SIGINFO Ta discard signal Ta status request from keyboard
 .It Dv SIGUSR1 Ta terminate process Ta user defined signal 1
@@ -731,6 +731,8 @@ or
 .Xr kill 1 ,
 .Xr kill 2 ,
 .Xr ptrace 2 ,
+.Xr setitimer 2 ,
+.Xr setrlimit 2 ,
 .Xr sigaltstack 2 ,
 .Xr sigpending 2 ,
 .Xr sigprocmask 2 ,
___
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: r306495 - head/lib/libc/sys

2016-09-30 Thread Dag-Erling Smørgrav
Author: des
Date: Fri Sep 30 13:04:18 2016
New Revision: 306495
URL: https://svnweb.freebsd.org/changeset/base/306495

Log:
  Minor markup and wording fixes.
  
  MFC after:1 week

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

Modified: head/lib/libc/sys/getrlimit.2
==
--- head/lib/libc/sys/getrlimit.2   Fri Sep 30 11:05:29 2016
(r306494)
+++ head/lib/libc/sys/getrlimit.2   Fri Sep 30 13:04:18 2016
(r306495)
@@ -28,7 +28,7 @@
 .\" @(#)getrlimit.28.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd August 19, 2015
+.Dd September 30, 2016
 .Dt GETRLIMIT 2
 .Os
 .Sh NAME
@@ -137,7 +137,7 @@ For example, if the RSS hard limit is ex
 .Pp
 The
 .Vt rlimit
-structure is used to specify the hard and soft limits on a resource,
+structure is used to specify the hard and soft limits on a resource.
 .Bd -literal -offset indent
 struct rlimit {
rlim_t  rlim_cur;   /* current (soft) limit */
@@ -183,9 +183,9 @@ soft limit will cause the write to fail 
 to be
 generated; this normally terminates the process, but may be caught.
 When
-the soft cpu time limit is exceeded, a signal
+the soft cpu time limit is exceeded, a
 .Dv SIGXCPU
-is sent to the
+signal is sent to the
 offending process.
 .Pp
 When most operations would allocate more virtual memory than allowed by the
@@ -198,7 +198,9 @@ A notable exception is stack extension, 
 If stack extension would allocate more virtual memory than allowed by the soft
 limit of
 .Dv RLIMIT_AS ,
-the signal SIGSEGV will be delivered.
+a
+.Dv SIGSEGV
+signal will be delivered.
 The caller is free to raise the soft address space limit up to the hard limit
 and retry the allocation.
 .Sh RETURN VALUES
___
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: r306494 - head/lib/libc/sys

2016-09-30 Thread Dag-Erling Smørgrav
Author: des
Date: Fri Sep 30 11:05:29 2016
New Revision: 306494
URL: https://svnweb.freebsd.org/changeset/base/306494

Log:
  After perusal of the documentation and some experimentation, I found a
  version that works with both groff and mandoc.
  
  Hat tip to:   kib
  MFC after:1 week

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

Modified: head/lib/libc/sys/sigaction.2
==
--- head/lib/libc/sys/sigaction.2   Fri Sep 30 10:46:27 2016
(r306493)
+++ head/lib/libc/sys/sigaction.2   Fri Sep 30 11:05:29 2016
(r306494)
@@ -307,109 +307,38 @@ The following is a list of all signals
 with names as in the include file
 .In signal.h :
 .Bl -column SIGVTALARMXX "create core imagexxx"
-.It Sy NAME
-.Ta Sy Default Action
-.Ta Sy Description
-.It Dv SIGHUP
-.Ta terminate process
-.Ta terminal line hangup
-.It Dv SIGINT
-.Ta terminate process
-.Ta interrupt program
-.It Dv SIGQUIT
-.Ta create core image
-.Ta quit program
-.It Dv SIGILL
-.Ta create core image
-.Ta illegal instruction
-.It Dv SIGTRAP
-.Ta create core image
-.Ta trace trap
-.It Dv SIGABRT
-.Ta create core image
-.Ta Xr abort 3
-call (formerly
-.Dv SIGIOT )
-.It Dv SIGEMT
-.Ta create core image
-.Ta emulate instruction executed
-.It Dv SIGFPE
-.Ta create core image
-.Ta floating-point exception
-.It Dv SIGKILL
-.Ta terminate process
-.Ta kill program
-.It Dv SIGBUS
-.Ta create core image
-.Ta bus error
-.It Dv SIGSEGV
-.Ta create core image
-.Ta segmentation violation
-.It Dv SIGSYS
-.Ta create core image
-.Ta non-existent system call invoked
-.It Dv SIGPIPE
-.Ta terminate process
-.Ta write on a pipe with no reader
-.It Dv SIGALRM
-.Ta terminate process
-.Ta real-time timer expired
-.It Dv SIGTERM
-.Ta terminate process
-.Ta software termination signal
-.It Dv SIGURG
-.Ta discard signal
-.Ta urgent condition present on socket
-.It Dv SIGSTOP
-.Ta stop process
-.Ta stop (cannot be caught or ignored)
-.It Dv SIGTSTP
-.Ta stop process
-.Ta stop signal generated from keyboard
-.It Dv SIGCONT
-.Ta discard signal
-.Ta continue after stop
-.It Dv SIGCHLD
-.Ta discard signal
-.Ta child status has changed
-.It Dv SIGTTIN
-.Ta stop process
-.Ta background read attempted from control terminal
-.It Dv SIGTTOU
-.Ta stop process
-.Ta background write attempted to control terminal
-.It Dv SIGIO
-.Ta discard signal
-.Ta I/O is possible on a descriptor (see
-.Xr fcntl 2 )
-.It Dv SIGXCPU
-.Ta terminate process
-.Ta cpu time limit exceeded (see
-.Xr setrlimit 2 )
-.It Dv SIGXFSZ
-.Ta terminate process
-.Ta file size limit exceeded (see
-.Xr setrlimit 2 )
-.It Dv SIGVTALRM
-.Ta terminate process
-.Ta virtual time alarm (see
-.Xr setitimer 2 )
-.It Dv SIGPROF
-.Ta terminate process
-.Ta profiling timer alarm (see
-.Xr setitimer 2 )
-.It Dv SIGWINCH
-.Ta discard signal
-.Ta Window size change
-.It Dv SIGINFO
-.Ta discard signal
-.Ta status request from keyboard
-.It Dv SIGUSR1
-.Ta terminate process
-.Ta User defined signal 1
-.It Dv SIGUSR2
-.Ta terminate process
-.Ta User defined signal 2
+.It Sy NAME Ta Sy Default Action Ta Sy Description
+.It Dv SIGHUP Ta terminate process Ta terminal line hangup
+.It Dv SIGINT Ta terminate process Ta interrupt program
+.It Dv SIGQUIT Ta create core image Ta quit program
+.It Dv SIGILL Ta create core image Ta illegal instruction
+.It Dv SIGTRAP Ta create core image Ta trace trap
+.It Dv SIGABRT Ta create core image Ta Xr abort 3 call (formerly Dv SIGIOT )
+.It Dv SIGEMT Ta create core image Ta emulate instruction executed
+.It Dv SIGFPE Ta create core image Ta floating-point exception
+.It Dv SIGKILL Ta terminate process Ta kill program
+.It Dv SIGBUS Ta create core image Ta bus error
+.It Dv SIGSEGV Ta create core image Ta segmentation violation
+.It Dv SIGSYS Ta create core image Ta non-existent system call invoked
+.It Dv SIGPIPE Ta terminate process Ta write on a pipe with no reader
+.It Dv SIGALRM Ta terminate process Ta real-time timer expired
+.It Dv SIGTERM Ta terminate process Ta software termination signal
+.It Dv SIGURG Ta discard signal Ta urgent condition present on socket
+.It Dv SIGSTOP Ta stop process Ta stop (cannot be caught or ignored)
+.It Dv SIGTSTP Ta stop process Ta stop signal generated from keyboard
+.It Dv SIGCONT Ta discard signal Ta continue after stop
+.It Dv SIGCHLD Ta discard signal Ta child status has changed
+.It Dv SIGTTIN Ta stop process Ta background read attempted from control 
terminal
+.It Dv SIGTTOU Ta stop process Ta background write attempted to control 
terminal
+.It Dv SIGIO Ta discard signal Ta I/O is possible on a descriptor (see Xr 
fcntl 2 )
+.It Dv SIGXCPU Ta terminate process Ta cpu time limit exceeded (see  setrlimit 
2 )
+.It Dv SIGXFSZ Ta terminate process Ta file size limit exceeded (see  
setrlimit 2 )
+.It Dv SIGVTALRM Ta terminate process Ta virtual time alarm (see  setitimer 2 )
+.It Dv SIGPROF Ta terminate process Ta profiling timer alarm (see  setitimer 2 
)
+.It Dv SIGWINCH Ta disc

Re: svn commit: r306488 - head/lib/libc/sys

2016-09-30 Thread Dag-Erling Smørgrav
Dag-Erling Smørgrav  writes:
> Log:
>   Format the table correctly, using cell separators instead of relying
>   on *roff or mandoc to guess where one cell ends and the next begins.

So apparently, the old version works with *roff but not with mandoc,
while the new version works with mandoc but not *roff.  Since mandoc is
the default in 11+, I'll leave this in while I consult with the authors
of mandoc.

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
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: r306493 - head/sys/arm/conf

2016-09-30 Thread Emmanuel Vadot
Author: manu
Date: Fri Sep 30 10:46:27 2016
New Revision: 306493
URL: https://svnweb.freebsd.org/changeset/base/306493

Log:
  Add support for RPI2 to the armv6 GENERIC kernel.

Modified:
  head/sys/arm/conf/GENERIC

Modified: head/sys/arm/conf/GENERIC
==
--- head/sys/arm/conf/GENERIC   Fri Sep 30 10:22:50 2016(r306492)
+++ head/sys/arm/conf/GENERIC   Fri Sep 30 10:46:27 2016(r306493)
@@ -33,6 +33,8 @@ files "../allwinner/a20/files.a20"
 files  "../allwinner/a31/files.a31"
 files  "../allwinner/a83t/files.a83t"
 files  "../allwinner/h3/files.h3"
+files  "../broadcom/bcm2835/files.bcm2836"
+files  "../broadcom/bcm2835/files.bcm283x"
 files  "../nvidia/tegra124/files.tegra124"
 files  "../qemu/files.qemu"
 
@@ -41,6 +43,7 @@ options   SOC_ALLWINNER_A31
 optionsSOC_ALLWINNER_A31S
 optionsSOC_ALLWINNER_A83T
 optionsSOC_ALLWINNER_H3
+optionsSOC_BCM2836
 
 optionsSCHED_ULE   # ULE scheduler
 optionsSMP # Enable multiple cores
@@ -103,12 +106,17 @@ devicetwsi
 device rsb
 device axp209  # AXP209 Power Management Unit
 device axp81x  # AXP813/818 Power Management Unit
+device bcm2835_bsc
 device icee
 
 # GPIO
 device gpio
 device gpioled
 
+# SPI
+device spibus
+device bcm2835_spi
+
 device scbus   # SCSI bus (required for ATA/SCSI)
 device da  # Direct Access (disks)
 device cd  # CD
@@ -120,6 +128,7 @@ device  usb
 #deviceuhci
 device ohci
 device ehci
+device dwcotg  # DWC OTG controller
 
 device umass   # Disks/Mass storage - Requires scbus 
and da
 device uhid# "Human Interface Devices"
@@ -137,6 +146,8 @@ device  dwc # 10/100/1000 
integrated G
 device awg # 10/100/1000 integrated EMAC controller
 
 # USB ethernet support, requires miibus
+device smcphy
+device smsc
 device miibus
 
 # Sound support
@@ -148,6 +159,7 @@ device  kbdmux
 device ums
 device videomode
 device hdmi
+device vchiq
 
 # Pinmux
 device fdt_pinctrl
@@ -157,4 +169,4 @@ options EFI
 
 # Flattened Device Tree
 optionsFDT # Configure using FDT/DTB data
-makeoptionsMODULES_EXTRA=dtb/allwinner
+makeoptionsMODULES_EXTRA="dtb/allwinner dtb/rpi"
___
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: r306492 - head/sys/arm/conf

2016-09-30 Thread Andrew Turner
Author: andrew
Date: Fri Sep 30 10:22:50 2016
New Revision: 306492
URL: https://svnweb.freebsd.org/changeset/base/306492

Log:
  Remove the duplicate ukbd device from the armv6 GENERIC
  
  Sponsored by: ABT Systems Ltd

Modified:
  head/sys/arm/conf/GENERIC

Modified: head/sys/arm/conf/GENERIC
==
--- head/sys/arm/conf/GENERIC   Fri Sep 30 10:21:04 2016(r306491)
+++ head/sys/arm/conf/GENERIC   Fri Sep 30 10:22:50 2016(r306492)
@@ -146,7 +146,6 @@ device  sound
 device vt
 device kbdmux
 device ums
-device ukbd
 device videomode
 device hdmi
 
___
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: r306491 - in head/sys/arm: broadcom/bcm2835 conf

2016-09-30 Thread Emmanuel Vadot
Author: manu
Date: Fri Sep 30 10:21:04 2016
New Revision: 306491
URL: https://svnweb.freebsd.org/changeset/base/306491

Log:
  RPI2: Add support for MULTIDELAY, this is needed for inclusion into GENERIC.

Modified:
  head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c
  head/sys/arm/conf/RPI2

Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c
==
--- head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Fri Sep 30 10:20:53 
2016(r306490)
+++ head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Fri Sep 30 10:21:04 
2016(r306491)
@@ -147,5 +147,5 @@ static platform_method_t bcm2836_methods
 
PLATFORMMETHOD_END,
 };
-FDT_PLATFORM_DEF(bcm2836, "bcm2836", 0, "brcm,bcm2709", 0);
+FDT_PLATFORM_DEF(bcm2836, "bcm2836", 0, "brcm,bcm2709", 100);
 #endif

Modified: head/sys/arm/conf/RPI2
==
--- head/sys/arm/conf/RPI2  Fri Sep 30 10:20:53 2016(r306490)
+++ head/sys/arm/conf/RPI2  Fri Sep 30 10:21:04 2016(r306491)
@@ -30,6 +30,7 @@ options   SCHED_ULE   # ULE scheduler
 optionsSMP # Enable multiple cores
 optionsPLATFORM
 optionsPLATFORM_SMP
+optionsMULTIDELAY
 
 # NFS root from boopt/dhcp
 #options   BOOTP
___
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: r306490 - head/sys/arm/conf

2016-09-30 Thread Andrew Turner
Author: andrew
Date: Fri Sep 30 10:20:53 2016
New Revision: 306490
URL: https://svnweb.freebsd.org/changeset/base/306490

Log:
  Add support for Tegra to the armv6 GENERIC kernel.
  
  Reviewed by:  imp, mmel
  Sponsored by: ABT Systems Ltd
  Differential Revision:https://reviews.freebsd.org/D8084

Modified:
  head/sys/arm/conf/GENERIC

Modified: head/sys/arm/conf/GENERIC
==
--- head/sys/arm/conf/GENERIC   Fri Sep 30 10:00:57 2016(r306489)
+++ head/sys/arm/conf/GENERIC   Fri Sep 30 10:20:53 2016(r306490)
@@ -33,6 +33,7 @@ files "../allwinner/a20/files.a20"
 files  "../allwinner/a31/files.a31"
 files  "../allwinner/a83t/files.a83t"
 files  "../allwinner/h3/files.h3"
+files  "../nvidia/tegra124/files.tegra124"
 files  "../qemu/files.qemu"
 
 optionsSOC_ALLWINNER_A20
@@ -46,6 +47,7 @@ options   SMP # Enable multiple cores
 optionsPLATFORM
 optionsPLATFORM_SMP
 optionsMULTIDELAY
+optionsLINUX_BOOT_ABI
 
 # EXT_RESOURCES pseudo devices
 optionsEXT_RESOURCES
@@ -62,6 +64,7 @@ devicegic
 device generic_timer
 
 # MMC/SD/SDIO Card slot support
+device sdhci   # SD controller
 device mmc # mmc/sd bus
 device mmcsd   # mmc/sd flash cards
 
@@ -69,6 +72,13 @@ device   mmcsd   # mmc/sd flash 
cards
 device ahci# AHCI-compatible SATA controllers
 #deviceata # Legacy ATA/SATA controllers
 
+# PCI
+optionsNEW_PCIB
+device pci
+
+# PCI NICs
+device re  # RealTek 8139C+/8169/8169S/8110S
+
 # VirtIO
 device virtio
 device virtio_mmio
@@ -77,11 +87,12 @@ device  vtnet
 
 # Console and misc
 device uart
+device uart_ns8250
 device uart_snps
 device pl011
 device pty
 device snp
-device md
+device md  # Memory "disks"
 device random  # Entropy device
 device psci
 
@@ -92,6 +103,7 @@ device   twsi
 device rsb
 device axp209  # AXP209 Power Management Unit
 device axp81x  # AXP813/818 Power Management Unit
+device icee
 
 # GPIO
 device gpio
@@ -99,6 +111,7 @@ device   gpioled
 
 device scbus   # SCSI bus (required for ATA/SCSI)
 device da  # Direct Access (disks)
+device cd  # CD
 device pass# Passthrough device (direct ATA/SCSI 
access)
 
 # USB support
@@ -108,11 +121,14 @@ deviceusb
 device ohci
 device ehci
 
-device umass
+device umass   # Disks/Mass storage - Requires scbus 
and da
+device uhid# "Human Interface Devices"
+device ukbd# Allow keyboard like HIDs to control 
console
 
 # Ethernet
 device loop
 device ether
+device vlan# 802.1Q VLAN support
 device mii
 device bpf
 
___
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: r306489 - head/sys/arm/broadcom/bcm2835

2016-09-30 Thread Emmanuel Vadot
Author: manu
Date: Fri Sep 30 10:00:57 2016
New Revision: 306489
URL: https://svnweb.freebsd.org/changeset/base/306489

Log:
  bcm2835_cpufreq: Only attach driver if we correcly match on the machine
  compatible string.

Modified:
  head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c

Modified: head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c
==
--- head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Fri Sep 30 09:23:29 
2016(r306488)
+++ head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Fri Sep 30 10:00:57 
2016(r306489)
@@ -44,6 +44,11 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
+
+#include 
+#include 
+
 #include 
 #include 
 #include 
@@ -119,6 +124,13 @@ struct bcm2835_cpufreq_softc {
struct intr_config_hook init_hook;
 };
 
+static struct ofw_compat_data compat_data[] = {
+   { "broadcom,bcm2835-vc",1 },
+   { "broadcom,bcm2708-vc",1 },
+   { "brcm,bcm2709",   1 },
+   { NULL, 0 }
+};
+
 static int cpufreq_verbose = 0;
 TUNABLE_INT("hw.bcm2835.cpufreq.verbose", &cpufreq_verbose);
 static int cpufreq_lowest_freq = DEFAULT_LOWEST_FREQ;
@@ -1244,6 +1256,16 @@ bcm2835_cpufreq_init(void *arg)
 static void
 bcm2835_cpufreq_identify(driver_t *driver, device_t parent)
 {
+   const struct ofw_compat_data *compat;
+   phandle_t root;
+
+   root = OF_finddevice("/");
+   for (compat = compat_data; compat->ocd_str != NULL; compat++)
+   if (fdt_is_compatible(root, compat->ocd_str))
+   break;
+
+   if (compat->ocd_data == 0)
+   return;
 
DPRINTF("driver=%p, parent=%p\n", driver, parent);
if (device_find_child(parent, "bcm2835_cpufreq", -1) != 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: r306488 - head/lib/libc/sys

2016-09-30 Thread Dag-Erling Smørgrav
Author: des
Date: Fri Sep 30 09:23:29 2016
New Revision: 306488
URL: https://svnweb.freebsd.org/changeset/base/306488

Log:
  Format the table correctly, using cell separators instead of relying
  on *roff or mandoc to guess where one cell ends and the next begins.
  
  MFC after:1 week

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

Modified: head/lib/libc/sys/sigaction.2
==
--- head/lib/libc/sys/sigaction.2   Fri Sep 30 09:20:44 2016
(r306487)
+++ head/lib/libc/sys/sigaction.2   Fri Sep 30 09:23:29 2016
(r306488)
@@ -307,46 +307,109 @@ The following is a list of all signals
 with names as in the include file
 .In signal.h :
 .Bl -column SIGVTALARMXX "create core imagexxx"
-.It Sy "NAME   Default Action  Description"
-.It Dv SIGHUP No " terminate process" "terminal line hangup"
-.It Dv SIGINT No " terminate process" "interrupt program"
-.It Dv SIGQUIT No "create core image" "quit program"
-.It Dv SIGILL No " create core image" "illegal instruction"
-.It Dv SIGTRAP No "create core image" "trace trap"
-.It Dv SIGABRT No "create core image" Ta Xr abort 3
+.It Sy NAME
+.Ta Sy Default Action
+.Ta Sy Description
+.It Dv SIGHUP
+.Ta terminate process
+.Ta terminal line hangup
+.It Dv SIGINT
+.Ta terminate process
+.Ta interrupt program
+.It Dv SIGQUIT
+.Ta create core image
+.Ta quit program
+.It Dv SIGILL
+.Ta create core image
+.Ta illegal instruction
+.It Dv SIGTRAP
+.Ta create core image
+.Ta trace trap
+.It Dv SIGABRT
+.Ta create core image
+.Ta Xr abort 3
 call (formerly
 .Dv SIGIOT )
-.It Dv SIGEMT No " create core image" "emulate instruction executed"
-.It Dv SIGFPE No " create core image" "floating-point exception"
-.It Dv SIGKILL No "terminate process" "kill program"
-.It Dv SIGBUS No " create core image" "bus error"
-.It Dv SIGSEGV No "create core image" "segmentation violation"
-.It Dv SIGSYS No " create core image" "non-existent system call 
invoked"
-.It Dv SIGPIPE No "terminate process" "write on a pipe with no reader"
-.It Dv SIGALRM No "terminate process" "real-time timer expired"
-.It Dv SIGTERM No "terminate process" "software termination signal"
-.It Dv SIGURG No " discard signal" "   urgent condition present on 
socket"
-.It Dv SIGSTOP No "stop process" " stop (cannot be caught or ignored)"
-.It Dv SIGTSTP No "stop process" " stop signal generated from keyboard"
-.It Dv SIGCONT No "discard signal" "   continue after stop"
-.It Dv SIGCHLD No "discard signal" "   child status has changed"
-.It Dv SIGTTIN No "stop process" " background read attempted from control 
terminal"
-.It Dv SIGTTOU No "stop process" " background write attempted to control 
terminal"
-.It Dv SIGIO No "  discard signal" Tn "I/O"
-is possible on a descriptor (see
+.It Dv SIGEMT
+.Ta create core image
+.Ta emulate instruction executed
+.It Dv SIGFPE
+.Ta create core image
+.Ta floating-point exception
+.It Dv SIGKILL
+.Ta terminate process
+.Ta kill program
+.It Dv SIGBUS
+.Ta create core image
+.Ta bus error
+.It Dv SIGSEGV
+.Ta create core image
+.Ta segmentation violation
+.It Dv SIGSYS
+.Ta create core image
+.Ta non-existent system call invoked
+.It Dv SIGPIPE
+.Ta terminate process
+.Ta write on a pipe with no reader
+.It Dv SIGALRM
+.Ta terminate process
+.Ta real-time timer expired
+.It Dv SIGTERM
+.Ta terminate process
+.Ta software termination signal
+.It Dv SIGURG
+.Ta discard signal
+.Ta urgent condition present on socket
+.It Dv SIGSTOP
+.Ta stop process
+.Ta stop (cannot be caught or ignored)
+.It Dv SIGTSTP
+.Ta stop process
+.Ta stop signal generated from keyboard
+.It Dv SIGCONT
+.Ta discard signal
+.Ta continue after stop
+.It Dv SIGCHLD
+.Ta discard signal
+.Ta child status has changed
+.It Dv SIGTTIN
+.Ta stop process
+.Ta background read attempted from control terminal
+.It Dv SIGTTOU
+.Ta stop process
+.Ta background write attempted to control terminal
+.It Dv SIGIO
+.Ta discard signal
+.Ta I/O is possible on a descriptor (see
 .Xr fcntl 2 )
-.It Dv SIGXCPU No "terminate process" "cpu time limit exceeded (see"
+.It Dv SIGXCPU
+.Ta terminate process
+.Ta cpu time limit exceeded (see
 .Xr setrlimit 2 )
-.It Dv SIGXFSZ No "terminate process" "file size limit exceeded (see"
+.It Dv SIGXFSZ
+.Ta terminate process
+.Ta file size limit exceeded (see
 .Xr setrlimit 2 )
-.It Dv SIGVTALRM No "  terminate process" "virtual time alarm (see"
+.It Dv SIGVTALRM
+.Ta terminate process
+.Ta virtual time alarm (see
 .Xr setitimer 2 )
-.It Dv SIGPROF No "terminate process" "profiling timer alarm (see"
+.It Dv SIGPROF
+.Ta terminate process
+.Ta profiling timer alarm (see
 .Xr setitimer 2 )
-.It Dv SIGWINCH No "   discard signal" "   Window size change"
-.It Dv SIGINFO No "discard signal" "   status request from keyboard"
-

svn commit: r306487 - in stable/11: targets/pseudo/userland usr.bin usr.bin/proccontrol

2016-09-30 Thread Konstantin Belousov
Author: kib
Date: Fri Sep 30 09:20:44 2016
New Revision: 306487
URL: https://svnweb.freebsd.org/changeset/base/306487

Log:
  MFC r306261:
  Add proccontrol(1).
  
  MFC r306281 (by bdrewery):
  DIRDEPS_BUILD: Connect new directories.

Added:
  stable/11/usr.bin/proccontrol/
 - copied from r306261, head/usr.bin/proccontrol/
  stable/11/usr.bin/proccontrol/Makefile.depend
 - copied unchanged from r306281, head/usr.bin/proccontrol/Makefile.depend
Modified:
  stable/11/targets/pseudo/userland/Makefile.depend
  stable/11/usr.bin/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/targets/pseudo/userland/Makefile.depend
==
--- stable/11/targets/pseudo/userland/Makefile.depend   Fri Sep 30 08:23:06 
2016(r306486)
+++ stable/11/targets/pseudo/userland/Makefile.depend   Fri Sep 30 09:20:44 
2016(r306487)
@@ -325,6 +325,7 @@ DIRDEPS+= \
usr.bin/pr \
usr.bin/printenv \
usr.bin/printf \
+   usr.bin/proccontrol \
usr.bin/procstat \
usr.bin/protect \
usr.bin/quota \

Modified: stable/11/usr.bin/Makefile
==
--- stable/11/usr.bin/Makefile  Fri Sep 30 08:23:06 2016(r306486)
+++ stable/11/usr.bin/Makefile  Fri Sep 30 09:20:44 2016(r306487)
@@ -122,6 +122,7 @@ SUBDIR= alias \
pr \
printenv \
printf \
+   proccontrol \
procstat \
protect \
rctl \

Copied: stable/11/usr.bin/proccontrol/Makefile.depend (from r306281, 
head/usr.bin/proccontrol/Makefile.depend)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/11/usr.bin/proccontrol/Makefile.depend   Fri Sep 30 09:20:44 
2016(r306487, copy of r306281, head/usr.bin/proccontrol/Makefile.depend)
@@ -0,0 +1,18 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+   gnu/lib/csu \
+   gnu/lib/libgcc \
+   include \
+   include/xlocale \
+   lib/${CSU_DIR} \
+   lib/libc \
+   lib/libcompiler_rt \
+
+
+.include 
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.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"


Re: svn commit: r306486 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/mlx4 sys/dev/mlx4/mlx4_core sys/dev/mlx4/mlx4_en sys/dev/mlx4/mlx4_ib sys/i386/conf sys/modules sys/modules/mlx4 sys/m

2016-09-30 Thread Sepherosa Ziehau
Nice! :)

On Fri, Sep 30, 2016 at 4:23 PM, Hans Petter Selasky
 wrote:
> Author: hselasky
> Date: Fri Sep 30 08:23:06 2016
> New Revision: 306486
> URL: https://svnweb.freebsd.org/changeset/base/306486
>
> Log:
>   Move the ConnectX-3 and ConnectX-2 driver from sys/ofed into sys/dev/mlx4
>   like other PCI network drivers. The sys/ofed directory is now mainly
>   reserved for generic infiniband code, with exception of the mthca driver.
>
>   - Add new manual page, mlx4en(4), describing how to configure and load
>   mlx4en.
>
>   - All relevant driver C-files are now prefixed mlx4, mlx4_en and
>   mlx4_ib respectivly to avoid object filename collisions when compiling
>   the kernel. This also fixes an issue with proper dependency file
>   generation for the C-files in question.
>
>   - Device mlxen is now device mlx4en and depends on device mlx4, see
>   mlx4en(4). Only the network device name remains unchanged.
>
>   - The mlx4 and mlx4en modules are now built by default on i386 and
>   amd64 targets. Only building the mlx4ib module depends on
>   WITH_OFED=YES .
>
>   Sponsored by: Mellanox Technologies
>
> Added:
>   head/share/man/man4/mlx4en.4   (contents, props changed)
>   head/sys/dev/mlx4/
>   head/sys/dev/mlx4/cmd.h
>  - copied unchanged from r306485, head/sys/ofed/include/linux/mlx4/cmd.h
>   head/sys/dev/mlx4/cq.h
>  - copied, changed from r306485, head/sys/ofed/include/linux/mlx4/cq.h
>   head/sys/dev/mlx4/device.h
>  - copied unchanged from r306485, 
> head/sys/ofed/include/linux/mlx4/device.h
>   head/sys/dev/mlx4/doorbell.h
>  - copied unchanged from r306485, 
> head/sys/ofed/include/linux/mlx4/doorbell.h
>   head/sys/dev/mlx4/driver.h
>  - copied, changed from r306485, head/sys/ofed/include/linux/mlx4/driver.h
>   head/sys/dev/mlx4/mlx4_core/
>   head/sys/dev/mlx4/mlx4_core/fw.h
>  - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/fw.h
>   head/sys/dev/mlx4/mlx4_core/icm.h
>  - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/icm.h
>   head/sys/dev/mlx4/mlx4_core/mlx4.h
>  - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mlx4.h
>   head/sys/dev/mlx4/mlx4_core/mlx4_alloc.c
>  - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/alloc.c
>   head/sys/dev/mlx4/mlx4_core/mlx4_catas.c
>  - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/catas.c
>   head/sys/dev/mlx4/mlx4_core/mlx4_cmd.c
>  - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/cmd.c
>   head/sys/dev/mlx4/mlx4_core/mlx4_cq.c
>  - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/cq.c
>   head/sys/dev/mlx4/mlx4_core/mlx4_eq.c
>  - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/eq.c
>   head/sys/dev/mlx4/mlx4_core/mlx4_fw.c
>  - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/fw.c
>   head/sys/dev/mlx4/mlx4_core/mlx4_icm.c
>  - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/icm.c
>   head/sys/dev/mlx4/mlx4_core/mlx4_intf.c
>  - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/intf.c
>   head/sys/dev/mlx4/mlx4_core/mlx4_main.c
>  - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/main.c
>   head/sys/dev/mlx4/mlx4_core/mlx4_mcg.c
>  - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mcg.c
>   head/sys/dev/mlx4/mlx4_core/mlx4_mr.c
>  - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mr.c
>   head/sys/dev/mlx4/mlx4_core/mlx4_pd.c
>  - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/pd.c
>   head/sys/dev/mlx4/mlx4_core/mlx4_port.c
>  - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/port.c
>   head/sys/dev/mlx4/mlx4_core/mlx4_profile.c
>  - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/profile.c
>   head/sys/dev/mlx4/mlx4_core/mlx4_qp.c
>  - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/qp.c
>   head/sys/dev/mlx4/mlx4_core/mlx4_reset.c
>  - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/reset.c
>   head/sys/dev/mlx4/mlx4_core/mlx4_resource_tracker.c
>  - copied, changed from r306485, 
> head/sys/ofed/drivers/net/mlx4/resource_tracker.c
>   head/sys/dev/mlx4/mlx4_core/mlx4_sense.c
>  - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/sense.c
>   head/sys/dev/mlx4/mlx4_core/mlx4_srq.c
>  - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/srq.c
>   head/sys/dev/mlx4/mlx4_core/mlx4_sys_tune.c
>  - copied unchanged from r306485, 
> head/sys/ofed/drivers/net/mlx4/sys_tune.c
>   head/sys/dev/mlx4/mlx4_en/
>   head/sys/dev/mlx4/mlx4_en/en.h
>  - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mlx4_en.h
>   head/sys/dev/mlx4/mlx4_en/en_port.h
>  - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/en_port.h
>   head/sys/dev/mlx4/mlx4_en/mlx4_en_cq.c
>  - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_cq.c
>   head/sy

svn commit: r306486 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/mlx4 sys/dev/mlx4/mlx4_core sys/dev/mlx4/mlx4_en sys/dev/mlx4/mlx4_ib sys/i386/conf sys/modules sys/modules/mlx4 sys/mo...

2016-09-30 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Sep 30 08:23:06 2016
New Revision: 306486
URL: https://svnweb.freebsd.org/changeset/base/306486

Log:
  Move the ConnectX-3 and ConnectX-2 driver from sys/ofed into sys/dev/mlx4
  like other PCI network drivers. The sys/ofed directory is now mainly
  reserved for generic infiniband code, with exception of the mthca driver.
  
  - Add new manual page, mlx4en(4), describing how to configure and load
  mlx4en.
  
  - All relevant driver C-files are now prefixed mlx4, mlx4_en and
  mlx4_ib respectivly to avoid object filename collisions when compiling
  the kernel. This also fixes an issue with proper dependency file
  generation for the C-files in question.
  
  - Device mlxen is now device mlx4en and depends on device mlx4, see
  mlx4en(4). Only the network device name remains unchanged.
  
  - The mlx4 and mlx4en modules are now built by default on i386 and
  amd64 targets. Only building the mlx4ib module depends on
  WITH_OFED=YES .
  
  Sponsored by: Mellanox Technologies

Added:
  head/share/man/man4/mlx4en.4   (contents, props changed)
  head/sys/dev/mlx4/
  head/sys/dev/mlx4/cmd.h
 - copied unchanged from r306485, head/sys/ofed/include/linux/mlx4/cmd.h
  head/sys/dev/mlx4/cq.h
 - copied, changed from r306485, head/sys/ofed/include/linux/mlx4/cq.h
  head/sys/dev/mlx4/device.h
 - copied unchanged from r306485, head/sys/ofed/include/linux/mlx4/device.h
  head/sys/dev/mlx4/doorbell.h
 - copied unchanged from r306485, 
head/sys/ofed/include/linux/mlx4/doorbell.h
  head/sys/dev/mlx4/driver.h
 - copied, changed from r306485, head/sys/ofed/include/linux/mlx4/driver.h
  head/sys/dev/mlx4/mlx4_core/
  head/sys/dev/mlx4/mlx4_core/fw.h
 - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/fw.h
  head/sys/dev/mlx4/mlx4_core/icm.h
 - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/icm.h
  head/sys/dev/mlx4/mlx4_core/mlx4.h
 - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mlx4.h
  head/sys/dev/mlx4/mlx4_core/mlx4_alloc.c
 - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/alloc.c
  head/sys/dev/mlx4/mlx4_core/mlx4_catas.c
 - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/catas.c
  head/sys/dev/mlx4/mlx4_core/mlx4_cmd.c
 - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/cmd.c
  head/sys/dev/mlx4/mlx4_core/mlx4_cq.c
 - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/cq.c
  head/sys/dev/mlx4/mlx4_core/mlx4_eq.c
 - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/eq.c
  head/sys/dev/mlx4/mlx4_core/mlx4_fw.c
 - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/fw.c
  head/sys/dev/mlx4/mlx4_core/mlx4_icm.c
 - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/icm.c
  head/sys/dev/mlx4/mlx4_core/mlx4_intf.c
 - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/intf.c
  head/sys/dev/mlx4/mlx4_core/mlx4_main.c
 - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/main.c
  head/sys/dev/mlx4/mlx4_core/mlx4_mcg.c
 - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mcg.c
  head/sys/dev/mlx4/mlx4_core/mlx4_mr.c
 - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mr.c
  head/sys/dev/mlx4/mlx4_core/mlx4_pd.c
 - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/pd.c
  head/sys/dev/mlx4/mlx4_core/mlx4_port.c
 - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/port.c
  head/sys/dev/mlx4/mlx4_core/mlx4_profile.c
 - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/profile.c
  head/sys/dev/mlx4/mlx4_core/mlx4_qp.c
 - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/qp.c
  head/sys/dev/mlx4/mlx4_core/mlx4_reset.c
 - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/reset.c
  head/sys/dev/mlx4/mlx4_core/mlx4_resource_tracker.c
 - copied, changed from r306485, 
head/sys/ofed/drivers/net/mlx4/resource_tracker.c
  head/sys/dev/mlx4/mlx4_core/mlx4_sense.c
 - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/sense.c
  head/sys/dev/mlx4/mlx4_core/mlx4_srq.c
 - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/srq.c
  head/sys/dev/mlx4/mlx4_core/mlx4_sys_tune.c
 - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/sys_tune.c
  head/sys/dev/mlx4/mlx4_en/
  head/sys/dev/mlx4/mlx4_en/en.h
 - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mlx4_en.h
  head/sys/dev/mlx4/mlx4_en/en_port.h
 - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/en_port.h
  head/sys/dev/mlx4/mlx4_en/mlx4_en_cq.c
 - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_cq.c
  head/sys/dev/mlx4/mlx4_en/mlx4_en_main.c
 - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_main.c
  head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c
 - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_netdev.c
  head/sys/dev/ml