Re: svn commit: r314464 - head/usr.sbin/yppush

2017-02-28 Thread Ngie Cooper (yaneurabeya)

> On Feb 28, 2017, at 21:53, Rodney W. Grimes 
>  wrote:
> 
> -- Start of PGP signed section.
> [ Charset UTF-8 unsupported, converting... ]
>> 
>>> On Feb 28, 2017, at 21:38, Rodney W. Grimes 
>>>  wrote:
>>> 
>>> Would it be possible to not do this as 1000 commits?
>> 
>>  Yes, but I?m trying to do this in a way that allows me to backport all 
>> of the changes as easily as possible to ^/stable/10 (on the other side of 
>> the coin, I?ve run into dependent commits of other MFCs that required 
>> sweeping changes in order to make my changes possible).
>>  I do think your point is valid though and I can probably strike some 
>> middle ground with my changes. I think grouping it up by 2nd level directory 
>> (like I did with usr.bin/svn) makes the most sense.
>> Thank you,
> 
> Yes, that is what I was thinking.  Note that I dont agree with this change,
> but I have probably missed a discussion that is allowing it to move forward.
> It makes the logfiles of make output now src tree possition dependent,
> but I am probalby the only person in the universe that has ever run a
> diff on the output of make world.

It was much the same way before, i.e. .CURDIR was a full path. My doing this 
achieves what you described, it helps dumb tools (like Jenkins) dedupe warnings 
though, and it also makes it easier to fork/build on different components in 
the source tree (I recently embarked on joining a forked copy of syslogd at 
$work, and using SRCTOP helps me achieve that, in the sense that I don’t need 
to duplicate Makefiles).

> It may also be possible to split this into some phases to reduce some of
> your issues, only do the {.CURDIR}/../../foo -> ${SRCTOP}/bar/foo in one pass 
> and
> some of the other fixes in another pass.

Yeah. That seems reasonable (I will split it up into larger chunks).

Thanks,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r313268 - head/sys/kern [through -r313271 for atomic_fcmpset use and later: fails on PowerMac G5 "Quad Core"; -r313266 works]

2017-02-28 Thread Mateusz Guzik
On Sat, Feb 25, 2017 at 08:31:04PM +0100, Mateusz Guzik wrote:
> On Sat, Feb 25, 2017 at 09:58:39AM -0800, Mark Millard wrote:
> > Thus the PowerMac G5 so-called "Quad Core" is back to
> > -r313254 without your patches. (The "Quad Core" really has
> > two processors, each with 2 cores.)
> > 
> 
> 
> Thanks a lot for testing. I'll have to think what to do with it, worst
> case I'll #ifdef changes with powerpc.
> 

Should be fixed with r314474. Got a real powerpc to test on (60 cores),
was able to lock it up in seconds. Now it is perfectly stablle.

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


Re: svn commit: r314473 - head

2017-02-28 Thread Rodney W. Grimes
> Author: imp
> Date: Wed Mar  1 05:05:05 2017
> New Revision: 314473
> URL: https://svnweb.freebsd.org/changeset/base/314473
> 
> Log:
>   Create README.md file for viewing on github.
>   
>   This is a lightly edited README using github's MARKDOWN.
>   
>   Submitted by:   Johan 
>   Pull Request:   https://github.com/freebsd/freebsd/pull/56
> 
> Added:
>   head/README.md   (contents, props changed)
> 
> Added: head/README.md
> ==
> --- /dev/null 00:00:00 1970   (empty, because file is newly added)
> +++ head/README.mdWed Mar  1 05:05:05 2017(r314473)
> @@ -0,0 +1,86 @@
> +FreeBSD Source:
> +---
> +This is the top level of the FreeBSD source directory.  This file  
> +was last revised on:  
> +$FreeBSD$
> +
> +For copyright information, please see the file COPYRIGHT in this  
> +directory (additional copyright information also exists for some
> +sources in this tree - please see the specific source directories for  
> +more information).
> +
> +The Makefile in this directory supports a number of targets for  
> +building components (or all) of the FreeBSD source tree.  See build(7)  
> +and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html 
>  
> +for more information, including setting make(1) variables.  
> +
> +The `buildkernel` and `installkernel` targets build and install  
> +the kernel and the modules (see below).  Please see the top of  
> +the Makefile in this directory for more information on the  
> +standard build targets and compile-time flags.
> +
> +Building a kernel is a somewhat more involved process.  See build(7), 
> config(8),  
> +and 
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html  
> +for more information.
> +
> +Note: If you want to build and install the kernel with the  
> +`buildkernel` and `installkernel` targets, you might need to build  
> +world before.  More information is available in the handbook.
> +
> +The kernel configuration files reside in the `sys//conf`  
> +sub-directory.  GENERIC is the default configuration used in release builds. 
>  
> +NOTES contains entries and documentation for all possible  
> +devices, not just those commonly used.
> +
> +
> +Source Roadmap:
> +---

Is there someway this can be a pointer to the usr/src part of
hier(7) and have hier(7) updated to reflect current reality?

Also lots and lots of trailing white space...

This should be a pointer to hier(7)

> +```
> +bin  System/user commands.
> +
> +cddl Various commands and libraries under the Common 
> Development  
> + and Distribution License.
> +
> +contrib  Packages contributed by 3rd parties.
> +
> +crypto   Cryptography stuff (see crypto/README).
> +
> +etc  Template files for /etc.
> +
> +gnu  Various commands and libraries under the GNU 
> Public License.  
> + Please see gnu/COPYING* for more information.
> +
> +include  System include files.
> +
> +kerberos5Kerberos5 (Heimdal) package.
> +
> +lib  System libraries.
> +
> +libexec  System daemons.
> +
> +release  Release building Makefile & associated tools.
> +
> +rescue   Build system for statically linked /rescue 
> utilities.
> +
> +sbin System commands.
> +
> +secure   Cryptographic libraries and commands.
> +
> +shareShared resources.
> +
> +sys  Kernel sources.
> +
> +testsRegression tests which can be run by Kyua.  See 
> tests/README
> + for additional information.
> +
> +toolsUtilities for regression testing and 
> miscellaneous tasks.
> +
> +usr.bin  User commands.
> +
> +usr.sbin System administration commands.
> +```
> +
> +For information on synchronizing your source tree with one or more of  
> +the FreeBSD Project's development branches, please see:
> +
> +   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html
> ___
> svn-src-head@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
> 

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


Re: svn commit: r314464 - head/usr.sbin/yppush

2017-02-28 Thread Rodney W. Grimes
-- Start of PGP signed section.
[ Charset UTF-8 unsupported, converting... ]
> 
> > On Feb 28, 2017, at 21:38, Rodney W. Grimes 
> >  wrote:
> > 
> > Would it be possible to not do this as 1000 commits?
> 
>   Yes, but I?m trying to do this in a way that allows me to backport all 
> of the changes as easily as possible to ^/stable/10 (on the other side of the 
> coin, I?ve run into dependent commits of other MFCs that required sweeping 
> changes in order to make my changes possible).
>   I do think your point is valid though and I can probably strike some 
> middle ground with my changes. I think grouping it up by 2nd level directory 
> (like I did with usr.bin/svn) makes the most sense.
> Thank you,

Yes, that is what I was thinking.  Note that I dont agree with this change,
but I have probably missed a discussion that is allowing it to move forward.
It makes the logfiles of make output now src tree possition dependent,
but I am probalby the only person in the universe that has ever run a
diff on the output of make world.

It may also be possible to split this into some phases to reduce some of
your issues, only do the {.CURDIR}/../../foo -> ${SRCTOP}/bar/foo in one pass 
and
some of the other fixes in another pass.


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


svn commit: r314481 - head/sys/mips/conf

2017-02-28 Thread Warner Losh
Author: imp
Date: Wed Mar  1 05:53:53 2017
New Revision: 314481
URL: https://svnweb.freebsd.org/changeset/base/314481

Log:
  Add kernel support for the TP-LINK MR3040.
  
  Submitted by: Chris Christensen 
  Pull Request: https://github.com/freebsd/freebsd/pull/38

Added:
  head/sys/mips/conf/TP-MR3040   (contents, props changed)
  head/sys/mips/conf/TP-MR3040.hints   (contents, props changed)

Added: head/sys/mips/conf/TP-MR3040
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/mips/conf/TP-MR3040Wed Mar  1 05:53:53 2017
(r314481)
@@ -0,0 +1,70 @@
+#
+# TP Link MR3040 - an AR9331 based SoC wifi device.
+#
+# This is for the 32 RAM/4 flash part. There is little to no
+# chance that this will ever boot FreeBSD directly from the 3.5MB
+# of flash.  The kernel can fit into the space, but userland is just
+# too big even when stripped down to its limits.
+#
+# * AR9331 SoC
+# * 32MB RAM
+# * 4MB flash
+# * Integrated 1x1 2GHz wifi and 10/100 bridge
+# * USB powered
+# * USB storage
+#
+
+# $FreeBSD$
+#
+
+#NO_UNIVERSE
+
+# Include the default AR933x parameters
+include"std.AR933X"
+
+ident  TP-MR3040
+
+# Override hints with board values
+hints  "TP-MR3040.hints"
+
+# Board memory - 32MB
+optionsAR71XX_REALMEM=(32*1024*1024)
+
+# i2c GPIO bus
+device gpioiic
+device iicbb
+device iicbus
+device iic
+
+# Options required for miiproxy and mdiobus
+optionsARGE_MDIO   # Export an MDIO bus separate from arge
+device miiproxy# MDIO bus <-> MII PHY rendezvous
+
+device etherswitch
+device arswitch
+
+# Enable the uboot environment stuff rather then the
+# redboot stuff.
+optionsAR71XX_ENV_UBOOT
+
+# uzip - to boot read-only lzma natively from flash
+device geom_uzip
+optionsGEOM_UZIP
+optionsROOTDEVNAME=\"ufs:/dev/map/rootfs.uzip\"
+
+# Used for the static uboot partition map
+device geom_map
+
+# Boot off of the rootfs, as defined in the geom_map setup.
+# Probably, this should be a USB device as the memory available
+# compressed rootfs is simply too small for FreeBSD
+#options   ROOTDEVNAME=\"ufs:map/rootfs.uncompress\"
+
+# Boot off of a uboot tftp ramdisk kernel image.  Because the flash
+# on this unit is so small, this is the only way to do dev work.
+# For full deployment, you will *have* to use a usb storage device
+# as a rootfs and use the flash to hold the kernel only.
+#options   MD_ROOT # md device usable as a potential root 
device
+#options   MD_ROOT_SIZE=10240
+#makeoptions   MFS_IMAGE=/tftpboot/mfsroot-tl-mr3040.img.ulzma
+optionsROOTDEVNAME=\"ufs:da0\"

Added: head/sys/mips/conf/TP-MR3040.hints
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/mips/conf/TP-MR3040.hints  Wed Mar  1 05:53:53 2017
(r314481)
@@ -0,0 +1,101 @@
+#
+# This file adds to the values in AR933X_BASE.hints
+#
+# $FreeBSD$
+
+# mdiobus on arge1
+hint.argemdio.0.at="nexus0"
+hint.argemdio.0.maddr=0x1a00
+hint.argemdio.0.msize=0x1000
+hint.argemdio.0.order=0
+
+# There's no need to set the ar933x GMAC configuration bits.
+# This just creates a switch instance and correctly uses it.
+
+# Embedded Atheros Switch
+hint.arswitch.0.at="mdio0"
+
+# XXX this should really say it's an AR933x switch, as there
+# are some vlan specific differences here!
+hint.arswitch.0.is_7240=1
+hint.arswitch.0.numphys=4
+hint.arswitch.0.phy4cpu=1  # phy 4 is a "CPU" separate PHY
+hint.arswitch.0.is_rgmii=0
+hint.arswitch.0.is_gmii=1  # arge1 <-> switch PHY is GMII
+
+# arge0 - MII, autoneg, phy(4)
+hint.arge.0.phymask=0x10   # PHY4
+hint.arge.0.mdio=mdioproxy1# .. off of the switch mdiobus
+
+# arge1 - GMII, 1000/full
+hint.arge.1.phymask=0x0# No directly mapped PHYs
+hint.arge.1.media=1000
+hint.arge.1.fduplex=1
+
+# Where the ART is - last 64k in the flash
+# 0x9fff1000 ?
+hint.ath.0.eepromaddr=0x1fff
+hint.ath.0.eepromsize=16384
+
+# The board 16MiB flash layout in uboot env:
+#
+# 256k(u-boot),64k(u-boot-env),2752k(rootfs),896k(uImage),64k(NVRAM),64k(ART)
+
+# However, it boots from 0x9f05, which is the front of the flsah!
+# Thus the kernel/rootfs are switched around.
+
+# 256KB
+hint.map.0.at="flash/spi0"
+hint.map.0.start=0x
+hint.map.0.end=0x0004
+hint.map.0.name="uboot"
+hint.map.0.readonly=1
+
+# 64KB
+hint.map.1.at="flash/spi0"
+hint.map.1.start=0x0004
+hint.map.1.end=0x0005
+hint.map.1.name="uboot-env"
+hint.map.1.readonly=0
+
+# 2752KB
+hint.map.2.at="flash/spi0"
+hint.map.2.start=0x0005
+hint.map.2.end="search:0x0010:0x1:.!/bin/sh"
+hint.map.2.name="kernel"
+hint.map.2.readonly=0
+
+# 896KB
+hint.map.3.at="flash/spi0"
+hint.map.3.start="search:0x0010:0x1:.!/bin/sh"

Re: svn commit: r314464 - head/usr.sbin/yppush

2017-02-28 Thread Ngie Cooper (yaneurabeya)

> On Feb 28, 2017, at 21:38, Rodney W. Grimes 
>  wrote:
> 
> Would it be possible to not do this as 1000 commits?

Yes, but I’m trying to do this in a way that allows me to backport all 
of the changes as easily as possible to ^/stable/10 (on the other side of the 
coin, I’ve run into dependent commits of other MFCs that required sweeping 
changes in order to make my changes possible).
I do think your point is valid though and I can probably strike some 
middle ground with my changes. I think grouping it up by 2nd level directory 
(like I did with usr.bin/svn) makes the most sense.
Thank you,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r314480 - head/sys/net

2017-02-28 Thread Warner Losh
Author: imp
Date: Wed Mar  1 05:38:04 2017
New Revision: 314480
URL: https://svnweb.freebsd.org/changeset/base/314480

Log:
  Back out r314471. In https://reviews.freebsd.org/D1858 it was clear
  that this shouldn't go in. I was unaware when I merged the pull
  request. I don't wish to upset the status quo, so backout per
  project practice.
  
  Pull Request: https://github.com/freebsd/freebsd/pull/92
  Noted by: hrs@

Modified:
  head/sys/net/if_epair.c

Modified: head/sys/net/if_epair.c
==
--- head/sys/net/if_epair.c Wed Mar  1 05:21:21 2017(r314479)
+++ head/sys/net/if_epair.c Wed Mar  1 05:38:04 2017(r314480)
@@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 
@@ -725,7 +724,6 @@ epair_clone_create(struct if_clone *ifc,
ifp = scb->ifp;
/* Assign a hopefully unique, locally administered etheraddr. */
eaddr[0] = 0x02;
-   eaddr[1] = arc4random() & 0xff;
eaddr[3] = (ifp->if_index >> 8) & 0xff;
eaddr[4] = ifp->if_index & 0xff;
eaddr[5] = 0x0b;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r314464 - head/usr.sbin/yppush

2017-02-28 Thread Rodney W. Grimes
Would it be possible to not do this as 1000 commits?

> Author: ngie
> Date: Wed Mar  1 04:24:24 2017
> New Revision: 314464
> URL: https://svnweb.freebsd.org/changeset/base/314464
> 
> Log:
>   Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
> ones
>   
>   This simplifies pathing in make/displayed output.
>   
>   MFC after:  1 week
>   Sponsored by:   Dell EMC Isilon
> 
> Modified:
>   head/usr.sbin/yppush/Makefile
> 
> Modified: head/usr.sbin/yppush/Makefile
> ==
> --- head/usr.sbin/yppush/Makefile Wed Mar  1 04:23:53 2017
> (r314463)
> +++ head/usr.sbin/yppush/Makefile Wed Mar  1 04:24:24 2017
> (r314464)
> @@ -1,8 +1,7 @@
>  # $FreeBSD$
>  
> -RPCDIR=  ${.CURDIR}/../../include/rpcsvc
> -.PATH: ${RPCDIR} ${.CURDIR}/../../usr.sbin/ypserv \
> -   ${.CURDIR}/../../libexec/ypxfr
> +RPCDIR=  ${SRCTOP}/include/rpcsvc
> +.PATH: ${RPCDIR} ${SRCTOP}/usr.sbin/ypserv ${SRCTOP}/libexec/ypxfr
>  
>  PROG=yppush
>  MAN= yppush.8
> @@ -10,7 +9,7 @@ SRCS=ypxfr_getmap.c yp_dblookup.c yp_er
>   ${GENSRCS}
>  GENSRCS=yp.h yp_clnt.c yppush_svc.c
>  
> -CFLAGS+= -I. -I${.CURDIR}/../../libexec/ypxfr
> +CFLAGS+= -I. -I${SRCTOP}/libexec/ypxfr
>  
>  WARNS?=  2
>  
> ___
> svn-src-head@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
> 

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


Re: svn commit: r314473 - head

2017-02-28 Thread Warner Losh
On Tue, Feb 28, 2017 at 10:13 PM, Ngie Cooper (yaneurabeya)
 wrote:
>
>> On Feb 28, 2017, at 21:05, Warner Losh  wrote:
>>
>> Author: imp
>> Date: Wed Mar  1 05:05:05 2017
>> New Revision: 314473
>> URL: https://svnweb.freebsd.org/changeset/base/314473
>>
>> Log:
>>  Create README.md file for viewing on github.
>>
>>  This is a lightly edited README using github's MARKDOWN.
>>
>>  Submitted by:Johan 
>>  Pull Request:https://github.com/freebsd/freebsd/pull/56
>
> Cool! Would it make sense to refer to the other file? Also, this 
> might make it a bit interesting for projects that fork FreeBSD and hack on it 
> when doing future merges, but that’s a caveat that those projects will have 
> to deal with when the time comes to merge this in.

Don't know what's best... That's a good question. I'm inclined to
leave it alone for now...

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

Re: svn commit: r314471 - head/sys/net

2017-02-28 Thread Hiroki Sato
Warner Losh  wrote
  in <201703010447.v214lm4c026...@repo.freebsd.org>:

im> Author: imp
im> Date: Wed Mar  1 04:47:22 2017
im> New Revision: 314471
im> URL: https://svnweb.freebsd.org/changeset/base/314471
im>
im> Log:
im>   Fix VNET - DAD detected duplicate IPv6 address
im>
im>   Assign a hopefully unique, locally administered etheraddr. - for
im>   epairNa & epairNb
im>
im>   Submitted by: Catalin 
im>   Pull Request: https://github.com/freebsd/freebsd/pull/92

 This was discussed in D1858.  epairNa and epairNb never have the same
 L2 addr because eaddr[5] is unique.  If the goal of this change is to
 prevent a conflict of L2 addrs with epairNs created in another vnet
 jail on the same system or on the same network, eaddr[5] of epairNa
 (around l.839) must also be randomized at least.

 While I am still for a deterministic value because changing the L2
 addr every time when rebooting a vnet jail is annoying, but if we use
 some random numbers for the vendor bits, I think eaddr[2] should be
 initialized in the same way.

-- Hiroki


pgpz33cXRJO21.pgp
Description: PGP signature


Re: svn commit: r314471 - head/sys/net

2017-02-28 Thread Warner Losh
On Tue, Feb 28, 2017 at 10:18 PM, Hiroki Sato  wrote:
> Warner Losh  wrote
>   in <201703010447.v214lm4c026...@repo.freebsd.org>:
>
> im> Author: imp
> im> Date: Wed Mar  1 04:47:22 2017
> im> New Revision: 314471
> im> URL: https://svnweb.freebsd.org/changeset/base/314471
> im>
> im> Log:
> im>   Fix VNET - DAD detected duplicate IPv6 address
> im>
> im>   Assign a hopefully unique, locally administered etheraddr. - for
> im>   epairNa & epairNb
> im>
> im>   Submitted by: Catalin 
> im>   Pull Request: https://github.com/freebsd/freebsd/pull/92
>
>  This was discussed in D1858.  epairNa and epairNb never have the same
>  L2 addr because eaddr[5] is unique.  If the goal of this change is to
>  prevent a conflict of L2 addrs with epairNs created in another vnet
>  jail on the same system or on the same network, eaddr[5] of epairNa
>  (around l.839) must also be randomized at least.
>
>  While I am still for a deterministic value because changing the L2
>  addr every time when rebooting a vnet jail is annoying, but if we use
>  some random numbers for the vendor bits, I think eaddr[2] should be
>  initialized in the same way.

It's clear the consensus there was 'no go' and I don't wish to
override it. I didn't know about that, so I'll revert.

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


svn commit: r314478 - in head/usr.sbin/ntp: libntp ntpdate ntpdc ntpq

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 05:19:35 2017
New Revision: 314478
URL: https://svnweb.freebsd.org/changeset/base/314478

Log:
  Simplify idioms in Makefiles further
  
  - Use SRCTOP-relative paths instead of .CURDIR-relative ones where possible
  - Use :H to manipulate .CURDIR in areas instead of ..-relative paths.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/ntp/libntp/Makefile
  head/usr.sbin/ntp/ntpdate/Makefile
  head/usr.sbin/ntp/ntpdc/Makefile
  head/usr.sbin/ntp/ntpq/Makefile

Modified: head/usr.sbin/ntp/libntp/Makefile
==
--- head/usr.sbin/ntp/libntp/Makefile   Wed Mar  1 05:18:43 2017
(r314477)
+++ head/usr.sbin/ntp/libntp/Makefile   Wed Mar  1 05:19:35 2017
(r314478)
@@ -73,14 +73,14 @@ ISC_SRCS= assertions.c \
 
 SRCS=  ${NTP_SRCS} ${ISC_SRCS} version.c
 
-CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include \
-   -I${.CURDIR}/../../../contrib/ntp/lib/isc/include \
-   -I${.CURDIR}/../../../contrib/ntp/lib/isc/unix/include \
-   -I${.CURDIR}/../../../contrib/ntp/lib/isc/pthreads/include \
-   -I${.CURDIR}/../../../contrib/ntp/sntp/libopts \
-   -I${.CURDIR}/../../../lib/libc/${MACHINE_ARCH} \
-   -I${.CURDIR}/../../../lib/libedit/edit \
-   -I${.CURDIR}/../ \
+CFLAGS+= -I${SRCTOP}/contrib/ntp/include \
+   -I${SRCTOP}/contrib/ntp/lib/isc/include \
+   -I${SRCTOP}/contrib/ntp/lib/isc/unix/include \
+   -I${SRCTOP}/contrib/ntp/lib/isc/pthreads/include \
+   -I${SRCTOP}/contrib/ntp/sntp/libopts \
+   -I${SRCTOP}/lib/libc/${MACHINE_ARCH} \
+   -I${SRCTOP}/lib/libedit/edit \
+   -I${.CURDIR:H} \
-I${.CURDIR}/
 
 CFLAGS+= -DHAVE_BSD_NICE -DHAVE_STDINT_H
@@ -88,6 +88,6 @@ CFLAGS+= -DHAVE_BSD_NICE -DHAVE_STDINT_H
 CLEANFILES+= .version version.c
 
 version.c:
-   sh -e ${.CURDIR}/../scripts/mkver ntpd
+   sh -e ${.CURDIR:H}/scripts/mkver ntpd
 
 .include 

Modified: head/usr.sbin/ntp/ntpdate/Makefile
==
--- head/usr.sbin/ntp/ntpdate/Makefile  Wed Mar  1 05:18:43 2017
(r314477)
+++ head/usr.sbin/ntp/ntpdate/Makefile  Wed Mar  1 05:19:35 2017
(r314478)
@@ -24,7 +24,7 @@ LIBADD+=  md
 
 CLEANFILES+= .version version.c
 
-version.c: 
-   sh -e ${.CURDIR}/../scripts/mkver ntpdate
+version.c:
+   sh -e ${.CURDIR:H}/scripts/mkver ntpdate
 
 .include 

Modified: head/usr.sbin/ntp/ntpdc/Makefile
==
--- head/usr.sbin/ntp/ntpdc/MakefileWed Mar  1 05:18:43 2017
(r314477)
+++ head/usr.sbin/ntp/ntpdc/MakefileWed Mar  1 05:19:35 2017
(r314478)
@@ -30,6 +30,6 @@ LIBADD+=  md
 CLEANFILES+= .version version.c
 
 version.c:
-   sh -e ${.CURDIR}/../scripts/mkver ntpdc
+   sh -e ${.CURDIR:H}/scripts/mkver ntpdc
 
 .include 

Modified: head/usr.sbin/ntp/ntpq/Makefile
==
--- head/usr.sbin/ntp/ntpq/Makefile Wed Mar  1 05:18:43 2017
(r314477)
+++ head/usr.sbin/ntp/ntpq/Makefile Wed Mar  1 05:19:35 2017
(r314478)
@@ -34,6 +34,6 @@ CFLAGS+=  -DHAVE_LIBEDIT -DHAVE_READLINE_
 CLEANFILES+= .version version.c
 
 version.c:
-   sh -e ${.CURDIR}/../scripts/mkver ntpq
+   sh -e ${.CURDIR:H}/scripts/mkver ntpq
 
 .include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314476 - head/sys/sys

2017-02-28 Thread Mateusz Guzik
Author: mjg
Date: Wed Mar  1 05:18:22 2017
New Revision: 314476
URL: https://svnweb.freebsd.org/changeset/base/314476

Log:
  locks: fix compilation with KTR wihout KTR_LOCKS
  
  While here wrap the overly long line.
  
  Reported by:  np

Modified:
  head/sys/sys/lock.h

Modified: head/sys/sys/lock.h
==
--- head/sys/sys/lock.h Wed Mar  1 05:14:45 2017(r314475)
+++ head/sys/sys/lock.h Wed Mar  1 05:18:22 2017(r314476)
@@ -125,7 +125,8 @@ struct lock_class {
  * calling conventions for this debugging code in modules so that modules can
  * work with both debug and non-debug kernels.
  */
-#if defined(KLD_MODULE) || defined(WITNESS) || defined(INVARIANTS) || 
defined(INVARIANT_SUPPORT) || defined(LOCK_PROFILING) || (defined(KTR) && 
(KTR_COMPILE & KTR_LOCK))
+#if defined(KLD_MODULE) || defined(WITNESS) || defined(INVARIANTS) || \
+defined(INVARIANT_SUPPORT) || defined(LOCK_PROFILING) || defined(KTR)
 #defineLOCK_DEBUG  1
 #else
 #defineLOCK_DEBUG  0
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314477 - head/sys/dev/ichwd

2017-02-28 Thread Warner Losh
Author: imp
Date: Wed Mar  1 05:18:43 2017
New Revision: 314477
URL: https://svnweb.freebsd.org/changeset/base/314477

Log:
  Fixed TCO v3 tick convert
  
  TCO v3's internal timer is stored as seconds.
  
  Submitted by: Denir Li 
  Pull Request: https://github.com/freebsd/freebsd/pull/51
  Pull Request: https://github.com/freebsd/freebsd/pull/52

Modified:
  head/sys/dev/ichwd/ichwd.c
  head/sys/dev/ichwd/ichwd.h

Modified: head/sys/dev/ichwd/ichwd.c
==
--- head/sys/dev/ichwd/ichwd.c  Wed Mar  1 05:18:22 2017(r314476)
+++ head/sys/dev/ichwd/ichwd.c  Wed Mar  1 05:18:43 2017(r314477)
@@ -512,7 +512,13 @@ ichwd_event(void *arg, unsigned int cmd,
 
/* convert from power-of-two-ns to WDT ticks */
cmd &= WD_INTERVAL;
-   timeout = ((uint64_t)1 << cmd) / ICHWD_TICK;
+   
+   if (sc->tco_version == 3) {
+   timeout = ((uint64_t)1 << cmd) / ICHWD_TCO_V3_TICK;
+   } else {
+   timeout = ((uint64_t)1 << cmd) / ICHWD_TICK;
+   }
+   
if (cmd) {
if (!sc->active)
ichwd_tmr_enable(sc);

Modified: head/sys/dev/ichwd/ichwd.h
==
--- head/sys/dev/ichwd/ichwd.h  Wed Mar  1 05:18:22 2017(r314476)
+++ head/sys/dev/ichwd/ichwd.h  Wed Mar  1 05:18:43 2017(r314477)
@@ -345,7 +345,9 @@ struct ichwd_softc {
 #define TCO_RLD1_TMR_MAX   0x003f
 #define TCO_RLD2_TMR_MAX   0x03ff
 
-/* approximate length in nanoseconds of one WDT tick (about 0.6 sec) */
+/* approximate length in nanoseconds of one WDT tick (about 0.6 sec) for TCO 
v1/v2 */
 #define ICHWD_TICK 6
+/* approximate length in nanoseconds of one WDT tick (about 1.0 sec) for TCO 
v3 */
+#define ICHWD_TCO_V3_TICK  10
 
 #endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314479 - in head/usr.sbin/fifolog: fifolog_create fifolog_reader fifolog_writer

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 05:21:21 2017
New Revision: 314479
URL: https://svnweb.freebsd.org/changeset/base/314479

Log:
  Use :H to manipulate .CURDIR-relative paths instead of ../
  
  This simplifies make output
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/fifolog/fifolog_create/Makefile
  head/usr.sbin/fifolog/fifolog_reader/Makefile
  head/usr.sbin/fifolog/fifolog_writer/Makefile

Modified: head/usr.sbin/fifolog/fifolog_create/Makefile
==
--- head/usr.sbin/fifolog/fifolog_create/Makefile   Wed Mar  1 05:19:35 
2017(r314478)
+++ head/usr.sbin/fifolog/fifolog_create/Makefile   Wed Mar  1 05:21:21 
2017(r314479)
@@ -2,7 +2,7 @@
 
 PROG=  fifolog_create
 
-CFLAGS+= -I${.CURDIR}/../lib
+CFLAGS+= -I${.CURDIR:H}/lib
 
 LIBADD=util fifolog
 

Modified: head/usr.sbin/fifolog/fifolog_reader/Makefile
==
--- head/usr.sbin/fifolog/fifolog_reader/Makefile   Wed Mar  1 05:19:35 
2017(r314478)
+++ head/usr.sbin/fifolog/fifolog_reader/Makefile   Wed Mar  1 05:21:21 
2017(r314479)
@@ -2,7 +2,7 @@
 
 PROG=  fifolog_reader
 
-CFLAGS+= -I${.CURDIR}/../lib
+CFLAGS+= -I${.CURDIR:H}/lib
 
 MAN=
 

Modified: head/usr.sbin/fifolog/fifolog_writer/Makefile
==
--- head/usr.sbin/fifolog/fifolog_writer/Makefile   Wed Mar  1 05:19:35 
2017(r314478)
+++ head/usr.sbin/fifolog/fifolog_writer/Makefile   Wed Mar  1 05:21:21 
2017(r314479)
@@ -2,7 +2,7 @@
 
 PROG=  fifolog_writer
 
-CFLAGS+= -I${.CURDIR}/../lib
+CFLAGS+= -I${.CURDIR:H}/lib
 
 MAN=
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314475 - in head/usr.sbin/lpr: chkprintcap filters filters.ru/koi2855 filters.ru/koi2alt lpc lpd lpq lpr lprm lptest pac

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 05:14:45 2017
New Revision: 314475
URL: https://svnweb.freebsd.org/changeset/base/314475

Log:
  Simplify idioms in usr.sbin/lpr Makefiles
  
  Use :H instead of .CURDIR-relative pathing to simplify make output, etc.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/lpr/chkprintcap/Makefile
  head/usr.sbin/lpr/filters.ru/koi2855/Makefile
  head/usr.sbin/lpr/filters.ru/koi2alt/Makefile
  head/usr.sbin/lpr/filters/Makefile
  head/usr.sbin/lpr/lpc/Makefile
  head/usr.sbin/lpr/lpd/Makefile
  head/usr.sbin/lpr/lpq/Makefile
  head/usr.sbin/lpr/lpr/Makefile
  head/usr.sbin/lpr/lprm/Makefile
  head/usr.sbin/lpr/lptest/Makefile
  head/usr.sbin/lpr/pac/Makefile

Modified: head/usr.sbin/lpr/chkprintcap/Makefile
==
--- head/usr.sbin/lpr/chkprintcap/Makefile  Wed Mar  1 05:06:21 2017
(r314474)
+++ head/usr.sbin/lpr/chkprintcap/Makefile  Wed Mar  1 05:14:45 2017
(r314475)
@@ -1,12 +1,12 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../common_source
+.PATH: ${.CURDIR:H}/common_source
 
 PROG=  chkprintcap
 MAN=   chkprintcap.8
 SRCS=  chkprintcap.c skimprintcap.c
 
-CFLAGS+= -I${.CURDIR}/../common_source
+CFLAGS+= -I${.CURDIR:H}/common_source
 
 LIBADD=lpr
 

Modified: head/usr.sbin/lpr/filters.ru/koi2855/Makefile
==
--- head/usr.sbin/lpr/filters.ru/koi2855/Makefile   Wed Mar  1 05:06:21 
2017(r314474)
+++ head/usr.sbin/lpr/filters.ru/koi2855/Makefile   Wed Mar  1 05:14:45 
2017(r314475)
@@ -3,6 +3,6 @@
 PROG=  koi2855
 MAN=
 
-CFLAGS+= -I${.CURDIR}/../../common_source
+CFLAGS+= -I${.CURDIR:H:H}/common_source
 
 .include 

Modified: head/usr.sbin/lpr/filters.ru/koi2alt/Makefile
==
--- head/usr.sbin/lpr/filters.ru/koi2alt/Makefile   Wed Mar  1 05:06:21 
2017(r314474)
+++ head/usr.sbin/lpr/filters.ru/koi2alt/Makefile   Wed Mar  1 05:14:45 
2017(r314475)
@@ -3,6 +3,6 @@
 PROG=  koi2alt
 MAN=
 
-CFLAGS+= -I${.CURDIR}/../../common_source
+CFLAGS+= -I${.CURDIR:H:H}/common_source
 
 .include 

Modified: head/usr.sbin/lpr/filters/Makefile
==
--- head/usr.sbin/lpr/filters/Makefile  Wed Mar  1 05:06:21 2017
(r314474)
+++ head/usr.sbin/lpr/filters/Makefile  Wed Mar  1 05:14:45 2017
(r314475)
@@ -6,6 +6,6 @@ BINDIR= ${LIBEXECDIR}/lpr
 PROG=  lpf
 MAN=
 
-CFLAGS+= -I${.CURDIR}/../common_source
+CFLAGS+= -I${.CURDIR:H}/common_source
 
 .include 

Modified: head/usr.sbin/lpr/lpc/Makefile
==
--- head/usr.sbin/lpr/lpc/Makefile  Wed Mar  1 05:06:21 2017
(r314474)
+++ head/usr.sbin/lpr/lpc/Makefile  Wed Mar  1 05:14:45 2017
(r314475)
@@ -1,7 +1,7 @@
 #  From: @(#)Makefile  8.1 (Berkeley) 6/6/93
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../common_source
+.PATH: ${.CURDIR:H}/common_source
 
 PROG=  lpc
 MAN=   lpc.8
@@ -9,7 +9,7 @@ SRCS=   lpc.c cmds.c cmdtab.c movejobs.c
 BINGRP=daemon
 BINMODE= 2555
 
-CFLAGS+= -I${.CURDIR}/../common_source
+CFLAGS+= -I${.CURDIR:H}/common_source
 
 WARNS?=0
 

Modified: head/usr.sbin/lpr/lpd/Makefile
==
--- head/usr.sbin/lpr/lpd/Makefile  Wed Mar  1 05:06:21 2017
(r314474)
+++ head/usr.sbin/lpr/lpd/Makefile  Wed Mar  1 05:14:45 2017
(r314475)
@@ -5,7 +5,7 @@ PROG=   lpd
 MAN=   lpd.8
 SRCS=  lpd.c printjob.c recvjob.c lpdchar.c modes.c
 
-CFLAGS+= -I${.CURDIR}/../common_source
+CFLAGS+= -I${.CURDIR:H}/common_source
 
 WARNS?=1
 

Modified: head/usr.sbin/lpr/lpq/Makefile
==
--- head/usr.sbin/lpr/lpq/Makefile  Wed Mar  1 05:06:21 2017
(r314474)
+++ head/usr.sbin/lpr/lpq/Makefile  Wed Mar  1 05:14:45 2017
(r314475)
@@ -8,7 +8,7 @@ BINOWN= root
 BINGRP=daemon
 BINMODE= 6555
 
-CFLAGS+= -I${.CURDIR}/../common_source
+CFLAGS+= -I${.CURDIR:H}/common_source
 
 LIBADD=lpr
 

Modified: head/usr.sbin/lpr/lpr/Makefile
==
--- head/usr.sbin/lpr/lpr/Makefile  Wed Mar  1 05:06:21 2017
(r314474)
+++ head/usr.sbin/lpr/lpr/Makefile  Wed Mar  1 05:14:45 2017
(r314475)
@@ -1,7 +1,7 @@
 #  From: @(#)Makefile  8.1 (Berkeley) 6/6/93
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../common_source
+.PATH: ${.CURDIR:H}/common_source
 
 BINDIR=/usr/bin
 
@@ -11,7 +11,7 @@ BINOWN=   root
 BINGRP=daemon
 BINMODE= 6555
 
-CFLAGS+= -I${.CURDIR}/../common_source
+CFLAGS+= -I${.CURDIR:H}/common_source
 
 WARNS?=2
 

Modified: 

Re: svn commit: r314473 - head

2017-02-28 Thread Ngie Cooper (yaneurabeya)

> On Feb 28, 2017, at 21:05, Warner Losh  wrote:
> 
> Author: imp
> Date: Wed Mar  1 05:05:05 2017
> New Revision: 314473
> URL: https://svnweb.freebsd.org/changeset/base/314473
> 
> Log:
>  Create README.md file for viewing on github.
> 
>  This is a lightly edited README using github's MARKDOWN.
> 
>  Submitted by:Johan 
>  Pull Request:https://github.com/freebsd/freebsd/pull/56

Cool! Would it make sense to refer to the other file? Also, this might 
make it a bit interesting for projects that fork FreeBSD and hack on it when 
doing future merges, but that’s a caveat that those projects will have to deal 
with when the time comes to merge this in.
Thanks!
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


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

2017-02-28 Thread Mateusz Guzik
Author: mjg
Date: Wed Mar  1 05:06:21 2017
New Revision: 314474
URL: https://svnweb.freebsd.org/changeset/base/314474

Log:
  locks: ensure proper barriers are used with atomic ops when necessary
  
  Unclear how, but the locking routine for mutexes was using the *release*
  barrier instead of acquire. This must have been either a copy-pasto or bad
  completion.
  
  Going through other uses of atomics shows no barriers in:
  - upgrade routines (addressed in this patch)
  - sections protected with turnstile locks - this should be fine as necessary
barriers are in the worst case provided by turnstile unlock
  
  I would like to thank Mark Millard and andreast@ for reporting the problem and
  testing previous patches before the issue got identified.
  
  ps.
.-'---`-.
  ,'  `.
  | \
  |  \
  \   _  \
  ,\  _,'-,/-)\
  ( * \ \,' ,' ,'-)
   `._,) -',-')
 \/ ''/
  )/ /
 /   ,'-'
  
  Hardware provided by: IBM LTC

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

Modified: head/sys/kern/kern_rwlock.c
==
--- head/sys/kern/kern_rwlock.c Wed Mar  1 05:05:05 2017(r314473)
+++ head/sys/kern/kern_rwlock.c Wed Mar  1 05:06:21 2017(r314474)
@@ -1151,7 +1151,7 @@ __rw_try_upgrade(volatile uintptr_t *c, 
if (RW_READERS(v) > 1)
break;
if (!(v & RW_LOCK_WAITERS)) {
-   success = atomic_cmpset_ptr(>rw_lock, v, tid);
+   success = atomic_cmpset_acq_ptr(>rw_lock, v, tid);
if (!success)
continue;
break;

Modified: head/sys/kern/kern_sx.c
==
--- head/sys/kern/kern_sx.c Wed Mar  1 05:05:05 2017(r314473)
+++ head/sys/kern/kern_sx.c Wed Mar  1 05:06:21 2017(r314474)
@@ -410,7 +410,7 @@ sx_try_upgrade_(struct sx *sx, const cha
 * we will wake up the exclusive waiters when we drop the lock.
 */
x = sx->sx_lock & SX_LOCK_EXCLUSIVE_WAITERS;
-   success = atomic_cmpset_ptr(>sx_lock, SX_SHARERS_LOCK(1) | x,
+   success = atomic_cmpset_acq_ptr(>sx_lock, SX_SHARERS_LOCK(1) | x,
(uintptr_t)curthread | x);
LOCK_LOG_TRY("XUPGRADE", >lock_object, 0, success, file, line);
if (success) {

Modified: head/sys/sys/mutex.h
==
--- head/sys/sys/mutex.hWed Mar  1 05:05:05 2017(r314473)
+++ head/sys/sys/mutex.hWed Mar  1 05:06:21 2017(r314474)
@@ -185,7 +185,7 @@ voidthread_lock_flags_(struct thread *,
atomic_cmpset_acq_ptr(&(mp)->mtx_lock, MTX_UNOWNED, (tid))
 
 #define _mtx_obtain_lock_fetch(mp, vp, tid)\
-   atomic_fcmpset_rel_ptr(&(mp)->mtx_lock, vp, (tid))
+   atomic_fcmpset_acq_ptr(&(mp)->mtx_lock, vp, (tid))
 
 /* Try to release mtx_lock if it is unrecursed and uncontested. */
 #define _mtx_release_lock(mp, tid) \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314473 - head

2017-02-28 Thread Warner Losh
Author: imp
Date: Wed Mar  1 05:05:05 2017
New Revision: 314473
URL: https://svnweb.freebsd.org/changeset/base/314473

Log:
  Create README.md file for viewing on github.
  
  This is a lightly edited README using github's MARKDOWN.
  
  Submitted by: Johan 
  Pull Request: https://github.com/freebsd/freebsd/pull/56

Added:
  head/README.md   (contents, props changed)

Added: head/README.md
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/README.md  Wed Mar  1 05:05:05 2017(r314473)
@@ -0,0 +1,86 @@
+FreeBSD Source:
+---
+This is the top level of the FreeBSD source directory.  This file  
+was last revised on:  
+$FreeBSD$
+
+For copyright information, please see the file COPYRIGHT in this  
+directory (additional copyright information also exists for some
+sources in this tree - please see the specific source directories for  
+more information).
+
+The Makefile in this directory supports a number of targets for  
+building components (or all) of the FreeBSD source tree.  See build(7)  
+and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html  
+for more information, including setting make(1) variables.  
+
+The `buildkernel` and `installkernel` targets build and install  
+the kernel and the modules (see below).  Please see the top of  
+the Makefile in this directory for more information on the  
+standard build targets and compile-time flags.
+
+Building a kernel is a somewhat more involved process.  See build(7), 
config(8),  
+and 
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html  
+for more information.
+
+Note: If you want to build and install the kernel with the  
+`buildkernel` and `installkernel` targets, you might need to build  
+world before.  More information is available in the handbook.
+
+The kernel configuration files reside in the `sys//conf`  
+sub-directory.  GENERIC is the default configuration used in release builds.  
+NOTES contains entries and documentation for all possible  
+devices, not just those commonly used.
+
+
+Source Roadmap:
+---
+```
+binSystem/user commands.
+
+cddl   Various commands and libraries under the Common 
Development  
+   and Distribution License.
+
+contribPackages contributed by 3rd parties.
+
+crypto Cryptography stuff (see crypto/README).
+
+etcTemplate files for /etc.
+
+gnuVarious commands and libraries under the GNU 
Public License.  
+   Please see gnu/COPYING* for more information.
+
+includeSystem include files.
+
+kerberos5  Kerberos5 (Heimdal) package.
+
+libSystem libraries.
+
+libexecSystem daemons.
+
+releaseRelease building Makefile & associated tools.
+
+rescue Build system for statically linked /rescue utilities.
+
+sbin   System commands.
+
+secure Cryptographic libraries and commands.
+
+share  Shared resources.
+
+sysKernel sources.
+
+tests  Regression tests which can be run by Kyua.  See 
tests/README
+   for additional information.
+
+tools  Utilities for regression testing and miscellaneous 
tasks.
+
+usr.binUser commands.
+
+usr.sbin   System administration commands.
+```
+
+For information on synchronizing your source tree with one or more of  
+the FreeBSD Project's development branches, please see:
+
+   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314472 - in head/usr.sbin/ntp: doc doc/drivers doc/drivers/icons doc/drivers/scripts doc/hints doc/icons doc/pic doc/scripts libntp libntpevent libopts libparse ntp-keygen ntpd ntpdate...

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:54:06 2017
New Revision: 314472
URL: https://svnweb.freebsd.org/changeset/base/314472

Log:
  Simplify/improve idioms in usr.sbin/ntp Makefiles
  
  - Use SRCTOP-relative paths to other directories instead of
.CURDIR-relative ones. This simplifies pathing in make/displayed output.
  - Also, use :H where possible/sensical to manipulate .CURDIR-relative
paths
  - Remove superfluous bsd.own.mk .includes which are already handled via
src.opts.mk .includes
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/ntp/doc/Makefile
  head/usr.sbin/ntp/doc/drivers/Makefile
  head/usr.sbin/ntp/doc/drivers/icons/Makefile
  head/usr.sbin/ntp/doc/drivers/scripts/Makefile
  head/usr.sbin/ntp/doc/hints/Makefile
  head/usr.sbin/ntp/doc/icons/Makefile
  head/usr.sbin/ntp/doc/pic/Makefile
  head/usr.sbin/ntp/doc/scripts/Makefile
  head/usr.sbin/ntp/libntp/Makefile
  head/usr.sbin/ntp/libntpevent/Makefile
  head/usr.sbin/ntp/libopts/Makefile
  head/usr.sbin/ntp/libparse/Makefile
  head/usr.sbin/ntp/ntp-keygen/Makefile
  head/usr.sbin/ntp/ntpd/Makefile
  head/usr.sbin/ntp/ntpdate/Makefile
  head/usr.sbin/ntp/ntpdc/Makefile
  head/usr.sbin/ntp/ntpq/Makefile
  head/usr.sbin/ntp/ntptime/Makefile
  head/usr.sbin/ntp/sntp/Makefile

Modified: head/usr.sbin/ntp/doc/Makefile
==
--- head/usr.sbin/ntp/doc/Makefile  Wed Mar  1 04:47:22 2017
(r314471)
+++ head/usr.sbin/ntp/doc/Makefile  Wed Mar  1 04:54:06 2017
(r314472)
@@ -25,10 +25,9 @@ FILES=   access.html accopt.html assoc.htm
 MAN=   ntp.conf.5 ntp.keys.5
 MAN+=  ntp-keygen.8 ntpd.8 ntpdate.8 ntpdc.8 ntpq.8 ntptime.8 sntp.8
 
-.PATH: ${.CURDIR}/../../../contrib/ntp/html \
-   ${.CURDIR}/../../../contrib/ntp/util \
-   ${.CURDIR}/../../../contrib/ntp/util \
-   ${.CURDIR}/../../../contrib/ntp/ntpd \
-   ${.CURDIR}/../../../contrib/ntp/ntpsnmpd
+.PATH: ${SRCTOP}/contrib/ntp/html \
+   ${SRCTOP}/contrib/ntp/util \
+   ${SRCTOP}/contrib/ntp/ntpd \
+   ${SRCTOP}/contrib/ntp/ntpsnmpd
 
 .include 

Modified: head/usr.sbin/ntp/doc/drivers/Makefile
==
--- head/usr.sbin/ntp/doc/drivers/Makefile  Wed Mar  1 04:47:22 2017
(r314471)
+++ head/usr.sbin/ntp/doc/drivers/Makefile  Wed Mar  1 04:54:06 2017
(r314472)
@@ -16,6 +16,6 @@ FILES=driver1.html driver10.html driver
driver9.html mx4200data.html oncore-shmem.html tf582_4.html
 .endif
 
-.PATH: ${.CURDIR}/../../../../contrib/ntp/html/drivers
+.PATH: ${SRCTOP}/contrib/ntp/html/drivers
 
 .include 

Modified: head/usr.sbin/ntp/doc/drivers/icons/Makefile
==
--- head/usr.sbin/ntp/doc/drivers/icons/MakefileWed Mar  1 04:47:22 
2017(r314471)
+++ head/usr.sbin/ntp/doc/drivers/icons/MakefileWed Mar  1 04:54:06 
2017(r314472)
@@ -8,6 +8,6 @@ FILESDIR=   ${SHAREDIR}/doc/ntp/drivers/ic
 FILES= home.gif mail2.gif
 .endif
 
-.PATH: ${.CURDIR}/../../../../../contrib/ntp/html/drivers/icons
+.PATH: ${SRCTOP}/contrib/ntp/html/drivers/icons
 
 .include 

Modified: head/usr.sbin/ntp/doc/drivers/scripts/Makefile
==
--- head/usr.sbin/ntp/doc/drivers/scripts/Makefile  Wed Mar  1 04:47:22 
2017(r314471)
+++ head/usr.sbin/ntp/doc/drivers/scripts/Makefile  Wed Mar  1 04:54:06 
2017(r314472)
@@ -8,6 +8,6 @@ FILESDIR=   ${SHAREDIR}/doc/ntp/drivers/sc
 FILES= footer.txt style.css
 .endif
 
-.PATH: ${.CURDIR}/../../../../../contrib/ntp/html/drivers/scripts
+.PATH: ${SRCTOP}/contrib/ntp/html/drivers/scripts
 
 .include 

Modified: head/usr.sbin/ntp/doc/hints/Makefile
==
--- head/usr.sbin/ntp/doc/hints/MakefileWed Mar  1 04:47:22 2017
(r314471)
+++ head/usr.sbin/ntp/doc/hints/MakefileWed Mar  1 04:54:06 2017
(r314472)
@@ -12,6 +12,6 @@ FILES=a-ux aix bsdi changes decosf1 dec
sun4 svr4-dell svr4_package todo vxworks.html winnt.html
 .endif
 
-.PATH: ${.CURDIR}/../../../../contrib/ntp/html/hints
+.PATH: ${SRCTOP}/contrib/ntp/html/hints
 
 .include 

Modified: head/usr.sbin/ntp/doc/icons/Makefile
==
--- head/usr.sbin/ntp/doc/icons/MakefileWed Mar  1 04:47:22 2017
(r314471)
+++ head/usr.sbin/ntp/doc/icons/MakefileWed Mar  1 04:54:06 2017
(r314472)
@@ -8,6 +8,6 @@ FILESDIR=   ${SHAREDIR}/doc/ntp/icons
 FILES= home.gif mail2.gif sitemap.png
 .endif
 
-.PATH: ${.CURDIR}/../../../../contrib/ntp/html/icons
+.PATH: ${SRCTOP}/contrib/ntp/html/icons
 
 .include 

Modified: head/usr.sbin/ntp/doc/pic/Makefile

svn commit: r314471 - head/sys/net

2017-02-28 Thread Warner Losh
Author: imp
Date: Wed Mar  1 04:47:22 2017
New Revision: 314471
URL: https://svnweb.freebsd.org/changeset/base/314471

Log:
  Fix VNET - DAD detected duplicate IPv6 address
  
  Assign a hopefully unique, locally administered etheraddr. - for
  epairNa & epairNb
  
  Submitted by: Catalin 
  Pull Request: https://github.com/freebsd/freebsd/pull/92

Modified:
  head/sys/net/if_epair.c

Modified: head/sys/net/if_epair.c
==
--- head/sys/net/if_epair.c Wed Mar  1 04:41:59 2017(r314470)
+++ head/sys/net/if_epair.c Wed Mar  1 04:47:22 2017(r314471)
@@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -724,6 +725,7 @@ epair_clone_create(struct if_clone *ifc,
ifp = scb->ifp;
/* Assign a hopefully unique, locally administered etheraddr. */
eaddr[0] = 0x02;
+   eaddr[1] = arc4random() & 0xff;
eaddr[3] = (ifp->if_index >> 8) & 0xff;
eaddr[4] = ifp->if_index & 0xff;
eaddr[5] = 0x0b;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314470 - in head/usr.sbin/unbound: anchor checkconf control daemon

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:41:59 2017
New Revision: 314470
URL: https://svnweb.freebsd.org/changeset/base/314470

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  This simplifies pathing in make/displayed output.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/unbound/anchor/Makefile
  head/usr.sbin/unbound/checkconf/Makefile
  head/usr.sbin/unbound/control/Makefile
  head/usr.sbin/unbound/daemon/Makefile

Modified: head/usr.sbin/unbound/anchor/Makefile
==
--- head/usr.sbin/unbound/anchor/Makefile   Wed Mar  1 04:40:57 2017
(r314469)
+++ head/usr.sbin/unbound/anchor/Makefile   Wed Mar  1 04:41:59 2017
(r314470)
@@ -1,9 +1,9 @@
 # $FreeBSD$
 
 # Vendor sources and generated files
-LDNSDIR= ${.CURDIR}/../../../contrib/ldns
-UNBOUNDDIR= ${.CURDIR}/../../../contrib/unbound
-EXPATDIR= ${.CURDIR}/../../../contrib/expat
+LDNSDIR= ${SRCTOP}/contrib/ldns
+UNBOUNDDIR= ${SRCTOP}/contrib/unbound
+EXPATDIR= ${SRCTOP}/contrib/expat
 
 .PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/smallapp ${UNBOUNDDIR}/doc
 

Modified: head/usr.sbin/unbound/checkconf/Makefile
==
--- head/usr.sbin/unbound/checkconf/MakefileWed Mar  1 04:40:57 2017
(r314469)
+++ head/usr.sbin/unbound/checkconf/MakefileWed Mar  1 04:41:59 2017
(r314470)
@@ -1,8 +1,8 @@
 # $FreeBSD$
 
 # Vendor sources and generated files
-LDNSDIR= ${.CURDIR}/../../../contrib/ldns
-UNBOUNDDIR= ${.CURDIR}/../../../contrib/unbound
+LDNSDIR= ${SRCTOP}/contrib/ldns
+UNBOUNDDIR= ${SRCTOP}/contrib/unbound
 
 .PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/smallapp ${UNBOUNDDIR}/util 
${UNBOUNDDIR}/doc
 

Modified: head/usr.sbin/unbound/control/Makefile
==
--- head/usr.sbin/unbound/control/Makefile  Wed Mar  1 04:40:57 2017
(r314469)
+++ head/usr.sbin/unbound/control/Makefile  Wed Mar  1 04:41:59 2017
(r314470)
@@ -1,8 +1,8 @@
 # $FreeBSD$
 
 # Vendor sources and generated files
-LDNSDIR= ${.CURDIR}/../../../contrib/ldns
-UNBOUNDDIR= ${.CURDIR}/../../../contrib/unbound
+LDNSDIR= ${SRCTOP}/contrib/ldns
+UNBOUNDDIR= ${SRCTOP}/contrib/unbound
 
 .PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/smallapp ${UNBOUNDDIR}/util 
${UNBOUNDDIR}/doc
 

Modified: head/usr.sbin/unbound/daemon/Makefile
==
--- head/usr.sbin/unbound/daemon/Makefile   Wed Mar  1 04:40:57 2017
(r314469)
+++ head/usr.sbin/unbound/daemon/Makefile   Wed Mar  1 04:41:59 2017
(r314470)
@@ -1,8 +1,8 @@
 # $FreeBSD$
 
 # Vendor sources and generated files
-LDNSDIR= ${.CURDIR}/../../../contrib/ldns
-UNBOUNDDIR= ${.CURDIR}/../../../contrib/unbound
+LDNSDIR= ${SRCTOP}/contrib/ldns
+UNBOUNDDIR= ${SRCTOP}/contrib/unbound
 
 .PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/daemon ${UNBOUNDDIR}/util ${UNBOUNDDIR}/doc
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314469 - head/sys/dev/twa

2017-02-28 Thread Warner Losh
Author: imp
Date: Wed Mar  1 04:40:57 2017
New Revision: 314469
URL: https://svnweb.freebsd.org/changeset/base/314469

Log:
  Update tw_cl_share.h to allow 255 LUNs
  
  TW_CL_MAX_NUM_LUNS should not be 16 but I presume 255. I have a 3ware
  controller with more than 16 volumes (LUN's) and otherwise all LUN's
  above the 16'th are not working.
  
  Submitted by: jcatrysse 
  Pull Request: https://github.com/freebsd/freebsd/pull/100

Modified:
  head/sys/dev/twa/tw_cl_share.h

Modified: head/sys/dev/twa/tw_cl_share.h
==
--- head/sys/dev/twa/tw_cl_share.h  Wed Mar  1 04:35:21 2017
(r314468)
+++ head/sys/dev/twa/tw_cl_share.h  Wed Mar  1 04:40:57 2017
(r314469)
@@ -68,7 +68,7 @@
 #define TW_CL_MAX_NUM_UNITS32  /* max # of units we support */
 #endif /* TW_OSL_ENCLOSURE_SUPPORT */
 
-#define TW_CL_MAX_NUM_LUNS 16  /* max # of LUN's we support */
+#define TW_CL_MAX_NUM_LUNS 255 /* max # of LUN's we support */
 #define TW_CL_MAX_IO_SIZE  0x2 /* 128K */
 
 /*
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314468 - in head/usr.sbin/zic: . zdump zic

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:35:21 2017
New Revision: 314468
URL: https://svnweb.freebsd.org/changeset/base/314468

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  Also, use :H where possible/sensical to manipulate .CURDIR-relative paths
  
  This simplifies pathing in make/displayed output.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/zic/Makefile.inc
  head/usr.sbin/zic/zdump/Makefile
  head/usr.sbin/zic/zic/Makefile

Modified: head/usr.sbin/zic/Makefile.inc
==
--- head/usr.sbin/zic/Makefile.inc  Wed Mar  1 04:27:58 2017
(r314467)
+++ head/usr.sbin/zic/Makefile.inc  Wed Mar  1 04:35:21 2017
(r314468)
@@ -1,3 +1,3 @@
 # $FreeBSD$
 
-.include "${.CURDIR}/../../Makefile.inc"
+.include "${SRCTOP}/usr.sbin/Makefile.inc"

Modified: head/usr.sbin/zic/zdump/Makefile
==
--- head/usr.sbin/zic/zdump/MakefileWed Mar  1 04:27:58 2017
(r314467)
+++ head/usr.sbin/zic/zdump/MakefileWed Mar  1 04:35:21 2017
(r314468)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../../contrib/tzcode/zic
+.PATH: ${SRCTOP}/contrib/tzcode/zic
 
 PROG=  zdump
 MAN=   zdump.8
@@ -8,7 +8,7 @@ SRCS=   zdump.c ialloc.c scheck.c
 
 CFLAGS+= -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone -DSTD_INSPIRED -DPCTS
 CFLAGS+= -DHAVE_LONG_DOUBLE -DTZDIR=\"${SHAREDIR}/zoneinfo\" -Demkdir=mkdir
-CFLAGS+= -I${.CURDIR}/.. -I${.CURDIR}/../../../contrib/tzcode/stdtime
+CFLAGS+= -I${.CURDIR:H} -I${SRCTOP}/contrib/tzcode/stdtime
 
 WARNS?=2
 

Modified: head/usr.sbin/zic/zic/Makefile
==
--- head/usr.sbin/zic/zic/Makefile  Wed Mar  1 04:27:58 2017
(r314467)
+++ head/usr.sbin/zic/zic/Makefile  Wed Mar  1 04:35:21 2017
(r314468)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../../contrib/tzcode/zic
+.PATH: ${SRCTOP}/contrib/tzcode/zic
 
 PROG=  zic
 MAN=   zic.8
@@ -9,7 +9,7 @@ SRCS=   zic.c ialloc.c scheck.c
 CFLAGS+= -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone -DSTD_INSPIRED -DPCTS
 CFLAGS+= -DHAVE_LONG_DOUBLE -DTZDIR=\"${SHAREDIR}/zoneinfo\" -Demkdir=mkdir
 CFLAGS+= -DHAVE_STRERROR -DHAVE_UNISTD_H
-CFLAGS+= -I${.CURDIR}/.. -I${.CURDIR}/../../../contrib/tzcode/stdtime
+CFLAGS+= -I${.CURDIR:H} -I${SRCTOP}/contrib/tzcode/stdtime
 
 WARNS?=2
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314467 - head/sys/dev/usb/input

2017-02-28 Thread Warner Losh
Author: imp
Date: Wed Mar  1 04:27:58 2017
New Revision: 314467
URL: https://svnweb.freebsd.org/changeset/base/314467

Log:
  Make wsp process a single touchpad tap and interpret it as a
  left-click event.  It can be disabled setting the new
  hw.usb.wsp.enable_single_tap_clicks sysctl to 0.
  
  Submitted by: K Staring 
  Pull Request: https://github.com/freebsd/freebsd/pull/97

Modified:
  head/sys/dev/usb/input/wsp.c

Modified: head/sys/dev/usb/input/wsp.c
==
--- head/sys/dev/usb/input/wsp.cWed Mar  1 04:24:56 2017
(r314466)
+++ head/sys/dev/usb/input/wsp.cWed Mar  1 04:27:58 2017
(r314467)
@@ -87,6 +87,7 @@ static struct wsp_tuning {
int pressure_untouch_threshold;
int pressure_tap_threshold;
int scr_hor_threshold;
+   int enable_single_tap_clicks;
 }
wsp_tuning =
 {
@@ -96,6 +97,7 @@ static struct wsp_tuning {
.pressure_untouch_threshold = 10,
.pressure_tap_threshold = 120,
.scr_hor_threshold = 20,
+   .enable_single_tap_clicks = 1,
 };
 
 static void
@@ -107,6 +109,7 @@ wsp_runing_rangecheck(struct wsp_tuning 
WSP_CLAMP(ptun->pressure_untouch_threshold, 1, 255);
WSP_CLAMP(ptun->pressure_tap_threshold, 1, 255);
WSP_CLAMP(ptun->scr_hor_threshold, 1, 255);
+   WSP_CLAMP(ptun->enable_single_tap_clicks, 0, 1);
 }
 
 SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scale_factor, CTLFLAG_RWTUN,
@@ -121,6 +124,8 @@ SYSCTL_INT(_hw_usb_wsp, OID_AUTO, pressu
 _tuning.pressure_tap_threshold, 0, "tap pressure threshold");
 SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scr_hor_threshold, CTLFLAG_RWTUN,
 _tuning.scr_hor_threshold, 0, "horizontal scrolling threshold");
+SYSCTL_INT(_hw_usb_wsp, OID_AUTO, enable_single_tap_clicks, CTLFLAG_RWTUN,
+_tuning.enable_single_tap_clicks, 0, "enable single tap clicks");
 
 /*
  * Some tables, structures, definitions and constant values for the
@@ -966,7 +971,7 @@ wsp_intr_callback(struct usb_xfer *xfer,
 */
switch (sc->ntaps) {
case 1:
-   if (!(params->caps & 
HAS_INTEGRATED_BUTTON)) {
+   if (!(params->caps & 
HAS_INTEGRATED_BUTTON) || tun.enable_single_tap_clicks) {
wsp_add_to_queue(sc, 0, 0, 0, 
MOUSE_BUTTON1DOWN);
DPRINTFN(WSP_LLEVEL_INFO, "LEFT 
CLICK!\n");
}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314466 - head/usr.sbin/ypserv

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:24:56 2017
New Revision: 314466
URL: https://svnweb.freebsd.org/changeset/base/314466

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  This simplifies pathing in make/displayed output.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/ypserv/Makefile

Modified: head/usr.sbin/ypserv/Makefile
==
--- head/usr.sbin/ypserv/Makefile   Wed Mar  1 04:24:30 2017
(r314465)
+++ head/usr.sbin/ypserv/Makefile   Wed Mar  1 04:24:56 2017
(r314466)
@@ -2,9 +2,8 @@
 
 .include 
 
-RPCDIR=${.CURDIR}/../../include/rpcsvc
-.PATH: ${RPCDIR} \
-   ${.CURDIR}/common
+RPCDIR=${SRCTOP}/include/rpcsvc
+.PATH: ${RPCDIR} ${.CURDIR}/common
 
 PROG=  ypserv
 MAN=   ypserv.8 ypinit.8
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314464 - head/usr.sbin/yppush

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:24:24 2017
New Revision: 314464
URL: https://svnweb.freebsd.org/changeset/base/314464

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  This simplifies pathing in make/displayed output.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/yppush/Makefile

Modified: head/usr.sbin/yppush/Makefile
==
--- head/usr.sbin/yppush/Makefile   Wed Mar  1 04:23:53 2017
(r314463)
+++ head/usr.sbin/yppush/Makefile   Wed Mar  1 04:24:24 2017
(r314464)
@@ -1,8 +1,7 @@
 # $FreeBSD$
 
-RPCDIR=${.CURDIR}/../../include/rpcsvc
-.PATH: ${RPCDIR} ${.CURDIR}/../../usr.sbin/ypserv \
-   ${.CURDIR}/../../libexec/ypxfr
+RPCDIR=${SRCTOP}/include/rpcsvc
+.PATH: ${RPCDIR} ${SRCTOP}/usr.sbin/ypserv ${SRCTOP}/libexec/ypxfr
 
 PROG=  yppush
 MAN=   yppush.8
@@ -10,7 +9,7 @@ SRCS=  ypxfr_getmap.c yp_dblookup.c yp_er
${GENSRCS}
 GENSRCS=yp.h yp_clnt.c yppush_svc.c
 
-CFLAGS+= -I. -I${.CURDIR}/../../libexec/ypxfr
+CFLAGS+= -I. -I${SRCTOP}/libexec/ypxfr
 
 WARNS?=2
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314463 - head/usr.sbin/tzsetup

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:23:53 2017
New Revision: 314463
URL: https://svnweb.freebsd.org/changeset/base/314463

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  This simplifies pathing in make/displayed output.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/tzsetup/Makefile

Modified: head/usr.sbin/tzsetup/Makefile
==
--- head/usr.sbin/tzsetup/Makefile  Wed Mar  1 04:22:23 2017
(r314462)
+++ head/usr.sbin/tzsetup/Makefile  Wed Mar  1 04:23:53 2017
(r314463)
@@ -9,7 +9,7 @@ CFLAGS+= -I.
 
 .if ${MK_DIALOG} != no
 WARNS?=3
-CFLAGS+=   -I${.CURDIR}/../../contrib/dialog -DHAVE_DIALOG
+CFLAGS+=   -I${SRCTOP}/contrib/dialog -DHAVE_DIALOG
 LIBADD=dialog ncursesw
 .endif
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314462 - head/usr.sbin/rpc.ypxfrd

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:22:23 2017
New Revision: 314462
URL: https://svnweb.freebsd.org/changeset/base/314462

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  The SRCTOP conversion simplifies pathing in make/displayed output.
  
  Also, while here, change a hardcoded path to ${RPCDIR}/ypxfrd.x in
  the make targets with ${.ALLSRC} .
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/rpc.ypxfrd/Makefile

Modified: head/usr.sbin/rpc.ypxfrd/Makefile
==
--- head/usr.sbin/rpc.ypxfrd/Makefile   Wed Mar  1 04:19:04 2017
(r314461)
+++ head/usr.sbin/rpc.ypxfrd/Makefile   Wed Mar  1 04:22:23 2017
(r314462)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../usr.sbin/ypserv
+.PATH: ${SRCTOP}/usr.sbin/ypserv
 
 PROG=  rpc.ypxfrd
 MAN=   rpc.ypxfrd.8
@@ -15,14 +15,14 @@ LIBADD= rpcsvc
 
 CLEANFILES= ypxfrd_svc.c ypxfrd.h
 
-RPCDIR=${.CURDIR}/../../include/rpcsvc
+RPCDIR=${SRCTOP}/include/rpcsvc
 RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -I -C
 
 # We need to remove the 'static' keyword from _rpcsvcstate so that
 # ypxfrd_main.c can see it.
 ypxfrd_svc.c: ${RPCDIR}/ypxfrd.x
rm -f ${.TARGET}
-   ${RPCGEN} -m ${RPCDIR}/ypxfrd.x | \
+   ${RPCGEN} -m ${.ALLSRC} | \
sed s/"static int _rpcsvcstate"/"int _rpcsvcstate"/g > ${.TARGET}
 
 # ypxfrd_xdr.c: ${RPCDIR}/ypxfrd.x
@@ -31,6 +31,6 @@ ypxfrd_svc.c: ${RPCDIR}/ypxfrd.x
 
 ypxfrd.h: ${RPCDIR}/ypxfrd.x
rm -f ${.TARGET}
-   ${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/ypxfrd.x
+   ${RPCGEN} -h -o ${.TARGET} ${.ALLSRC}
 
 .include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314461 - head/usr.sbin/zonectl

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:19:04 2017
New Revision: 314461
URL: https://svnweb.freebsd.org/changeset/base/314461

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  This simplifies pathing in make/displayed output.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/zonectl/Makefile

Modified: head/usr.sbin/zonectl/Makefile
==
--- head/usr.sbin/zonectl/Makefile  Wed Mar  1 04:18:28 2017
(r314460)
+++ head/usr.sbin/zonectl/Makefile  Wed Mar  1 04:19:04 2017
(r314461)
@@ -2,7 +2,7 @@
 
 PROG=  zonectl
 SRCS=  zonectl.c
-SDIR=  ${.CURDIR}/../../sys
+SDIR=  ${SRCTOP}/sys
 LIBADD= cam sbuf util
 MAN=   zonectl.8
 CFLAGS+=-g -O0
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314459 - in head/usr.sbin: traceroute traceroute6

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:17:59 2017
New Revision: 314459
URL: https://svnweb.freebsd.org/changeset/base/314459

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  This simplifies pathing in make/displayed output.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/traceroute/Makefile
  head/usr.sbin/traceroute6/Makefile

Modified: head/usr.sbin/traceroute/Makefile
==
--- head/usr.sbin/traceroute/Makefile   Wed Mar  1 04:17:18 2017
(r314458)
+++ head/usr.sbin/traceroute/Makefile   Wed Mar  1 04:17:59 2017
(r314459)
@@ -2,7 +2,7 @@
 
 .include 
 
-TRACEROUTE_DISTDIR?= ${.CURDIR}/../../contrib/traceroute
+TRACEROUTE_DISTDIR?= ${SRCTOP}/contrib/traceroute
 .PATH: ${TRACEROUTE_DISTDIR}
 
 PROG=  traceroute

Modified: head/usr.sbin/traceroute6/Makefile
==
--- head/usr.sbin/traceroute6/Makefile  Wed Mar  1 04:17:18 2017
(r314458)
+++ head/usr.sbin/traceroute6/Makefile  Wed Mar  1 04:17:59 2017
(r314459)
@@ -13,7 +13,7 @@
 # A PARTICULAR PURPOSE.
 # $FreeBSD$
 
-TRACEROUTE_DISTDIR?= ${.CURDIR}/../../contrib/traceroute
+TRACEROUTE_DISTDIR?= ${SRCTOP}/contrib/traceroute
 .PATH: ${TRACEROUTE_DISTDIR}
 
 PROG=  traceroute6
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314460 - head/usr.sbin/ypldap

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:18:28 2017
New Revision: 314460
URL: https://svnweb.freebsd.org/changeset/base/314460

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  This simplifies pathing in make/displayed output.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/ypldap/Makefile

Modified: head/usr.sbin/ypldap/Makefile
==
--- head/usr.sbin/ypldap/Makefile   Wed Mar  1 04:17:59 2017
(r314459)
+++ head/usr.sbin/ypldap/Makefile   Wed Mar  1 04:18:28 2017
(r314460)
@@ -12,8 +12,8 @@ MAN=  ypldap.8 ypldap.conf.5
 LIBADD=openbsd event util rpcsvc
 
 CFLAGS+=-I${.CURDIR}
-CFLAGS+=-I${.CURDIR}/../../contrib/pf/libevent
-CFLAGS+=-I${.CURDIR}/../../lib/libopenbsd
+CFLAGS+=-I${SRCTOP}/contrib/pf/libevent
+CFLAGS+=-I${SRCTOP}/lib/libopenbsd
 
 WARNS= 2
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314458 - in head/usr.sbin: tcpdchk tcpdmatch

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:17:18 2017
New Revision: 314458
URL: https://svnweb.freebsd.org/changeset/base/314458

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  This simplifies pathing in make/displayed output.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/tcpdchk/Makefile
  head/usr.sbin/tcpdmatch/Makefile

Modified: head/usr.sbin/tcpdchk/Makefile
==
--- head/usr.sbin/tcpdchk/Makefile  Wed Mar  1 04:16:40 2017
(r314457)
+++ head/usr.sbin/tcpdchk/Makefile  Wed Mar  1 04:17:18 2017
(r314458)
@@ -2,7 +2,7 @@
 
 .include 
 
-.PATH: ${.CURDIR}/../../contrib/tcp_wrappers
+.PATH: ${SRCTOP}/contrib/tcp_wrappers
 
 PROG=  tcpdchk
 MAN=   tcpdchk.8

Modified: head/usr.sbin/tcpdmatch/Makefile
==
--- head/usr.sbin/tcpdmatch/MakefileWed Mar  1 04:16:40 2017
(r314457)
+++ head/usr.sbin/tcpdmatch/MakefileWed Mar  1 04:17:18 2017
(r314458)
@@ -2,7 +2,7 @@
 
 .include 
 
-.PATH: ${.CURDIR}/../../contrib/tcp_wrappers
+.PATH: ${SRCTOP}/contrib/tcp_wrappers
 
 PROG=  tcpdmatch
 MAN=   tcpdmatch.8
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314457 - head/usr.sbin/rpc.ypupdated

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:16:40 2017
New Revision: 314457
URL: https://svnweb.freebsd.org/changeset/base/314457

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  The SRCTOP conversion simplifies pathing in make/displayed output.
  
  Also, while here, change a hardcoded path to ${RPCDIR}/ypupdate_prot.x in
  the make targets with ${.ALLSRC} .
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/rpc.ypupdated/Makefile

Modified: head/usr.sbin/rpc.ypupdated/Makefile
==
--- head/usr.sbin/rpc.ypupdated/MakefileWed Mar  1 04:14:41 2017
(r314456)
+++ head/usr.sbin/rpc.ypupdated/MakefileWed Mar  1 04:16:40 2017
(r314457)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../ypserv ${.CURDIR}/../../libexec/ypxfr
+.PATH: ${SRCTOP}/usr.sbin/ypserv ${SRCTOP}/libexec/ypxfr
 
 PROG=  rpc.ypupdated
 MAN=
@@ -9,7 +9,7 @@ SRCS=   ypupdate_prot_svc.c ypupdate_prot.
yp_dblookup.c yp_dbwrite.c yp_dbdelete.c yp_dbupdate.c
 
 #CFLAGS+= -DYP
-CFLAGS+= -I${.CURDIR}/../ypserv -I. -I${.CURDIR}/../../libexec/ypxfr
+CFLAGS+= -I${SRCTOP}/usr.sbin/ypserv -I. -I${SRCTOP}/libexec/ypxfr
 
 WARNS?=1
 
@@ -24,10 +24,10 @@ RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -I -C
 # ypupdated_main.c can see it.
 ypupdate_prot_svc.c: ${RPCDIR}/ypupdate_prot.x
rm -f ${.TARGET}
-   ${RPCGEN} -m ${RPCDIR}/ypupdate_prot.x | \
+   ${RPCGEN} -m ${.ALLSRC} | \
sed s/"static int _rpcsvcstate"/"int _rpcsvcstate"/g > ${.TARGET}
 
 ypupdate_prot.h: ${RPCDIR}/ypupdate_prot.x
-   ${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/ypupdate_prot.x
+   ${RPCGEN} -h -o ${.TARGET} ${.ALLSRC}
 
 .include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314456 - head/usr.sbin/rpc.yppasswdd

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:14:41 2017
New Revision: 314456
URL: https://svnweb.freebsd.org/changeset/base/314456

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  This simplifies pathing in make/displayed output.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/rpc.yppasswdd/Makefile

Modified: head/usr.sbin/rpc.yppasswdd/Makefile
==
--- head/usr.sbin/rpc.yppasswdd/MakefileWed Mar  1 04:13:31 2017
(r314455)
+++ head/usr.sbin/rpc.yppasswdd/MakefileWed Mar  1 04:14:41 2017
(r314456)
@@ -2,8 +2,8 @@
 
 RPCDIR=${DESTDIR}/usr/include/rpcsvc
 
-.PATH: ${.CURDIR}/../../usr.sbin/ypserv ${.CURDIR}/../../usr.bin/chpass \
-   ${.CURDIR}/../../libexec/ypxfr ${RPCDIR}
+.PATH: ${SRCTOP}/usr.sbin/ypserv ${SRCTOP}/usr.bin/chpass \
+   ${SRCTOP}/libexec/ypxfr ${RPCDIR}
 
 PROG=  rpc.yppasswdd
 SCRIPTS=yppwupdate
@@ -16,9 +16,9 @@ GENSRCS=yp.h yp_clnt.c yppasswd.h yppass
 
 WARNS?= 5
 CFLAGS+= -fno-strict-aliasing
-CFLAGS+= -I${.CURDIR}/../../usr.sbin/vipw \
--I${.CURDIR}/../../usr.sbin/ypserv \
--I${.CURDIR}/../../libexec/ypxfr \
+CFLAGS+= -I${SRCTOP}/usr.sbin/vipw \
+-I${SRCTOP}/usr.sbin/ypserv \
+-I${SRCTOP}/libexec/ypxfr \
 -I${.CURDIR} -I.
 LIBADD=rpcsvc crypt util
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314455 - head/usr.sbin/rpc.statd

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:13:31 2017
New Revision: 314455
URL: https://svnweb.freebsd.org/changeset/base/314455

Log:
  Use .ALLSRC instead of RPCSRC
  
  This is a trivial simplification in the Makefile, meant to serve as
  a good example for what to do with rules like this.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/rpc.statd/Makefile

Modified: head/usr.sbin/rpc.statd/Makefile
==
--- head/usr.sbin/rpc.statd/MakefileWed Mar  1 04:12:24 2017
(r314454)
+++ head/usr.sbin/rpc.statd/MakefileWed Mar  1 04:13:31 2017
(r314455)
@@ -15,10 +15,10 @@ RPCSRC= ${DESTDIR}/usr/include/rpcsvc/sm
 RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -L -C
 
 sm_inter_svc.c: ${RPCSRC}
-   ${RPCGEN} -m -o ${.TARGET} ${RPCSRC}
+   ${RPCGEN} -m -o ${.TARGET} ${.ALLSRC}
 
 sm_inter.h: ${RPCSRC}
-   ${RPCGEN} -h -o ${.TARGET} ${RPCSRC}
+   ${RPCGEN} -h -o ${.TARGET} ${.ALLSRC}
 
 test: test.c
cc -o test test.c -lrpcsvc
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314454 - head/usr.sbin/rpc.lockd

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:12:24 2017
New Revision: 314454
URL: https://svnweb.freebsd.org/changeset/base/314454

Log:
  Use .ALLSRC instead of RPCSRC
  
  This is a trivial simplification in the Makefile, meant to serve as
  a good example for what to do with rules like this.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/rpc.lockd/Makefile

Modified: head/usr.sbin/rpc.lockd/Makefile
==
--- head/usr.sbin/rpc.lockd/MakefileWed Mar  1 04:02:36 2017
(r314453)
+++ head/usr.sbin/rpc.lockd/MakefileWed Mar  1 04:12:24 2017
(r314454)
@@ -17,10 +17,10 @@ RPCSRC= ${DESTDIR}/usr/include/rpcsvc/nl
 RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -L -C
 
 nlm_prot_svc.c: ${RPCSRC}
-   ${RPCGEN} -m -o ${.TARGET} ${RPCSRC}
+   ${RPCGEN} -m -o ${.TARGET} ${.ALLSRC}
 
 nlm_prot.h: ${RPCSRC}
-   ${RPCGEN} -h -o ${.TARGET} ${RPCSRC}
+   ${RPCGEN} -h -o ${.TARGET} ${.ALLSRC}
 
 test: ${.CURDIR}/test.c
cc -o test ${.CURDIR}/test.c -lrpcsvc
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314453 - head/usr.sbin/yp_mkdb

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:02:36 2017
New Revision: 314453
URL: https://svnweb.freebsd.org/changeset/base/314453

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/yp_mkdb/Makefile

Modified: head/usr.sbin/yp_mkdb/Makefile
==
--- head/usr.sbin/yp_mkdb/Makefile  Wed Mar  1 04:00:17 2017
(r314452)
+++ head/usr.sbin/yp_mkdb/Makefile  Wed Mar  1 04:02:36 2017
(r314453)
@@ -1,13 +1,13 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../libexec/ypxfr ${.CURDIR}/../ypserv
+.PATH: ${SRCTOP}/libexec/ypxfr ${SRCTOP}/usr.sbin/ypserv
 
 PROG=  yp_mkdb
 MAN=   yp_mkdb.8
 SRCS=  yp_mkdb.c yp_dblookup.c yp_dbwrite.c
 
 CFLAGS+= -Dyp_error=warnx
-CFLAGS+= -I${.CURDIR}/../../libexec/ypxfr -I${.CURDIR}/../../usr.sbin/ypserv
+CFLAGS+= -I${SRCTOP}/libexec/ypxfr -I${SRCTOP}/usr.sbin/ypserv
 
 WARNS?=1
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314452 - head/usr.sbin/fstyp

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:00:17 2017
New Revision: 314452
URL: https://svnweb.freebsd.org/changeset/base/314452

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/fstyp/Makefile

Modified: head/usr.sbin/fstyp/Makefile
==
--- head/usr.sbin/fstyp/MakefileWed Mar  1 03:59:18 2017
(r314451)
+++ head/usr.sbin/fstyp/MakefileWed Mar  1 04:00:17 2017
(r314452)
@@ -26,15 +26,15 @@ CFLAGS+=-I${.CURDIR}/../../sys
 IGNORE_PRAGMA=  YES
 
 CFLAGS+= -DNEED_SOLARIS_BOOLEAN -DHAVE_ZFS
-CFLAGS+= -I${.CURDIR}/../../sys/cddl/compat/opensolaris
-CFLAGS+= -I${.CURDIR}/../../cddl/compat/opensolaris/include
-CFLAGS+= -I${.CURDIR}/../../cddl/compat/opensolaris/lib/libumem
-CFLAGS+= -I${.CURDIR}/../../cddl/contrib/opensolaris/lib/libnvpair
-CFLAGS+= -I${.CURDIR}/../../cddl/contrib/opensolaris/lib/libzpool/common
-CFLAGS+= -I${.CURDIR}/../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+= -I${.CURDIR}/../../sys/cddl/contrib/opensolaris/uts/common
-CFLAGS+= -I${.CURDIR}/../../sys/cddl/contrib/opensolaris/uts/common/sys
-CFLAGS+= -I${.CURDIR}/../../cddl/contrib/opensolaris/head
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
 .endif
 
 LIBADD=geom md
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314451 - head/usr.sbin/uathload

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 03:59:18 2017
New Revision: 314451
URL: https://svnweb.freebsd.org/changeset/base/314451

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  The SRCTOP conversion simplifies pathing in make/displayed output.
  
  Also, while here, change a hardcoded path to ar5523.bin.uu in the make target
  with ${.ALLSRC} .
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/uathload/Makefile

Modified: head/usr.sbin/uathload/Makefile
==
--- head/usr.sbin/uathload/Makefile Wed Mar  1 03:31:12 2017
(r314450)
+++ head/usr.sbin/uathload/Makefile Wed Mar  1 03:59:18 2017
(r314451)
@@ -10,7 +10,7 @@ FILESMODE=444
 
 CLEANFILES=ar5523.bin
 
-ar5523.bin: ${.CURDIR}/../../sys/contrib/dev/uath/ar5523.bin.uu
-   uudecode -p ${.CURDIR}/../../sys/contrib/dev/uath/ar5523.bin.uu > 
${.TARGET}
+ar5523.bin: ${SRCTOP}/sys/contrib/dev/uath/ar5523.bin.uu
+   uudecode -p ${.ALLSRC} > ${.TARGET}
 
 .include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314450 - head/contrib/netbsd-tests/lib/libc/stdlib

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 03:31:12 2017
New Revision: 314450
URL: https://svnweb.freebsd.org/changeset/base/314450

Log:
  Add additional __FreeBSD_version guards around the hsearch_r testcases
  
  The reasoning for this is the same as r276046: to ease MFCing the tests
  to ^/stable/10 .
  
  This was accidentally missed in r313439
  
  MFC after:1 week
  X-MFC with:   r313439
  Sponsored by: Dell EMC Isilon

Modified:
  head/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c

Modified: head/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c
==
--- head/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c   Wed Mar  1 
02:10:40 2017(r314449)
+++ head/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c   Wed Mar  1 
03:31:12 2017(r314450)
@@ -287,6 +287,7 @@ ATF_TC_BODY(hsearch_r_basic, tc)
 }
 #endif
 
+#if defined(__FreeBSD__) && 1100027 <= __FreeBSD_version
 ATF_TC(hsearch_r_duplicate);
 ATF_TC_HEAD(hsearch_r_duplicate, tc)
 {
@@ -394,6 +395,7 @@ ATF_TC_BODY(hsearch_r_two, tc)
 
hdestroy_r();
 }
+#endif
 
 ATF_TP_ADD_TCS(tp)
 {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r314436 - in head: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps bin/pw

2017-02-28 Thread Warner Losh
On Tue, Feb 28, 2017 at 6:48 PM, Shawn Webb  wrote:
> On Tue, Feb 28, 2017 at 11:42:48PM +, Warner Losh wrote:
>> Author: imp
>> Date: Tue Feb 28 23:42:47 2017
>> New Revision: 314436
>> URL: https://svnweb.freebsd.org/changeset/base/314436
>>
>> Log:
>>   Renumber copyright clause 4
>>
>>   Renumber cluase 4 to 3, per what everybody else did when BSD granted
>>   them permission to remove clause 3. My insistance on keeping the same
>>   numbering for legal reasons is too pedantic, so give up on that point.
>>
>>   Submitted by:   Jan Schaumann 
>>   Pull Request:   https://github.com/freebsd/freebsd/pull/96
>
> This breaks building arm64 world at a minimum.

Yea, in resolving the conflicts with git, my inexperience botched it.
I believe I've fixed it.

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


svn commit: r314449 - in head: release/picobsd/tinyware/passwd sys/arm/include sys/mips/include usr.bin/locate/locate

2017-02-28 Thread Warner Losh
Author: imp
Date: Wed Mar  1 02:10:40 2017
New Revision: 314449
URL: https://svnweb.freebsd.org/changeset/base/314449

Log:
  Revert prior commit to restore the files mangled by my "fixing" merge
  conflicts for a git rebase I tried to do.

Modified:
  head/release/picobsd/tinyware/passwd/extern.h
  head/release/picobsd/tinyware/passwd/pw_util.h
  head/sys/arm/include/_align.h
  head/sys/mips/include/cpuinfo.h
  head/usr.bin/locate/locate/pathnames.h

Modified: head/release/picobsd/tinyware/passwd/extern.h
==
--- head/release/picobsd/tinyware/passwd/extern.h   Wed Mar  1 02:07:51 
2017(r314448)
+++ head/release/picobsd/tinyware/passwd/extern.h   Wed Mar  1 02:10:40 
2017(r314449)
@@ -1,6 +1,6 @@
-/*-
- * Copyright (c) 1982, 1986, 1988, 1993
- *  The Regents of the University of California.  All rights reserved.
+/*
+ * Copyright (c) 1994
+ * The Regents of the University of California.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -10,7 +10,11 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *notice, this list of conditions and the following disclaimer in the
  *documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
+ * 3. All advertising materials mentioning features or use of this software
+ *must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
  *may be used to endorse or promote products derived from this software
  *without specific prior written permission.
  *
@@ -26,17 +30,9 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
+ * From: @(#)extern.h  8.1 (Berkeley) 4/2/94
  * $FreeBSD$
  */
 
-#ifndef _NETINET_IP6_IPSEC_H_
-#define _NETINET_IP6_IPSEC_H_
-
-intip6_ipsec_filtertunnel(struct mbuf *);
-intip6_ipsec_fwd(struct mbuf *);
-intip6_ipsec_input(struct mbuf *, int);
-intip6_ipsec_output(struct mbuf **, struct inpcb *, int *);
-#if 0
-intip6_ipsec_mtu(struct mbuf *);
-#endif
-#endif
+intkrb_passwd(char *, char *, char *, char *);
+intlocal_passwd(char *);

Modified: head/release/picobsd/tinyware/passwd/pw_util.h
==
--- head/release/picobsd/tinyware/passwd/pw_util.h  Wed Mar  1 02:07:51 
2017(r314448)
+++ head/release/picobsd/tinyware/passwd/pw_util.h  Wed Mar  1 02:10:40 
2017(r314449)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1987, 1988, 1993
+ * Copyright (c) 1994
  * The Regents of the University of California.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -10,7 +10,11 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *notice, this list of conditions and the following disclaimer in the
  *documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
+ * 3. All advertising materials mentioning features or use of this software
+ *must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
  *may be used to endorse or promote products derived from this software
  *without specific prior written permission.
  *
@@ -26,22 +30,15 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * @(#)disklabel.h 8.2 (Berkeley) 7/10/94
+ * @(#)pw_util.h   8.2 (Berkeley) 4/1/94
+ *
  * $FreeBSD$
  */
 
-#ifndef _SYS_DISKPC98_H_
-#define_SYS_DISKPC98_H_
-
-#include 
-#include 
-
-#defineDOSMID_386BSD   __DOSMID_386BSD
-#defineDOSSID_386BSD   __DOSSID_386BSD
-
-void pc98_partition_dec(void const *pp, struct pc98_partition *d);
-void pc98_partition_enc(void *pp, struct pc98_partition *d);
-
-#define DIOCSPC98  _IOW('M', 129, u_char[8192])
-
-#endif /* !_SYS_DISKPC98_H_ */
+void   pw_edit(int);
+void   pw_error(const char *, int, int);
+void   pw_init(void);
+intpw_lock(void);
+intpw_mkdb(const char *);
+void   pw_prompt(void);
+intpw_tmp(void);

Modified: head/sys/arm/include/_align.h
==
--- head/sys/arm/include/_align.h   Wed Mar  1 02:07:51 2017
(r314448)
+++ head/sys/arm/include/_align.h   Wed Mar  1 02:10:40 2017

svn commit: r314448 - head/sys/libkern

2017-02-28 Thread Warner Losh
Author: imp
Date: Wed Mar  1 02:07:51 2017
New Revision: 314448
URL: https://svnweb.freebsd.org/changeset/base/314448

Log:
  strstr.c was inadvertently blasted with a copy of isa_nmi.c. Revert
  and remove clause 3 while I'm here.

Modified:
  head/sys/libkern/strstr.c

Modified: head/sys/libkern/strstr.c
==
--- head/sys/libkern/strstr.c   Wed Mar  1 01:45:52 2017(r314447)
+++ head/sys/libkern/strstr.c   Wed Mar  1 02:07:51 2017(r314448)
@@ -1,9 +1,9 @@
 /*-
- * Copyright (c) 1991 The Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California.  All rights reserved.
  *
  * This code is derived from software contributed to Berkeley by
- * William Jolitz.
+ * Chris Torek.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -28,42 +28,32 @@
  * 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.
- *
- * from: @(#)isa.c 7.2 (Berkeley) 5/13/91
  */
 
 #include 
 __FBSDID("$FreeBSD$");
 
-#include 
-#include 
-#include 
-
-#include 
-
-#define NMI_PARITY 0x04
-#define NMI_EPARITY 0x02
+#include 
+#include 
 
 /*
- * Handle a NMI, possibly a machine check.
- * return true to panic system, false to ignore.
+ * Find the first occurrence of find in s.
  */
-int
-isa_nmi(int cd)
+char *
+strstr(const char *s, const char *find)
 {
-   int retval = 0;
-   int port = inb(0x33);
+   char c, sc;
+   size_t len;
 
-   log(LOG_CRIT, "NMI PC98 port = %x\n", port);
-   if (port & NMI_PARITY) {
-   log(LOG_CRIT, "BASE RAM parity error, likely hardware 
failure.");
-   retval = 1;
-   } else if (port & NMI_EPARITY) {
-   log(LOG_CRIT, "EXTENDED RAM parity error, likely hardware 
failure.");
-   retval = 1;
-   } else {
-   log(LOG_CRIT, "\nNMI Resume ??\n");
+   if ((c = *find++) != 0) {
+   len = strlen(find);
+   do {
+   do {
+   if ((sc = *s++) == 0)
+   return (NULL);
+   } while (sc != c);
+   } while (strncmp(s, find, len) != 0);
+   s--;
}
-
-   return(retval);
+   return (__DECONST(char *, s));
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r314436 - in head: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps bin/pw

2017-02-28 Thread Shawn Webb
On Tue, Feb 28, 2017 at 11:42:48PM +, Warner Losh wrote:
> Author: imp
> Date: Tue Feb 28 23:42:47 2017
> New Revision: 314436
> URL: https://svnweb.freebsd.org/changeset/base/314436
> 
> Log:
>   Renumber copyright clause 4
>   
>   Renumber cluase 4 to 3, per what everybody else did when BSD granted
>   them permission to remove clause 3. My insistance on keeping the same
>   numbering for legal reasons is too pedantic, so give up on that point.
>   
>   Submitted by:   Jan Schaumann 
>   Pull Request:   https://github.com/freebsd/freebsd/pull/96

This breaks building arm64 world at a minimum.

-- 
Shawn Webb
Cofounder and Security Engineer
HardenedBSD

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


signature.asc
Description: PGP signature


Re: svn commit: r314420 - head/sys/kern

2017-02-28 Thread Scott Long via svn-src-head
Sure, but it doesn’t match the comments in that if-else construct.

Scott

> On Feb 28, 2017, at 2:02 PM, Conrad Meyer  wrote:
> 
> On Tue, Feb 28, 2017 at 1:27 PM, Scott Long  wrote:
>> Author: scottl
>> Date: Tue Feb 28 21:27:51 2017
>> New Revision: 314420
>> URL: https://svnweb.freebsd.org/changeset/base/314420
>> 
>> Log:
>>  Provide a comment on why stdio.h needs to be included.
>> 
>> Modified:
>>  head/sys/kern/subr_prf.c
>> 
>> Modified: head/sys/kern/subr_prf.c
>> ==
>> --- head/sys/kern/subr_prf.cTue Feb 28 21:18:45 2017(r314419)
>> +++ head/sys/kern/subr_prf.cTue Feb 28 21:27:51 2017(r314420)
>> @@ -76,6 +76,13 @@ __FBSDID("$FreeBSD$");
>> #include 
>> #else
>> #include 
>> +#endif
>> +
>> +/*
>> + * This is needed for sbuf_putbuf() when compiled into userland.  Due to the
>> + * shared nature of this file, it's the only place to put it.
> 
> Couldn't it go in the #else clause above?
> 
> Best,
> Conrad
> 

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

svn commit: r314443 - head/sys/dev/iwn

2017-02-28 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Mar  1 00:42:38 2017
New Revision: 314443
URL: https://svnweb.freebsd.org/changeset/base/314443

Log:
  iwn: fix data rate parsing for Rx radiotap header.
  
  Tested with Intel 6205, MONITOR mode + RTL8188EU, STA mode.

Modified:
  head/sys/dev/iwn/if_iwn.c
  head/sys/dev/iwn/if_iwnreg.h

Modified: head/sys/dev/iwn/if_iwn.c
==
--- head/sys/dev/iwn/if_iwn.c   Wed Mar  1 00:28:04 2017(r314442)
+++ head/sys/dev/iwn/if_iwn.c   Wed Mar  1 00:42:38 2017(r314443)
@@ -2667,6 +2667,26 @@ rate2plcp(int rate)
return 0;
 }
 
+static __inline uint8_t
+plcp2rate(const uint8_t rate_plcp)
+{
+   switch (rate_plcp) {
+   case 0xd:   return 12;
+   case 0xf:   return 18;
+   case 0x5:   return 24;
+   case 0x7:   return 36;
+   case 0x9:   return 48;
+   case 0xb:   return 72;
+   case 0x1:   return 96;
+   case 0x3:   return 108;
+   case 10:return 2;
+   case 20:return 4;
+   case 55:return 11;
+   case 110:   return 22;
+   default:return 0;
+   }
+}
+
 static int
 iwn_get_1stream_tx_antmask(struct iwn_softc *sc)
 {
@@ -3078,6 +3098,7 @@ iwn_rx_done(struct iwn_softc *sc, struct
 
if (ieee80211_radiotap_active(ic)) {
struct iwn_rx_radiotap_header *tap = >sc_rxtap;
+   uint32_t rate = le32toh(stat->rate);
 
tap->wr_flags = 0;
if (stat->flags & htole16(IWN_STAT_FLAG_SHPREAMBLE))
@@ -3085,24 +3106,11 @@ iwn_rx_done(struct iwn_softc *sc, struct
tap->wr_dbm_antsignal = (int8_t)rssi;
tap->wr_dbm_antnoise = (int8_t)nf;
tap->wr_tsft = stat->tstamp;
-   switch (stat->rate) {
-   /* CCK rates. */
-   case  10: tap->wr_rate =   2; break;
-   case  20: tap->wr_rate =   4; break;
-   case  55: tap->wr_rate =  11; break;
-   case 110: tap->wr_rate =  22; break;
-   /* OFDM rates. */
-   case 0xd: tap->wr_rate =  12; break;
-   case 0xf: tap->wr_rate =  18; break;
-   case 0x5: tap->wr_rate =  24; break;
-   case 0x7: tap->wr_rate =  36; break;
-   case 0x9: tap->wr_rate =  48; break;
-   case 0xb: tap->wr_rate =  72; break;
-   case 0x1: tap->wr_rate =  96; break;
-   case 0x3: tap->wr_rate = 108; break;
-   /* Unknown rate: should not happen. */
-   default:  tap->wr_rate =   0;
-   }
+   if (rate & IWN_RFLAG_MCS) {
+   tap->wr_rate = rate & IWN_RFLAG_RATE_MCS;
+   tap->wr_rate |= IEEE80211_RATE_MCS;
+   } else
+   tap->wr_rate = plcp2rate(rate & IWN_RFLAG_RATE);
}
 
/*

Modified: head/sys/dev/iwn/if_iwnreg.h
==
--- head/sys/dev/iwn/if_iwnreg.hWed Mar  1 00:28:04 2017
(r314442)
+++ head/sys/dev/iwn/if_iwnreg.hWed Mar  1 00:42:38 2017
(r314443)
@@ -736,6 +736,10 @@ struct iwn4965_node_info {
uint32_treserved7;
 } __packed;
 
+#define IWN_RFLAG_RATE 0xff
+#define IWN_RFLAG_RATE_MCS 0x1f
+#define IWN_RFLAG_HT40_DUP 0x20
+
 #define IWN_RFLAG_MCS  (1 << 8)
 #define IWN_RFLAG_CCK  (1 << 9)
 #define IWN_RFLAG_GREENFIELD   (1 << 10)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314442 - head/tests/sys/netinet

2017-02-28 Thread Alan Somers
Author: asomers
Date: Wed Mar  1 00:28:04 2017
New Revision: 314442
URL: https://svnweb.freebsd.org/changeset/base/314442

Log:
  Add an ATF test for IPv6 SLAAC with multiple fibs
  
  Tests that an interface can get a SLAAC address and that it inserts its
  routes into the correct fib. Does not test anything to do with NDP.
  
  PR:   196361
  Reviewed by:  Erick Turnquist 
  MFC after:3 weeks
  Sponsored by: Spectra Logic Corp
  Differential Revision:https://reviews.freebsd.org/D9776

Modified:
  head/tests/sys/netinet/fibs_test.sh

Modified: head/tests/sys/netinet/fibs_test.sh
==
--- head/tests/sys/netinet/fibs_test.sh Wed Mar  1 00:17:04 2017
(r314441)
+++ head/tests/sys/netinet/fibs_test.sh Wed Mar  1 00:28:04 2017
(r314442)
@@ -443,6 +443,89 @@ same_ip_multiple_ifaces_inet6_cleanup()
cleanup_ifaces
 }
 
+atf_test_case slaac_on_nondefault_fib6 cleanup
+slaac_on_nondefault_fib6_head()
+{
+   atf_set "descr" "SLAAC correctly installs routes on non-default FIBs"
+   atf_set "require.user" "root"
+   atf_set "require.config" "fibs" "allow_sysctl_side_effects"
+}
+slaac_on_nondefault_fib6_body()
+{
+   # Configure the epair interfaces to use nonrouteable RFC3849
+   # addresses and non-default FIBs
+   ADDR="2001:db8::2"
+   GATEWAY="2001:db8::1"
+   SUBNET="2001:db8:"
+   MASK="64"
+
+   atf_expect_fail "PR196361 IPv6 network routes don't respect 
net.add_addr_allfibs=0"
+
+   # Check system configuration
+   if [ 0 != `sysctl -n net.add_addr_allfibs` ]; then
+   atf_skip "This test requires net.add_addr_allfibs=0"
+   fi
+   get_fibs 2
+
+   sysctl -n "net.inet6.ip6.rfc6204w3" >> "rfc6204w3.state"
+   sysctl -n "net.inet6.ip6.forwarding" >> "forwarding.state"
+   # Enable forwarding so the kernel will send RAs
+   sysctl net.inet6.ip6.forwarding=1
+   # Enable RFC6204W3 mode so the kernel will enable default router
+   # selection while also forwarding packets
+   sysctl net.inet6.ip6.rfc6204w3=1
+
+   # Configure epair interfaces
+   get_epair
+   setup_iface "$EPAIRA" "$FIB0" inet6 ${ADDR} ${MASK}
+   echo ifconfig "$EPAIRB" up inet6 fib $FIB1 -ifdisabled accept_rtadv
+   ifconfig "$EPAIRB" inet6 -ifdisabled accept_rtadv fib $FIB1 up
+   rtadvd -p rtadvd.pid -C rtadvd.sock -c /dev/null "$EPAIRA"
+   rtsol "$EPAIRB"
+
+   # Check SLAAC address
+   atf_check -o match:"inet6 ${SUBNET}.*prefixlen ${MASK}.*autoconf" \
+   ifconfig "$EPAIRB"
+   # Check local route
+   atf_check -o match:"${SUBNET}.*\.*lo0" \
+   netstat -rnf inet6 -F $FIB1
+   # Check subnet route
+   atf_check -o match:"${SUBNET}:/${MASK}.*\.*$EPAIRB" \
+   netstat -rnf inet6 -F $FIB1
+   # Check default route
+   atf_check -o match:"default.*\.*$EPAIRB" \
+   netstat -rnf inet6 -F $FIB1
+
+   # Check that none of the above routes appeared on other routes
+   for fib in $( seq 0 $(($(sysctl -n net.fibs) - 1))); do
+   if [ "$fib" = "$FIB1" -o "$fib" = "$FIB0" ]; then
+   continue
+   fi
+   atf_check -o not-match:"${SUBNET}.*\.*lo0" \
+   netstat -rnf inet6 -F $fib
+   atf_check -o not-match:"${SUBNET}:/${MASK}.*\.*$EPAIRB" \
+   netstat -rnf inet6 -F $fib
+   atf_check -o not-match:"default.*\.*$EPAIRB" \
+   netstat -rnf inet6 -F $fib
+   done
+}
+slaac_on_nondefault_fib6_cleanup()
+{
+   cleanup_ifaces
+   if [ -f "rtadvd.pid" ]; then
+   pkill -F rtadvd.pid
+   rm rtadvd.pid
+   fi
+   if [ -f "rfc6204w3.state" ] ; then
+   sysctl "net.inet6.ip6.rfc6204w3"=`cat "rfc6204w3.state"`
+   rm "rfc6204w3.state"
+   fi
+   if [ -f "forwarding.state" ] ; then
+   sysctl "net.inet6.ip6.forwarding"=`cat "forwarding.state"`
+   rm "forwarding.state"
+   fi
+}
+
 # Regression test for kern/187550
 atf_test_case subnet_route_with_multiple_fibs_on_same_subnet cleanup
 subnet_route_with_multiple_fibs_on_same_subnet_head()
@@ -648,6 +731,7 @@ atf_init_test_cases()
atf_add_test_case same_ip_multiple_ifaces_fib0
atf_add_test_case same_ip_multiple_ifaces
atf_add_test_case same_ip_multiple_ifaces_inet6
+   atf_add_test_case slaac_on_nondefault_fib6
atf_add_test_case subnet_route_with_multiple_fibs_on_same_subnet
atf_add_test_case subnet_route_with_multiple_fibs_on_same_subnet_inet6
atf_add_test_case udp_dontroute
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to 

svn commit: r314437 - head/sys/dev/pci

2017-02-28 Thread Gavin Atkinson
Author: gavin
Date: Tue Feb 28 23:55:03 2017
New Revision: 314437
URL: https://svnweb.freebsd.org/changeset/base/314437

Log:
  Fix spelling mistake in comment, firmwrae -> firmware

Modified:
  head/sys/dev/pci/pci_pci.c

Modified: head/sys/dev/pci/pci_pci.c
==
--- head/sys/dev/pci/pci_pci.c  Tue Feb 28 23:42:47 2017(r314436)
+++ head/sys/dev/pci/pci_pci.c  Tue Feb 28 23:55:03 2017(r314437)
@@ -2849,7 +2849,7 @@ pcib_request_feature_allow(device_t pcib
 enum pci_feature feature)
 {
/*
-* No host firmwrae we have to negotiate with, so we allow
+* No host firmware we have to negotiate with, so we allow
 * every valid feature requested.
 */
switch (feature) {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r314373 - in head: . etc/defaults etc/rc.d lib/libc/regex share/man/man4/man4.i386 share/man/man5 sys/amd64/conf sys/boot/forth sys/compat/svr4 sys/conf sys/dev/streams sys/i386/conf s

2017-02-28 Thread Mark Linimon
On Tue, Feb 28, 2017 at 01:30:44PM -0800, Gleb Smirnoff wrote:
> How can I check the __FreeBSD_version in a port Makefile? My understanding
> is that there is no standard way for such thing.

There are hundreds of examples in port Makefiles.  I suppose the PH will need
to be updated to include some of them.  It is hinted at under "INCLUDE" in
https://www.freebsd.org/doc/en/books/porters-handbook/dads-noinstall.html
but not made specific.

Some quick examples:

  devel/cloudabi-toolchain/Makefile:.if ${OSVERSION} >= 1100100

  devel/cvs-syncmail/Makefile:.if ${OPSYS} == FreeBSD && ${OSVERSION} > 100

  devel/trio/Makefile.orig:# NB: OSVERSION was not incremented for r308559, so 
we use the earlier
  devel/trio/Makefile.orig:# 1200014 as a surrogate for now.
  devel/trio/Makefile.orig:.if ${OSVERSION} < 1100506 || ( ${OSVERSION} >= 
120 && ${OSVERSION} < 1200014 )
  devel/trio/Makefile.orig:BROKEN_aarch64= needs fixes from r308375, 
r308487, and/or r308559
  devel/trio/Makefile.orig:.endif

  emulators/i386-wine/Makefile.inc:.if ${OPSYS} != FreeBSD || (!(${OSVERSION} < 
100) && !(${OSVERSION} >= 1003000 && ${OSVERSION} < 110) && 
!(${OSVERSION} >= 1100121 && ${OSVERSION} < 120) && !(${OSVERSION} >= 
1200019 && ${OSVERSION} < 130))

  lang/ruby22/Makefile:.if exists(/usr/sbin/dtrace) && (${OSVERSION} > 1100032) 
&& (${ARCH} == "amd64" || ${ARCH} == "i386")

  lang/tcc/Makefile:.if ${CC:T:M*clang*} || ${OSVERSION} >= 124

  sysutils/e2fsprogs/Makefile:.if !empty(PORT_OPTIONS:MNOTESTS) && (${OPSYS} == 
FreeBSD) && (${OSVERSION} >= 110 || ((${ARCH} != i386) && (${ARCH} != 
amd64)))

However, I am kind of shocked that this is not well understood --
especially after I have tried so many times to convince src committers
to update FreeBSD_version in case of src changes that affect (e.g. break)
ports.

These are the kinds of things that ports committers have to use to work
around changes in the src tree.  Skipping OSVERSION updates makes this
work more complicated.

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


svn commit: r314436 - in head: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps bin/pwd...

2017-02-28 Thread Warner Losh
Author: imp
Date: Tue Feb 28 23:42:47 2017
New Revision: 314436
URL: https://svnweb.freebsd.org/changeset/base/314436

Log:
  Renumber copyright clause 4
  
  Renumber cluase 4 to 3, per what everybody else did when BSD granted
  them permission to remove clause 3. My insistance on keeping the same
  numbering for legal reasons is too pedantic, so give up on that point.
  
  Submitted by: Jan Schaumann 
  Pull Request: https://github.com/freebsd/freebsd/pull/96

Modified:
  head/bin/cat/cat.1
  head/bin/cat/cat.c
  head/bin/chflags/chflags.1
  head/bin/chflags/chflags.c
  head/bin/chmod/chmod.1
  head/bin/chmod/chmod.c
  head/bin/cp/cp.1
  head/bin/cp/cp.c
  head/bin/cp/extern.h
  head/bin/cp/utils.c
  head/bin/date/date.1
  head/bin/date/date.c
  head/bin/date/extern.h
  head/bin/date/netdate.c
  head/bin/dd/args.c
  head/bin/dd/conv.c
  head/bin/dd/conv_tab.c
  head/bin/dd/dd.1
  head/bin/dd/dd.c
  head/bin/dd/dd.h
  head/bin/dd/extern.h
  head/bin/dd/misc.c
  head/bin/dd/position.c
  head/bin/df/df.1
  head/bin/df/df.c
  head/bin/domainname/domainname.1
  head/bin/domainname/domainname.c
  head/bin/echo/echo.1
  head/bin/echo/echo.c
  head/bin/ed/cbc.c
  head/bin/hostname/hostname.1
  head/bin/hostname/hostname.c
  head/bin/kill/kill.1
  head/bin/kill/kill.c
  head/bin/ln/ln.1
  head/bin/ln/ln.c
  head/bin/ln/symlink.7
  head/bin/ls/cmp.c
  head/bin/ls/extern.h
  head/bin/ls/ls.1
  head/bin/ls/ls.c
  head/bin/ls/ls.h
  head/bin/ls/print.c
  head/bin/ls/util.c
  head/bin/mkdir/mkdir.1
  head/bin/mkdir/mkdir.c
  head/bin/mv/mv.1
  head/bin/mv/mv.c
  head/bin/pax/ar_io.c
  head/bin/pax/ar_subs.c
  head/bin/pax/buf_subs.c
  head/bin/pax/cache.c
  head/bin/pax/cache.h
  head/bin/pax/cpio.c
  head/bin/pax/cpio.h
  head/bin/pax/extern.h
  head/bin/pax/file_subs.c
  head/bin/pax/ftree.c
  head/bin/pax/ftree.h
  head/bin/pax/gen_subs.c
  head/bin/pax/options.c
  head/bin/pax/options.h
  head/bin/pax/pat_rep.c
  head/bin/pax/pat_rep.h
  head/bin/pax/pax.1
  head/bin/pax/pax.c
  head/bin/pax/pax.h
  head/bin/pax/sel_subs.c
  head/bin/pax/sel_subs.h
  head/bin/pax/tables.c
  head/bin/pax/tables.h
  head/bin/pax/tar.c
  head/bin/pax/tar.h
  head/bin/pax/tty_subs.c
  head/bin/ps/extern.h
  head/bin/ps/fmt.c
  head/bin/ps/keyword.c
  head/bin/ps/nlist.c
  head/bin/ps/print.c
  head/bin/ps/ps.1
  head/bin/ps/ps.c
  head/bin/ps/ps.h
  head/bin/pwd/pwd.1
  head/bin/pwd/pwd.c
  head/bin/rcp/extern.h
  head/bin/rcp/rcp.1
  head/bin/rcp/rcp.c
  head/bin/rcp/util.c
  head/bin/realpath/realpath.1
  head/bin/realpath/realpath.c
  head/bin/rm/rm.1
  head/bin/rm/rm.c
  head/bin/rmdir/rmdir.1
  head/bin/rmdir/rmdir.c
  head/bin/sh/alias.c
  head/bin/sh/alias.h
  head/bin/sh/arith.h
  head/bin/sh/bltin/bltin.h
  head/bin/sh/bltin/echo.c
  head/bin/sh/builtins.def
  head/bin/sh/cd.c
  head/bin/sh/cd.h
  head/bin/sh/error.c
  head/bin/sh/error.h
  head/bin/sh/eval.c
  head/bin/sh/eval.h
  head/bin/sh/exec.c
  head/bin/sh/exec.h
  head/bin/sh/expand.c
  head/bin/sh/expand.h
  head/bin/sh/funcs/cmv
  head/bin/sh/funcs/dirs
  head/bin/sh/funcs/login
  head/bin/sh/funcs/newgrp
  head/bin/sh/funcs/popd
  head/bin/sh/funcs/pushd
  head/bin/sh/funcs/suspend
  head/bin/sh/histedit.c
  head/bin/sh/input.c
  head/bin/sh/input.h
  head/bin/sh/jobs.c
  head/bin/sh/jobs.h
  head/bin/sh/mail.c
  head/bin/sh/mail.h
  head/bin/sh/main.c
  head/bin/sh/main.h
  head/bin/sh/memalloc.c
  head/bin/sh/memalloc.h
  head/bin/sh/miscbltin.c
  head/bin/sh/mkbuiltins
  head/bin/sh/mknodes.c
  head/bin/sh/mksyntax.c
  head/bin/sh/mktokens
  head/bin/sh/myhistedit.h
  head/bin/sh/mystring.c
  head/bin/sh/mystring.h
  head/bin/sh/nodes.c.pat
  head/bin/sh/nodetypes
  head/bin/sh/options.c
  head/bin/sh/options.h
  head/bin/sh/output.c
  head/bin/sh/output.h
  head/bin/sh/parser.c
  head/bin/sh/parser.h
  head/bin/sh/redir.c
  head/bin/sh/redir.h
  head/bin/sh/sh.1
  head/bin/sh/shell.h
  head/bin/sh/show.c
  head/bin/sh/show.h
  head/bin/sh/trap.c
  head/bin/sh/trap.h
  head/bin/sh/var.c
  head/bin/sh/var.h
  head/bin/sleep/sleep.1
  head/bin/sleep/sleep.c
  head/bin/stty/cchar.c
  head/bin/stty/extern.h
  head/bin/stty/gfmt.c
  head/bin/stty/key.c
  head/bin/stty/modes.c
  head/bin/stty/print.c
  head/bin/stty/stty.1
  head/bin/stty/stty.c
  head/bin/stty/stty.h
  head/bin/stty/util.c
  head/bin/sync/sync.8
  head/bin/sync/sync.c
  head/bin/test/test.1
  head/contrib/libarchive/libarchive/archive_entry.c
  head/contrib/libarchive/libarchive/archive_read_support_filter_compress.c
  head/contrib/libxo/libxo/xo_syslog.c
  head/contrib/libxo/tests/gettext/po/pig_latin/strerror.po
  head/contrib/libxo/tests/gettext/strerror.pot
  head/contrib/ofed/libcxgb4/src/queue.h
  head/contrib/openbsm/compat/queue.h
  head/contrib/openbsm/compat/vis.h
  head/contrib/sendmail/LICENSE
  head/contrib/tzcode/stdtime/ctime.3
  head/crypto/heimdal/lib/roken/qsort.c
  head/lib/libc/amd64/SYS.h
  head/lib/libc/amd64/gen/_setjmp.S
  

svn commit: r314435 - in head/sys/contrib/ck: include src

2017-02-28 Thread Olivier Houchard
Author: cognet
Date: Tue Feb 28 23:30:14 2017
New Revision: 314435
URL: https://svnweb.freebsd.org/changeset/base/314435

Log:
  Merge CK as of commit 24d26965d1a28039062ba3bcf9433b623f3d2c5e, to get
  a fix in ck_epoch.

Modified:
  head/sys/contrib/ck/include/ck_md.h
  head/sys/contrib/ck/src/ck_epoch.c
Directory Properties:
  head/sys/contrib/ck/   (props changed)

Modified: head/sys/contrib/ck/include/ck_md.h
==
--- head/sys/contrib/ck/include/ck_md.h Tue Feb 28 23:26:59 2017
(r314434)
+++ head/sys/contrib/ck/include/ck_md.h Tue Feb 28 23:30:14 2017
(r314435)
@@ -57,7 +57,7 @@
 #define CK_MD_RMO
 #endif /* CK_MD_RMO */
 
-#define CK_VERSION "0.5.2"
+#define CK_VERSION "0.6.0"
 #define CK_GIT_SHA ""
 
 /*

Modified: head/sys/contrib/ck/src/ck_epoch.c
==
--- head/sys/contrib/ck/src/ck_epoch.c  Tue Feb 28 23:26:59 2017
(r314434)
+++ head/sys/contrib/ck/src/ck_epoch.c  Tue Feb 28 23:30:14 2017
(r314435)
@@ -309,11 +309,12 @@ ck_epoch_scan(struct ck_epoch *global,
 {
ck_stack_entry_t *cursor;
 
-   *af = false;
if (cr == NULL) {
cursor = CK_STACK_FIRST(>records);
+   *af = false;
} else {
cursor = >record_next;
+   *af = true;
}
 
while (cursor != NULL) {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r314429 - in head/sys: amd64/amd64 i386/i386

2017-02-28 Thread Conrad Meyer
Thanks!

On Tue, Feb 28, 2017 at 2:54 PM, Konstantin Belousov  wrote:
> Author: kib
> Date: Tue Feb 28 22:54:52 2017
> New Revision: 314429
> URL: https://svnweb.freebsd.org/changeset/base/314429
>
> Log:
>   Initialize pcb_save for thread0.
>
>   Otherwise kernel traps on NULL dereference if fpu_kern(9) is used from the
>   thread0 context.
>
>   Reported by:  cem
>   Reviewed by:  cem, jhb
>   Sponsored by: The FreeBSD Foundation
>   MFC after:1 week
>
> Modified:
>   head/sys/amd64/amd64/machdep.c
>   head/sys/i386/i386/machdep.c
>
> Modified: head/sys/amd64/amd64/machdep.c
> ==
> --- head/sys/amd64/amd64/machdep.c  Tue Feb 28 22:49:45 2017
> (r314428)
> +++ head/sys/amd64/amd64/machdep.c  Tue Feb 28 22:54:52 2017
> (r314429)
> @@ -1734,6 +1734,7 @@ hammer_time(u_int64_t modulep, u_int64_t
>  * area.
>  */
> thread0.td_pcb = get_pcb_td();
> +   thread0.td_pcb->pcb_save = get_pcb_user_save_td();
> bzero(get_pcb_user_save_td(), cpu_max_ext_state_size);
> if (use_xsave) {
> xhdr = (struct xstate_hdr *)(get_pcb_user_save_td() +
>
> Modified: head/sys/i386/i386/machdep.c
> ==
> --- head/sys/i386/i386/machdep.cTue Feb 28 22:49:45 2017
> (r314428)
> +++ head/sys/i386/i386/machdep.cTue Feb 28 22:54:52 2017
> (r314429)
> @@ -2420,6 +2420,7 @@ init386(int first)
>  * area.
>  */
> thread0.td_pcb = get_pcb_td();
> +   thread0.td_pcb->pcb_save = get_pcb_user_save_td();
> bzero(get_pcb_user_save_td(), cpu_max_ext_state_size);
> if (use_xsave) {
> xhdr = (struct xstate_hdr *)(get_pcb_user_save_td() +
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314430 - head/sys/netinet6

2017-02-28 Thread Andrey V. Elsukov
Author: ae
Date: Tue Feb 28 22:58:19 2017
New Revision: 314430
URL: https://svnweb.freebsd.org/changeset/base/314430

Log:
  When IPv6 fragments reassembly is complete, update mbuf's csum_data
  and csum_flags using information from all fragments. This fixes
  dropping of reassembled packets due to wrong checksum when the IPv6
  checksum offloading is enabled on a network card.
  
  Obtained from:Yandex LLC
  MFC after:1 week
  Sponsored by: Yandex LLC

Modified:
  head/sys/netinet6/frag6.c

Modified: head/sys/netinet6/frag6.c
==
--- head/sys/netinet6/frag6.c   Tue Feb 28 22:54:52 2017(r314429)
+++ head/sys/netinet6/frag6.c   Tue Feb 28 22:58:19 2017(r314430)
@@ -528,6 +528,11 @@ insert:
af6 = ip6af->ip6af_down;
frag6_deq(ip6af);
while (af6 != (struct ip6asfrag *)q6) {
+   m->m_pkthdr.csum_flags &=
+   IP6_REASS_MBUF(af6)->m_pkthdr.csum_flags;
+   m->m_pkthdr.csum_data +=
+   IP6_REASS_MBUF(af6)->m_pkthdr.csum_data;
+
af6dwn = af6->ip6af_down;
frag6_deq(af6);
while (t->m_next)
@@ -538,6 +543,10 @@ insert:
af6 = af6dwn;
}
 
+   while (m->m_pkthdr.csum_data & 0x)
+   m->m_pkthdr.csum_data = (m->m_pkthdr.csum_data & 0x) +
+   (m->m_pkthdr.csum_data >> 16);
+
/* adjust offset to point where the original next header starts */
offset = ip6af->ip6af_offset - sizeof(struct ip6_frag);
free(ip6af, M_FTABLE);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314429 - in head/sys: amd64/amd64 i386/i386

2017-02-28 Thread Konstantin Belousov
Author: kib
Date: Tue Feb 28 22:54:52 2017
New Revision: 314429
URL: https://svnweb.freebsd.org/changeset/base/314429

Log:
  Initialize pcb_save for thread0.
  
  Otherwise kernel traps on NULL dereference if fpu_kern(9) is used from the
  thread0 context.
  
  Reported by:  cem
  Reviewed by:  cem, jhb
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/sys/amd64/amd64/machdep.c
  head/sys/i386/i386/machdep.c

Modified: head/sys/amd64/amd64/machdep.c
==
--- head/sys/amd64/amd64/machdep.c  Tue Feb 28 22:49:45 2017
(r314428)
+++ head/sys/amd64/amd64/machdep.c  Tue Feb 28 22:54:52 2017
(r314429)
@@ -1734,6 +1734,7 @@ hammer_time(u_int64_t modulep, u_int64_t
 * area.
 */
thread0.td_pcb = get_pcb_td();
+   thread0.td_pcb->pcb_save = get_pcb_user_save_td();
bzero(get_pcb_user_save_td(), cpu_max_ext_state_size);
if (use_xsave) {
xhdr = (struct xstate_hdr *)(get_pcb_user_save_td() +

Modified: head/sys/i386/i386/machdep.c
==
--- head/sys/i386/i386/machdep.cTue Feb 28 22:49:45 2017
(r314428)
+++ head/sys/i386/i386/machdep.cTue Feb 28 22:54:52 2017
(r314429)
@@ -2420,6 +2420,7 @@ init386(int first)
 * area.
 */
thread0.td_pcb = get_pcb_td();
+   thread0.td_pcb->pcb_save = get_pcb_user_save_td();
bzero(get_pcb_user_save_td(), cpu_max_ext_state_size);
if (use_xsave) {
xhdr = (struct xstate_hdr *)(get_pcb_user_save_td() +
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314428 - head/sys/mips/conf

2017-02-28 Thread Warner Losh
Author: imp
Date: Tue Feb 28 22:49:45 2017
New Revision: 314428
URL: https://svnweb.freebsd.org/changeset/base/314428

Log:
  Add Ubiquiti Rocket M support
  
  Updated to use geom_uzip
  
  Submitted by:   Michael Vale 
  Pull Request:   https://github.com/freebsd/freebsd/pull/16

Added:
  head/sys/mips/conf/ROCKET_M2HP   (contents, props changed)
  head/sys/mips/conf/ROCKET_M2HP.hints   (contents, props changed)

Added: head/sys/mips/conf/ROCKET_M2HP
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/mips/conf/ROCKET_M2HP  Tue Feb 28 22:49:45 2017
(r314428)
@@ -0,0 +1,70 @@
+#
+# Specific board setup for the Rocket M2 HP board.
+#
+# This board has the following hardware:
+#
+# + AR7241 CPU SoC
+# + AR9287 Wifi
+# + Integrated switch (XXX speed?)
+# + 8MB flash
+# + 32MB RAM
+# + uboot environment
+
+# $FreeBSD$
+
+#NO_UNIVERSE
+
+include"AR724X_BASE"
+ident  "ROCKET_M2HP"
+hints  "ROCKET_M2HP.hints"
+
+optionsAR71XX_REALMEM=32*1024*1024
+
+optionsAR71XX_ENV_UBOOT
+
+# Limit inlines
+makeoptionsINLINE_LIMIT=768
+
+# We bite the performance overhead for now; the kernel won't
+# fit if the mutexes are inlined.
+optionsMUTEX_NOINLINE
+optionsRWLOCK_NOINLINE
+optionsSX_NOINLINE
+
+# There's no need to enable swapping on this platform.
+optionsNO_SWAPPING
+
+# For DOS - enable if required
+# options  MSDOSFS
+
+# uncompress - to boot read-only lzma natively from flash
+device geom_uzip
+optionsGEOM_UZIP
+optionsROOTDEVNAME=\"ufs:/dev/map/rootfs.uzip\"
+
+# Not enough space for these..
+nooptions  INVARIANTS
+nooptions  INVARIANT_SUPPORT
+nooptions  WITNESS
+nooptions  WITNESS_SKIPSPIN
+nooptions  DEBUG_REDZONE
+nooptions  DEBUG_MEMGUARD
+
+# Used for the static uboot partition map
+device  geom_map
+
+# Options needed for the EEPROM based calibration/PCI configuration data.
+optionsAR71XX_ATH_EEPROM   # Fetch EEPROM/PCI config from flash
+optionsATH_EEPROM_FIRMWARE # Use EEPROM from flash
+device firmware# Used by the above
+
+# Options required for miiproxy and mdiobus
+optionsARGE_MDIO   # Export an MDIO bus separate from arge
+device miiproxy# MDIO bus <-> MII PHY rendezvous
+
+device etherswitch
+device arswitch
+
+# Enable GPIO
+device gpio
+device gpioled

Added: head/sys/mips/conf/ROCKET_M2HP.hints
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/mips/conf/ROCKET_M2HP.hintsTue Feb 28 22:49:45 2017
(r314428)
@@ -0,0 +1,103 @@
+# $FreeBSD$
+
+# arge1 MDIO bus
+hint.argemdio.0.at="nexus0"
+hint.argemdio.0.maddr=0x1a00
+hint.argemdio.0.msize=0x1000
+hint.argemdio.0.order=0
+
+# Override MAC Address with the one on EEPROM
+hint.arge.0.eeprommac=0x1fff
+
+# arge0: dedicated switch port; RMII; dedicated PHY 4 on switch, connected
+# via internal switch MDIO bus.
+hint.arge.0.media=100   # Map to 100/full
+hint.arge.0.fduplex=1   #
+hint.arge.0.phymask=0x10# PHY4
+hint.arge.0.mdio=mdioproxy1 # .. off of the switch mdiobus
+
+# arge1: nail to 1000/full, RMII - connected to the switch
+hint.arge.1.media=1000  # Map to 1000/full
+hint.arge.1.fduplex=1   #
+hint.arge.1.phymask=0x0 # no directly mapped PHYs
+
+#
+# AR7240 switch config
+#
+hint.arswitch.0.at="mdio0"
+hint.arswitch.0.is_7240=1   # We need to be explicitly told this
+hint.arswitch.0.numphys=4   # 4 active switch PHYs (PHY 0 -> 3)
+hint.arswitch.0.phy4cpu=1   # Yes, PHY 4 == dedicated PHY
+hint.arswitch.0.is_rgmii=0  # No, not RGMII
+hint.arswitch.0.is_gmii=0   # No, not GMII
+
+# ath0 hint - pcie slot 0
+hint.pcib.0.bus.0.0.0.ath_fixup_addr=0x1fff1000
+hint.pcib.0.bus.0.0.0.ath_fixup_size=4096
+
+# ath
+hint.ath.0.eeprom_firmware="pcib.0.bus.0.0.0.eeprom_firmware"
+
+# GPIO pins
+# Pin 0: red led (sig1)
+# Pin 1: yellow led (sig2)
+# Pin 11: green len (sig3)
+# Pin 7: green len (sig4)
+# Pin 12: Reset switch
+hint.gpio.0.pinmask=0x1883
+
+# Signal leds
+hint.gpioled.0.at="gpiobus0"
+hint.gpioled.0.name="sig1"
+hint.gpioled.0.pins=0x0001 # pin 0
+hint.gpioled.1.at="gpiobus0"
+hint.gpioled.1.name="sig2"
+hint.gpioled.1.pins=0x0002 # pin 1
+hint.gpioled.2.at="gpiobus0"
+hint.gpioled.2.name="sig3"
+hint.gpioled.2.pins=0x0800 # pin 11
+hint.gpioled.3.at="gpiobus0"
+hint.gpioled.3.name="sig4"
+hint.gpioled.3.pins=0x0080 # pin 7
+
+# GEOM_MAP
+#
+# Rocket M2 HP
+#
+# 
mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),1024k(kernel),6528k(rootfs),256k(cfg),64k(EEPROM)
+
+hint.map.0.at="flash/spi0"
+hint.map.0.start=0x

svn commit: r314426 - head/sys/dev/usb

2017-02-28 Thread Warner Losh
Author: imp
Date: Tue Feb 28 22:22:53 2017
New Revision: 314426
URL: https://svnweb.freebsd.org/changeset/base/314426

Log:
  This should have been K3771_INIT.
  
  Pointy Hat to: imp@

Modified:
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/usbdevs
==
--- head/sys/dev/usb/usbdevsTue Feb 28 22:18:05 2017(r314425)
+++ head/sys/dev/usb/usbdevsTue Feb 28 22:22:53 2017(r314426)
@@ -2434,7 +2434,7 @@ product HUAWEI E1752  0x1446  3G modem
 product HUAWEI K4505   0x1464  3G modem
 product HUAWEI K3765   0x1465  3G modem
 product HUAWEI E1820   0x14ac  E1820 HSPA+ USB Slider
-product HUAWEI K3771   0x14c4  K3771 Initial
+product HUAWEI K3771_INIT  0x14c4  K3771 Initial
 product HUAWEI K3770   0x14c9  3G modem
 product HUAWEI K3771   0x14ca  K3771
 product HUAWEI K3772   0x14cf  K3772
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r314373 - in head: . etc/defaults etc/rc.d lib/libc/regex share/man/man4/man4.i386 share/man/man5 sys/amd64/conf sys/boot/forth sys/compat/svr4 sys/conf sys/dev/streams sys/i386/conf s

2017-02-28 Thread Konstantin Belousov
On Tue, Feb 28, 2017 at 05:14:43AM +, Gleb Smirnoff wrote:
> Author: glebius
> Date: Tue Feb 28 05:14:42 2017
> New Revision: 314373
> URL: https://svnweb.freebsd.org/changeset/base/314373
> 
> Log:
>   Remove SVR4 (System V Release 4) binary compatibility support.
>   
>   UNIX System V Release 4 is operating system released in 1988. It ceased
>   to exist in early 2000-s.

It is also Solaris ABI which was emulated.  Since the stuff is removed,
the i386 LSOL26CALLS LDT selector is no longer needed.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r314420 - head/sys/kern

2017-02-28 Thread Conrad Meyer
On Tue, Feb 28, 2017 at 1:27 PM, Scott Long  wrote:
> Author: scottl
> Date: Tue Feb 28 21:27:51 2017
> New Revision: 314420
> URL: https://svnweb.freebsd.org/changeset/base/314420
>
> Log:
>   Provide a comment on why stdio.h needs to be included.
>
> Modified:
>   head/sys/kern/subr_prf.c
>
> Modified: head/sys/kern/subr_prf.c
> ==
> --- head/sys/kern/subr_prf.cTue Feb 28 21:18:45 2017(r314419)
> +++ head/sys/kern/subr_prf.cTue Feb 28 21:27:51 2017(r314420)
> @@ -76,6 +76,13 @@ __FBSDID("$FreeBSD$");
>  #include 
>  #else
>  #include 
> +#endif
> +
> +/*
> + * This is needed for sbuf_putbuf() when compiled into userland.  Due to the
> + * shared nature of this file, it's the only place to put it.

Couldn't it go in the #else clause above?

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


svn commit: r314424 - in head: include lib/libc/gen

2017-02-28 Thread Eric van Gyzen
Author: vangyzen
Date: Tue Feb 28 21:47:00 2017
New Revision: 314424
URL: https://svnweb.freebsd.org/changeset/base/314424

Log:
  Sort declaration of sem_clockwait_np
  
  Also mention  in sem_timedwait(3), because POSIX does,
  and because the user will need it for clockid_t, struct timespec,
  and TIMER_ABSTIME.
  
  Reported by:  bde
  MFC after:9 days
  X-MFC with:   r314179
  Sponsored by: Dell EMC

Modified:
  head/include/semaphore.h
  head/lib/libc/gen/sem_timedwait.3

Modified: head/include/semaphore.h
==
--- head/include/semaphore.hTue Feb 28 21:39:08 2017(r314423)
+++ head/include/semaphore.hTue Feb 28 21:47:00 2017(r314424)
@@ -52,6 +52,10 @@ typedef  struct _sem sem_t;
 struct timespec;
 
 __BEGIN_DECLS
+#if __BSD_VISIBLE
+int sem_clockwait_np(sem_t * __restrict, __clockid_t, int,
+   const struct timespec *, struct timespec *);
+#endif
 int sem_close(sem_t *);
 int sem_destroy(sem_t *);
 int sem_getvalue(sem_t * __restrict, int * __restrict);
@@ -59,10 +63,6 @@ int   sem_init(sem_t *, int, unsigned int
 sem_t  *sem_open(const char *, int, ...);
 int sem_post(sem_t *);
 int sem_timedwait(sem_t * __restrict, const struct timespec * __restrict);
-#if __BSD_VISIBLE
-int sem_clockwait_np(sem_t * __restrict, __clockid_t, int,
-   const struct timespec *, struct timespec *);
-#endif
 int sem_trywait(sem_t *);
 int sem_unlink(const char *);
 int sem_wait(sem_t *);

Modified: head/lib/libc/gen/sem_timedwait.3
==
--- head/lib/libc/gen/sem_timedwait.3   Tue Feb 28 21:39:08 2017
(r314423)
+++ head/lib/libc/gen/sem_timedwait.3   Tue Feb 28 21:47:00 2017
(r314424)
@@ -34,7 +34,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 23, 2017
+.Dd February 28, 2017
 .Dt SEM_TIMEDWAIT 3
 .Os
 .Sh NAME
@@ -45,6 +45,7 @@
 .Lb libc
 .Sh SYNOPSIS
 .In semaphore.h
+.In time.h
 .Ft int
 .Fn sem_timedwait "sem_t * restrict sem" "const struct timespec * restrict 
abs_timeout"
 .Ft int
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314423 - head/sys/mips/conf

2017-02-28 Thread Warner Losh
Author: imp
Date: Tue Feb 28 21:39:08 2017
New Revision: 314423
URL: https://svnweb.freebsd.org/changeset/base/314423

Log:
  Fix arge0 mdio bus
  
  This makes arge0 phy's attach.
  
  Submitted by: Michael Vale 
  Pull Request: https://github.com/freebsd/freebsd/pull/16

Modified:
  head/sys/mips/conf/PICOSTATION_M2HP.hints

Modified: head/sys/mips/conf/PICOSTATION_M2HP.hints
==
--- head/sys/mips/conf/PICOSTATION_M2HP.hints   Tue Feb 28 21:39:00 2017
(r314422)
+++ head/sys/mips/conf/PICOSTATION_M2HP.hints   Tue Feb 28 21:39:08 2017
(r314423)
@@ -1,8 +1,8 @@
 # $FreeBSD$
 
-# arge1 MDIO bus
+# arge0 MDIO bus
 hint.argemdio.0.at="nexus0"
-hint.argemdio.0.maddr=0x1a00
+hint.argemdio.0.maddr=0x1900
 hint.argemdio.0.msize=0x1000
 hint.argemdio.0.order=0
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314422 - head/sys/mips/conf

2017-02-28 Thread Warner Losh
Author: imp
Date: Tue Feb 28 21:39:00 2017
New Revision: 314422
URL: https://svnweb.freebsd.org/changeset/base/314422

Log:
  Update PICOSTATION_M2HP
  
  Make the random number generator work so we can do WPA encryption on the AP's.
  
  Submitted by: Michael Vale 
  Pull Request: https://github.com/freebsd/freebsd/pull/16

Modified:
  head/sys/mips/conf/PICOSTATION_M2HP

Modified: head/sys/mips/conf/PICOSTATION_M2HP
==
--- head/sys/mips/conf/PICOSTATION_M2HP Tue Feb 28 21:30:26 2017
(r314421)
+++ head/sys/mips/conf/PICOSTATION_M2HP Tue Feb 28 21:39:00 2017
(r314422)
@@ -68,3 +68,6 @@ devicearswitch
 # Enable GPIO
 device gpio
 device gpioled
+
+# RNG
+devicerandom
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r314373 - in head: . etc/defaults etc/rc.d lib/libc/regex share/man/man4/man4.i386 share/man/man5 sys/amd64/conf sys/boot/forth sys/compat/svr4 sys/conf sys/dev/streams sys/i386/conf s

2017-02-28 Thread Benjamin Kaduk
On Tue, Feb 28, 2017 at 3:30 PM, Gleb Smirnoff  wrote:

> On Tue, Feb 28, 2017 at 01:39:12PM -0600, Benjamin Kaduk wrote:
> B> > I don't think this deserves UPDATING entry, since it doesn't require
> B> > any action from a person who updates from sources.
> B> >
> B> > I don't think this requires __FreeBSD_version bump, since the latter
> B> > is used to assist compilation of open source application that use
> B> > changed API. The change removed support to run binaries.
> B> >
> B>
> B> That is not the only use of __FreeBSD_version, which is (at least)
> exposed
> B> to the ports collection and can cause conditional changes in what are
> B> shipped by ports.
> B> Which is not to say that any current ports ship affected binaries, of
> B> course, but just to point out that the scope of the symbol is broader
> than
> B> stated.
>
> How can I check the __FreeBSD_version in a port Makefile? My understanding
> is that there is no standard way for such thing. Of course I can parse
> /usr/include/sys/param.h...
>
> My understanding is that the constant is for sources only:
>
> https://www.freebsd.org/doc/en/books/porters-handbook/
> porting-versions.html
>
>
Look for OSVERSION in /usr/ports/Mk/bsd.port.mk

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


Re: svn commit: r314373 - in head: . etc/defaults etc/rc.d lib/libc/regex share/man/man4/man4.i386 share/man/man5 sys/amd64/conf sys/boot/forth sys/compat/svr4 sys/conf sys/dev/streams sys/i386/conf s

2017-02-28 Thread Gleb Smirnoff
On Tue, Feb 28, 2017 at 01:39:12PM -0600, Benjamin Kaduk wrote:
B> > I don't think this deserves UPDATING entry, since it doesn't require
B> > any action from a person who updates from sources.
B> >
B> > I don't think this requires __FreeBSD_version bump, since the latter
B> > is used to assist compilation of open source application that use
B> > changed API. The change removed support to run binaries.
B> >
B> 
B> That is not the only use of __FreeBSD_version, which is (at least) exposed
B> to the ports collection and can cause conditional changes in what are
B> shipped by ports.
B> Which is not to say that any current ports ship affected binaries, of
B> course, but just to point out that the scope of the symbol is broader than
B> stated.

How can I check the __FreeBSD_version in a port Makefile? My understanding
is that there is no standard way for such thing. Of course I can parse
/usr/include/sys/param.h...

My understanding is that the constant is for sources only:

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

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


svn commit: r314420 - head/sys/kern

2017-02-28 Thread Scott Long
Author: scottl
Date: Tue Feb 28 21:27:51 2017
New Revision: 314420
URL: https://svnweb.freebsd.org/changeset/base/314420

Log:
  Provide a comment on why stdio.h needs to be included.

Modified:
  head/sys/kern/subr_prf.c

Modified: head/sys/kern/subr_prf.c
==
--- head/sys/kern/subr_prf.cTue Feb 28 21:18:45 2017(r314419)
+++ head/sys/kern/subr_prf.cTue Feb 28 21:27:51 2017(r314420)
@@ -76,6 +76,13 @@ __FBSDID("$FreeBSD$");
 #include 
 #else
 #include 
+#endif
+
+/*
+ * This is needed for sbuf_putbuf() when compiled into userland.  Due to the
+ * shared nature of this file, it's the only place to put it.
+ */
+#ifndef _KERNEL
 #include 
 #endif
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314419 - head/sys/kern

2017-02-28 Thread Jung-uk Kim
Author: jkim
Date: Tue Feb 28 21:18:45 2017
New Revision: 314419
URL: https://svnweb.freebsd.org/changeset/base/314419

Log:
  Include stdio.h to fix libsbuf build.
  
  Reviewed by:  scottl

Modified:
  head/sys/kern/subr_prf.c

Modified: head/sys/kern/subr_prf.c
==
--- head/sys/kern/subr_prf.cTue Feb 28 21:18:23 2017(r314418)
+++ head/sys/kern/subr_prf.cTue Feb 28 21:18:45 2017(r314419)
@@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #else
 #include 
+#include 
 #endif
 
 #ifdef _KERNEL
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314409 - head/usr.bin/dc

2017-02-28 Thread Pedro F. Giffuni
Author: pfg
Date: Tue Feb 28 20:50:49 2017
New Revision: 314409
URL: https://svnweb.freebsd.org/changeset/base/314409

Log:
  dc(1): Introduce e command, equivalent to p, but writes to stderr
  
  Obtained from:OpenBSD
  MFC after:2 weeks

Modified:
  head/usr.bin/dc/bcode.c
  head/usr.bin/dc/dc.1

Modified: head/usr.bin/dc/bcode.c
==
--- head/usr.bin/dc/bcode.c Tue Feb 28 20:34:25 2017(r314408)
+++ head/usr.bin/dc/bcode.c Tue Feb 28 20:50:49 2017(r314409)
@@ -69,6 +69,7 @@ static __inline struct number *pop_numbe
 static __inline char   *pop_string(void);
 static __inline voidclear_stack(void);
 static __inline voidprint_tos(void);
+static void print_err(void);
 static void pop_print(void);
 static void pop_printn(void);
 static __inline voidprint_stack(void);
@@ -198,6 +199,7 @@ static const struct jump_entry jump_tabl
{ 'a',  to_ascii},
{ 'c',  clear_stack },
{ 'd',  dup },
+   { 'e',  print_err   },
{ 'f',  print_stack },
{ 'i',  set_ibase   },
{ 'k',  set_scale   },
@@ -508,6 +510,18 @@ print_tos(void)
 }
 
 static void
+print_err(void)
+{
+   struct value *value = tos();
+   if (value != NULL) {
+   print_value(stderr, value, "", bmachine.obase);
+   (void)putc('\n', stderr);
+   }
+   else
+   warnx("stack empty");
+}
+
+static void
 pop_print(void)
 {
struct value *value = pop();

Modified: head/usr.bin/dc/dc.1
==
--- head/usr.bin/dc/dc.1Tue Feb 28 20:34:25 2017(r314408)
+++ head/usr.bin/dc/dc.1Tue Feb 28 20:50:49 2017(r314409)
@@ -35,7 +35,7 @@
 .\"
 .\"@(#)dc.18.1 (Berkeley) 6/6/93
 .\"
-.Dd April 16, 2014
+.Dd February 27, 2017
 .Dt DC 1
 .Os
 .Sh NAME
@@ -196,6 +196,10 @@ operator is a non-portable extension.
 All values on the stack are popped.
 .It Ic d
 The top value on the stack is duplicated.
+.It Ic e
+Equivalent to
+.Ic p ,
+except that the output is written to the standard error stream.
 .It Ic f
 All values on the stack are printed, separated by newlines.
 .It Ic G
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314410 - head/sys/geom/part

2017-02-28 Thread Mariusz Zaborski
Author: oshogbo
Date: Tue Feb 28 20:51:20 2017
New Revision: 314410
URL: https://svnweb.freebsd.org/changeset/base/314410

Log:
  The kern.geom.part.auto_resize should be tunable.

Modified:
  head/sys/geom/part/g_part.c

Modified: head/sys/geom/part/g_part.c
==
--- head/sys/geom/part/g_part.c Tue Feb 28 20:50:49 2017(r314409)
+++ head/sys/geom/part/g_part.c Tue Feb 28 20:51:20 2017(r314410)
@@ -137,7 +137,7 @@ SYSCTL_UINT(_kern_geom_part, OID_AUTO, c
 "Enable integrity checking");
 static u_int auto_resize = 1;
 SYSCTL_UINT(_kern_geom_part, OID_AUTO, auto_resize,
-CTLFLAG_RW, _resize, 1,
+CTLFLAG_RWTUN, _resize, 1,
 "Enable auto resize");
 
 /*
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314408 - head/include/arpa

2017-02-28 Thread Warner Losh
Author: imp
Date: Tue Feb 28 20:34:25 2017
New Revision: 314408
URL: https://svnweb.freebsd.org/changeset/base/314408

Log:
  Fix include/arpa/nameser_compat.h by adding T_DNAME definition.
  Fixes Apache trafficserver
  
  Submitted by: John J. Rushford 
  Pull Request: https://github.com/freebsd/freebsd/pull/104

Modified:
  head/include/arpa/nameser_compat.h

Modified: head/include/arpa/nameser_compat.h
==
--- head/include/arpa/nameser_compat.h  Tue Feb 28 20:25:45 2017
(r314407)
+++ head/include/arpa/nameser_compat.h  Tue Feb 28 20:34:25 2017
(r314408)
@@ -175,6 +175,7 @@ typedef struct {
 #define T_ATMA ns_t_atma
 #define T_NAPTRns_t_naptr
 #define T_A6   ns_t_a6
+#define T_DNAMEns_t_dname
 #define T_OPT  ns_t_opt
 #defineT_TSIG  ns_t_tsig
 #defineT_IXFR  ns_t_ixfr
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r314404 - head/sys/compat/linux

2017-02-28 Thread Conrad Meyer
On Tue, Feb 28, 2017 at 11:55 AM, Dmitry Chagin  wrote:
> Author: dchagin
> Date: Tue Feb 28 19:55:16 2017
> New Revision: 314404
> URL: https://svnweb.freebsd.org/changeset/base/314404
>
> Log:
>   Linux epoll return EEXIST on case when op is EPOLL_CTL_ADD, and the supplied
>   file descriptor fd is already registered with this epoll instance.

Hi Dmitry,

Do we have an automated test suite for epoll behavior compliance?  If
you have some existing test programs you're using to determine
compatibility, it would be good to adapt those to a test framework and
commit them as well.

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


svn commit: r314407 - in head/sys/dev/usb: . serial

2017-02-28 Thread Warner Losh
Author: imp
Date: Tue Feb 28 20:25:45 2017
New Revision: 314407
URL: https://svnweb.freebsd.org/changeset/base/314407

Log:
  Add support for Vodafone/Huawei K3771.
  See also http://www.draisberghof.de/usb_modeswitch/device_reference.txt
  
  Submitted by: Dean Hamstead 
  Pull Request: https://github.com/freebsd/freebsd/pull/76

Modified:
  head/sys/dev/usb/serial/u3g.c
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/serial/u3g.c
==
--- head/sys/dev/usb/serial/u3g.c   Tue Feb 28 20:07:04 2017
(r314406)
+++ head/sys/dev/usb/serial/u3g.c   Tue Feb 28 20:25:45 2017
(r314407)
@@ -316,6 +316,8 @@ static const STRUCT_USB_HOST_ID u3g_devs
U3G_DEV(HUAWEI, MOBILE, U3GINIT_HUAWEI),
U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEISCSI),
U3G_DEV(HUAWEI, E1820, U3GINIT_HUAWEISCSI),
+   U3G_DEV(HUAWEI, K3771, U3GINIT_HUAWEI),
+   U3G_DEV(HUAWEI, K3771_INIT, U3GINIT_HUAWEISCSI2),
U3G_DEV(HUAWEI, K3772, U3GINIT_HUAWEI),
U3G_DEV(HUAWEI, K3772_INIT, U3GINIT_HUAWEISCSI2),
U3G_DEV(HUAWEI, K3765, U3GINIT_HUAWEI),

Modified: head/sys/dev/usb/usbdevs
==
--- head/sys/dev/usb/usbdevsTue Feb 28 20:07:04 2017(r314406)
+++ head/sys/dev/usb/usbdevsTue Feb 28 20:25:45 2017(r314407)
@@ -2434,7 +2434,9 @@ product HUAWEI E1752  0x1446  3G modem
 product HUAWEI K4505   0x1464  3G modem
 product HUAWEI K3765   0x1465  3G modem
 product HUAWEI E1820   0x14ac  E1820 HSPA+ USB Slider
+product HUAWEI K3771   0x14c4  K3771 Initial
 product HUAWEI K3770   0x14c9  3G modem
+product HUAWEI K3771   0x14ca  K3771
 product HUAWEI K3772   0x14cf  K3772
 product HUAWEI K3770_INIT  0x14d1  K3770 Initial
 product HUAWEI E3131_INIT  0x14fe  3G modem initial
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2017-02-28 Thread Cy Schubert
Cy Schubert writes:
> In message <201702281901.v1sj1xke089...@repo.freebsd.org>, Scott Long 
> writes:
> > Author: scottl
> > Date: Tue Feb 28 19:01:59 2017
> > New Revision: 314399
> > URL: https://svnweb.freebsd.org/changeset/base/314399
> > 
> > Log:
> >   Add prototype for sbuf_putbuf()
> >   
> >   Sponsored by: Netflix
> > 
> > Modified:
> >   head/sys/sys/sbuf.h
> > 
> > Modified: head/sys/sys/sbuf.h
> > ===
> ==
> > =
> > --- head/sys/sys/sbuf.h Tue Feb 28 18:48:12 2017(r314398)
> > +++ head/sys/sys/sbuf.h Tue Feb 28 19:01:59 2017(r314399)
> > @@ -99,6 +99,7 @@ void   sbuf_start_section(struct sbuf *,
> >  ssize_t sbuf_end_section(struct sbuf *, ssize_t, size_t, int);
> >  voidsbuf_hexdump(struct sbuf *, const void *, int, const c
> har *,
> >  int);
> > +voidsbuf_putbuf(struct sbuf *);
> >  
> >  #ifdef _KERNEL
> >  struct uio;
> > 
> > 
> 
> Hi Scott,
> 
> This causes,
> 
> /opt/src/svn-current/lib/libsbuf/../../sys/kern/subr_prf.c:1243:2: error: 
> implicitly declaring library function 'printf' with type 'int (const char 
> *, ...)' [-Werror,-Wimplicit-function-declaration]
> printf("%s", sbuf_data(sb));
> ^
> /opt/src/svn-current/lib/libsbuf/../../sys/kern/subr_prf.c:1243:2: note: 
> include the header  or explicitly provide a declaration for 
> 'printf'
> 1 error generated.
> *** [subr_prf.pico] Error code 1
> 
> make[4]: stopped in /opt/src/svn-current/lib/libsbuf
> 1 error
> 
> 
> ... and the fix...
> 
> Index: sys/kern/subr_prf.c
> ===
> --- sys/kern/subr_prf.c   (revision 314404)
> +++ sys/kern/subr_prf.c   (working copy)
> @@ -60,6 +60,8 @@
>  #include 
>  #include 
>  #include 
> +#else
> +#include 
>  #endif
>  #include 
>  #include 

I picked the wrong one in exmh. This should be for r314397 instead.



-- 
Cheers,
Cy Schubert 
FreeBSD UNIX:     Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.



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


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

2017-02-28 Thread Cy Schubert
In message <201702281901.v1sj1xke089...@repo.freebsd.org>, Scott Long 
writes:
> Author: scottl
> Date: Tue Feb 28 19:01:59 2017
> New Revision: 314399
> URL: https://svnweb.freebsd.org/changeset/base/314399
> 
> Log:
>   Add prototype for sbuf_putbuf()
>   
>   Sponsored by:   Netflix
> 
> Modified:
>   head/sys/sys/sbuf.h
> 
> Modified: head/sys/sys/sbuf.h
> =
> =
> --- head/sys/sys/sbuf.h   Tue Feb 28 18:48:12 2017(r314398)
> +++ head/sys/sys/sbuf.h   Tue Feb 28 19:01:59 2017(r314399)
> @@ -99,6 +99,7 @@ void sbuf_start_section(struct sbuf *,
>  ssize_t   sbuf_end_section(struct sbuf *, ssize_t, size_t, int);
>  void  sbuf_hexdump(struct sbuf *, const void *, int, const char *,
>int);
> +void  sbuf_putbuf(struct sbuf *);
>  
>  #ifdef _KERNEL
>  struct uio;
> 
> 

Hi Scott,

This causes,

/opt/src/svn-current/lib/libsbuf/../../sys/kern/subr_prf.c:1243:2: error: 
implicitly declaring library function 'printf' with type 'int (const char 
*, ...)' [-Werror,-Wimplicit-function-declaration]
printf("%s", sbuf_data(sb));
^
/opt/src/svn-current/lib/libsbuf/../../sys/kern/subr_prf.c:1243:2: note: 
include the header  or explicitly provide a declaration for 
'printf'
1 error generated.
*** [subr_prf.pico] Error code 1

make[4]: stopped in /opt/src/svn-current/lib/libsbuf
1 error


... and the fix...

Index: sys/kern/subr_prf.c
===
--- sys/kern/subr_prf.c (revision 314404)
+++ sys/kern/subr_prf.c (working copy)
@@ -60,6 +60,8 @@
 #include 
 #include 
 #include 
+#else
+#include 
 #endif
 #include 
 #include 


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX:     Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


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


svn commit: r314404 - head/sys/compat/linux

2017-02-28 Thread Dmitry Chagin
Author: dchagin
Date: Tue Feb 28 19:55:16 2017
New Revision: 314404
URL: https://svnweb.freebsd.org/changeset/base/314404

Log:
  Linux epoll return EEXIST on case when op is EPOLL_CTL_ADD, and the supplied
  file descriptor fd is already registered with this epoll instance.
  
  MFC after:1 month

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

Modified: head/sys/compat/linux/linux_event.c
==
--- head/sys/compat/linux/linux_event.c Tue Feb 28 19:54:22 2017
(r314403)
+++ head/sys/compat/linux/linux_event.c Tue Feb 28 19:55:16 2017
(r314404)
@@ -481,15 +481,34 @@ linux_epoll_ctl(struct thread *td, struc
 
ciargs.changelist = kev;
 
+   if (args->op != LINUX_EPOLL_CTL_DEL) {
+   kev_flags = EV_ADD | EV_ENABLE;
+   error = epoll_to_kevent(td, epfp, args->fd, ,
+   _flags, kev, );
+   if (error != 0)
+   goto leave0;
+   }
+
switch (args->op) {
case LINUX_EPOLL_CTL_MOD:
error = epoll_delete_all_events(td, epfp, args->fd);
if (error != 0)
goto leave0;
-   /* FALLTHROUGH */
+   break;
 
case LINUX_EPOLL_CTL_ADD:
-   kev_flags = EV_ADD | EV_ENABLE;
+   /*
+* kqueue_register() return ENOENT if event does not exists
+* and the EV_ADD flag is not set.
+*/
+   kev[0].flags &= ~EV_ADD;
+   error = kqfd_register(args->epfd, [0], td, 1);
+   if (error != ENOENT) {
+   error = EEXIST;
+   goto leave0;
+   }
+   error = 0;
+   kev[0].flags |= EV_ADD;
break;
 
case LINUX_EPOLL_CTL_DEL:
@@ -502,11 +521,6 @@ linux_epoll_ctl(struct thread *td, struc
goto leave0;
}
 
-   error = epoll_to_kevent(td, epfp, args->fd, , _flags,
-   kev, );
-   if (error != 0)
-   goto leave0;
-
epoll_fd_install(td, args->fd, le.data);
 
error = kern_kevent_fp(td, epfp, nchanges, 0, _ops, NULL);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314403 - head/sys/compat/linux

2017-02-28 Thread Dmitry Chagin
Author: dchagin
Date: Tue Feb 28 19:54:22 2017
New Revision: 314403
URL: https://svnweb.freebsd.org/changeset/base/314403

Log:
  Linux epoll return ENOENT error in case when op is EPOLL_CTL_MOD or
  EPOLL_CTL_DEL, and fd is not registered with this epoll instance.
  
  MFC after:1 month

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

Modified: head/sys/compat/linux/linux_event.c
==
--- head/sys/compat/linux/linux_event.c Tue Feb 28 19:49:21 2017
(r314402)
+++ head/sys/compat/linux/linux_event.c Tue Feb 28 19:54:22 2017
(r314403)
@@ -483,11 +483,6 @@ linux_epoll_ctl(struct thread *td, struc
 
switch (args->op) {
case LINUX_EPOLL_CTL_MOD:
-   /*
-* We don't memorize which events were set for this FD
-* on this level, so just delete all we could have set:
-* EVFILT_READ and EVFILT_WRITE, ignoring any errors
-*/
error = epoll_delete_all_events(td, epfp, args->fd);
if (error != 0)
goto leave0;
@@ -644,19 +639,11 @@ epoll_delete_event(struct thread *td, st
struct kevent_copyops k_ops = { ,
NULL,
epoll_kev_copyin};
-   int error;
 
ciargs.changelist = 
EV_SET(, fd, filter, EV_DELETE | EV_DISABLE, 0, 0, 0);
 
-   error = kern_kevent_fp(td, epfp, 1, 0, _ops, NULL);
-
-   /*
-* here we ignore ENONT, because we don't keep track of events here
-*/
-   if (error == ENOENT)
-   error = 0;
-   return (error);
+   return (kern_kevent_fp(td, epfp, 1, 0, _ops, NULL));
 }
 
 static int
@@ -667,8 +654,8 @@ epoll_delete_all_events(struct thread *t
error1 = epoll_delete_event(td, epfp, fd, EVFILT_READ);
error2 = epoll_delete_event(td, epfp, fd, EVFILT_WRITE);
 
-   /* report any errors we got */
-   return (error1 == 0 ? error2 : error1);
+   /* return 0 if at least one result positive */
+   return (error1 == 0 ? 0 : error2);
 }
 
 static int
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314402 - head/sys/compat/linux

2017-02-28 Thread Dmitry Chagin
Author: dchagin
Date: Tue Feb 28 19:49:21 2017
New Revision: 314402
URL: https://svnweb.freebsd.org/changeset/base/314402

Log:
  FreeBSD does not have analgue for epill EPOLLPRI event type.
  So, do not set EPOLLPRI event acidently.
  Also, do not set EPOLLWRNORM and EPOLLRDNORM events as epoll
  do not set this events.
  
  MFC after:1 month

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

Modified: head/sys/compat/linux/linux_event.c
==
--- head/sys/compat/linux/linux_event.c Tue Feb 28 19:32:45 2017
(r314401)
+++ head/sys/compat/linux/linux_event.c Tue Feb 28 19:49:21 2017
(r314402)
@@ -357,14 +357,15 @@ kevent_to_epoll(struct kevent *kevent, s
return;
}
 
+   /* XXX EPOLLPRI, EPOLLHUP */
switch (kevent->filter) {
case EVFILT_READ:
-   l_event->events = 
LINUX_EPOLLIN|LINUX_EPOLLRDNORM|LINUX_EPOLLPRI;
+   l_event->events = LINUX_EPOLLIN;
if ((kevent->flags & EV_EOF) != 0)
l_event->events |= LINUX_EPOLLRDHUP;
break;
case EVFILT_WRITE:
-   l_event->events = LINUX_EPOLLOUT|LINUX_EPOLLWRNORM;
+   l_event->events = LINUX_EPOLLOUT;
break;
}
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r314373 - in head: . etc/defaults etc/rc.d lib/libc/regex share/man/man4/man4.i386 share/man/man5 sys/amd64/conf sys/boot/forth sys/compat/svr4 sys/conf sys/dev/streams sys/i386/conf s

2017-02-28 Thread Benjamin Kaduk
On Tue, Feb 28, 2017 at 1:36 PM, Gleb Smirnoff  wrote:

>   Ravi,
>
>   this should go into Relnotes, my failure that I didn't put the tag.
>
> I don't think this deserves UPDATING entry, since it doesn't require
> any action from a person who updates from sources.
>
> I don't think this requires __FreeBSD_version bump, since the latter
> is used to assist compilation of open source application that use
> changed API. The change removed support to run binaries.
>

That is not the only use of __FreeBSD_version, which is (at least) exposed
to the ports collection and can cause conditional changes in what are
shipped by ports.
Which is not to say that any current ports ship affected binaries, of
course, but just to point out that the scope of the symbol is broader than
stated.

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


Re: svn commit: r314373 - in head: . etc/defaults etc/rc.d lib/libc/regex share/man/man4/man4.i386 share/man/man5 sys/amd64/conf sys/boot/forth sys/compat/svr4 sys/conf sys/dev/streams sys/i386/conf s

2017-02-28 Thread Gleb Smirnoff
  Ravi,

  this should go into Relnotes, my failure that I didn't put the tag.

I don't think this deserves UPDATING entry, since it doesn't require
any action from a person who updates from sources.

I don't think this requires __FreeBSD_version bump, since the latter
is used to assist compilation of open source application that use
changed API. The change removed support to run binaries.

On Tue, Feb 28, 2017 at 10:57:57AM -0800, Ravi Pokala wrote:
R> Shouldn't this also get an UPDATING entry, and/or a bump in 
__FreeBSD_version?
R> 
R> -Ravi (rpokala@)
R> 
R> -Original Message-
R> > From:  on behalf of John Baldwin 

R> > Date: 2017-02-28, Tuesday at 09:47
R> > To: Gleb Smirnoff 
R> > Cc: , , 

R> > Subject: Re: svn commit: r314373 - in head: . etc/defaults etc/rc.d 
lib/libc/regex share/man/man4/man4.i386 share/man/man5 sys/amd64/conf 
sys/boot/forth sys/compat/svr4 sys/conf sys/dev/streams sys/i386/conf sy...
R> > 
R> > On Tuesday, February 28, 2017 05:14:43 AM Gleb Smirnoff wrote:
R> >> Author: glebius
R> >> Date: Tue Feb 28 05:14:42 2017
R> >> New Revision: 314373
R> >> URL: https://svnweb.freebsd.org/changeset/base/314373
R> >> 
R> >> Log:
R> >>   Remove SVR4 (System V Release 4) binary compatibility support.
R> >>   
R> >>   UNIX System V Release 4 is operating system released in 1988. It ceased
R> >>   to exist in early 2000-s.
R> > 
R> > Thanks.  Is there any socket code we kept just for streams support that
R> > we can now remove as well?
R> > 
R> > Also: 'Relnotes: yes'
R> > 
R> > -- 
R> > John Baldwin
R> 
R> 
R> 

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


svn commit: r314401 - head

2017-02-28 Thread John Baldwin
Author: jhb
Date: Tue Feb 28 19:32:45 2017
New Revision: 314401
URL: https://svnweb.freebsd.org/changeset/base/314401

Log:
  Don't remove ofwdump.8 on FreeBSD/mips.
  
  FreeBSD/mips has installed ofwdump by default since r288232.
  
  Sponsored by: DARPA / AFRL

Modified:
  head/ObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Tue Feb 28 19:27:41 2017(r314400)
+++ head/ObsoleteFiles.inc  Tue Feb 28 19:32:45 2017(r314401)
@@ -8346,7 +8346,7 @@ OLD_FILES+=usr/share/man/man8/boot_i386.
 .endif
 .if ${TARGET_ARCH} != "aarch64" && ${TARGET} != "arm" && \
 ${TARGET_ARCH} != "powerpc" && ${TARGET_ARCH} != "powerpc64" && \
-${TARGET_ARCH} != "sparc64"
+${TARGET_ARCH} != "sparc64" && ${TARGET} != "mips"
 OLD_FILES+=usr/share/man/man8/ofwdump.8.gz
 .endif
 OLD_FILES+=usr/share/man/man8/mount_reiserfs.8.gz
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314400 - in head/sys: dev/cxgbe/iw_cxgbe ofed/drivers/infiniband/core

2017-02-28 Thread Navdeep Parhar
Author: np
Date: Tue Feb 28 19:27:41 2017
New Revision: 314400
URL: https://svnweb.freebsd.org/changeset/base/314400

Log:
  cxgbe/iw_cxgbe: fix various double-close panics with iWARP sockets.
  
  Sockets representing the TCP endpoints for iWARP connections are
  allocated by the ibcore module.  Before this revision they were closed
  either by the ibcore module or the iw_cxgbe hardware driver depending on
  the state transitions during connection teardown.  This is error prone
  and there were cases where both iw_cxgbe and ibcore closed the socket
  leading to double-free panics.  The fix is to let ibcore close the
  sockets it creates and never do it in the driver.
  
  - Use sodisconnect instead of soclose (preceded by solinger = 0) in the
driver to tear down an RDMA connection abruptly.  This does what's
intended without releasing the socket's fd reference.
  
  - Close the socket in ibcore when the iWARP iw_cm_id is destroyed.  This
works for all kinds of sockets: clients that initiate connections,
listeners, and sockets accepted off of listeners.
  
  Reviewed by:  Steve Wise @ Open Grid Computing, hselasky@
  MFC after:3 days
  Sponsored by: Chelsio Communications
  Differential Revision:https://reviews.freebsd.org/D9796

Modified:
  head/sys/dev/cxgbe/iw_cxgbe/cm.c
  head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h
  head/sys/ofed/drivers/infiniband/core/cma.c
  head/sys/ofed/drivers/infiniband/core/iwcm.c

Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c
==
--- head/sys/dev/cxgbe/iw_cxgbe/cm.cTue Feb 28 19:01:59 2017
(r314399)
+++ head/sys/dev/cxgbe/iw_cxgbe/cm.cTue Feb 28 19:27:41 2017
(r314400)
@@ -92,9 +92,7 @@ static void *alloc_ep(int size, gfp_t fl
 void __free_ep(struct c4iw_ep_common *epc);
 static int find_route(__be32 local_ip, __be32 peer_ip, __be16 local_port,
__be16 peer_port, u8 tos, struct nhop4_extended *pnh4);
-static int close_socket(struct c4iw_ep_common *epc, int close);
-static int shutdown_socket(struct c4iw_ep_common *epc);
-static void abort_socket(struct c4iw_ep *ep);
+static void close_socket(struct socket *so);
 static int send_mpa_req(struct c4iw_ep *ep);
 static int send_mpa_reject(struct c4iw_ep *ep, const void *pdata, u8 plen);
 static int send_mpa_reply(struct c4iw_ep *ep, const void *pdata, u8 plen);
@@ -111,7 +109,8 @@ static void process_peer_close(struct c4
 static void process_conn_error(struct c4iw_ep *ep);
 static void process_close_complete(struct c4iw_ep *ep);
 static void ep_timeout(unsigned long arg);
-static void init_sock(struct c4iw_ep_common *epc);
+static void init_iwarp_socket(struct socket *so, void *arg);
+static void uninit_iwarp_socket(struct socket *so);
 static void process_data(struct c4iw_ep *ep);
 static void process_connected(struct c4iw_ep *ep);
 static int c4iw_so_upcall(struct socket *so, void *arg, int waitflag);
@@ -319,87 +318,12 @@ find_route(__be32 local_ip, __be32 peer_
return err;
 }
 
-static int
-close_socket(struct c4iw_ep_common *epc, int close)
-{
-   struct socket *so = epc->so;
-   int rc;
-
-   CTR5(KTR_IW_CXGBE, "%s:csoB so %p, ep %p, state %s, tid %d", __func__,
-   so, epc, states[epc->state],
-   ((struct c4iw_ep *)epc)->hwtid);
-   mutex_lock(>so_mutex);
-   if ((so == NULL) || (so->so_count == 0)) {
-   mutex_unlock(>so_mutex);
-   CTR5(KTR_IW_CXGBE, "%s:cso1 so %p, ep %p, state %s, tid %d",
-   __func__, so, epc, states[epc->state],
-   ((struct c4iw_ep *)epc)->hwtid);
-   return -EINVAL;
-   }
-
-   SOCK_LOCK(so);
-   soupcall_clear(so, SO_RCV);
-   SOCK_UNLOCK(so);
-
-   if (close)
-rc = soclose(so);
-else
-rc = soshutdown(so, SHUT_WR | SHUT_RD);
-   epc->so = NULL;
-
-   mutex_unlock(>so_mutex);
-   return (rc);
-}
-
-static int
-shutdown_socket(struct c4iw_ep_common *epc)
-{
-
-   struct socket *so = epc->so;
-   int rc;
-
-   CTR5(KTR_IW_CXGBE, "%s:ssoB so %p, ep %p, state %s, tid %d", __func__,
-   epc->so, epc, states[epc->state],
-   ((struct c4iw_ep *)epc)->hwtid);
-   mutex_lock(>so_mutex);
-   if ((so == NULL) || (so->so_count == 0)) {
-   mutex_unlock(>so_mutex);
-   CTR5(KTR_IW_CXGBE, "%s:sso1 so %p, ep %p, state %s, tid %d",
-   __func__, epc->so, epc, states[epc->state],
-   ((struct c4iw_ep *)epc)->hwtid);
-   return -EINVAL;
-   }
-   rc = soshutdown(so, SHUT_WR);
-   mutex_unlock(>so_mutex);
-   return rc;
-}
-
 static void
-abort_socket(struct c4iw_ep *ep)
+close_socket(struct socket *so)
 {
-   struct sockopt sopt;
-   int rc;
-   struct linger l;
-
-   CTR5(KTR_IW_CXGBE, "%s 

Re: svn commit: r314373 - in head: . etc/defaults etc/rc.d lib/libc/regex share/man/man4/man4.i386 share/man/man5 sys/amd64/conf sys/boot/forth sys/compat/svr4 sys/conf sys/dev/streams sys/i386/conf s

2017-02-28 Thread Gleb Smirnoff
On Tue, Feb 28, 2017 at 09:47:32AM -0800, John Baldwin wrote:
J> On Tuesday, February 28, 2017 05:14:43 AM Gleb Smirnoff wrote:
J> > Author: glebius
J> > Date: Tue Feb 28 05:14:42 2017
J> > New Revision: 314373
J> > URL: https://svnweb.freebsd.org/changeset/base/314373
J> > 
J> > Log:
J> >   Remove SVR4 (System V Release 4) binary compatibility support.
J> >   
J> >   UNIX System V Release 4 is operating system released in 1988. It ceased
J> >   to exist in early 2000-s.
J> 
J> Thanks.  Is there any socket code we kept just for streams support that
J> we can now remove as well?

I didn't notice any.

Somewhat unrelated: there is COMPAT_OLDSOCK, which I'd be happy to remove
as well. The rationale is the same: there are huge concerns that the code
actually works, and wasn't broken during decades.

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


svn commit: r314399 - head/sys/sys

2017-02-28 Thread Scott Long
Author: scottl
Date: Tue Feb 28 19:01:59 2017
New Revision: 314399
URL: https://svnweb.freebsd.org/changeset/base/314399

Log:
  Add prototype for sbuf_putbuf()
  
  Sponsored by: Netflix

Modified:
  head/sys/sys/sbuf.h

Modified: head/sys/sys/sbuf.h
==
--- head/sys/sys/sbuf.h Tue Feb 28 18:48:12 2017(r314398)
+++ head/sys/sys/sbuf.h Tue Feb 28 19:01:59 2017(r314399)
@@ -99,6 +99,7 @@ void   sbuf_start_section(struct sbuf *,
 ssize_t sbuf_end_section(struct sbuf *, ssize_t, size_t, int);
 voidsbuf_hexdump(struct sbuf *, const void *, int, const char *,
 int);
+voidsbuf_putbuf(struct sbuf *);
 
 #ifdef _KERNEL
 struct uio;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r314373 - in head: . etc/defaults etc/rc.d lib/libc/regex share/man/man4/man4.i386 share/man/man5 sys/amd64/conf sys/boot/forth sys/compat/svr4 sys/conf sys/dev/streams sys/i386/conf s

2017-02-28 Thread Ravi Pokala
Shouldn't this also get an UPDATING entry, and/or a bump in __FreeBSD_version?

-Ravi (rpokala@)

-Original Message-
> From:  on behalf of John Baldwin 
> 
> Date: 2017-02-28, Tuesday at 09:47
> To: Gleb Smirnoff 
> Cc: , , 
> 
> Subject: Re: svn commit: r314373 - in head: . etc/defaults etc/rc.d 
> lib/libc/regex share/man/man4/man4.i386 share/man/man5 sys/amd64/conf 
> sys/boot/forth sys/compat/svr4 sys/conf sys/dev/streams sys/i386/conf sy...
> 
> On Tuesday, February 28, 2017 05:14:43 AM Gleb Smirnoff wrote:
>> Author: glebius
>> Date: Tue Feb 28 05:14:42 2017
>> New Revision: 314373
>> URL: https://svnweb.freebsd.org/changeset/base/314373
>> 
>> Log:
>>   Remove SVR4 (System V Release 4) binary compatibility support.
>>   
>>   UNIX System V Release 4 is operating system released in 1988. It ceased
>>   to exist in early 2000-s.
> 
> Thanks.  Is there any socket code we kept just for streams support that
> we can now remove as well?
> 
> Also: 'Relnotes: yes'
> 
> -- 
> John Baldwin



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


svn commit: r314398 - in head/sys/x86: include x86

2017-02-28 Thread Andriy Gapon
Author: avg
Date: Tue Feb 28 18:48:12 2017
New Revision: 314398
URL: https://svnweb.freebsd.org/changeset/base/314398

Log:
  Local APIC: add support for extended LVT entries found in AMD processors
  
  The extended LVT entries can be used to configure interrupt delivery
  for various events that are internal to a processor and can use this
  feature.
  
  All current processors that support the feature have four of such entries.
  The entries are all masked upon the processor reset, but it's possible
  that firmware may use some of them.
  
  BIOS and Kernel Developer's Guides for some processor models do not assign
  any particular names to the extended LVTs, while other BKDGs provide names
  and suggested usage for them.
  However, there is no fixed mapping between the LVTs and the processor
  events in any processor model that supports the feature.  Any entry can be
  assigned to any event.  The assignment is done by programming an offset
  of an entry into configuration bits corresponding to an event.
  
  This change does not expose the flexibility that the feature offers.
  The change adds just a single method to configure a hardcoded extended LVT
  entry to deliver APIC_CMC_INT.  The method is designed to be used with
  Machine Check Error Thresholding mechanism on supported processor models.
  
  For references please see BKDGs for families 10h - 16h and specifically
  descriptions of APIC30, APIC400, APIC[530:500] registers.
  For a description of the Error Thresholding mechanism see, for example,
  BKDG for family 10h, section 2.12.1.6.
  http://developer.amd.com/resources/developer-guides-manuals/
  
  Thanks to jhb and kib for their suggestions.
  
  Reviewed by:  kib
  Discussed with:   jhb
  MFC after:5 weeks
  Relnotes: maybe
  Differential Revision: https://reviews.freebsd.org/D9612

Modified:
  head/sys/x86/include/apicreg.h
  head/sys/x86/include/apicvar.h
  head/sys/x86/x86/local_apic.c

Modified: head/sys/x86/include/apicreg.h
==
--- head/sys/x86/include/apicreg.h  Tue Feb 28 18:25:06 2017
(r314397)
+++ head/sys/x86/include/apicreg.h  Tue Feb 28 18:48:12 2017
(r314398)
@@ -241,17 +241,32 @@ enum LAPIC_REGISTERS {
LAPIC_CCR_TIMER = 0x39,
LAPIC_DCR_TIMER = 0x3e,
LAPIC_SELF_IPI  = 0x3f, /* Only in x2APIC */
+   LAPIC_EXT_FEATURES = 0x40, /* AMD */
+   LAPIC_EXT_CTRL  = 0x41, /* AMD */
+   LAPIC_EXT_SEOI  = 0x42, /* AMD */
+   LAPIC_EXT_IER0  = 0x48, /* AMD */
+   LAPIC_EXT_IER1  = 0x49, /* AMD */
+   LAPIC_EXT_IER2  = 0x4a, /* AMD */
+   LAPIC_EXT_IER3  = 0x4b, /* AMD */
+   LAPIC_EXT_IER4  = 0x4c, /* AMD */
+   LAPIC_EXT_IER5  = 0x4d, /* AMD */
+   LAPIC_EXT_IER6  = 0x4e, /* AMD */
+   LAPIC_EXT_IER7  = 0x4f, /* AMD */
+   LAPIC_EXT_LVT0  = 0x50, /* AMD */
+   LAPIC_EXT_LVT1  = 0x51, /* AMD */
+   LAPIC_EXT_LVT2  = 0x52, /* AMD */
+   LAPIC_EXT_LVT3  = 0x53, /* AMD */
 };
 
+#defineLAPIC_MEM_MUL   0x10
+
 /*
- * The LAPIC_SELF_IPI register only exists in x2APIC mode.  The
- * formula below is applicable only to reserve the memory region,
- * i.e. for xAPIC mode, where LAPIC_SELF_IPI finely serves as the
- * address past end of the region.
+ * Although some registers are available on AMD processors only,
+ * it's not a big waste to reserve them on all platforms.
+ * However, we need to watch out for this space being assigned for
+ * non-APIC purposes in the future processor models.
  */
-#defineLAPIC_MEM_REGION (LAPIC_SELF_IPI * 0x10)
-
-#defineLAPIC_MEM_MUL   0x10
+#defineLAPIC_MEM_REGION ((LAPIC_EXT_LVT3 + 1) * LAPIC_MEM_MUL)
 
 /**
  * I/O APIC structure
@@ -295,6 +310,7 @@ typedef struct IOAPIC ioapic_t;
 #define APIC_VER_MAXLVT0x00ff
 #define MAXLVTSHIFT16
 #define APIC_VER_EOI_SUPPRESSION 0x0100
+#define APIC_VER_AMD_EXT_SPACE 0x8000
 
 /* fields in LDR */
 #defineAPIC_LDR_RESERVED   0x00ff
@@ -418,6 +434,13 @@ typedef struct IOAPIC ioapic_t;
 #define APIC_TDCR_128  0x0a
 #define APIC_TDCR_10x0b
 
+/* Constants related to AMD Extended APIC Features Register */
+#defineAPIC_EXTF_ELVT_MASK 0x00ff
+#defineAPIC_EXTF_ELVT_SHIFT16
+#defineAPIC_EXTF_EXTID_CAP 0x0004
+#defineAPIC_EXTF_SEIO_CAP  0x0002
+#defineAPIC_EXTF_IER_CAP   0x0001
+
 /* LVT table indices */
 #defineAPIC_LVT_LINT0  0
 #defineAPIC_LVT_LINT1  1
@@ -428,6 +451,13 @@ typedef struct IOAPIC ioapic_t;
 #defineAPIC_LVT_CMCI   6
 #defineAPIC_LVT_MAXAPIC_LVT_CMCI
 
+/* AMD extended LVT constants, seem to be assigned by fiat */
+#defineAPIC_ELVT_IBS   0 /* Instruction based sampling */
+#define  

svn commit: r314397 - in head: share/man/man9 sys/kern

2017-02-28 Thread Scott Long
Author: scottl
Date: Tue Feb 28 18:25:06 2017
New Revision: 314397
URL: https://svnweb.freebsd.org/changeset/base/314397

Log:
  Implement sbuf_prf(), which takes an sbuf and outputs it
  to stdout in the non-kernel case and to the console+log
  in the kernel case.  For the kernel case it hooks the
  putbuf() machinery underneath printf(9) so that the buffer
  is written completely atomically and without a copy into
  another temporary buffer.  This is useful for fixing
  compound console/log messages that become broken and
  interleaved when multiple threads are competing for the
  console.
  
  Reviewed by:  ken, imp
  Sponsored by: Netflix

Modified:
  head/share/man/man9/sbuf.9
  head/sys/kern/subr_prf.c

Modified: head/share/man/man9/sbuf.9
==
--- head/share/man/man9/sbuf.9  Tue Feb 28 18:10:03 2017(r314396)
+++ head/share/man/man9/sbuf.9  Tue Feb 28 18:25:06 2017(r314397)
@@ -57,7 +57,8 @@
 .Nm sbuf_delete ,
 .Nm sbuf_start_section ,
 .Nm sbuf_end_section ,
-.Nm sbuf_hexdump
+.Nm sbuf_hexdump ,
+.Nm sbuf_putbuf
 .Nd safe string composition
 .Sh SYNOPSIS
 .In sys/types.h
@@ -124,6 +125,8 @@
 .Fa "const char *hdr"
 .Fa "int flags"
 .Fc
+.Ft void
+.Fn sbuf_putbuf "struct sbuf *s"
 .In sys/sysctl.h
 .Ft struct sbuf *
 .Fn sbuf_new_for_sysctl "struct sbuf *s" "char *buf" "int length" "struct 
sysctl_req *req"
@@ -472,6 +475,12 @@ representation of the bytes if possible.
 See the
 .Xr hexdump 3
 man page for more details on the interface.
+.Pp
+The
+.Fn sbuf_putbuf
+function printfs the sbuf to stdout if in userland, and to the console
+and log if in the kernel.
+It does not drain the buffer or update any pointers.
 .Sh NOTES
 If an operation caused an
 .Fa sbuf

Modified: head/sys/kern/subr_prf.c
==
--- head/sys/kern/subr_prf.cTue Feb 28 18:10:03 2017(r314396)
+++ head/sys/kern/subr_prf.cTue Feb 28 18:25:06 2017(r314397)
@@ -411,6 +411,23 @@ vprintf(const char *fmt, va_list ap)
 }
 
 static void
+prf_putbuf(char *bufr, int flags, int pri)
+{
+
+   if (flags & TOLOG)
+   msglogstr(bufr, pri, /*filter_cr*/1);
+
+   if (flags & TOCONS) {
+   if ((panicstr == NULL) && (constty != NULL))
+   msgbuf_addstr(, -1,
+   bufr, /*filter_cr*/ 0);
+
+   if ((constty == NULL) ||(always_console_output))
+   cnputs(bufr);
+   }
+}
+
+static void
 putbuf(int c, struct putchar_arg *ap)
 {
/* Check if no console output buffer was provided. */
@@ -431,18 +448,7 @@ putbuf(int c, struct putchar_arg *ap)
 
/* Check if the buffer needs to be flushed. */
if (ap->remain == 2 || c == '\n') {
-
-   if (ap->flags & TOLOG)
-   msglogstr(ap->p_bufr, ap->pri, /*filter_cr*/1);
-
-   if (ap->flags & TOCONS) {
-   if ((panicstr == NULL) && (constty != NULL))
-   msgbuf_addstr(, -1,
-   ap->p_bufr, /*filter_cr*/ 0);
-
-   if ((constty == NULL) ||(always_console_output))
-   cnputs(ap->p_bufr);
-   }
+   prf_putbuf(ap->p_bufr, ap->flags, ap->pri);
 
ap->p_next = ap->p_bufr;
ap->remain = ap->n_bufr;
@@ -1221,3 +1227,19 @@ counted_warning(unsigned *counter, const
}
 }
 #endif
+
+#ifdef _KERNEL
+void
+sbuf_putbuf(struct sbuf *sb)
+{
+
+   prf_putbuf(sbuf_data(sb), TOLOG | TOCONS, -1);
+}
+#else
+void
+sbuf_putbuf(struct sbuf *sb)
+{
+
+   printf("%s", sbuf_data(sb));
+}
+#endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r314373 - in head: . etc/defaults etc/rc.d lib/libc/regex share/man/man4/man4.i386 share/man/man5 sys/amd64/conf sys/boot/forth sys/compat/svr4 sys/conf sys/dev/streams sys/i386/conf s

2017-02-28 Thread John Baldwin
On Tuesday, February 28, 2017 05:14:43 AM Gleb Smirnoff wrote:
> Author: glebius
> Date: Tue Feb 28 05:14:42 2017
> New Revision: 314373
> URL: https://svnweb.freebsd.org/changeset/base/314373
> 
> Log:
>   Remove SVR4 (System V Release 4) binary compatibility support.
>   
>   UNIX System V Release 4 is operating system released in 1988. It ceased
>   to exist in early 2000-s.

Thanks.  Is there any socket code we kept just for streams support that
we can now remove as well?

Also: 'Relnotes: yes'

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


svn commit: r314396 - head/lib/libfetch

2017-02-28 Thread Bjoern A. Zeeb
Author: bz
Date: Tue Feb 28 18:10:03 2017
New Revision: 314396
URL: https://svnweb.freebsd.org/changeset/base/314396

Log:
  Properly indent a default: label and avoid crashing when running
  under -v but cannot connect due to trying to print an int as %s [1].
  
  Reported by:  andrew [1]
  MFC after:3 days

Modified:
  head/lib/libfetch/common.c

Modified: head/lib/libfetch/common.c
==
--- head/lib/libfetch/common.c  Tue Feb 28 16:20:33 2017(r314395)
+++ head/lib/libfetch/common.c  Tue Feb 28 18:10:03 2017(r314396)
@@ -153,7 +153,7 @@ fetch_syserr(void)
case EHOSTDOWN:
fetchLastErrCode = FETCH_DOWN;
break;
-default:
+   default:
fetchLastErrCode = FETCH_UNKNOWN;
}
snprintf(fetchLastErrString, MAXERRSTRING, "%s", strerror(errno));
@@ -371,7 +371,7 @@ fetch_connect(const char *host, int port
}
if (err != 0) {
if (verbose)
-   fetch_info("failed to connect to %s:%s", host, port);
+   fetch_info("failed to connect to %s:%d", host, port);
goto syserr;
}
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r308996 - head/lib/libfetch

2017-02-28 Thread Bjoern A. Zeeb

On 22 Nov 2016, at 13:30, Dag-Erling Smørgrav wrote:


Author: des
Date: Tue Nov 22 13:30:07 2016
New Revision: 308996
URL: https://svnweb.freebsd.org/changeset/base/308996

Log:
  Refactor fetch_connect() and fetch_bind() to improve readability and 
avoid

  repeating the same DNS lookups.

  MFC after:3 weeks

Modified:
  head/lib/libfetch/common.c
  head/lib/libfetch/common.h
  head/lib/libfetch/ftp.c

Modified: head/lib/libfetch/common.c
==
--- head/lib/libfetch/common.c  Tue Nov 22 13:24:57 2016(r308995)
+++ head/lib/libfetch/common.c  Tue Nov 22 13:30:07 2016(r308996)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1998-2014 Dag-Erling Smørgrav
+ * Copyright (c) 1998-2016 Dag-Erling Smørgrav
  * Copyright (c) 2013 Michael Gmelin 
  * All rights reserved.
  *
@@ -241,27 +241,83 @@ fetch_ref(conn_t *conn)


 /*
+ * Resolve an address
+ */
+struct addrinfo *
+fetch_resolve(const char *addr, int port, int af)
+{
+   char hbuf[256], sbuf[8];
+   struct addrinfo hints, *res;
+   const char *sep, *host, *service;
+   int err, len;
+
+   /* split address if necessary */
+   err = EAI_SYSTEM;
+   if ((sep = strchr(addr, ':')) != NULL) {
+   len = snprintf(hbuf, sizeof(hbuf),
+   "%.*s", (int)(sep - addr), addr);
+   if (len < 0)
+   return (NULL);
+   if (len >= (int)sizeof(hbuf)) {
+   errno = ENAMETOOLONG;
+   fetch_syserr();
+   return (NULL);
+   }
+   host = hbuf;
+   service = sep + 1;



I believe this code is what broke
fetch http://[::1]:/
just to give an example;  and the printf traces will not reveal this but 
“addr” at this point has no more addr:port in it given the function 
arguments, right?




+   } else if (port != 0) {
+   if (port < 1 || port > 65535) {
+   errno = EINVAL;
+   fetch_syserr();
+   return (NULL);
+   }
+   if (snprintf(sbuf, sizeof(sbuf), "%d", port) < 0) {
+   fetch_syserr();
+   return (NULL);
+   }
+   host = addr;
+   service = sbuf;
+   } else {
+   host = addr;
+   service = NULL;
+   }
+
+   /* resolve */
+   fetch_info("resolving host = %s service = %s af = %d",
+   host, service, af);
+   memset(, 0, sizeof(hints));
+   hints.ai_family = af;
+   hints.ai_socktype = SOCK_STREAM;
+   hints.ai_flags = AI_ADDRCONFIG;
+   if ((err = getaddrinfo(host, service, , )) != 0) {
+   netdb_seterr(err);
+   fetch_info("getaddrinfo() failed: %s", gai_strerror(err));
+   return (NULL);
+   }

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

svn commit: r314395 - in head/sys: arm/altera/socfpga arm/conf conf

2017-02-28 Thread Ruslan Bukin
Author: br
Date: Tue Feb 28 16:20:33 2017
New Revision: 314395
URL: https://svnweb.freebsd.org/changeset/base/314395

Log:
  Add SOC_ALTERA_* kernel options per each SoC and use it to
  conditionally compile the code.
  
  Reviewed by:  andrew
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D9836

Modified:
  head/sys/arm/altera/socfpga/socfpga_machdep.c
  head/sys/arm/altera/socfpga/socfpga_mp.c
  head/sys/arm/conf/SOCFPGA
  head/sys/conf/options.arm

Modified: head/sys/arm/altera/socfpga/socfpga_machdep.c
==
--- head/sys/arm/altera/socfpga/socfpga_machdep.c   Tue Feb 28 15:44:21 
2017(r314394)
+++ head/sys/arm/altera/socfpga/socfpga_machdep.c   Tue Feb 28 16:20:33 
2017(r314395)
@@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$");
 
 #include "platform_if.h"
 
+#if defined(SOC_ALTERA_CYCLONE5)
 static int
 socfpga_devmap_init(platform_t plat)
 {
@@ -82,7 +83,9 @@ socfpga_devmap_init(platform_t plat)
 
return (0);
 }
+#endif
 
+#if defined(SOC_ALTERA_ARRIA10)
 static int
 socfpga_a10_devmap_init(platform_t plat)
 {
@@ -101,9 +104,10 @@ socfpga_a10_devmap_init(platform_t plat)
 
return (0);
 }
+#endif
 
 static void
-_socfpga_cpu_reset(platform_t plat, uint32_t reg)
+_socfpga_cpu_reset(bus_size_t reg)
 {
uint32_t paddr;
bus_addr_t vaddr;
@@ -127,20 +131,25 @@ end:
while (1);
 }
 
+#if defined(SOC_ALTERA_CYCLONE5)
 static void
 socfpga_cpu_reset(platform_t plat)
 {
 
-   _socfpga_cpu_reset(plat, RSTMGR_CTRL);
+   _socfpga_cpu_reset(RSTMGR_CTRL);
 }
+#endif
 
+#if defined(SOC_ALTERA_ARRIA10)
 static void
 socfpga_a10_cpu_reset(platform_t plat)
 {
 
-   _socfpga_cpu_reset(plat, RSTMGR_A10_CTRL);
+   _socfpga_cpu_reset(RSTMGR_A10_CTRL);
 }
+#endif
 
+#if defined(SOC_ALTERA_CYCLONE5)
 static platform_method_t socfpga_methods[] = {
PLATFORMMETHOD(platform_devmap_init,socfpga_devmap_init),
PLATFORMMETHOD(platform_cpu_reset,  socfpga_cpu_reset),
@@ -151,7 +160,9 @@ static platform_method_t socfpga_methods
PLATFORMMETHOD_END,
 };
 FDT_PLATFORM_DEF(socfpga, "socfpga", 0, "altr,socfpga-cyclone5", 200);
+#endif
 
+#if defined(SOC_ALTERA_ARRIA10)
 static platform_method_t socfpga_a10_methods[] = {
PLATFORMMETHOD(platform_devmap_init,socfpga_a10_devmap_init),
PLATFORMMETHOD(platform_cpu_reset,  socfpga_a10_cpu_reset),
@@ -162,3 +173,4 @@ static platform_method_t socfpga_a10_met
PLATFORMMETHOD_END,
 };
 FDT_PLATFORM_DEF(socfpga_a10, "socfpga", 0, "altr,socfpga-arria10", 200);
+#endif

Modified: head/sys/arm/altera/socfpga/socfpga_mp.c
==
--- head/sys/arm/altera/socfpga/socfpga_mp.cTue Feb 28 15:44:21 2017
(r314394)
+++ head/sys/arm/altera/socfpga/socfpga_mp.cTue Feb 28 16:20:33 2017
(r314395)
@@ -75,8 +75,8 @@ __FBSDID("$FreeBSD$");
 #defineRAM_PHYSBASE0x0
 #defineRAM_SIZE0x1000
 
-#defineSOCFPGA_SOCKIT  1
-#defineSOCFPGA_SOCDK   2
+#defineSOCFPGA_ARRIA10 1
+#defineSOCFPGA_CYCLONE52
 
 extern char*mpentry_addr;
 static voidsocfpga_trampoline(void);
@@ -112,22 +112,31 @@ socfpga_mp_setmaxid(platform_t plat)
mp_maxid = ncpu - 1;
 }
 
-
 static void
-_socfpga_mp_start_ap(platform_t plat, uint32_t platid)
+_socfpga_mp_start_ap(uint32_t platid)
 {
bus_space_handle_t scu, rst, ram;
int reg;
 
-   if (platid == SOCFPGA_SOCDK) {
+   switch (platid) {
+#if defined(SOC_ALTERA_ARRIA10)
+   case SOCFPGA_ARRIA10:
if (bus_space_map(fdtbus_bs_tag, SCU_PHYSBASE_A10,
SCU_SIZE, 0, ) != 0)
-   panic("Couldn't map the SCU\n");
-   } else {
+   panic("Couldn't map the SCU\n");
+   break;
+#endif
+#if defined(SOC_ALTERA_CYCLONE5)
+   case SOCFPGA_CYCLONE5:
if (bus_space_map(fdtbus_bs_tag, SCU_PHYSBASE,
SCU_SIZE, 0, ) != 0)
-   panic("Couldn't map the SCU\n");
+   panic("Couldn't map the SCU\n");
+   break;
+#endif
+   default:
+   panic("Unknown platform id %d\n", platid);
}
+
if (bus_space_map(fdtbus_bs_tag, RSTMGR_PHYSBASE,
RSTMGR_SIZE, 0, ) != 0)
panic("Couldn't map the reset manager (RSTMGR)\n");
@@ -149,12 +158,21 @@ _socfpga_mp_start_ap(platform_t plat, ui
bus_space_write_4(fdtbus_bs_tag, scu, SCU_DIAG_CONTROL, reg);
 
/* Put CPU1 to reset state */
-   if (platid == SOCFPGA_SOCDK) {
+   switch (platid) {
+#if defined(SOC_ALTERA_ARRIA10)
+   case SOCFPGA_ARRIA10:
bus_space_write_4(fdtbus_bs_tag, rst,
 

svn commit: r314394 - in head/sys/arm/allwinner: a31 clkng

2017-02-28 Thread Emmanuel Vadot
Author: manu
Date: Tue Feb 28 15:44:21 2017
New Revision: 314394
URL: https://svnweb.freebsd.org/changeset/base/314394

Log:
  allwinner: A31: Add ccung driver
  
  This adds clocks support for the aw_ccung on the A31 SoC.
  Newer DTS files require this.
  All the clocks except two CSI are defined and exported on the clock domain.

Added:
  head/sys/arm/allwinner/clkng/ccu_a31.c   (contents, props changed)
  head/sys/arm/allwinner/clkng/ccu_a31.h   (contents, props changed)
Modified:
  head/sys/arm/allwinner/a31/files.a31
  head/sys/arm/allwinner/clkng/aw_ccung.c

Modified: head/sys/arm/allwinner/a31/files.a31
==
--- head/sys/arm/allwinner/a31/files.a31Tue Feb 28 15:11:33 2017
(r314393)
+++ head/sys/arm/allwinner/a31/files.a31Tue Feb 28 15:44:21 2017
(r314394)
@@ -1,5 +1,6 @@
 # $FreeBSD$
 
+arm/allwinner/clkng/ccu_a31.c  standard
 arm/allwinner/a31/a31_padconf.cstandard
 arm/allwinner/a31/a31_r_padconf.c  standard
 arm/allwinner/a31/a31s_padconf.c   standard

Modified: head/sys/arm/allwinner/clkng/aw_ccung.c
==
--- head/sys/arm/allwinner/clkng/aw_ccung.c Tue Feb 28 15:11:33 2017
(r314393)
+++ head/sys/arm/allwinner/clkng/aw_ccung.c Tue Feb 28 15:44:21 2017
(r314394)
@@ -54,6 +54,10 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#if defined(SOC_ALLWINNER_A31)
+#include 
+#endif
+
 #if defined(SOC_ALLWINNER_H3)
 #include 
 #endif
@@ -70,10 +74,17 @@ static struct resource_spec aw_ccung_spe
 #defineH3_CCU  1
 #endif
 
+#if defined(SOC_ALLWINNER_A31)
+#defineA31_CCU 2
+#endif
+
 static struct ofw_compat_data compat_data[] = {
 #if defined(SOC_ALLWINNER_H3)
{ "allwinner,sun8i-h3-ccu", H3_CCU },
 #endif
+#if defined(SOC_ALLWINNER_A31)
+   { "allwinner,sun6i-a31-ccu", A31_CCU },
+#endif
{NULL, 0 }
 };
 
@@ -295,6 +306,11 @@ aw_ccung_attach(device_t dev)
ccu_h3_register_clocks(sc);
break;
 #endif
+#if defined(SOC_ALLWINNER_A31)
+   case A31_CCU:
+   ccu_a31_register_clocks(sc);
+   break;
+#endif
}
 
if (sc->gates)

Added: head/sys/arm/allwinner/clkng/ccu_a31.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/allwinner/clkng/ccu_a31.c  Tue Feb 28 15:44:21 2017
(r314394)
@@ -0,0 +1,936 @@
+/*-
+ * Copyright (c) 2017 Emmanuel Vadot 
+ * 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 ``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 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$
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "ccu_a31.h"
+
+static struct aw_ccung_reset a31_ccu_resets[] = {
+   CCU_RESET(A31_RST_USB_PHY0, 0xcc, 0)
+   CCU_RESET(A31_RST_USB_PHY1, 0xcc, 1)
+   CCU_RESET(A31_RST_USB_PHY2, 0xcc, 2)
+
+   CCU_RESET(A31_RST_AHB1_MIPI_DSI, 0x2c0, 1)
+   CCU_RESET(A31_RST_AHB1_SS, 0x2c0, 5)
+   CCU_RESET(A31_RST_AHB1_DMA, 0x2c0, 6)
+   CCU_RESET(A31_RST_AHB1_MMC0, 0x2c0, 8)
+   CCU_RESET(A31_RST_AHB1_MMC1, 0x2c0, 9)
+   CCU_RESET(A31_RST_AHB1_MMC2, 0x2c0, 10)
+   CCU_RESET(A31_RST_AHB1_MMC3, 0x2c0, 11)
+   CCU_RESET(A31_RST_AHB1_NAND1, 0x2c0, 12)
+   CCU_RESET(A31_RST_AHB1_NAND0, 0x2c0, 13)
+   CCU_RESET(A31_RST_AHB1_SDRAM, 0x2c0, 14)
+   CCU_RESET(A31_RST_AHB1_EMAC, 0x2c0, 17)
+   CCU_RESET(A31_RST_AHB1_TS, 0x2c0, 18)
+   CCU_RESET(A31_RST_AHB1_HSTIMER, 0x2c0, 19)
+   

svn commit: r314393 - head/sys/arm/allwinner/clkng

2017-02-28 Thread Emmanuel Vadot
Author: manu
Date: Tue Feb 28 15:11:33 2017
New Revision: 314393
URL: https://svnweb.freebsd.org/changeset/base/314393

Log:
  allwinner: nkmp: Add MUX capability
  
  Some NKMP clocks have a mux options.
  Add the capability to aw_clk_nkmp.

Modified:
  head/sys/arm/allwinner/clkng/aw_clk.h
  head/sys/arm/allwinner/clkng/aw_clk_nkmp.c
  head/sys/arm/allwinner/clkng/aw_clk_nkmp.h

Modified: head/sys/arm/allwinner/clkng/aw_clk.h
==
--- head/sys/arm/allwinner/clkng/aw_clk.h   Tue Feb 28 15:03:34 2017
(r314392)
+++ head/sys/arm/allwinner/clkng/aw_clk.h   Tue Feb 28 15:11:33 2017
(r314393)
@@ -219,6 +219,48 @@ aw_clk_factor_get_value(struct aw_clk_fa
.flags = _flags,\
}
 
+#define NKMP_CLK_WITH_MUX(_clkname,\
+  _id, _name, _pnames, \
+  _offset, \
+  _n_shift, _n_width, _n_value, _n_flags,  \
+  _k_shift, _k_width, _k_value, _k_flags,  \
+  _m_shift, _m_width, _m_value, _m_flags,  \
+  _p_shift, _p_width, _p_value, _p_flags,  \
+  _mux_shift, _mux_width, _gate,   \
+  _lock, _lock_retries,\
+  _flags)  \
+   static struct aw_clk_nkmp_def _clkname = {  \
+   .clkdef = { \
+   .id = _id,  \
+   .name = _name,  \
+   .parent_names = _pnames,\
+   .parent_cnt = nitems(_pnames),  \
+   },  \
+   .offset = _offset,  \
+   .n.shift = _n_shift,\
+   .n.width = _n_width,\
+   .n.value = _n_value,\
+   .n.flags = _n_flags,\
+   .k.shift = _k_shift,\
+   .k.width = _k_width,\
+   .k.value = _k_value,\
+   .k.flags = _k_flags,\
+   .m.shift = _m_shift,\
+   .m.width = _m_width,\
+   .m.value = _m_value,\
+   .m.flags = _m_flags,\
+   .p.shift = _p_shift,\
+   .p.width = _p_width,\
+   .p.value = _p_value,\
+   .p.flags = _p_flags,\
+   .mux_shift = _mux_shift,\
+   .mux_width = _mux_width,\
+   .gate_shift = _gate,\
+   .lock_shift = _lock,\
+   .lock_retries = _lock_retries,  \
+   .flags = _flags,\
+   }
+
 #define NKMP_CLK_WITH_UPDATE(_clkname, \
   _id, _name, _pnames, \
   _offset, \

Modified: head/sys/arm/allwinner/clkng/aw_clk_nkmp.c
==
--- head/sys/arm/allwinner/clkng/aw_clk_nkmp.c  Tue Feb 28 15:03:34 2017
(r314392)
+++ head/sys/arm/allwinner/clkng/aw_clk_nkmp.c  Tue Feb 28 15:11:33 2017
(r314393)
@@ -55,6 +55,8 @@ struct aw_clk_nkmp_sc {
struct aw_clk_factorm;
struct aw_clk_factorp;
 
+   uint32_tmux_shift;
+   uint32_tmux_mask;
uint32_tgate_shift;
uint32_tlock_shift;
uint32_tlock_retries;
@@ -77,7 +79,21 @@ struct aw_clk_nkmp_sc {
 static int
 aw_clk_nkmp_init(struct clknode *clk, device_t dev)
 {
-   clknode_init_parent_idx(clk, 0);
+   struct aw_clk_nkmp_sc *sc;
+   uint32_t val, idx;
+
+   sc = clknode_get_softc(clk);
+
+   idx = 0;
+   if ((sc->flags & AW_CLK_HAS_MUX) != 0) {
+   DEVICE_LOCK(clk);
+   READ4(clk, sc->offset, );
+   DEVICE_UNLOCK(clk);
+
+   idx = (val & sc->mux_mask) >> sc->mux_shift;
+   }
+
+   clknode_init_parent_idx(clk, idx);
return (0);
 }
 
@@ -104,6 +120,27 @@ aw_clk_nkmp_set_gate(struct clknode *clk
return (0);
 }
 
+static int
+aw_clk_nkmp_set_mux(struct clknode *clk, int index)
+{
+   struct aw_clk_nkmp_sc *sc;
+   uint32_t val;
+
+   sc = clknode_get_softc(clk);
+
+   if ((sc->flags & AW_CLK_HAS_MUX) != 0)
+   return (0);
+
+   DEVICE_LOCK(clk);
+   READ4(clk, sc->offset, );
+   val &= ~(sc->mux_mask >> sc->mux_shift);
+   val |= index << 

svn commit: r314390 - head/sys/dev/usb/controller

2017-02-28 Thread Ruslan Bukin
Author: br
Date: Tue Feb 28 14:42:57 2017
New Revision: 314390
URL: https://svnweb.freebsd.org/changeset/base/314390

Log:
  Add compatible string.
  
  This restores USB attaching on SOCKIT board after reusing
  standard DTS files.
  
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/dev/usb/controller/dwc_otg_fdt.c

Modified: head/sys/dev/usb/controller/dwc_otg_fdt.c
==
--- head/sys/dev/usb/controller/dwc_otg_fdt.c   Tue Feb 28 14:02:16 2017
(r314389)
+++ head/sys/dev/usb/controller/dwc_otg_fdt.c   Tue Feb 28 14:42:57 2017
(r314390)
@@ -57,6 +57,12 @@ __FBSDID("$FreeBSD$");
 
 static device_probe_t dwc_otg_probe;
 
+static struct ofw_compat_data compat_data[] = {
+   { "synopsys,designware-hs-otg2",1 },
+   { "snps,dwc2",  1 },
+   { NULL, 0 }
+};
+
 static int
 dwc_otg_probe(device_t dev)
 {
@@ -64,7 +70,7 @@ dwc_otg_probe(device_t dev)
if (!ofw_bus_status_okay(dev))
return (ENXIO);
 
-   if (!ofw_bus_is_compatible(dev, "synopsys,designware-hs-otg2"))
+   if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data)
return (ENXIO);
 
device_set_desc(dev, "DWC OTG 2.0 integrated USB controller");
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r314389 - in head/sys: arm/altera/socfpga arm/conf boot/fdt/dts/arm

2017-02-28 Thread Andrew Turner
On Tue, 28 Feb 2017 14:02:16 + (UTC)
Ruslan Bukin  wrote:

> Author: br
> Date: Tue Feb 28 14:02:16 2017
> New Revision: 314389
> URL: https://svnweb.freebsd.org/changeset/base/314389
> 
> Log:
>   Add support for Intel Arria 10 SoC Development Kit.
>   Use standard DTS files for SOCKIT and SOCDK.
>   
>   Sponsored by:   DARPA, AFRL
> 
> Added:
>   head/sys/arm/conf/SOCDK   (contents, props changed)
>   head/sys/arm/conf/SOCFPGA   (contents, props changed)
>   head/sys/boot/fdt/dts/arm/socfpga_arria10_socdk_sdmmc.dts
> (contents, props changed)
> head/sys/boot/fdt/dts/arm/socfpga_cyclone5_sockit_beri_sdmmc.dts
> (contents, props changed)
> head/sys/boot/fdt/dts/arm/socfpga_cyclone5_sockit_sdmmc.dts
> (contents, props changed) Deleted: head/sys/arm/conf/SOCKIT.common
> head/sys/boot/fdt/dts/arm/socfpga-sockit-beri.dts
> head/sys/boot/fdt/dts/arm/socfpga-sockit.dts
> head/sys/boot/fdt/dts/arm/socfpga.dtsi Modified:
>   head/sys/arm/altera/socfpga/socfpga_machdep.c
>   head/sys/arm/altera/socfpga/socfpga_manager.c
>   head/sys/arm/altera/socfpga/socfpga_mp.c
>   head/sys/arm/altera/socfpga/socfpga_mp.h
>   head/sys/arm/altera/socfpga/socfpga_rstmgr.c
>   head/sys/arm/altera/socfpga/socfpga_rstmgr.h
>   head/sys/arm/conf/SOCKIT
>   head/sys/arm/conf/SOCKIT-BERI
> 
> Modified: head/sys/arm/altera/socfpga/socfpga_machdep.c
> ==
> --- head/sys/arm/altera/socfpga/socfpga_machdep.c Tue Feb 28
> 12:05:58 2017 (r314388) +++
> head/sys/arm/altera/socfpga/socfpga_machdep.c Tue Feb 28
> 14:02:16 2017 (r314389) @@ -1,5 +1,5 @@ /*-
> - * Copyright (c) 2014 Ruslan Bukin 
> + * Copyright (c) 2014-2017 Ruslan Bukin 
>   * All rights reserved.
>   *
>   * This software was developed by SRI International and the
> University of @@ -83,24 +83,43 @@ socfpga_devmap_init(platform_t plat)
>   return (0);
>  }
>  
> +static int
> +socfpga_a10_devmap_init(platform_t plat)

You should create a SOC_ALTERA_ARRIA10 (or similar) option and use it
to conditionally compile this code.

> +{
> +
> + /* UART */
> + devmap_add_entry(0xffc0, 0x10);
> +
> + /* USB OTG */
> + devmap_add_entry(0xffb0, 0x10);
> +
> + /* dwmmc */
> + devmap_add_entry(0xff80, 0x10);
> +
> + /* scu */
> + devmap_add_entry(0xfff0, 0x10);
> +
> + return (0);
> +}
> +
>  static void
> -socfpga_cpu_reset(platform_t plat)
> +_socfpga_cpu_reset(platform_t plat, uint32_t reg)

Why are you passing the platform_t into this? And reg should be a
bus_size_t.

>  {
>   uint32_t paddr;
>   bus_addr_t vaddr;
>   phandle_t node;
>  
> - if (rstmgr_warmreset() == 0)
> + if (rstmgr_warmreset(reg) == 0)
>   goto end;
>  
> - node = OF_finddevice("rstmgr");
> + node = OF_finddevice("/soc/rstmgr");
>   if (node == -1)
>   goto end;
>  
>   if ((OF_getencprop(node, "reg", , sizeof(paddr))) > 0)
> { if (bus_space_map(fdtbus_bs_tag, paddr, 0x8, 0, ) == 0) {
>   bus_space_write_4(fdtbus_bs_tag, vaddr,
> - RSTMGR_CTRL, CTRL_SWWARMRSTREQ);
> + reg, CTRL_SWWARMRSTREQ);
>   }
>   }
>  
> @@ -108,16 +127,38 @@ end:
>   while (1);
>  }
>  
> +static void
> +socfpga_cpu_reset(platform_t plat)
> +{
> +
> + _socfpga_cpu_reset(plat, RSTMGR_CTRL);
> +}
> +
> +static void
> +socfpga_a10_cpu_reset(platform_t plat)
> +{
> +
> + _socfpga_cpu_reset(plat, RSTMGR_A10_CTRL);
> +}

these two and the methods below should be under SOC_ checks.

> +
>  static platform_method_t socfpga_methods[] = {
>   PLATFORMMETHOD(platform_devmap_init,
> socfpga_devmap_init), PLATFORMMETHOD(platform_cpu_reset,
> socfpga_cpu_reset), -
>  #ifdef SMP
>   PLATFORMMETHOD(platform_mp_setmaxid,
> socfpga_mp_setmaxid), PLATFORMMETHOD(platform_mp_start_ap,
> socfpga_mp_start_ap), #endif
> -
>   PLATFORMMETHOD_END,
>  };
> +FDT_PLATFORM_DEF(socfpga, "socfpga", 0, "altr,socfpga-cyclone5",
> 200); 
> -FDT_PLATFORM_DEF(socfpga, "socfpga", 0, "altr,socfpga", 0);
> +static platform_method_t socfpga_a10_methods[] = {
> + PLATFORMMETHOD(platform_devmap_init,
> socfpga_a10_devmap_init),
> + PLATFORMMETHOD(platform_cpu_reset,
> socfpga_a10_cpu_reset), +#ifdef SMP
> + PLATFORMMETHOD(platform_mp_setmaxid,
> socfpga_mp_setmaxid),
> + PLATFORMMETHOD(platform_mp_start_ap,
> socfpga_a10_mp_start_ap), +#endif
> + PLATFORMMETHOD_END,
> +};
> +FDT_PLATFORM_DEF(socfpga_a10, "socfpga", 0, "altr,socfpga-arria10",
> 200);
> 
> Modified: head/sys/arm/altera/socfpga/socfpga_manager.c
> ==
> --- head/sys/arm/altera/socfpga/socfpga_manager.c Tue Feb 28
> 12:05:58 2017 (r314388) +++
> head/sys/arm/altera/socfpga/socfpga_manager.c Tue Feb 28
> 14:02:16 2017 (r314389) @@ -377,7 +377,7 @@
> 

svn commit: r314389 - in head/sys: arm/altera/socfpga arm/conf boot/fdt/dts/arm

2017-02-28 Thread Ruslan Bukin
Author: br
Date: Tue Feb 28 14:02:16 2017
New Revision: 314389
URL: https://svnweb.freebsd.org/changeset/base/314389

Log:
  Add support for Intel Arria 10 SoC Development Kit.
  Use standard DTS files for SOCKIT and SOCDK.
  
  Sponsored by: DARPA, AFRL

Added:
  head/sys/arm/conf/SOCDK   (contents, props changed)
  head/sys/arm/conf/SOCFPGA   (contents, props changed)
  head/sys/boot/fdt/dts/arm/socfpga_arria10_socdk_sdmmc.dts   (contents, props 
changed)
  head/sys/boot/fdt/dts/arm/socfpga_cyclone5_sockit_beri_sdmmc.dts   (contents, 
props changed)
  head/sys/boot/fdt/dts/arm/socfpga_cyclone5_sockit_sdmmc.dts   (contents, 
props changed)
Deleted:
  head/sys/arm/conf/SOCKIT.common
  head/sys/boot/fdt/dts/arm/socfpga-sockit-beri.dts
  head/sys/boot/fdt/dts/arm/socfpga-sockit.dts
  head/sys/boot/fdt/dts/arm/socfpga.dtsi
Modified:
  head/sys/arm/altera/socfpga/socfpga_machdep.c
  head/sys/arm/altera/socfpga/socfpga_manager.c
  head/sys/arm/altera/socfpga/socfpga_mp.c
  head/sys/arm/altera/socfpga/socfpga_mp.h
  head/sys/arm/altera/socfpga/socfpga_rstmgr.c
  head/sys/arm/altera/socfpga/socfpga_rstmgr.h
  head/sys/arm/conf/SOCKIT
  head/sys/arm/conf/SOCKIT-BERI

Modified: head/sys/arm/altera/socfpga/socfpga_machdep.c
==
--- head/sys/arm/altera/socfpga/socfpga_machdep.c   Tue Feb 28 12:05:58 
2017(r314388)
+++ head/sys/arm/altera/socfpga/socfpga_machdep.c   Tue Feb 28 14:02:16 
2017(r314389)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2014 Ruslan Bukin 
+ * Copyright (c) 2014-2017 Ruslan Bukin 
  * All rights reserved.
  *
  * This software was developed by SRI International and the University of
@@ -83,24 +83,43 @@ socfpga_devmap_init(platform_t plat)
return (0);
 }
 
+static int
+socfpga_a10_devmap_init(platform_t plat)
+{
+
+   /* UART */
+   devmap_add_entry(0xffc0, 0x10);
+
+   /* USB OTG */
+   devmap_add_entry(0xffb0, 0x10);
+
+   /* dwmmc */
+   devmap_add_entry(0xff80, 0x10);
+
+   /* scu */
+   devmap_add_entry(0xfff0, 0x10);
+
+   return (0);
+}
+
 static void
-socfpga_cpu_reset(platform_t plat)
+_socfpga_cpu_reset(platform_t plat, uint32_t reg)
 {
uint32_t paddr;
bus_addr_t vaddr;
phandle_t node;
 
-   if (rstmgr_warmreset() == 0)
+   if (rstmgr_warmreset(reg) == 0)
goto end;
 
-   node = OF_finddevice("rstmgr");
+   node = OF_finddevice("/soc/rstmgr");
if (node == -1)
goto end;
 
if ((OF_getencprop(node, "reg", , sizeof(paddr))) > 0) {
if (bus_space_map(fdtbus_bs_tag, paddr, 0x8, 0, ) == 0) {
bus_space_write_4(fdtbus_bs_tag, vaddr,
-   RSTMGR_CTRL, CTRL_SWWARMRSTREQ);
+   reg, CTRL_SWWARMRSTREQ);
}
}
 
@@ -108,16 +127,38 @@ end:
while (1);
 }
 
+static void
+socfpga_cpu_reset(platform_t plat)
+{
+
+   _socfpga_cpu_reset(plat, RSTMGR_CTRL);
+}
+
+static void
+socfpga_a10_cpu_reset(platform_t plat)
+{
+
+   _socfpga_cpu_reset(plat, RSTMGR_A10_CTRL);
+}
+
 static platform_method_t socfpga_methods[] = {
PLATFORMMETHOD(platform_devmap_init,socfpga_devmap_init),
PLATFORMMETHOD(platform_cpu_reset,  socfpga_cpu_reset),
-
 #ifdef SMP
PLATFORMMETHOD(platform_mp_setmaxid,socfpga_mp_setmaxid),
PLATFORMMETHOD(platform_mp_start_ap,socfpga_mp_start_ap),
 #endif
-
PLATFORMMETHOD_END,
 };
+FDT_PLATFORM_DEF(socfpga, "socfpga", 0, "altr,socfpga-cyclone5", 200);
 
-FDT_PLATFORM_DEF(socfpga, "socfpga", 0, "altr,socfpga", 0);
+static platform_method_t socfpga_a10_methods[] = {
+   PLATFORMMETHOD(platform_devmap_init,socfpga_a10_devmap_init),
+   PLATFORMMETHOD(platform_cpu_reset,  socfpga_a10_cpu_reset),
+#ifdef SMP
+   PLATFORMMETHOD(platform_mp_setmaxid,socfpga_mp_setmaxid),
+   PLATFORMMETHOD(platform_mp_start_ap,socfpga_a10_mp_start_ap),
+#endif
+   PLATFORMMETHOD_END,
+};
+FDT_PLATFORM_DEF(socfpga_a10, "socfpga", 0, "altr,socfpga-arria10", 200);

Modified: head/sys/arm/altera/socfpga/socfpga_manager.c
==
--- head/sys/arm/altera/socfpga/socfpga_manager.c   Tue Feb 28 12:05:58 
2017(r314388)
+++ head/sys/arm/altera/socfpga/socfpga_manager.c   Tue Feb 28 14:02:16 
2017(r314389)
@@ -377,7 +377,7 @@ fpgamgr_probe(device_t dev)
if (!ofw_bus_status_okay(dev))
return (ENXIO);
 
-   if (!ofw_bus_is_compatible(dev, "altr,fpga-mgr"))
+   if (!ofw_bus_is_compatible(dev, "altr,socfpga-fpga-mgr"))
return (ENXIO);
 
device_set_desc(dev, "FPGA Manager");

Modified: head/sys/arm/altera/socfpga/socfpga_mp.c

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

2017-02-28 Thread Alexander Motin
Author: mav
Date: Tue Feb 28 11:56:17 2017
New Revision: 314387
URL: https://svnweb.freebsd.org/changeset/base/314387

Log:
  Make ctl_queue_sense() not sleep.
  
  It may be called in non-sleepable frontend context.
  
  MFC after:2 weeks

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

Modified: head/sys/cam/ctl/ctl.c
==
--- head/sys/cam/ctl/ctl.c  Tue Feb 28 11:42:04 2017(r314386)
+++ head/sys/cam/ctl/ctl.c  Tue Feb 28 11:56:17 2017(r314387)
@@ -13146,21 +13146,15 @@ ctl_queue_sense(union ctl_io *io)
 
initidx = ctl_get_initindex(>io_hdr.nexus);
p = initidx / CTL_MAX_INIT_PER_PORT;
-   if ((ps = lun->pending_sense[p]) == NULL) {
-   mtx_unlock(>lun_lock);
-   ps = malloc(sizeof(*ps) * CTL_MAX_INIT_PER_PORT, M_CTL,
-   M_WAITOK | M_ZERO);
-   mtx_lock(>lun_lock);
-   if (lun->pending_sense[p] == NULL) {
-   lun->pending_sense[p] = ps;
-   } else {
-   free(ps, M_CTL);
-   ps = lun->pending_sense[p];
-   }
+   if (lun->pending_sense[p] == NULL) {
+   lun->pending_sense[p] = malloc(sizeof(*ps) * 
CTL_MAX_INIT_PER_PORT,
+   M_CTL, M_NOWAIT | M_ZERO);
+   }
+   if ((ps = lun->pending_sense[p]) != NULL) {
+   ps += initidx % CTL_MAX_INIT_PER_PORT;
+   memset(ps, 0, sizeof(*ps));
+   memcpy(ps, >scsiio.sense_data, io->scsiio.sense_len);
}
-   ps += initidx % CTL_MAX_INIT_PER_PORT;
-   memset(ps, 0, sizeof(*ps));
-   memcpy(ps, >scsiio.sense_data, io->scsiio.sense_len);
mtx_unlock(>lun_lock);
 
 bailout:
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314384 - head/sys/arm/allwinner/clkng

2017-02-28 Thread Emmanuel Vadot
Author: manu
Date: Tue Feb 28 11:38:11 2017
New Revision: 314384
URL: https://svnweb.freebsd.org/changeset/base/314384

Log:
  allwinner: NKMP clock: add update bit
  
  The PLL_DDR clock have an update bit which need to be set after changing
  the value, add the possibility to define one for NKMP clocks.
  
  This allow us to add the missing clocks.
  We now have the full list of clocks created under the clock domain.

Modified:
  head/sys/arm/allwinner/clkng/aw_clk.h
  head/sys/arm/allwinner/clkng/aw_clk_nkmp.c
  head/sys/arm/allwinner/clkng/aw_clk_nkmp.h
  head/sys/arm/allwinner/clkng/ccu_h3.c
  head/sys/arm/allwinner/clkng/ccu_h3.h

Modified: head/sys/arm/allwinner/clkng/aw_clk.h
==
--- head/sys/arm/allwinner/clkng/aw_clk.h   Tue Feb 28 11:05:45 2017
(r314383)
+++ head/sys/arm/allwinner/clkng/aw_clk.h   Tue Feb 28 11:38:11 2017
(r314384)
@@ -64,6 +64,7 @@ struct aw_clk_init {
 #defineAW_CLK_REPARENT 0x0008
 #defineAW_CLK_SCALE_CHANGE 0x0010
 #defineAW_CLK_HAS_FRAC 0x0020
+#defineAW_CLK_HAS_UPDATE   0x0040
 
 #defineAW_CLK_FACTOR_POWER_OF_TWO  0x0001
 #defineAW_CLK_FACTOR_ZERO_BASED0x0002
@@ -218,6 +219,48 @@ aw_clk_factor_get_value(struct aw_clk_fa
.flags = _flags,\
}
 
+#define NKMP_CLK_WITH_UPDATE(_clkname, \
+  _id, _name, _pnames, \
+  _offset, \
+  _n_shift, _n_width, _n_value, _n_flags,  \
+  _k_shift, _k_width, _k_value, _k_flags,  \
+  _m_shift, _m_width, _m_value, _m_flags,  \
+  _p_shift, _p_width, _p_value, _p_flags,  \
+  _gate,   \
+  _lock, _lock_retries,\
+  _update, \
+  _flags)  \
+   static struct aw_clk_nkmp_def _clkname = {  \
+   .clkdef = { \
+   .id = _id,  \
+   .name = _name,  \
+   .parent_names = _pnames,\
+   .parent_cnt = nitems(_pnames),  \
+   },  \
+   .offset = _offset,  \
+   .n.shift = _n_shift,\
+   .n.width = _n_width,\
+   .n.value = _n_value,\
+   .n.flags = _n_flags,\
+   .k.shift = _k_shift,\
+   .k.width = _k_width,\
+   .k.value = _k_value,\
+   .k.flags = _k_flags,\
+   .m.shift = _m_shift,\
+   .m.width = _m_width,\
+   .m.value = _m_value,\
+   .m.flags = _m_flags,\
+   .p.shift = _p_shift,\
+   .p.width = _p_width,\
+   .p.value = _p_value,\
+   .p.flags = _p_flags,\
+   .gate_shift = _gate,\
+   .lock_shift = _lock,\
+   .lock_retries = _lock_retries,  \
+   .update_shift = _update,\
+   .flags = _flags | AW_CLK_HAS_UPDATE,\
+   }
+
 #define NM_CLK(_clkname, _id, _name, _pnames,  \
  _offset,  \
  _nshift, _nwidth, _nvalue, _nflags,   \

Modified: head/sys/arm/allwinner/clkng/aw_clk_nkmp.c
==
--- head/sys/arm/allwinner/clkng/aw_clk_nkmp.c  Tue Feb 28 11:05:45 2017
(r314383)
+++ head/sys/arm/allwinner/clkng/aw_clk_nkmp.c  Tue Feb 28 11:38:11 2017
(r314384)
@@ -58,6 +58,7 @@ struct aw_clk_nkmp_sc {
uint32_tgate_shift;
uint32_tlock_shift;
uint32_tlock_retries;
+   uint32_tupdate_shift;
 
uint32_tflags;
 };
@@ -263,6 +264,14 @@ aw_clk_nkmp_set_freq(struct clknode *clk
WRITE4(clk, sc->offset, val);
DELAY(2000);
 
+   if ((sc->flags & AW_CLK_HAS_UPDATE) != 0) {
+   DEVICE_LOCK(clk);
+   READ4(clk, sc->offset, );
+   val |= 1 << sc->update_shift;
+   WRITE4(clk, sc->offset, val);
+   DELAY(2000);
+   }
+
if ((sc->flags & AW_CLK_HAS_LOCK) != 0) {

svn commit: r314383 - head/sys/arm/allwinner/clkng

2017-02-28 Thread Emmanuel Vadot
Author: manu
Date: Tue Feb 28 11:05:45 2017
New Revision: 314383
URL: https://svnweb.freebsd.org/changeset/base/314383

Log:
  allwinner: NM clock: Add value for fixed factor.
  
  The register func for aw_clk_nm didn't copy the value needed for the fixed
  factor, resulting in all fixed factor not working on NM clocks.

Modified:
  head/sys/arm/allwinner/clkng/aw_clk_nm.c

Modified: head/sys/arm/allwinner/clkng/aw_clk_nm.c
==
--- head/sys/arm/allwinner/clkng/aw_clk_nm.cTue Feb 28 09:50:34 2017
(r314382)
+++ head/sys/arm/allwinner/clkng/aw_clk_nm.cTue Feb 28 11:05:45 2017
(r314383)
@@ -331,11 +331,13 @@ aw_clk_nm_register(struct clkdom *clkdom
sc->m.shift = clkdef->m.shift;
sc->m.width = clkdef->m.width;
sc->m.mask = ((1 << sc->m.width) - 1) << sc->m.shift;
+   sc->m.value = clkdef->m.value;
sc->m.flags = clkdef->m.flags;
 
sc->n.shift = clkdef->n.shift;
sc->n.width = clkdef->n.width;
sc->n.mask = ((1 << sc->n.width) - 1) << sc->n.shift;
+   sc->n.value = clkdef->n.value;
sc->n.flags = clkdef->n.flags;
 
sc->frac.freq0 = clkdef->frac.freq0;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r314382 - head/sys/dev/hyperv/netvsc

2017-02-28 Thread Sepherosa Ziehau
Author: sephe
Date: Tue Feb 28 09:50:34 2017
New Revision: 314382
URL: https://svnweb.freebsd.org/changeset/base/314382

Log:
  hyperv/hn: Simplify RNDIS packet data offset calculation.
  
  MFC after:1 week
  Sponsored by: Microsoft
  Differential Revision:https://reviews.freebsd.org/D9699

Modified:
  head/sys/dev/hyperv/netvsc/if_hn.c

Modified: head/sys/dev/hyperv/netvsc/if_hn.c
==
--- head/sys/dev/hyperv/netvsc/if_hn.c  Tue Feb 28 06:46:41 2017
(r314381)
+++ head/sys/dev/hyperv/netvsc/if_hn.c  Tue Feb 28 09:50:34 2017
(r314382)
@@ -1784,9 +1784,6 @@ hn_rndis_pktinfo_append(struct rndis_pac
pi->rm_type = pi_type;
pi->rm_pktinfooffset = RNDIS_PKTINFO_OFFSET;
 
-   /* Data immediately follow per-packet-info. */
-   pkt->rm_dataoffset += pi_size;
-
/* Update RNDIS packet msg length */
pkt->rm_len += pi_size;
 
@@ -1932,7 +1929,7 @@ hn_encap(struct ifnet *ifp, struct hn_tx
 
pkt->rm_type = REMOTE_NDIS_PACKET_MSG;
pkt->rm_len = sizeof(*pkt) + m_head->m_pkthdr.len;
-   pkt->rm_dataoffset = sizeof(*pkt);
+   pkt->rm_dataoffset = 0;
pkt->rm_datalen = m_head->m_pkthdr.len;
pkt->rm_oobdataoffset = 0;
pkt->rm_oobdatalen = 0;
@@ -2003,7 +2000,7 @@ hn_encap(struct ifnet *ifp, struct hn_tx
 
pkt_hlen = pkt->rm_pktinfooffset + pkt->rm_pktinfolen;
/* Convert RNDIS packet message offsets */
-   pkt->rm_dataoffset = hn_rndis_pktmsg_offset(pkt->rm_dataoffset);
+   pkt->rm_dataoffset = hn_rndis_pktmsg_offset(pkt_hlen);
pkt->rm_pktinfooffset = hn_rndis_pktmsg_offset(pkt->rm_pktinfooffset);
 
/*
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"