svn commit: r320135 - head/usr.sbin/periodic

2017-06-19 Thread Ngie Cooper
Author: ngie
Date: Tue Jun 20 06:20:09 2017
New Revision: 320135
URL: https://svnweb.freebsd.org/changeset/base/320135

Log:
  periodic(8): delete trailing whitespace
  
  MFC after:1 month

Modified:
  head/usr.sbin/periodic/periodic.sh

Modified: head/usr.sbin/periodic/periodic.sh
==
--- head/usr.sbin/periodic/periodic.sh  Tue Jun 20 05:57:28 2017
(r320134)
+++ head/usr.sbin/periodic/periodic.sh  Tue Jun 20 06:20:09 2017
(r320135)
@@ -30,7 +30,7 @@ if [ $# -lt 1 ] ; then
 usage
 fi
 
-# If possible, check the global system configuration file, 
+# If possible, check the global system configuration file,
 # to see if there are additional dirs to check
 if [ -r /etc/defaults/periodic.conf ]; then
 . /etc/defaults/periodic.conf
@@ -43,7 +43,7 @@ export host
 # If we were called normally, then create a lock file for each argument
 # in turn and reinvoke ourselves with the LOCKED argument.  This prevents
 # very long running jobs from being overlapped by another run as this is
-# will lead the system running progressivly slower and more and more jobs 
+# will lead the system running progressivly slower and more and more jobs
 # are run at once.
 if [ $1 != "LOCKED" ]; then
 ret=0
@@ -102,7 +102,7 @@ case $arg in
 /*) if [ -d "$arg" ]; then
 dirlist="$arg"
 else
-echo "$0: $arg not found" >&2 
+echo "$0: $arg not found" >&2
 continue
 fi
 ;;
___
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: r320134 - stable/11/sys/net

2017-06-19 Thread Andrey V. Elsukov
Author: ae
Date: Tue Jun 20 05:57:28 2017
New Revision: 320134
URL: https://svnweb.freebsd.org/changeset/base/320134

Log:
  MFC r319895:
Resurrect RTF_RNH_LOCKED flag and restore ability to call rtalloc1_fib()
with acquired RIB lock.
  
This fixes a possible panic due to trying to acquire RIB rlock when it is
already exclusive locked.
  
PR: 215963, 215122
Sponsored by:   Yandex LLC
  Approved by:  re (delphij)

Modified:
  stable/11/sys/net/route.c
  stable/11/sys/net/route.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/net/route.c
==
--- stable/11/sys/net/route.c   Tue Jun 20 04:58:12 2017(r320133)
+++ stable/11/sys/net/route.c   Tue Jun 20 05:57:28 2017(r320134)
@@ -454,18 +454,23 @@ rtalloc1_fib(struct sockaddr *dst, int report, u_long 
/*
 * Look up the address in the table for that Address Family
 */
-   RIB_RLOCK(rh);
+   if ((ignflags & RTF_RNH_LOCKED) == 0)
+   RIB_RLOCK(rh);
+#ifdef INVARIANTS
+   else
+   RIB_LOCK_ASSERT(rh);
+#endif
rn = rh->rnh_matchaddr(dst, &rh->head);
if (rn && ((rn->rn_flags & RNF_ROOT) == 0)) {
newrt = RNTORT(rn);
RT_LOCK(newrt);
RT_ADDREF(newrt);
-   RIB_RUNLOCK(rh);
+   if ((ignflags & RTF_RNH_LOCKED) == 0)
+   RIB_RUNLOCK(rh);
return (newrt);
 
-   } else
+   } else if ((ignflags & RTF_RNH_LOCKED) == 0)
RIB_RUNLOCK(rh);
-   
/*
 * Either we hit the root or could not find any match,
 * which basically means: "cannot get there from here".
@@ -748,7 +753,9 @@ ifa_ifwithroute(int flags, const struct sockaddr *dst,
if (ifa == NULL)
ifa = ifa_ifwithnet(gateway, 0, fibnum);
if (ifa == NULL) {
-   struct rtentry *rt = rtalloc1_fib(gateway, 0, 0, fibnum);
+   struct rtentry *rt;
+
+   rt = rtalloc1_fib(gateway, 0, flags, fibnum);
if (rt == NULL)
return (NULL);
/*
@@ -1838,8 +1845,13 @@ rtrequest1_fib_change(struct rib_head *rnh, struct rt_
info->rti_info[RTAX_IFP] != NULL ||
(info->rti_info[RTAX_IFA] != NULL &&
 !sa_equal(info->rti_info[RTAX_IFA], rt->rt_ifa->ifa_addr))) {
-
+   /*
+* XXX: Temporarily set RTF_RNH_LOCKED flag in the rti_flags
+*  to avoid rlock in the ifa_ifwithroute().
+*/
+   info->rti_flags |= RTF_RNH_LOCKED;
error = rt_getifa_fib(info, fibnum);
+   info->rti_flags &= ~RTF_RNH_LOCKED;
if (info->rti_ifa != NULL)
free_ifa = 1;
 

Modified: stable/11/sys/net/route.h
==
--- stable/11/sys/net/route.h   Tue Jun 20 04:58:12 2017(r320133)
+++ stable/11/sys/net/route.h   Tue Jun 20 05:57:28 2017(r320134)
@@ -189,7 +189,7 @@ struct rtentry {
/* 0x800 and up unassigned */
 #defineRTF_STICKY   0x1000 /* always route dst->src */
 
-#defineRTF_RNH_LOCKED   0x4000 /* unused */
+#defineRTF_RNH_LOCKED   0x4000 /* radix node head is locked */
 
 #defineRTF_GWFLAG_COMPAT 0x8000/* a compatibility bit for 
interacting
   with existing routing apps */
___
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: r320133 - head/sys/modules/dtb/allwinner

2017-06-19 Thread Emmanuel Vadot
Author: manu
Date: Tue Jun 20 04:58:12 2017
New Revision: 320133
URL: https://svnweb.freebsd.org/changeset/base/320133

Log:
  Add sun8i-h3-orangepi-one.dts to the build
  We support the board and have a u-boot port for it.

Modified:
  head/sys/modules/dtb/allwinner/Makefile

Modified: head/sys/modules/dtb/allwinner/Makefile
==
--- head/sys/modules/dtb/allwinner/Makefile Tue Jun 20 03:44:21 2017
(r320132)
+++ head/sys/modules/dtb/allwinner/Makefile Tue Jun 20 04:58:12 2017
(r320133)
@@ -12,7 +12,8 @@ DTS=  \
sun7i-a20-bananapi.dts \
sun7i-a20-cubieboard2.dts \
sun7i-a20-olimex-som-evb.dts \
-   sun7i-a20-pcduino3.dts
+   sun7i-a20-pcduino3.dts \
+   sun8i-h3-orangepi-one.dts
 
 LINKS= \
${DTBDIR}/sun4i-a10-cubieboard.dtb ${DTBDIR}/cubieboard.dtb \
___
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: r320132 - in head: . share/man/man5

2017-06-19 Thread Ngie Cooper (yaneurabeya)

> On Jun 19, 2017, at 8:44 PM, Emmanuel Vadot  wrote:
> 
> Author: manu
> Date: Tue Jun 20 03:44:21 2017
> New Revision: 320132
> URL: https://svnweb.freebsd.org/changeset/base/320132
> 
> Log:
>  Fix punctionation in UPDATING and regen src.conf after r320127
> 
>  Reported by: ngie

Thanks :)!
-Ngie


signature.asc
Description: Message signed with OpenPGP


svn commit: r320132 - in head: . share/man/man5

2017-06-19 Thread Emmanuel Vadot
Author: manu
Date: Tue Jun 20 03:44:21 2017
New Revision: 320132
URL: https://svnweb.freebsd.org/changeset/base/320132

Log:
  Fix punctionation in UPDATING and regen src.conf after r320127
  
  Reported by:  ngie

Modified:
  head/UPDATING
  head/share/man/man5/src.conf.5

Modified: head/UPDATING
==
--- head/UPDATING   Tue Jun 20 03:41:06 2017(r320131)
+++ head/UPDATING   Tue Jun 20 03:44:21 2017(r320132)
@@ -52,7 +52,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
 ** SPECIAL WARNING: **
 
 20170620:
-   Switch back to the BSDL dtc (Device Tree Compiler), Set WITH_GPL_DTC
+   Switch back to the BSDL dtc (Device Tree Compiler). Set WITH_GPL_DTC
if you require the GPL compiler.
 
 20170618:

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Tue Jun 20 03:41:06 2017
(r320131)
+++ head/share/man/man5/src.conf.5  Tue Jun 20 03:44:21 2017
(r320132)
@@ -1,6 +1,6 @@
 .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman.
 .\" $FreeBSD$
-.Dd June 8, 2017
+.Dd June 20, 2017
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -764,9 +764,9 @@ by linking against libgnuregex.
 Set to not build
 .Xr gpioctl 8
 as part of the base system.
-.It Va WITHOUT_GPL_DTC
-Set to build the BSD licensed version of the device tree compiler rather
-than the GPLed one from elinux.org.
+.It Va WITH_GPL_DTC
+Set to build the GPL'd version of the device tree compiler from elinux.org,
+instead of the BSD licensed one.
 .It Va WITHOUT_GSSAPI
 Set to not build libgssapi.
 .It Va WITHOUT_HAST
___
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: r320131 - head/sys/boot/fdt/dts/arm

2017-06-19 Thread Emmanuel Vadot
Author: manu
Date: Tue Jun 20 03:41:06 2017
New Revision: 320131
URL: https://svnweb.freebsd.org/changeset/base/320131

Log:
  Remove some custom DTS files as we are using upstream ones.

Deleted:
  head/sys/boot/fdt/dts/arm/bananapi.dts
  head/sys/boot/fdt/dts/arm/bananapim2.dts
  head/sys/boot/fdt/dts/arm/beaglebone-black.dts
  head/sys/boot/fdt/dts/arm/beaglebone-common.dtsi
  head/sys/boot/fdt/dts/arm/beaglebone.dts
  head/sys/boot/fdt/dts/arm/cubieboard.dts
  head/sys/boot/fdt/dts/arm/cubieboard2.dts
  head/sys/boot/fdt/dts/arm/olimex-a20-som-evb.dts
  head/sys/boot/fdt/dts/arm/olinuxino-lime.dts
  head/sys/boot/fdt/dts/arm/pcduino3.dts
___
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: r320127 - in head: . share/mk

2017-06-19 Thread Ngie Cooper

> On Jun 19, 2017, at 20:19, Emmanuel Vadot  wrote:
> 
> On Mon, 19 Jun 2017 20:08:08 -0700
> Ngie Cooper  wrote:
> 
>> 
>>> On Jun 19, 2017, at 19:09, Emmanuel Vadot  wrote:
>>> 
>>> Author: manu
>>> Date: Tue Jun 20 02:09:50 2017
>>> New Revision: 320127
>>> URL: https://svnweb.freebsd.org/changeset/base/320127
>>> 
>>> Log:
>>> Switch back to the BSDL DTC (Device Tree Compiler).
>>> The BSDL dtc has grown the needed features (overlays mostly) and is able to
>>> compile all of our base DTS.
>>> You can use WITH_GPL_DTC is you need the GPL one or DTC= in make.conf(5)
>>> to specify an alternate location for the compiler to use.
>> 
>> ...
>> 
>>> +20170620:
>>> +Switch back to the BSDL dtc (Device Tree Compiler), Set WITH_GPL_DTC
>>> +if you require the GPL compiler.
>> 
>> "," should be "."
>> 
>> src.conf should also be regenerated after this change.
>> 
>> Cheers,
>> -Ngie
> 
> Ah right,
> Should I do one commit or commiting src.conf.5 change should be in a
> separate commit ?

Same commit's fine :).. src.conf(5) is pretty much impossible to MFC without 
dragging in unnecessary commits, so.. there's no real need to separate out the 
changes :)..

> -- 
> Emmanuel Vadot  
___
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: r320127 - in head: . share/mk

2017-06-19 Thread Emmanuel Vadot
On Mon, 19 Jun 2017 20:08:08 -0700
Ngie Cooper  wrote:

> 
> > On Jun 19, 2017, at 19:09, Emmanuel Vadot  wrote:
> > 
> > Author: manu
> > Date: Tue Jun 20 02:09:50 2017
> > New Revision: 320127
> > URL: https://svnweb.freebsd.org/changeset/base/320127
> > 
> > Log:
> >  Switch back to the BSDL DTC (Device Tree Compiler).
> >  The BSDL dtc has grown the needed features (overlays mostly) and is able to
> >  compile all of our base DTS.
> >  You can use WITH_GPL_DTC is you need the GPL one or DTC= in make.conf(5)
> >  to specify an alternate location for the compiler to use.
> 
> ...
> 
> > +20170620:
> > +Switch back to the BSDL dtc (Device Tree Compiler), Set WITH_GPL_DTC
> > +if you require the GPL compiler.
> 
> "," should be "."
> 
> src.conf should also be regenerated after this change.
> 
> Cheers,
> -Ngie

 Ah right,
 Should I do one commit or commiting src.conf.5 change should be in a
separate commit ?

-- 
Emmanuel Vadot  
___
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: r320130 - in head/sys/gnu/dts: arm include/dt-bindings/clock include/dt-bindings/display include/dt-bindings/gpio include/dt-bindings/leds include/dt-bindings/mailbox include/dt-binding...

2017-06-19 Thread Emmanuel Vadot
Author: manu
Date: Tue Jun 20 03:13:49 2017
New Revision: 320130
URL: https://svnweb.freebsd.org/changeset/base/320130

Log:
  Update the GNU DTS file from Linux 4.11

Added:
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/am335x-boneblack-common.dtsi
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/am335x-boneblack-wireless.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/am335x-bonegreen-common.dtsi
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/am335x-bonegreen-wireless.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/am335x-pcm-953.dtsi
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/am335x-phycore-rdk.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/armada-388-clearfog-base.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/armada-388-clearfog-pro.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/armada-388-clearfog.dtsi
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/armada-xp-98dx3236.dtsi
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/armada-xp-98dx3336.dtsi
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/armada-xp-98dx4251.dtsi
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/armada-xp-db-dxbc2.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/armada-xp-db-xc3-24g4xg.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/aspeed-bmc-opp-romulus.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/at91-linea.dtsi
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/at91-tse850-3.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/axp223.dtsi
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/bcm47081-luxul-xap-1410.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/bcm47081-luxul-xwr-1200.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/da850-lego-ev3.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/exynos4412-pinctrl.dtsi
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/exynos4412-prime.dtsi
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/imx6dl-icore-rqs.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/imx6dl-savageboard.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/imx6q-mccmon6.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/imx6q-savageboard.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/imx6qdl-savageboard.dtsi
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/imx6ul-isiot-emmc.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/imx6ul-isiot-nand.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/imx6ul-isiot.dtsi
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/imx6ul-opos6ul.dtsi
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/imx6ul-opos6uldev.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/sama5d36ek_cmp.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/sama5d3xcm_cmp.dtsi
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/sama5d3xmb_cmp.dtsi
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/socfpga_arria10_socdk_nand.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/sun5i-a13-licheepi-one.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/sun8i-h2-plus-orangepi-zero.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/sun8i-h3-beelink-x2.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/sun8i-v3s-licheepi-zero.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/sun8i-v3s.dtsi
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/vf610-zii-dev-rev-c.dts
 - copied unchanged from r320128, 
vendor/device-tree/dist/src/arm/vf610-zii-dev.dtsi
 - copied unchanged from r320128, 
vendor/device-tree/dist/include/dt-bindings/clock/hi3660-clock.h
 - copied unchanged from r320128, 
vendor/device-tree/dist/include/dt-bindings/clock/rk3328-cru.h
 - copied unchanged from r320128, 
vendor/device-tree/dist/include/dt-bindings/clock/ste-ab8500.h
 - copied unchanged from r320128, 
vendor/device-tree/dist/include/dt-bindings/clock/stm32fx-clock.h
 - copied unchanged from r320128, 
vendor/device-tree/dist/include/dt-bindings/clock/sun5i-ccu.h
 - copied unchanged from r320128, 
vendor/device-tree/dist/include/dt-bindings/clock/sun8i-v3s-ccu.h
 - copied unchanged from r320128, 
vendor/dev

Re: svn commit: r320127 - in head: . share/mk

2017-06-19 Thread Ngie Cooper

> On Jun 19, 2017, at 19:09, Emmanuel Vadot  wrote:
> 
> Author: manu
> Date: Tue Jun 20 02:09:50 2017
> New Revision: 320127
> URL: https://svnweb.freebsd.org/changeset/base/320127
> 
> Log:
>  Switch back to the BSDL DTC (Device Tree Compiler).
>  The BSDL dtc has grown the needed features (overlays mostly) and is able to
>  compile all of our base DTS.
>  You can use WITH_GPL_DTC is you need the GPL one or DTC= in make.conf(5)
>  to specify an alternate location for the compiler to use.

...

> +20170620:
> +Switch back to the BSDL dtc (Device Tree Compiler), Set WITH_GPL_DTC
> +if you require the GPL compiler.

"," should be "."

src.conf should also be regenerated after this change.

Cheers,
-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: r320127 - in head: . share/mk

2017-06-19 Thread Ngie Cooper

> On Jun 19, 2017, at 19:09, Emmanuel Vadot  wrote:
> 
> Author: manu
> Date: Tue Jun 20 02:09:50 2017
> New Revision: 320127
> URL: https://svnweb.freebsd.org/changeset/base/320127
> 
> Log:
>  Switch back to the BSDL DTC (Device Tree Compiler).
>  The BSDL dtc has grown the needed features (overlays mostly) and is able to
>  compile all of our base DTS.
>  You can use WITH_GPL_DTC is you need the GPL one or DTC= in make.conf(5)
>  to specify an alternate location for the compiler to use.
> 
>  Discussed with: emaste, imp
> 
> Modified:
>  head/UPDATING
>  head/share/mk/src.opts.mk
> 
> Modified: head/UPDATING
> ==
> --- head/UPDATINGMon Jun 19 22:07:53 2017(r320126)
> +++ head/UPDATINGTue Jun 20 02:09:50 2017(r320127)
> @@ -51,6 +51,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
> 
> ** SPECIAL WARNING: **
> 
> +20170620:
> +Switch back to the BSDL dtc (Device Tree Compiler), Set WITH_GPL_DTC
> +if you require the GPL compiler.
> +
> 20170618:
>The internal ABI used for communication between the NFS kernel modules
>was changed by r320085, so __FreeBSD_version was bumped to
> 
> Modified: head/share/mk/src.opts.mk
> ==
> --- head/share/mk/src.opts.mkMon Jun 19 22:07:53 2017(r320126)
> +++ head/share/mk/src.opts.mkTue Jun 20 02:09:50 2017(r320127)
> @@ -101,7 +101,6 @@ __DEFAULT_YES_OPTIONS = \
> GNU_DIFF \
> GNU_GREP \
> GPIO \
> -GPL_DTC \
> HAST \
> HTML \
> HYPERV \
> @@ -181,6 +180,7 @@ __DEFAULT_NO_OPTIONS = \
> CLANG_EXTRAS \
> DTRACE_TESTS \
> GNU_GREP_COMPAT \
> +GPL_DTC \
> HESIOD \
> LIBSOFT \
> NAND \
> 
___
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: r320129 - vendor/device-tree/4.11

2017-06-19 Thread Emmanuel Vadot
Author: manu
Date: Tue Jun 20 02:29:03 2017
New Revision: 320129
URL: https://svnweb.freebsd.org/changeset/base/320129

Log:
  Tag import of DTS files from Linux 4.11

Added:
  vendor/device-tree/4.11/
 - copied from r320128, vendor/device-tree/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: r320128 - in vendor/device-tree/dist: Bindings Bindings/arm Bindings/arm/bcm Bindings/arm/hisilicon Bindings/arm/marvell Bindings/arm/omap Bindings/ata Bindings/bus Bindings/clock Bindi...

2017-06-19 Thread Emmanuel Vadot
Author: manu
Date: Tue Jun 20 02:28:15 2017
New Revision: 320128
URL: https://svnweb.freebsd.org/changeset/base/320128

Log:
  Update the DTS file from Linux 4.11

Added:
  vendor/device-tree/dist/Bindings/arm/axentia.txt   (contents, props changed)
  vendor/device-tree/dist/Bindings/arm/marvell/98dx3236-resume-ctrl.txt   
(contents, props changed)
  vendor/device-tree/dist/Bindings/arm/marvell/98dx3236.txt   (contents, props 
changed)
  vendor/device-tree/dist/Bindings/ata/ahci-da850.txt   (contents, props 
changed)
  vendor/device-tree/dist/Bindings/clock/hi3660-clock.txt   (contents, props 
changed)
  vendor/device-tree/dist/Bindings/clock/idt,versaclock5.txt   (contents, props 
changed)
  vendor/device-tree/dist/Bindings/clock/rockchip,rk3328-cru.txt   (contents, 
props changed)
  vendor/device-tree/dist/Bindings/clock/stericsson,abx500.txt   (contents, 
props changed)
  vendor/device-tree/dist/Bindings/clock/sun9i-de.txt   (contents, props 
changed)
  vendor/device-tree/dist/Bindings/clock/sun9i-usb.txt   (contents, props 
changed)
  vendor/device-tree/dist/Bindings/cpufreq/ti-cpufreq.txt   (contents, props 
changed)
  vendor/device-tree/dist/Bindings/crypto/brcm,spu-crypto.txt   (contents, 
props changed)
  vendor/device-tree/dist/Bindings/crypto/mediatek-crypto.txt   (contents, 
props changed)
  vendor/device-tree/dist/Bindings/display/bridge/anx7814.txt   (contents, 
props changed)
  vendor/device-tree/dist/Bindings/display/bridge/sil-sii8620.txt   (contents, 
props changed)
  vendor/device-tree/dist/Bindings/display/bridge/ti,ths8135.txt   (contents, 
props changed)
  vendor/device-tree/dist/Bindings/display/multi-inno,mi0283qt.txt   (contents, 
props changed)
  vendor/device-tree/dist/Bindings/display/panel/boe,nv101wxmn51.txt   
(contents, props changed)
  vendor/device-tree/dist/Bindings/display/panel/netron-dy,e231732.txt   
(contents, props changed)
  vendor/device-tree/dist/Bindings/display/panel/panel.txt   (contents, props 
changed)
  vendor/device-tree/dist/Bindings/display/panel/tianma,tm070jdhg30.txt   
(contents, props changed)
  vendor/device-tree/dist/Bindings/gpio/cortina,gemini-gpio.txt   (contents, 
props changed)
  vendor/device-tree/dist/Bindings/gpu/arm,mali-utgard.txt   (contents, props 
changed)
  vendor/device-tree/dist/Bindings/hwmon/adc128d818.txt   (contents, props 
changed)
  vendor/device-tree/dist/Bindings/hwmon/sht15.txt   (contents, props changed)
  vendor/device-tree/dist/Bindings/hwmon/stts751.txt   (contents, props changed)
  vendor/device-tree/dist/Bindings/i2c/i2c-stm32.txt   (contents, props changed)
  vendor/device-tree/dist/Bindings/i2c/nvidia,tegra186-bpmp-i2c.txt   
(contents, props changed)
  vendor/device-tree/dist/Bindings/iio/adc/amlogic,meson-saradc.txt   
(contents, props changed)
  vendor/device-tree/dist/Bindings/iio/adc/avia-hx711.txt   (contents, props 
changed)
  vendor/device-tree/dist/Bindings/iio/adc/max11100.txt   (contents, props 
changed)
  vendor/device-tree/dist/Bindings/iio/adc/qcom,pm8xxx-xoadc.txt   (contents, 
props changed)
  vendor/device-tree/dist/Bindings/iio/adc/renesas,gyroadc.txt   (contents, 
props changed)
  vendor/device-tree/dist/Bindings/iio/adc/ti-ads7950.txt   (contents, props 
changed)
  vendor/device-tree/dist/Bindings/iio/imu/bmi160.txt   (contents, props 
changed)
  vendor/device-tree/dist/Bindings/iio/imu/st_lsm6dsx.txt   (contents, props 
changed)
  vendor/device-tree/dist/Bindings/iio/light/cm3605.txt   (contents, props 
changed)
  vendor/device-tree/dist/Bindings/iio/potentiometer/max5481.txt   (contents, 
props changed)
  vendor/device-tree/dist/Bindings/iio/temperature/tmp007.txt   (contents, 
props changed)
  vendor/device-tree/dist/Bindings/iio/timer/
  vendor/device-tree/dist/Bindings/iio/timer/stm32-timer-trigger.txt   
(contents, props changed)
  vendor/device-tree/dist/Bindings/input/cypress,tm2-touchkey.txt   (contents, 
props changed)
  vendor/device-tree/dist/Bindings/input/mpr121-touchkey.txt   (contents, props 
changed)
  vendor/device-tree/dist/Bindings/input/touchscreen/zet6223.txt   (contents, 
props changed)
  
vendor/device-tree/dist/Bindings/interrupt-controller/cortina,gemini-interrupt-controller.txt
   (contents, props changed)
  vendor/device-tree/dist/Bindings/leds/irled/
  vendor/device-tree/dist/Bindings/leds/irled/spi-ir-led.txt   (contents, props 
changed)
  vendor/device-tree/dist/Bindings/media/fsl-vdoa.txt   (contents, props 
changed)
  vendor/device-tree/dist/Bindings/media/i2c/toshiba,et8ek8.txt   (contents, 
props changed)
  vendor/device-tree/dist/Bindings/media/mtk-cir.txt   (contents, props changed)
  vendor/device-tree/dist/Bindings/media/rc.txt   (contents, props changed)
  vendor/device-tree/dist/Bindings/media/st,st-delta.txt   (contents, props 
changed)
  vendor/device-tree/dist/Bindings/media/ti,da850-vpif.txt   (contents, props 
changed)
  vendor/device-tree/dist/Bindings/mfd/aspeed-gfx.txt   (contents, props 
changed)
  vendor/device-tree/dist/Bindings/mfd/aspeed-lpc.tx

svn commit: r320127 - in head: . share/mk

2017-06-19 Thread Emmanuel Vadot
Author: manu
Date: Tue Jun 20 02:09:50 2017
New Revision: 320127
URL: https://svnweb.freebsd.org/changeset/base/320127

Log:
  Switch back to the BSDL DTC (Device Tree Compiler).
  The BSDL dtc has grown the needed features (overlays mostly) and is able to
  compile all of our base DTS.
  You can use WITH_GPL_DTC is you need the GPL one or DTC= in make.conf(5)
  to specify an alternate location for the compiler to use.
  
  Discussed with: emaste, imp

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

Modified: head/UPDATING
==
--- head/UPDATING   Mon Jun 19 22:07:53 2017(r320126)
+++ head/UPDATING   Tue Jun 20 02:09:50 2017(r320127)
@@ -51,6 +51,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
 
 ** SPECIAL WARNING: **
 
+20170620:
+   Switch back to the BSDL dtc (Device Tree Compiler), Set WITH_GPL_DTC
+   if you require the GPL compiler.
+
 20170618:
The internal ABI used for communication between the NFS kernel modules
was changed by r320085, so __FreeBSD_version was bumped to

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Mon Jun 19 22:07:53 2017(r320126)
+++ head/share/mk/src.opts.mk   Tue Jun 20 02:09:50 2017(r320127)
@@ -101,7 +101,6 @@ __DEFAULT_YES_OPTIONS = \
 GNU_DIFF \
 GNU_GREP \
 GPIO \
-GPL_DTC \
 HAST \
 HTML \
 HYPERV \
@@ -181,6 +180,7 @@ __DEFAULT_NO_OPTIONS = \
 CLANG_EXTRAS \
 DTRACE_TESTS \
 GNU_GREP_COMPAT \
+GPL_DTC \
 HESIOD \
 LIBSOFT \
 NAND \
___
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: r319971 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/stdlib/jemal

2017-06-19 Thread Glen Barber
On Fri, Jun 16, 2017 at 05:15:44PM -0700, Jason Evans wrote:
> I'm going to be AFK for the next couple days, and I do not have
> arm64 hardware, so I hope this is enough information for someone
> to work out a simple fix.
> 

A simple fix is reverting the offending commit.

You do not need arm64 hardware to fix the build, at least.  There are
Project resources available to ensure the code at least compiles.

Glen



signature.asc
Description: PGP signature


Re: svn commit: r280455 - in stable/10: lib/libpmc sys/amd64/conf sys/dev/hwpmc sys/sys usr.sbin usr.sbin/pmcstudy

2017-06-19 Thread Oliver Pinter
On 3/27/15, John Baldwin  wrote:
> On 3/24/15 1:00 PM, Randall Stewart wrote:
>> Author: rrs
>> Date: Tue Mar 24 20:00:11 2015
>> New Revision: 280455
>> URL: https://svnweb.freebsd.org/changeset/base/280455
>>
>> Log:
>>   MFC of r277177 and r279894 with the fixes for the PMC for Haswell.
>>
>>   Sponsored by:  Netflix Inc.
>>
>> Added:
>>   stable/10/usr.sbin/pmcstudy/
>>  - copied from r277177, head/usr.sbin/pmcstudy/
>> Modified:
>>   stable/10/lib/libpmc/libpmc.c
>>   stable/10/sys/amd64/conf/GENERIC

Hi!

The MFC of 279833 was missing from this commit. I'm CCing avg@, since
he made a big bunch of hwpmc related MFCs yesterday.

>
> The change to GENERIC looks like it slipped in by accident?  Neither of the
> commits to HEAD enabled hwpmc in GENERIC AFAICT.
>
> --
> John Baldwin
> ___
> svn-src-stable...@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
> To unsubscribe, send any mail to
> "svn-src-stable-10-unsubscr...@freebsd.org"
>
___
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: r320126 - in head/sys: fs/nfs fs/nfsclient sys

2017-06-19 Thread Rick Macklem
Author: rmacklem
Date: Mon Jun 19 22:07:53 2017
New Revision: 320126
URL: https://svnweb.freebsd.org/changeset/base/320126

Log:
  Add the definition of maxbcachebuf to sys/buf.h.
  
  r320070 removed the definition of maxbcachebuf from sys/param.h to
  fix the build for arm.
  This patch adds the definition of maxbcachebuf to sys/buf.h, which
  should be ok, since sys/buf.h is not being included in arm/arm/elf_note.S.
  
  Suggested by: kib
  MFC after:2 weeks

Modified:
  head/sys/fs/nfs/nfs_commonkrpc.c
  head/sys/fs/nfsclient/nfs_clvfsops.c
  head/sys/sys/buf.h

Modified: head/sys/fs/nfs/nfs_commonkrpc.c
==
--- head/sys/fs/nfs/nfs_commonkrpc.cMon Jun 19 21:48:52 2017
(r320125)
+++ head/sys/fs/nfs/nfs_commonkrpc.cMon Jun 19 22:07:53 2017
(r320126)
@@ -96,7 +96,6 @@ extern int nfscl_ticks;
 extern void (*ncl_call_invalcaches)(struct vnode *);
 extern int nfs_numnfscbd;
 extern int nfscl_debuglevel;
-extern int maxbcachebuf;
 
 SVCPOOL*nfscbd_pool;
 static int nfsrv_gsscallbackson = 0;

Modified: head/sys/fs/nfsclient/nfs_clvfsops.c
==
--- head/sys/fs/nfsclient/nfs_clvfsops.cMon Jun 19 21:48:52 2017
(r320125)
+++ head/sys/fs/nfsclient/nfs_clvfsops.cMon Jun 19 22:07:53 2017
(r320126)
@@ -83,7 +83,6 @@ extern int nfscl_debuglevel;
 extern enum nfsiod_state ncl_iodwant[NFS_MAXASYNCDAEMON];
 extern struct nfsmount *ncl_iodmount[NFS_MAXASYNCDAEMON];
 extern struct mtx ncl_iod_mutex;
-extern int maxbcachebuf;
 NFSCLSTATEMUTEX;
 
 MALLOC_DEFINE(M_NEWNFSREQ, "newnfsclient_req", "NFS request header");

Modified: head/sys/sys/buf.h
==
--- head/sys/sys/buf.h  Mon Jun 19 21:48:52 2017(r320125)
+++ head/sys/sys/buf.h  Mon Jun 19 22:07:53 2017(r320126)
@@ -472,6 +472,7 @@ buf_track(struct buf *bp, const char *location)
 extern int nbuf;   /* The number of buffer headers */
 extern longmaxswzone;  /* Max KVA for swap structures */
 extern longmaxbcache;  /* Max KVA for buffer cache */
+extern int maxbcachebuf;   /* Max buffer cache block size */
 extern longrunningbufspace;
 extern longhibufspace;
 extern int dirtybufthresh;
___
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: r320125 - head/sys/x86/iommu

2017-06-19 Thread Konstantin Belousov
Author: kib
Date: Mon Jun 19 21:48:52 2017
New Revision: 320125
URL: https://svnweb.freebsd.org/changeset/base/320125

Log:
  Fix batched unload for DMAR busdma in qi mode.
  
  Do not queue dmar_map_entries with zeroed gseq to
  dmar_qi_invalidate_locked().  Zero gseq stops the processing in the qi
  task.  Do not assign possibly uninitialized on-stack gseq to map
  entries when requeuing them on unit tlb_flush queue.  Random garbage
  in gsec is interpreted as too high invalidation sequence number and
  again stop the processing in the task.
  
  Make the sequence numbers generation completely contained in
  dmar_qi_invalidate_locked() and dmar_qi_emit_wait_seq().  Upper code
  directly passes boolean requesting emiting wait command instead of
  trying to provide hint to avoid it by passing NULL gseq pointer.
  
  Microoptimize the requeueing to tlb_flush queue by doing it for the
  whole queue.
  
  Diagnosed and tested by:  Brett Gutstein 
  Discussed with:   alc
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/sys/x86/iommu/intel_ctx.c
  head/sys/x86/iommu/intel_dmar.h
  head/sys/x86/iommu/intel_qi.c

Modified: head/sys/x86/iommu/intel_ctx.c
==
--- head/sys/x86/iommu/intel_ctx.c  Mon Jun 19 21:09:50 2017
(r320124)
+++ head/sys/x86/iommu/intel_ctx.c  Mon Jun 19 21:48:52 2017
(r320125)
@@ -703,7 +703,7 @@ dmar_domain_unload_entry(struct dmar_map_entry *entry,
if (unit->qi_enabled) {
DMAR_LOCK(unit);
dmar_qi_invalidate_locked(entry->domain, entry->start,
-   entry->end - entry->start, &entry->gseq);
+   entry->end - entry->start, &entry->gseq, true);
if (!free)
entry->flags |= DMAR_MAP_ENTRY_QI_NF;
TAILQ_INSERT_TAIL(&unit->tlb_flush_entries, entry, dmamap_link);
@@ -715,16 +715,14 @@ dmar_domain_unload_entry(struct dmar_map_entry *entry,
}
 }
 
-static struct dmar_qi_genseq *
-dmar_domain_unload_gseq(struct dmar_domain *domain,
-struct dmar_map_entry *entry, struct dmar_qi_genseq *gseq)
+static bool
+dmar_domain_unload_emit_wait(struct dmar_domain *domain,
+struct dmar_map_entry *entry)
 {
 
-   if (TAILQ_NEXT(entry, dmamap_link) != NULL)
-   return (NULL);
-   if (domain->batch_no++ % dmar_batch_coalesce != 0)
-   return (NULL);
-   return (gseq);
+   if (TAILQ_NEXT(entry, dmamap_link) == NULL)
+   return (true);
+   return (domain->batch_no++ % dmar_batch_coalesce == 0);
 }
 
 void
@@ -733,7 +731,6 @@ dmar_domain_unload(struct dmar_domain *domain,
 {
struct dmar_unit *unit;
struct dmar_map_entry *entry, *entry1;
-   struct dmar_qi_genseq gseq;
int error;
 
unit = domain->dmar;
@@ -757,17 +754,11 @@ dmar_domain_unload(struct dmar_domain *domain,
KASSERT(unit->qi_enabled, ("loaded entry left"));
DMAR_LOCK(unit);
TAILQ_FOREACH(entry, entries, dmamap_link) {
-   entry->gseq.gen = 0;
-   entry->gseq.seq = 0;
dmar_qi_invalidate_locked(domain, entry->start, entry->end -
-   entry->start, dmar_domain_unload_gseq(domain, entry,
-   &gseq));
+   entry->start, &entry->gseq,
+   dmar_domain_unload_emit_wait(domain, entry));
}
-   TAILQ_FOREACH_SAFE(entry, entries, dmamap_link, entry1) {
-   entry->gseq = gseq;
-   TAILQ_REMOVE(entries, entry, dmamap_link);
-   TAILQ_INSERT_TAIL(&unit->tlb_flush_entries, entry, dmamap_link);
-   }
+   TAILQ_CONCAT(&unit->tlb_flush_entries, entries, dmamap_link);
DMAR_UNLOCK(unit);
 }  
 

Modified: head/sys/x86/iommu/intel_dmar.h
==
--- head/sys/x86/iommu/intel_dmar.h Mon Jun 19 21:09:50 2017
(r320124)
+++ head/sys/x86/iommu/intel_dmar.h Mon Jun 19 21:48:52 2017
(r320125)
@@ -305,7 +305,7 @@ void dmar_disable_qi_intr(struct dmar_unit *unit);
 int dmar_init_qi(struct dmar_unit *unit);
 void dmar_fini_qi(struct dmar_unit *unit);
 void dmar_qi_invalidate_locked(struct dmar_domain *domain, dmar_gaddr_t start,
-dmar_gaddr_t size, struct dmar_qi_genseq *pseq);
+dmar_gaddr_t size, struct dmar_qi_genseq *psec, bool emit_wait);
 void dmar_qi_invalidate_ctx_glob_locked(struct dmar_unit *unit);
 void dmar_qi_invalidate_iotlb_glob_locked(struct dmar_unit *unit);
 void dmar_qi_invalidate_iec_glob(struct dmar_unit *unit);

Modified: head/sys/x86/iommu/intel_qi.c
==
--- head/sys/x86/iommu/intel_qi.c   Mon Jun 19 21:09:50 2017
(r320124)
+++ head/sys/x86/iommu/intel_qi.c   Mon Jun 19 21:48:52 2017
(r320125)
@@ -171,7 +171,8 @@ dmar_qi

svn commit: r320124 - head/sys/kern

2017-06-19 Thread Mark Johnston
Author: markj
Date: Mon Jun 19 21:09:50 2017
New Revision: 320124
URL: https://svnweb.freebsd.org/changeset/base/320124

Log:
  Fix the !TD_IS_IDLETHREAD(curthread) locking assertions.
  
  Most of the lock slowpaths assert that the calling thread isn't an idle
  thread. However, this may not be true if the system has panicked, and in
  some cases the assertion appears before a SCHEDULER_STOPPED() check.
  
  MFC after:3 days
  Sponsored by: Dell EMC Isilon

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

Modified: head/sys/kern/kern_mutex.c
==
--- head/sys/kern/kern_mutex.c  Mon Jun 19 20:48:00 2017(r320123)
+++ head/sys/kern/kern_mutex.c  Mon Jun 19 21:09:50 2017(r320124)
@@ -233,7 +233,8 @@ __mtx_lock_flags(volatile uintptr_t *c, int opts, cons
 
m = mtxlock2mtx(c);
 
-   KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
+   KASSERT(kdb_active != 0 || SCHEDULER_STOPPED() ||
+   !TD_IS_IDLETHREAD(curthread),
("mtx_lock() by idle thread %p on sleep mutex %s @ %s:%d",
curthread, m->lock_object.lo_name, file, line));
KASSERT(m->mtx_lock != MTX_DESTROYED,
@@ -390,7 +391,7 @@ _mtx_trylock_flags_(volatile uintptr_t *c, int opts, c
 
m = mtxlock2mtx(c);
 
-   KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
+   KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(td),
("mtx_trylock() by idle thread %p on sleep mutex %s @ %s:%d",
curthread, m->lock_object.lo_name, file, line));
KASSERT(m->mtx_lock != MTX_DESTROYED,

Modified: head/sys/kern/kern_rwlock.c
==
--- head/sys/kern/kern_rwlock.c Mon Jun 19 20:48:00 2017(r320123)
+++ head/sys/kern/kern_rwlock.c Mon Jun 19 21:09:50 2017(r320124)
@@ -269,7 +269,8 @@ _rw_wlock_cookie(volatile uintptr_t *c, const char *fi
 
rw = rwlock2rw(c);
 
-   KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
+   KASSERT(kdb_active != 0 || SCHEDULER_STOPPED() ||
+   !TD_IS_IDLETHREAD(curthread),
("rw_wlock() by idle thread %p on rwlock %s @ %s:%d",
curthread, rw->lock_object.lo_name, file, line));
KASSERT(rw->rw_lock != RW_DESTROYED,
@@ -305,7 +306,7 @@ __rw_try_wlock(volatile uintptr_t *c, const char *file
 
rw = rwlock2rw(c);
 
-   KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
+   KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(td),
("rw_try_wlock() by idle thread %p on rwlock %s @ %s:%d",
curthread, rw->lock_object.lo_name, file, line));
KASSERT(rw->rw_lock != RW_DESTROYED,
@@ -615,7 +616,8 @@ __rw_rlock(volatile uintptr_t *c, const char *file, in
td = curthread;
rw = rwlock2rw(c);
 
-   KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(td),
+   KASSERT(kdb_active != 0 || SCHEDULER_STOPPED_TD(td) ||
+   !TD_IS_IDLETHREAD(td),
("rw_rlock() by idle thread %p on rwlock %s @ %s:%d",
td, rw->lock_object.lo_name, file, line));
KASSERT(rw->rw_lock != RW_DESTROYED,
@@ -815,7 +817,6 @@ _rw_runlock_cookie(volatile uintptr_t *c, const char *
 
TD_LOCKS_DEC(curthread);
 }
-
 
 /*
  * This function is called when we are unable to obtain a write lock on the

Modified: head/sys/kern/kern_sx.c
==
--- head/sys/kern/kern_sx.c Mon Jun 19 20:48:00 2017(r320123)
+++ head/sys/kern/kern_sx.c Mon Jun 19 21:09:50 2017(r320124)
@@ -295,7 +295,8 @@ _sx_xlock(struct sx *sx, int opts, const char *file, i
uintptr_t tid, x;
int error = 0;
 
-   KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
+   KASSERT(kdb_active != 0 || SCHEDULER_STOPPED() ||
+   !TD_IS_IDLETHREAD(curthread),
("sx_xlock() by idle thread %p on sx %s @ %s:%d",
curthread, sx->lock_object.lo_name, file, line));
KASSERT(sx->sx_lock != SX_LOCK_DESTROYED,
@@ -332,7 +333,7 @@ sx_try_xlock_(struct sx *sx, const char *file, int lin
if (SCHEDULER_STOPPED_TD(td))
return (1);
 
-   KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
+   KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(td),
("sx_try_xlock() by idle thread %p on sx %s @ %s:%d",
curthread, sx->lock_object.lo_name, file, line));
KASSERT(sx->sx_lock != SX_LOCK_DESTROYED,
@@ -1030,7 +1031,8 @@ _sx_slock(struct sx *sx, int opts, const char *file, i
uintptr_t x;
int error;
 
-   KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
+   KASSERT(kdb_active != 0 || SCHEDULER_STOPPED() ||
+   !TD_IS_IDLETHREAD(curthread),
("sx_slock() by idle thread %p on sx %s @ %s:%d",
curthread, sx->loc

svn commit: r320123 - head/sys/cam/scsi

2017-06-19 Thread Kenneth D. Merry
Author: ken
Date: Mon Jun 19 20:48:00 2017
New Revision: 320123
URL: https://svnweb.freebsd.org/changeset/base/320123

Log:
  Fix a potential sleep while holding a mutex in the sa(4) driver.
  
  If the user issues a MTIOCEXTGET ioctl, and the tape drive in question has
  a serial number that is longer than 80 characters, we malloc a buffer in
  saextget() to hold the output of cam_strvis().
  
  Since a mutex is held in that codepath, doing a M_WAITOK malloc could lead
  to sleeping while holding a mutex.  Change it to a M_NOWAIT malloc and bail
  out if we fail to allocate the memory.  Devices with serial numbers longer
  than 80 bytes are very rare (I don't recall seeing one), so this
  should be a very unusual case to hit.  But it is a bug that should be fixed.
  
  sys/cam/scsi/scsi_sa.c:
In saextget(), if we need to malloc a buffer to hold the output of
cam_strvis(), don't wait for the memory.  Fail and return an error
if we can't allocate the memory immediately.
  
  PR:   kern/220094
  Submitted by: Jia-Ju Bai 
  MFC after:3 days
  Sponsored by: Spectra Logic

Modified:
  head/sys/cam/scsi/scsi_sa.c

Modified: head/sys/cam/scsi/scsi_sa.c
==
--- head/sys/cam/scsi/scsi_sa.c Mon Jun 19 20:47:24 2017(r320122)
+++ head/sys/cam/scsi/scsi_sa.c Mon Jun 19 20:48:00 2017(r320123)
@@ -4465,7 +4465,18 @@ saextget(struct cdev *dev, struct cam_periph *periph, 
if (cgd.serial_num_len > sizeof(tmpstr)) {
ts2_len = cgd.serial_num_len + 1;
ts2_malloc = 1;
-   tmpstr2 = malloc(ts2_len, M_SCSISA, M_WAITOK | M_ZERO);
+   tmpstr2 = malloc(ts2_len, M_SCSISA, M_NOWAIT | M_ZERO);
+   /*
+* The 80 characters allocated on the stack above
+* will handle the vast majority of serial numbers.
+* If we run into one that is larger than that, and
+* we can't malloc the length without blocking,
+* bail out with an out of memory error.
+*/
+   if (tmpstr2 == NULL) {
+   error = ENOMEM;
+   goto extget_bailout;
+   }
} else {
ts2_len = sizeof(tmpstr);
ts2_malloc = 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: r320122 - in head: cddl/usr.sbin/zfsd/tests gnu/usr.bin/grep include lib/librpcsvc lib/libsysdecode sbin/gvinum share/mk sys/boot/efi/loader usr.bin/grep usr.sbin/bootparamd/bootparamd ...

2017-06-19 Thread Bryan Drewery
Author: bdrewery
Date: Mon Jun 19 20:47:24 2017
New Revision: 320122
URL: https://svnweb.freebsd.org/changeset/base/320122

Log:
  Utilize SYSROOT from r320119 in places where DESTDIR may be wanting WORLDTMP.
  
  Since buildenv exports SYSROOT all of these uses will now look in
  WORLDTMP by default.
  
  sys/boot/efi/loader/Makefile
  A LIBSTAND hack is no longer required for buildenv.
  
  MFC after:2 weeks
  Sponsored by: Dell EMC Isilon

Modified:
  head/cddl/usr.sbin/zfsd/tests/Makefile
  head/gnu/usr.bin/grep/Makefile
  head/include/Makefile
  head/lib/librpcsvc/Makefile
  head/lib/libsysdecode/Makefile
  head/sbin/gvinum/Makefile
  head/share/mk/bsd.libnames.mk
  head/share/mk/src.libnames.mk
  head/sys/boot/efi/loader/Makefile
  head/usr.bin/grep/Makefile
  head/usr.sbin/bootparamd/bootparamd/Makefile
  head/usr.sbin/bootparamd/callbootd/Makefile
  head/usr.sbin/keyserv/Makefile
  head/usr.sbin/ntp/ntpdc/Makefile
  head/usr.sbin/ntp/ntpq/Makefile
  head/usr.sbin/rpc.lockd/Makefile
  head/usr.sbin/rpc.statd/Makefile
  head/usr.sbin/rpc.ypupdated/Makefile
  head/usr.sbin/tcpdump/tcpdump/Makefile

Modified: head/cddl/usr.sbin/zfsd/tests/Makefile
==
--- head/cddl/usr.sbin/zfsd/tests/Makefile  Mon Jun 19 20:40:59 2017
(r320121)
+++ head/cddl/usr.sbin/zfsd/tests/Makefile  Mon Jun 19 20:47:24 2017
(r320122)
@@ -11,16 +11,10 @@ SRCS=
 # Use #include  in test programs.
 INCFLAGS+= -I${.CURDIR:H:H}
 
-.if defined(DESTDIR)
-INCFLAGS+= -I${DESTDIR}/usr/include
-LIBRARY_PATH=  ${DESTDIR}/lib:${DESTDIR}/usr/lib
-LDFLAGS.zfsd_unittest+=-L${DESTDIR}/lib -L${DESTDIR}/usr/lib
-.elif defined(WORLDTMP)
-INCFLAGS+= -I${WORLDTMP}/usr/include
-LIBRARY_PATH=  ${WORLDTMP}/lib:${WORLDTMP}/usr/lib
-LDFLAGS.zfsd_unittest+=-L${WORLDTMP}/lib -L${WORLDTMP}/usr/lib
-.else
-LIBRARY_PATH=
+.if defined(DESTDIR) || defined(SYSROOT)
+INCFLAGS+= -I${SYSROOT:U${DESTDIR}}/usr/include
+LDFLAGS.zfsd_unittest+=-L${SYSROOT:U${DESTDIR}}/lib \
+   -L${SYSROOT:U${DESTDIR}}/usr/lib
 .endif
 
 # Googletest options

Modified: head/gnu/usr.bin/grep/Makefile
==
--- head/gnu/usr.bin/grep/Makefile  Mon Jun 19 20:40:59 2017
(r320121)
+++ head/gnu/usr.bin/grep/Makefile  Mon Jun 19 20:47:24 2017
(r320122)
@@ -14,7 +14,7 @@ SRCS= closeout.c dfa.c error.c exclude.c grep.c grepma
xstrtoumax.c
 CLEANFILES+=   gnugrep.1
 
-CFLAGS+=-I${.CURDIR} -I${DESTDIR}/usr/include/gnu -DHAVE_CONFIG_H
+CFLAGS+=-I${.CURDIR} -I${SYSROOT:U${DESTDIR}}/usr/include/gnu -DHAVE_CONFIG_H
 
 .if ${MK_BSD_GREP} != "yes"
 LINKS+=${BINDIR}/grep ${BINDIR}/egrep \

Modified: head/include/Makefile
==
--- head/include/Makefile   Mon Jun 19 20:40:59 2017(r320121)
+++ head/include/Makefile   Mon Jun 19 20:47:24 2017(r320122)
@@ -133,23 +133,24 @@ _MARCHS+= x86
 
 META_TARGETS+= compat
 stage_includes: ${SHARED}
+SDESTDIR=  ${SYSROOT:U${DESTDIR}}
 
 # Take care of stale directory-level symlinks.
 compat:
 .for i in ${LDIRS} ${LSUBDIRS} machine ${_MARCHS} crypto
-   if [ -L ${DESTDIR}${INCLUDEDIR}/$i ]; then \
-   rm -f ${DESTDIR}${INCLUDEDIR}/$i; \
+   if [ -L ${SDESTDIR}${INCLUDEDIR}/$i ]; then \
+   rm -f ${SDESTDIR}${INCLUDEDIR}/$i; \
fi
 .endfor
mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \
-f ${SRCTOP}/etc/mtree/BSD.include.dist \
-   -p ${DESTDIR}${INCLUDEDIR} > /dev/null
+   -p ${SDESTDIR}${INCLUDEDIR} > /dev/null
 
 copies: .PHONY .META
 .for i in ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} crypto machine machine/pc \
${_MARCHS}
-   if [ -d ${DESTDIR}${INCLUDEDIR}/$i ]; then \
-   cd ${DESTDIR}${INCLUDEDIR}/$i; \
+   if [ -d ${SDESTDIR}${INCLUDEDIR}/$i ]; then \
+   cd ${SDESTDIR}${INCLUDEDIR}/$i; \
for h in *.h; do \
if [ -L $$h ]; then rm -f $$h; fi; \
done; \
@@ -158,101 +159,101 @@ copies: .PHONY .META
 .for i in ${LDIRS} 
${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/hyperv:Ndev/nand:Ndev/pci}
 ${LSUBSUBDIRS}
cd ${SRCTOP}/sys; \
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \
-   ${DESTDIR}${INCLUDEDIR}/$i
+   ${SDESTDIR}${INCLUDEDIR}/$i
 .endfor
cd ${SRCTOP}/sys/dev/acpica; \
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 acpiio.h \
-   ${DESTDIR}${INCLUDEDIR}/dev/acpica; \
+   ${SDESTDIR}${INCLUDEDIR}/dev/acpica; \
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 acpi_hpet.h \
-   ${DESTDIR}${INCLUDEDIR}/dev/acpica
+   ${SDESTDIR}${INCLUDEDIR}/dev/acpica
cd ${SRCTOP}/sys/dev/agp; \
 

svn commit: r320121 - head/sys/vm

2017-06-19 Thread Konstantin Belousov
Author: kib
Date: Mon Jun 19 20:40:59 2017
New Revision: 320121
URL: https://svnweb.freebsd.org/changeset/base/320121

Log:
  Ignore the P_SYSTEM process flag, and do not request
  VM_MAP_WIRE_SYSTEM mode when wiring the newly grown stack.
  
  System maps do not create auto-grown stack.  Any stack we handled,
  even for P_SYSTEM, must be for user address space.  P_SYSTEM processes
  with mapped user space is either init(8) or an aio worker attached to
  other user process with aio buffer pointing into stack area.  In either
  case, VM_MAP_WIRE_USER mode should be used.
  
  Noted and reviewed by:alc
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/sys/vm/vm_map.c

Modified: head/sys/vm/vm_map.c
==
--- head/sys/vm/vm_map.cMon Jun 19 19:27:37 2017(r320120)
+++ head/sys/vm/vm_map.cMon Jun 19 20:40:59 2017(r320121)
@@ -3891,9 +3891,7 @@ Retry:
vm_map_wire(map,
(stack_entry == next_entry) ? addr : addr - grow_amount,
(stack_entry == next_entry) ? stack_entry->start : addr,
-   (p->p_flag & P_SYSTEM)
-   ? VM_MAP_WIRE_SYSTEM|VM_MAP_WIRE_NOHOLES
-   : VM_MAP_WIRE_USER|VM_MAP_WIRE_NOHOLES);
+   VM_MAP_WIRE_USER | VM_MAP_WIRE_NOHOLES);
}
 
 out:
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r320120 - head/contrib/ipfilter/tools

2017-06-19 Thread Cy Schubert
Author: cy
Date: Mon Jun 19 19:27:37 2017
New Revision: 320120
URL: https://svnweb.freebsd.org/changeset/base/320120

Log:
  poolcommand() (ippool -A and ippool -R) seed takes an argument.

Modified:
  head/contrib/ipfilter/tools/ippool.c

Modified: head/contrib/ipfilter/tools/ippool.c
==
--- head/contrib/ipfilter/tools/ippool.cMon Jun 19 18:08:20 2017
(r320119)
+++ head/contrib/ipfilter/tools/ippool.cMon Jun 19 19:27:37 2017
(r320120)
@@ -268,7 +268,7 @@ poolcommand(remove, argc, argv)
bzero((char *)&iph, sizeof(iph));
bzero((char *)&pool, sizeof(pool));
 
-   while ((c = getopt(argc, argv, "dm:no:RSv")) != -1)
+   while ((c = getopt(argc, argv, "dm:no:RS:v")) != -1)
switch (c)
{
case '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: r320118 - head/share/mk

2017-06-19 Thread Bryan Drewery
Author: bdrewery
Date: Mon Jun 19 18:08:02 2017
New Revision: 320118
URL: https://svnweb.freebsd.org/changeset/base/320118

Log:
  Follow-up r320061: Need to respect make.conf/env LIBDIR overrides.
  
  This fixes the lib32 build from creating all stale .depend files.
  
  X-MFC-With:   320061
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/share/mk/bsd.own.mk
  head/share/mk/local.sys.mk

Modified: head/share/mk/bsd.own.mk
==
--- head/share/mk/bsd.own.mkMon Jun 19 15:56:03 2017(r320117)
+++ head/share/mk/bsd.own.mkMon Jun 19 18:08:02 2017(r320118)
@@ -152,6 +152,11 @@ DTBOWN?=   root
 DTBGRP?=   wheel
 DTBMODE?=  444
 
+# Use make.conf / environment LIBDIR as default if set...
+.if !empty(_PREMK_LIBDIR)
+LIBDIR_BASE?=  ${_PREMK_LIBDIR}
+.endif
+# otherwise use our expected default value.
 LIBDIR_BASE?=  /usr/lib
 LIBDIR?=   ${LIBDIR_BASE}
 LIBCOMPATDIR?= /usr/lib/compat

Modified: head/share/mk/local.sys.mk
==
--- head/share/mk/local.sys.mk  Mon Jun 19 15:56:03 2017(r320117)
+++ head/share/mk/local.sys.mk  Mon Jun 19 18:08:02 2017(r320118)
@@ -42,6 +42,10 @@ MAKE_PRINT_VAR_ON_ERROR += .MAKE.MAKEFILES .PATH
 OBJTOP?= ${.OBJDIR:S,${.CURDIR},,}${SRCTOP}
 .endif
 
+.if !empty(LIBDIR)
+_PREMK_LIBDIR:=${LIBDIR}
+.endif
+
 .include "src.sys.mk"
 
 .if ${.MAKE.MODE:Mmeta*} != ""
___
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: r320119 - head

2017-06-19 Thread Bryan Drewery
Author: bdrewery
Date: Mon Jun 19 18:08:20 2017
New Revision: 320119
URL: https://svnweb.freebsd.org/changeset/base/320119

Log:
  buildworld: Define SYSROOT to WORLDTMP.
  
  This is to allow downstream Makefiles to know for sure they are building
  against a sysroot rather than only depending on ${DESTDIR} or other
  assumptions.
  
  This also exports it into buildenv.
  
  MFC after:2 weeks
  Sponsored by: Dell EMC Isilon

Modified:
  head/Makefile.inc1
  head/Makefile.libcompat

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Mon Jun 19 18:08:02 2017(r320118)
+++ head/Makefile.inc1  Mon Jun 19 18:08:20 2017(r320119)
@@ -563,7 +563,8 @@ KTMAKE= TOOLS_PREFIX=${WORLDTMP} 
MAKEOBJDIRPREFIX=${W
 # world stage
 WMAKEENV=  ${CROSSENV} \
INSTALL="sh ${.CURDIR}/tools/install.sh" \
-   PATH=${TMPPATH}
+   PATH=${TMPPATH} \
+   SYSROOT=${WORLDTMP}
 
 # make hierarchy
 HMAKE= PATH=${TMPPATH} ${MAKE} LOCAL_MTREE=${LOCAL_MTREE:Q}
@@ -722,7 +723,7 @@ IMAKE_MTREE=MTREE_CMD="mtree ${MTREEFLAGS}"
 .endif
 
 # kernel stage
-KMAKEENV=  ${WMAKEENV}
+KMAKEENV=  ${WMAKEENV:NSYSROOT=*}
 KMAKE= ${KMAKEENV} ${MAKE} ${.MAKEFLAGS} ${KERNEL_FLAGS} 
KERNEL=${INSTKERNNAME}
 
 #

Modified: head/Makefile.libcompat
==
--- head/Makefile.libcompat Mon Jun 19 18:08:02 2017(r320118)
+++ head/Makefile.libcompat Mon Jun 19 18:08:20 2017(r320119)
@@ -111,6 +111,7 @@ LIBCOMPATCXXFLAGS+= -isystem ${LIBCOMPATTMP}/usr/inclu
 LIBCOMPATWMAKEENV+= MAKEOBJDIRPREFIX=${LIBCOMPAT_OBJTREE} \
INSTALL="sh ${.CURDIR}/tools/install.sh" \
PATH=${TMPPATH} \
+   SYSROOT=${LIBCOMPATTMP} \
LIBDIR=/usr/lib${libcompat} \
SHLIBDIR=/usr/lib${libcompat} \
DTRACE="${LIB$COMPATDTRACE:U${DTRACE}}"
___
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: r320117 - stable/10/sys/dev/e1000

2017-06-19 Thread Sean Bruno
Author: sbruno
Date: Mon Jun 19 15:56:03 2017
New Revision: 320117
URL: https://svnweb.freebsd.org/changeset/base/320117

Log:
  Direct commit to stable/10 to correctly setting the EIAC and IMS
  registers to the same values when processing interrupts.
  
  This resolves PR https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211219
  
  PR:   211219
  Submitted by: Franco Fitchner 

Modified:
  stable/10/sys/dev/e1000/if_em.c

Modified: stable/10/sys/dev/e1000/if_em.c
==
--- stable/10/sys/dev/e1000/if_em.c Mon Jun 19 15:41:39 2017
(r320116)
+++ stable/10/sys/dev/e1000/if_em.c Mon Jun 19 15:56:03 2017
(r320117)
@@ -5158,7 +5158,7 @@ em_enable_intr(struct adapter *adapter)
 
if (hw->mac.type == e1000_82574) {
E1000_WRITE_REG(hw, EM_EIAC, EM_MSIX_MASK);
-   ims_mask |= adapter->ims;
+   ims_mask |= EM_MSIX_MASK;
} 
E1000_WRITE_REG(hw, E1000_IMS, ims_mask);
 }
___
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: r320116 - stable/10/sys/dev/vmware/vmxnet3

2017-06-19 Thread Andriy Gapon
Author: avg
Date: Mon Jun 19 15:41:39 2017
New Revision: 320116
URL: https://svnweb.freebsd.org/changeset/base/320116

Log:
  MFC r318867: fix vmxnet3 crash when LRO is enabled
  
  Sponsored by: Panzura

Modified:
  stable/10/sys/dev/vmware/vmxnet3/if_vmx.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/vmware/vmxnet3/if_vmx.c
==
--- stable/10/sys/dev/vmware/vmxnet3/if_vmx.c   Mon Jun 19 15:38:22 2017
(r320115)
+++ stable/10/sys/dev/vmware/vmxnet3/if_vmx.c   Mon Jun 19 15:41:39 2017
(r320116)
@@ -2194,6 +2194,20 @@ vmxnet3_rxq_eof(struct vmxnet3_rxqueue *rxq)
} else {
KASSERT(rxd->btype == VMXNET3_BTYPE_BODY,
("%s: non start of frame w/o body buffer", 
__func__));
+
+   if (m_head == NULL && m_tail == NULL) {
+   /*
+* This is a continuation of a packet that we
+* started to drop, but could not drop entirely
+* because this segment was still owned by the
+* host.  So, drop the remainder now.
+*/
+   vmxnet3_rxq_eof_discard(rxq, rxr, idx);
+   if (!rxcd->eop)
+   vmxnet3_rxq_discard_chain(rxq);
+   goto nextp;
+   }
+
KASSERT(m_head != NULL,
("%s: frame not started?", __func__));
 
___
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: r320115 - stable/10/sys/dev/hwpmc

2017-06-19 Thread Andriy Gapon
Author: avg
Date: Mon Jun 19 15:38:22 2017
New Revision: 320115
URL: https://svnweb.freebsd.org/changeset/base/320115

Log:
  MFC r311224: Fix PMC architecture check to handle later IPAs including Skylake

Modified:
  stable/10/sys/dev/hwpmc/hwpmc_core.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c
==
--- stable/10/sys/dev/hwpmc/hwpmc_core.cMon Jun 19 15:35:41 2017
(r320114)
+++ stable/10/sys/dev/hwpmc/hwpmc_core.cMon Jun 19 15:38:22 2017
(r320115)
@@ -2857,7 +2857,7 @@ pmc_core_initialize(struct pmc_mdep *md, int maxcpu, i
PMCDBG3(MDP,INI,1,"core-init cputype=%d ncpu=%d ipa-version=%d",
core_cputype, maxcpu, ipa_version);
 
-   if (ipa_version < 1 || ipa_version > 3 ||
+   if (ipa_version < 1 || ipa_version > 4 ||
(core_cputype != PMC_CPU_INTEL_CORE && ipa_version == 1)) {
/* Unknown PMC architecture. */
printf("hwpc_core: unknown PMC architecture: %d\n",
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r320114 - stable/10/sys/dev/hwpmc

2017-06-19 Thread Andriy Gapon
Author: avg
Date: Mon Jun 19 15:35:41 2017
New Revision: 320114
URL: https://svnweb.freebsd.org/changeset/base/320114

Log:
  MFC r292070: More fixes in the various intel processors, fixing missing
  IAP_F_FM's...

Modified:
  stable/10/sys/dev/hwpmc/hwpmc_core.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c
==
--- stable/10/sys/dev/hwpmc/hwpmc_core.cMon Jun 19 15:34:07 2017
(r320113)
+++ stable/10/sys/dev/hwpmc/hwpmc_core.cMon Jun 19 15:35:41 2017
(r320114)
@@ -634,20 +634,20 @@ static struct iap_event_descr iap_events[] = {
 IAPDESCR(03H_10H, 0x03, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB |
IAP_F_SBX | IAP_F_CAS),
 IAPDESCR(03H_20H, 0x03, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS),
-IAPDESCR(03H_40H, 0x03, 0x40, IAP_F_CAS),
-IAPDESCR(03H_80H, 0x03, 0x80, IAP_F_CAS),
+IAPDESCR(03H_40H, 0x03, 0x40, IAP_F_FM | IAP_F_CAS),
+IAPDESCR(03H_80H, 0x03, 0x80, IAP_F_FM | IAP_F_CAS),
 
 IAPDESCR(04H_00H, 0x04, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CAS),
 IAPDESCR(04H_01H, 0x04, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O |
IAP_F_CAS),
 IAPDESCR(04H_02H, 0x04, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS),
-IAPDESCR(04H_04H, 0x04, 0x04, IAP_F_CAS),
+IAPDESCR(04H_04H, 0x04, 0x04, IAP_F_FM | IAP_F_CAS),
 IAPDESCR(04H_07H, 0x04, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM),
 IAPDESCR(04H_08H, 0x04, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS),
-IAPDESCR(04H_10H, 0x04, 0x10, IAP_F_CAS),
-IAPDESCR(04H_20H, 0x04, 0x20, IAP_F_CAS),
-IAPDESCR(04H_40H, 0x04, 0x40, IAP_F_CAS),
-IAPDESCR(04H_80H, 0x04, 0x80, IAP_F_CAS),
+IAPDESCR(04H_10H, 0x04, 0x10, IAP_F_FM | IAP_F_CAS),
+IAPDESCR(04H_20H, 0x04, 0x20, IAP_F_FM | IAP_F_CAS),
+IAPDESCR(04H_40H, 0x04, 0x40, IAP_F_FM | IAP_F_CAS),
+IAPDESCR(04H_80H, 0x04, 0x80, IAP_F_FM | IAP_F_CAS),
 
 IAPDESCR(05H_00H, 0x05, 0x00, IAP_F_FM | IAP_F_CC),
 IAPDESCR(05H_01H, 0x05, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SB | IAP_F_IB |
@@ -690,7 +690,7 @@ static struct iap_event_descr iap_events[] = {
 IAPDESCR(08H_08H, 0x08, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2),
 IAPDESCR(08H_09H, 0x08, 0x09, IAP_F_FM | IAP_F_CA),
 IAPDESCR(08H_0EH, 0x08, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL),
-IAPDESCR(08H_10H, 0x08, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB |
+IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB |
IAP_F_SBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL),
 IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW |
 IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL),
@@ -700,7 +700,7 @@ static struct iap_event_descr iap_events[] = {
 IAPDESCR(08H_81H, 0x08, 0x81, IAP_F_FM | IAP_F_IB | IAP_F_IBX),
 IAPDESCR(08H_82H, 0x08, 0x82, IAP_F_FM | IAP_F_IB | IAP_F_IBX),
 IAPDESCR(08H_84H, 0x08, 0x84, IAP_F_FM | IAP_F_IB | IAP_F_IBX),
-IAPDESCR(08H_88H, 0x08, 0x88, IAP_F_IB | IAP_F_IBX),
+IAPDESCR(08H_88H, 0x08, 0x88, IAP_F_FM | IAP_F_IB | IAP_F_IBX),
 
 IAPDESCR(09H_01H, 0x09, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O),
 IAPDESCR(09H_02H, 0x09, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O),
@@ -719,7 +719,7 @@ static struct iap_event_descr iap_events[] = {
 IAPDESCR(0DH_03H, 0x0D, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW |
IAP_F_IB | IAP_F_IBX | IAP_F_HWX | IAP_F_BW | IAP_F_BWX),
 IAPDESCR(0DH_40H, 0x0D, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX),
-IAPDESCR(0DH_80H, 0x0D, 0x00, IAP_F_FM | IAP_F_SL),
+IAPDESCR(0DH_80H, 0x0D, 0x80, IAP_F_FM | IAP_F_SL),
 
 IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB |
IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX |
@@ -830,8 +830,8 @@ static struct iap_event_descr iap_events[] = {
 IAPDESCR(24H_30H, 0x24, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB |
IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX |
IAP_F_BW | IAP_F_BWX),
-IAPDESCR(24H_38H, 0x24, 0x00, IAP_F_FM | IAP_F_SL),
-IAPDESCR(24H_3FH, 0x24, 0x00, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL),
+IAPDESCR(24H_38H, 0x24, 0x38, IAP_F_FM | IAP_F_SL),
+IAPDESCR(24H_3FH, 0x24, 0x3F, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL),
 IAPDESCR(24H_40H, 0x24, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB |
IAP_F_IB | IAP_F_SBX | IAP_F_IBX),
 IAPDESCR(24H_41H, 0x24, 0x41, IAP_F_FM | IAP_F_HW | IAP_F_HWX |
@@ -845,7 +845,7 @@ static struct iap_event_descr iap_events[] = {
 IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7 | IAP_F_WM),
 IAPDESCR(24H_C0H, 0x24, 0xC0, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB |
IAP_F_IB | IAP_F_SBX | IAP_F_IBX),
-IAPDESCR(24H_D8H, 0x24, 0x00, IAP_F_FM | IAP_F_SL),
+IAPDESCR(24H_D8H, 0x24, 0xD8, IAP_F_FM | IAP_F_SL),
 I

svn commit: r320113 - in stable/10: lib/libpmc sys/dev/hwpmc sys/sys

2017-06-19 Thread Andriy Gapon
Author: avg
Date: Mon Jun 19 15:34:07 2017
New Revision: 320113
URL: https://svnweb.freebsd.org/changeset/base/320113

Log:
  MFC r291494: Add support for Intel Skylake and Intel Broadwell PMC's.

Modified:
  stable/10/lib/libpmc/libpmc.c
  stable/10/sys/dev/hwpmc/hwpmc_core.c
  stable/10/sys/dev/hwpmc/hwpmc_intel.c
  stable/10/sys/dev/hwpmc/pmc_events.h
  stable/10/sys/sys/pmc.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libpmc/libpmc.c
==
--- stable/10/lib/libpmc/libpmc.c   Mon Jun 19 15:24:37 2017
(r320112)
+++ stable/10/lib/libpmc/libpmc.c   Mon Jun 19 15:34:07 2017
(r320113)
@@ -205,7 +205,21 @@ static const struct pmc_event_descr haswell_xeon_event
__PMC_EV_ALIAS_HASWELL_XEON()
 };
 
+static const struct pmc_event_descr broadwell_event_table[] =
+{
+   __PMC_EV_ALIAS_BROADWELL()
+};
 
+static const struct pmc_event_descr broadwell_xeon_event_table[] =
+{
+   __PMC_EV_ALIAS_BROADWELL_XEON()
+};
+
+static const struct pmc_event_descr skylake_event_table[] =
+{
+   __PMC_EV_ALIAS_SKYLAKE()
+};
+
 static const struct pmc_event_descr ivybridge_event_table[] =
 {
__PMC_EV_ALIAS_IVYBRIDGE()
@@ -246,6 +260,11 @@ static const struct pmc_event_descr haswelluc_event_ta
__PMC_EV_ALIAS_HASWELLUC()
 };
 
+static const struct pmc_event_descr broadwelluc_event_table[] =
+{
+   __PMC_EV_ALIAS_BROADWELLUC()
+};
+
 static const struct pmc_event_descr sandybridgeuc_event_table[] =
 {
__PMC_EV_ALIAS_SANDYBRIDGEUC()
@@ -274,6 +293,9 @@ PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_SOFT, PMC_CLASS_
 PMC_MDEP_TABLE(nehalem_ex, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC);
 PMC_MDEP_TABLE(haswell, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, 
PMC_CLASS_UCF, PMC_CLASS_UCP);
 PMC_MDEP_TABLE(haswell_xeon, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, 
PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP);
+PMC_MDEP_TABLE(broadwell, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, 
PMC_CLASS_UCF, PMC_CLASS_UCP);
+PMC_MDEP_TABLE(broadwell_xeon, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, 
PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP);
+PMC_MDEP_TABLE(skylake, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, 
PMC_CLASS_UCF, PMC_CLASS_UCP);
 PMC_MDEP_TABLE(ivybridge, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC);
 PMC_MDEP_TABLE(ivybridge_xeon, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, 
PMC_CLASS_TSC);
 PMC_MDEP_TABLE(sandybridge, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, 
PMC_CLASS_UCF, PMC_CLASS_UCP);
@@ -320,6 +342,9 @@ PMC_CLASS_TABLE_DESC(corei7, IAP, corei7, iap);
 PMC_CLASS_TABLE_DESC(nehalem_ex, IAP, nehalem_ex, iap);
 PMC_CLASS_TABLE_DESC(haswell, IAP, haswell, iap);
 PMC_CLASS_TABLE_DESC(haswell_xeon, IAP, haswell, iap);
+PMC_CLASS_TABLE_DESC(broadwell, IAP, broadwell, iap);
+PMC_CLASS_TABLE_DESC(broadwell_xeon, IAP, broadwell_xeon, iap);
+PMC_CLASS_TABLE_DESC(skylake, IAP, skylake, iap);
 PMC_CLASS_TABLE_DESC(ivybridge, IAP, ivybridge, iap);
 PMC_CLASS_TABLE_DESC(ivybridge_xeon, IAP, ivybridge_xeon, iap);
 PMC_CLASS_TABLE_DESC(sandybridge, IAP, sandybridge, iap);
@@ -329,6 +354,7 @@ PMC_CLASS_TABLE_DESC(westmere_ex, IAP, westmere_ex, ia
 PMC_CLASS_TABLE_DESC(ucf, UCF, ucf, ucf);
 PMC_CLASS_TABLE_DESC(corei7uc, UCP, corei7uc, ucp);
 PMC_CLASS_TABLE_DESC(haswelluc, UCP, haswelluc, ucp);
+PMC_CLASS_TABLE_DESC(broadwelluc, UCP, broadwelluc, ucp);
 PMC_CLASS_TABLE_DESC(sandybridgeuc, UCP, sandybridgeuc, ucp);
 PMC_CLASS_TABLE_DESC(westmereuc, UCP, westmereuc, ucp);
 #endif
@@ -636,6 +662,12 @@ static struct pmc_event_alias core2_aliases_without_ia
 #define haswell_aliases_without_iafcore2_aliases_without_iaf
 #define haswell_xeon_aliases   core2_aliases
 #define haswell_xeon_aliases_without_iaf   core2_aliases_without_iaf
+#define broadwell_aliases  core2_aliases
+#define broadwell_aliases_without_iaf  core2_aliases_without_iaf
+#define broadwell_xeon_aliases core2_aliases
+#define broadwell_xeon_aliases_without_iaf core2_aliases_without_iaf
+#define skylake_aliasescore2_aliases
+#define skylake_aliases_without_iafcore2_aliases_without_iaf
 #define ivybridge_aliases  core2_aliases
 #define ivybridge_aliases_without_iaf  core2_aliases_without_iaf
 #define ivybridge_xeon_aliases core2_aliases
@@ -796,6 +828,7 @@ static struct pmc_masks iap_rsp_mask_sb_sbx_ib[] = {
NULLMASK
 };
 
+/* Broadwell is defined to use the same mask as Haswell */
 static struct pmc_masks iap_rsp_mask_haswell[] = {
PMCMASK(REQ_DMND_DATA_RD,   (1ULL <<  0)),
PMCMASK(REQ_DMND_RFO,   (1ULL <<  1)),
@@ -811,6 +844,10 @@ static struct pmc_masks iap_rsp_mask_haswell[] = {
PMCMASK(RES_SUPPLIER_LLC_HITS,  (1ULL << 20)),
PMCMASK(RES_SUPPLIER_LLC_HITF,  (1ULL << 21)),
PMCMASK(RES_SUPPLIER_LOCAL, (1ULL << 22)),
+   /* 
+

svn commit: r320112 - stable/10/sys/dev/hwpmc

2017-06-19 Thread Andriy Gapon
Author: avg
Date: Mon Jun 19 15:24:37 2017
New Revision: 320112
URL: https://svnweb.freebsd.org/changeset/base/320112

Log:
  MFC r281101: Remove whitespace [in hwpmc]

Modified:
  stable/10/sys/dev/hwpmc/hwpmc_core.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c
==
--- stable/10/sys/dev/hwpmc/hwpmc_core.cMon Jun 19 15:23:07 2017
(r320111)
+++ stable/10/sys/dev/hwpmc/hwpmc_core.cMon Jun 19 15:24:37 2017
(r320112)
@@ -414,7 +414,7 @@ iaf_start_pmc(int cpu, int ri)
iafc->pc_resync = 0;
iafc->pc_globalctrl |= (1ULL << (ri + IAF_OFFSET));
msr = rdmsr(IA_GLOBAL_CTRL) & ~IAF_GLOBAL_CTRL_MASK;
-   wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl & 
+   wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl &
 IAF_GLOBAL_CTRL_MASK));
} while (iafc->pc_resync != 0);
 
@@ -491,7 +491,7 @@ iaf_write_pmc(int cpu, int ri, pmc_value_t v)
 
/* Turn off fixed counters */
msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK;
-   wrmsr(IAF_CTRL, msr); 
+   wrmsr(IAF_CTRL, msr);
 
wrmsr(IAF_CTR0 + ri, v & ((1ULL << core_iaf_width) - 1));
 
@@ -709,7 +709,7 @@ static struct iap_event_descr iap_events[] = {
 IAPDESCR(0CH_02H, 0x0C, 0x02, IAP_F_FM | IAP_F_CC2),
 IAPDESCR(0CH_03H, 0x0C, 0x03, IAP_F_FM | IAP_F_CA),
 
-IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | 
+IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW |
IAP_F_IB | IAP_F_IBX | IAP_F_HWX),
 IAPDESCR(0DH_40H, 0x0D, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX),
 
@@ -1321,7 +1321,7 @@ static struct iap_event_descr iap_events[] = {
 
 IAPDESCR(A6H_01H, 0xA6, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM),
 IAPDESCR(A7H_01H, 0xA7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM),
-IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IBX | 
+IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IBX |
IAP_F_IB |IAP_F_SB |  IAP_F_SBX | IAP_F_HW | IAP_F_HWX),
 
 IAPDESCR(AAH_01H, 0xAA, 0x01, IAP_F_FM | IAP_F_CC2),
@@ -1471,7 +1471,7 @@ static struct iap_event_descr iap_events[] = {
 IAPDESCR(C3H_01H, 0xC3, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 |
IAP_F_I7 | IAP_F_WM | IAP_F_CAS),
 IAPDESCR(C3H_02H, 0xC3, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM |
-   IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | 
+   IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW |
IAP_F_CAS | IAP_F_HWX),
 IAPDESCR(C3H_04H, 0xC3, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 |
IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX |
@@ -1628,10 +1628,10 @@ static struct iap_event_descr iap_events[] = {
IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX),
 IAPDESCR(D1H_04H, 0xD1, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM |
IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX),
-IAPDESCR(D1H_08H, 0xD1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | 
+IAPDESCR(D1H_08H, 0xD1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB |
 IAP_F_IBX | IAP_F_HW | IAP_F_HWX),
 IAPDESCR(D1H_10H, 0xD1, 0x10, IAP_F_HW | IAP_F_IB | IAP_F_IBX | IAP_F_HWX),
-IAPDESCR(D1H_20H, 0xD1, 0x20, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB 
| 
+IAPDESCR(D1H_20H, 0xD1, 0x20, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB |
 IAP_F_HW | IAP_F_HWX),
 IAPDESCR(D1H_40H, 0xD1, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_IB |
IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX),
@@ -1721,7 +1721,7 @@ static struct iap_event_descr iap_events[] = {
 IAPDESCR(E6H_02H, 0xE6, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM),
 IAPDESCR(E6H_08H, 0xE6, 0x08, IAP_F_CAS),
 IAPDESCR(E6H_10H, 0xE6, 0x10, IAP_F_CAS),
-IAPDESCR(E6H_1FH, 0xE6, 0x1F, IAP_F_FM | IAP_F_IB | 
+IAPDESCR(E6H_1FH, 0xE6, 0x1F, IAP_F_FM | IAP_F_IB |
 IAP_F_IBX | IAP_F_HW | IAP_F_HWX),
 
 IAPDESCR(E7H_01H, 0xE7, 0x01, IAP_F_CAS),
@@ -1885,7 +1885,7 @@ iap_is_event_architectural(enum pmc_event pe, enum pmc
return (EV_IS_NOTARCH);
}
 
-   return (((core_architectural_events & (1 << ae)) == 0) ? 
+   return (((core_architectural_events & (1 << ae)) == 0) ?
EV_IS_ARCH_NOTSUPP : EV_IS_ARCH_SUPP);
 }
 
___
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: r320111 - stable/10/sys/dev/hwpmc

2017-06-19 Thread Andriy Gapon
Author: avg
Date: Mon Jun 19 15:23:07 2017
New Revision: 320111
URL: https://svnweb.freebsd.org/changeset/base/320111

Log:
  MFC r279939: hwpmc: Fix event number to match enum name

Modified:
  stable/10/sys/dev/hwpmc/hwpmc_core.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c
==
--- stable/10/sys/dev/hwpmc/hwpmc_core.cMon Jun 19 15:22:05 2017
(r320110)
+++ stable/10/sys/dev/hwpmc/hwpmc_core.cMon Jun 19 15:23:07 2017
(r320111)
@@ -1656,9 +1656,9 @@ static struct iap_event_descr iap_events[] = {
 
 IAPDESCR(D3H_01H, 0xD3, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_SBX |
IAP_F_IBX | IAP_F_HW | IAP_F_HWX),
-IAPDESCR(D3H_03H, 0xD0, 0x3, IAP_F_IBX  ),
+IAPDESCR(D3H_03H, 0xD3, 0x03, IAP_F_IBX),
 IAPDESCR(D3H_04H, 0xD3, 0x04, IAP_F_FM | IAP_F_SBX | IAP_F_IBX),   /* Not 
defined for IBX */
-IAPDESCR(D3H_0CH, 0xD0, 0x0, IAP_F_IBX  ),
+IAPDESCR(D3H_0CH, 0xD3, 0x0C, IAP_F_IBX),
 IAPDESCR(D3H_10H, 0xD3, 0x10, IAP_F_IBX  ),
 IAPDESCR(D3H_20H, 0xD3, 0x20, IAP_F_IBX  ),
 
___
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: r320110 - stable/10/sys/dev/hwpmc

2017-06-19 Thread Andriy Gapon
Author: avg
Date: Mon Jun 19 15:22:05 2017
New Revision: 320110
URL: https://svnweb.freebsd.org/changeset/base/320110

Log:
  MFC r279836: Add missing counter definitions

Modified:
  stable/10/sys/dev/hwpmc/hwpmc_core.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c
==
--- stable/10/sys/dev/hwpmc/hwpmc_core.cMon Jun 19 15:20:30 2017
(r320109)
+++ stable/10/sys/dev/hwpmc/hwpmc_core.cMon Jun 19 15:22:05 2017
(r320110)
@@ -1131,6 +1131,10 @@ static struct iap_event_descr iap_events[] = {
IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX),
 IAPDESCR(79H_18H, 0x79, 0x18, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW |
 IAP_F_HWX),
+IAPDESCR(79H_24H, 0x79, 0x24, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW |
+IAP_F_HWX),
+IAPDESCR(79H_3CH, 0x79, 0x3C, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW |
+IAP_F_HWX),
 
 IAPDESCR(7AH, 0x7A, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2),
 
@@ -1277,7 +1281,8 @@ static struct iap_event_descr iap_events[] = {
IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX),
 IAPDESCR(A1H_08H, 0xA1, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 |   /* No 
desc in IB for this*/
IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX),
-IAPDESCR(A1H_0CH, 0xA1, 0x0C, IAP_F_IB | IAP_F_IBX),
+IAPDESCR(A1H_0CH, 0xA1, 0x0C, IAP_F_FM | IAP_F_SB | IAP_F_IB |
+   IAP_F_SBX | IAP_F_IBX),
 IAPDESCR(A1H_10H, 0xA1, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 |   /* No 
desc in IB for this*/
IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX),
 IAPDESCR(A1H_20H, 0xA1, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2 |   /* No 
desc in IB for this*/
___
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: r320109 - in stable/10: lib/libpmc sys/dev/hwpmc

2017-06-19 Thread Andriy Gapon
Author: avg
Date: Mon Jun 19 15:20:30 2017
New Revision: 320109
URL: https://svnweb.freebsd.org/changeset/base/320109

Log:
  MFC r279835: Fix Ivy Bridge+ MEM_UOPS_RETIRED counters

Modified:
  stable/10/lib/libpmc/pmc.haswell.3
  stable/10/lib/libpmc/pmc.haswellxeon.3
  stable/10/lib/libpmc/pmc.ivybridge.3
  stable/10/lib/libpmc/pmc.ivybridgexeon.3
  stable/10/sys/dev/hwpmc/hwpmc_core.c
  stable/10/sys/dev/hwpmc/pmc_events.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libpmc/pmc.haswell.3
==
--- stable/10/lib/libpmc/pmc.haswell.3  Mon Jun 19 15:17:17 2017
(r320108)
+++ stable/10/lib/libpmc/pmc.haswell.3  Mon Jun 19 15:20:30 2017
(r320109)
@@ -808,30 +808,24 @@ Count cases of saving new LBR records by hardware.
 Randomly sampled loads whose latency is above a
 user defined threshold. A small fraction of the overall
 loads are sampled due to randomization.
-.It Li MEM_UOP_RETIRED.LOADS
-.Pq Event D0H , Umask 01H
-Qualify retired memory uops that are loads. Combine Supports PEBS and
-with umask 10H, 20H, 40H, 80H.
-.It Li MEM_UOP_RETIRED.STORES
-.Pq Event D0H , Umask 02H
-Qualify retired memory uops that are stores.
-Combine with umask 10H, 20H, 40H, 80H.
-.It Li MEM_UOP_RETIRED.STLB_MISS
-.Pq Event D0H , Umask 10H
-Qualify retired memory uops with STLB miss. Must
-combine with umask 01H, 02H, to produce counts.
-.It Li MEM_UOP_RETIRED.LOCK
-.Pq Event D0H , Umask 20H
-Qualify retired memory uops with lock. Must combine Supports PEBS and
-with umask 01H, 02H, to produce counts.
-.It Li MEM_UOP_RETIRED.SPLIT
-.Pq Event D0H , Umask 40H
-Qualify retired memory uops with line split. Must
-combine with umask 01H, 02H, to produce counts.
-.It Li MEM_UOP_RETIRED.ALL
-.Pq Event D0H , Umask 80H
-Qualify any retired memory uops. Must combine with Supports PEBS and
-umask 01H, 02H, to produce counts.
+.It Li MEM_UOPS_RETIRED.STLB_MISS_LOADS
+.Pq Event D0H , Umask 11H
+Count retired load uops that missed the STLB.
+.It Li MEM_UOPS_RETIRED.STLB_MISS_STORES
+.Pq Event D0H , Umask 12H
+Count retired store uops that missed the STLB.
+.It Li MEM_UOPS_RETIRED.SPLIT_LOADS
+.Pq Event D0H , Umask 41H
+Count retired load uops that were split across a cache line.
+.It Li MEM_UOPS_RETIRED.SPLIT_STORES
+.Pq Event D0H , Umask 42H
+Count retired store uops that were split across a cache line.
+.It Li MEM_UOPS_RETIRED.ALL_LOADS
+.Pq Event D0H , Umask 81H
+Count all retired load uops.
+.It Li MEM_UOPS_RETIRED.ALL_STORES
+.Pq Event D0H , Umask 82H
+Count all retired store uops.
 .It Li MEM_LOAD_UOPS_RETIRED.L1_HIT
 .Pq Event D1H , Umask 01H
 Retired load uops with L1 cache hits as data sources.

Modified: stable/10/lib/libpmc/pmc.haswellxeon.3
==
--- stable/10/lib/libpmc/pmc.haswellxeon.3  Mon Jun 19 15:17:17 2017
(r320108)
+++ stable/10/lib/libpmc/pmc.haswellxeon.3  Mon Jun 19 15:20:30 2017
(r320109)
@@ -809,30 +809,24 @@ Count cases of saving new LBR records by hardware.
 Randomly sampled loads whose latency is above a
 user defined threshold. A small fraction of the overall
 loads are sampled due to randomization.
-.It Li MEM_UOP_RETIRED.LOADS
-.Pq Event D0H , Umask 01H
-Qualify retired memory uops that are loads. Combine Supports PEBS and
-with umask 10H, 20H, 40H, 80H.
-.It Li MEM_UOP_RETIRED.STORES
-.Pq Event D0H , Umask 02H
-Qualify retired memory uops that are stores.
-Combine with umask 10H, 20H, 40H, 80H.
-.It Li MEM_UOP_RETIRED.STLB_MISS
-.Pq Event D0H , Umask 10H
-Qualify retired memory uops with STLB miss. Must
-combine with umask 01H, 02H, to produce counts.
-.It Li MEM_UOP_RETIRED.LOCK
-.Pq Event D0H , Umask 20H
-Qualify retired memory uops with lock. Must combine Supports PEBS and
-with umask 01H, 02H, to produce counts.
-.It Li MEM_UOP_RETIRED.SPLIT
-.Pq Event D0H , Umask 40H
-Qualify retired memory uops with line split. Must
-combine with umask 01H, 02H, to produce counts.
-.It Li MEM_UOP_RETIRED.ALL
-.Pq Event D0H , Umask 80H
-Qualify any retired memory uops. Must combine with Supports PEBS and
-umask 01H, 02H, to produce counts.
+.It Li MEM_UOPS_RETIRED.STLB_MISS_LOADS
+.Pq Event D0H , Umask 11H
+Count retired load uops that missed the STLB.
+.It Li MEM_UOPS_RETIRED.STLB_MISS_STORES
+.Pq Event D0H , Umask 12H
+Count retired store uops that missed the STLB.
+.It Li MEM_UOPS_RETIRED.SPLIT_LOADS
+.Pq Event D0H , Umask 41H
+Count retired load uops that were split across a cache line.
+.It Li MEM_UOPS_RETIRED.SPLIT_STORES
+.Pq Event D0H , Umask 42H
+Count retired store uops that were split across a cache line.
+.It Li MEM_UOPS_RETIRED.ALL_LOADS
+.Pq Event D0H , Umask 81H
+Count all retired load uops.
+.It Li MEM_UOPS_RETIRED.ALL_STORES
+.Pq Event D0H , Umask 82H
+Count all retired store uops.
 .It Li MEM_LOAD_UOPS_RETIRED.L1_HIT
 .Pq Event D1H , Umask 01H
 Retired load uops with L1 cache hits as data s

svn commit: r320108 - head/sys/kern

2017-06-19 Thread Konstantin Belousov
Author: kib
Date: Mon Jun 19 15:17:17 2017
New Revision: 320108
URL: https://svnweb.freebsd.org/changeset/base/320108

Log:
  Allow negative aio_offset only for the read and write LIO ops on
  device nodes.
  
  Otherwise, the current check of aio_offset == -1LL makes it possible
  to pass negative file offsets down to the filesystems. This trips
  assertions and is even unsafe for e.g. FFS which keeps metadata at
  negative offsets.
  
  Reported and tested by:   pho
  Reviewed by:  jhb
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week
  Differential revision:https://reviews.freebsd.org/D11266

Modified:
  head/sys/kern/vfs_aio.c

Modified: head/sys/kern/vfs_aio.c
==
--- head/sys/kern/vfs_aio.c Mon Jun 19 15:16:47 2017(r320107)
+++ head/sys/kern/vfs_aio.c Mon Jun 19 15:17:17 2017(r320108)
@@ -1550,7 +1550,9 @@ aio_aqueue(struct thread *td, struct aiocb *ujob, stru
goto aqueue_fail;
}
 
-   if (opcode != LIO_SYNC && job->uaiocb.aio_offset == -1LL) {
+   if ((opcode == LIO_READ || opcode == LIO_WRITE) &&
+   job->uaiocb.aio_offset < 0 &&
+   (fp->f_vnode == NULL || fp->f_vnode->v_type != VCHR)) {
error = EINVAL;
goto aqueue_fail;
}
___
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: r320107 - stable/10/sys/dev/hwpmc

2017-06-19 Thread Andriy Gapon
Author: avg
Date: Mon Jun 19 15:16:47 2017
New Revision: 320107
URL: https://svnweb.freebsd.org/changeset/base/320107

Log:
  MFC r279834: Support architectural events on Haswell/Ivy Bridge

Modified:
  stable/10/sys/dev/hwpmc/pmc_events.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/hwpmc/pmc_events.h
==
--- stable/10/sys/dev/hwpmc/pmc_events.hMon Jun 19 15:13:20 2017
(r320106)
+++ stable/10/sys/dev/hwpmc/pmc_events.hMon Jun 19 15:16:47 2017
(r320107)
@@ -2597,6 +2597,7 @@ __PMC_EV_ALIAS("SIMD_INT_64.SHUFFLE_MOVE", IAP_EVENT_F
  * Aliases for Haswell core PMC events
  */
 #define __PMC_EV_ALIAS_HASWELL_XEON()  \
+__PMC_EV_ALIAS_INTEL_ARCHITECTURAL()   \
 __PMC_EV_ALIAS("LD_BLOCKS.STORE_FORWARD", IAP_EVENT_03H_02H)   \
 __PMC_EV_ALIAS("LD_BLOCKS.NO_SR", IAP_EVENT_03H_08H)   \
 __PMC_EV_ALIAS("MISALIGN_MEM_REF.LOADS", IAP_EVENT_05H_01H)\
@@ -2824,6 +2825,7 @@ __PMC_EV_ALIAS("L2_LINES_OUT.DEMAND_DIRTY", IAP_EVENT_
 
 
 #define __PMC_EV_ALIAS_HASWELL()   \
+__PMC_EV_ALIAS_INTEL_ARCHITECTURAL()   \
 __PMC_EV_ALIAS("LD_BLOCKS.STORE_FORWARD", IAP_EVENT_03H_02H)   \
 __PMC_EV_ALIAS("LD_BLOCKS.NO_SR", IAP_EVENT_03H_08H)   \
 __PMC_EV_ALIAS("MISALIGN_MEM_REF.LOADS", IAP_EVENT_05H_01H)\
@@ -3051,6 +3053,7 @@ __PMC_EV_ALIAS("L2_LINES_OUT.DEMAND_DIRTY", IAP_EVENT_
 
 
 #define __PMC_EV_ALIAS_IVYBRIDGE() \
+__PMC_EV_ALIAS_INTEL_ARCHITECTURAL()   \
 __PMC_EV_ALIAS("LD_BLOCKS.STORE_FORWARD", IAP_EVENT_03H_02H)   \
 __PMC_EV_ALIAS("LD_BLOCKS.NO_SR", IAP_EVENT_03H_08H)   \
 __PMC_EV_ALIAS("MISALIGN_MEM_REF.LOADS", IAP_EVENT_05H_01H)\
@@ -3281,6 +3284,7 @@ __PMC_EV_ALIAS("L2_LINES_OUT.PF_DIRTY", IAP_EVENT_F2H_
  * Aliases for Ivy Bridge Xeon PMC events (325462-045US January 2013)
  */
 #define __PMC_EV_ALIAS_IVYBRIDGE_XEON()
\
+__PMC_EV_ALIAS_INTEL_ARCHITECTURAL()   \
 __PMC_EV_ALIAS("LD_BLOCKS.STORE_FORWARD", IAP_EVENT_03H_02H)   \
 __PMC_EV_ALIAS("LD_BLOCKS.NO_SR", IAP_EVENT_03H_08H)   \
 __PMC_EV_ALIAS("MISALIGN_MEM_REF.LOADS", IAP_EVENT_05H_01H)\
___
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: r320106 - in stable/10: lib/libpmc sys/dev/hwpmc

2017-06-19 Thread Andriy Gapon
Author: avg
Date: Mon Jun 19 15:13:20 2017
New Revision: 320106
URL: https://svnweb.freebsd.org/changeset/base/320106

Log:
  MFC r279832: Fix Sandy Bridge+ hwpmc branch counters

Modified:
  stable/10/lib/libpmc/pmc.haswell.3
  stable/10/lib/libpmc/pmc.haswellxeon.3
  stable/10/lib/libpmc/pmc.ivybridge.3
  stable/10/lib/libpmc/pmc.ivybridgexeon.3
  stable/10/lib/libpmc/pmc.sandybridge.3
  stable/10/lib/libpmc/pmc.sandybridgexeon.3
  stable/10/sys/dev/hwpmc/hwpmc_core.c
  stable/10/sys/dev/hwpmc/pmc_events.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libpmc/pmc.haswell.3
==
--- stable/10/lib/libpmc/pmc.haswell.3  Mon Jun 19 15:09:37 2017
(r320105)
+++ stable/10/lib/libpmc/pmc.haswell.3  Mon Jun 19 15:13:20 2017
(r320106)
@@ -529,73 +529,60 @@ instruction.
 .It Li ILD_STALL.IQ_FULL
 .Pq Event 87H , Umask 04H
 Stall cycles due to IQ is full.
-.It Li BR_INST_EXEC.COND
-.Pq Event 88H , Umask 01H
-Qualify conditional near branch instructions
-executed, but not necessarily retired.
+.It Li BR_INST_EXEC.NONTAKEN_COND
+.Pq Event 88H , Umask 41H
+Count conditional near branch instructions that were executed (but not
+necessarily retired) and not taken.
+.It Li BR_INST_EXEC.TAKEN_COND
+.Pq Event 88H , Umask 81H
+Count conditional near branch instructions that were executed (but not
+necessarily retired) and taken.
 .It Li BR_INST_EXEC.DIRECT_JMP
-.Pq Event 88H , Umask 02H
-Qualify all unconditional near branch instructions
-excluding calls and indirect branches.
+.Pq Event 88H , Umask 82H
+Count all unconditional near branch instructions excluding calls and
+indirect branches.
 .It Li BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET
-.Pq Event 88H , Umask 04H
-Qualify executed indirect near branch instructions
-that are not calls nor returns.
+.Pq Event 88H , Umask 84H
+Count executed indirect near branch instructions that are not calls nor
+returns.
 .It Li BR_INST_EXEC.RETURN_NEAR
-.Pq Event 88H , Umask 08H
-Qualify indirect near branches that have a return
-mnemonic.
+.Pq Event 88H , Umask 88H
+Count indirect near branches that have a return mnemonic.
 .It Li BR_INST_EXEC.DIRECT_NEAR_CALL
-.Pq Event 88H , Umask 10H
-Qualify unconditional near call branch instructions,
-excluding non call branch, executed.
+.Pq Event 88H , Umask 90H
+Count unconditional near call branch instructions, excluding non call
+branch, executed.
 .It Li BR_INST_EXEC.INDIRECT_NEAR_CALL
-.Pq Event 88H , Umask 20H
-Qualify indirect near calls, including both register and
-memory indirect, executed.
-.It Li BR_INST_EXEC.NONTAKEN
-.Pq Event 88H , Umask 40H
-Qualify non-taken near branches executed.
-.It Li BR_INST_EXEC.TAKEN
-.Pq Event 88H , Umask 80H
-Qualify taken near branches executed. Must combine
-with 01H,02H, 04H, 08H, 10H, 20H.
+.Pq Event 88H , Umask A0H
+Count indirect near calls, including both register and memory indirect,
+executed.
 .It Li BR_INST_EXEC.ALL_BRANCHES
 .Pq Event 88H , Umask FFH
-Counts all near executed branches (not necessarily
-retired).
-.It Li BR_MISP_EXEC.COND
-.Pq Event 89H , Umask 01H
-Qualify conditional near branch instructions
-mispredicted.
+Counts all near executed branches (not necessarily retired).
+.It Li BR_MISP_EXEC.NONTAKEN_COND
+.Pq Event 89H , Umask 41H
+Count conditional near branch instructions mispredicted as nontaken.
+.It Li BR_MISP_EXEC.TAKEN_COND
+.Pq Event 89H , Umask 81H
+Count conditional near branch instructions mispredicted as taken.
 .It Li BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET
-.Pq Event 89H , Umask 04H
-Qualify mispredicted indirect near branch
-instructions that are not calls nor returns.
+.Pq Event 89H , Umask 84H
+Count mispredicted indirect near branch instructions that are not calls
+nor returns.
 .It Li BR_MISP_EXEC.RETURN_NEAR
-.Pq Event 89H , Umask 08H
-Qualify mispredicted indirect near branches that
-have a return mnemonic.
+.Pq Event 89H , Umask 88H
+Count mispredicted indirect near branches that have a return mnemonic.
 .It Li BR_MISP_EXEC.DIRECT_NEAR_CALL
-.Pq Event 89H , Umask 10H
-Qualify mispredicted unconditional near call branch
-instructions, excluding non call branch, executed.
+.Pq Event 89H , Umask 90H
+Count mispredicted unconditional near call branch instructions, excluding
+non call branch, executed.
 .It Li BR_MISP_EXEC.INDIRECT_NEAR_CALL
-.Pq Event 89H , Umask 20H
-Qualify mispredicted indirect near calls, including
-both register and memory indirect, executed.
-.It Li BR_MISP_EXEC.NONTAKEN
-.Pq Event 89H , Umask 40H
-Qualify mispredicted non-taken near branches
-executed.
-.It Li BR_MISP_EXEC.TAKEN
-.Pq Event 89H , Umask 80H
-Qualify mispredicted taken near branches executed.
-Must combine with 01H,02H, 04H, 08H, 10H, 20H.
+.Pq Event 89H , Umask A0H
+Count mispredicted indirect near calls, including both register and memory
+indirect, executed.
 .It Li BR_MISP_EXEC.ALL_BRANCHES
 .Pq Event 89H , Umask FFH
-Counts all near executed branches

svn commit: r320105 - stable/10/lib/libpmc

2017-06-19 Thread Andriy Gapon
Author: avg
Date: Mon Jun 19 15:09:37 2017
New Revision: 320105
URL: https://svnweb.freebsd.org/changeset/base/320105

Log:
  MFC r279829: Add manpage for Haswell Xeon pmc implementation

Added:
  stable/10/lib/libpmc/pmc.haswellxeon.3
 - copied unchanged from r279829, head/lib/libpmc/pmc.haswellxeon.3
Modified:
  stable/10/lib/libpmc/pmc.3
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libpmc/pmc.3
==
--- stable/10/lib/libpmc/pmc.3  Mon Jun 19 15:06:37 2017(r320104)
+++ stable/10/lib/libpmc/pmc.3  Mon Jun 19 15:09:37 2017(r320105)
@@ -525,6 +525,7 @@ API is
 .Xr pmc.atom 3 ,
 .Xr pmc.core 3 ,
 .Xr pmc.core2 3 ,
+.Xr pmc.haswellxeon 3 ,
 .Xr pmc.iaf 3 ,
 .Xr pmc.k7 3 ,
 .Xr pmc.k8 3 ,

Copied: stable/10/lib/libpmc/pmc.haswellxeon.3 (from r279829, 
head/lib/libpmc/pmc.haswellxeon.3)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/10/lib/libpmc/pmc.haswellxeon.3  Mon Jun 19 15:09:37 2017
(r320105, copy of r279829, head/lib/libpmc/pmc.haswellxeon.3)
@@ -0,0 +1,975 @@
+.\"
+.\" Copyright (c) 2013 Hiren Panchasara 
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd 21 November, 2014
+.Dt PMC.HASWELLXEON 3
+.Os
+.Sh NAME
+.Nm pmc.haswellxeon
+.Nd measurement events for
+.Tn Intel
+.Tn Haswell Xeon
+family CPUs
+.Sh LIBRARY
+.Lb libpmc
+.Sh SYNOPSIS
+.In pmc.h
+.Sh DESCRIPTION
+.Tn Intel
+.Tn "Haswell"
+CPUs contain PMCs conforming to version 2 of the
+.Tn Intel
+performance measurement architecture.
+These CPUs may contain up to two classes of PMCs:
+.Bl -tag -width "Li PMC_CLASS_IAP"
+.It Li PMC_CLASS_IAF
+Fixed-function counters that count only one hardware event per counter.
+.It Li PMC_CLASS_IAP
+Programmable counters that may be configured to count one of a defined
+set of hardware events.
+.El
+.Pp
+The number of PMCs available in each class and their widths need to be
+determined at run time by calling
+.Xr pmc_cpuinfo 3 .
+.Pp
+Intel Haswell Xeon PMCs are documented in
+.Rs
+.%B "Intel(R) 64 and IA-32 Architectures Software Developer's Manual"
+.%T "Combined Volumes: 1, 2A, 2B, 2C, 3A, 3B and 3C"
+.%N "Order Number: 325462-052US"
+.%D September 2014
+.%Q "Intel Corporation"
+.Re
+.Ss HASWELL FIXED FUNCTION PMCS
+These PMCs and their supported events are documented in
+.Xr pmc.iaf 3 .
+.Ss HASWELL PROGRAMMABLE PMCS
+The programmable PMCs support the following capabilities:
+.Bl -column "PMC_CAP_INTERRUPT" "Support"
+.It Em Capability Ta Em Support
+.It PMC_CAP_CASCADE Ta \&No
+.It PMC_CAP_EDGE Ta Yes
+.It PMC_CAP_INTERRUPT Ta Yes
+.It PMC_CAP_INVERT Ta Yes
+.It PMC_CAP_READ Ta Yes
+.It PMC_CAP_PRECISE Ta \&No
+.It PMC_CAP_SYSTEM Ta Yes
+.It PMC_CAP_TAGGING Ta \&No
+.It PMC_CAP_THRESHOLD Ta Yes
+.It PMC_CAP_USER Ta Yes
+.It PMC_CAP_WRITE Ta Yes
+.El
+.Ss Event Qualifiers
+Event specifiers for these PMCs support the following common
+qualifiers:
+.Bl -tag -width indent
+.It Li rsp= Ns Ar value
+Configure the Off-core Response bits.
+.Bl -tag -width indent
+.It Li DMND_DATA_RD
+Counts the number of demand and DCU prefetch data reads of full
+and partial cachelines as well as demand data page table entry
+cacheline reads. Does not count L2 data read prefetches or
+instruction fetches.
+.It Li REQ_DMND_RFO
+Counts the number of demand and DCU prefetch reads for ownership (RFO)
+requests generated by a write to data cacheline. Does not count L2 RFO
+prefetches.
+.It Li REQ_DMND_IFETCH
+Counts the number of demand and DCU prefetch instruction cacheline reads.

svn commit: r320104 - stable/10/sys/dev/hwpmc

2017-06-19 Thread Andriy Gapon
Author: avg
Date: Mon Jun 19 15:06:37 2017
New Revision: 320104
URL: https://svnweb.freebsd.org/changeset/base/320104

Log:
  MFC r279831: Fix pmc unit restrictions to match documentation

Modified:
  stable/10/sys/dev/hwpmc/hwpmc_core.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c
==
--- stable/10/sys/dev/hwpmc/hwpmc_core.cMon Jun 19 15:04:39 2017
(r320103)
+++ stable/10/sys/dev/hwpmc/hwpmc_core.cMon Jun 19 15:06:37 2017
(r320104)
@@ -1974,15 +1974,15 @@ iap_event_sb_sbx_ib_ibx_ok_on_counter(enum pmc_event p
break;
/* Events valid only on counter 1. */
case PMC_EV_IAP_EVENT_C0H_01H:
-   mask = 0x1;
+   mask = 0x2;
break;
/* Events valid only on counter 2. */
case PMC_EV_IAP_EVENT_48H_01H:
case PMC_EV_IAP_EVENT_A2H_02H:
+   case PMC_EV_IAP_EVENT_A3H_08H:
mask = 0x4;
break;
/* Events valid only on counter 3. */
-   case PMC_EV_IAP_EVENT_A3H_08H:
case PMC_EV_IAP_EVENT_BBH_01H:
case PMC_EV_IAP_EVENT_CDH_01H:
case PMC_EV_IAP_EVENT_CDH_02H:
___
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: r320103 - stable/10/sys/dev/hwpmc

2017-06-19 Thread Andriy Gapon
Author: avg
Date: Mon Jun 19 15:04:39 2017
New Revision: 320103
URL: https://svnweb.freebsd.org/changeset/base/320103

Log:
  MFC r279830: Fix various bugs in Haswell counter definitions

Modified:
  stable/10/sys/dev/hwpmc/pmc_events.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/hwpmc/pmc_events.h
==
--- stable/10/sys/dev/hwpmc/pmc_events.hMon Jun 19 15:03:47 2017
(r320102)
+++ stable/10/sys/dev/hwpmc/pmc_events.hMon Jun 19 15:04:39 2017
(r320103)
@@ -2590,7 +2590,7 @@ __PMC_EV_ALIAS("MISALIGN_MEM_REF.STORES", IAP_EVENT_05
 __PMC_EV_ALIAS("LD_BLOCKS_PARTIAL.ADDRESS_ALIAS", IAP_EVENT_07H_01H)   \
 __PMC_EV_ALIAS("DTLB_LOAD_MISSES.MISS_CAUSES_A_WALK", IAP_EVENT_08H_01H)\
 __PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED_4K", IAP_EVENT_08H_02H)
\
-__PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4K",
\
+__PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4M",
\
 IAP_EVENT_08H_04H) \
 __PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED", IAP_EVENT_08H_0EH)   \
 __PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_DURATION", IAP_EVENT_08H_10H)\
@@ -2646,8 +2646,8 @@ __PMC_EV_ALIAS("MOVE_ELIMINATION.SMID_NOT_ELIMINATED",
 IAP_EVENT_58H_08H) \
 __PMC_EV_ALIAS("MOVE_ELIMINATION.INT_ELIMINATED", IAP_EVENT_58H_01H)   \
 __PMC_EV_ALIAS("MOVE_ELIMINATION.SMID_ELIMINATED", IAP_EVENT_58H_02H)  \
-__PMC_EV_ALIAS("CPL_CYCLES.RING0", IAP_EVENT_5CH_02H)  \
-__PMC_EV_ALIAS("CPL_CYCLES.RING123", IAP_EVENT_5CH_01H)
\
+__PMC_EV_ALIAS("CPL_CYCLES.RING0", IAP_EVENT_5CH_01H)  \
+__PMC_EV_ALIAS("CPL_CYCLES.RING123", IAP_EVENT_5CH_02H)
\
 __PMC_EV_ALIAS("RS_EVENTS.EMPTY_CYCLES", IAP_EVENT_5EH_01H)\
 __PMC_EV_ALIAS("OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD",  \
 IAP_EVENT_60H_01H) \
@@ -2819,7 +2819,7 @@ __PMC_EV_ALIAS("MISALIGN_MEM_REF.STORES", IAP_EVENT_05
 __PMC_EV_ALIAS("LD_BLOCKS_PARTIAL.ADDRESS_ALIAS", IAP_EVENT_07H_01H)   \
 __PMC_EV_ALIAS("DTLB_LOAD_MISSES.MISS_CAUSES_A_WALK", IAP_EVENT_08H_01H)\
 __PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED_4K", IAP_EVENT_08H_02H)
\
-__PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4K",
\
+__PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4M",
\
 IAP_EVENT_08H_04H) \
 __PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED", IAP_EVENT_08H_0EH)   \
 __PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_DURATION", IAP_EVENT_08H_10H)\
@@ -2875,8 +2875,8 @@ __PMC_EV_ALIAS("MOVE_ELIMINATION.SMID_NOT_ELIMINATED",
 IAP_EVENT_58H_08H) \
 __PMC_EV_ALIAS("MOVE_ELIMINATION.INT_ELIMINATED", IAP_EVENT_58H_01H)   \
 __PMC_EV_ALIAS("MOVE_ELIMINATION.SMID_ELIMINATED", IAP_EVENT_58H_02H)  \
-__PMC_EV_ALIAS("CPL_CYCLES.RING0", IAP_EVENT_5CH_02H)  \
-__PMC_EV_ALIAS("CPL_CYCLES.RING123", IAP_EVENT_5CH_01H)
\
+__PMC_EV_ALIAS("CPL_CYCLES.RING0", IAP_EVENT_5CH_01H)  \
+__PMC_EV_ALIAS("CPL_CYCLES.RING123", IAP_EVENT_5CH_02H)
\
 __PMC_EV_ALIAS("RS_EVENTS.EMPTY_CYCLES", IAP_EVENT_5EH_01H)\
 __PMC_EV_ALIAS("OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD",  \
 IAP_EVENT_60H_01H) \
___
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: r320102 - stable/11/sys/dev/e1000

2017-06-19 Thread Sean Bruno
Author: sbruno
Date: Mon Jun 19 15:03:47 2017
New Revision: 320102
URL: https://svnweb.freebsd.org/changeset/base/320102

Log:
  Direct commit to stable/11 to correctly setting the EIAC and IMS
  registers to the same values when processing interrupts.  This reverts a
  change made in r286831 that was not fully reverted in r311979
  
  This resolves PR https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211219
  
  PR:   211219
  Submitted by: Franco Fitchner 
  Approved by:  re (marius)

Modified:
  stable/11/sys/dev/e1000/if_em.c

Modified: stable/11/sys/dev/e1000/if_em.c
==
--- stable/11/sys/dev/e1000/if_em.c Mon Jun 19 15:00:06 2017
(r320101)
+++ stable/11/sys/dev/e1000/if_em.c Mon Jun 19 15:03:47 2017
(r320102)
@@ -5115,7 +5115,7 @@ em_enable_intr(struct adapter *adapter)
 
if (hw->mac.type == e1000_82574) {
E1000_WRITE_REG(hw, EM_EIAC, EM_MSIX_MASK);
-   ims_mask |= adapter->ims;
+   ims_mask |= EM_MSIX_MASK;
} 
E1000_WRITE_REG(hw, E1000_IMS, ims_mask);
 }
___
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: r320101 - in stable/10/sys: dev/hwpmc sys

2017-06-19 Thread Andriy Gapon
Author: avg
Date: Mon Jun 19 15:00:06 2017
New Revision: 320101
URL: https://svnweb.freebsd.org/changeset/base/320101

Log:
  MFC r277524: style(9) cleanup in hwpmc

Modified:
  stable/10/sys/dev/hwpmc/hwpmc_core.c
  stable/10/sys/dev/hwpmc/pmc_events.h
  stable/10/sys/sys/pmc.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c
==
--- stable/10/sys/dev/hwpmc/hwpmc_core.cMon Jun 19 14:50:26 2017
(r320100)
+++ stable/10/sys/dev/hwpmc/hwpmc_core.cMon Jun 19 15:00:06 2017
(r320101)
@@ -685,7 +685,8 @@ static struct iap_event_descr iap_events[] = {
 IAPDESCR(08H_0EH, 0x08, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX),
 IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB |
IAP_F_SBX | IAP_F_HW | IAP_F_HWX),
-IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | 
IAP_F_HWX),
+IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW |
+IAP_F_HWX),
 IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX),
 IAPDESCR(08H_60H, 0x08, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX),
 IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX),
@@ -715,9 +716,12 @@ static struct iap_event_descr iap_events[] = {
 IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB |
IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX),
 IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM),
-IAPDESCR(0EH_10H, 0x0E, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | 
IAP_F_HWX),
-IAPDESCR(0EH_20H, 0x0E, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | 
IAP_F_HWX),
-IAPDESCR(0EH_40H, 0x0E, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | 
IAP_F_HWX),
+IAPDESCR(0EH_10H, 0x0E, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW |
+IAP_F_HWX),
+IAPDESCR(0EH_20H, 0x0E, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW |
+IAP_F_HWX),
+IAPDESCR(0EH_40H, 0x0E, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW |
+IAP_F_HWX),
 
 IAPDESCR(0FH_01H, 0x0F, 0x01, IAP_F_FM | IAP_F_I7),
 IAPDESCR(0FH_02H, 0x0F, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM),
@@ -831,7 +835,8 @@ static struct iap_event_descr iap_events[] = {
 IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7 | IAP_F_WM),
 IAPDESCR(24H_F8H, 0x24, 0xF8, IAP_F_FM | IAP_F_HW | IAP_F_HWX),
 IAPDESCR(24H_3FH, 0x24, 0x3F, IAP_F_FM | IAP_F_HW | IAP_F_HWX),
-IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | 
IAP_F_HWX),
+IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW |
+IAP_F_HWX),
 
 IAPDESCR(25H, 0x25, IAP_M_CORE, IAP_F_ALLCPUSCORE2),
 
@@ -972,7 +977,8 @@ static struct iap_event_descr iap_events[] = {
 IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX),
 IAPDESCR(49H_40H, 0x49, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX),
 IAPDESCR(49H_60H, 0x49, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX),
-IAPDESCR(49H_80H, 0x49, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7 | IAP_F_HW | 
IAP_F_HWX),
+IAPDESCR(49H_80H, 0x49, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7 | IAP_F_HW |
+IAP_F_HWX),
 
 IAPDESCR(4BH_00H, 0x4B, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2),
 IAPDESCR(4BH_01H, 0x4B, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7O),
@@ -1013,10 +1019,14 @@ static struct iap_event_descr iap_events[] = {
 
 IAPDESCR(53H_01H, 0x53, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM),
 
-IAPDESCR(58H_01H, 0x58, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | 
IAP_F_HWX),
-IAPDESCR(58H_02H, 0x58, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | 
IAP_F_HWX),
-IAPDESCR(58H_04H, 0x58, 0x04, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | 
IAP_F_HWX),
-IAPDESCR(58H_08H, 0x58, 0x08, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | 
IAP_F_HWX),
+IAPDESCR(58H_01H, 0x58, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW |
+IAP_F_HWX),
+IAPDESCR(58H_02H, 0x58, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW |
+IAP_F_HWX),
+IAPDESCR(58H_04H, 0x58, 0x04, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW |
+IAP_F_HWX),
+IAPDESCR(58H_08H, 0x58, 0x08, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW |
+IAP_F_HWX),
 
 IAPDESCR(59H_20H, 0x59, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_SBX),
 IAPDESCR(59H_40H, 0x59, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX),
@@ -1119,9 +1129,9 @@ static struct iap_event_descr iap_events[] = {
 
 IAPDESCR(79H_30H, 0x79, 0x30, IAP_F_FM | IAP_F_SB | IAP_F_IB |
IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX),
+IAPDESCR(79H_18H, 0x79, 0x18, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW |
+IAP_F_HWX),
 
-IAPDESCR(79H_3CH, 0x79, 0x3C, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | 
IAP_F_HWX),
-
 IAPDESCR(7AH, 0x7A, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2),
 
 IAPD

svn commit: r320100 - in stable/10/sys: dev/hwpmc sys

2017-06-19 Thread Andriy Gapon
Author: avg
Date: Mon Jun 19 14:50:26 2017
New Revision: 320100
URL: https://svnweb.freebsd.org/changeset/base/320100

Log:
  MFC 281102: hwpmc: add initial Intel Broadwell support.

Modified:
  stable/10/sys/dev/hwpmc/hwpmc_core.c
  stable/10/sys/dev/hwpmc/hwpmc_intel.c
  stable/10/sys/dev/hwpmc/pmc_events.h
  stable/10/sys/sys/pmc.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c
==
--- stable/10/sys/dev/hwpmc/hwpmc_core.cMon Jun 19 14:45:20 2017
(r320099)
+++ stable/10/sys/dev/hwpmc/hwpmc_core.cMon Jun 19 14:50:26 2017
(r320100)
@@ -578,7 +578,8 @@ struct iap_event_descr {
 #defineIAP_F_HW(1 << 10)   /* CPU: Haswell */
 #defineIAP_F_CAS   (1 << 11)   /* CPU: Atom Silvermont */
 #defineIAP_F_HWX   (1 << 12)   /* CPU: Haswell Xeon */
-#defineIAP_F_FM(1 << 13)   /* Fixed mask */
+#defineIAP_F_BW(1 << 13)   /* CPU: Broadwell */
+#defineIAP_F_FM(1 << 14)   /* Fixed mask */
 
 #defineIAP_F_ALLCPUSCORE2  \
 (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA)
@@ -2063,6 +2064,7 @@ iap_allocate_pmc(int cpu, int ri, struct pmc *pm,
if (iap_event_corei7_ok_on_counter(ev, ri) == 0)
return (EINVAL);
break;
+   case PMC_CPU_INTEL_BROADWELL:
case PMC_CPU_INTEL_SANDYBRIDGE:
case PMC_CPU_INTEL_SANDYBRIDGE_XEON:
case PMC_CPU_INTEL_IVYBRIDGE:
@@ -2094,6 +2096,9 @@ iap_allocate_pmc(int cpu, int ri, struct pmc *pm,
break;
case PMC_CPU_INTEL_ATOM_SILVERMONT:
cpuflag = IAP_F_CAS;
+   break;
+   case PMC_CPU_INTEL_BROADWELL:
+   cpuflag = IAP_F_BW;
break;
case PMC_CPU_INTEL_CORE:
cpuflag = IAP_F_CC;

Modified: stable/10/sys/dev/hwpmc/hwpmc_intel.c
==
--- stable/10/sys/dev/hwpmc/hwpmc_intel.c   Mon Jun 19 14:45:20 2017
(r320099)
+++ stable/10/sys/dev/hwpmc/hwpmc_intel.c   Mon Jun 19 14:50:26 2017
(r320100)
@@ -179,6 +179,10 @@ pmc_intel_initialize(void)
cputype = PMC_CPU_INTEL_IVYBRIDGE_XEON;
nclasses = 3;
break;
+   case 0x3D:
+   cputype = PMC_CPU_INTEL_BROADWELL;
+   nclasses = 3;
+   break;
case 0x3F:  /* Per Intel document 325462-045US 09/2014. */
case 0x46:  /* Per Intel document 325462-045US 09/2014. */
/* Should 46 be XEON. probably its own? */
@@ -227,6 +231,7 @@ pmc_intel_initialize(void)
 */
case PMC_CPU_INTEL_ATOM:
case PMC_CPU_INTEL_ATOM_SILVERMONT:
+   case PMC_CPU_INTEL_BROADWELL:
case PMC_CPU_INTEL_CORE:
case PMC_CPU_INTEL_CORE2:
case PMC_CPU_INTEL_CORE2EXTREME:
@@ -295,6 +300,7 @@ pmc_intel_initialize(void)
case PMC_CPU_INTEL_HASWELL:
case PMC_CPU_INTEL_SANDYBRIDGE:
case PMC_CPU_INTEL_WESTMERE:
+   case PMC_CPU_INTEL_BROADWELL:
error = pmc_uncore_initialize(pmc_mdep, ncpus);
break;
default:
@@ -319,6 +325,7 @@ pmc_intel_finalize(struct pmc_mdep *md)
 #ifdefined(__i386__) || defined(__amd64__)
case PMC_CPU_INTEL_ATOM:
case PMC_CPU_INTEL_ATOM_SILVERMONT:
+   case PMC_CPU_INTEL_BROADWELL:
case PMC_CPU_INTEL_CORE:
case PMC_CPU_INTEL_CORE2:
case PMC_CPU_INTEL_CORE2EXTREME:
@@ -360,6 +367,7 @@ pmc_intel_finalize(struct pmc_mdep *md)
 */
 #ifdefined(__i386__) || defined(__amd64__)
switch (md->pmd_cputype) {
+   case PMC_CPU_INTEL_BROADWELL:
case PMC_CPU_INTEL_COREI7:
case PMC_CPU_INTEL_HASWELL:
case PMC_CPU_INTEL_SANDYBRIDGE:

Modified: stable/10/sys/dev/hwpmc/pmc_events.h
==
--- stable/10/sys/dev/hwpmc/pmc_events.hMon Jun 19 14:45:20 2017
(r320099)
+++ stable/10/sys/dev/hwpmc/pmc_events.hMon Jun 19 14:50:26 2017
(r320100)
@@ -1540,6 +1540,11 @@ __PMC_EV_ALIAS("BACLEARS.RETURN",
IAP_EVENT_E6H_0
 __PMC_EV_ALIAS("BACLEARS.COND",IAP_EVENT_E6H_10H)  
\
 __PMC_EV_ALIAS("MS_DECODED.MS_ENTRY",  IAP_EVENT_E7H_01H)
 
+/*
+ * Aliases for Broadwell PMC events.
+ */
+#define __PMC_EV_ALIAS_BROADWELL() \
+__PMC_EV_ALIAS_INTEL_ARCHITECTURAL()
 
 /*
  * Aliases for Core PMC events.
@@ -4231,6 +4236,11 @@ __PMC_EV(UCP, EVENT_86H_01H)
 
 #definePMC_EV_UCP_FIRSTPMC_EV_UCP_EVENT_00H_01H
 #defi

svn commit: r320099 - stable/11/sys/dev/vmware/vmxnet3

2017-06-19 Thread Andriy Gapon
Author: avg
Date: Mon Jun 19 14:45:20 2017
New Revision: 320099
URL: https://svnweb.freebsd.org/changeset/base/320099

Log:
  MFC r318867: fix vmxnet3 crash when LRO is enabled
  
  The crash can occur when all of the following conditions are true:
  - a packet consists of multiple segments (requires LRO enabled)
  - there has been a failure to allocate an mbuf for the packet and
the packet has to be dropped
  - a host (vmware) still owned at least one segment of the packet,
so the driver had to wait for another interrupt to proceed to
discarding the remaining segment(s)
  
  Reviewed by:  rstone
  Approved by:  re (gjb)
  Sponsored by: Panzura

Modified:
  stable/11/sys/dev/vmware/vmxnet3/if_vmx.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/vmware/vmxnet3/if_vmx.c
==
--- stable/11/sys/dev/vmware/vmxnet3/if_vmx.c   Mon Jun 19 14:30:01 2017
(r320098)
+++ stable/11/sys/dev/vmware/vmxnet3/if_vmx.c   Mon Jun 19 14:45:20 2017
(r320099)
@@ -2194,6 +2194,20 @@ vmxnet3_rxq_eof(struct vmxnet3_rxqueue *rxq)
} else {
KASSERT(rxd->btype == VMXNET3_BTYPE_BODY,
("%s: non start of frame w/o body buffer", 
__func__));
+
+   if (m_head == NULL && m_tail == NULL) {
+   /*
+* This is a continuation of a packet that we
+* started to drop, but could not drop entirely
+* because this segment was still owned by the
+* host.  So, drop the remainder now.
+*/
+   vmxnet3_rxq_eof_discard(rxq, rxr, idx);
+   if (!rxcd->eop)
+   vmxnet3_rxq_discard_chain(rxq);
+   goto nextp;
+   }
+
KASSERT(m_head != NULL,
("%s: frame not started?", __func__));
 
___
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: r320098 - stable/11/release/doc/en_US.ISO8859-1/relnotes

2017-06-19 Thread Glen Barber
Author: gjb
Date: Mon Jun 19 14:30:01 2017
New Revision: 320098
URL: https://svnweb.freebsd.org/changeset/base/320098

Log:
  Fix units in the r320088 entry. [1]
  While here, move to a more appropriate section.
  
  Submitted by: rpokala [1]
  Approved by:  re (implicit)
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml

Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
==
--- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml  Mon Jun 19 
13:26:38 2017(r320097)
+++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml  Mon Jun 19 
14:30:01 2017(r320098)
@@ -373,6 +373,11 @@
   The installer, &man.bsdinstall.8;, has
been updated to include support for hidden wireless networks
when configuring the &man.wlan.4; interface.
+
+  The
+   default EFI partition created by
+   &man.bsdinstall.8; has been increased from 800KB to
+   200MB.
 
 
 
@@ -837,11 +842,6 @@
EFI loader has been updated to support
TFTPFS, providing netboot support without
requiring an NFS server.
-
-  The
-   default EFI partition created by
-   &man.bsdinstall.8; has been increased from 800kb to
-   200Mb.
 
 
 
___
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: r320097 - stable/11/sys/x86/x86

2017-06-19 Thread Glen Barber
Author: gjb
Date: Mon Jun 19 13:26:38 2017
New Revision: 320097
URL: https://svnweb.freebsd.org/changeset/base/320097

Log:
  MFC r319942 (jhb):
  
   Don't try to assign interrupts to a CPU on single-CPU systems.
  
   All interrupts are routed to the sole CPU in that case implicitly.
   This is a regression in EARLY_AP_STARTUP.  Previously the 'assign_cpu'
   variable was only set when a multi-CPU system finished booting, so
   its value both meant that interrupts could be assigned and that
   there was more than one CPU.
  
  PR:   219882
  Approved by:  re (kib)
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/11/sys/x86/x86/intr_machdep.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/x86/x86/intr_machdep.c
==
--- stable/11/sys/x86/x86/intr_machdep.cMon Jun 19 13:25:47 2017
(r320096)
+++ stable/11/sys/x86/x86/intr_machdep.cMon Jun 19 13:26:38 2017
(r320097)
@@ -315,7 +315,9 @@ intr_assign_cpu(void *arg, int cpu)
 
 #ifdef EARLY_AP_STARTUP
MPASS(mp_ncpus == 1 || smp_started);
-   if (cpu != NOCPU) {
+
+   /* Nothing to do if there is only a single CPU. */
+   if (mp_ncpus > 1 && cpu != NOCPU) {
 #else
/*
 * Don't do anything during early boot.  We will pick up the
@@ -503,6 +505,8 @@ intr_next_cpu(void)
 
 #ifdef EARLY_AP_STARTUP
MPASS(mp_ncpus == 1 || smp_started);
+   if (mp_ncpus == 1)
+   return (PCPU_GET(apic_id));
 #else
/* Leave all interrupts on the BSP during boot. */
if (!assign_cpu)
___
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: r320096 - stable/11/release/doc/en_US.ISO8859-1/relnotes

2017-06-19 Thread Glen Barber
Author: gjb
Date: Mon Jun 19 13:25:47 2017
New Revision: 320096
URL: https://svnweb.freebsd.org/changeset/base/320096

Log:
  Document r320088, default EFI partition size change.
  
  Approved by:  re (implicit)
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml

Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
==
--- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml  Mon Jun 19 
12:33:22 2017(r320095)
+++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml  Mon Jun 19 
13:25:47 2017(r320096)
@@ -837,6 +837,11 @@
EFI loader has been updated to support
TFTPFS, providing netboot support without
requiring an NFS server.
+
+  The
+   default EFI partition created by
+   &man.bsdinstall.8; has been increased from 800kb to
+   200Mb.
 
 
 
___
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: r320095 - head/contrib/ipfilter/tools

2017-06-19 Thread Cy Schubert
Author: cy
Date: Mon Jun 19 12:33:22 2017
New Revision: 320095
URL: https://svnweb.freebsd.org/changeset/base/320095

Log:
  Flag poolcommand() (ippool -A and ippool -R) command line syntax errors.

Modified:
  head/contrib/ipfilter/tools/ippool.c

Modified: head/contrib/ipfilter/tools/ippool.c
==
--- head/contrib/ipfilter/tools/ippool.cMon Jun 19 07:15:47 2017
(r320094)
+++ head/contrib/ipfilter/tools/ippool.cMon Jun 19 12:33:22 2017
(r320095)
@@ -297,7 +297,13 @@ poolcommand(remove, argc, argv)
case 'v' :
opts |= OPT_VERBOSE;
break;
+   default :
+   usage(argv[0]);
+   break;  /* keep compiler happy */
}
+
+   if (argc - 1 - optind > 0)
+   usage(argv[0]);
 
if (opts & OPT_DEBUG)
fprintf(stderr, "poolcommand: opts = %#x\n", opts);
___
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: r320094 - stable/11/lib/libc/sys

2017-06-19 Thread Konstantin Belousov
Author: kib
Date: Mon Jun 19 07:15:47 2017
New Revision: 320094
URL: https://svnweb.freebsd.org/changeset/base/320094

Log:
  MFC r320035:
  Move the description of kern.kq_calloutmax sysctl into a new paragraph
  for better presentation.
  
  Approved by:  re (delphij)

Modified:
  stable/11/lib/libc/sys/kqueue.2
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libc/sys/kqueue.2
==
--- stable/11/lib/libc/sys/kqueue.2 Mon Jun 19 07:02:52 2017
(r320093)
+++ stable/11/lib/libc/sys/kqueue.2 Mon Jun 19 07:15:47 2017
(r320094)
@@ -523,10 +523,6 @@ On return,
 contains the number of times the timeout has expired since the last call to
 .Fn kevent .
 This filter automatically sets the EV_CLEAR flag internally.
-There is a system wide limit on the number of timers
-which is controlled by the
-.Va kern.kq_calloutmax
-sysctl.
 .Bl -tag -width "Dv NOTE_USECONDS"
 .It Dv NOTE_SECONDS
 .Va data
@@ -548,6 +544,11 @@ is not set, the default is milliseconds.
 On return,
 .Va fflags
 contains the events which triggered the filter.
+.Pp
+There is a system wide limit on the number of timers
+which is controlled by the
+.Va kern.kq_calloutmax
+sysctl.
 .It Dv EVFILT_USER
 Establishes a user event identified by
 .Va ident
___
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: r320093 - head/usr.sbin/rpc.lockd

2017-06-19 Thread Xin LI
Author: delphij
Date: Mon Jun 19 07:02:52 2017
New Revision: 320093
URL: https://svnweb.freebsd.org/changeset/base/320093

Log:
  Check return value of seteuid() and bail out if we fail.
  
  MFC after:2 weeks

Modified:
  head/usr.sbin/rpc.lockd/lock_proc.c

Modified: head/usr.sbin/rpc.lockd/lock_proc.c
==
--- head/usr.sbin/rpc.lockd/lock_proc.c Mon Jun 19 06:48:21 2017
(r320092)
+++ head/usr.sbin/rpc.lockd/lock_proc.c Mon Jun 19 07:02:52 2017
(r320093)
@@ -276,7 +276,10 @@ get_client(struct sockaddr *host_addr, rpcvers_t vers)
 
/* Regain root privileges, for bindresvport. */
old_euid = geteuid();
-   seteuid(0);
+   if (seteuid(0) != 0) {
+   syslog(LOG_ERR, "seteuid(0) failed");
+   return NULL;
+   }
 
/*
 * Bind the client FD to a reserved port.
@@ -285,7 +288,10 @@ get_client(struct sockaddr *host_addr, rpcvers_t vers)
bindresvport(clnt_fd, NULL);
 
/* Drop root privileges again. */
-   seteuid(old_euid);
+   if (seteuid(old_euid) != 0) {
+   syslog(LOG_ERR, "seteuid(%d) failed", old_euid);
+   return NULL;
+   }
 
/* Success - update the cache entry */
clnt_cache_ptr[clnt_cache_next_to_use] = client;
___
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"