svn commit: r289872 - head/usr.bin/mkdep

2015-10-23 Thread Bryan Drewery
Author: bdrewery
Date: Sat Oct 24 05:16:30 2015
New Revision: 289872
URL: https://svnweb.freebsd.org/changeset/base/289872

Log:
  Replace gcc reference with 'cc' and document the default ${CC}.
  
  MFC after:1 week

Modified:
  head/usr.bin/mkdep/mkdep.1

Modified: head/usr.bin/mkdep/mkdep.1
==
--- head/usr.bin/mkdep/mkdep.1  Sat Oct 24 05:00:20 2015(r289871)
+++ head/usr.bin/mkdep/mkdep.1  Sat Oct 24 05:16:30 2015(r289872)
@@ -28,7 +28,7 @@
 .\" @(#)mkdep.18.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd June 6, 1993
+.Dd October 23, 2015
 .Dt MKDEP 1
 .Os
 .Sh NAME
@@ -60,11 +60,13 @@ CFLAGS is the list of flags for the C co
 .Pp
 The user has the ability to change the preprocessor and preprocessor options
 used.
-For instance, to use gcc as the preprocessor and to ignore system
+For instance, to use
+.Sy cc
+as the preprocessor and to ignore system
 headers, one would use
 .Bd -literal -offset indent
 depend:
-   env MKDEP_CPP="gcc -E" MKDEP_CPP_OPTS=-MM mkdep \\
+   env MKDEP_CPP="cc -E" MKDEP_CPP_OPTS=-MM mkdep \\
${CFLAGS} ${SRCS}
 .Ed
 .Pp
@@ -101,6 +103,8 @@ module.
 Specifies the C compiler to use.
 The specified compiler is expected to have
 options consistent with the GNU C compiler.
+The default is
+.Sy cc .
 .It Ev MKDEP_CPP
 Specifies the preprocessor to use.
 The default is "${CC} -E".
___
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: r289871 - head/share/mk

2015-10-23 Thread Bryan Drewery
Author: bdrewery
Date: Sat Oct 24 05:00:20 2015
New Revision: 289871
URL: https://svnweb.freebsd.org/changeset/base/289871

Log:
  Sort properly.
  
  MFC after:1 week
  X-MFC-With:   r289870

Modified:
  head/share/mk/bsd.README

Modified: head/share/mk/bsd.README
==
--- head/share/mk/bsd.READMESat Oct 24 04:55:17 2015(r289870)
+++ head/share/mk/bsd.READMESat Oct 24 05:00:20 2015(r289871)
@@ -17,10 +17,10 @@ files.  In most cases it is only interes
 bsd.lib.mk.
 
 bsd.arch.inc.mk- includes arch-specific Makefile.$arch
-bsd.crunchgen.mk   - building crunched binaries using crunchgen(1)
 bsd.compiler.mk- defined based on current compiler
 bsd.confs.mk   - install of configuration files
 bsd.cpu.mk - sets CPU/arch-related variables (included from sys.mk)
+bsd.crunchgen.mk   - building crunched binaries using crunchgen(1)
 bsd.dep.mk - handle Makefile dependencies
 bsd.doc.mk - building troff system documents
 bsd.endian.mk  - TARGET_ENDIAN=1234(little) or 4321 (big) for target
___
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: r289870 - head/share/mk

2015-10-23 Thread Bryan Drewery
Author: bdrewery
Date: Sat Oct 24 04:55:17 2015
New Revision: 289870
URL: https://svnweb.freebsd.org/changeset/base/289870

Log:
  Add bsd.crunchgen.mk to bsd.README.
  
  MFC after:1 week

Modified:
  head/share/mk/bsd.README
  head/share/mk/bsd.crunchgen.mk

Modified: head/share/mk/bsd.README
==
--- head/share/mk/bsd.READMESat Oct 24 04:03:32 2015(r289869)
+++ head/share/mk/bsd.READMESat Oct 24 04:55:17 2015(r289870)
@@ -17,6 +17,7 @@ files.  In most cases it is only interes
 bsd.lib.mk.
 
 bsd.arch.inc.mk- includes arch-specific Makefile.$arch
+bsd.crunchgen.mk   - building crunched binaries using crunchgen(1)
 bsd.compiler.mk- defined based on current compiler
 bsd.confs.mk   - install of configuration files
 bsd.cpu.mk - sets CPU/arch-related variables (included from sys.mk)

Modified: head/share/mk/bsd.crunchgen.mk
==
--- head/share/mk/bsd.crunchgen.mk  Sat Oct 24 04:03:32 2015
(r289869)
+++ head/share/mk/bsd.crunchgen.mk  Sat Oct 24 04:55:17 2015
(r289870)
@@ -1,5 +1,7 @@
 #
 #
+# Generate crunched binaries using crunchgen(1).
+#
 # General notes:
 #
 # A number of Make variables are used to generate the crunchgen config file.
___
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: r289868 - head/share/mk

2015-10-23 Thread Bryan Drewery
Author: bdrewery
Date: Sat Oct 24 04:03:29 2015
New Revision: 289868
URL: https://svnweb.freebsd.org/changeset/base/289868

Log:
  Configs should not be under MK_INCLUDES control.
  
  'buildconfig' is connected to 'all', but 'installconfig' is only called
  manually.  There is not much need to conditionalize this file right
  now due to how it is hooked up and its impact on various build phases.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.confs.mk

Modified: head/share/mk/bsd.confs.mk
==
--- head/share/mk/bsd.confs.mk  Sat Oct 24 03:16:40 2015(r289867)
+++ head/share/mk/bsd.confs.mk  Sat Oct 24 04:03:29 2015(r289868)
@@ -4,7 +4,6 @@
 .error bsd.conf.mk cannot be included directly.
 .endif
 
-.if ${MK_INCLUDES} != "no"
 CONFGROUPS?=   CONFS
 
 .if !target(buildconfig)
@@ -83,5 +82,3 @@ _${group}INS: ${_${group}CONFS}
 STAGE_TARGETS+= stage_config
 .endif
 .endif
-
-.endif # ${MK_INCLUDES} != "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: r289869 - head/share/mk

2015-10-23 Thread Bryan Drewery
Author: bdrewery
Date: Sat Oct 24 04:03:32 2015
New Revision: 289869
URL: https://svnweb.freebsd.org/changeset/base/289869

Log:
  Slightly rework the comments and logic for default Clang/GCC.
  
  This is because the previous version was very obscure about the fact
  that despite having Clang "on by default" for architectures such as powerpc, 
it
  does not actually build due to the GCC it uses not having C++11 support.
  Using an external compiler that supports C++11 does allow this to work.
  This whole block should be rethought more given "on by default" is not
  really default without extra work which could actually be surprising for
  why Clang is showing up when using a newer GCC.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/share/mk/src.opts.mk

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Sat Oct 24 04:03:29 2015(r289868)
+++ head/share/mk/src.opts.mk   Sat Oct 24 04:03:32 2015(r289869)
@@ -210,21 +210,22 @@ __TT=${MACHINE}
 .endif
 
 .include 
-.if !${COMPILER_FEATURES:Mc++11}
-# If the compiler is not C++11 capable, disable clang and use gcc instead.
-__DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX
-__DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC
-.elif ${__T} == "aarch64" || ${__T} == "amd64" || ${__TT} == "arm" || \
-${__T} == "i386"
-# On x86 and arm, clang is enabled, and will be installed as the default cc.
+# If the compiler is not C++11 capable, disable Clang and use GCC instead.
+# This means that architectures that have GCC 4.2 as default can not
+# build Clang without using an external compiler.
+
+.if ${COMPILER_FEATURES:Mc++11} && (${__T} == "aarch64" || \
+${__T} == "amd64" || ${__TT} == "arm" || ${__T} == "i386")
+# Clang is enabled, and will be installed as the default /usr/bin/cc.
 __DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC
 __DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX
-.elif ${__T:Mpowerpc*}
-# On powerpc, clang is enabled, but gcc is installed as the default cc.
+.elif ${COMPILER_FEATURES:Mc++11} && ${__T:Mpowerpc*}
+# On powerpc, if an external compiler that supports C++11 is used as ${CC},
+# then Clang is enabled, but GCC is installed as the default /usr/bin/cc.
 __DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL GCC GCC_BOOTSTRAP GNUCXX
 __DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC
 .else
-# Everything else disables clang, and uses gcc instead.
+# Everything else disables Clang, and uses GCC instead.
 __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX
 __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC
 .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: r289867 - head/sys/sys

2015-10-23 Thread Mark Johnston
Author: markj
Date: Sat Oct 24 03:16:40 2015
New Revision: 289867
URL: https://svnweb.freebsd.org/changeset/base/289867

Log:
  Remove an erroneous semicolon.
  
  MFC after:3 days

Modified:
  head/sys/sys/_bitset.h

Modified: head/sys/sys/_bitset.h
==
--- head/sys/sys/_bitset.h  Sat Oct 24 03:14:36 2015(r289866)
+++ head/sys/sys/_bitset.h  Sat Oct 24 03:16:40 2015(r289867)
@@ -50,7 +50,7 @@
 #defineBITSET_DEFINE(t, _s)
\
 struct t { \
 long__bits[__bitset_words((_s))];  \
-};
+}
 
 #defineBITSET_T_INITIALIZER(x) 
\
{ .__bits = { 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: r289866 - head/cddl/contrib/opensolaris/tools/ctf/cvt

2015-10-23 Thread Mark Johnston
Author: markj
Date: Sat Oct 24 03:14:36 2015
New Revision: 289866
URL: https://svnweb.freebsd.org/changeset/base/289866

Log:
  DWARF emitted by clang 3.7 encodes array sizes using the DW_AT_count
  attribute rather than DW_AT_upper_bound. Teach ctfconvert about this so that
  array type sizes are encoded correctly.
  
  PR:   203772
  MFC after:1 week

Modified:
  head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c

Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
==
--- head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Sat Oct 24 03:01:47 
2015(r289865)
+++ head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Sat Oct 24 03:14:36 
2015(r289866)
@@ -683,6 +683,10 @@ tdesc_array_create(dwarf_t *dw, Dwarf_Di
ar->ad_nelems = uval + 1;
else if (die_signed(dw, dim, DW_AT_upper_bound, &sval, 0))
ar->ad_nelems = sval + 1;
+   else if (die_unsigned(dw, dim, DW_AT_count, &uval, 0))
+   ar->ad_nelems = uval;
+   else if (die_signed(dw, dim, DW_AT_count, &sval, 0))
+   ar->ad_nelems = sval;
else
ar->ad_nelems = 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: r289865 - head/sys/arm/arm

2015-10-23 Thread Ian Lepore
Author: ian
Date: Sat Oct 24 03:01:47 2015
New Revision: 289865
URL: https://svnweb.freebsd.org/changeset/base/289865

Log:
  A few more whitespace, style, and comment cleanups.  No functional changes.

Modified:
  head/sys/arm/arm/busdma_machdep-v6.c

Modified: head/sys/arm/arm/busdma_machdep-v6.c
==
--- head/sys/arm/arm/busdma_machdep-v6.cSat Oct 24 02:44:13 2015
(r289864)
+++ head/sys/arm/arm/busdma_machdep-v6.cSat Oct 24 03:01:47 2015
(r289865)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2012-2014 Ian Lepore
+ * Copyright (c) 2012-2015 Ian Lepore
  * Copyright (c) 2010 Mark Tinguely
  * Copyright (c) 2004 Olivier Houchard
  * Copyright (c) 2002 Peter Grehan
@@ -35,9 +35,6 @@ __FBSDID("$FreeBSD$");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include 
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
@@ -740,6 +737,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, in
 int
 bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map)
 {
+
if (STAILQ_FIRST(&map->bpages) != NULL || map->sync_count != 0) {
CTR3(KTR_BUSDMA, "%s: tag %p error %d",
__func__, dmat, EBUSY);
@@ -756,14 +754,13 @@ bus_dmamap_destroy(bus_dma_tag_t dmat, b
return (0);
 }
 
-
 /*
- * Allocate a piece of memory that can be efficiently mapped into
- * bus device space based on the constraints lited in the dma tag.
- * A dmamap to for use with dmamap_load is also allocated.
+ * Allocate a piece of memory that can be efficiently mapped into bus device
+ * space based on the constraints listed in the dma tag.  Returns a pointer to
+ * the allocated memory, and a pointer to an associated bus_dmamap.
  */
 int
-bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags,
+bus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddr, int flags,
 bus_dmamap_t *mapp)
 {
busdma_bufalloc_t ba;
@@ -829,8 +826,6 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi
mflags, 0, dmat->lowaddr, dmat->alignment, dmat->boundary,
memattr);
}
-
-
if (*vaddr == NULL) {
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
__func__, dmat, dmat->flags, ENOMEM);
@@ -850,8 +845,8 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi
 }
 
 /*
- * Free a piece of memory and it's allociated dmamap, that was allocated
- * via bus_dmamem_alloc.  Make the same choice for free/contigfree.
+ * Free a piece of memory that was allocated via bus_dmamem_alloc, along with
+ * its associated map.
  */
 void
 bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map)
@@ -1075,7 +1070,7 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat
sgsize)) {
sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK));
curaddr = add_bounce_page(dmat, map, 0, curaddr,
- sgsize);
+   sgsize);
} else {
if (map->sync_count > 0)
sl_end = VM_PAGE_TO_PHYS(sl->pages) +
@@ -1187,7 +1182,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm
if (map->pagesneeded != 0 && must_bounce(dmat, map, curaddr,
sgsize)) {
curaddr = add_bounce_page(dmat, map, kvaddr, curaddr,
- sgsize);
+   sgsize);
} else {
if (map->sync_count > 0) {
sl_pend = VM_PAGE_TO_PHYS(sl->pages) +
___
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: r289864 - head/sys/arm/arm

2015-10-23 Thread Ian Lepore
Author: ian
Date: Sat Oct 24 02:44:13 2015
New Revision: 289864
URL: https://svnweb.freebsd.org/changeset/base/289864

Log:
  Bring in all the new(-ish) statistics code from armv6.

Modified:
  head/sys/arm/arm/busdma_machdep.c

Modified: head/sys/arm/arm/busdma_machdep.c
==
--- head/sys/arm/arm/busdma_machdep.c   Sat Oct 24 02:23:15 2015
(r289863)
+++ head/sys/arm/arm/busdma_machdep.c   Sat Oct 24 02:44:13 2015
(r289864)
@@ -58,22 +58,22 @@ __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 
@@ -154,11 +154,42 @@ struct bounce_zone {
 static struct mtx bounce_lock;
 static int total_bpages;
 static int busdma_zonecount;
+static uint32_t tags_total;
+static uint32_t maps_total;
+static uint32_t maps_dmamem;
+static uint32_t maps_coherent;
+static counter_u64_t maploads_total;
+static counter_u64_t maploads_bounced;
+static counter_u64_t maploads_coherent;
+static counter_u64_t maploads_dmamem;
+static counter_u64_t maploads_mbuf;
+static counter_u64_t maploads_physmem;
+
 static STAILQ_HEAD(, bounce_zone) bounce_zone_list;
 
-static SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD, 0, "Busdma parameters");
+SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD, 0, "Busdma parameters");
+SYSCTL_UINT(_hw_busdma, OID_AUTO, tags_total, CTLFLAG_RD, &tags_total, 0,
+   "Number of active tags");
+SYSCTL_UINT(_hw_busdma, OID_AUTO, maps_total, CTLFLAG_RD, &maps_total, 0,
+   "Number of active maps");
+SYSCTL_UINT(_hw_busdma, OID_AUTO, maps_dmamem, CTLFLAG_RD, &maps_dmamem, 0,
+   "Number of active maps for bus_dmamem_alloc buffers");
+SYSCTL_UINT(_hw_busdma, OID_AUTO, maps_coherent, CTLFLAG_RD, &maps_coherent, 0,
+   "Number of active maps with BUS_DMA_COHERENT flag set");
+SYSCTL_COUNTER_U64(_hw_busdma, OID_AUTO, maploads_total, CTLFLAG_RD,
+&maploads_total, "Number of load operations performed");
+SYSCTL_COUNTER_U64(_hw_busdma, OID_AUTO, maploads_bounced, CTLFLAG_RD,
+&maploads_bounced, "Number of load operations that used bounce buffers");
+SYSCTL_COUNTER_U64(_hw_busdma, OID_AUTO, maploads_coherent, CTLFLAG_RD,
+&maploads_dmamem, "Number of load operations on BUS_DMA_COHERENT memory");
+SYSCTL_COUNTER_U64(_hw_busdma, OID_AUTO, maploads_dmamem, CTLFLAG_RD,
+&maploads_dmamem, "Number of load operations on bus_dmamem_alloc buffers");
+SYSCTL_COUNTER_U64(_hw_busdma, OID_AUTO, maploads_mbuf, CTLFLAG_RD,
+&maploads_mbuf, "Number of load operations for mbufs");
+SYSCTL_COUNTER_U64(_hw_busdma, OID_AUTO, maploads_physmem, CTLFLAG_RD,
+&maploads_physmem, "Number of load operations on physical buffers");
 SYSCTL_INT(_hw_busdma, OID_AUTO, total_bpages, CTLFLAG_RD, &total_bpages, 0,
-  "Total bounce pages");
+   "Total bounce pages");
 
 struct bus_dmamap {
struct bp_list  bpages;
@@ -211,6 +242,12 @@ static void
 busdma_init(void *dummy)
 {
 
+   maploads_total= counter_u64_alloc(M_WAITOK);
+   maploads_bounced  = counter_u64_alloc(M_WAITOK);
+   maploads_coherent = counter_u64_alloc(M_WAITOK);
+   maploads_dmamem   = counter_u64_alloc(M_WAITOK);
+   maploads_mbuf = counter_u64_alloc(M_WAITOK);
+   maploads_physmem  = counter_u64_alloc(M_WAITOK);
 
/* Create a cache of buffers in standard (cacheable) memory. */
standard_allocator = busdma_bufalloc_create("buffer",
@@ -455,27 +492,33 @@ bus_dma_tag_create(bus_dma_tag_t parent,
newtag->flags |= BUS_DMA_MIN_ALLOC_COMP;
} else
newtag->bounce_zone = NULL;
-   if (error != 0)
+
+   if (error != 0) {
free(newtag, M_BUSDMA);
-   else
+   } else {
+   atomic_add_32(&tags_total, 1);
*dmat = newtag;
+   }
CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d",
__func__, newtag, (newtag != NULL ? newtag->flags : 0), error);
-
return (error);
 }
 
 int
 bus_dma_tag_destroy(bus_dma_tag_t dmat)
 {
-#ifdef KTR
-   bus_dma_tag_t dmat_copy = dmat;
-#endif
+   bus_dma_tag_t dmat_copy;
+   int error;
+
+   error = 0;
+   dmat_copy = dmat;
 
if (dmat != NULL) {
 
-   if (dmat->map_count != 0)
-   return (EBUSY);
+   if (dmat->map_count != 0) {
+   error = EBUSY;
+   goto out;
+   }
 
while (dmat != NULL) {
bus_dma_tag_t parent;
@@ -483,6 +526,7 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat)
parent = dmat->parent;
atomic_subtract_int(&dmat->ref_count, 1);
if (dmat->ref_count == 0) {
+  

svn commit: r289863 - head/lib/libc/stdio

2015-10-23 Thread Andrey A. Chernov
Author: ache
Date: Sat Oct 24 02:23:15 2015
New Revision: 289863
URL: https://svnweb.freebsd.org/changeset/base/289863

Log:
  Since no room left in the _flags, reuse __SALC for O_APPEND.
  It helps to remove _fcntl() call from _ftello() and optimize seek position
  calculation in _swrite().
  
  MFC after:  3 weeks

Modified:
  head/lib/libc/stdio/fdopen.c
  head/lib/libc/stdio/fopen.c
  head/lib/libc/stdio/freopen.c
  head/lib/libc/stdio/ftell.c
  head/lib/libc/stdio/stdio.c

Modified: head/lib/libc/stdio/fdopen.c
==
--- head/lib/libc/stdio/fdopen.cSat Oct 24 02:18:14 2015
(r289862)
+++ head/lib/libc/stdio/fdopen.cSat Oct 24 02:23:15 2015
(r289863)
@@ -91,7 +91,10 @@ fdopen(int fd, const char *mode)
 * O_APPEND bit set, assert __SAPP so that __swrite() caller
 * will _sseek() to the end before write.
 */
-   if ((oflags & O_APPEND) && !(fdflags & O_APPEND))
+   /* XXX: Reuse __SALC for O_APPEND. */
+   if (fdflags & O_APPEND)
+   fp->_flags |= __SALC;
+   else if (oflags & O_APPEND)
fp->_flags |= __SAPP;
fp->_file = fd;
fp->_cookie = fp;

Modified: head/lib/libc/stdio/fopen.c
==
--- head/lib/libc/stdio/fopen.c Sat Oct 24 02:18:14 2015(r289862)
+++ head/lib/libc/stdio/fopen.c Sat Oct 24 02:23:15 2015(r289863)
@@ -91,7 +91,10 @@ fopen(const char * __restrict file, cons
 * we can do about this.  (We could set __SAPP and check in
 * fseek and ftell.)
 */
-   if (oflags & O_APPEND)
+   if (oflags & O_APPEND) {
+   /* XXX: Reuse __SALC for O_APPEND. */
+   fp->_flags |= __SALC;
(void)_sseek(fp, (fpos_t)0, SEEK_END);
+   }
return (fp);
 }

Modified: head/lib/libc/stdio/freopen.c
==
--- head/lib/libc/stdio/freopen.c   Sat Oct 24 02:18:14 2015
(r289862)
+++ head/lib/libc/stdio/freopen.c   Sat Oct 24 02:23:15 2015
(r289863)
@@ -240,8 +240,11 @@ finish:
 * we can do about this.  (We could set __SAPP and check in
 * fseek and ftell.)
 */
-   if (oflags & O_APPEND)
+   if (oflags & O_APPEND) {
+   /* XXX: Reuse __SALC for O_APPEND. */
+   fp->_flags |= __SALC;
(void) _sseek(fp, (fpos_t)0, SEEK_END);
+   }
FUNLOCKFILE(fp);
return (fp);
 }

Modified: head/lib/libc/stdio/ftell.c
==
--- head/lib/libc/stdio/ftell.c Sat Oct 24 02:18:14 2015(r289862)
+++ head/lib/libc/stdio/ftell.c Sat Oct 24 02:23:15 2015(r289863)
@@ -88,7 +88,6 @@ _ftello(FILE *fp, fpos_t *offset)
 {
fpos_t pos;
size_t n;
-   int dflags;
 
if (fp->_seek == NULL) {
errno = ESPIPE; /* historic practice */
@@ -120,21 +119,24 @@ _ftello(FILE *fp, fpos_t *offset)
if (HASUB(fp))
pos -= fp->_r;  /* Can be negative at this point. */
} else if ((fp->_flags & __SWR) && fp->_p != NULL) {
-   dflags = 0;
-   if (fp->_flags & __SAPP)
-   dflags = O_APPEND;
-   else if (fp->_file != -1 &&
-(dflags = _fcntl(fp->_file, F_GETFL)) < 0)
-   return (1);
-   if ((dflags & O_APPEND) &&
-   (pos = _sseek(fp, (fpos_t)0, SEEK_END)) == -1) {
-   if ((fp->_flags & __SOPT) || __sflush(fp) ||
-   (pos = _sseek(fp, (fpos_t)0, SEEK_CUR)) == -1)
-   return (1);
-   else {
-   *offset = pos;
-   return (0);
+   /* XXX: Reuse __SALC for O_APPEND. */
+   if (fp->_flags & (__SAPP|__SALC)) {
+   int serrno = errno;
+
+   errno = 0;
+   if ((pos = _sseek(fp, (fpos_t)0, SEEK_END)) == -1) {
+   if (errno == ESPIPE ||
+   (fp->_flags & __SOPT) || __sflush(fp) ||
+   (pos =
+   _sseek(fp, (fpos_t)0, SEEK_CUR)) == -1)
+   return (1);
+   else {
+   errno = serrno;
+   *offset = pos;
+   return (0);
+   }
}
+   errno = serrno;
}
/*
 * Writing.  Any buffered characters cause the

Modified:

svn commit: r289862 - head/sys/arm/arm

2015-10-23 Thread Ian Lepore
Author: ian
Date: Sat Oct 24 02:18:14 2015
New Revision: 289862
URL: https://svnweb.freebsd.org/changeset/base/289862

Log:
  Change the preallocation of a busdma segment mapping array from per-tag to
  per-map.  The per-tag scheme is not safe, and a mutex can't be used to
  protect it because the mapping routines can't sleep.  Code brought in
  from armv6 implementation.

Modified:
  head/sys/arm/arm/busdma_machdep.c

Modified: head/sys/arm/arm/busdma_machdep.c
==
--- head/sys/arm/arm/busdma_machdep.c   Sat Oct 24 01:39:31 2015
(r289861)
+++ head/sys/arm/arm/busdma_machdep.c   Sat Oct 24 02:18:14 2015
(r289862)
@@ -81,6 +81,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #defineMAX_BPAGES  64
+#defineMAX_DMA_SEGMENTS4096
 #defineBUS_DMA_COULD_BOUNCEBUS_DMA_BUS3
 #defineBUS_DMA_MIN_ALLOC_COMP  BUS_DMA_BUS4
 
@@ -111,13 +112,6 @@ struct bus_dma_tag {
 */
struct arm32_dma_range  *ranges;
int _nranges;
-   /*
-* Most tags need one or two segments, and can use the local tagsegs
-* array.  For tags with a larger limit, we'll allocate a bigger array
-* on first use.
-*/
-   bus_dma_segment_t   *segments;
-   bus_dma_segment_t   tagsegs[2];
 };
 
 struct bounce_page {
@@ -175,20 +169,19 @@ struct bus_dmamap {
bus_dmamap_callback_t   *callback;
void*callback_arg;
int flags;
-#defineDMAMAP_COHERENT 0x8
-#defineDMAMAP_CACHE_ALIGNED0x10
+#defineDMAMAP_COHERENT (1 << 0)
+#defineDMAMAP_DMAMEM_ALLOC (1 << 1)
+#defineDMAMAP_MBUF (1 << 2)
+#defineDMAMAP_CACHE_ALIGNED(1 << 3)
STAILQ_ENTRY(bus_dmamap) links;
+   bus_dma_segment_t   *segments;
int sync_count;
-   struct sync_list*slist;
+   struct sync_listslist[];
 };
 
 static STAILQ_HEAD(, bus_dmamap) bounce_map_waitinglist;
 static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist;
 
-static struct mtx busdma_mtx;
-
-MTX_SYSINIT(busdma_mtx, &busdma_mtx, "busdma lock", MTX_DEF);
-
 static void init_bounce_pages(void *dummy);
 static int alloc_bounce_zone(bus_dma_tag_t dmat);
 static int alloc_bounce_pages(bus_dma_tag_t dmat, u_int numpages);
@@ -208,57 +201,16 @@ bus_dma_tag_t arm_root_dma_tag;
  * Begin block of code useful to transplant to other implementations.
  */
 
-static uma_zone_t dmamap_zone; /* Cache of struct bus_dmamap items */
-
 static busdma_bufalloc_t coherent_allocator;   /* Cache of coherent buffers */
 static busdma_bufalloc_t standard_allocator;   /* Cache of standard buffers */
 
 MALLOC_DEFINE(M_BUSDMA, "busdma", "busdma metadata");
 MALLOC_DEFINE(M_BOUNCE, "bounce", "busdma bounce pages");
 
-/*
- * This is the ctor function passed to uma_zcreate() for the pool of dma maps.
- * It'll need platform-specific changes if this code is copied.
- */
-static int
-dmamap_ctor(void *mem, int size, void *arg, int flags)
-{
-   bus_dmamap_t map;
-   bus_dma_tag_t dmat;
-
-   map = (bus_dmamap_t)mem;
-   dmat = (bus_dma_tag_t)arg;
-
-   dmat->map_count++;
-
-   map->dmat = dmat;
-   map->flags = 0;
-   STAILQ_INIT(&map->bpages);
-
-   return (0);
-}
-
-/*
- * This is the dtor function passed to uma_zcreate() for the pool of dma maps.
- * It may need platform-specific changes if this code is copied  .
- */
-static void
-dmamap_dtor(void *mem, int size, void *arg)
-{
-   bus_dmamap_t map;
-
-   map = (bus_dmamap_t)mem;
-
-   map->dmat->map_count--;
-}
-
 static void
 busdma_init(void *dummy)
 {
 
-   /* Create a cache of maps for bus_dmamap_create(). */
-   dmamap_zone = uma_zcreate("dma maps", sizeof(struct bus_dmamap),
-   dmamap_ctor, dmamap_dtor, NULL, NULL, UMA_ALIGN_PTR, 0);
 
/* Create a cache of buffers in standard (cacheable) memory. */
standard_allocator = busdma_bufalloc_create("buffer",
@@ -280,11 +232,11 @@ busdma_init(void *dummy)
 
 /*
  * This init historically used SI_SUB_VM, but now the init code requires
- * malloc(9) using M_BUSDMA memory, which is set up later than SI_SUB_VM, by
- * SI_SUB_KMEM and SI_ORDER_THIRD, so we'll go right after that by using
- * SI_SUB_KMEM and SI_ORDER_FOURTH.
+ * malloc(9) using M_BUSDMA memory and the pcpu zones for counter(9), which get
+ * set up by SI_SUB_KMEM and SI_ORDER_LAST, so we'll go right after that by
+ * using SI_SUB_KMEM+1.
  */
-SYSINIT(busdma, SI_SUB_KMEM, SI_ORDER_FOURTH, busdma_init, NULL);
+SYSINIT(busdma, SI_SUB_KMEM+1, SI_ORDER_FIRST, busdma_init, NULL);
 
 /*
  * End block of code useful to transplant to other implementations.
@@ -406,8 +358,6 @@ dflt_lock(void *arg, bus_dma_lock_op_t o
 /*
  * Allocate a device specific dma_tag.
  */
-#define SEG_NB 1

svn commit: r289861 - head

2015-10-23 Thread Bryan Drewery
Author: bdrewery
Date: Sat Oct 24 01:39:31 2015
New Revision: 289861
URL: https://svnweb.freebsd.org/changeset/base/289861

Log:
  native-xtools: Replace common path with NXBDESTDIR.
  
  Also combine some mkdir calls.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Fri Oct 23 23:24:03 2015(r289860)
+++ head/Makefile.inc1  Sat Oct 24 01:39:31 2015(r289861)
@@ -1620,12 +1620,13 @@ cross-tools: .MAKE .PHONY
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install
 .endfor
 
+NXBDESTDIR=${OBJTREE}/nxb-bin
 NXBENV=MAKEOBJDIRPREFIX=${OBJTREE}/nxb \
INSTALL="sh ${.CURDIR}/tools/install.sh" \
PATH=${PATH}:${OBJTREE}/gperf_for_gcc/usr/bin
 NXBMAKE=   ${NXBENV} ${MAKE} \
-   TBLGEN=${OBJTREE}/nxb-bin/usr/bin/tblgen \
-   CLANG_TBLGEN=${OBJTREE}/nxb-bin/usr/bin/clang-tblgen \
+   TBLGEN=${NXBDESTDIR}/usr/bin/tblgen \
+   CLANG_TBLGEN=${NXBDESTDIR}/usr/bin/clang-tblgen \
MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH} \
MK_GDB=no MK_TESTS=no \
SSP_CFLAGS= \
@@ -1650,16 +1651,14 @@ native-xtools: .PHONY
${NXBMAKE} DIRPRFX=${_gperf}/ all && \
${NXBMAKE} DIRPRFX=${_gperf}/ DESTDIR=${OBJTREE}/gperf_for_gcc install
 .endif
-   mkdir -p ${OBJTREE}/nxb-bin/bin
-   mkdir -p ${OBJTREE}/nxb-bin/sbin
-   mkdir -p ${OBJTREE}/nxb-bin/usr
+   mkdir -p ${NXBDESTDIR}/bin ${NXBDESTDIR}/sbin ${NXBDESTDIR}/usr
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
-   -p ${OBJTREE}/nxb-bin/usr >/dev/null
+   -p ${NXBDESTDIR}/usr >/dev/null
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
-   -p ${OBJTREE}/nxb-bin/usr/include >/dev/null
+   -p ${NXBDESTDIR}/usr/include >/dev/null
 .if ${MK_DEBUG_FILES} != "no"
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
-   -p ${OBJTREE}/nxb-bin/usr/lib >/dev/null
+   -p ${NXBDESTDIR}/usr/lib >/dev/null
 .endif
 .for _tool in \
 bin/cat \
@@ -1725,7 +1724,7 @@ native-xtools: .PHONY
${NXBMAKE} DIRPRFX=${_tool}/ obj && \
${NXBMAKE} DIRPRFX=${_tool}/ depend && \
${NXBMAKE} DIRPRFX=${_tool}/ all && \
-   ${NXBMAKE} DIRPRFX=${_tool}/ DESTDIR=${OBJTREE}/nxb-bin install
+   ${NXBMAKE} DIRPRFX=${_tool}/ DESTDIR=${NXBDESTDIR} install
 .endfor
 
 #
___
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: r289859 - head

2015-10-23 Thread Bryan Drewery
Author: bdrewery
Date: Fri Oct 23 23:07:45 2015
New Revision: 289859
URL: https://svnweb.freebsd.org/changeset/base/289859

Log:
  native-xtools: Fix build with WITH_DEBUG_FILES.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Fri Oct 23 22:52:00 2015(r289858)
+++ head/Makefile.inc1  Fri Oct 23 23:07:45 2015(r289859)
@@ -1657,6 +1657,10 @@ native-xtools: .PHONY
-p ${OBJTREE}/nxb-bin/usr >/dev/null
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
-p ${OBJTREE}/nxb-bin/usr/include >/dev/null
+.if ${MK_DEBUG_FILES} != "no"
+   mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
+   -p ${OBJTREE}/nxb-bin/usr/lib >/dev/null
+.endif
 .for _tool in \
 bin/cat \
 bin/chmod \
___
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: r289858 - head/sys/arm/arm

2015-10-23 Thread Ian Lepore
Author: ian
Date: Fri Oct 23 22:52:00 2015
New Revision: 289858
URL: https://svnweb.freebsd.org/changeset/base/289858

Log:
  Instead of all memory allocations using M_DEVBUF, use new categories
  M_BUSDMA for allocations of metadata (tags, maps, segment tracking lists),
  and M_BOUNCE for bounce pages.

Modified:
  head/sys/arm/arm/busdma_machdep-v6.c

Modified: head/sys/arm/arm/busdma_machdep-v6.c
==
--- head/sys/arm/arm/busdma_machdep-v6.cFri Oct 23 22:51:48 2015
(r289857)
+++ head/sys/arm/arm/busdma_machdep-v6.cFri Oct 23 22:52:00 2015
(r289858)
@@ -217,6 +217,10 @@ static void dma_dcache_sync(struct sync_
 
 static busdma_bufalloc_t coherent_allocator;   /* Cache of coherent buffers */
 static busdma_bufalloc_t standard_allocator;   /* Cache of standard buffers */
+
+MALLOC_DEFINE(M_BUSDMA, "busdma", "busdma metadata");
+MALLOC_DEFINE(M_BOUNCE, "bounce", "busdma bounce pages");
+
 static void
 busdma_init(void *dummy)
 {
@@ -260,7 +264,7 @@ busdma_init(void *dummy)
 
 /*
  * This init historically used SI_SUB_VM, but now the init code requires
- * malloc(9) using M_DEVBUF memory and the pcpu zones for counter(9), which get
+ * malloc(9) using M_BUSDMA memory and the pcpu zones for counter(9), which get
  * set up by SI_SUB_KMEM and SI_ORDER_LAST, so we'll go right after that by
  * using SI_SUB_KMEM+1.
  */
@@ -481,7 +485,7 @@ bus_dma_tag_create(bus_dma_tag_t parent,
/* Return a NULL tag on failure */
*dmat = NULL;
 
-   newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_DEVBUF,
+   newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_BUSDMA,
M_ZERO | M_NOWAIT);
if (newtag == NULL) {
CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d",
@@ -557,7 +561,7 @@ bus_dma_tag_create(bus_dma_tag_t parent,
maxsize = roundup2(maxsize, PAGE_SIZE) + PAGE_SIZE;
 
if ((error = alloc_bounce_zone(newtag)) != 0) {
-   free(newtag, M_DEVBUF);
+   free(newtag, M_BUSDMA);
return (error);
}
bz = newtag->bounce_zone;
@@ -577,7 +581,7 @@ bus_dma_tag_create(bus_dma_tag_t parent,
newtag->bounce_zone = NULL;
 
if (error != 0) {
-   free(newtag, M_DEVBUF);
+   free(newtag, M_BUSDMA);
} else {
atomic_add_32(&tags_total, 1);
*dmat = newtag;
@@ -610,7 +614,7 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat)
atomic_subtract_int(&dmat->ref_count, 1);
if (dmat->ref_count == 0) {
atomic_subtract_32(&tags_total, 1);
-   free(dmat, M_DEVBUF);
+   free(dmat, M_BUSDMA);
/*
 * Last reference count, so
 * release our reference
@@ -683,7 +687,7 @@ allocate_map(bus_dma_tag_t dmat, int mfl
dmat->nsegments, MAX_DMA_SEGMENTS));
segsize = sizeof(struct bus_dma_segment) * dmat->nsegments;
mapsize = sizeof(*map) + sizeof(struct sync_list) * dmat->nsegments;
-   map = malloc(mapsize + segsize, M_DEVBUF, mflags | M_ZERO);
+   map = malloc(mapsize + segsize, M_BUSDMA, mflags | M_ZERO);
if (map == NULL) {
CTR3(KTR_BUSDMA, "%s: tag %p error %d", __func__, dmat, ENOMEM);
return (NULL);
@@ -717,7 +721,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, in
 */
error = allocate_bz_and_pages(dmat, map);
if (error != 0) {
-   free(map, M_DEVBUF);
+   free(map, M_BUSDMA);
*mapp = NULL;
return (error);
}
@@ -746,7 +750,7 @@ bus_dmamap_destroy(bus_dma_tag_t dmat, b
if (map->flags & DMAMAP_COHERENT)
atomic_subtract_32(&maps_coherent, 1);
atomic_subtract_32(&maps_total, 1);
-   free(map, M_DEVBUF);
+   free(map, M_BUSDMA);
dmat->map_count--;
CTR2(KTR_BUSDMA, "%s: tag %p error 0", __func__, dmat);
return (0);
@@ -830,7 +834,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi
if (*vaddr == NULL) {
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
__func__, dmat, dmat->flags, ENOMEM);
-   free(map, M_DEVBUF);
+   free(map, M_BUSDMA);
*mapp = NULL;
return (ENOMEM);
}
@@ -873,7 +877,7 @@ bus_dmamem_free(bus_dma_tag_t dmat, void
atomic_subtract_32(&maps_coherent, 1);
atomic_subtract_32(&maps_total, 1);
atomic_subtract_32(&maps_dmamem, 1);
-   free(map, M_DEVBUF);
+   free(map, M_BUSDMA);
CTR3(KTR_BUSDMA, "%s: tag %p flags 0x%x", __func__, dmat, dmat->flags);
 }
 
@@ -1517,7 +1521,7 @@ alloc_bounce_zone

svn commit: r289857 - head/sys/arm/arm

2015-10-23 Thread Ian Lepore
Author: ian
Date: Fri Oct 23 22:51:48 2015
New Revision: 289857
URL: https://svnweb.freebsd.org/changeset/base/289857

Log:
  Instead of all memory allocations using M_DEVBUF, use new categories
  M_BUSDMA for allocations of metadata (tags, maps, segment tracking lists),
  and M_BOUNCE for bounce pages.

Modified:
  head/sys/arm/arm/busdma_machdep.c

Modified: head/sys/arm/arm/busdma_machdep.c
==
--- head/sys/arm/arm/busdma_machdep.c   Fri Oct 23 21:30:27 2015
(r289856)
+++ head/sys/arm/arm/busdma_machdep.c   Fri Oct 23 22:51:48 2015
(r289857)
@@ -213,6 +213,9 @@ static uma_zone_t dmamap_zone;  /* Cache 
 static busdma_bufalloc_t coherent_allocator;   /* Cache of coherent buffers */
 static busdma_bufalloc_t standard_allocator;   /* Cache of standard buffers */
 
+MALLOC_DEFINE(M_BUSDMA, "busdma", "busdma metadata");
+MALLOC_DEFINE(M_BOUNCE, "bounce", "busdma bounce pages");
+
 /*
  * This is the ctor function passed to uma_zcreate() for the pool of dma maps.
  * It'll need platform-specific changes if this code is copied.
@@ -277,7 +280,7 @@ busdma_init(void *dummy)
 
 /*
  * This init historically used SI_SUB_VM, but now the init code requires
- * malloc(9) using M_DEVBUF memory, which is set up later than SI_SUB_VM, by
+ * malloc(9) using M_BUSDMA memory, which is set up later than SI_SUB_VM, by
  * SI_SUB_KMEM and SI_ORDER_THIRD, so we'll go right after that by using
  * SI_SUB_KMEM and SI_ORDER_FOURTH.
  */
@@ -419,7 +422,7 @@ bus_dma_tag_create(bus_dma_tag_t parent,
if (!parent)
parent = arm_root_dma_tag;
 
-   newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_DEVBUF, M_NOWAIT);
+   newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_BUSDMA, M_NOWAIT);
if (newtag == NULL) {
CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d",
__func__, newtag, 0, error);
@@ -497,7 +500,7 @@ bus_dma_tag_create(bus_dma_tag_t parent,
/* Must bounce */
 
if ((error = alloc_bounce_zone(newtag)) != 0) {
-   free(newtag, M_DEVBUF);
+   free(newtag, M_BUSDMA);
return (error);
}
bz = newtag->bounce_zone;
@@ -516,7 +519,7 @@ bus_dma_tag_create(bus_dma_tag_t parent,
} else
newtag->bounce_zone = NULL;
if (error != 0)
-   free(newtag, M_DEVBUF);
+   free(newtag, M_BUSDMA);
else
*dmat = newtag;
CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d",
@@ -545,8 +548,8 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat)
if (dmat->ref_count == 0) {
if (dmat->segments != NULL &&
dmat->segments != dmat->tagsegs)
-   free(dmat->segments, M_DEVBUF);
-   free(dmat, M_DEVBUF);
+   free(dmat->segments, M_BUSDMA);
+   free(dmat, M_BUSDMA);
/*
 * Last reference count, so
 * release our reference
@@ -574,14 +577,14 @@ bus_dmamap_create(bus_dma_tag_t dmat, in
bus_dmamap_t map;
int error = 0;
 
-   slist = malloc(sizeof(*slist) * dmat->nsegments, M_DEVBUF, M_NOWAIT);
+   slist = malloc(sizeof(*slist) * dmat->nsegments, M_BUSDMA, M_NOWAIT);
if (slist == NULL)
return (ENOMEM);
 
map = uma_zalloc_arg(dmamap_zone, dmat, M_NOWAIT);
*mapp = map;
if (map == NULL) {
-   free(slist, M_DEVBUF);
+   free(slist, M_BUSDMA);
return (ENOMEM);
}
 
@@ -591,9 +594,9 @@ bus_dmamap_create(bus_dma_tag_t dmat, in
 */
if (dmat->segments == NULL) {
dmat->segments = malloc(dmat->nsegments *
-   sizeof(*dmat->segments), M_DEVBUF, M_NOWAIT);
+   sizeof(*dmat->segments), M_BUSDMA, M_NOWAIT);
if (dmat->segments == NULL) {
-   free(slist, M_DEVBUF);
+   free(slist, M_BUSDMA);
uma_zfree(dmamap_zone, map);
*mapp = NULL;
return (ENOMEM);
@@ -613,7 +616,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, in
 
if (dmat->bounce_zone == NULL) {
if ((error = alloc_bounce_zone(dmat)) != 0) {
-   free(slist, M_DEVBUF);
+   free(slist, M_BUSDMA);
uma_zfree(dmamap_zone, map);
*mapp = NULL;
return (error);
@@ -669,7 +672,7 @@ bus_dmamap_destroy(bus_dma_tag_t dmat, b
__func__, dmat, EBUSY

Re: svn commit: r289773 - in head: sbin/sysctl sys/kern sys/sys

2015-10-23 Thread Conrad Meyer
On Fri, Oct 23, 2015 at 2:56 PM, Ian Lepore  wrote:
> On Fri, 2015-10-23 at 14:43 -0700, Conrad Meyer wrote:
>> On Fri, Oct 23, 2015 at 2:06 PM, Mark Linimon 
>> wrote:
>> > On Fri, Oct 23, 2015 at 08:09:35AM -0700, Conrad Meyer wrote:
>> > > What is __FreeBSD_version and why would it be bumped?
>> >
>> > 
>> >
>> > This variable exists to tell the Ports Collection, among others,
>> > that "something has changed that may require you to patch and/or
>> > recompile."
>
> Another is making it possible to test for new features that
> arrived with a given version, and that's what you've done.
>
> Suppose I maintain an out-of-tree driver that has to build on several
> versions, and uint16 is really the right type for its sysctl but it
> also has to work on versions that don't have that support.  That tends
> to get handled with things like #if __FreeBSD_version < .
>  (Contrived example here maybe, since if uint32 worked on one version,
> I'd likely use it on all of versions.)

Suppose you did. The change lends itself to "#ifdef CTLTYPE_U16" — in
this truly contrived scenario. Any other check is redundant or less
specific. (As Ngie points out, checking an absolute version doesn't do
you a lot of good in the face of backports/cherry-picks.)

> One of the implications of the feature-availability testing is that
> when you MFC your change, you also have to bump the version number on
> that branch (independently, not via MFC).

Not a problem — the MFC After field was intentionally omitted (i.e.,
"MFC After: never"). This is only intended for CURRENT.

Best,
Conrad
___
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: r289773 - in head: sbin/sysctl sys/kern sys/sys

2015-10-23 Thread Ian Lepore
On Fri, 2015-10-23 at 14:43 -0700, Conrad Meyer wrote:
> On Fri, Oct 23, 2015 at 2:06 PM, Mark Linimon 
> wrote:
> > On Fri, Oct 23, 2015 at 08:09:35AM -0700, Conrad Meyer wrote:
> > > What is __FreeBSD_version and why would it be bumped?
> > 
> > 
> > 
> > This variable exists to tell the Ports Collection, among others,
> > that "something has changed that may require you to patch and/or
> > recompile."
> 
> Ok.  Nothing has changed that may require ports to patch and/or
> recompile, so I don't think this needs to be bumped.
> 
> Best,
> Conrad
> 

"ports need recompile" is only one of several reasons to bump the
version.  Another is making it possible to test for new features that
arrived with a given version, and that's what you've done.

Suppose I maintain an out-of-tree driver that has to build on several
versions, and uint16 is really the right type for its sysctl but it
also has to work on versions that don't have that support.  That tends
to get handled with things like #if __FreeBSD_version < . 
 (Contrived example here maybe, since if uint32 worked on one version,
I'd likely use it on all of versions.)

One of the implications of the feature-availability testing is that
when you MFC your change, you also have to bump the version number on
that branch (independently, not via MFC).

-- Ian
___
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: r289773 - in head: sbin/sysctl sys/kern sys/sys

2015-10-23 Thread Conrad Meyer
On Fri, Oct 23, 2015 at 2:06 PM, Mark Linimon  wrote:
> On Fri, Oct 23, 2015 at 08:09:35AM -0700, Conrad Meyer wrote:
>> What is __FreeBSD_version and why would it be bumped?
>
> 
>
> This variable exists to tell the Ports Collection, among others,
> that "something has changed that may require you to patch and/or
> recompile."

Ok.  Nothing has changed that may require ports to patch and/or
recompile, so I don't think this needs to be bumped.

Best,
Conrad
___
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: r289856 - head/share/mk

2015-10-23 Thread Bryan Drewery
Author: bdrewery
Date: Fri Oct 23 21:30:27 2015
New Revision: 289856
URL: https://svnweb.freebsd.org/changeset/base/289856

Log:
  Rework r289778 to always parallelize known targets, without ordering.
  
  - Rather than allow 'make clean*' to ignore dependencies, make a static
list of targets in STANDALONE_SUBDIR_TARGETS that are known to be safe.
This allows a user to override them if needed and avoids adding this feature
to user-defined targets that are in ${SUBDIR_TARGETS}. [1]
  - This now also allows to force SUBDIR_PARALLEL when calling these
targets, since no dependencies are needed.
  
  Reported by:  ian [1]
  Sponsored by: EMC / Isilon Storage Division
  MFC after:3 weeks
  X-MFC-With:   r289778

Modified:
  head/share/mk/bsd.subdir.mk

Modified: head/share/mk/bsd.subdir.mk
==
--- head/share/mk/bsd.subdir.mk Fri Oct 23 21:30:18 2015(r289855)
+++ head/share/mk/bsd.subdir.mk Fri Oct 23 21:30:27 2015(r289856)
@@ -28,6 +28,10 @@
 #  See ALL_SUBDIR_TARGETS for list of targets that will recurse.
 #  Custom targets can be added to SUBDIR_TARGETS in src.conf.
 #
+#  Targets defined in STANDALONE_SUBDIR_TARGETS will always be ran
+#  with SUBDIR_PARALLEL and will not respect .WAIT or SUBDIR_DEPEND_
+#  values.
+#
 
 .if !target()
 :
@@ -38,6 +42,10 @@ ALL_SUBDIR_TARGETS= all all-man buildcon
realinstall regress tags \
${SUBDIR_TARGETS}
 
+# Described above.
+STANDALONE_SUBDIR_TARGETS?= obj checkdpadd clean cleandepend cleandir \
+   cleanilinks cleanobj
+
 .include 
 
 .if !defined(NEED_SUBDIR)
@@ -83,19 +91,17 @@ ${SUBDIR:N.WAIT}: .PHONY .MAKE
dir=${.TARGET}; \
${_SUBDIR_SH};
 
-# .WAIT and dependencies can be skipped for some targets.
-.if defined(SUBDIR_PARALLEL)
-.if make(obj) || make(clean*)
-_skip_subdir_ordering= 1
-SUBDIR:=   ${SUBDIR:N.WAIT}
-.else
-_skip_subdir_ordering= 0
-.endif
-.endif # defined(SUBDIR_PARALLEL)
 # Work around parsing of .if nested in .for by putting .WAIT string into a var.
 __wait= .WAIT
 .for __target in ${ALL_SUBDIR_TARGETS}
-.ifdef SUBDIR_PARALLEL
+# Can ordering be skipped for this and SUBDIR_PARALLEL forced?
+.if make(${__target}) && ${STANDALONE_SUBDIR_TARGETS:M${__target}}
+_is_standalone_target= 1
+SUBDIR:=   ${SUBDIR:N.WAIT}
+.else
+_is_standalone_target= 0
+.endif
+.if defined(SUBDIR_PARALLEL) || ${_is_standalone_target} == 1
 __subdir_targets=
 .for __dir in ${SUBDIR}
 .if ${__wait} == ${__dir}
@@ -103,7 +109,7 @@ __subdir_targets+= .WAIT
 .else
 __subdir_targets+= ${__target}_subdir_${__dir}
 __deps=
-.if ${_skip_subdir_ordering} == 0
+.if ${_is_standalone_target} == 0
 .for __dep in ${SUBDIR_DEPEND_${__dir}}
 __deps+= ${__target}_subdir_${__dep}
 .endfor
@@ -115,12 +121,12 @@ ${__target}_subdir_${__dir}: .PHONY .MAK
${_SUBDIR_SH};
 .endif
 .endif
-.endfor
+.endfor# __dir in ${SUBDIR}
 ${__target}: ${__subdir_targets}
 .else
 ${__target}: _SUBDIR
-.endif
-.endfor
+.endif # SUBDIR_PARALLEL || _is_standalone_target
+.endfor# __target in ${ALL_SUBDIR_TARGETS}
 
 # This is to support 'make includes' calling 'make buildincludes' and
 # 'make installincludes' in the proper order, and to support these
___
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: r289855 - head/sys/dev/isp

2015-10-23 Thread Alexander Motin
Author: mav
Date: Fri Oct 23 21:30:18 2015
New Revision: 289855
URL: https://svnweb.freebsd.org/changeset/base/289855

Log:
  Minor additions to Status Type 0 IOCB.

Modified:
  head/sys/dev/isp/isp_library.c
  head/sys/dev/isp/ispmbox.h

Modified: head/sys/dev/isp/isp_library.c
==
--- head/sys/dev/isp/isp_library.c  Fri Oct 23 21:29:37 2015
(r289854)
+++ head/sys/dev/isp/isp_library.c  Fri Oct 23 21:30:18 2015
(r289855)
@@ -1158,7 +1158,7 @@ isp_get_24xx_response(ispsoftc_t *isp, i
ISP_IOXGET_32(isp, &src->req_resid, dst->req_resid);
ISP_IOXGET_16(isp, &src->req_reserved0, dst->req_reserved0);
ISP_IOXGET_16(isp, &src->req_state_flags, dst->req_state_flags);
-   ISP_IOXGET_16(isp, &src->req_reserved1, dst->req_reserved1);
+   ISP_IOXGET_16(isp, &src->req_retry_delay, dst->req_retry_delay);
ISP_IOXGET_16(isp, &src->req_scsi_status, dst->req_scsi_status);
ISP_IOXGET_32(isp, &src->req_fcp_residual, dst->req_fcp_residual);
ISP_IOXGET_32(isp, &src->req_sense_len, dst->req_sense_len);

Modified: head/sys/dev/isp/ispmbox.h
==
--- head/sys/dev/isp/ispmbox.h  Fri Oct 23 21:29:37 2015(r289854)
+++ head/sys/dev/isp/ispmbox.h  Fri Oct 23 21:30:18 2015(r289855)
@@ -632,7 +632,7 @@ typedef struct {
uint32_treq_resid;
uint16_treq_reserved0;
uint16_treq_state_flags;
-   uint16_treq_reserved1;
+   uint16_treq_retry_delay;/* aka Status Qualifier */
uint16_treq_scsi_status;
uint32_treq_fcp_residual;
uint32_treq_sense_len;
@@ -644,11 +644,12 @@ typedef struct {
  * For Qlogic 2X00, the high order byte of SCSI status has
  * additional meaning.
  */
-#defineRQCS_RU 0x800   /* Residual Under */
-#defineRQCS_RO 0x400   /* Residual Over */
+#defineRQCS_CR 0x1000  /* Confirmation Request */
+#defineRQCS_RU 0x0800  /* Residual Under */
+#defineRQCS_RO 0x0400  /* Residual Over */
 #defineRQCS_RESID  (RQCS_RU|RQCS_RO)
-#defineRQCS_SV 0x200   /* Sense Length Valid */
-#defineRQCS_RV 0x100   /* FCP Response Length Valid */
+#defineRQCS_SV 0x0200  /* Sense Length Valid */
+#defineRQCS_RV 0x0100  /* FCP Response Length Valid */
 
 /*
  * CT Passthru IOCB
___
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: r289854 - head/sys/arm/arm

2015-10-23 Thread Ian Lepore
Author: ian
Date: Fri Oct 23 21:29:37 2015
New Revision: 289854
URL: https://svnweb.freebsd.org/changeset/base/289854

Log:
  Catch up to r232356: change the boundary constraint type to bus_addr_t.
  This code lived in the projects/armv6 branch when that change got applied
  to all the other arches.

Modified:
  head/sys/arm/arm/busdma_machdep-v6.c

Modified: head/sys/arm/arm/busdma_machdep-v6.c
==
--- head/sys/arm/arm/busdma_machdep-v6.cFri Oct 23 21:09:28 2015
(r289853)
+++ head/sys/arm/arm/busdma_machdep-v6.cFri Oct 23 21:29:37 2015
(r289854)
@@ -76,7 +76,7 @@ struct bounce_zone;
 struct bus_dma_tag {
bus_dma_tag_t   parent;
bus_size_t  alignment;
-   bus_size_t  boundary;
+   bus_addr_t  boundary;
bus_addr_t  lowaddr;
bus_addr_t  highaddr;
bus_dma_filter_t*filter;
@@ -456,7 +456,7 @@ dflt_lock(void *arg, bus_dma_lock_op_t o
  */
 int
 bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
-bus_size_t boundary, bus_addr_t lowaddr, bus_addr_t highaddr,
+bus_addr_t boundary, bus_addr_t lowaddr, bus_addr_t highaddr,
 bus_dma_filter_t *filter, void *filterarg, bus_size_t maxsize,
 int nsegments, bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc,
 void *lockfuncarg, bus_dma_tag_t *dmat)
___
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: r289773 - in head: sbin/sysctl sys/kern sys/sys

2015-10-23 Thread NGie Cooper
On Fri, Oct 23, 2015 at 2:06 PM, Mark Linimon  wrote:
> On Fri, Oct 23, 2015 at 08:09:35AM -0700, Conrad Meyer wrote:
>> What is __FreeBSD_version and why would it be bumped?
>
> __FreeBSD_version was introduced in the following commit:
>
>   https://svnweb.freebsd.org/base/head/sys/sys/param.h?r1=34924&r2=36260
>
> where it has been ever since:
>
>   https://svnweb.freebsd.org/base/head/sys/sys/param.h?view=log
>
> This variable exists to tell the Ports Collection, among others,
> that "something has changed that may require you to patch and/or
> recompile."
>
> The historical values are documented in
>
>   
> https://www.freebsd.org/doc/en/books/porters-handbook/versions.html#freebsd-versions-table
>
> Your mentor should have shown you this information.

It's also really handy if you know that a KPI exists after `#if
__FreeBSD_version > XYZ`. It doesn't work for folks who cherry-pick
(like we do at $work, iXsystems with "NextBSD"/"TrueOS", etc), but it
works for some upstream folks -- especially when you have something
that uses a KPI in flux on a CURRENT branch for instance... *cough*
see open-vm-tools and breakage due to vm(4) APIs being in flux (
:/..).
___
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: r289853 - head/sys/modules/hwpmc

2015-10-23 Thread Ed Maste
Author: emaste
Date: Fri Oct 23 21:09:28 2015
New Revision: 289853
URL: https://svnweb.freebsd.org/changeset/base/289853

Log:
  Add aarch64 files to the hwpmc(4) module build
  
  This was probably missed because FreeBSD/arm64 did not yet support
  modules when aarch64 support was added to hwpmc(4).
  
  Submitted by: andrew

Modified:
  head/sys/modules/hwpmc/Makefile

Modified: head/sys/modules/hwpmc/Makefile
==
--- head/sys/modules/hwpmc/Makefile Fri Oct 23 21:01:46 2015
(r289852)
+++ head/sys/modules/hwpmc/Makefile Fri Oct 23 21:09:28 2015
(r289853)
@@ -8,6 +8,10 @@ KMOD=  hwpmc
 
 SRCS=  hwpmc_mod.c hwpmc_logging.c hwpmc_soft.c vnode_if.h
 
+.if ${MACHINE_CPUARCH} == "aarch64"
+SRCS+=  hwpmc_arm64.c hwpmc_arm64_md.c
+.endif
+
 .if ${MACHINE_CPUARCH} == "amd64"
 SRCS+= hwpmc_amd.c hwpmc_core.c hwpmc_intel.c hwpmc_piv.c hwpmc_tsc.c
 SRCS+= hwpmc_x86.c hwpmc_uncore.c
___
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: r289773 - in head: sbin/sysctl sys/kern sys/sys

2015-10-23 Thread Mark Linimon
On Fri, Oct 23, 2015 at 08:09:35AM -0700, Conrad Meyer wrote:
> What is __FreeBSD_version and why would it be bumped?

__FreeBSD_version was introduced in the following commit:

  https://svnweb.freebsd.org/base/head/sys/sys/param.h?r1=34924&r2=36260

where it has been ever since:

  https://svnweb.freebsd.org/base/head/sys/sys/param.h?view=log

This variable exists to tell the Ports Collection, among others,
that "something has changed that may require you to patch and/or
recompile."

The historical values are documented in

  
https://www.freebsd.org/doc/en/books/porters-handbook/versions.html#freebsd-versions-table

Your mentor should have shown you this information.

mcl
___
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: r289852 - head/sys/dev/isp

2015-10-23 Thread Alexander Motin
Author: mav
Date: Fri Oct 23 21:01:46 2015
New Revision: 289852
URL: https://svnweb.freebsd.org/changeset/base/289852

Log:
  Missed addition for r289812.

Modified:
  head/sys/dev/isp/isp_sbus.c

Modified: head/sys/dev/isp/isp_sbus.c
==
--- head/sys/dev/isp/isp_sbus.c Fri Oct 23 20:49:34 2015(r289851)
+++ head/sys/dev/isp/isp_sbus.c Fri Oct 23 21:01:46 2015(r289852)
@@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$");
 
 static uint32_t isp_sbus_rd_reg(ispsoftc_t *, int);
 static void isp_sbus_wr_reg(ispsoftc_t *, int, uint32_t);
-static int isp_sbus_rd_isr(ispsoftc_t *, uint32_t *, uint16_t *, uint16_t *);
+static int isp_sbus_rd_isr(ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *);
 static int isp_sbus_mbxdma(ispsoftc_t *);
 static int isp_sbus_dmasetup(ispsoftc_t *, XS_T *, void *);
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289851 - head/sys/arm/arm

2015-10-23 Thread Ian Lepore
Author: ian
Date: Fri Oct 23 20:49:34 2015
New Revision: 289851
URL: https://svnweb.freebsd.org/changeset/base/289851

Log:
  Whitespace and style nits, no functional changes.
  
  The goal is to make these two files cosmetically alike so that the actual
  implementation differences are visible.  The only changes which aren't
  spaces<->tabs and rewrapping and reindenting lines are a couple fields
  shuffled around in the tag and map structs so that everything is in the same
  order in both versions (which should amount to no functional change).

Modified:
  head/sys/arm/arm/busdma_machdep-v6.c
  head/sys/arm/arm/busdma_machdep.c

Modified: head/sys/arm/arm/busdma_machdep-v6.c
==
--- head/sys/arm/arm/busdma_machdep-v6.cFri Oct 23 19:49:41 2015
(r289850)
+++ head/sys/arm/arm/busdma_machdep-v6.cFri Oct 23 20:49:34 2015
(r289851)
@@ -64,32 +64,32 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#define MAX_BPAGES 64
-#define MAX_DMA_SEGMENTS   4096
-#define BUS_DMA_EXCL_BOUNCEBUS_DMA_BUS2
-#define BUS_DMA_ALIGN_BOUNCE   BUS_DMA_BUS3
-#define BUS_DMA_COULD_BOUNCE   (BUS_DMA_EXCL_BOUNCE | BUS_DMA_ALIGN_BOUNCE)
-#define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4
+#defineMAX_BPAGES  64
+#defineMAX_DMA_SEGMENTS4096
+#defineBUS_DMA_EXCL_BOUNCE BUS_DMA_BUS2
+#defineBUS_DMA_ALIGN_BOUNCEBUS_DMA_BUS3
+#defineBUS_DMA_COULD_BOUNCE(BUS_DMA_EXCL_BOUNCE | 
BUS_DMA_ALIGN_BOUNCE)
+#defineBUS_DMA_MIN_ALLOC_COMP  BUS_DMA_BUS4
 
 struct bounce_zone;
 
 struct bus_dma_tag {
-   bus_dma_tag_t parent;
-   bus_size_talignment;
-   bus_size_tboundary;
-   bus_addr_tlowaddr;
-   bus_addr_thighaddr;
-   bus_dma_filter_t *filter;
-   void *filterarg;
-   bus_size_tmaxsize;
-   u_int nsegments;
-   bus_size_tmaxsegsz;
-   int   flags;
-   int   ref_count;
-   int   map_count;
-   bus_dma_lock_t   *lockfunc;
-   void *lockfuncarg;
-   struct bounce_zone *bounce_zone;
+   bus_dma_tag_t   parent;
+   bus_size_t  alignment;
+   bus_size_t  boundary;
+   bus_addr_t  lowaddr;
+   bus_addr_t  highaddr;
+   bus_dma_filter_t*filter;
+   void*filterarg;
+   bus_size_t  maxsize;
+   u_int   nsegments;
+   bus_size_t  maxsegsz;
+   int flags;
+   int ref_count;
+   int map_count;
+   bus_dma_lock_t  *lockfunc;
+   void*lockfuncarg;
+   struct bounce_zone  *bounce_zone;
/*
 * DMA range for this tag.  If the page doesn't fall within
 * one of these ranges, an error is returned.  The caller
@@ -178,21 +178,21 @@ SYSCTL_INT(_hw_busdma, OID_AUTO, total_b
"Total bounce pages");
 
 struct bus_dmamap {
-   struct bp_list bpages;
-   intpagesneeded;
-   intpagesreserved;
-   bus_dma_tag_t  dmat;
-   struct memdesc mem;
-   bus_dmamap_callback_t *callback;
-   void  *callback_arg;
-   int   flags;
-#define DMAMAP_COHERENT(1 << 0)
-#define DMAMAP_DMAMEM_ALLOC(1 << 1)
-#define DMAMAP_MBUF(1 << 2)
+   struct bp_list  bpages;
+   int pagesneeded;
+   int pagesreserved;
+   bus_dma_tag_t   dmat;
+   struct memdesc  mem;
+   bus_dmamap_callback_t   *callback;
+   void*callback_arg;
+   int flags;
+#defineDMAMAP_COHERENT (1 << 0)
+#defineDMAMAP_DMAMEM_ALLOC (1 << 1)
+#defineDMAMAP_MBUF (1 << 2)
STAILQ_ENTRY(bus_dmamap) links;
bus_dma_segment_t   *segments;
-   intsync_count;
-   struct sync_list   slist[];
+   int sync_count;
+   struct sync_listslist[];
 };
 
 static STAILQ_HEAD(, bus_dmamap) bounce_map_waitinglist;
@@ -202,10 +202,9 @@ static void init_bounce_pages(void *dumm
 static int alloc_bounce_zone(bus_dma_tag_t dmat);
 static int alloc_bounce_pages(bus_dma_tag_t dmat, u_int numpages);
 static int reserve_bounce_pages(bus_dma_tag_t dmat, bus_dmamap_t map,
-   int commit);
+int commit);
 static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map,
- vm_offset_t vaddr, bus_addr_t addr,
- bus_size_t size);
+vm_offset_t vaddr, bus_addr_t addr, bus_size_t 

svn commit: r289850 - svnadmin/conf

2015-10-23 Thread Jung-uk Kim
Author: jkim
Date: Fri Oct 23 19:49:41 2015
New Revision: 289850
URL: https://svnweb.freebsd.org/changeset/base/289850

Log:
  OpenSSL 1.0.2d vendor import is complete.  Revert to normal ceiling.

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==
--- svnadmin/conf/sizelimit.confFri Oct 23 19:48:31 2015
(r289849)
+++ svnadmin/conf/sizelimit.confFri Oct 23 19:49:41 2015
(r289850)
@@ -33,7 +33,7 @@ gonzo
 imp
 jb
 jeff
-jkim
+#jkim
 kmacy
 lstewart
 #ngie
___
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: r289849 - vendor-crypto/openssl/1.0.2d

2015-10-23 Thread Jung-uk Kim
Author: jkim
Date: Fri Oct 23 19:48:31 2015
New Revision: 289849
URL: https://svnweb.freebsd.org/changeset/base/289849

Log:
  Tag OpenSSL 1.0.2d.

Added:
  vendor-crypto/openssl/1.0.2d/
 - copied from r289848, vendor-crypto/openssl/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: r289848 - in vendor-crypto/openssl/dist: . apps crypto crypto/aes crypto/aes/asm crypto/asn1 crypto/bio crypto/bn crypto/bn/asm crypto/buffer crypto/camellia crypto/camellia/asm crypto/...

2015-10-23 Thread Jung-uk Kim
Author: jkim
Date: Fri Oct 23 19:46:02 2015
New Revision: 289848
URL: https://svnweb.freebsd.org/changeset/base/289848

Log:
  Import OpenSSL 1.0.2d.

Added:
  vendor-crypto/openssl/dist/crypto/aes/asm/aesni-mb-x86_64.pl   (contents, 
props changed)
  vendor-crypto/openssl/dist/crypto/aes/asm/aesni-sha256-x86_64.pl   (contents, 
props changed)
  vendor-crypto/openssl/dist/crypto/aes/asm/aesp8-ppc.pl   (contents, props 
changed)
  vendor-crypto/openssl/dist/crypto/aes/asm/aest4-sparcv9.pl   (contents, props 
changed)
  vendor-crypto/openssl/dist/crypto/aes/asm/aesv8-armx.pl   (contents, props 
changed)
  vendor-crypto/openssl/dist/crypto/aes/asm/bsaes-armv7.pl   (contents, props 
changed)
  vendor-crypto/openssl/dist/crypto/aes/asm/vpaes-ppc.pl   (contents, props 
changed)
  vendor-crypto/openssl/dist/crypto/arm64cpuid.S   (contents, props changed)
  vendor-crypto/openssl/dist/crypto/bn/asm/mips3.s   (contents, props changed)
  vendor-crypto/openssl/dist/crypto/bn/asm/rsaz-avx2.pl   (contents, props 
changed)
  vendor-crypto/openssl/dist/crypto/bn/asm/rsaz-x86_64.pl   (contents, props 
changed)
  vendor-crypto/openssl/dist/crypto/bn/asm/sparct4-mont.pl   (contents, props 
changed)
  vendor-crypto/openssl/dist/crypto/bn/asm/sparcv9-gf2m.pl   (contents, props 
changed)
  vendor-crypto/openssl/dist/crypto/bn/asm/vis3-mont.pl   (contents, props 
changed)
  vendor-crypto/openssl/dist/crypto/bn/rsaz_exp.c   (contents, props changed)
  vendor-crypto/openssl/dist/crypto/bn/rsaz_exp.h   (contents, props changed)
  vendor-crypto/openssl/dist/crypto/camellia/asm/cmllt4-sparcv9.pl   (contents, 
props changed)
  vendor-crypto/openssl/dist/crypto/cms/cms_kari.c   (contents, props changed)
  vendor-crypto/openssl/dist/crypto/des/asm/dest4-sparcv9.pl   (contents, props 
changed)
  vendor-crypto/openssl/dist/crypto/dh/dh_kdf.c   (contents, props changed)
  vendor-crypto/openssl/dist/crypto/dh/dh_rfc5114.c   (contents, props changed)
  vendor-crypto/openssl/dist/crypto/ec/asm/
  vendor-crypto/openssl/dist/crypto/ec/asm/ecp_nistz256-avx2.pl   (contents, 
props changed)
  vendor-crypto/openssl/dist/crypto/ec/asm/ecp_nistz256-x86_64.pl   (contents, 
props changed)
  vendor-crypto/openssl/dist/crypto/ec/ecp_nistz256.c   (contents, props 
changed)
  vendor-crypto/openssl/dist/crypto/ec/ecp_nistz256_table.c   (contents, props 
changed)
  vendor-crypto/openssl/dist/crypto/ecdh/ech_kdf.c   (contents, props changed)
  vendor-crypto/openssl/dist/crypto/evp/e_aes_cbc_hmac_sha256.c   (contents, 
props changed)
  vendor-crypto/openssl/dist/crypto/md5/asm/md5-sparcv9.pl   (contents, props 
changed)
  vendor-crypto/openssl/dist/crypto/modes/asm/aesni-gcm-x86_64.pl   (contents, 
props changed)
  vendor-crypto/openssl/dist/crypto/modes/asm/ghashp8-ppc.pl   (contents, props 
changed)
  vendor-crypto/openssl/dist/crypto/modes/asm/ghashv8-armx.pl   (contents, 
props changed)
  vendor-crypto/openssl/dist/crypto/modes/wrap128.c   (contents, props changed)
  vendor-crypto/openssl/dist/crypto/perlasm/sparcv9_modes.pl   (contents, props 
changed)
  vendor-crypto/openssl/dist/crypto/ppc_arch.h   (contents, props changed)
  vendor-crypto/openssl/dist/crypto/sha/asm/sha1-armv8.pl   (contents, props 
changed)
  vendor-crypto/openssl/dist/crypto/sha/asm/sha1-mb-x86_64.pl   (contents, 
props changed)
  vendor-crypto/openssl/dist/crypto/sha/asm/sha256-mb-x86_64.pl   (contents, 
props changed)
  vendor-crypto/openssl/dist/crypto/sha/asm/sha512-armv8.pl   (contents, props 
changed)
  vendor-crypto/openssl/dist/crypto/sha/asm/sha512p8-ppc.pl   (contents, props 
changed)
  vendor-crypto/openssl/dist/crypto/sparc_arch.h   (contents, props changed)
  vendor-crypto/openssl/dist/crypto/x509/vpm_int.h   (contents, props changed)
  vendor-crypto/openssl/dist/crypto/x509v3/v3_scts.c   (contents, props changed)
  vendor-crypto/openssl/dist/crypto/x509v3/v3nametest.c   (contents, props 
changed)
  vendor-crypto/openssl/dist/doc/crypto/ASN1_TIME_set.pod
  vendor-crypto/openssl/dist/doc/crypto/EC_GFp_simple_method.pod
  vendor-crypto/openssl/dist/doc/crypto/EC_GROUP_copy.pod
  vendor-crypto/openssl/dist/doc/crypto/EC_GROUP_new.pod
  vendor-crypto/openssl/dist/doc/crypto/EC_KEY_new.pod
  vendor-crypto/openssl/dist/doc/crypto/EC_POINT_add.pod
  vendor-crypto/openssl/dist/doc/crypto/EC_POINT_new.pod
  vendor-crypto/openssl/dist/doc/crypto/OPENSSL_instrument_bus.pod
  vendor-crypto/openssl/dist/doc/crypto/SSLeay_version.pod
  vendor-crypto/openssl/dist/doc/crypto/X509_check_host.pod
  vendor-crypto/openssl/dist/doc/crypto/d2i_ECPKParameters.pod
  vendor-crypto/openssl/dist/doc/crypto/ec.pod
  vendor-crypto/openssl/dist/doc/ssl/SSL_CONF_CTX_new.pod
  vendor-crypto/openssl/dist/doc/ssl/SSL_CONF_CTX_set1_prefix.pod
  vendor-crypto/openssl/dist/doc/ssl/SSL_CONF_CTX_set_flags.pod
  vendor-crypto/openssl/dist/doc/ssl/SSL_CONF_CTX_set_ssl_ctx.pod
  vendor-crypto/openssl/dist/doc/ssl/SSL_CONF_cmd.pod
  vendor-crypto/openssl/dist/doc/ssl/SSL_CONF_cmd_argv.pod
  vendor-crypto/openssl/

svn commit: r289847 - svnadmin/conf

2015-10-23 Thread Jung-uk Kim
Author: jkim
Date: Fri Oct 23 19:45:22 2015
New Revision: 289847
URL: https://svnweb.freebsd.org/changeset/base/289847

Log:
  Temporarily remove size limit restriction in order to import OpenSSL 1.0.2d.

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==
--- svnadmin/conf/sizelimit.confFri Oct 23 19:41:58 2015
(r289846)
+++ svnadmin/conf/sizelimit.confFri Oct 23 19:45:22 2015
(r289847)
@@ -33,7 +33,7 @@ gonzo
 imp
 jb
 jeff
-#jkim
+jkim
 kmacy
 lstewart
 #ngie
___
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: r289846 - head/share/mk

2015-10-23 Thread Bryan Drewery
On 10/23/2015 12:41 PM, Bryan Drewery wrote:
> Author: bdrewery
> Date: Fri Oct 23 19:41:58 2015
> New Revision: 289846
> URL: https://svnweb.freebsd.org/changeset/base/289846
> 
> Log:
>   Fix regression from r289734 that caused crunchgen "subdirs" to not be
>   properly recursed.
>   

...

>   This resulted in 'make obj'
>   not properly being ran in the tree that would leave .depend files
>   scattered around when 'make all' was ran in rescue/.

Sorry about this. It mostly only impacted 'make universe'. If you've
been running one or ran one since 10/21 then you may have .depend or
object files in your src tree to cleanup.  'make cleandepend' and 'make
clean' from the top-level do work to clean this up, you just lose
objects too.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r289846 - head/share/mk

2015-10-23 Thread Bryan Drewery
Author: bdrewery
Date: Fri Oct 23 19:41:58 2015
New Revision: 289846
URL: https://svnweb.freebsd.org/changeset/base/289846

Log:
  Fix regression from r289734 that caused crunchgen "subdirs" to not be
  properly recursed.
  
  The .for loop was defining a ${__dir} variable that was being set at a
  different evaluation time than the target itself, so every 'cd ${__dir}'
  became the last value that was in ${__dir}.  This resulted in 'make obj'
  not properly being ran in the tree that would leave .depend files
  scattered around when 'make all' was ran in rescue/.
  
  To fix this, define a CRUNCH_SRCDIR_* for every prog if it does not
  already have one and then use that variable in every relevant place.
  This allows simplifying some logic as well.
  
  Reported by:  emaste
  X-MFC-With:   r289734
  MFC after:3 weeks
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.crunchgen.mk

Modified: head/share/mk/bsd.crunchgen.mk
==
--- head/share/mk/bsd.crunchgen.mk  Fri Oct 23 19:28:24 2015
(r289845)
+++ head/share/mk/bsd.crunchgen.mk  Fri Oct 23 19:41:58 2015
(r289846)
@@ -50,15 +50,18 @@ CLEANFILES+= ${CONF} *.o *.lo *.c *.mk *
 # Don't try to extract debug info from ${PROG}.
 MK_DEBUG_FILES= no
 
+# Set a default SRCDIR for each for simpler handling below.
+.for D in ${CRUNCH_SRCDIRS}
+.for P in ${CRUNCH_PROGS_${D}}
+CRUNCH_SRCDIR_${P}?=   ${.CURDIR}/../../${D}/${P}
+.endfor
+.endfor
+
 # Program names and their aliases contribute hardlinks to 'rescue' executable,
 # except for those that get suppressed.
 .for D in ${CRUNCH_SRCDIRS}
 .for P in ${CRUNCH_PROGS_${D}}
-.ifdef CRUNCH_SRCDIR_${P}
 ${OUTPUTS}: ${CRUNCH_SRCDIR_${P}}/Makefile
-.else
-${OUTPUTS}: ${.CURDIR}/../../${D}/${P}/Makefile
-.endif
 .if ${CRUNCH_GENERATE_LINKS} == "yes"
 .ifndef CRUNCH_SUPPRESS_LINK_${P}
 LINKS+= ${BINDIR}/${PROG} ${BINDIR}/${P}
@@ -89,11 +92,7 @@ ${CONF}: Makefile
 .for D in ${CRUNCH_SRCDIRS}
 .for P in ${CRUNCH_PROGS_${D}}
echo progs ${P} >>${.TARGET}
-.ifdef CRUNCH_SRCDIR_${P}
echo special ${P} srcdir ${CRUNCH_SRCDIR_${P}} >>${.TARGET}
-.else
-   echo special ${P} srcdir ${.CURDIR}/../../${D}/${P} >>${.TARGET}
-.endif
 .ifdef CRUNCH_BUILDOPTS_${P}
echo special ${P} buildopts DIRPRFX=${DIRPRFX}${P}/ \
${CRUNCH_BUILDOPTS_${P}} >>${.TARGET}
@@ -138,13 +137,8 @@ build-tools: build-tools-${_tool}
 .for __target in clean cleandepend cleandir obj objlink
 .for D in ${CRUNCH_SRCDIRS}
 .for P in ${CRUNCH_PROGS_${D}}
-.ifdef CRUNCH_SRCDIR_${P}
-__dir= ${CRUNCH_SRCDIR_${P}}
-.else
-__dir= ${.CURDIR}/../../${D}/${P}
-.endif
 ${__target}_crunchdir_${P}: .PHONY .MAKE
-   ${_+_}cd ${__dir} && \
+   ${_+_}cd ${CRUNCH_SRCDIR_${P}} && \
${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \
DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${__target}
 ${__target}: ${__target}_crunchdir_${P}
___
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: r289845 - head/sbin/savecore

2015-10-23 Thread Alan Somers
Author: asomers
Date: Fri Oct 23 19:28:24 2015
New Revision: 289845
URL: https://svnweb.freebsd.org/changeset/base/289845

Log:
  Fix various Coverity issues in sbin/savecore/savecore.c:
  
  CID1009429: Fix unchecked return value from lseek while clearing dump
  CID1007781: Fix file descriptor leak in DoFile
  CID1007261: Don't send potentially unterminated string to syslog(3)
  
  Coverity CID: 1009429
  Coverity CID: 1007781
  Coverity CID: 1007261
  MFC after:2 weeks
  Sponsored by: Spectra Logic
  Differential Revision:https://reviews.freebsd.org/D3991

Modified:
  head/sbin/savecore/savecore.c

Modified: head/sbin/savecore/savecore.c
==
--- head/sbin/savecore/savecore.c   Fri Oct 23 19:28:15 2015
(r289844)
+++ head/sbin/savecore/savecore.c   Fri Oct 23 19:28:24 2015
(r289845)
@@ -606,7 +606,8 @@ DoFile(const char *savedir, const char *
}
 
if (kdhl.panicstring[0])
-   syslog(LOG_ALERT, "reboot after panic: %s", kdhl.panicstring);
+   syslog(LOG_ALERT, "reboot after panic: %*s",
+   (int)sizeof(kdhl.panicstring), kdhl.panicstring);
else
syslog(LOG_ALERT, "reboot");
 
@@ -657,7 +658,7 @@ DoFile(const char *savedir, const char *
if (info == NULL) {
syslog(LOG_ERR, "fdopen failed: %m");
nerr++;
-   goto closefd;
+   goto closeall;
}
 
xostyle = xo_get_style(NULL);
@@ -665,7 +666,7 @@ DoFile(const char *savedir, const char *
if (xoinfo == NULL) {
syslog(LOG_ERR, "%s: %m", infoname);
nerr++;
-   goto closefd;
+   goto closeall;
}
xo_open_container_h(xoinfo, "crashdump");
 
@@ -726,9 +727,8 @@ nuke:
if (verbose)
printf("clearing dump header\n");
memcpy(kdhl.magic, KERNELDUMPMAGIC_CLEARED, sizeof kdhl.magic);
-   lseek(fd, lasthd, SEEK_SET);
-   error = write(fd, &kdhl, sizeof kdhl);
-   if (error != sizeof kdhl)
+   if (lseek(fd, lasthd, SEEK_SET) != lasthd ||
+   write(fd, &kdhl, sizeof(kdhl)) != sizeof(kdhl))
syslog(LOG_ERR,
"error while clearing the dump header: %m");
}
___
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: r289844 - vendor-crypto/openssl/dist-1.0.1

2015-10-23 Thread Jung-uk Kim
Author: jkim
Date: Fri Oct 23 19:28:15 2015
New Revision: 289844
URL: https://svnweb.freebsd.org/changeset/base/289844

Log:
  Copy over r285327 to create new vendor branch for OpenSSL 1.0.1 maintenance.

Added:
  vendor-crypto/openssl/dist-1.0.1/
 - copied from r289843, vendor-crypto/openssl/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: r289843 - in head/sys: cam/ctl cam/scsi dev/isp

2015-10-23 Thread Alexander Motin
Author: mav
Date: Fri Oct 23 18:34:18 2015
New Revision: 289843
URL: https://svnweb.freebsd.org/changeset/base/289843

Log:
  Add partial support for QUERY TMF to CAM and isp(4).
  
  This change allows to decode respective functions in isp(4) in target mode
  and pass them through CAM to CTL.  Unfortunately neither CAM nor isp(4)
  support returning response info for those task management functions now.
  
  On the other side I just have no initiator to test this functionality.

Modified:
  head/sys/cam/ctl/scsi_ctl.c
  head/sys/cam/scsi/scsi_message.h
  head/sys/dev/isp/isp_freebsd.c
  head/sys/dev/isp/isp_stds.h
  head/sys/dev/isp/isp_target.c
  head/sys/dev/isp/isp_target.h

Modified: head/sys/cam/ctl/scsi_ctl.c
==
--- head/sys/cam/ctl/scsi_ctl.c Fri Oct 23 17:38:01 2015(r289842)
+++ head/sys/cam/ctl/scsi_ctl.c Fri Oct 23 18:34:18 2015(r289843)
@@ -1459,24 +1459,31 @@ ctlfedone(struct cam_periph *periph, uni
CTL_TASK_ABORT_TASK_SET;
break;
case MSG_TARGET_RESET:
-   io->taskio.task_action =
-   CTL_TASK_TARGET_RESET;
+   io->taskio.task_action = CTL_TASK_TARGET_RESET;
break;
case MSG_ABORT_TASK:
-   io->taskio.task_action =
-   CTL_TASK_ABORT_TASK;
+   io->taskio.task_action = CTL_TASK_ABORT_TASK;
break;
case MSG_LOGICAL_UNIT_RESET:
-   io->taskio.task_action =
-   CTL_TASK_LUN_RESET;
+   io->taskio.task_action = CTL_TASK_LUN_RESET;
break;
case MSG_CLEAR_TASK_SET:
io->taskio.task_action =
-   CTL_TASK_CLEAR_TASK_SET;
+   CTL_TASK_CLEAR_TASK_SET;
break;
case MSG_CLEAR_ACA:
+   io->taskio.task_action = CTL_TASK_CLEAR_ACA;
+   break;
+   case MSG_QUERY_TASK:
+   io->taskio.task_action = CTL_TASK_QUERY_TASK;
+   break;
+   case MSG_QUERY_TASK_SET:
+   io->taskio.task_action =
+   CTL_TASK_QUERY_TASK_SET;
+   break;
+   case MSG_QUERY_ASYNC_EVENT:
io->taskio.task_action =
-   CTL_TASK_CLEAR_ACA;
+   CTL_TASK_QUERY_ASYNC_EVENT;
break;
case MSG_NOOP:
send_ctl_io = 0;

Modified: head/sys/cam/scsi/scsi_message.h
==
--- head/sys/cam/scsi/scsi_message.hFri Oct 23 17:38:01 2015
(r289842)
+++ head/sys/cam/scsi/scsi_message.hFri Oct 23 18:34:18 2015
(r289843)
@@ -68,3 +68,9 @@
 #defineMSG_EXT_PPR_QAS_REQ 0x04
 #defineMSG_EXT_PPR_DT_REQ  0x02
 #defineMSG_EXT_PPR_IU_REQ  0x01
+
+/* Fake messages not defined for SPI, but needed for other transports */
+#defineMSG_QUERY_TASK  0x100
+#defineMSG_QUERY_TASK_SET  0x101
+#defineMSG_QUERY_ASYNC_EVENT   0x102
+

Modified: head/sys/dev/isp/isp_freebsd.c
==
--- head/sys/dev/isp/isp_freebsd.c  Fri Oct 23 17:38:01 2015
(r289842)
+++ head/sys/dev/isp/isp_freebsd.c  Fri Oct 23 18:34:18 2015
(r289843)
@@ -3484,6 +3484,12 @@ isp_handle_platform_target_tmf(ispsoftc_
case NT_TARGET_RESET:
inot->arg = MSG_TARGET_RESET;
break;
+   case NT_QUERY_TASK_SET:
+   inot->arg = MSG_QUERY_TASK_SET;
+   break;
+   case NT_QUERY_ASYNC_EVENT:
+   inot->arg = MSG_QUERY_ASYNC_EVENT;
+   break;
default:
isp_prt(isp, ISP_LOGWARN, "%s: unknown TMF code 0x%x for chan 
%d lun %#jx", __func__, notify->nt_ncode, notify->nt_channel, (uintmax_t)lun);
goto bad;
@@ -5877,6 +5883,8 @@ changed:
case NT_CLEAR_TASK_SET:
case NT_LUN_RESET:
case NT_TARGET_RESET:
+   case NT_QUERY_TASK_SET:
+   case NT_QUERY_ASYNC_EVENT:
/*
 * These are task management functions.
 */

Mo

svn commit: r289842 - in head: contrib/bmake contrib/bmake/mk contrib/bmake/unit-tests usr.bin/bmake

2015-10-23 Thread Simon J. Gerraty
Author: sjg
Date: Fri Oct 23 17:38:01 2015
New Revision: 289842
URL: https://svnweb.freebsd.org/changeset/base/289842

Log:
  Merge bmake 20151020

Added:
  head/contrib/bmake/metachar.c
 - copied unchanged from r289724, vendor/NetBSD/bmake/dist/metachar.c
  head/contrib/bmake/metachar.h
 - copied unchanged from r289724, vendor/NetBSD/bmake/dist/metachar.h
Modified:
  head/contrib/bmake/ChangeLog
  head/contrib/bmake/FILES
  head/contrib/bmake/Makefile
  head/contrib/bmake/arch.c
  head/contrib/bmake/compat.c
  head/contrib/bmake/cond.c
  head/contrib/bmake/configure.in
  head/contrib/bmake/for.c
  head/contrib/bmake/job.c
  head/contrib/bmake/main.c
  head/contrib/bmake/make-bootstrap.sh.in
  head/contrib/bmake/make.c
  head/contrib/bmake/make.h
  head/contrib/bmake/meta.c
  head/contrib/bmake/mk/ChangeLog
  head/contrib/bmake/mk/auto.obj.mk
  head/contrib/bmake/mk/dirdeps.mk
  head/contrib/bmake/mk/doc.mk
  head/contrib/bmake/mk/gendirdeps.mk
  head/contrib/bmake/mk/host-target.mk
  head/contrib/bmake/mk/install-mk
  head/contrib/bmake/mk/meta.autodep.mk
  head/contrib/bmake/mk/meta.stage.mk
  head/contrib/bmake/mk/meta.sys.mk
  head/contrib/bmake/mk/own.mk
  head/contrib/bmake/mk/rst2htm.mk
  head/contrib/bmake/nonints.h
  head/contrib/bmake/os.sh
  head/contrib/bmake/parse.c
  head/contrib/bmake/suff.c
  head/contrib/bmake/unit-tests/varmisc.exp
  head/contrib/bmake/unit-tests/varmisc.mk
  head/contrib/bmake/var.c
  head/usr.bin/bmake/Makefile
Directory Properties:
  head/contrib/bmake/   (props changed)

Modified: head/contrib/bmake/ChangeLog
==
--- head/contrib/bmake/ChangeLogFri Oct 23 17:35:03 2015
(r289841)
+++ head/contrib/bmake/ChangeLogFri Oct 23 17:38:01 2015
(r289842)
@@ -1,3 +1,40 @@
+2015-10-20  Simon J. Gerraty  
+
+   * Makefile (MAKE_VERSION): 20151020
+ Merge with NetBSD make, pick up
+ o var.c: fix uninitialized var 
+
+2015-10-12  Simon J. Gerraty  
+
+   * var.c: the conditional expressions used with ':?' can be
+   expensive, if already discarding do not evaluate or expand
+   anything. 
+
+2015-10-10  Simon J. Gerraty  
+
+   * Makefile (MAKE_VERSION): 20151010
+ Merge with NetBSD make, pick up
+ o Add Boolean wantit flag to Var_Subst and Var_Parse
+   when FALSE we know we are discarding the result and can
+   skip operations like Cmd_Exec.
+
+2015-10-09  Simon J. Gerraty  
+
+   * Makefile (MAKE_VERSION): 20151009
+ Merge with NetBSD make, pick up
+ o var.c: don't check for NULL before free()
+ o meta.c: meta_oodate, do not hard code ignore of makeDependfile
+
+2015-09-10  Simon J. Gerraty  
+
+   * Makefile (MAKE_VERSION): 20150910
+ Merge with NetBSD make, pick up
+ o main.c: with -w print Enter/Leaving messages for objdir too
+   if necessary.
+ o centralize shell metachar handling
+   
+   * FILES: add metachar.[ch]
+
 2015-06-06  Simon J. Gerraty  
 
* Makefile (MAKE_VERSION): 20150606

Modified: head/contrib/bmake/FILES
==
--- head/contrib/bmake/FILESFri Oct 23 17:35:03 2015(r289841)
+++ head/contrib/bmake/FILESFri Oct 23 17:38:01 2015(r289842)
@@ -71,6 +71,8 @@ make_malloc.h
 makefile.in
 meta.c
 meta.h
+metachar.c
+metachar.h
 missing/sys/cdefs.h
 mkdeps.sh
 nonints.h

Modified: head/contrib/bmake/Makefile
==
--- head/contrib/bmake/Makefile Fri Oct 23 17:35:03 2015(r289841)
+++ head/contrib/bmake/Makefile Fri Oct 23 17:38:01 2015(r289842)
@@ -1,7 +1,7 @@
-#  $Id: Makefile,v 1.39 2015/06/07 15:54:37 sjg Exp $
+#  $Id: Makefile,v 1.44 2015/10/20 21:41:40 sjg Exp $
 
 # Base version on src date
-MAKE_VERSION= 20150606
+MAKE_VERSION= 20151020
 
 PROG=  bmake
 
@@ -18,6 +18,7 @@ SRCS= \
make.c \
make_malloc.c \
meta.c \
+   metachar.c \
parse.c \
str.c \
strlist.c \

Modified: head/contrib/bmake/arch.c
==
--- head/contrib/bmake/arch.c   Fri Oct 23 17:35:03 2015(r289841)
+++ head/contrib/bmake/arch.c   Fri Oct 23 17:38:01 2015(r289842)
@@ -1,4 +1,4 @@
-/* $NetBSD: arch.c,v 1.63 2012/06/12 19:21:50 joerg Exp $  */
+/* $NetBSD: arch.c,v 1.64 2015/10/11 04:51:24 sjg Exp $*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: arch.c,v 1.63 2012/06/12 19:21:50 joerg Exp $";
+static char rcsid[] = "$NetBSD: arch.c,v 1.64 2015/10/11 04:51:24 sjg Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: arch.c,v 1.63 2012/06/

svn commit: r289841 - head/sys/dev/usb/wlan

2015-10-23 Thread Andriy Voskoboinyk
Author: avos
Date: Fri Oct 23 17:35:03 2015
New Revision: 289841
URL: https://svnweb.freebsd.org/changeset/base/289841

Log:
  run(4): convert to ieee80211_tx_complete()
  
  Approved by:  adrian (mentor)
  Differential Revision:https://reviews.freebsd.org/D3992

Modified:
  head/sys/dev/usb/wlan/if_run.c

Modified: head/sys/dev/usb/wlan/if_run.c
==
--- head/sys/dev/usb/wlan/if_run.c  Fri Oct 23 17:30:41 2015
(r289840)
+++ head/sys/dev/usb/wlan/if_run.c  Fri Oct 23 17:35:03 2015
(r289841)
@@ -3030,20 +3030,11 @@ static void
 run_tx_free(struct run_endpoint_queue *pq,
 struct run_tx_data *data, int txerr)
 {
-   if (data->m != NULL) {
-   if (data->m->m_flags & M_TXCB)
-   ieee80211_process_callback(data->ni, data->m,
-   txerr ? ETIMEDOUT : 0);
-   m_freem(data->m);
-   data->m = NULL;
 
-   if (data->ni == NULL) {
-   DPRINTF("no node\n");
-   } else {
-   ieee80211_free_node(data->ni);
-   data->ni = NULL;
-   }
-   }
+   ieee80211_tx_complete(data->ni, data->m, txerr);
+
+   data->m = NULL;
+   data->ni = NULL;
 
STAILQ_INSERT_TAIL(&pq->tx_fh, data, next);
pq->tx_nfree++;
___
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: r289840 - head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD

2015-10-23 Thread Ed Maste
Author: emaste
Date: Fri Oct 23 17:30:41 2015
New Revision: 289840
URL: https://svnweb.freebsd.org/changeset/base/289840

Log:
  lldb: Add arm64 FreeBSD ProcessMonitor register context
  
  This is an adaptation of upstream LLDB commit r251088.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/POSIXThread.cpp

Modified: 
head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/POSIXThread.cpp
==
--- head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/POSIXThread.cpp 
Fri Oct 23 17:24:34 2015(r289839)
+++ head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/POSIXThread.cpp 
Fri Oct 23 17:30:41 2015(r289840)
@@ -36,6 +36,7 @@
 #include "RegisterContextPOSIXProcessMonitor_powerpc.h"
 #include "RegisterContextPOSIXProcessMonitor_x86.h"
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_arm.h"
+#include "Plugins/Process/Utility/RegisterContextFreeBSD_arm64.h"
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_i386.h"
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h"
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.h"
@@ -160,6 +161,9 @@ POSIXThread::GetRegisterContext()
 case llvm::Triple::FreeBSD:
 switch (target_arch.GetMachine())
 {
+case llvm::Triple::aarch64:
+reg_interface = new 
RegisterContextFreeBSD_arm64(target_arch);
+break;
 case llvm::Triple::arm:
 reg_interface = new 
RegisterContextFreeBSD_arm(target_arch);
 break;
___
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: r289839 - head/usr.bin

2015-10-23 Thread Bryan Drewery
Author: bdrewery
Date: Fri Oct 23 17:24:34 2015
New Revision: 289839
URL: https://svnweb.freebsd.org/changeset/base/289839

Log:
  dtc needs to be installed if MK_GPL_DTC is not set, which doesn't fit into the
  SUBDIR.yes pattern well.
  
  This fixes installation of the BSDL dtc after r288904.
  
  Reported by:  jhibbits
  Discussed with:   imp
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/usr.bin/Makefile

Modified: head/usr.bin/Makefile
==
--- head/usr.bin/Makefile   Fri Oct 23 16:54:24 2015(r289838)
+++ head/usr.bin/Makefile   Fri Oct 23 17:24:34 2015(r289839)
@@ -209,7 +209,9 @@ SUBDIR.${MK_GAMES}+=number
 SUBDIR.${MK_GAMES}+=   pom
 SUBDIR.${MK_GAMES}+=   primes
 SUBDIR.${MK_GAMES}+=   random
-SUBDIR.${MK_GPL_DTC}+= dtc
+.if ${MK_GPL_DTC} != "yes"
+SUBDIR+=   dtc
+.endif
 SUBDIR.${MK_GROFF}+=   vgrind
 SUBDIR.${MK_HESIOD}+=  hesinfo
 SUBDIR.${MK_ICONV}+=   iconv
___
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: r289838 - head/sys/dev/isp

2015-10-23 Thread Alexander Motin
Author: mav
Date: Fri Oct 23 16:54:24 2015
New Revision: 289838
URL: https://svnweb.freebsd.org/changeset/base/289838

Log:
  Improve INOTs handling for 24xx and above chips.

Modified:
  head/sys/dev/isp/isp_freebsd.c
  head/sys/dev/isp/isp_library.c
  head/sys/dev/isp/isp_library.h
  head/sys/dev/isp/isp_target.c
  head/sys/dev/isp/ispmbox.h

Modified: head/sys/dev/isp/isp_freebsd.c
==
--- head/sys/dev/isp/isp_freebsd.c  Fri Oct 23 15:56:17 2015
(r289837)
+++ head/sys/dev/isp/isp_freebsd.c  Fri Oct 23 16:54:24 2015
(r289838)
@@ -2480,12 +2480,13 @@ isp_handle_platform_atio2(ispsoftc_t *is
else {
if ((isp_find_pdb_by_handle(isp, 0, nphdl, &lp) == 0 ||
 lp->state == FC_PORTDB_STATE_ZOMBIE)) {
-   uint64_t iid =
+   uint64_t wwpn =
(((uint64_t) aep->at_wwpn[0]) << 48) |
(((uint64_t) aep->at_wwpn[1]) << 32) |
(((uint64_t) aep->at_wwpn[2]) << 16) |
(((uint64_t) aep->at_wwpn[3]) <<  0);
-   isp_add_wwn_entry(isp, 0, iid, nphdl, PORT_ANY, 0);
+   isp_add_wwn_entry(isp, 0, wwpn, INI_NONE,
+   nphdl, PORT_ANY, 0);
isp_find_pdb_by_handle(isp, 0, nphdl, &lp);
}
atiop->init_id = FC_PORTDB_TGT(isp, 0, lp);
@@ -3195,8 +3196,9 @@ isp_handle_platform_notify_24xx(ispsoftc
uint16_t prli_options = 0;
uint32_t portid;
fcportdb_t *lp;
-   uint8_t *ptr = NULL;
-   uint64_t wwn;
+   char *msg = NULL;
+   uint8_t *ptr = (uint8_t *)inot;
+   uint64_t wwpn = INI_NONE, wwnn = INI_NONE;
 
nphdl = inot->in_nphdl;
if (nphdl != NIL_HANDLE) {
@@ -3208,7 +3210,7 @@ isp_handle_platform_notify_24xx(ispsoftc
switch (inot->in_status) {
case IN24XX_ELS_RCVD:
{
-   char buf[16], *msg;
+   char buf[16];
int chan = ISP_GET_VPIDX(isp, inot->in_vpidx);
 
/*
@@ -3219,49 +3221,27 @@ isp_handle_platform_notify_24xx(ispsoftc
switch (inot->in_status_subcode) {
case LOGO:
msg = "LOGO";
-   if (ISP_FW_NEWER_THAN(isp, 4, 0, 25)) {
-   ptr = (uint8_t *)inot;  /* point to unswizzled 
entry! */
-   wwn =   (((uint64_t) ptr[IN24XX_LOGO_WWPN_OFF]) 
  << 56) |
-   (((uint64_t) 
ptr[IN24XX_LOGO_WWPN_OFF+1]) << 48) |
-   (((uint64_t) 
ptr[IN24XX_LOGO_WWPN_OFF+2]) << 40) |
-   (((uint64_t) 
ptr[IN24XX_LOGO_WWPN_OFF+3]) << 32) |
-   (((uint64_t) 
ptr[IN24XX_LOGO_WWPN_OFF+4]) << 24) |
-   (((uint64_t) 
ptr[IN24XX_LOGO_WWPN_OFF+5]) << 16) |
-   (((uint64_t) 
ptr[IN24XX_LOGO_WWPN_OFF+6]) <<  8) |
-   (((uint64_t) 
ptr[IN24XX_LOGO_WWPN_OFF+7]));
-   } else {
-   wwn = INI_ANY;
-   }
-   isp_del_wwn_entry(isp, chan, wwn, nphdl, portid);
+   wwpn = be64dec(&ptr[IN24XX_PLOGI_WWPN_OFF]);
+   isp_del_wwn_entry(isp, chan, wwpn, nphdl, portid);
break;
case PRLO:
msg = "PRLO";
break;
case PLOGI:
+   msg = "PLOGI";
+   wwnn = be64dec(&ptr[IN24XX_PLOGI_WWNN_OFF]);
+   wwpn = be64dec(&ptr[IN24XX_PLOGI_WWPN_OFF]);
+   isp_add_wwn_entry(isp, chan, wwpn, wwnn,
+   nphdl, portid, prli_options);
+   break;
case PRLI:
-   /*
-* Treat PRLI the same as PLOGI and make a database 
entry for it.
-*/
-   if (inot->in_status_subcode == PLOGI) {
-   msg = "PLOGI";
-   } else {
-   prli_options = inot->in_prli_options;
-   msg = "PRLI";
-   }
-   if (ISP_FW_NEWER_THAN(isp, 4, 0, 25)) {
-   ptr = (uint8_t *)inot;  /* point to unswizzled 
entry! */
-   wwn =   (((uint64_t) 
ptr[IN24XX_PLOGI_WWPN_OFF])   << 56) |
-   (((uint64_t) 
ptr[IN24XX_PLOGI_WWPN_OFF+1]) << 48) |
-   (((uint64_t) 
ptr[IN24XX_PLOGI_WWPN_OFF+2]) << 40) |
-   

svn commit: r289837 - head/lib/libc/resolv

2015-10-23 Thread Eric van Gyzen
Author: vangyzen
Date: Fri Oct 23 15:56:17 2015
New Revision: 289837
URL: https://svnweb.freebsd.org/changeset/base/289837

Log:
  resolver: abuse _res a little less
  
  In the past, _res was a global variable.  Now, it's multiple function calls.
  Several functions in the resolver use _res multiple times and therefore
  call the function(s) far more than necessary.
  
  Fix those callers to store the result of _res in a local variable.
  
  Add __noinline to the definition of res_init() to avoid the code bloat
  that these changes would have otherwise incurred.  Thanks to jilles
  for noticing this.
  
  Reviewed by:  jilles
  MFC after:1 week
  Sponsored by: Dell Inc.
  Differential Revision:https://reviews.freebsd.org/D3887

Modified:
  head/lib/libc/resolv/res_data.c

Modified: head/lib/libc/resolv/res_data.c
==
--- head/lib/libc/resolv/res_data.c Fri Oct 23 15:46:42 2015
(r289836)
+++ head/lib/libc/resolv/res_data.c Fri Oct 23 15:56:17 2015
(r289837)
@@ -77,9 +77,10 @@ const char *_res_sectioncodes[] = {
 
 int  res_ourserver_p(const res_state, const struct sockaddr_in *);
 
-int
+__noinline int
 res_init(void) {
extern int __res_vinit(res_state, int);
+   res_state statp = &_res;
 
/*
 * These three fields used to be statically initialized.  This made
@@ -100,14 +101,14 @@ res_init(void) {
 * set in RES_DEFAULT).  Our solution is to declare such applications
 * "broken".  They could fool us by setting RES_INIT but none do (yet).
 */
-   if (!_res.retrans)
-   _res.retrans = RES_TIMEOUT;
-   if (!_res.retry)
-   _res.retry = RES_DFLRETRY;
-   if (!(_res.options & RES_INIT))
-   _res.options = RES_DEFAULT;
+   if (!statp->retrans)
+   statp->retrans = RES_TIMEOUT;
+   if (!statp->retry)
+   statp->retry = RES_DFLRETRY;
+   if (!(statp->options & RES_INIT))
+   statp->options = RES_DEFAULT;
 
-   return (__res_vinit(&_res, 1));
+   return (__res_vinit(statp, 1));
 }
 
 void
@@ -122,10 +123,11 @@ fp_query(const u_char *msg, FILE *file) 
 
 void
 fp_nquery(const u_char *msg, int len, FILE *file) {
-   if ((_res.options & RES_INIT) == 0U && res_init() == -1)
+   res_state statp = &_res;
+   if ((statp->options & RES_INIT) == 0U && res_init() == -1)
return;
 
-   res_pquery(&_res, msg, len, file);
+   res_pquery(statp, msg, len, file);
 }
 
 int
@@ -138,23 +140,25 @@ res_mkquery(int op,   /*!< opcode of 
que
u_char *buf,/*!< buffer to put query  */
int buflen) /*!< size of buffer  */
 {
-   if ((_res.options & RES_INIT) == 0U && res_init() == -1) {
-   RES_SET_H_ERRNO(&_res, NETDB_INTERNAL);
+   res_state statp = &_res;
+   if ((statp->options & RES_INIT) == 0U && res_init() == -1) {
+   RES_SET_H_ERRNO(statp, NETDB_INTERNAL);
return (-1);
}
-   return (res_nmkquery(&_res, op, dname, class, type,
+   return (res_nmkquery(statp, op, dname, class, type,
 data, datalen,
 newrr_in, buf, buflen));
 }
 
 int
 res_mkupdate(ns_updrec *rrecp_in, u_char *buf, int buflen) {
-   if ((_res.options & RES_INIT) == 0U && res_init() == -1) {
-   RES_SET_H_ERRNO(&_res, NETDB_INTERNAL);
+   res_state statp = &_res;
+   if ((statp->options & RES_INIT) == 0U && res_init() == -1) {
+   RES_SET_H_ERRNO(statp, NETDB_INTERNAL);
return (-1);
}
 
-   return (res_nmkupdate(&_res, rrecp_in, buf, buflen));
+   return (res_nmkupdate(statp, rrecp_in, buf, buflen));
 }
 
 int
@@ -163,11 +167,12 @@ res_query(const char *name,   /*!< domain 
  u_char *answer,   /*!< buffer to put answer  */
  int anslen)   /*!< size of answer buffer  */
 {
-   if ((_res.options & RES_INIT) == 0U && res_init() == -1) {
-   RES_SET_H_ERRNO(&_res, NETDB_INTERNAL);
+   res_state statp = &_res;
+   if ((statp->options & RES_INIT) == 0U && res_init() == -1) {
+   RES_SET_H_ERRNO(statp, NETDB_INTERNAL);
return (-1);
}
-   return (res_nquery(&_res, name, class, type, answer, anslen));
+   return (res_nquery(statp, name, class, type, answer, anslen));
 }
 
 #ifndef _LIBC
@@ -189,12 +194,13 @@ res_isourserver(const struct sockaddr_in
 
 int
 res_send(const u_char *buf, int buflen, u_char *ans, int anssiz) {
-   if ((_res.options & RES_INIT) == 0U && res_init() == -1) {
+   res_state statp = &_res;
+   if ((statp->options & RES_INIT) == 0U && res_init() == -1) {
/* errno should have been set by res_init() in this case. */
return (-1);
}
 
-   return (res

Re: svn commit: r289834 - head/sys/x86/x86

2015-10-23 Thread Roger Pau Monné
El 23/10/15 a les 17.39, Roger Pau Monné ha escrit:
> Author: royger
> Date: Fri Oct 23 15:39:59 2015
> New Revision: 289834
> URL: https://svnweb.freebsd.org/changeset/base/289834
> 
> Log:
>   x86/dma_bounce: rework _bus_dmamap_load_ma implementation
>   
>   The implementation of bus_dmamap_load_ma_triv currently calls
>   _bus_dmamap_load_phys on each page that is part of the passed in buffer.
>   Since each page is treated as an individual buffer, the resulting behaviour
>   is different from the behaviour of _bus_dmamap_load_buffer. This breaks
>   certain drivers, like Xen blkfront.
>   
>   If an unmapped buffer of size 4096 that starts at offset 13 into the first
>   page is passed to the current _bus_dmamap_load_ma implementation (so the ma
>   array contains two pages), the result is that two segments are created, one
>   with a size of 4083 and the other with size 13 (because two independant
>   calls to _bus_dmamap_load_phys are performed, one for each physical page).
>   If the same is done with a mapped buffer and calling _bus_dmamap_load_buffer
>   the result is that only one segment is created, with a size of 4096.
>   
>   This patch relegates the usage of bus_dmamap_load_ma_triv in x86 bounce
>   buffer code to drivers requesting BUS_DMA_KEEP_PG_OFFSET and implements
>   _bus_dmamap_load_ma so that it's behaviour is the same as the mapped version
>   (_bus_dmamap_load_buffer). This patch only modifies the x86 bounce buffer
>   code, other arches are left untouched.
>   
>   Reviewed by:kib, jah
>   Differential Revision:  https://reviews.freebsd.org/D888
>   Sponsored by:   Citrix Systems R&D

Forgot to add:

MFC after:  2 weeks

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: r289836 - head/sys/dev/xen/blkfront

2015-10-23 Thread Roger Pau Monné
Author: royger
Date: Fri Oct 23 15:46:42 2015
New Revision: 289836
URL: https://svnweb.freebsd.org/changeset/base/289836

Log:
  blkfront: add support for unmapped IO
  
  Using unmapped IO is really beneficial when running inside of a VM,
  since it avoids IPIs to other vCPUs in order to invalidate the
  mappings.
  
  This patch adds unmapped IO support to blkfront. The following tests
  results have been obtained when running on a Xen host without HAP:
  
  PVHVM
   3165.84 real  6354.17 user  4483.32 sys
  PVHVM with unmapped IO
   2099.46 real  4624.52 user  2967.38 sys
  
  This is because when running using shadow page tables TLB flushes and
  range invalidations are much more expensive, so using unmapped IO
  provides a very important performance boost.
  
  Sponsored by: Citrix Systems R&D
  MFC after:2 weeks
  X-MFC-with:   r289834

Modified:
  head/sys/dev/xen/blkfront/blkfront.c

Modified: head/sys/dev/xen/blkfront/blkfront.c
==
--- head/sys/dev/xen/blkfront/blkfront.cFri Oct 23 15:40:44 2015
(r289835)
+++ head/sys/dev/xen/blkfront/blkfront.cFri Oct 23 15:46:42 2015
(r289836)
@@ -293,8 +293,12 @@ xbd_queue_request(struct xbd_softc *sc, 
 {
int error;
 
-   error = bus_dmamap_load(sc->xbd_io_dmat, cm->cm_map, cm->cm_data,
-   cm->cm_datalen, xbd_queue_cb, cm, 0);
+   if (cm->cm_bp != NULL)
+   error = bus_dmamap_load_bio(sc->xbd_io_dmat, cm->cm_map,
+   cm->cm_bp, xbd_queue_cb, cm, 0);
+   else
+   error = bus_dmamap_load(sc->xbd_io_dmat, cm->cm_map,
+   cm->cm_data, cm->cm_datalen, xbd_queue_cb, cm, 0);
if (error == EINPROGRESS) {
/*
 * Maintain queuing order by freezing the queue.  The next
@@ -354,8 +358,6 @@ xbd_bio_command(struct xbd_softc *sc)
}
 
cm->cm_bp = bp;
-   cm->cm_data = bp->bio_data;
-   cm->cm_datalen = bp->bio_bcount;
cm->cm_sector_number = (blkif_sector_t)bp->bio_pblkno;
 
switch (bp->bio_cmd) {
@@ -1009,7 +1011,7 @@ xbd_instance_create(struct xbd_softc *sc
 
sc->xbd_disk->d_mediasize = sectors * sector_size;
sc->xbd_disk->d_maxsize = sc->xbd_max_request_size;
-   sc->xbd_disk->d_flags = 0;
+   sc->xbd_disk->d_flags = DISKFLAG_UNMAPPED_BIO;
if ((sc->xbd_flags & (XBDF_FLUSH|XBDF_BARRIER)) != 0) {
sc->xbd_disk->d_flags |= DISKFLAG_CANFLUSHCACHE;
device_printf(sc->xbd_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: r289835 - head/sbin/sysctl

2015-10-23 Thread Conrad E. Meyer
Author: cem
Date: Fri Oct 23 15:40:44 2015
New Revision: 289835
URL: https://svnweb.freebsd.org/changeset/base/289835

Log:
  sysctl(8): Fix style nits
  
  Suggested by: bde
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sbin/sysctl/sysctl.c

Modified: head/sbin/sysctl/sysctl.c
==
--- head/sbin/sysctl/sysctl.c   Fri Oct 23 15:39:59 2015(r289834)
+++ head/sbin/sysctl/sysctl.c   Fri Oct 23 15:40:44 2015(r289835)
@@ -90,25 +90,25 @@ static int ctl_sign[CTLTYPE+1] = {
 };
 
 static int ctl_size[CTLTYPE+1] = {
+   [CTLTYPE_U8] = sizeof(uint8_t),
+   [CTLTYPE_U16] = sizeof(uint16_t),
[CTLTYPE_INT] = sizeof(int),
[CTLTYPE_UINT] = sizeof(u_int),
[CTLTYPE_LONG] = sizeof(long),
[CTLTYPE_ULONG] = sizeof(u_long),
[CTLTYPE_S64] = sizeof(int64_t),
[CTLTYPE_U64] = sizeof(uint64_t),
-   [CTLTYPE_U8] = sizeof(uint8_t),
-   [CTLTYPE_U16] = sizeof(uint16_t),
 };
 
 static const char *ctl_typename[CTLTYPE+1] = {
+   [CTLTYPE_U8] = "uint8_t",
+   [CTLTYPE_U16] = "uint16_t",
[CTLTYPE_INT] = "integer",
[CTLTYPE_UINT] = "unsigned integer",
[CTLTYPE_LONG] = "long integer",
[CTLTYPE_ULONG] = "unsigned long",
[CTLTYPE_S64] = "int64_t",
[CTLTYPE_U64] = "uint64_t",
-   [CTLTYPE_U8] = "uint8_t",
-   [CTLTYPE_U16] = "uint16_t",
 };
 
 static void
@@ -359,7 +359,8 @@ parse(const char *string, int lineno)
newsize = sizeof(u8val);
break;
case CTLTYPE_U16:
-   u16val = (uint16_t)strtoul(newvalstr, &endptr, 
0);
+   u16val = (uint16_t)strtoul(newvalstr, &endptr,
+   0);
newval = &u16val;
newsize = sizeof(u16val);
break;
___
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: r289834 - head/sys/x86/x86

2015-10-23 Thread Roger Pau Monné
Author: royger
Date: Fri Oct 23 15:39:59 2015
New Revision: 289834
URL: https://svnweb.freebsd.org/changeset/base/289834

Log:
  x86/dma_bounce: rework _bus_dmamap_load_ma implementation
  
  The implementation of bus_dmamap_load_ma_triv currently calls
  _bus_dmamap_load_phys on each page that is part of the passed in buffer.
  Since each page is treated as an individual buffer, the resulting behaviour
  is different from the behaviour of _bus_dmamap_load_buffer. This breaks
  certain drivers, like Xen blkfront.
  
  If an unmapped buffer of size 4096 that starts at offset 13 into the first
  page is passed to the current _bus_dmamap_load_ma implementation (so the ma
  array contains two pages), the result is that two segments are created, one
  with a size of 4083 and the other with size 13 (because two independant
  calls to _bus_dmamap_load_phys are performed, one for each physical page).
  If the same is done with a mapped buffer and calling _bus_dmamap_load_buffer
  the result is that only one segment is created, with a size of 4096.
  
  This patch relegates the usage of bus_dmamap_load_ma_triv in x86 bounce
  buffer code to drivers requesting BUS_DMA_KEEP_PG_OFFSET and implements
  _bus_dmamap_load_ma so that it's behaviour is the same as the mapped version
  (_bus_dmamap_load_buffer). This patch only modifies the x86 bounce buffer
  code, other arches are left untouched.
  
  Reviewed by:  kib, jah
  Differential Revision:https://reviews.freebsd.org/D888
  Sponsored by: Citrix Systems R&D

Modified:
  head/sys/x86/x86/busdma_bounce.c

Modified: head/sys/x86/x86/busdma_bounce.c
==
--- head/sys/x86/x86/busdma_bounce.cFri Oct 23 15:24:00 2015
(r289833)
+++ head/sys/x86/x86/busdma_bounce.cFri Oct 23 15:39:59 2015
(r289834)
@@ -79,8 +79,8 @@ struct bounce_page {
vm_offset_t vaddr;  /* kva of bounce buffer */
bus_addr_t  busaddr;/* Physical address */
vm_offset_t datavaddr;  /* kva of client data */
-   vm_page_t   datapage;   /* physical page of client data */
vm_offset_t dataoffs;   /* page offset of client data */
+   vm_page_t   datapage[2];/* physical page(s) of client data */
bus_size_t  datacount;  /* client data count */
STAILQ_ENTRY(bounce_page) links;
 };
@@ -135,8 +135,8 @@ static int alloc_bounce_pages(bus_dma_ta
 static int reserve_bounce_pages(bus_dma_tag_t dmat, bus_dmamap_t map,
int commit);
 static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map,
- vm_offset_t vaddr, bus_addr_t addr,
- bus_size_t size);
+ vm_offset_t vaddr, bus_addr_t addr1,
+ bus_addr_t addr2, bus_size_t size);
 static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage);
 int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr);
 static void _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map,
@@ -527,6 +527,51 @@ _bus_dmamap_count_pages(bus_dma_tag_t dm
}
 }
 
+static void
+_bus_dmamap_count_ma(bus_dma_tag_t dmat, bus_dmamap_t map, struct vm_page **ma,
+int ma_offs, bus_size_t buflen, int flags)
+{
+   bus_size_t sg_len, max_sgsize;
+   int page_index;
+   vm_paddr_t paddr;
+
+   if ((map != &nobounce_dmamap && map->pagesneeded == 0)) {
+   CTR4(KTR_BUSDMA, "lowaddr= %d Maxmem= %d, boundary= %d, "
+   "alignment= %d", dmat->common.lowaddr,
+   ptoa((vm_paddr_t)Maxmem),
+   dmat->common.boundary, dmat->common.alignment);
+   CTR3(KTR_BUSDMA, "map= %p, nobouncemap= %p, pagesneeded= %d",
+   map, &nobounce_dmamap, map->pagesneeded);
+
+   /*
+* Count the number of bounce pages
+* needed in order to complete this transfer
+*/
+   page_index = 0;
+   while (buflen > 0) {
+   paddr = ma[page_index]->phys_addr + ma_offs;
+   sg_len = PAGE_SIZE - ma_offs;
+   max_sgsize = MIN(buflen, dmat->common.maxsegsz);
+   sg_len = MIN(sg_len, max_sgsize);
+   if (bus_dma_run_filter(&dmat->common, paddr) != 0) {
+   sg_len = roundup2(sg_len,
+   dmat->common.alignment);
+   sg_len = MIN(sg_len, max_sgsize);
+   KASSERT((sg_len & (dmat->common.alignment - 1))
+   == 0, ("Segment size is not aligned"));
+   map->pagesneeded++;
+   }
+   if (((ma_offs + sg_len) & ~PAGE_MASK) != 0)
+   

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

2015-10-23 Thread Ed Maste
Author: emaste
Date: Fri Oct 23 15:24:00 2015
New Revision: 289833
URL: https://svnweb.freebsd.org/changeset/base/289833

Log:
  arm64: remove exception instruction length assertion
  
  From the (now removed) comment:
  
   * It is unclear in some cases if the bit is implementation defined.
   * The Foundation Model and QEMU disagree on if the IL bit should
   * be set when we are in a data fault from the same EL and the ISV
   * bit (bit 24) is also set.
  
  Instead of adding even more special cases just remove the assertion.
  
  Approved by:  andrew
  Sponsored by: The FreeBSD Foundation

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

Modified: head/sys/arm64/arm64/trap.c
==
--- head/sys/arm64/arm64/trap.c Fri Oct 23 15:14:37 2015(r289832)
+++ head/sys/arm64/arm64/trap.c Fri Oct 23 15:24:00 2015(r289833)
@@ -263,20 +263,6 @@ do_el1h_sync(struct trapframe *frame)
return;
 #endif
 
-   /*
-* Sanity check we are in an exception er can handle. The IL bit
-* is used to indicate the instruction length, except in a few
-* exceptions described in the ARMv8 ARM.
-*
-* It is unclear in some cases if the bit is implementation defined.
-* The Foundation Model and QEMU disagree on if the IL bit should
-* be set when we are in a data fault from the same EL and the ISV
-* bit (bit 24) is also set.
-*/
-   KASSERT((esr & ESR_ELx_IL) == ESR_ELx_IL ||
-   (exception == EXCP_DATA_ABORT && ((esr & ISS_DATA_ISV) == 0)),
-   ("Invalid instruction length in exception, esr %lx", esr));
-
CTR4(KTR_TRAP,
"do_el1_sync: curthread: %p, esr %lx, elr: %lx, frame: %p",
curthread, esr, frame->tf_elr, frame);
___
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: r289832 - in stable/9/sys: libkern sys

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 15:14:37 2015
New Revision: 289832
URL: https://svnweb.freebsd.org/changeset/base/289832

Log:
  Partial MFC r253719: add flsll to libkern
  
  Original commit description:
Fix watchdog pretimeout.
...
  
  Only flsll bits of that commit are needed.
  This should fix the build broken in r289820 for !amd64.
  
  Pointyhat to: avg

Added:
  stable/9/sys/libkern/flsll.c
 - copied unchanged from r253719, head/sys/libkern/flsll.c
Modified:
  stable/9/sys/sys/libkern.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/sys/   (props changed)

Copied: stable/9/sys/libkern/flsll.c (from r253719, head/sys/libkern/flsll.c)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/9/sys/libkern/flsll.cFri Oct 23 15:14:37 2015
(r289832, copy of r253719, head/sys/libkern/flsll.c)
@@ -0,0 +1,47 @@
+/*-
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University 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 REGENTS 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 REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+#include 
+__FBSDID("$FreeBSD$");
+
+/*
+ * Find Last Set bit
+ */
+int
+flsll(long long mask)
+{
+   int bit;
+
+   if (mask == 0)
+   return (0);
+   for (bit = 1; mask != 1; bit++)
+   mask = (unsigned long long)mask >> 1;
+   return (bit);
+}

Modified: stable/9/sys/sys/libkern.h
==
--- stable/9/sys/sys/libkern.h  Fri Oct 23 15:08:16 2015(r289831)
+++ stable/9/sys/sys/libkern.h  Fri Oct 23 15:14:37 2015(r289832)
@@ -94,6 +94,10 @@ int   fls(int);
 #ifndefHAVE_INLINE_FLSL
 int flsl(long);
 #endif
+#ifndefHAVE_INLINE_FLSLL
+int flsll(long long);
+#endif
+
 #definebitcount64(x)   __bitcount64((uint64_t)(x))
 #definebitcount32(x)   __bitcount32((uint32_t)(x))
 #definebitcount16(x)   __bitcount16((uint16_t)(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"


Re: svn commit: r289773 - in head: sbin/sysctl sys/kern sys/sys

2015-10-23 Thread Conrad Meyer
On Thu, Oct 22, 2015 at 6:10 PM, NGie Cooper  wrote:
> On Thu, Oct 22, 2015 at 4:03 PM, Conrad E. Meyer  wrote:
>> URL: https://svnweb.freebsd.org/changeset/base/289773
>>
>> Log:
>>   Sysctl: Add common support for U8, U16 types
>
> - This is missing documentation in sysctl(9).

r289831, thanks.

> - It probably deserves `Relnotes: yes`.

I don't think so.

> - Shouldn't __FreeBSD_version be bumped for this change?

What is __FreeBSD_version and why would it be bumped?

Best,
Conrad
___
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: r289831 - head/share/man/man9

2015-10-23 Thread Conrad E. Meyer
Author: cem
Date: Fri Oct 23 15:08:16 2015
New Revision: 289831
URL: https://svnweb.freebsd.org/changeset/base/289831

Log:
  sysctl(9): Document U8/U16 types from r289773
  
  Suggested by: ngie
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/share/man/man9/Makefile
  head/share/man/man9/sysctl.9

Modified: head/share/man/man9/Makefile
==
--- head/share/man/man9/MakefileFri Oct 23 14:52:05 2015
(r289830)
+++ head/share/man/man9/MakefileFri Oct 23 15:08:16 2015
(r289831)
@@ -1629,6 +1629,8 @@ MLINKS+=sysctl.9 SYSCTL_DECL.9 \
sysctl.9 SYSCTL_ADD_ROOT_NODE.9 \
sysctl.9 SYSCTL_ADD_STRING.9 \
sysctl.9 SYSCTL_ADD_STRUCT.9 \
+   sysctl.9 SYSCTL_ADD_U8.9 \
+   sysctl.9 SYSCTL_ADD_U16.9 \
sysctl.9 SYSCTL_ADD_UAUTO.9 \
sysctl.9 SYSCTL_ADD_UINT.9 \
sysctl.9 SYSCTL_ADD_ULONG.9 \
@@ -1646,6 +1648,8 @@ MLINKS+=sysctl.9 SYSCTL_DECL.9 \
sysctl.9 SYSCTL_ROOT_NODE.9 \
sysctl.9 SYSCTL_STRING.9 \
sysctl.9 SYSCTL_STRUCT.9 \
+   sysctl.9 SYSCTL_U8.9 \
+   sysctl.9 SYSCTL_U16.9 \
sysctl.9 SYSCTL_UINT.9 \
sysctl.9 SYSCTL_ULONG.9 \
sysctl.9 SYSCTL_UQUAD.9

Modified: head/share/man/man9/sysctl.9
==
--- head/share/man/man9/sysctl.9Fri Oct 23 14:52:05 2015
(r289830)
+++ head/share/man/man9/sysctl.9Fri Oct 23 15:08:16 2015
(r289831)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 20, 2014
+.Dd October 23, 2015
 .Dt SYSCTL 9
 .Os
 .Sh NAME
@@ -39,6 +39,8 @@
 .Nm SYSCTL_ADD_ROOT_NODE ,
 .Nm SYSCTL_ADD_STRING ,
 .Nm SYSCTL_ADD_STRUCT ,
+.Nm SYSCTL_ADD_U8 ,
+.Nm SYSCTL_ADD_U16 ,
 .Nm SYSCTL_ADD_UAUTO ,
 .Nm SYSCTL_ADD_UINT ,
 .Nm SYSCTL_ADD_ULONG ,
@@ -56,6 +58,8 @@
 .Nm SYSCTL_ROOT_NODE ,
 .Nm SYSCTL_STRING ,
 .Nm SYSCTL_STRUCT ,
+.Nm SYSCTL_U8 ,
+.Nm SYSCTL_U16 ,
 .Nm SYSCTL_UINT ,
 .Nm SYSCTL_ULONG ,
 .Nm SYSCTL_UQUAD
@@ -162,6 +166,28 @@
 .Fa "const char *descr"
 .Fc
 .Ft struct sysctl_oid *
+.Fo SYSCTL_ADD_U8
+.Fa "struct sysctl_ctx_list *ctx"
+.Fa "struct sysctl_oid_list *parent"
+.Fa "int number"
+.Fa "const char *name"
+.Fa "int ctlflags"
+.Fa "unsigned int *ptr"
+.Fa "intptr_t val"
+.Fa "const char *descr"
+.Fc
+.Ft struct sysctl_oid *
+.Fo SYSCTL_ADD_U16
+.Fa "struct sysctl_ctx_list *ctx"
+.Fa "struct sysctl_oid_list *parent"
+.Fa "int number"
+.Fa "const char *name"
+.Fa "int ctlflags"
+.Fa "unsigned int *ptr"
+.Fa "intptr_t val"
+.Fa "const char *descr"
+.Fc
+.Ft struct sysctl_oid *
 .Fo SYSCTL_ADD_UINT
 .Fa "struct sysctl_ctx_list *ctx"
 .Fa "struct sysctl_oid_list *parent"
@@ -228,6 +254,8 @@
 .Fn SYSCTL_STRING parent number name ctlflags arg len descr
 .Fn SYSCTL_STRUCT parent number name ctlflags ptr struct_type descr
 .Fn SYSCTL_ROOT_NODE number name ctlflags handler descr
+.Fn SYSCTL_U8 parent number name ctlflags ptr val descr
+.Fn SYSCTL_U16 parent number name ctlflags ptr val descr
 .Fn SYSCTL_UINT parent number name ctlflags ptr val descr
 .Fn SYSCTL_ULONG parent number name ctlflags ptr val descr
 .Fn SYSCTL_UQUAD parent number name ctlflags ptr val descr
@@ -413,6 +441,8 @@ Static sysctls are declared using one of
 .Fn SYSCTL_ROOT_NODE ,
 .Fn SYSCTL_STRING ,
 .Fn SYSCTL_STRUCT ,
+.Fn SYSCTL_U8 ,
+.Fn SYSCTL_U16 ,
 .Fn SYSCTL_UINT ,
 .Fn SYSCTL_ULONG
 or
@@ -429,6 +459,8 @@ Dynamic nodes are created using one of t
 .Fn SYSCTL_ADD_ROOT_NODE ,
 .Fn SYSCTL_ADD_STRING ,
 .Fn SYSCTL_ADD_STRUCT ,
+.Fn SYSCTL_ADD_U8 ,
+.Fn SYSCTL_ADD_U16 ,
 .Fn SYSCTL_ADD_UAUTO ,
 .Fn SYSCTL_ADD_UINT ,
 .Fn SYSCTL_ADD_ULONG ,
@@ -459,6 +491,10 @@ This is an opaque data structure.
 .It Dv CTLTYPE_STRUCT
 Alias for
 .Dv CTLTYPE_OPAQUE .
+.It Dv CTLTYPE_U8
+This is an 8-bit unsigned integer.
+.It Dv CTLTYPE_U16
+This is a 16-bit unsigned integer.
 .It Dv CTLTYPE_UINT
 This is an unsigned integer.
 .It Dv CTLTYPE_LONG
___
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: r289830 - head/sys/ofed/include/linux

2015-10-23 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Oct 23 14:52:05 2015
New Revision: 289830
URL: https://svnweb.freebsd.org/changeset/base/289830

Log:
  Build fix for non-i386 and non-amd64 platforms.
  
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/ofed/include/linux/linux_compat.c

Modified: head/sys/ofed/include/linux/linux_compat.c
==
--- head/sys/ofed/include/linux/linux_compat.c  Fri Oct 23 14:26:06 2015
(r289829)
+++ head/sys/ofed/include/linux/linux_compat.c  Fri Oct 23 14:52:05 2015
(r289830)
@@ -663,7 +663,11 @@ _ioremap_attr(vm_paddr_t phys_addr, unsi
 {
void *addr;
 
+#if defined(__i386__) || defined(__amd64__)
addr = pmap_mapdev_attr(phys_addr, size, attr);
+#else
+   addr = NULL;
+#endif
if (addr == NULL)
return (NULL);
vmmap_add(addr, size);
@@ -679,7 +683,9 @@ iounmap(void *addr)
vmmap = vmmap_remove(addr);
if (vmmap == NULL)
return;
+#if defined(__i386__) || defined(__amd64__)
pmap_unmapdev((vm_offset_t)addr, vmmap->vm_size);
+#endif
kfree(vmmap);
 }
 
___
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: r289829 - svnadmin/conf

2015-10-23 Thread Rui Paulo
Author: rpaulo
Date: Fri Oct 23 14:26:06 2015
New Revision: 289829
URL: https://svnweb.freebsd.org/changeset/base/289829

Log:
  Please welcome Kurt Lidl to the rank of src committers.
  
  Adrian is also mentoring.
  
  Approved by:  core

Modified:
  svnadmin/conf/access
  svnadmin/conf/mentors

Modified: svnadmin/conf/access
==
--- svnadmin/conf/accessFri Oct 23 12:59:54 2015(r289828)
+++ svnadmin/conf/accessFri Oct 23 14:26:06 2015(r289829)
@@ -142,6 +142,7 @@ kevlo
 kib
 kp
 kuriyama
+lidl
 loos
 lstewart
 luigi

Modified: svnadmin/conf/mentors
==
--- svnadmin/conf/mentors   Fri Oct 23 12:59:54 2015(r289828)
+++ svnadmin/conf/mentors   Fri Oct 23 14:26:06 2015(r289829)
@@ -31,6 +31,7 @@ monthadar adrian
 peterj jhb Co-mentor: grog
 slmken Co-mentor: scottl, ambrisko
 snbdwmalone
+lidl   rpaulo  Co-mentor: adrian
 torek  rpaulo
 venkat delphij Co-mentor: luigi, jhb
 versus gavin   Co-mentor: fjoe
___
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: r289778 - head/share/mk

2015-10-23 Thread Ian Lepore
On Thu, 2015-10-22 at 17:21 -0700, Bryan Drewery wrote:
> > On Oct 22, 2015, at 17:18, Bryan Drewery 
> > wrote:
> > 
> > 
> > 
> > > > On Oct 22, 2015, at 16:59, Ian Lepore  wrote:
> > > > 
> > > > On Thu, 2015-10-22 at 23:41 +, Bryan Drewery wrote:
> > > > Author: bdrewery
> > > > Date: Thu Oct 22 23:41:56 2015
> > > > New Revision: 289778
> > > > URL: https://svnweb.freebsd.org/changeset/base/289778
> > > > 
> > > > Log:
> > > > For SUBDIR_PARALLEL, when doing 'make clean*' or 'make obj'
> > > > there
> > > > is no need to
> > > > respect SUBDIR_DEPEND_* or .WAIT.
> > > > 
> > > > MFC after:2 weeks
> > > > Sponsored by:EMC / Isilon Storage Division
> > > 
> > > This doesn't feel so safe.  People override these targets and do
> > > who
> > > -knows-what with them.  The clean* seems especially risky since
> > > it will
> > > match targets in end-user makefiles that you don't even know
> > > about.
> 
> I can also not apply to SUBDIR_TARGETS which is the user-defined
> targets list. (Misspelled and should be LOCAL_SUBDIR_TARGETS)
> 

That might be a good idea.  When I grepped our devel/mk directory,
SUBDIR_TARGETS was where I saw a number of things that would match
clean* (I didn't look into exactly what they do).

-- Ian

> > > 
> > > -- Ian
> > 
> > I can limit it to src tree builds if you want.
> > 
> > I cannot imagine any situation where "clean" depends on
> > another directory going first. 
> > 
> > Similarly it makes sense to always build subdirs in parallel with
> > 'obj' and I would argue 'clean*' too, regardless of
> > SUBDIR_PARALLEL. I only just realized that. Yes there are mkdir -p
> > and rm -f races, but we have not added any dependencies because of
> > these as is.
> 
> 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289828 - head/sys/modules

2015-10-23 Thread Ed Maste
Author: emaste
Date: Fri Oct 23 12:59:54 2015
New Revision: 289828
URL: https://svnweb.freebsd.org/changeset/base/289828

Log:
  Move dtrace/opensolaris/zfs module option to common section
  
  These are not target-specific modules, so the logic to build them should
  be common.  This also enables them for arm64.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/modules/Makefile

Modified: head/sys/modules/Makefile
==
--- head/sys/modules/Makefile   Fri Oct 23 12:20:35 2015(r289827)
+++ head/sys/modules/Makefile   Fri Oct 23 12:59:54 2015(r289828)
@@ -98,7 +98,6 @@ SUBDIR=   \
${_dpt} \
${_drm} \
${_drm2} \
-   ${_dtrace} \
dummynet \
${_ed} \
${_elink} \
@@ -268,7 +267,6 @@ SUBDIR= \
${_nvme} \
${_nvram} \
${_nxge} \
-   ${_opensolaris} \
oce \
otus \
otusfw \
@@ -394,13 +392,20 @@ SUBDIR=   \
${_x86bios} \
${_xe} \
xl \
-   ${_zfs} \
zlib
 
 .if ${MK_AUTOFS} != "no" || defined(ALL_MODULES)
 _autofs=   autofs
 .endif
 
+.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
+.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" && \
+   ${MACHINE_CPUARCH} != "sparc64"
+SUBDIR+=   dtrace
+.endif
+SUBDIR+=   opensolaris
+.endif
+
 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
 .if exists(${.CURDIR}/../opencrypto)
 _crypto=   crypto
@@ -479,6 +484,10 @@ _txp=  txp
 _cxgbe=cxgbe
 .endif
 
+.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
+SUBDIR+=   zfs
+.endif
+
 .if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \
${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc"
 _syscons=  syscons
@@ -509,9 +518,6 @@ _cs=cs
 _dpms= dpms
 _drm=  drm
 _drm2= drm2
-.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
-_dtrace=   dtrace
-.endif
 _ed=   ed
 _em=   em
 _ep=   ep
@@ -537,9 +543,6 @@ _linux= linux
 _linuxkpi= linuxkpi
 .endif
 _ndis= ndis
-.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
-_opensolaris=  opensolaris
-.endif
 _pccard=   pccard
 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
 _rdma= rdma
@@ -555,9 +558,6 @@ _vxge=  vxge
 _wbwd= wbwd
 _wi=   wi
 _xe=   xe
-.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
-_zfs=  zfs
-.endif
 .if ${MACHINE} != "pc98"
 _aac=  aac
 _aacraid=  aacraid
@@ -716,23 +716,14 @@ _cbb= cbb
 _cfi=  cfi
 _cpufreq=  cpufreq
 _drm=  drm
-.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
-_dtrace=   dtrace
-.endif
 _exca= exca
 _nvram=powermac_nvram
-.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
-_opensolaris=  opensolaris
-.endif
 _pccard=   pccard
 _wi=   wi
 .endif
 
 .if ${MACHINE_ARCH} == "powerpc64"
 _drm2= drm2
-.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
-_zfs=  zfs
-.endif
 .endif
 
 .if ${MACHINE_CPUARCH} == "sparc64"
@@ -740,12 +731,6 @@ _auxio=auxio
 _em=   em
 _epic= epic
 _igb=  igb
-.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
-_opensolaris=  opensolaris
-.endif
-.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
-_zfs=  zfs
-.endif
 .endif
 
 .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64"
___
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: r289825 - in head/sys: arm/arm arm64/arm64 vm x86/x86

2015-10-23 Thread Andriy Gapon
On 23/10/2015 15:03, Jason A. Harmening wrote:
> Author: jah
> Date: Fri Oct 23 12:03:25 2015
> New Revision: 289825
> URL: https://svnweb.freebsd.org/changeset/base/289825
> 
> Log:
>   Remove unclear comment about address truncation in busdma.  Add (hopefully 
> much clearer) comment at declaration of PHYS_TO_VM_PAGE().
>   
>   Noted by:   avg

Thank you very much!
That was very fast :-)

-- 
Andriy Gapon
___
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: r289827 - stable/10

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 12:20:35 2015
New Revision: 289827
URL: https://svnweb.freebsd.org/changeset/base/289827

Log:
  mergeinfo for r289818 (MFC r261891 ...)

Modified:
Directory Properties:
  stable/10/   (props changed)
___
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: r289826 - head/sys/vm

2015-10-23 Thread Jason A. Harmening
Author: jah
Date: Fri Oct 23 12:06:06 2015
New Revision: 289826
URL: https://svnweb.freebsd.org/changeset/base/289826

Log:
  Fix capitalization

Modified:
  head/sys/vm/vm_page.h

Modified: head/sys/vm/vm_page.h
==
--- head/sys/vm/vm_page.h   Fri Oct 23 12:03:25 2015(r289825)
+++ head/sys/vm/vm_page.h   Fri Oct 23 12:06:06 2015(r289826)
@@ -376,7 +376,7 @@ extern long first_page; /* first physi
 #define VM_PAGE_TO_PHYS(entry) ((entry)->phys_addr)
 
 /*
- * PHYS_TO_VM_PAGE() Returns the vm_page_t object that represents a memory
+ * PHYS_TO_VM_PAGE() returns the vm_page_t object that represents a memory
  * page to which the given physical address belongs. The correct vm_page_t
  * object is returned for addresses that are not page-aligned.
  */
___
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: r289825 - in head/sys: arm/arm arm64/arm64 vm x86/x86

2015-10-23 Thread Jason A. Harmening
Author: jah
Date: Fri Oct 23 12:03:25 2015
New Revision: 289825
URL: https://svnweb.freebsd.org/changeset/base/289825

Log:
  Remove unclear comment about address truncation in busdma.  Add (hopefully 
much clearer) comment at declaration of PHYS_TO_VM_PAGE().
  
  Noted by: avg

Modified:
  head/sys/arm/arm/busdma_machdep-v6.c
  head/sys/arm/arm/busdma_machdep.c
  head/sys/arm64/arm64/busdma_bounce.c
  head/sys/vm/vm_page.h
  head/sys/x86/x86/busdma_bounce.c

Modified: head/sys/arm/arm/busdma_machdep-v6.c
==
--- head/sys/arm/arm/busdma_machdep-v6.cFri Oct 23 11:45:38 2015
(r289824)
+++ head/sys/arm/arm/busdma_machdep-v6.cFri Oct 23 12:03:25 2015
(r289825)
@@ -1089,10 +1089,6 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat
sl++;
sl->vaddr = 0;
sl->datacount = sgsize;
-   /*
-* PHYS_TO_VM_PAGE() will truncate
-* unaligned addresses.
-*/
sl->pages = PHYS_TO_VM_PAGE(curaddr);
sl->dataoffs = curaddr & PAGE_MASK;
} else
@@ -1214,10 +1210,6 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm
sl++;
sl->vaddr = kvaddr;
sl->datacount = sgsize;
-   /*
-* PHYS_TO_VM_PAGE() will truncate
-* unaligned addresses.
-*/
sl->pages = PHYS_TO_VM_PAGE(curaddr);
sl->dataoffs = curaddr & PAGE_MASK;
} else
@@ -1687,7 +1679,6 @@ add_bounce_page(bus_dma_tag_t dmat, bus_
bpage->busaddr |= addr & PAGE_MASK;
}
bpage->datavaddr = vaddr;
-   /* PHYS_TO_VM_PAGE() will truncate unaligned addresses. */
bpage->datapage = PHYS_TO_VM_PAGE(addr);
bpage->dataoffs = addr & PAGE_MASK;
bpage->datacount = size;

Modified: head/sys/arm/arm/busdma_machdep.c
==
--- head/sys/arm/arm/busdma_machdep.c   Fri Oct 23 11:45:38 2015
(r289824)
+++ head/sys/arm/arm/busdma_machdep.c   Fri Oct 23 12:03:25 2015
(r289825)
@@ -993,10 +993,6 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat
sl++;
sl->vaddr = 0;
sl->datacount = sgsize;
-   /*
-* PHYS_TO_VM_PAGE() will truncate
-* unaligned addresses.
-*/
sl->pages = PHYS_TO_VM_PAGE(curaddr);
sl->dataoffs = curaddr & PAGE_MASK;
} else
@@ -1108,10 +1104,6 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm
sl++;
sl->vaddr = kvaddr;
sl->datacount = sgsize;
-   /*
-* PHYS_TO_VM_PAGE() will truncate
-* unaligned addresses.
-*/
sl->pages = PHYS_TO_VM_PAGE(curaddr);
sl->dataoffs = curaddr & PAGE_MASK;
} else
@@ -1541,7 +1533,6 @@ add_bounce_page(bus_dma_tag_t dmat, bus_
bpage->busaddr |= addr & PAGE_MASK;
}
bpage->datavaddr = vaddr;
-   /* PHYS_TO_VM_PAGE() will truncate unaligned addresses. */
bpage->datapage = PHYS_TO_VM_PAGE(addr);
bpage->dataoffs = addr & PAGE_MASK;
bpage->datacount = size;

Modified: head/sys/arm64/arm64/busdma_bounce.c
==
--- head/sys/arm64/arm64/busdma_bounce.cFri Oct 23 11:45:38 2015
(r289824)
+++ head/sys/arm64/arm64/busdma_bounce.cFri Oct 23 12:03:25 2015
(r289825)
@@ -1009,7 +1009,6 @@ add_bounce_page(bus_dma_tag_t dmat, bus_
bpage->busaddr |= addr & PAGE_MASK;
}
bpage->datavaddr = vaddr;
-   /* PHYS_TO_VM_PAGE() will truncate unaligned addresses. */
bpage->datapage = PHYS_TO_VM_PAGE(addr);
bpage->dataoffs = addr & PAGE_MASK;
bpage->datacount = size;

Modified: head/sys/vm/vm_page.h
==
--- head/sys/vm/vm_page.h   Fri Oct 23 11:45:38 2015(r289824)
+++ head/sys/vm/vm_page.h   Fri Oct 23 12:03:25 2015(r289825)
@@ -375,6 +375,11 @@ extern

svn commit: r289824 - in head/sys: amd64/include i386/include

2015-10-23 Thread Konstantin Belousov
Author: kib
Date: Fri Oct 23 11:45:38 2015
New Revision: 289824
URL: https://svnweb.freebsd.org/changeset/base/289824

Log:
  Add CLFLUSHOPT instruction wrappers.
  
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/sys/amd64/include/cpufunc.h
  head/sys/i386/include/cpufunc.h

Modified: head/sys/amd64/include/cpufunc.h
==
--- head/sys/amd64/include/cpufunc.hFri Oct 23 11:43:56 2015
(r289823)
+++ head/sys/amd64/include/cpufunc.hFri Oct 23 11:45:38 2015
(r289824)
@@ -107,6 +107,13 @@ clflush(u_long addr)
 }
 
 static __inline void
+clflushopt(u_long addr)
+{
+
+   __asm __volatile(".byte 0x66;clflush %0" : : "m" (*(char *)addr));
+}
+
+static __inline void
 clts(void)
 {
 

Modified: head/sys/i386/include/cpufunc.h
==
--- head/sys/i386/include/cpufunc.h Fri Oct 23 11:43:56 2015
(r289823)
+++ head/sys/i386/include/cpufunc.h Fri Oct 23 11:45:38 2015
(r289824)
@@ -86,6 +86,13 @@ clflush(u_long addr)
 }
 
 static __inline void
+clflushopt(u_long addr)
+{
+
+   __asm __volatile(".byte 66;clflush %0" : : "m" (*(char *)addr));
+}
+
+static __inline void
 clts(void)
 {
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289823 - head/sys/x86/x86

2015-10-23 Thread Konstantin Belousov
Author: kib
Date: Fri Oct 23 11:43:56 2015
New Revision: 289823
URL: https://svnweb.freebsd.org/changeset/base/289823

Log:
  Decode new values for CPUID leaf 2 cache and TLB descriptors, from the
  Intel SDM revision 56.
  
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/sys/x86/x86/identcpu.c

Modified: head/sys/x86/x86/identcpu.c
==
--- head/sys/x86/x86/identcpu.c Fri Oct 23 11:41:55 2015(r289822)
+++ head/sys/x86/x86/identcpu.c Fri Oct 23 11:43:56 2015(r289823)
@@ -1883,6 +1883,18 @@ print_INTEL_TLB(u_int data)
case 0x68:
printf("1st-level data cache: 32 KB, 4 way set associative, 
sectored cache, 64 byte line size\n");
break;
+   case 0x6a:
+   printf("uTLB: 4KByte pages, 8-way set associative, 64 
entries\n");
+   break;
+   case 0x6b:
+   printf("DTLB: 4KByte pages, 8-way set associative, 256 
entries\n");
+   break;
+   case 0x6c:
+   printf("DTLB: 2M/4M pages, 8-way set associative, 126 
entries\n");
+   break;
+   case 0x6d:
+   printf("DTLB: 1 GByte pages, fully associative, 16 entries\n");
+   break;
case 0x70:
printf("Trace cache: 12K-uops, 8-way set associative\n");
break;
___
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: r289822 - head/sys/compat/linux

2015-10-23 Thread Konstantin Belousov
Author: kib
Date: Fri Oct 23 11:41:55 2015
New Revision: 289822
URL: https://svnweb.freebsd.org/changeset/base/289822

Log:
  Fix build for the KTR-enabled kernels.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/compat/linux/linux_misc.c

Modified: head/sys/compat/linux/linux_misc.c
==
--- head/sys/compat/linux/linux_misc.c  Fri Oct 23 11:00:35 2015
(r289821)
+++ head/sys/compat/linux/linux_misc.c  Fri Oct 23 11:41:55 2015
(r289822)
@@ -2356,7 +2356,13 @@ linux_ppoll(struct thread *td, struct li
 #if defined(DEBUG) || defined(KTR)
 /* XXX: can be removed when every ldebug(...) and KTR stuff are removed. */
 
-u_char linux_debug_map[howmany(LINUX_SYS_MAXSYSCALL, sizeof(u_char))];
+#ifdef COMPAT_LINUX32
+#defineL_MAXSYSCALLLINUX32_SYS_MAXSYSCALL
+#else
+#defineL_MAXSYSCALLLINUX_SYS_MAXSYSCALL
+#endif
+
+u_char linux_debug_map[howmany(L_MAXSYSCALL, sizeof(u_char))];
 
 static int
 linux_debug(int syscall, int toggle, int global)
@@ -2368,7 +2374,7 @@ linux_debug(int syscall, int toggle, int
memset(linux_debug_map, c, sizeof(linux_debug_map));
return (0);
}
-   if (syscall < 0 || syscall >= LINUX_SYS_MAXSYSCALL)
+   if (syscall < 0 || syscall >= L_MAXSYSCALL)
return (EINVAL);
if (toggle)
clrbit(linux_debug_map, syscall);
@@ -2376,6 +2382,7 @@ linux_debug(int syscall, int toggle, int
setbit(linux_debug_map, syscall);
return (0);
 }
+#undef L_MAXSYSCALL
 
 /*
  * Usage: sysctl linux.debug=.<0/1>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289457 - head/sys/x86/x86

2015-10-23 Thread Andriy Gapon
On 17/10/2015 17:58, Jason A. Harmening wrote:
> Author: jah
> Date: Sat Oct 17 14:58:55 2015
> New Revision: 289457
> URL: https://svnweb.freebsd.org/changeset/base/289457
> 
> Log:
>   Don't page-align the physical address when calling PHYS_TO_VM_PAGE().
>   
>   Mbusdma_bounce.c
> 
> Modified:
>   head/sys/x86/x86/busdma_bounce.c
> 
> Modified: head/sys/x86/x86/busdma_bounce.c
> ==
> --- head/sys/x86/x86/busdma_bounce.c  Sat Oct 17 14:48:39 2015
> (r289456)
> +++ head/sys/x86/x86/busdma_bounce.c  Sat Oct 17 14:58:55 2015
> (r289457)
> @@ -1006,7 +1006,8 @@ add_bounce_page(bus_dma_tag_t dmat, bus_
>   bpage->busaddr |= addr & PAGE_MASK;
>   }
>   bpage->datavaddr = vaddr;
> - bpage->datapage = PHYS_TO_VM_PAGE(addr & ~PAGE_MASK);
> + /* PHYS_TO_VM_PAGE() will truncate unaligned addresses. */
> + bpage->datapage = PHYS_TO_VM_PAGE(addr);
>   bpage->dataoffs = addr & PAGE_MASK;
>   bpage->datacount = size;
>   STAILQ_INSERT_TAIL(&(map->bpages), bpage, links);
> 

I agree with the essence of the change - applying the page mask was completely
redundant.  But I do not agree with the comment.  I know what you want say
there, but what the comment is actually saying is more confusing than having no
comment at all (IMO, of course).

Consider this description of PHYS_TO_VM_PAGE: PHYS_TO_VM_PAGE() returns a
vm_page_t object that represents a memory page to which the given physical
address belongs.

Why is the truncation needed?  What does it do?  What's the problem with
unaligned addresses?

It looks like the comment talks about a (possible) minor implementation detail
of PHYS_TO_VM_PAGE().

It seems that the comment has proliferated into more code since this commit.

P.S. It would be better, of course, if PHYS_TO_VM_PAGE had a manual page or at
least a comment near its declaration.

-- 
Andriy Gapon
___
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: r289762 - in head/tools/regression/net80211: ccmp tkip wep

2015-10-23 Thread Andriy Voskoboinyk

  Andriy,

On Thu, Oct 22, 2015 at 05:08:13PM +, Andriy Voskoboinyk wrote:
A> Log:
A>   Unbreak regression testing tools for net80211 crypto cipher modules
A>
A>   Approved by:adrian (mentor)
A>   Differential Revision:  https://reviews.freebsd.org/D3441
A>
A> Modified:
A>   head/tools/regression/net80211/ccmp/test_ccmp.c
A>   head/tools/regression/net80211/tkip/test_tkip.c
A>   head/tools/regression/net80211/wep/test_wep.c
A>
A> Modified: head/tools/regression/net80211/ccmp/test_ccmp.c
A>  
==
A> --- head/tools/regression/net80211/ccmp/test_ccmp.c	Thu Oct 22  
16:46:30 2015	(r289761)
A> +++ head/tools/regression/net80211/ccmp/test_ccmp.c	Thu Oct 22  
17:08:12 2015	(r289762)

A> @@ -53,6 +53,7 @@
A>  #include 
A>
A>  #include 
A> +#include 
A>  #include 

What do you need if_var.h for? The change is quite long, and not obvious,
so I can't find it myself.

I cleansed up userland from using if_var.h recently, so I am surprised
you need.

In the projects/ifnet branch the if_var.h is all embraced into _KERNEL  
ifdef.




This is not userland (every folder contains one source file for one kernel  
module).

___
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: r289762 - in head/tools/regression/net80211: ccmp tkip wep

2015-10-23 Thread Gleb Smirnoff
  Andriy,

On Thu, Oct 22, 2015 at 05:08:13PM +, Andriy Voskoboinyk wrote:
A> Log:
A>   Unbreak regression testing tools for net80211 crypto cipher modules
A>   
A>   Approved by:   adrian (mentor)
A>   Differential Revision: https://reviews.freebsd.org/D3441
A> 
A> Modified:
A>   head/tools/regression/net80211/ccmp/test_ccmp.c
A>   head/tools/regression/net80211/tkip/test_tkip.c
A>   head/tools/regression/net80211/wep/test_wep.c
A> 
A> Modified: head/tools/regression/net80211/ccmp/test_ccmp.c
A> 
==
A> --- head/tools/regression/net80211/ccmp/test_ccmp.c  Thu Oct 22 16:46:30 
2015(r289761)
A> +++ head/tools/regression/net80211/ccmp/test_ccmp.c  Thu Oct 22 17:08:12 
2015(r289762)
A> @@ -53,6 +53,7 @@
A>  #include 
A>  
A>  #include 
A> +#include 
A>  #include 

What do you need if_var.h for? The change is quite long, and not obvious,
so I can't find it myself.

I cleansed up userland from using if_var.h recently, so I am surprised
you need.

In the projects/ifnet branch the if_var.h is all embraced into _KERNEL ifdef.

-- 
Totus tuus, Glebius.
___
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: r289811 - head/sys/dev/usb/wlan

2015-10-23 Thread Hans Petter Selasky

On 10/23/15 10:26, Andriy Voskoboinyk wrote:

  static int
  urtwn_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
  {
@@ -1530,7 +1541,6 @@ urtwn_newstate(struct ieee80211vap *vap,
struct urtwn_softc *sc = ic->ic_softc;
struct ieee80211_node *ni;
enum ieee80211_state ostate;
-   uint32_t reg;


Hi Andriy,

You can quickly test-build the USB kernel modules like this before 
commit, to avoid most cases of kernel build failures:


make -m $PWD/share/mk -C sys/modules/usb/ clean cleandepend
make -m $PWD/share/mk -C sys/modules/usb/ depend all

make -m $PWD/share/mk -C sys/modules/usb/ clean cleandepend
make -m $PWD/share/mk -C sys/modules/usb/ DEBUG_FLAGS="-DUSB_DEBUG" 
depend all


I've simply restored a line you removed in r289811 in r289821 for now. 
If this was not correct or more changes should have been done, then 
please fix.


Good luck with updating the USB WLAN drivers.

--HPS
___
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: r289821 - head/sys/dev/usb/wlan

2015-10-23 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Oct 23 11:00:35 2015
New Revision: 289821
URL: https://svnweb.freebsd.org/changeset/base/289821

Log:
  Fix kernel build by restoring a temporary variable which was not yet
  ripe for removal.

Modified:
  head/sys/dev/usb/wlan/if_urtwn.c

Modified: head/sys/dev/usb/wlan/if_urtwn.c
==
--- head/sys/dev/usb/wlan/if_urtwn.cFri Oct 23 10:48:29 2015
(r289820)
+++ head/sys/dev/usb/wlan/if_urtwn.cFri Oct 23 11:00:35 2015
(r289821)
@@ -1542,6 +1542,7 @@ urtwn_newstate(struct ieee80211vap *vap,
struct urtwn_softc *sc = ic->ic_softc;
struct ieee80211_node *ni;
enum ieee80211_state ostate;
+   uint32_t reg;
 
ostate = vap->iv_state;
DPRINTF("%s -> %s\n", ieee80211_state_name[ostate],
___
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: r289700 - in head/sys/compat/linuxkpi: . common common/include common/include/asm common/include/linux common/src

2015-10-23 Thread Gleb Smirnoff
On Wed, Oct 21, 2015 at 08:42:02AM -0700, Bryan Drewery wrote:
B> >>> Log:
B> >>>Start process of moving the LinuxKPI into the default kernel build by
B> >>>creating an empty directory tree.
B> >>>
B> >>>Sponsored by:Mellanox Technologies
B> >>>
B> >>> Added:
B> >>>head/sys/compat/linuxkpi/
B> >>>head/sys/compat/linuxkpi/common/
B> >>>head/sys/compat/linuxkpi/common/include/
B> >>>head/sys/compat/linuxkpi/common/include/asm/
B> >>>head/sys/compat/linuxkpi/common/include/linux/
B> >>>head/sys/compat/linuxkpi/common/src/
B> >>>
B> >>
B> >> This makes me think a branch should be used instead.
B> >>
B> > 
B> > Most of what will be done is "svn mv" out of "sys/ofed" and changing
B> > some include paths in sys/modules and sys/conf . Can you explain why you
B> > think a branch is required ?
B> 
B> Because you're splitting commits up that should otherwise not be split
B> up. There's no reason to commit empty directories before a 'svn mv' into
B> them.

+1

Any commit to head should be an atomic change that does something useful:
fixes smth, adds something useful, or removes something obsoleted.

You can either bring in the linuxkpi to head in a single commit, or, if
you prefer to do a serie of commits, where intermediate state is rather
meaningless, then you should do this serie in a separate branch, and then
produce patch from the branch and commit it to head.

There is no need to revert r289700. This is just a note for future.

-- 
Totus tuus, Glebius.
___
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: r289820 - in stable/9/sys: amd64/include conf i386/include

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 10:48:29 2015
New Revision: 289820
URL: https://svnweb.freebsd.org/changeset/base/289820

Log:
  MFC r261891: provide fast versions of ffsl and flsl for i386; ffsll and
  flsll for amd64

Modified:
  stable/9/sys/amd64/include/cpufunc.h
  stable/9/sys/conf/files.arm
  stable/9/sys/conf/files.i386
  stable/9/sys/conf/files.ia64
  stable/9/sys/conf/files.mips
  stable/9/sys/conf/files.pc98
  stable/9/sys/conf/files.powerpc
  stable/9/sys/conf/files.sparc64
  stable/9/sys/i386/include/cpufunc.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/conf/   (props changed)

Modified: stable/9/sys/amd64/include/cpufunc.h
==
--- stable/9/sys/amd64/include/cpufunc.hFri Oct 23 10:39:43 2015
(r289819)
+++ stable/9/sys/amd64/include/cpufunc.hFri Oct 23 10:48:29 2015
(r289820)
@@ -154,6 +154,14 @@ ffsl(long mask)
return (mask == 0 ? mask : (int)bsfq((u_long)mask) + 1);
 }
 
+#defineHAVE_INLINE_FFSLL
+
+static __inline int
+ffsll(long long mask)
+{
+   return (ffsl((long)mask));
+}
+
 #defineHAVE_INLINE_FLS
 
 static __inline int
@@ -170,6 +178,14 @@ flsl(long mask)
return (mask == 0 ? mask : (int)bsrq((u_long)mask) + 1);
 }
 
+#defineHAVE_INLINE_FLSLL
+
+static __inline int
+flsll(long long mask)
+{
+   return (flsl((long)mask));
+}
+
 #endif /* _KERNEL */
 
 static __inline void

Modified: stable/9/sys/conf/files.arm
==
--- stable/9/sys/conf/files.arm Fri Oct 23 10:39:43 2015(r289819)
+++ stable/9/sys/conf/files.arm Fri Oct 23 10:48:29 2015(r289820)
@@ -68,6 +68,7 @@ libkern/divdi3.c  standard
 libkern/ffsl.c standard
 libkern/fls.c  standard
 libkern/flsl.c standard
+libkern/flsll.cstandard
 libkern/lshrdi3.c  standard
 libkern/memchr.c   optionalfdt
 libkern/moddi3.c   standard

Modified: stable/9/sys/conf/files.i386
==
--- stable/9/sys/conf/files.i386Fri Oct 23 10:39:43 2015
(r289819)
+++ stable/9/sys/conf/files.i386Fri Oct 23 10:48:29 2015
(r289820)
@@ -522,8 +522,7 @@ kern/kern_clocksource.c standard
 kern/imgact_aout.c optional compat_aout
 kern/imgact_gzip.c optional gzip
 libkern/divdi3.c   standard
-libkern/ffsl.c standard
-libkern/flsl.c standard
+libkern/flsll.cstandard
 libkern/memmove.c  standard
 libkern/memset.c   standard
 libkern/moddi3.c   standard

Modified: stable/9/sys/conf/files.ia64
==
--- stable/9/sys/conf/files.ia64Fri Oct 23 10:39:43 2015
(r289819)
+++ stable/9/sys/conf/files.ia64Fri Oct 23 10:48:29 2015
(r289820)
@@ -126,6 +126,7 @@ libkern/bcmp.c  standard
 libkern/ffsl.c standard
 libkern/fls.c  standard
 libkern/flsl.c standard
+libkern/flsll.cstandard
 libkern/ia64/__divdi3.Sstandard
 libkern/ia64/__divsi3.Sstandard
 libkern/ia64/__moddi3.Sstandard

Modified: stable/9/sys/conf/files.mips
==
--- stable/9/sys/conf/files.mipsFri Oct 23 10:39:43 2015
(r289819)
+++ stable/9/sys/conf/files.mipsFri Oct 23 10:48:29 2015
(r289820)
@@ -77,6 +77,7 @@ libkern/divdi3.c  optionalisa_mips32
 libkern/ffsl.c standard
 libkern/fls.c  standard
 libkern/flsl.c standard
+libkern/flsll.cstandard
 libkern/lshrdi3.c  standard
 libkern/memmove.c  standard
 libkern/moddi3.c   optionalisa_mips32

Modified: stable/9/sys/conf/files.pc98
==
--- stable/9/sys/conf/files.pc98Fri Oct 23 10:39:43 2015
(r289819)
+++ stable/9/sys/conf/files.pc98Fri Oct 23 10:48:29 2015
(r289820)
@@ -210,8 +210,7 @@ kern/kern_clocksource.c standard
 kern/imgact_aout.c optional compat_aout
 kern/imgact_gzip.c optional gzip
 libkern/divdi3.c   standard
-libkern/ffsl.c standard
-libkern/flsl.c standard
+libkern/flsll.cstandard
 libkern/memmove.c  standard
 libkern/memset.c   standard
 libkern/moddi3.c   standard

Modified: stable/9/sys/conf/files.powerpc
==

svn commit: r289819 - head/sys/cam/ctl

2015-10-23 Thread Alexander Motin
Author: mav
Date: Fri Oct 23 10:39:43 2015
New Revision: 289819
URL: https://svnweb.freebsd.org/changeset/base/289819

Log:
  Fix LUN disable in CAM broken at r285155.
  
  MFC after:1 week

Modified:
  head/sys/cam/ctl/scsi_ctl.c

Modified: head/sys/cam/ctl/scsi_ctl.c
==
--- head/sys/cam/ctl/scsi_ctl.c Fri Oct 23 10:05:43 2015(r289818)
+++ head/sys/cam/ctl/scsi_ctl.c Fri Oct 23 10:39:43 2015(r289819)
@@ -1879,7 +1879,7 @@ ctlfe_lun_disable(void *arg, int lun_id)
 
path = lun_softc->periph->path;
 
-   if ((xpt_path_target_id(path) == 0)
+   if ((xpt_path_target_id(path) == softc->target_id)
 && (xpt_path_lun_id(path) == lun_id)) {
break;
}
___
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: r289633 - head/sys/ofed/include/linux

2015-10-23 Thread Gleb Smirnoff
  Navdeep,

On Tue, Oct 20, 2015 at 11:51:47AM -0700, Navdeep Parhar wrote:
N> cxgb's copy of jhash.h does have a blank line before the $FreeBSD$ tag. 
N>   These days jenkins_hash is available in the kernel (see hash(9)) so 
N> there's no real need for cxgb to include this file, but I don't touch 
N> cxgb except for bug fixes.

You can consider that a style bug :), so that you can fix it.

-- 
Totus tuus, Glebius.
___
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: r289818 - in stable/10/sys: amd64/include conf i386/include

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 10:05:43 2015
New Revision: 289818
URL: https://svnweb.freebsd.org/changeset/base/289818

Log:
  MFC r261891: provide fast versions of ffsl and flsl for i386; ffsll and
  flsll for amd64

Modified:
  stable/10/sys/amd64/include/cpufunc.h
  stable/10/sys/conf/files
  stable/10/sys/conf/files.arm
  stable/10/sys/conf/files.i386
  stable/10/sys/conf/files.ia64
  stable/10/sys/conf/files.mips
  stable/10/sys/conf/files.pc98
  stable/10/sys/conf/files.powerpc
  stable/10/sys/conf/files.sparc64
  stable/10/sys/i386/include/cpufunc.h

Modified: stable/10/sys/amd64/include/cpufunc.h
==
--- stable/10/sys/amd64/include/cpufunc.h   Fri Oct 23 08:53:32 2015
(r289817)
+++ stable/10/sys/amd64/include/cpufunc.h   Fri Oct 23 10:05:43 2015
(r289818)
@@ -154,6 +154,14 @@ ffsl(long mask)
return (mask == 0 ? mask : (int)bsfq((u_long)mask) + 1);
 }
 
+#defineHAVE_INLINE_FFSLL
+
+static __inline int
+ffsll(long long mask)
+{
+   return (ffsl((long)mask));
+}
+
 #defineHAVE_INLINE_FLS
 
 static __inline int
@@ -170,6 +178,14 @@ flsl(long mask)
return (mask == 0 ? mask : (int)bsrq((u_long)mask) + 1);
 }
 
+#defineHAVE_INLINE_FLSLL
+
+static __inline int
+flsll(long long mask)
+{
+   return (flsl((long)mask));
+}
+
 #endif /* _KERNEL */
 
 static __inline void

Modified: stable/10/sys/conf/files
==
--- stable/10/sys/conf/filesFri Oct 23 08:53:32 2015(r289817)
+++ stable/10/sys/conf/filesFri Oct 23 10:05:43 2015(r289818)
@@ -3219,7 +3219,6 @@ libkern/asprintf.cstandard
 libkern/bcd.c  standard
 libkern/bsearch.c  standard
 libkern/crc32.cstandard
-libkern/flsll.c standard
 libkern/fnmatch.c  standard
 libkern/iconv.coptional libiconv
 libkern/iconv_converter_if.m   optional libiconv

Modified: stable/10/sys/conf/files.arm
==
--- stable/10/sys/conf/files.armFri Oct 23 08:53:32 2015
(r289817)
+++ stable/10/sys/conf/files.armFri Oct 23 10:05:43 2015
(r289818)
@@ -92,6 +92,7 @@ libkern/divdi3.c  standard
 libkern/ffsl.c standard
 libkern/fls.c  standard
 libkern/flsl.c standard
+libkern/flsll.cstandard
 libkern/lshrdi3.c  standard
 libkern/moddi3.c   standard
 libkern/qdivrem.c  standard

Modified: stable/10/sys/conf/files.i386
==
--- stable/10/sys/conf/files.i386   Fri Oct 23 08:53:32 2015
(r289817)
+++ stable/10/sys/conf/files.i386   Fri Oct 23 10:05:43 2015
(r289818)
@@ -538,8 +538,7 @@ kern/imgact_aout.c  optional compat_aout
 kern/imgact_binmisc.c  optional imagact_binmisc
 kern/imgact_gzip.c optional gzip
 libkern/divdi3.c   standard
-libkern/ffsl.c standard
-libkern/flsl.c standard
+libkern/flsll.cstandard
 libkern/memmove.c  standard
 libkern/memset.c   standard
 libkern/moddi3.c   standard

Modified: stable/10/sys/conf/files.ia64
==
--- stable/10/sys/conf/files.ia64   Fri Oct 23 08:53:32 2015
(r289817)
+++ stable/10/sys/conf/files.ia64   Fri Oct 23 10:05:43 2015
(r289818)
@@ -121,6 +121,7 @@ libkern/bcmp.c  standard
 libkern/ffsl.c standard
 libkern/fls.c  standard
 libkern/flsl.c standard
+libkern/flsll.cstandard
 libkern/ia64/__divdi3.Sstandard
 libkern/ia64/__divsi3.Sstandard
 libkern/ia64/__moddi3.Sstandard

Modified: stable/10/sys/conf/files.mips
==
--- stable/10/sys/conf/files.mips   Fri Oct 23 08:53:32 2015
(r289817)
+++ stable/10/sys/conf/files.mips   Fri Oct 23 10:05:43 2015
(r289818)
@@ -56,6 +56,7 @@ kern/subr_dummy_vdso_tc.c standard
 libkern/ffsl.c standard
 libkern/fls.c  standard
 libkern/flsl.c standard
+libkern/flsll.cstandard
 libkern/memmove.c  standard
 libkern/cmpdi2.c   optionalmips | mipsel
 libkern/ucmpdi2.c  optionalmips | mipsel

Modified: stable/10/sys/conf/files.pc98
===

Re: svn commit: r289765 - in head/sys: conf libkern sys

2015-10-23 Thread Bruce Evans

On Thu, 22 Oct 2015, Conrad E. Meyer wrote:


Log:
 Add libkern ffsll() for parity with flsll()

 Sponsored by:  EMC / Isilon Storage Division



This fills a much needed gap, like the one filled by flsll().

It uses the long long abomination.

uintmax_t has been Standard since 1999, but is still not supported
by the ffs() family.

It further expands the design error in ffs().
  (ffs() only supports ints.  Its behaviour on negative values is
  undocumented, but needs documentation more than for non-negative
  values because even in the 2's complement case, the sign bit can
  be anywhere).  The bad BSD documented is for ffs() is duplicated
  in POSIX in at least old versions.  I think this requires ffs()
  to operate on values, so it cannot work in the 1's complement
  case.  The -0 has all bits 1 but value 0.  ffs(-0) by value must
  be -1, and ABIs are probably allowed to pass -0 as +0 so ffs(-0)
  is probably -1 even if ffs() is by bits.)
Due to this design error, it is not obvious that even u_char is
directly supported by the ffs() family.  It is supported because
POSIX requires 8-bit chars so chars get promoted to non-negative
ints when passed to ffs().  This doesn't happen for u_int, but
you can promote u_int manually to long long to get correct and
pessimal code.  This doesn't work for u_foo that is already
of larger rank than long long.


Added: head/sys/libkern/ffsll.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/libkern/ffsll.cThu Oct 22 20:28:37 2015(r289765)
+ ...
+/*
+ * Find First Set bit
+ */
+int
+ffsll(long long mask)
+{
+   int bit;
+
+   if (mask == 0)
+   return (0);
+   for (bit = 1; !(mask & 1); bit++)
+   mask = (unsigned long long)mask >> 1;
+   return (bit);
+}


This has the usual implementation for negative values.  They are cast
to the correct unsigned type to get defined behaviour for the shift.
The cast itself gives implementation-defined behaviour.  Even when the
compiler was gcc so that it was documented in man pages and info pages,
the documentation for this was hard to find.  Whatever it is, it gives
the undocumented behaviour of the function.

This implementation is pessimal unless the compiler can convert it to
special instructions.  On i386, 2 32-bit ffs()'s are more portable and
much faster, since each one uses a special instruction and it is not
possible to do much better.  (But fls64() can be done better in userland
using the FPU or perhaps SSE.)

clang optimizes similar simple loops for popcount() but doesn't optimize
the ones used in libc for the ffs() family.  If it did optimize these
loops, 2 32-bit ffs()'s with asms inside them wouldn't be so good, but
for bswap64() we arranged for compilers to good combining for even more
complicated variations.  (For bswap*, clang converts the complicated C
expression giving the rearrangement to minimal bswap instruction(s),
but we hard-code these instructions in asm because gcc can't do this
in the old versions in FreeBSD, and then arrange so that clang can
combine the asms efficiently on i386.)

Efficiency of the ffs() family is rarely important.  bitset.h uses ffsl()
but bitstring.h uses a simple loop.

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: r289817 - head/sys/dev/isp

2015-10-23 Thread Alexander Motin
Author: mav
Date: Fri Oct 23 08:53:32 2015
New Revision: 289817
URL: https://svnweb.freebsd.org/changeset/base/289817

Log:
  Disable full bus scan by CAM for FC adapters.
  
  FC port database code already notifies CAM about all devices.  Additional
  full scan is just a waste of time, that by definition won't find anything
  that is not present in port database.

Modified:
  head/sys/dev/isp/isp_freebsd.c
  head/sys/dev/isp/isp_freebsd.h
  head/sys/dev/isp/isp_pci.c

Modified: head/sys/dev/isp/isp_freebsd.c
==
--- head/sys/dev/isp/isp_freebsd.c  Fri Oct 23 08:44:40 2015
(r289816)
+++ head/sys/dev/isp/isp_freebsd.c  Fri Oct 23 08:53:32 2015
(r289817)
@@ -54,7 +54,6 @@ int isp_fabric_hysteresis = 5;
 int isp_loop_down_limit = 60;  /* default loop down limit */
 int isp_quickboot_time = 7;/* don't wait more than N secs for loop up */
 int isp_gone_device_time = 30; /* grace time before reporting device lost */
-int isp_autoconfig = 1;/* automatically attach/detach devices 
*/
 static const char prom3[] = "Chan %d [%u] PortID 0x%06x Departed because of 
%s";
 
 static void isp_freeze_loopdown(ispsoftc_t *, int, char *);
@@ -418,6 +417,9 @@ isp_freeze_loopdown(ispsoftc_t *isp, int
if (fc->simqfrozen == 0) {
isp_prt(isp, ISP_LOGDEBUG0, "%s: freeze simq (loopdown) 
chan %d", msg, chan);
fc->simqfrozen = SIMQFRZ_LOOPDOWN;
+#if __FreeBSD_version >= 139
+   xpt_hold_boot();
+#endif
xpt_freeze_simq(fc->sim, 1);
} else {
isp_prt(isp, ISP_LOGDEBUG0, "%s: mark frozen (loopdown) 
chan %d", msg, chan);
@@ -436,6 +438,9 @@ isp_unfreeze_loopdown(ispsoftc_t *isp, i
if (wasfrozen && fc->simqfrozen == 0) {
isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "%s: Chan %d 
releasing simq", __func__, chan);
xpt_release_simq(fc->sim, 1);
+#if __FreeBSD_version >= 139
+   xpt_release_boot();
+#endif
}
}
 }
@@ -4596,10 +4601,6 @@ isp_make_here(ispsoftc_t *isp, fcportdb_
union ccb *ccb;
struct isp_fc *fc = ISP_FC_PC(isp, chan);
 
-   if (isp_autoconfig == 0) {
-   return;
-   }
-
/*
 * Allocate a CCB, create a wildcard path for this target and schedule 
a rescan.
 */
@@ -4623,9 +4624,6 @@ isp_make_gone(ispsoftc_t *isp, fcportdb_
struct cam_path *tp;
struct isp_fc *fc = ISP_FC_PC(isp, chan);
 
-   if (isp_autoconfig == 0) {
-   return;
-   }
if (xpt_create_path(&tp, NULL, cam_sim_path(fc->sim), tgt, 
CAM_LUN_WILDCARD) == CAM_REQ_CMP) {
xpt_async(AC_LOST_DEVICE, tp, NULL);
xpt_free_path(tp);
@@ -5510,6 +5508,9 @@ isp_action(struct cam_sim *sim, union cc
fcparam *fcp = FCPARAM(isp, bus);
 
cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED;
+#if __FreeBSD_version >= 139
+   cpi->hba_misc |= PIM_NOSCAN;
+#endif
 
/*
 * Because our loop ID can shift from time to time,

Modified: head/sys/dev/isp/isp_freebsd.h
==
--- head/sys/dev/isp/isp_freebsd.h  Fri Oct 23 08:44:40 2015
(r289816)
+++ head/sys/dev/isp/isp_freebsd.h  Fri Oct 23 08:53:32 2015
(r289817)
@@ -734,7 +734,6 @@ extern int isp_fabric_hysteresis;
 extern int isp_loop_down_limit;
 extern int isp_gone_device_time;
 extern int isp_quickboot_time;
-extern int isp_autoconfig;
 
 /*
  * Platform private flags

Modified: head/sys/dev/isp/isp_pci.c
==
--- head/sys/dev/isp/isp_pci.c  Fri Oct 23 08:44:40 2015(r289816)
+++ head/sys/dev/isp/isp_pci.c  Fri Oct 23 08:53:32 2015(r289817)
@@ -489,9 +489,6 @@ isp_get_generic_options(device_t dev, is
if (tval > 0 && tval < 127) {
isp_nvports = tval;
}
-   tval = 1;
-   (void) resource_int_value(device_get_name(dev), device_get_unit(dev), 
"autoconfig", &tval);
-   isp_autoconfig = tval;
tval = 7;
(void) resource_int_value(device_get_name(dev), device_get_unit(dev), 
"quickboot_time", &tval);
isp_quickboot_time = tval;
___
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: r289816 - head/sys/dev/usb/wlan

2015-10-23 Thread Andriy Voskoboinyk
Author: avos
Date: Fri Oct 23 08:44:40 2015
New Revision: 289816
URL: https://svnweb.freebsd.org/changeset/base/289816

Log:
  urtwn(4): add DBM_ANTNOISE radiotap field
  
  Reviewed by:  kevlo
  Approved by:  adrian (mentor)
  Differential Revision:https://reviews.freebsd.org/D3839

Modified:
  head/sys/dev/usb/wlan/if_urtwn.c
  head/sys/dev/usb/wlan/if_urtwnvar.h

Modified: head/sys/dev/usb/wlan/if_urtwn.c
==
--- head/sys/dev/usb/wlan/if_urtwn.cFri Oct 23 08:38:10 2015
(r289815)
+++ head/sys/dev/usb/wlan/if_urtwn.cFri Oct 23 08:44:40 2015
(r289816)
@@ -666,6 +666,7 @@ urtwn_rx_frame(struct urtwn_softc *sc, u
tap->wr_rate = 0x80 | (rate - 12);
}
tap->wr_dbm_antsignal = rssi;
+   tap->wr_dbm_antnoise = URTWN_NOISE_FLOOR;
tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq);
tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags);
}

Modified: head/sys/dev/usb/wlan/if_urtwnvar.h
==
--- head/sys/dev/usb/wlan/if_urtwnvar.h Fri Oct 23 08:38:10 2015
(r289815)
+++ head/sys/dev/usb/wlan/if_urtwnvar.h Fri Oct 23 08:44:40 2015
(r289816)
@@ -37,14 +37,16 @@ struct urtwn_rx_radiotap_header {
uint8_t wr_rate;
uint16_twr_chan_freq;
uint16_twr_chan_flags;
-   uint8_t wr_dbm_antsignal;
+   int8_t  wr_dbm_antsignal;
+   int8_t  wr_dbm_antnoise;
 } __packed __aligned(8);
 
 #define URTWN_RX_RADIOTAP_PRESENT  \
(1 << IEEE80211_RADIOTAP_FLAGS |\
 1 << IEEE80211_RADIOTAP_RATE | \
 1 << IEEE80211_RADIOTAP_CHANNEL |  \
-1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL)
+1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL |\
+1 << IEEE80211_RADIOTAP_DBM_ANTNOISE)
 
 struct urtwn_tx_radiotap_header {
struct ieee80211_radiotap_header wt_ihdr;
___
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: r289815 - stable/9/sys/cddl/contrib/opensolaris/uts/common/sys

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 08:38:10 2015
New Revision: 289815
URL: https://svnweb.freebsd.org/changeset/base/289815

Log:
  MFC r284591: illums compat: use flsl/flsll for highbit/highbit64

Modified:
  stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h
==
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.hFri Oct 
23 08:35:39 2015(r289814)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.hFri Oct 
23 08:38:10 2015(r289815)
@@ -32,6 +32,9 @@
 
 #include 
 #include 
+#if defined(__FreeBSD__) && defined(_KERNEL)
+#include 
+#endif
 
 #ifdef __cplusplus
 extern "C" {
@@ -382,6 +385,9 @@ extern unsigned char bcd_to_byte[256];
 static __inline int
 highbit(ulong_t i)
 {
+#if defined(__FreeBSD__) && defined(_KERNEL) && defined(HAVE_INLINE_FLSL)
+   return (flsl(i));
+#else
register int h = 1;
 
if (i == 0)
@@ -407,6 +413,7 @@ highbit(ulong_t i)
h += 1;
}
return (h);
+#endif
 }
 
 /*
@@ -416,6 +423,9 @@ highbit(ulong_t i)
 static __inline int
 highbit64(uint64_t i)
 {
+#if defined(__FreeBSD__) && defined(_KERNEL) && defined(HAVE_INLINE_FLSLL)
+   return (flsll(i));
+#else
int h = 1;
 
if (i == 0)
@@ -439,6 +449,7 @@ highbit64(uint64_t i)
h += 1;
}
return (h);
+#endif
 }
 
 #ifdef __cplusplus
___
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: r289813 - in stable/10: . cddl/contrib/opensolaris/cmd/sgs cddl/usr.bin cddl/usr.bin/sgsmsg tools/build/mk

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 08:35:17 2015
New Revision: 289813
URL: https://svnweb.freebsd.org/changeset/base/289813

Log:
  MFC r288339: remove unused sgsmsg utility (originally imported from 
opensolaris)

Deleted:
  stable/10/cddl/contrib/opensolaris/cmd/sgs/
  stable/10/cddl/usr.bin/sgsmsg/
Modified:
  stable/10/Makefile.inc1
  stable/10/ObsoleteFiles.inc
  stable/10/cddl/usr.bin/Makefile
  stable/10/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/Makefile.inc1
==
--- stable/10/Makefile.inc1 Fri Oct 23 08:26:45 2015(r289812)
+++ stable/10/Makefile.inc1 Fri Oct 23 08:35:17 2015(r289813)
@@ -1311,7 +1311,7 @@ ${_bt}-usr.bin/clang/tblgen: ${_bt}-lib/
 ((${BOOTSTRAPPING} < 134 && \
   !(${BOOTSTRAPPING} >= 901505 && ${BOOTSTRAPPING} < 99)) \
   || (${MACHINE} != ${TARGET} || ${MACHINE_ARCH} != ${TARGET_ARCH}))
-_dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \
+_dtrace_tools= cddl/lib/libctf lib/libelf \
 lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge
 
 ${_bt}-cddl/usr.bin/ctfconvert: ${_bt}-lib/libelf ${_bt}-lib/libdwarf 
${_bt}-cddl/lib/libctf

Modified: stable/10/ObsoleteFiles.inc
==
--- stable/10/ObsoleteFiles.inc Fri Oct 23 08:26:45 2015(r289812)
+++ stable/10/ObsoleteFiles.inc Fri Oct 23 08:35:17 2015(r289813)
@@ -38,6 +38,8 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20151023: unused sgsmsg utility is removed
+OLD_FILES+=usr/bin/sgsmsg
 # 20150506
 OLD_FILES+=usr/share/man/man9/NDHASGIANT.9.gz
 # 20141223: remove in6_gif.h and in_gif.h

Modified: stable/10/cddl/usr.bin/Makefile
==
--- stable/10/cddl/usr.bin/Makefile Fri Oct 23 08:26:45 2015
(r289812)
+++ stable/10/cddl/usr.bin/Makefile Fri Oct 23 08:35:17 2015
(r289813)
@@ -6,7 +6,6 @@ SUBDIR= \
ctfconvert \
ctfdump \
ctfmerge \
-   sgsmsg \
${_tests} \
${_zinject} \
${_zlook} \

Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc
==
--- stable/10/tools/build/mk/OptionalObsoleteFiles.inc  Fri Oct 23 08:26:45 
2015(r289812)
+++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc  Fri Oct 23 08:35:17 
2015(r289813)
@@ -539,7 +539,6 @@ OLD_LIBS+=lib/libuutil.so.2
 OLD_FILES+=usr/bin/ctfconvert
 OLD_FILES+=usr/bin/ctfdump
 OLD_FILES+=usr/bin/ctfmerge
-OLD_FILES+=usr/bin/sgsmsg
 OLD_FILES+=usr/lib/dtrace/drti.o
 OLD_FILES+=usr/lib/dtrace/errno.d
 OLD_FILES+=usr/lib/dtrace/io.d
___
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: r289814 - in stable/9: . cddl/contrib/opensolaris/cmd/sgs cddl/usr.bin cddl/usr.bin/sgsmsg tools/build/mk

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 08:35:39 2015
New Revision: 289814
URL: https://svnweb.freebsd.org/changeset/base/289814

Log:
  MFC r288339: remove unused sgsmsg utility (originally imported from 
opensolaris)

Deleted:
  stable/9/cddl/contrib/opensolaris/cmd/sgs/
  stable/9/cddl/usr.bin/sgsmsg/
Modified:
  stable/9/Makefile.inc1   (contents, props changed)
  stable/9/ObsoleteFiles.inc   (contents, props changed)
  stable/9/cddl/usr.bin/Makefile
  stable/9/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  stable/9/   (props changed)
  stable/9/cddl/contrib/opensolaris/   (props changed)
  stable/9/tools/build/   (props changed)

Modified: stable/9/Makefile.inc1
==
--- stable/9/Makefile.inc1  Fri Oct 23 08:35:17 2015(r289813)
+++ stable/9/Makefile.inc1  Fri Oct 23 08:35:39 2015(r289814)
@@ -1171,7 +1171,7 @@ ${_bt}-usr.bin/clang/tblgen: ${_bt}-lib/
 ((${BOOTSTRAPPING} < 134 && \
   !(${BOOTSTRAPPING} >= 901505 && ${BOOTSTRAPPING} < 99)) \
   || (${MACHINE} != ${TARGET} || ${MACHINE_ARCH} != ${TARGET_ARCH}))
-_dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \
+_dtrace_tools= cddl/lib/libctf lib/libelf \
 lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge
 
 ${_bt}-cddl/usr.bin/ctfconvert: ${_bt}-lib/libelf ${_bt}-lib/libdwarf 
${_bt}-cddl/lib/libctf

Modified: stable/9/ObsoleteFiles.inc
==
--- stable/9/ObsoleteFiles.inc  Fri Oct 23 08:35:17 2015(r289813)
+++ stable/9/ObsoleteFiles.inc  Fri Oct 23 08:35:39 2015(r289814)
@@ -38,6 +38,8 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20151023: unused sgsmsg utility is removed
+OLD_FILES+=usr/bin/sgsmsg
 # 20140922: sleepq_calc_signal_retval.9 and sleepq_catch_signals.9 removed
 OLD_FILES+=usr/share/man/man9/sleepq_calc_signal_retval.9.gz
 OLD_FILES+=usr/share/man/man9/sleepq_catch_signals.9.gz

Modified: stable/9/cddl/usr.bin/Makefile
==
--- stable/9/cddl/usr.bin/Makefile  Fri Oct 23 08:35:17 2015
(r289813)
+++ stable/9/cddl/usr.bin/Makefile  Fri Oct 23 08:35:39 2015
(r289814)
@@ -6,7 +6,6 @@ SUBDIR= \
ctfconvert \
ctfdump \
ctfmerge \
-   sgsmsg \
${_zinject} \
${_zlook} \
${_zstreamdump} \

Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc
==
--- stable/9/tools/build/mk/OptionalObsoleteFiles.inc   Fri Oct 23 08:35:17 
2015(r289813)
+++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc   Fri Oct 23 08:35:39 
2015(r289814)
@@ -678,7 +678,6 @@ OLD_LIBS+=lib/libuutil.so.2
 OLD_FILES+=usr/bin/ctfconvert
 OLD_FILES+=usr/bin/ctfdump
 OLD_FILES+=usr/bin/ctfmerge
-OLD_FILES+=usr/bin/sgsmsg
 OLD_FILES+=usr/lib/dtrace/drti.o
 OLD_FILES+=usr/lib/dtrace/errno.d
 OLD_FILES+=usr/lib/dtrace/psinfo.d
___
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: r289811 - head/sys/dev/usb/wlan

2015-10-23 Thread Andriy Voskoboinyk
Author: avos
Date: Fri Oct 23 08:26:26 2015
New Revision: 289811
URL: https://svnweb.freebsd.org/changeset/base/289811

Log:
  - Split one 4-byte R92C_CR register into 2-byte R92C_CR and 1-byte R92C_MSR
  registers (they are used for different purposes).
  - Wrap R92C_MSR modifications into urtwn_set_mode().
  
  Reviewed by:  kevlo
  Approved by:  adrian (mentor)
  Differential Revision:https://reviews.freebsd.org/D3838

Modified:
  head/sys/dev/usb/wlan/if_urtwn.c
  head/sys/dev/usb/wlan/if_urtwnreg.h

Modified: head/sys/dev/usb/wlan/if_urtwn.c
==
--- head/sys/dev/usb/wlan/if_urtwn.cFri Oct 23 08:16:10 2015
(r289810)
+++ head/sys/dev/usb/wlan/if_urtwn.cFri Oct 23 08:26:26 2015
(r289811)
@@ -222,6 +222,7 @@ static void urtwn_r88e_read_rom(struct 
 static int urtwn_ra_init(struct urtwn_softc *);
 static voidurtwn_tsf_sync_enable(struct urtwn_softc *);
 static voidurtwn_set_led(struct urtwn_softc *, int, int);
+static voidurtwn_set_mode(struct urtwn_softc *, uint8_t);
 static int urtwn_newstate(struct ieee80211vap *,
enum ieee80211_state, int);
 static voidurtwn_watchdog(void *);
@@ -1522,6 +1523,16 @@ urtwn_set_led(struct urtwn_softc *sc, in
}
 }
 
+static void
+urtwn_set_mode(struct urtwn_softc *sc, uint8_t mode)
+{
+   uint8_t reg;
+
+   reg = urtwn_read_1(sc, R92C_MSR);
+   reg = (reg & ~R92C_MSR_MASK) | mode;
+   urtwn_write_1(sc, R92C_MSR, reg);
+}
+
 static int
 urtwn_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
 {
@@ -1530,7 +1541,6 @@ urtwn_newstate(struct ieee80211vap *vap,
struct urtwn_softc *sc = ic->ic_softc;
struct ieee80211_node *ni;
enum ieee80211_state ostate;
-   uint32_t reg;
 
ostate = vap->iv_state;
DPRINTF("%s -> %s\n", ieee80211_state_name[ostate],
@@ -1545,9 +1555,7 @@ urtwn_newstate(struct ieee80211vap *vap,
urtwn_set_led(sc, URTWN_LED_LINK, 0);
 
/* Set media status to 'No Link'. */
-   reg = urtwn_read_4(sc, R92C_CR);
-   reg = RW(reg, R92C_CR_NETTYPE, R92C_CR_NETTYPE_NOLINK);
-   urtwn_write_4(sc, R92C_CR, reg);
+   urtwn_set_mode(sc, R92C_MSR_NOLINK);
 
/* Stop Rx of data frames. */
urtwn_write_2(sc, R92C_RXFLTMAP2, 0);
@@ -1632,9 +1640,7 @@ urtwn_newstate(struct ieee80211vap *vap,
 
ni = ieee80211_ref_node(vap->iv_bss);
/* Set media status to 'Associated'. */
-   reg = urtwn_read_4(sc, R92C_CR);
-   reg = RW(reg, R92C_CR_NETTYPE, R92C_CR_NETTYPE_INFRA);
-   urtwn_write_4(sc, R92C_CR, reg);
+   urtwn_set_mode(sc, R92C_MSR_INFRA);
 
/* Set BSSID. */
urtwn_write_4(sc, R92C_BSSID + 0, LE_READ_4(&ni->ni_bssid[0]));
@@ -3294,9 +3300,7 @@ urtwn_init(struct urtwn_softc *sc)
urtwn_write_region_1(sc, R92C_MACID, macaddr, IEEE80211_ADDR_LEN);
 
/* Set initial network type. */
-   reg = urtwn_read_4(sc, R92C_CR);
-   reg = RW(reg, R92C_CR_NETTYPE, R92C_CR_NETTYPE_INFRA);
-   urtwn_write_4(sc, R92C_CR, reg);
+   urtwn_set_mode(sc, R92C_MSR_INFRA);
 
urtwn_rxfilter_init(sc);
 

Modified: head/sys/dev/usb/wlan/if_urtwnreg.h
==
--- head/sys/dev/usb/wlan/if_urtwnreg.h Fri Oct 23 08:16:10 2015
(r289810)
+++ head/sys/dev/usb/wlan/if_urtwnreg.h Fri Oct 23 08:26:26 2015
(r289811)
@@ -96,6 +96,7 @@
 #define R92C_SYS_CFG   0x0f0
 /* MAC General Configuration. */
 #define R92C_CR0x100
+#define R92C_MSR   0x102
 #define R92C_PBP   0x104
 #define R92C_TRXDMA_CTRL   0x10c
 #define R92C_TRXFF_BNDY0x114
@@ -377,22 +378,23 @@
 #define R92C_SYS_CFG_TYPE_92C  0x0800
 
 /* Bits for R92C_CR. */
-#define R92C_CR_HCI_TXDMA_EN   0x0001
-#define R92C_CR_HCI_RXDMA_EN   0x0002
-#define R92C_CR_TXDMA_EN   0x0004
-#define R92C_CR_RXDMA_EN   0x0008
-#define R92C_CR_PROTOCOL_EN0x0010
-#define R92C_CR_SCHEDULE_EN0x0020
-#define R92C_CR_MACTXEN0x0040
-#define R92C_CR_MACRXEN0x0080
-#define R92C_CR_ENSEC  0x0200
-#define R92C_CR_CALTMR_EN  0x0400
-#define R92C_CR_NETTYPE_S  16
-#define R92C_CR_NETTYPE_M  0x0003
-#define R92C_CR_NETTYPE_NOLINK 0
-#define R92C_CR_NETTYPE_ADHOC  1
-#define R92C_CR_NETTYPE_INFRA  2
-#define R92C_CR_NETTYPE_AP 3
+#define R92C_CR_HCI_TXDMA_EN   0x0001
+#define R92C_CR_HCI_RXDMA_EN   0x0002
+#define R92C_CR_TXDMA_EN   0x0004
+#define R92C_CR_RXDMA_EN   0x0008
+#define R92C_CR_PROTOCOL_EN

svn commit: r289812 - head/sys/dev/isp

2015-10-23 Thread Alexander Motin
Author: mav
Date: Fri Oct 23 08:26:45 2015
New Revision: 289812
URL: https://svnweb.freebsd.org/changeset/base/289812

Log:
  Some polishing and unification in ISR code.

Modified:
  head/sys/dev/isp/isp.c
  head/sys/dev/isp/isp_freebsd.c
  head/sys/dev/isp/isp_pci.c
  head/sys/dev/isp/isp_sbus.c
  head/sys/dev/isp/ispreg.h
  head/sys/dev/isp/ispvar.h

Modified: head/sys/dev/isp/isp.c
==
--- head/sys/dev/isp/isp.c  Fri Oct 23 08:26:26 2015(r289811)
+++ head/sys/dev/isp/isp.c  Fri Oct 23 08:26:45 2015(r289812)
@@ -5037,7 +5037,7 @@ isp_control(ispsoftc_t *isp, ispctl_t ct
 #endif
 
 void
-isp_intr(ispsoftc_t *isp, uint32_t isr, uint16_t sema, uint16_t mbox)
+isp_intr(ispsoftc_t *isp, uint16_t isr, uint16_t sema, uint16_t info)
 {
XS_T *complist[MAX_REQUESTQ_COMPLETIONS], *xs;
uint32_t iptr, optr, junk;
@@ -5051,11 +5051,11 @@ again:
 */
if (sema) {
  fmbox:
-   if (mbox & MBOX_COMMAND_COMPLETE) {
+   if (info & MBOX_COMMAND_COMPLETE) {
isp->isp_intmboxc++;
if (isp->isp_mboxbsy) {
int obits = isp->isp_obits;
-   isp->isp_mboxtmp[0] = mbox;
+   isp->isp_mboxtmp[0] = info;
for (i = 1; i < ISP_NMBOX(isp); i++) {
if ((obits & (1 << i)) == 0) {
continue;
@@ -5069,15 +5069,15 @@ again:
}
MBOX_NOTIFY_COMPLETE(isp);
} else {
-   isp_prt(isp, ISP_LOGWARN, "mailbox cmd (0x%x) 
with no waiters", mbox);
+   isp_prt(isp, ISP_LOGWARN, "mailbox cmd (0x%x) 
with no waiters", info);
}
} else {
-   i = IS_FC(isp)? isp_parse_async_fc(isp, mbox) : 
isp_parse_async(isp, mbox);
+   i = IS_FC(isp)? isp_parse_async_fc(isp, info) : 
isp_parse_async(isp, info);
if (i < 0) {
return;
}
}
-   if ((IS_FC(isp) && mbox != ASYNC_RIOZIO_STALL) || 
isp->isp_state != ISP_RUNSTATE) {
+   if ((IS_FC(isp) && info != ASYNC_RIOZIO_STALL) || 
isp->isp_state != ISP_RUNSTATE) {
goto out;
}
}
@@ -5092,7 +5092,8 @@ again:
 if (isp->isp_mboxbsy && isp->isp_lastmbxcmd == 
MBOX_ABOUT_FIRMWARE) {
goto fmbox;
}
-   isp_prt(isp, ISP_LOGINFO, "interrupt (ISR=%x SEMA=%x) when not 
ready", isr, sema);
+   isp_prt(isp, ISP_LOGINFO, "interrupt (ISR=%x SEMA=%x INFO=%x) "
+   "when not ready", isr, sema, info);
/*
 * Thank you very much!  *Burrrp*!
 */
@@ -5110,8 +5111,8 @@ again:
 * Check for ATIO Queue entries.
 */
if (IS_24XX(isp) &&
-   ((isr & BIU2400_R2HST_ISTAT_MASK) == ISP2400R2HST_ATIO_RSPQ_UPDATE 
||
-(isr & BIU2400_R2HST_ISTAT_MASK) == 
ISP2400R2HST_ATIO_RQST_UPDATE)) {
+   (isr == ISPR2HST_ATIO_UPDATE || isr == ISPR2HST_ATIO_RSPQ_UPDATE ||
+isr == ISPR2HST_ATIO_UPDATE2)) {
iptr = ISP_READ(isp, BIU2400_ATIO_RSPINP);
optr = isp->isp_atioodx;
 
@@ -5145,25 +5146,6 @@ again:
 #endif
 
/*
-* Get the current Response Queue Out Pointer.
-*
-* If we're a 2300 or 2400, we can ask what hardware what it thinks.
-*/
-#if 0
-   if (IS_23XX(isp) || IS_24XX(isp)) {
-   optr = ISP_READ(isp, isp->isp_respoutrp);
-   /*
-* Debug: to be taken out eventually
-*/
-   if (isp->isp_resodx != optr) {
-   isp_prt(isp, ISP_LOGINFO, "isp_intr: hard optr=%x, soft 
optr %x", optr, isp->isp_resodx);
-   isp->isp_resodx = optr;
-   }
-   } else
-#endif
-   optr = isp->isp_resodx;
-
-   /*
 * You *must* read the Response Queue In Pointer
 * prior to clearing the RISC interrupt.
 *
@@ -5184,6 +5166,7 @@ again:
iptr = ISP_READ(isp, isp->isp_respinrp);
}
 
+   optr = isp->isp_resodx;
if (optr == iptr && sema == 0) {
/*
 * There are a lot of these- reasons unknown- mostly on
@@ -5207,8 +5190,8 @@ again:
;
} else {
sema = ISP_READ(isp, BIU_SEMA);
-   mbox = ISP_READ(isp, OUTMAILBOX0);
-   if ((sema & 0x3) && (mbox & 0x8000)) {
+   

svn commit: r289810 - stable/9/sys/cddl/dev/sdt

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 08:16:10 2015
New Revision: 289810
URL: https://svnweb.freebsd.org/changeset/base/289810

Log:
  MFC r288363: std: it is important that func name is never an empty string

Modified:
  stable/9/sys/cddl/dev/sdt/sdt.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/cddl/dev/sdt/sdt.c
==
--- stable/9/sys/cddl/dev/sdt/sdt.c Fri Oct 23 08:15:53 2015
(r289809)
+++ stable/9/sys/cddl/dev/sdt/sdt.c Fri Oct 23 08:16:10 2015
(r289810)
@@ -169,6 +169,8 @@ sdt_create_probe(struct sdt_probe *probe
 * in the C compiler, so we have to respect const vs non-const.
 */
strlcpy(func, probe->func, sizeof(func));
+   if (func[0] == '\0')
+   strcpy(func, "none");
 
from = probe->name;
to = name;
___
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: r289809 - stable/10/sys/cddl/dev/sdt

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 08:15:53 2015
New Revision: 289809
URL: https://svnweb.freebsd.org/changeset/base/289809

Log:
  MFC r288363: std: it is important that func name is never an empty string

Modified:
  stable/10/sys/cddl/dev/sdt/sdt.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/dev/sdt/sdt.c
==
--- stable/10/sys/cddl/dev/sdt/sdt.cFri Oct 23 08:12:43 2015
(r289808)
+++ stable/10/sys/cddl/dev/sdt/sdt.cFri Oct 23 08:15:53 2015
(r289809)
@@ -169,6 +169,8 @@ sdt_create_probe(struct sdt_probe *probe
 * in the C compiler, so we have to respect const vs non-const.
 */
strlcpy(func, probe->func, sizeof(func));
+   if (func[0] == '\0')
+   strcpy(func, "none");
 
from = probe->name;
to = name;
___
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: r289808 - in stable/9/cddl/lib: libzfs libzfs_core

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 08:12:43 2015
New Revision: 289808
URL: https://svnweb.freebsd.org/changeset/base/289808

Log:
  MFC r284409: Fix circular dependency between libzfs and libzfs_core
  
  By bapt.

Modified:
  stable/9/cddl/lib/libzfs/Makefile
  stable/9/cddl/lib/libzfs_core/Makefile
Directory Properties:
  stable/9/cddl/lib/libzfs/   (props changed)
  stable/9/cddl/lib/libzfs_core/   (props changed)

Modified: stable/9/cddl/lib/libzfs/Makefile
==
--- stable/9/cddl/lib/libzfs/Makefile   Fri Oct 23 08:12:00 2015
(r289807)
+++ stable/9/cddl/lib/libzfs/Makefile   Fri Oct 23 08:12:43 2015
(r289808)
@@ -33,7 +33,6 @@ SRCS+=libzfs_changelist.c \
zfs_comutil.c \
zfs_deleg.c \
zfs_fletcher.c \
-   zfs_ioctl_compat.c \
zfs_namecheck.c \
zfs_prop.c \
zpool_prop.c \

Modified: stable/9/cddl/lib/libzfs_core/Makefile
==
--- stable/9/cddl/lib/libzfs_core/Makefile  Fri Oct 23 08:12:00 2015
(r289807)
+++ stable/9/cddl/lib/libzfs_core/Makefile  Fri Oct 23 08:12:43 2015
(r289808)
@@ -11,7 +11,8 @@ DPADD=${LIBNVPAIR}
 LDADD= -lnvpair
 
 SRCS=  libzfs_core.c \
-   libzfs_core_compat.c
+   libzfs_core_compat.c \
+   zfs_ioctl_compat.c
 
 SRCS+= libzfs_compat.c
 
___
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: r289807 - in stable/10/cddl/lib: libzfs libzfs_core

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 08:12:00 2015
New Revision: 289807
URL: https://svnweb.freebsd.org/changeset/base/289807

Log:
  MFC r284409: Fix circular dependency between libzfs and libzfs_core
  
  By bapt.

Modified:
  stable/10/cddl/lib/libzfs/Makefile
  stable/10/cddl/lib/libzfs_core/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/cddl/lib/libzfs/Makefile
==
--- stable/10/cddl/lib/libzfs/Makefile  Fri Oct 23 08:04:59 2015
(r289806)
+++ stable/10/cddl/lib/libzfs/Makefile  Fri Oct 23 08:12:00 2015
(r289807)
@@ -37,7 +37,6 @@ SRCS+=libzfs_changelist.c \
zfs_comutil.c \
zfs_deleg.c \
zfs_fletcher.c \
-   zfs_ioctl_compat.c \
zfs_namecheck.c \
zfs_prop.c \
zpool_prop.c \

Modified: stable/10/cddl/lib/libzfs_core/Makefile
==
--- stable/10/cddl/lib/libzfs_core/Makefile Fri Oct 23 08:04:59 2015
(r289806)
+++ stable/10/cddl/lib/libzfs_core/Makefile Fri Oct 23 08:12:00 2015
(r289807)
@@ -11,7 +11,8 @@ DPADD=${LIBNVPAIR}
 LDADD= -lnvpair
 
 SRCS=  libzfs_core.c \
-   libzfs_core_compat.c
+   libzfs_core_compat.c \
+   zfs_ioctl_compat.c
 
 SRCS+= libzfs_compat.c
 
___
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: r289806 - in stable/9: cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/opensolaris/lib/libzpool/common sys/cddl/contrib/opensolaris/common/nvpair

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 08:04:59 2015
New Revision: 289806
URL: https://svnweb.freebsd.org/changeset/base/289806

Log:
  MFC r288340: define aok in libnvpair which is linked to all zfs
  libraries that need aok

Modified:
  stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c
  stable/9/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
  stable/9/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c
Directory Properties:
  stable/9/cddl/contrib/opensolaris/   (props changed)
  stable/9/cddl/contrib/opensolaris/lib/libzfs/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c
==
--- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c   Fri Oct 
23 08:01:46 2015(r289805)
+++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c   Fri Oct 
23 08:04:59 2015(r289806)
@@ -55,7 +55,6 @@
 #include "zfs_prop.h"
 #include "zfeature_common.h"
 
-int aok;
 
 int
 libzfs_errno(libzfs_handle_t *hdl)

Modified: stable/9/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
==
--- stable/9/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c  Fri Oct 
23 08:01:46 2015(r289805)
+++ stable/9/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c  Fri Oct 
23 08:04:59 2015(r289806)
@@ -44,7 +44,9 @@
  * Emulation of kernel services in userland.
  */
 
+#ifndef __FreeBSD__
 int aok;
+#endif
 uint64_t physmem;
 vnode_t *rootdir = (vnode_t *)0xabcd1234;
 char hw_serial[HW_HOSTID_LEN];

Modified: stable/9/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c
==
--- stable/9/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.cFri Oct 
23 08:01:46 2015(r289805)
+++ stable/9/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.cFri Oct 
23 08:04:59 2015(r289806)
@@ -44,6 +44,14 @@
 #endif
 #defineskip_whitespace(p)  while ((*(p) == ' ') || (*(p) == '\t')) 
p++
 
+#if defined(__FreeBSD__) && !defined(_KERNEL)
+/*
+ * libnvpair is the lowest commen denominator for ZFS related libraries,
+ * defining aok here makes it usable by all ZFS related libraries
+ */
+int aok;
+#endif
+
 /*
  * nvpair.c - Provides kernel & userland interfaces for manipulating
  * name-value pairs.
___
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: r289805 - in stable/10: cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/opensolaris/lib/libzpool/common sys/cddl/contrib/opensolaris/common/nvpair

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 08:01:46 2015
New Revision: 289805
URL: https://svnweb.freebsd.org/changeset/base/289805

Log:
  MFC r288340: define aok in libnvpair which is linked to all zfs
  libraries that need aok

Modified:
  stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c
  stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
  stable/10/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c
==
--- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c  Fri Oct 
23 07:57:33 2015(r289804)
+++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c  Fri Oct 
23 08:01:46 2015(r289805)
@@ -55,7 +55,6 @@
 #include "zfs_prop.h"
 #include "zfeature_common.h"
 
-int aok;
 
 int
 libzfs_errno(libzfs_handle_t *hdl)

Modified: stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
==
--- stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Fri Oct 
23 07:57:33 2015(r289804)
+++ stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Fri Oct 
23 08:01:46 2015(r289805)
@@ -45,7 +45,9 @@
  * Emulation of kernel services in userland.
  */
 
+#ifndef __FreeBSD__
 int aok;
+#endif
 uint64_t physmem;
 vnode_t *rootdir = (vnode_t *)0xabcd1234;
 char hw_serial[HW_HOSTID_LEN];

Modified: stable/10/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c
==
--- stable/10/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c   Fri Oct 
23 07:57:33 2015(r289804)
+++ stable/10/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c   Fri Oct 
23 08:01:46 2015(r289805)
@@ -44,6 +44,14 @@
 #endif
 #defineskip_whitespace(p)  while ((*(p) == ' ') || (*(p) == '\t')) 
p++
 
+#if defined(__FreeBSD__) && !defined(_KERNEL)
+/*
+ * libnvpair is the lowest commen denominator for ZFS related libraries,
+ * defining aok here makes it usable by all ZFS related libraries
+ */
+int aok;
+#endif
+
 /*
  * nvpair.c - Provides kernel & userland interfaces for manipulating
  * name-value pairs.
___
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: r289803 - stable/10/sys/cddl/dev/sdt

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 07:57:21 2015
New Revision: 289803
URL: https://svnweb.freebsd.org/changeset/base/289803

Log:
  MFC r288362: sdt: start checking version field when parsing probe definitions

Modified:
  stable/10/sys/cddl/dev/sdt/sdt.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/dev/sdt/sdt.c
==
--- stable/10/sys/cddl/dev/sdt/sdt.cFri Oct 23 07:48:40 2015
(r289802)
+++ stable/10/sys/cddl/dev/sdt/sdt.cFri Oct 23 07:57:21 2015
(r289803)
@@ -142,6 +142,12 @@ sdt_create_probe(struct sdt_probe *probe
char *to;
size_t len;
 
+   if (probe->version != (int)sizeof(*probe)) {
+   printf("ignoring probe %p, version %u expected %u\n",
+   probe, probe->version, (int)sizeof(*probe));
+   return;
+   }
+
TAILQ_FOREACH(prov, &sdt_prov_list, prov_entry)
if (strcmp(prov->name, probe->prov->name) == 0)
break;
___
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: r289804 - stable/9/sys/cddl/dev/sdt

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 07:57:33 2015
New Revision: 289804
URL: https://svnweb.freebsd.org/changeset/base/289804

Log:
  MFC r288362: sdt: start checking version field when parsing probe definitions

Modified:
  stable/9/sys/cddl/dev/sdt/sdt.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/cddl/dev/sdt/sdt.c
==
--- stable/9/sys/cddl/dev/sdt/sdt.c Fri Oct 23 07:57:21 2015
(r289803)
+++ stable/9/sys/cddl/dev/sdt/sdt.c Fri Oct 23 07:57:33 2015
(r289804)
@@ -142,6 +142,12 @@ sdt_create_probe(struct sdt_probe *probe
char *to;
size_t len;
 
+   if (probe->version != (int)sizeof(*probe)) {
+   printf("ignoring probe %p, version %u expected %u\n",
+   probe, probe->version, (int)sizeof(*probe));
+   return;
+   }
+
TAILQ_FOREACH(prov, &sdt_prov_list, prov_entry)
if (strcmp(prov->name, probe->prov->name) == 0)
break;
___
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: r289802 - stable/9/cddl/contrib/opensolaris/common/avl

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 07:48:40 2015
New Revision: 289802
URL: https://svnweb.freebsd.org/changeset/base/289802

Log:
  MFC r288337: remove an extra copy of avl.c from illumos contrib code

Deleted:
  stable/9/cddl/contrib/opensolaris/common/avl/avl.c
Modified:
Directory Properties:
  stable/9/cddl/contrib/opensolaris/common/avl/   (props changed)
___
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: r289801 - stable/10/cddl/contrib/opensolaris/common/avl

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 07:48:28 2015
New Revision: 289801
URL: https://svnweb.freebsd.org/changeset/base/289801

Log:
  MFC r288337: remove an extra copy of avl.c from illumos contrib code

Deleted:
  stable/10/cddl/contrib/opensolaris/common/avl/avl.c
Modified:
Directory Properties:
  stable/10/   (props changed)
___
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: r289800 - in stable/9/sys: compat/linux kern tools

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 07:44:03 2015
New Revision: 289800
URL: https://svnweb.freebsd.org/changeset/base/289800

Log:
  MFC r288336: save some bytes by using more concise SDT_PROBE

Modified:
  stable/9/sys/compat/linux/linux_dtrace.h
  stable/9/sys/kern/kern_exec.c
  stable/9/sys/kern/kern_exit.c
  stable/9/sys/kern/kern_fork.c
  stable/9/sys/kern/kern_proc.c
  stable/9/sys/kern/kern_racct.c
  stable/9/sys/kern/kern_sig.c
  stable/9/sys/kern/kern_timeout.c
  stable/9/sys/kern/vfs_cache.c
  stable/9/sys/kern/vfs_lookup.c
  stable/9/sys/kern/vfs_syscalls.c
  stable/9/sys/tools/vnode_if.awk
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/compat/linux/linux_dtrace.h
==
--- stable/9/sys/compat/linux/linux_dtrace.hFri Oct 23 07:42:56 2015
(r289799)
+++ stable/9/sys/compat/linux/linux_dtrace.hFri Oct 23 07:44:03 2015
(r289800)
@@ -82,7 +82,7 @@
 c, d, e, f)
 #defineLIN_SDT_PROBE4(a, b, c, d, e, f, g) 
SDT_PROBE4(LINUX_DTRACE, a, b, \
 c, d, e, f, g)
-#define_LIN_SDT_PROBE5(a, b, c, d, e, f, g, h, i)  SDT_PROBE(a, b, 
c, d, \
+#define_LIN_SDT_PROBE5(a, b, c, d, e, f, g, h, i)  SDT_PROBE5(a, 
b, c, d, \
 e, f, g, h, i)
 #defineLIN_SDT_PROBE5(a, b, c, d, e, f, g, h)  
_LIN_SDT_PROBE5(LINUX_DTRACE, \
 a, b, c, d, e, f, g, h)

Modified: stable/9/sys/kern/kern_exec.c
==
--- stable/9/sys/kern/kern_exec.c   Fri Oct 23 07:42:56 2015
(r289799)
+++ stable/9/sys/kern/kern_exec.c   Fri Oct 23 07:44:03 2015
(r289800)
@@ -426,7 +426,7 @@ do_execve(td, args, mac_p)
| MPSAFE | AUDITVNODE1, UIO_SYSSPACE, args->fname, td);
}
 
-   SDT_PROBE(proc, kernel, , exec, args->fname, 0, 0, 0, 0 );
+   SDT_PROBE1(proc, kernel, , exec, args->fname);
 
 interpret:
if (args->fname != NULL) {
@@ -848,7 +848,7 @@ interpret:
 
vfs_mark_atime(imgp->vp, td->td_ucred);
 
-   SDT_PROBE(proc, kernel, , exec__success, args->fname, 0, 0, 0, 0);
+   SDT_PROBE1(proc, kernel, , exec__success, args->fname);
 
 done1:
/*
@@ -930,7 +930,7 @@ exec_fail:
p->p_flag &= ~P_INEXEC;
PROC_UNLOCK(p);
 
-   SDT_PROBE(proc, kernel, , exec__failure, error, 0, 0, 0, 0);
+   SDT_PROBE1(proc, kernel, , exec__failure, error);
 
 done2:
 #ifdef MAC

Modified: stable/9/sys/kern/kern_exit.c
==
--- stable/9/sys/kern/kern_exit.c   Fri Oct 23 07:42:56 2015
(r289799)
+++ stable/9/sys/kern/kern_exit.c   Fri Oct 23 07:44:03 2015
(r289800)
@@ -533,7 +533,7 @@ exit1(struct thread *td, int rv)
reason = CLD_DUMPED;
else if (WIFSIGNALED(rv))
reason = CLD_KILLED;
-   SDT_PROBE(proc, kernel, , exit, reason, 0, 0, 0, 0);
+   SDT_PROBE1(proc, kernel, , exit, reason);
 #endif
 
/*

Modified: stable/9/sys/kern/kern_fork.c
==
--- stable/9/sys/kern/kern_fork.c   Fri Oct 23 07:42:56 2015
(r289799)
+++ stable/9/sys/kern/kern_fork.c   Fri Oct 23 07:44:03 2015
(r289800)
@@ -742,7 +742,7 @@ do_fork(struct thread *td, int flags, st
 * Tell any interested parties about the new process.
 */
knote_fork(&p1->p_klist, p2->p_pid);
-   SDT_PROBE(proc, kernel, , create, p2, p1, flags, 0, 0);
+   SDT_PROBE3(proc, kernel, , create, p2, p1, flags);
 
/*
 * Wait until debugger is attached to child.

Modified: stable/9/sys/kern/kern_proc.c
==
--- stable/9/sys/kern/kern_proc.c   Fri Oct 23 07:42:56 2015
(r289799)
+++ stable/9/sys/kern/kern_proc.c   Fri Oct 23 07:44:03 2015
(r289800)
@@ -180,9 +180,9 @@ proc_ctor(void *mem, int size, void *arg
struct proc *p;
 
p = (struct proc *)mem;
-   SDT_PROBE(proc, kernel, ctor , entry, p, size, arg, flags, 0);
+   SDT_PROBE4(proc, kernel, ctor , entry, p, size, arg, flags);
EVENTHANDLER_INVOKE(process_ctor, p);
-   SDT_PROBE(proc, kernel, ctor , return, p, size, arg, flags, 0);
+   SDT_PROBE4(proc, kernel, ctor , return, p, size, arg, flags);
return (0);
 }
 
@@ -198,7 +198,7 @@ proc_dtor(void *mem, int size, void *arg
/* INVARIANTS checks go here */
p = (struct proc *)mem;
td = FIRST_THREAD_IN_PROC(p);
-   SDT_PROBE(proc, kernel, dtor, entry, p, size, arg, td, 0);
+   SDT_PROBE4(proc, kernel, dtor, entry, p, size, arg, td);
if (td != NULL) {
 #ifdef INVARIANTS
KASSERT((p->p_numthreads == 1),
@@ -211,7 +211,7 @@ proc_dtor(void *mem, int size, void *arg
EVENTHANDLER_INVOKE(process_dtor, p)

svn commit: r289799 - head/sys/dev/usb/wlan

2015-10-23 Thread Andriy Voskoboinyk
Author: avos
Date: Fri Oct 23 07:42:56 2015
New Revision: 289799
URL: https://svnweb.freebsd.org/changeset/base/289799

Log:
  urtwn(4): fix the RSSI calculation for RTL8188EU.
  
  This change also reverts r252405 (causes integer underflow).
  
  Reviewed by:  kevlo
  Approved by:  adrian (mentor)
  Differential Revision:https://reviews.freebsd.org/D3820

Modified:
  head/sys/dev/usb/wlan/if_urtwn.c
  head/sys/dev/usb/wlan/if_urtwnreg.h

Modified: head/sys/dev/usb/wlan/if_urtwn.c
==
--- head/sys/dev/usb/wlan/if_urtwn.cFri Oct 23 07:40:43 2015
(r289798)
+++ head/sys/dev/usb/wlan/if_urtwn.cFri Oct 23 07:42:56 2015
(r289799)
@@ -86,7 +86,6 @@ SYSCTL_INT(_hw_usb_urtwn, OID_AUTO, debu
 "Debug level");
 #endif
 
-#defineURTWN_RSSI(r)  (r) - 110
 #defineIEEE80211_HAS_ADDR4(wh) IEEE80211_IS_DSTODS(wh)
 
 /* various supported device vendors/products */
@@ -641,11 +640,6 @@ urtwn_rx_frame(struct urtwn_softc *sc, u
rssi = urtwn_get_rssi(sc, rate, &stat[1]);
/* Update our average RSSI. */
urtwn_update_avgrssi(sc, rate, rssi);
-   /*
-* Convert the RSSI to a range that will be accepted
-* by net80211.
-*/
-   rssi = URTWN_RSSI(rssi);
}
 
m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
@@ -792,10 +786,12 @@ tr_setup:
(struct ieee80211_frame_min *)wh);
nf = URTWN_NOISE_FLOOR;
if (ni != NULL) {
-   (void)ieee80211_input(ni, m, rssi, nf);
+   (void)ieee80211_input(ni, m, rssi - nf, nf);
ieee80211_free_node(ni);
-   } else
-   (void)ieee80211_input_all(ic, m, rssi, nf);
+   } else {
+   (void)ieee80211_input_all(ic, m, rssi - nf,
+   nf);
+   }
m = next;
}
URTWN_LOCK(sc);

Modified: head/sys/dev/usb/wlan/if_urtwnreg.h
==
--- head/sys/dev/usb/wlan/if_urtwnreg.h Fri Oct 23 07:40:43 2015
(r289798)
+++ head/sys/dev/usb/wlan/if_urtwnreg.h Fri Oct 23 07:42:56 2015
(r289799)
@@ -975,22 +975,22 @@ struct r92c_rx_cck {
 
 struct r88e_rx_cck {
uint8_t path_agc[2];
+   uint8_t chan;
+   uint8_t reserved1;
uint8_t sig_qual;
uint8_t agc_rpt;
uint8_t rpt_b;
-   uint8_t reserved1;
+   uint8_t reserved2;
uint8_t noise_power;
uint8_t path_cfotail[2];
uint8_t pcts_mask[2];   
uint8_t stream_rxevm[2];
uint8_t path_rxsnr[2];
uint8_t noise_power_db_lsb;
-   uint8_t reserved2[3];
+   uint8_t reserved3[3];
uint8_t stream_csi[2];
uint8_t stream_target_csi[2];
uint8_t sig_evm;
-   uint8_t reserved3;
-   uint8_t reserved4;
 } __packed;
 
 /* Tx MAC descriptor. */
___
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: r289798 - in stable/10/sys: compat/linux kern tools

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 07:40:43 2015
New Revision: 289798
URL: https://svnweb.freebsd.org/changeset/base/289798

Log:
  MFC r288336: save some bytes by using more concise SDT_PROBE

Modified:
  stable/10/sys/compat/linux/linux_dtrace.h
  stable/10/sys/kern/kern_exec.c
  stable/10/sys/kern/kern_exit.c
  stable/10/sys/kern/kern_fork.c
  stable/10/sys/kern/kern_proc.c
  stable/10/sys/kern/kern_racct.c
  stable/10/sys/kern/kern_sig.c
  stable/10/sys/kern/kern_timeout.c
  stable/10/sys/kern/vfs_cache.c
  stable/10/sys/kern/vfs_lookup.c
  stable/10/sys/kern/vfs_syscalls.c
  stable/10/sys/tools/vnode_if.awk
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/compat/linux/linux_dtrace.h
==
--- stable/10/sys/compat/linux/linux_dtrace.h   Fri Oct 23 07:38:34 2015
(r289797)
+++ stable/10/sys/compat/linux/linux_dtrace.h   Fri Oct 23 07:40:43 2015
(r289798)
@@ -82,7 +82,7 @@
 c, d, e, f)
 #defineLIN_SDT_PROBE4(a, b, c, d, e, f, g) 
SDT_PROBE4(LINUX_DTRACE, a, b, \
 c, d, e, f, g)
-#define_LIN_SDT_PROBE5(a, b, c, d, e, f, g, h, i)  SDT_PROBE(a, b, 
c, d, \
+#define_LIN_SDT_PROBE5(a, b, c, d, e, f, g, h, i)  SDT_PROBE5(a, 
b, c, d, \
 e, f, g, h, i)
 #defineLIN_SDT_PROBE5(a, b, c, d, e, f, g, h)  
_LIN_SDT_PROBE5(LINUX_DTRACE, \
 a, b, c, d, e, f, g, h)

Modified: stable/10/sys/kern/kern_exec.c
==
--- stable/10/sys/kern/kern_exec.c  Fri Oct 23 07:38:34 2015
(r289797)
+++ stable/10/sys/kern/kern_exec.c  Fri Oct 23 07:40:43 2015
(r289798)
@@ -416,7 +416,7 @@ do_execve(td, args, mac_p)
| AUDITVNODE1, UIO_SYSSPACE, args->fname, td);
}
 
-   SDT_PROBE(proc, kernel, , exec, args->fname, 0, 0, 0, 0 );
+   SDT_PROBE1(proc, kernel, , exec, args->fname);
 
 interpret:
if (args->fname != NULL) {
@@ -838,7 +838,7 @@ interpret:
 
vfs_mark_atime(imgp->vp, td->td_ucred);
 
-   SDT_PROBE(proc, kernel, , exec__success, args->fname, 0, 0, 0, 0);
+   SDT_PROBE1(proc, kernel, , exec__success, args->fname);
 
VOP_UNLOCK(imgp->vp, 0);
 done1:
@@ -909,7 +909,7 @@ exec_fail:
p->p_flag &= ~P_INEXEC;
PROC_UNLOCK(p);
 
-   SDT_PROBE(proc, kernel, , exec__failure, error, 0, 0, 0, 0);
+   SDT_PROBE1(proc, kernel, , exec__failure, error);
 
 done2:
 #ifdef MAC

Modified: stable/10/sys/kern/kern_exit.c
==
--- stable/10/sys/kern/kern_exit.c  Fri Oct 23 07:38:34 2015
(r289797)
+++ stable/10/sys/kern/kern_exit.c  Fri Oct 23 07:40:43 2015
(r289798)
@@ -564,7 +564,7 @@ exit1(struct thread *td, int rv)
reason = CLD_DUMPED;
else if (WIFSIGNALED(rv))
reason = CLD_KILLED;
-   SDT_PROBE(proc, kernel, , exit, reason, 0, 0, 0, 0);
+   SDT_PROBE1(proc, kernel, , exit, reason);
 #endif
 
/*

Modified: stable/10/sys/kern/kern_fork.c
==
--- stable/10/sys/kern/kern_fork.c  Fri Oct 23 07:38:34 2015
(r289797)
+++ stable/10/sys/kern/kern_fork.c  Fri Oct 23 07:40:43 2015
(r289798)
@@ -753,7 +753,7 @@ do_fork(struct thread *td, int flags, st
 * Tell any interested parties about the new process.
 */
knote_fork(&p1->p_klist, p2->p_pid);
-   SDT_PROBE(proc, kernel, , create, p2, p1, flags, 0, 0);
+   SDT_PROBE3(proc, kernel, , create, p2, p1, flags);
 
/*
 * Wait until debugger is attached to child.

Modified: stable/10/sys/kern/kern_proc.c
==
--- stable/10/sys/kern/kern_proc.c  Fri Oct 23 07:38:34 2015
(r289797)
+++ stable/10/sys/kern/kern_proc.c  Fri Oct 23 07:40:43 2015
(r289798)
@@ -181,9 +181,9 @@ proc_ctor(void *mem, int size, void *arg
struct proc *p;
 
p = (struct proc *)mem;
-   SDT_PROBE(proc, kernel, ctor , entry, p, size, arg, flags, 0);
+   SDT_PROBE4(proc, kernel, ctor , entry, p, size, arg, flags);
EVENTHANDLER_INVOKE(process_ctor, p);
-   SDT_PROBE(proc, kernel, ctor , return, p, size, arg, flags, 0);
+   SDT_PROBE4(proc, kernel, ctor , return, p, size, arg, flags);
return (0);
 }
 
@@ -199,7 +199,7 @@ proc_dtor(void *mem, int size, void *arg
/* INVARIANTS checks go here */
p = (struct proc *)mem;
td = FIRST_THREAD_IN_PROC(p);
-   SDT_PROBE(proc, kernel, dtor, entry, p, size, arg, td, 0);
+   SDT_PROBE4(proc, kernel, dtor, entry, p, size, arg, td);
if (td != NULL) {
 #ifdef INVARIANTS
KASSERT((p->p_numthreads == 1),
@@ -212,7 +212,7 @@ proc_dtor(void *mem, int size, void *arg
EVENTHAND

svn commit: r289797 - head/usr.bin/dpv

2015-10-23 Thread Devin Teske
Author: dteske
Date: Fri Oct 23 07:38:34 2015
New Revision: 289797
URL: https://svnweb.freebsd.org/changeset/base/289797

Log:
  dpv(1) merged to stable/10 before release/10.2.0
  
  MFC after:3 days
  X-MFC-to: stable/10

Modified:
  head/usr.bin/dpv/dpv.1

Modified: head/usr.bin/dpv/dpv.1
==
--- head/usr.bin/dpv/dpv.1  Fri Oct 23 07:37:54 2015(r289796)
+++ head/usr.bin/dpv/dpv.1  Fri Oct 23 07:38:34 2015(r289797)
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2013-2014 Devin Teske
+.\" Copyright (c) 2013-2015 Devin Teske
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd Sep 7, 2014
+.Dd Oct 22, 2015
 .Dt DPV 1
 .Os
 .Sh NAME
@@ -366,7 +366,7 @@ dpv -o /dev/md42 < /dev/zero
 A
 .Nm
 utility first appeared in
-.Fx 11.0 .
+.Fx 10.2 .
 .Sh AUTHORS
 .An Devin Teske Aq dte...@freebsd.org
 .Sh BUGS
___
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: r289794 - head/lib/libfigpar

2015-10-23 Thread Devin Teske
Author: dteske
Date: Fri Oct 23 07:37:27 2015
New Revision: 289794
URL: https://svnweb.freebsd.org/changeset/base/289794

Log:
  figpar(3) merged to stable/10 before release/10.2.0
  
  MFC after:3 days
  X-MFC-to: stable/10

Modified:
  head/lib/libfigpar/figpar.3

Modified: head/lib/libfigpar/figpar.3
==
--- head/lib/libfigpar/figpar.3 Fri Oct 23 07:36:27 2015(r289793)
+++ head/lib/libfigpar/figpar.3 Fri Oct 23 07:37:27 2015(r289794)
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2013-2014 Devin Teske 
+.\" Copyright (c) 2013-2015 Devin Teske 
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd Oct 24, 2014
+.Dd Oct 22, 2015
 .Dt FIGPAR 3
 .Os
 .Sh NAME
@@ -243,7 +243,7 @@ Convert a string to lower case.
 The
 .Nm
 library first appeared in
-.Fx 11.0 .
+.Fx 10.2 .
 .Sh AUTHORS
 .An Devin Teske Aq dte...@freebsd.org
 .Sh BUGS
___
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: r289796 - stable/9/sys/sys

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 07:37:54 2015
New Revision: 289796
URL: https://svnweb.freebsd.org/changeset/base/289796

Log:
  MFC r288366: sdt.h: no need for argtype_list_head

Modified:
  stable/9/sys/sys/sdt.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/sys/   (props changed)

Modified: stable/9/sys/sys/sdt.h
==
--- stable/9/sys/sys/sdt.h  Fri Oct 23 07:37:44 2015(r289795)
+++ stable/9/sys/sys/sdt.h  Fri Oct 23 07:37:54 2015(r289796)
@@ -398,7 +398,7 @@ struct sdt_probe {
struct sdt_provider *prov;  /* Ptr to the provider structure. */
TAILQ_ENTRY(sdt_probe)
probe_entry;/* SDT probe list entry. */
-   TAILQ_HEAD(argtype_list_head, sdt_argtype) argtype_list;
+   TAILQ_HEAD(, sdt_argtype) argtype_list;
const char  *mod;
const char  *func;
const char  *name;
___
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: r289795 - stable/10/sys/sys

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 07:37:44 2015
New Revision: 289795
URL: https://svnweb.freebsd.org/changeset/base/289795

Log:
  MFC r288366: sdt.h: no need for argtype_list_head

Modified:
  stable/10/sys/sys/sdt.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/sys/sdt.h
==
--- stable/10/sys/sys/sdt.h Fri Oct 23 07:37:27 2015(r289794)
+++ stable/10/sys/sys/sdt.h Fri Oct 23 07:37:44 2015(r289795)
@@ -398,7 +398,7 @@ struct sdt_probe {
struct sdt_provider *prov;  /* Ptr to the provider structure. */
TAILQ_ENTRY(sdt_probe)
probe_entry;/* SDT probe list entry. */
-   TAILQ_HEAD(argtype_list_head, sdt_argtype) argtype_list;
+   TAILQ_HEAD(, sdt_argtype) argtype_list;
const char  *mod;
const char  *func;
const char  *name;
___
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: r289792 - stable/9/sys/cddl/dev/sdt

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 07:35:48 2015
New Revision: 289792
URL: https://svnweb.freebsd.org/changeset/base/289792

Log:
  MFC r288365: sdt: static-ize couple of variables

Modified:
  stable/9/sys/cddl/dev/sdt/sdt.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/cddl/dev/sdt/sdt.c
==
--- stable/9/sys/cddl/dev/sdt/sdt.c Fri Oct 23 07:35:39 2015
(r289791)
+++ stable/9/sys/cddl/dev/sdt/sdt.c Fri Oct 23 07:35:48 2015
(r289792)
@@ -100,8 +100,8 @@ static dtrace_pops_t sdt_pops = {
 
 static TAILQ_HEAD(, sdt_provider) sdt_prov_list;
 
-eventhandler_tag   sdt_kld_load_tag;
-eventhandler_tag   sdt_kld_unload_try_tag;
+static eventhandler_tagsdt_kld_load_tag;
+static eventhandler_tagsdt_kld_unload_try_tag;
 
 static void
 sdt_create_provider(struct sdt_provider *prov)
___
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: r289793 - head/lib/libdpv

2015-10-23 Thread Devin Teske
Author: dteske
Date: Fri Oct 23 07:36:27 2015
New Revision: 289793
URL: https://svnweb.freebsd.org/changeset/base/289793

Log:
  Bump date/copyright after correcting HISTORY
  
  MFC after:3 days
  X-MFC-to: stable/10
  X-MFC-with:   r289790

Modified:
  head/lib/libdpv/dpv.3

Modified: head/lib/libdpv/dpv.3
==
--- head/lib/libdpv/dpv.3   Fri Oct 23 07:35:48 2015(r289792)
+++ head/lib/libdpv/dpv.3   Fri Oct 23 07:36:27 2015(r289793)
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2013-2014 Devin Teske
+.\" Copyright (c) 2013-2015 Devin Teske
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd Oct 24, 2014
+.Dd Oct 22, 2015
 .Dt DPV 3
 .Os
 .Sh NAME
___
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: r289791 - stable/10/sys/cddl/dev/sdt

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 07:35:39 2015
New Revision: 289791
URL: https://svnweb.freebsd.org/changeset/base/289791

Log:
  MFC r288365: sdt: static-ize couple of variables

Modified:
  stable/10/sys/cddl/dev/sdt/sdt.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/dev/sdt/sdt.c
==
--- stable/10/sys/cddl/dev/sdt/sdt.cFri Oct 23 07:34:57 2015
(r289790)
+++ stable/10/sys/cddl/dev/sdt/sdt.cFri Oct 23 07:35:39 2015
(r289791)
@@ -100,8 +100,8 @@ static dtrace_pops_t sdt_pops = {
 
 static TAILQ_HEAD(, sdt_provider) sdt_prov_list;
 
-eventhandler_tag   sdt_kld_load_tag;
-eventhandler_tag   sdt_kld_unload_try_tag;
+static eventhandler_tagsdt_kld_load_tag;
+static eventhandler_tagsdt_kld_unload_try_tag;
 
 static void
 sdt_create_provider(struct sdt_provider *prov)
___
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: r289790 - head/lib/libdpv

2015-10-23 Thread Devin Teske
Author: dteske
Date: Fri Oct 23 07:34:57 2015
New Revision: 289790
URL: https://svnweb.freebsd.org/changeset/base/289790

Log:
  dpv(3) merged to stable/10 before release/10.2.0
  
  MFC after:3 days
  X-MFC-to: stable/10

Modified:
  head/lib/libdpv/dpv.3

Modified: head/lib/libdpv/dpv.3
==
--- head/lib/libdpv/dpv.3   Fri Oct 23 07:33:55 2015(r289789)
+++ head/lib/libdpv/dpv.3   Fri Oct 23 07:34:57 2015(r289790)
@@ -441,7 +441,7 @@ or desired values.
 The
 .Nm
 library first appeared in
-.Fx 11.0 .
+.Fx 10.2 .
 .Sh AUTHORS
 .An Devin Teske Aq dte...@freebsd.org
 .Sh BUGS
___
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: r289789 - stable/9/sys/cddl/dev/sdt

2015-10-23 Thread Andriy Gapon
Author: avg
Date: Fri Oct 23 07:33:55 2015
New Revision: 289789
URL: https://svnweb.freebsd.org/changeset/base/289789

Log:
  MFC r288364: sdt module does not seem to actually use any symbol from
  opensolaris module

Modified:
  stable/9/sys/cddl/dev/sdt/sdt.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/cddl/dev/sdt/sdt.c
==
--- stable/9/sys/cddl/dev/sdt/sdt.c Fri Oct 23 07:33:43 2015
(r289788)
+++ stable/9/sys/cddl/dev/sdt/sdt.c Fri Oct 23 07:33:55 2015
(r289789)
@@ -398,4 +398,3 @@ sdt_modevent(module_t mod __unused, int 
 DEV_MODULE(sdt, sdt_modevent, NULL);
 MODULE_VERSION(sdt, 1);
 MODULE_DEPEND(sdt, dtrace, 1, 1, 1);
-MODULE_DEPEND(sdt, opensolaris, 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"


  1   2   >