svn commit: r325705 - head/secure

2017-11-10 Thread Eitan Adler
Author: eadler
Date: Sat Nov 11 07:21:49 2017
New Revision: 325705
URL: https://svnweb.freebsd.org/changeset/base/325705

Log:
  secure: chase removal of pkg_install

Modified:
  head/secure/Makefile

Modified: head/secure/Makefile
==
--- head/secure/MakefileSat Nov 11 07:20:14 2017(r325704)
+++ head/secure/MakefileSat Nov 11 07:21:49 2017(r325705)
@@ -11,7 +11,7 @@ SUBDIR.${MK_TESTS}+= tests
 # These are the programs which depend on crypto, but not Kerberos.
 SPROGS=lib/libfetch lib/libpam lib/libradius lib/libtelnet \
bin/ed libexec/telnetd usr.bin/fetch usr.bin/telnet \
-   usr.sbin/pkg_install usr.sbin/ppp usr.sbin/tcpdump/tcpdump
+   usr.sbin/ppp usr.sbin/tcpdump/tcpdump
 .if ${MK_SENDMAIL} != "no"
 SPROGS+=usr.sbin/sendmail
 .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: r325704 - head/targets/pseudo/userland

2017-11-10 Thread Eitan Adler
Author: eadler
Date: Sat Nov 11 07:20:14 2017
New Revision: 325704
URL: https://svnweb.freebsd.org/changeset/base/325704

Log:
  Chase removal of pkg_* commands

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

Modified: head/targets/pseudo/userland/Makefile.depend
==
--- head/targets/pseudo/userland/Makefile.dependSat Nov 11 07:14:19 
2017(r325703)
+++ head/targets/pseudo/userland/Makefile.dependSat Nov 11 07:20:14 
2017(r325704)
@@ -685,13 +685,6 @@ DIRDEPS+= \
usr.sbin/pciconf \
usr.sbin/periodic \
usr.sbin/pkg \
-   usr.sbin/pkg_install/add \
-   usr.sbin/pkg_install/create \
-   usr.sbin/pkg_install/delete \
-   usr.sbin/pkg_install/info \
-   usr.sbin/pkg_install/lib \
-   usr.sbin/pkg_install/updating \
-   usr.sbin/pkg_install/version \
usr.sbin/pmcannotate \
usr.sbin/pmccontrol \
usr.sbin/pmcstat \
___
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: r325703 - head/targets/pseudo/userland

2017-11-10 Thread Eitan Adler
Author: eadler
Date: Sat Nov 11 07:14:19 2017
New Revision: 325703
URL: https://svnweb.freebsd.org/changeset/base/325703

Log:
  badsect(8): case remaining element
  
  r325452 removed badsect(8) - remove pseudo-target for it

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

Modified: head/targets/pseudo/userland/Makefile.depend
==
--- head/targets/pseudo/userland/Makefile.dependSat Nov 11 07:00:40 
2017(r325702)
+++ head/targets/pseudo/userland/Makefile.dependSat Nov 11 07:14:19 
2017(r325703)
@@ -48,7 +48,6 @@ DIRDEPS+= \
sbin/adjkerntz \
sbin/atacontrol \
sbin/atm/atmconfig \
-   sbin/badsect \
sbin/camcontrol \
sbin/ccdconfig \
sbin/clri \
___
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: r325702 - in head: . share/man/man5 share/man/man7 usr.bin/mail

2017-11-10 Thread Eitan Adler
Author: eadler
Date: Sat Nov 11 07:00:40 2017
New Revision: 325702
URL: https://svnweb.freebsd.org/changeset/base/325702

Log:
  mailaddr(7): wave goodbye
  
  The information here is somewhere between ancient to obsolete.
  It refers to a time in the internet's history when manual routing
  was still useful, talks about UUCP as if its modern, and refers
  to documents which I had trouble tracking down.
  
  It seems unlikely that a manual page in this form would be useful, so
  just remove it.
  
  Reviewed By: imp, tsoome, bdrewery(?)
  Differential Revision: https://reviews.freebsd.org/D12924

Deleted:
  head/share/man/man7/mailaddr.7
Modified:
  head/ObsoleteFiles.inc
  head/share/man/man5/forward.5
  head/share/man/man7/Makefile
  head/share/man/man7/hostname.7
  head/usr.bin/mail/mail.1

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Sat Nov 11 03:01:47 2017(r325701)
+++ head/ObsoleteFiles.inc  Sat Nov 11 07:00:40 2017(r325702)
@@ -38,6 +38,8 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20171110: Removal of mailaddr man page
+OLD_FILES+=usr/share/man/man7/mailaddr.7.gz
 # 20171108: badsect(8) removal
 OLD_FILES+=sbin/badsect
 OLD_FILES+=rescue/badsect
@@ -71,7 +73,7 @@ OLD_FILES+=usr/lib/libcap_random.a
 OLD_FILES+=usr/lib/libcap_random_p.a
 OLD_FILES+=usr/lib/libcap_sysctl.a
 OLD_FILES+=usr/lib/libcap_sysctl_p.a
-# 20171031: Removal of obsolete man files
+# 20171031: Removal of adding_user man page
 OLD_FILES+=usr/share/man/man7/adding_user.7.gz
 # 20171031: Disconnected libpathconv tests
 OLD_DIRS+=usr/tests/lib/libpathconv

Modified: head/share/man/man5/forward.5
==
--- head/share/man/man5/forward.5   Sat Nov 11 03:01:47 2017
(r325701)
+++ head/share/man/man5/forward.5   Sat Nov 11 07:00:40 2017
(r325702)
@@ -93,5 +93,4 @@ The user's forwarding instructions.
 .El
 .Sh SEE ALSO
 .Xr aliases 5 ,
-.Xr mailaddr 7 ,
 .Xr sendmail 8

Modified: head/share/man/man7/Makefile
==
--- head/share/man/man7/MakefileSat Nov 11 03:01:47 2017
(r325701)
+++ head/share/man/man7/MakefileSat Nov 11 07:00:40 2017
(r325702)
@@ -22,7 +22,6 @@ MAN=  arch.7 \
hostname.7 \
intro.7 \
maclabel.7 \
-   mailaddr.7 \
operator.7 \
ports.7 \
release.7 \

Modified: head/share/man/man7/hostname.7
==
--- head/share/man/man7/hostname.7  Sat Nov 11 03:01:47 2017
(r325701)
+++ head/share/man/man7/hostname.7  Sat Nov 11 07:00:40 2017
(r325702)
@@ -82,7 +82,6 @@ by a system-wide configuration file (see
 .Sh SEE ALSO
 .Xr gethostbyname 3 ,
 .Xr resolver 5 ,
-.Xr mailaddr 7
 .Sh HISTORY
 .Nm Hostname
 appeared in

Modified: head/usr.bin/mail/mail.1
==
--- head/usr.bin/mail/mail.1Sat Nov 11 03:01:47 2017(r325701)
+++ head/usr.bin/mail/mail.1Sat Nov 11 07:00:40 2017(r325702)
@@ -327,9 +327,6 @@ but any reply returned to the machine will have the sy
 alias expanded as all mail goes through
 .Xr sendmail 8 .
 .Ss "Network Mail (ARPA, UUCP, Berknet)"
-See
-.Xr mailaddr 7
-for a description of network addresses.
 .Pp
 The
 .Nm
@@ -1245,11 +1242,7 @@ if it exists.
 .Xr newaliases 1 ,
 .Xr vacation 1 ,
 .Xr aliases 5 ,
-.Xr mailaddr 7 ,
 .Xr sendmail 8
-.Rs
-.%T "The Mail Reference Manual"
-.Re
 .Sh HISTORY
 A
 .Nm
___
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: r325688 - head/sys/boot/powerpc/ps3

2017-11-10 Thread Nathan Whitehorn
The PS3 port *does* support FDT, though not through this loader. On a 
related note, I'm planning to just svn rm loader.ps3 in the next few weeks.

-Nathan

On 11/10/17 15:54, Warner Losh wrote:

Author: imp
Date: Fri Nov 10 23:54:18 2017
New Revision: 325688
URL: https://svnweb.freebsd.org/changeset/base/325688

Log:
   FDT support doesn't make sense for ps3. There's no support in the ps3
   port for FDT, and it's unlikely to grow support for that anytime soon.
   When it does, support can be added back easily enough.
   
   Supported by: Netflix


Modified:
   head/sys/boot/powerpc/ps3/Makefile

Modified: head/sys/boot/powerpc/ps3/Makefile
==
--- head/sys/boot/powerpc/ps3/Makefile  Fri Nov 10 23:54:13 2017
(r325687)
+++ head/sys/boot/powerpc/ps3/Makefile  Fri Nov 10 23:54:18 2017
(r325688)
@@ -7,7 +7,6 @@ LOADER_NET_SUPPORT?=yes
  LOADER_NFS_SUPPORT?=  yes
  LOADER_TFTP_SUPPORT?= no
  LOADER_GZIP_SUPPORT?= yes
-LOADER_FDT_SUPPORT?=   no
  LOADER_BZIP2_SUPPORT?=no
  
  .include 

@@ -24,12 +23,6 @@ SRCS+=   lv1call.S ps3cons.c font.h ps3mmu.c 
ps3net.c p
ps3stor.c ps3disk.c ps3cdrom.c
  SRCS+=ucmpdi2.c
  
-.if ${LOADER_FDT_SUPPORT} == "yes"

-CFLAGS+=   -I${FDTSRC}
-CFLAGS+=   -DLOADER_FDT_SUPPORT
-LIBFDT=${BOOTOBJ}/fdt/libfdt.a
-.endif
-
  CFLAGS+=  -mcpu=powerpc64
  
  # Always add MI sources

@@ -55,7 +48,7 @@ SC_DFLT_FONT=cp437
  font.h:
uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'u_char dflt_font_16[16*256] = {' '};' < 
${SC_DFLT_FONT}-8x16 > font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'u_char 
dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt 
&& file2c 'u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h
  
-loader.help: help.common ${FDTSRC}/help.fdt

+loader.help: help.common
cat ${.ALLSRC} | \
awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
  



___
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: r325700 - head/share/mk

2017-11-10 Thread Bryan Drewery
Author: bdrewery
Date: Sat Nov 11 01:11:00 2017
New Revision: 325700
URL: https://svnweb.freebsd.org/changeset/base/325700

Log:
  DIRDEPS_BUILD: Fix after r325417.
  
  DIRDEPS_BUILD works just fine without defining __objdir or dealing with any of
  this logic.  It handles its own TARGET_SPEC in local.meta.sys.mk as well.  
Just
  let it do its own thing.
  
  Sponsored by: Dell EMC Isilon

Modified:
  head/share/mk/src.sys.obj.mk

Modified: head/share/mk/src.sys.obj.mk
==
--- head/share/mk/src.sys.obj.mkSat Nov 11 01:10:55 2017
(r325699)
+++ head/share/mk/src.sys.obj.mkSat Nov 11 01:11:00 2017
(r325700)
@@ -26,7 +26,7 @@ _default_makeobjdir=  $${.CURDIR:S,^$${SRCTOP},$${OBJTO
 .include 
 
 .if ${.MAKE.LEVEL} == 0 || empty(OBJROOT)
-.if ${MK_UNIFIED_OBJDIR} == "no"
+.if ${MK_UNIFIED_OBJDIR} == "no" && ${MK_DIRDEPS_BUILD} == "no"
 # Fall back to historical behavior.
 # We always want to set a default MAKEOBJDIRPREFIX...
 MAKEOBJDIRPREFIX?= ${_default_makeobjdirprefix}
@@ -70,6 +70,7 @@ OBJROOT:= ${OBJROOT:H:tA}/${OBJROOT:T}
 .export OBJROOT SRCTOP
 .endif
 
+.if ${MK_DIRDEPS_BUILD} == "no"
 .if empty(OBJTOP)
 # SRCTOP == OBJROOT only happens with clever MAKEOBJDIRPREFIX=/.  Don't
 # append TARGET.TARGET_ARCH for that case since the user wants to build
@@ -90,12 +91,11 @@ OBJTOP:=${OBJROOT:H}
 .endif # ${MK_UNIFIED_OBJDIR} == "yes"
 .endif # empty(OBJTOP)
 
-# Fixup OBJROOT/OBJTOP if using MAKEOBJDIRPREFIX but leave it alone
-# for DIRDEPS_BUILD which really wants to know the absolute top at
-# all times.  This intenionally comes after adding TARGET.TARGET_ARCH
-# so that is truncated away for nested objdirs.  This logic also
-# will not trigger if the OBJROOT block above unsets MAKEOBJDIRPREFIX.
-.if !empty(MAKEOBJDIRPREFIX) && ${MK_DIRDEPS_BUILD} == "no"
+# Fixup OBJROOT/OBJTOP if using MAKEOBJDIRPREFIX.
+# This intenionally comes after adding TARGET.TARGET_ARCH so that is truncated
+# away for nested objdirs.  This logic also will not trigger if the OBJROOT
+# block above unsets MAKEOBJDIRPREFIX.
+.if !empty(MAKEOBJDIRPREFIX)
 OBJTOP:=   ${MAKEOBJDIRPREFIX}${SRCTOP}
 OBJROOT:=  ${OBJTOP}/
 .endif
@@ -211,3 +211,5 @@ OBJROOT=${SRCTOP}/
 .OBJDIR:   ${.CURDIR}
 .endif
 .endif # defined(NO_OBJ)
+
+.endif # ${MK_DIRDEPS_BUILD} == "no"
___
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: r325698 - head

2017-11-10 Thread Bryan Drewery
Author: bdrewery
Date: Sat Nov 11 01:10:50 2017
New Revision: 325698
URL: https://svnweb.freebsd.org/changeset/base/325698

Log:
  META_MODE: Avoid some logic if disabled and allow enabling with make argument.
  
  Sponsored by: Dell EMC Isilon

Modified:
  head/Makefile

Modified: head/Makefile
==
--- head/Makefile   Sat Nov 11 01:10:46 2017(r325697)
+++ head/Makefile   Sat Nov 11 01:10:50 2017(r325698)
@@ -247,8 +247,11 @@ SUB_MAKE= ${MAKE} -m ${.CURDIR}/share/mk
 _MAKE= PATH=${PATH} MAKE_CMD="${MAKE}" ${SUB_MAKE} -f Makefile.inc1 \
TARGET=${_TARGET} TARGET_ARCH=${_TARGET_ARCH}
 
+.if defined(MK_META_MODE) && ${MK_META_MODE} == "yes"
 # Only allow meta mode for the whitelisted targets.  See META_TGT_WHITELIST
-# above.
+# above.  If overridden as a make argument then don't bother trying to
+# disable it.
+.if empty(.MAKEOVERRIDES:MMK_META_MODE)
 .for _tgt in ${META_TGT_WHITELIST}
 .if make(${_tgt})
 _CAN_USE_META_MODE?= yes
@@ -256,17 +259,22 @@ _CAN_USE_META_MODE?= yes
 .endfor
 .if !defined(_CAN_USE_META_MODE)
 _MAKE+=MK_META_MODE=no
+MK_META_MODE= no
 .if defined(.PARSEDIR)
 .unexport META_MODE
 .endif
-.elif defined(MK_META_MODE) && ${MK_META_MODE} == "yes"
+.endif # !defined(_CAN_USE_META_MODE)
+.endif # empty(.MAKEOVERRIDES:MMK_META_MODE)
+
+.if ${MK_META_MODE} == "yes"
 .if !exists(/dev/filemon) && !defined(NO_FILEMON) && !make(showconfig)
 # Require filemon be loaded to provide a working incremental build
 .error ${.newline}ERROR: The filemon module (/dev/filemon) is not loaded. \
 ${.newline}ERROR: WITH_META_MODE is enabled but requires filemon for an 
incremental build. \
 ${.newline}ERROR: 'kldload filemon' or pass -DNO_FILEMON to suppress this 
error.
 .endif # !exists(/dev/filemon) && !defined(NO_FILEMON)
-.endif # !defined(_CAN_USE_META_MODE)
+.endif # ${MK_META_MODE} == yes
+.endif # defined(MK_META_MODE) && ${MK_META_MODE} == yes
 
 # Only allow AUTO_OBJ for the whitelisted targets.  See AUTO_OBJ_TGT_WHITELIST
 # above.  MK_AUTO_OBJ not checked here for "yes" as it may not yet be enabled
___
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: r325697 - head

2017-11-10 Thread Bryan Drewery
Author: bdrewery
Date: Sat Nov 11 01:10:46 2017
New Revision: 325697
URL: https://svnweb.freebsd.org/changeset/base/325697

Log:
  AUTO_OBJ: Disable in non-build targets.
  
  There's no reason to create object directories for targets like 'installworld'
  or 'distributeworld', and the others in this list.  Specifying MK_AUTO_OBJ as 
a
  make argument allows circumventing this if needed for some reason.
  
  This fixes mergemaster creating a full object tree due to doing a 'make
  installconfig' tree walk.
  
  Reported by:  Mark Millard
  Sponsored by: Dell EMC Isilon

Modified:
  head/Makefile

Modified: head/Makefile
==
--- head/Makefile   Sat Nov 11 01:10:41 2017(r325696)
+++ head/Makefile   Sat Nov 11 01:10:46 2017(r325697)
@@ -167,6 +167,18 @@ META_TGT_WHITELIST+= \
tinderbox toolchain \
toolchains universe world worlds xdev xdev-build
 
+# Likewise for AUTO_OBJ.  Many targets do not need object directories created
+# for each visited directory.  Only when things are being built are they
+# needed.  Having AUTO_OBJ disabled in a build target is fine as it should
+# fallback to running 'make obj' as needed.  If a target is not in this list
+# then it is ran with MK_AUTO_OBJ=no in environment.
+# 'showconfig' is in the list to avoid forcing MK_AUTO_OBJ=no for it.
+AUTO_OBJ_TGT_WHITELIST+= \
+   _* all all-man build* depend everything *toolchain* includes \
+   libraries obj objlink showconfig tags xdev xdev-build native-xtools \
+   stage* create-packages* real-packages sign-packages package-pkg \
+   tinderbox universe* kernel kernels world worlds bmake
+
 .ORDER: buildworld installworld
 .ORDER: buildworld distrib-dirs
 .ORDER: buildworld distribution
@@ -255,6 +267,21 @@ _MAKE+=MK_META_MODE=no
 ${.newline}ERROR: 'kldload filemon' or pass -DNO_FILEMON to suppress this 
error.
 .endif # !exists(/dev/filemon) && !defined(NO_FILEMON)
 .endif # !defined(_CAN_USE_META_MODE)
+
+# Only allow AUTO_OBJ for the whitelisted targets.  See AUTO_OBJ_TGT_WHITELIST
+# above.  MK_AUTO_OBJ not checked here for "yes" as it may not yet be enabled
+# since it is opportunistic.
+.if empty(.MAKEOVERRIDES:MMK_AUTO_OBJ)
+.for _tgt in ${AUTO_OBJ_TGT_WHITELIST}
+.if make(${_tgt})
+_CAN_USE_AUTO_OBJ?= yes
+.endif
+.endfor
+.if !defined(_CAN_USE_AUTO_OBJ)
+_MAKE+=MK_AUTO_OBJ=no
+MK_AUTO_OBJ= no
+.endif
+.endif # empty(.MAKEOVERRIDES:MMK_AUTO_OBJ)
 
 # Guess target architecture from target type, and vice versa, based on
 # historic FreeBSD practice of tending to have TARGET == TARGET_ARCH
___
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: r325695 - head

2017-11-10 Thread Bryan Drewery
Author: bdrewery
Date: Sat Nov 11 01:10:08 2017
New Revision: 325695
URL: https://svnweb.freebsd.org/changeset/base/325695

Log:
  cleanworld only needs a tree walk if the expected .OBJDIR is .CURDIR.
  
  Sponsored by: Dell EMC Isilon

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Fri Nov 10 23:54:58 2017(r325694)
+++ head/Makefile.inc1  Sat Nov 11 01:10:08 2017(r325695)
@@ -2814,7 +2814,8 @@ cleanworld cleanuniverse: .PHONY
-chflags -R 0 ${BW_CANONICALOBJDIR}
rm -rf ${BW_CANONICALOBJDIR}*
 .endif
-.if make(cleanworld) && ${MK_AUTO_OBJ} == "no"
+.if make(cleanworld) && ${MK_AUTO_OBJ} == "no" && \
+(empty(BW_CANONICALOBJDIR) || ${.CURDIR:tA} == ${BW_CANONICALOBJDIR:tA})
 .if ${.CURDIR} == ${.OBJDIR} || ${.CURDIR}/obj == ${.OBJDIR}
#   To be safe in this case, fall back to a 'make cleandir'
${_+_}@cd ${.CURDIR}; ${MAKE} cleandir
___
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: r325699 - head/share/mk

2017-11-10 Thread Bryan Drewery
Author: bdrewery
Date: Sat Nov 11 01:10:55 2017
New Revision: 325699
URL: https://svnweb.freebsd.org/changeset/base/325699

Log:
  Don't work out of a TARGET. directory if TARGET_ARCH is not defined.
  
  This fixes 'TARGET= make universe_kernels' creating an empty TARGET.
  directory and showing it in SIGINFO.
  
  Sponsored by: Dell EMC Isilon

Modified:
  head/share/mk/src.sys.obj.mk

Modified: head/share/mk/src.sys.obj.mk
==
--- head/share/mk/src.sys.obj.mkSat Nov 11 01:10:50 2017
(r325698)
+++ head/share/mk/src.sys.obj.mkSat Nov 11 01:10:55 2017
(r325699)
@@ -75,12 +75,20 @@ OBJROOT:=   ${OBJROOT:H:tA}/${OBJROOT:T}
 # append TARGET.TARGET_ARCH for that case since the user wants to build
 # in the source tree.
 .if ${MK_UNIFIED_OBJDIR} == "yes" && ${SRCTOP} != ${OBJROOT:tA}
-OBJTOP:=   
${OBJROOT}${TARGET:D${TARGET}.${TARGET_ARCH}:U${MACHINE}.${MACHINE_ARCH}}
+.if defined(TARGET) && defined(TARGET_ARCH)
+OBJTOP:=   ${OBJROOT}${TARGET}.${TARGET_ARCH}
+.elif defined(TARGET) && ${.CURDIR} == ${SRCTOP}
+# Not enough information, just use basic OBJDIR.  This can happen with some
+# 'make universe' targets or if TARGET is not being used as expected.
+OBJTOP:=   ${OBJROOT:H}
 .else
+OBJTOP:=   ${OBJROOT}${MACHINE}.${MACHINE_ARCH}
+.endif
+.else
 # TARGET.TARGET_ARCH handled in OBJROOT already.
 OBJTOP:=   ${OBJROOT:H}
 .endif # ${MK_UNIFIED_OBJDIR} == "yes"
-.endif
+.endif # empty(OBJTOP)
 
 # Fixup OBJROOT/OBJTOP if using MAKEOBJDIRPREFIX but leave it alone
 # for DIRDEPS_BUILD which really wants to know the absolute top at
___
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: r325696 - head/share/mk

2017-11-10 Thread Bryan Drewery
Author: bdrewery
Date: Sat Nov 11 01:10:41 2017
New Revision: 325696
URL: https://svnweb.freebsd.org/changeset/base/325696

Log:
  Handle MAKEOBJDIRPREFIX when already inside of .OBJDIR.
  
  This can happen in obscure cases with things like the kernel build.
  
  Sponsored by: Dell EMC Isilon

Modified:
  head/share/mk/src.sys.obj.mk

Modified: head/share/mk/src.sys.obj.mk
==
--- head/share/mk/src.sys.obj.mkSat Nov 11 01:10:08 2017
(r325695)
+++ head/share/mk/src.sys.obj.mkSat Nov 11 01:10:41 2017
(r325696)
@@ -102,7 +102,12 @@ OBJROOT:=  ${OBJTOP}/
 # __objdir is the expected .OBJDIR we want to use and that auto.obj.mk will
 # try to create.
 .if !empty(MAKEOBJDIRPREFIX)
+.if ${.CURDIR:M${MAKEOBJDIRPREFIX}/*} != ""
+# we are already in obj tree!
+__objdir=  ${.CURDIR}
+.else
 __objdir:= ${MAKEOBJDIRPREFIX}${.CURDIR}
+.endif
 .elif !empty(MAKEOBJDIR)
 __objdir:= ${MAKEOBJDIR}
 .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: r325694 - in head/sys/boot: . arm/uboot efi/boot1 efi/fdt efi/libefi efi/loader efi/loader/arch/arm64 ficl forth geli i386/boot2 i386/gptboot i386/gptzfsboot i386/libfirewire i386/libi3...

2017-11-10 Thread Warner Losh
Author: imp
Date: Fri Nov 10 23:54:58 2017
New Revision: 325694
URL: https://svnweb.freebsd.org/changeset/base/325694

Log:
  Install the 4th files in sys/boot/forth instead of each loader
  
  Also, move generation of loader.help into loader.mk. Set HELP_FILES=
  to disable this (so we only install one help file, for now). At the
  same time remove some duplicate -I lines. Fix several FILES= and
  CLEANFILES= into the += form since we're touching both of those in the
  .mk files. Make sure we only build one loader.help file per platform
  in a unified way (we were building many on some, with the last to
  install winning, though often they were the same text).
  
  Also, we're now installing loader.rc and menu.rc everywhere. arm and
  mips uboot installed these as menu.rc.sample, but there's no need
  since the loader.rc for those platforms doesn't do menu.rc processing
  by default. pcibios.4th is now installed everywhere, but will failsafe
  on non x86 platforms (it isn't loaded by default anywhere).
  
  These changes are too intertwined to do separately since aspects of
  each are required to have a bug-free commit.
  
  Sponsored by: Netflix

Deleted:
  head/sys/boot/forth/Makefile.inc
Modified:
  head/sys/boot/arm/uboot/Makefile
  head/sys/boot/defs.mk
  head/sys/boot/efi/boot1/Makefile
  head/sys/boot/efi/fdt/Makefile
  head/sys/boot/efi/libefi/Makefile
  head/sys/boot/efi/loader/Makefile
  head/sys/boot/efi/loader/arch/arm64/Makefile.inc
  head/sys/boot/ficl/Makefile
  head/sys/boot/forth/Makefile
  head/sys/boot/geli/Makefile
  head/sys/boot/i386/boot2/Makefile
  head/sys/boot/i386/gptboot/Makefile
  head/sys/boot/i386/gptzfsboot/Makefile
  head/sys/boot/i386/libfirewire/Makefile
  head/sys/boot/i386/libi386/Makefile
  head/sys/boot/i386/loader/Makefile
  head/sys/boot/i386/pxeldr/Makefile
  head/sys/boot/i386/zfsboot/Makefile
  head/sys/boot/i386/zfsloader/Makefile
  head/sys/boot/libsa/Makefile
  head/sys/boot/libsa32/Makefile
  head/sys/boot/loader.mk
  head/sys/boot/mips/beri/boot2/Makefile
  head/sys/boot/mips/beri/loader/Makefile
  head/sys/boot/mips/uboot/Makefile
  head/sys/boot/ofw/libofw/Makefile
  head/sys/boot/powerpc/boot1.chrp/Makefile
  head/sys/boot/powerpc/kboot/Makefile
  head/sys/boot/powerpc/ofw/Makefile
  head/sys/boot/powerpc/ps3/Makefile
  head/sys/boot/powerpc/uboot/Makefile
  head/sys/boot/sparc64/boot1/Makefile
  head/sys/boot/sparc64/loader/Makefile
  head/sys/boot/uboot/fdt/Makefile
  head/sys/boot/uboot/lib/Makefile
  head/sys/boot/userboot/test/Makefile
  head/sys/boot/userboot/userboot/Makefile
  head/sys/boot/zfs/Makefile

Modified: head/sys/boot/arm/uboot/Makefile
==
--- head/sys/boot/arm/uboot/MakefileFri Nov 10 23:54:48 2017
(r325693)
+++ head/sys/boot/arm/uboot/MakefileFri Nov 10 23:54:58 2017
(r325694)
@@ -12,7 +12,7 @@ LOADER_BZIP2_SUPPORT?=no
 
 .include 
 
-FILES= ubldr ubldr.bin
+FILES+=ubldr ubldr.bin
 
 NEWVERSWHAT=   "U-Boot loader" ${MACHINE_ARCH}
 INSTALLFLAGS=  -b
@@ -28,12 +28,11 @@ SRCS=   start.S conf.c self_reloc.c vers.c
 CWARNFLAGS.self_reloc.c+=  -Wno-error=maybe-uninitialized
 .endif
 
+HELP_FILES+=help.uboot ${BOOTSRC}/fdt/help.fdt
+
 # Always add MI sources
 .include   "${BOOTSRC}/loader.mk"
-CFLAGS+=   -I.
 
-CLEANFILES+=   loader.help
-
 CFLAGS+=   -ffreestanding -msoft-float
 
 LDFLAGS=   -nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH}
@@ -49,10 +48,6 @@ LDADD=   ${LIBFICL} ${LIBUBOOT} ${LIBFDT} 
${LIBUBOOT_FD
 
 OBJS+=  ${SRCS:N*.h:R:S/$/.o/g}
 
-loader.help: help.common help.uboot ${BOOTSRC}/fdt/help.fdt
-   cat ${.ALLSRC} | \
-   awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
-
 ldscript.abs:
echo "UBLDR_LOADADDR = ${UBLDR_LOADADDR};" >${.TARGET}
 
@@ -71,16 +66,5 @@ ubldr.bin: ubldr.pie
${OBJCOPY} -S -O binary ubldr.pie ${.TARGET}
 
 CLEANFILES+=   ldscript.abs ldscript.pie ubldr ubldr.pie ubldr.bin
-
-.if !defined(LOADER_ONLY)
-.PATH: ${BOOTSRC}/forth
-.include   "${BOOTSRC}/forth/Makefile.inc"
-
-# Install loader.rc.
-FILES+=loader.rc
-# Put sample menu.rc on disk but don't enable it by default.
-FILES+=menu.rc
-FILESNAME_menu.rc= menu.rc.sample
-.endif
 
 .include 

Modified: head/sys/boot/defs.mk
==
--- head/sys/boot/defs.mk   Fri Nov 10 23:54:48 2017(r325693)
+++ head/sys/boot/defs.mk   Fri Nov 10 23:54:58 2017(r325694)
@@ -122,6 +122,9 @@ LD_FLAGS+=  -m elf_i386_fbsd
 AFLAGS+=   --32
 .endif
 
+# Make sure we use the machine link we're about to create
+CFLAGS+=-I.
+
 _ILINKS=machine
 .if ${MACHINE} != ${MACHINE_CPUARCH} && ${MACHINE} != "arm64"
 _ILINKS+=${MACHINE_CPUARCH}
@@ -160,5 +163,9 @@ ${_ILINKS}:
path=`(cd $$path && /bin/pwd)` ; \
${ECHO} ${.TARGET:T} "->" $$path 

svn commit: r325690 - in head/sys/boot: . i386/loader i386/zfsloader sparc64 sparc64/loader sparc64/zfsloader

2017-11-10 Thread Warner Losh
Author: imp
Date: Fri Nov 10 23:54:31 2017
New Revision: 325690
URL: https://svnweb.freebsd.org/changeset/base/325690

Log:
  Remove LOADER_ZFS_SUPPORT as a Makefile variable
  
  LOADER_ZFS_SUPPORT is entirely used to select whether or not to
  support ZFS in the loader. But it's not a user-servicable part (MK_ZFS
  is what's used for that) Change it to the more conventional HAVE_ZFS
  and move the ZFS support code into loader.mk. In addition, only build
  ZFS libraries and boot loaders when ZFS is enabled.
  
  Sponsored by: Netflix

Modified:
  head/sys/boot/Makefile.amd64
  head/sys/boot/Makefile.i386
  head/sys/boot/Makefile.sparc64
  head/sys/boot/i386/loader/Makefile
  head/sys/boot/i386/zfsloader/Makefile
  head/sys/boot/loader.mk
  head/sys/boot/sparc64/Makefile
  head/sys/boot/sparc64/loader/Makefile
  head/sys/boot/sparc64/zfsloader/Makefile

Modified: head/sys/boot/Makefile.amd64
==
--- head/sys/boot/Makefile.amd64Fri Nov 10 23:54:24 2017
(r325689)
+++ head/sys/boot/Makefile.amd64Fri Nov 10 23:54:31 2017
(r325690)
@@ -1,7 +1,9 @@
 # $FreeBSD$
 
 SUBDIR+=   libsa32
+.if ${MK_ZFS} != "no"
 SUBDIR+=   zfs zfs32
+.endif
 .if ${MK_FORTH} != "no"
 SUBDIR+=   ficl32
 .endif

Modified: head/sys/boot/Makefile.i386
==
--- head/sys/boot/Makefile.i386 Fri Nov 10 23:54:24 2017(r325689)
+++ head/sys/boot/Makefile.i386 Fri Nov 10 23:54:31 2017(r325690)
@@ -3,6 +3,8 @@
 .if ${LOADER_GELI_SUPPORT:Uyes} == "yes"
 SUBDIR+=   geli
 .endif
+.if ${MK_ZFS} != "no"
 SUBDIR+=   zfs
+.endif
 
 SUBDIR+=   efi

Modified: head/sys/boot/Makefile.sparc64
==
--- head/sys/boot/Makefile.sparc64  Fri Nov 10 23:54:24 2017
(r325689)
+++ head/sys/boot/Makefile.sparc64  Fri Nov 10 23:54:31 2017
(r325690)
@@ -1,4 +1,6 @@
 # $FreeBSD$
 
 SUBDIR+=   ofw
+.if ${MK_ZFS} != "no"
 SUBDIR+=   zfs
+.endif

Modified: head/sys/boot/i386/loader/Makefile
==
--- head/sys/boot/i386/loader/Makefile  Fri Nov 10 23:54:24 2017
(r325689)
+++ head/sys/boot/i386/loader/Makefile  Fri Nov 10 23:54:31 2017
(r325690)
@@ -21,6 +21,8 @@ INTERNALPROG=
 NEWVERSWHAT?=  "bootstrap loader" x86
 VERSION_FILE=  ${.CURDIR}/../loader/version
 
+.PATH: ${BOOTSRC}/i386/loader
+
 # architecture-specific loader code
 SRCS=  main.c conf.c vers.c chain.c
 
@@ -28,16 +30,6 @@ SRCS=main.c conf.c vers.c chain.c
 .if defined(LOADER_FIREWIRE_SUPPORT)
 CFLAGS+=   -DLOADER_FIREWIRE_SUPPORT
 LIBFIREWIRE=   ${BOOTOBJ}/i386/libfirewire/libfirewire.a
-.endif
-
-# Set by zfsloader Makefile
-.if defined(LOADER_ZFS_SUPPORT)
-CFLAGS+=   -DLOADER_ZFS_SUPPORT
-.if ${MACHINE} == "amd64"
-LIBZFSBOOT=${BOOTOBJ}/zfs32/libzfsboot.a
-.else
-LIBZFSBOOT=${BOOTOBJ}/zfs/libzfsboot.a
-.endif
 .endif
 
 # Include bcache code.

Modified: head/sys/boot/i386/zfsloader/Makefile
==
--- head/sys/boot/i386/zfsloader/Makefile   Fri Nov 10 23:54:24 2017
(r325689)
+++ head/sys/boot/i386/zfsloader/Makefile   Fri Nov 10 23:54:31 2017
(r325690)
@@ -1,15 +1,10 @@
 # $FreeBSD$
 
-LOADER_ZFS_SUPPORT=yes
-
-.include 
-
-.PATH: ${BOOTSRC}/i386/loader
-
 LOADER=zfsloader
 NEWVERSWHAT=   "ZFS enabled bootstrap loader" x86
 LOADER_ONLY=   yes
-MAN=
+HAVE_ZFS=  yes
 
+.include 
 .include "${BOOTSRC}/i386/loader/Makefile"
 

Modified: head/sys/boot/loader.mk
==
--- head/sys/boot/loader.mk Fri Nov 10 23:54:24 2017(r325689)
+++ head/sys/boot/loader.mk Fri Nov 10 23:54:31 2017(r325690)
@@ -69,6 +69,19 @@ CFLAGS+= -DBOOT_PROMPT_123
 SRCS+= install.c
 .endif
 
+.if defined(HAVE_ZFS)
+CFLAGS+=   -DLOADER_ZFS_SUPPORT
+CFLAGS+=   -I${ZFSSRC}
+CFLAGS+=   -I${SYSDIR}/cddl/boot/zfs
+.if ${MACHINE} == "amd64"
+# Have to override to use 32-bit version of zfs library...
+# kinda lame to select that there XXX
+LIBZFSBOOT=${BOOTOBJ}/zfs32/libzfsboot.a
+.else
+LIBZFSBOOT=${BOOTOBJ}/zfs/libzfsboot.a
+.endif
+.endif
+
 CLEANFILES+=   vers.c
 VERSION_FILE?= ${.CURDIR}/version
 .if ${MK_REPRODUCIBLE_BUILD} != no

Modified: head/sys/boot/sparc64/Makefile
==
--- head/sys/boot/sparc64/Makefile  Fri Nov 10 23:54:24 2017
(r325689)
+++ head/sys/boot/sparc64/Makefile  Fri Nov 10 23:54:31 2017
(r325690)
@@ -1,5 +1,10 @@
 # $FreeBSD$
 
-SUBDIR=boot1 loader zfsboot zfsloader
+.include 

svn commit: r325691 - head/sys/boot/ficl

2017-11-10 Thread Warner Losh
Author: imp
Date: Fri Nov 10 23:54:36 2017
New Revision: 325691
URL: https://svnweb.freebsd.org/changeset/base/325691

Log:
  Remove useless PNP define here.
  
  We never use HAVE_PNP for anything, so don't define it on the command line.
  
  Sponsored by: Netflix

Modified:
  head/sys/boot/ficl/Makefile

Modified: head/sys/boot/ficl/Makefile
==
--- head/sys/boot/ficl/Makefile Fri Nov 10 23:54:31 2017(r325690)
+++ head/sys/boot/ficl/Makefile Fri Nov 10 23:54:36 2017(r325691)
@@ -10,9 +10,6 @@ BASE_SRCS=dict.c ficl.c fileaccess.c float.c loader.c
 SRCS=  ${BASE_SRCS} sysdep.c softcore.c
 CLEANFILES=softcore.c testmain testmain.o
 
-.if defined(HAVE_PNP)
-CFLAGS+=   -DHAVE_PNP
-.endif
 .include 
 .ifmake testmain
 CFLAGS+=   -DTESTMAIN -D_TESTMAIN
___
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: r325687 - in head/sys/boot/powerpc: kboot ofw ps3 uboot

2017-11-10 Thread Warner Losh
Author: imp
Date: Fri Nov 10 23:54:13 2017
New Revision: 325687
URL: https://svnweb.freebsd.org/changeset/base/325687

Log:
  Remove all the empty help files from the powerpc build.
  
  Sponsored by: Netflix

Deleted:
  head/sys/boot/powerpc/kboot/help.kboot
  head/sys/boot/powerpc/ofw/help.ofw
  head/sys/boot/powerpc/ps3/help.ps3
  head/sys/boot/powerpc/uboot/help.uboot
Modified:
  head/sys/boot/powerpc/kboot/Makefile
  head/sys/boot/powerpc/ofw/Makefile
  head/sys/boot/powerpc/ps3/Makefile
  head/sys/boot/powerpc/uboot/Makefile

Modified: head/sys/boot/powerpc/kboot/Makefile
==
--- head/sys/boot/powerpc/kboot/MakefileFri Nov 10 23:54:09 2017
(r325686)
+++ head/sys/boot/powerpc/kboot/MakefileFri Nov 10 23:54:13 2017
(r325687)
@@ -54,7 +54,7 @@ CFLAGS+= -Wa,-mppc64bridge
 DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA}
 LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA}
 
-loader.help: help.common help.kboot ${FDTSRC}/help.fdt
+loader.help: help.common ${FDTSRC}/help.fdt
cat ${.ALLSRC} | \
awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
 

Modified: head/sys/boot/powerpc/ofw/Makefile
==
--- head/sys/boot/powerpc/ofw/Makefile  Fri Nov 10 23:54:09 2017
(r325686)
+++ head/sys/boot/powerpc/ofw/Makefile  Fri Nov 10 23:54:13 2017
(r325687)
@@ -58,7 +58,7 @@ CFLAGS+=  -I${BOOTSRC}/ofw/libofw
 DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA}
 LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA}
 
-loader.help: help.common help.ofw ${FDTSRC}/help.fdt
+loader.help: help.common ${FDTSRC}/help.fdt
cat ${.ALLSRC} | \
awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
 

Modified: head/sys/boot/powerpc/ps3/Makefile
==
--- head/sys/boot/powerpc/ps3/Makefile  Fri Nov 10 23:54:09 2017
(r325686)
+++ head/sys/boot/powerpc/ps3/Makefile  Fri Nov 10 23:54:13 2017
(r325687)
@@ -55,7 +55,7 @@ SC_DFLT_FONT=cp437
 font.h:
uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 
'u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && 
uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'u_char 
dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < 
/usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'u_char 
dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h
 
-loader.help: help.common help.ps3 ${FDTSRC}/help.fdt
+loader.help: help.common ${FDTSRC}/help.fdt
cat ${.ALLSRC} | \
awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
 

Modified: head/sys/boot/powerpc/uboot/Makefile
==
--- head/sys/boot/powerpc/uboot/MakefileFri Nov 10 23:54:09 2017
(r325686)
+++ head/sys/boot/powerpc/uboot/MakefileFri Nov 10 23:54:13 2017
(r325687)
@@ -38,7 +38,7 @@ LDFLAGS=  -nostdlib -static -T ${.CURDIR}/ldscript.powe
 DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
 LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
 
-loader.help: help.common help.uboot ${BOOTSRC}/fdt/help.fdt
+loader.help: help.common ${BOOTSRC}/fdt/help.fdt
cat ${.ALLSRC} | \
awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
 
___
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: r325686 - head/sys/boot/uboot/lib

2017-11-10 Thread Warner Losh
Author: imp
Date: Fri Nov 10 23:54:09 2017
New Revision: 325686
URL: https://svnweb.freebsd.org/changeset/base/325686

Log:
  Simplify this if to a direct assignment.
  
  Sponsored by: Netflix

Modified:
  head/sys/boot/uboot/lib/Makefile

Modified: head/sys/boot/uboot/lib/Makefile
==
--- head/sys/boot/uboot/lib/MakefileFri Nov 10 23:54:03 2017
(r325685)
+++ head/sys/boot/uboot/lib/MakefileFri Nov 10 23:54:09 2017
(r325686)
@@ -17,11 +17,7 @@ CFLAGS+= -ffreestanding -msoft-float
 SRCS+= disk.c
 .endif
 
-.if ${MK_FDT} != "no"
-LOADER_FDT_SUPPORT=yes
-.else
-LOADER_FDT_SUPPORT=no
-.endif
+LOADER_FDT_SUPPORT=${MK_FDT}
 
 .if ${LOADER_FDT_SUPPORT} == "yes"
 CFLAGS+= -DLOADER_FDT_SUPPORT -I${FDTSRC}
___
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: r325693 - in head: . share/mk sys/boot sys/boot/geli sys/boot/i386/gptboot sys/boot/i386/gptzfsboot sys/boot/i386/libi386 sys/boot/i386/loader sys/boot/i386/zfsboot sys/boot/i386/zfsloa...

2017-11-10 Thread Warner Losh
Author: imp
Date: Fri Nov 10 23:54:48 2017
New Revision: 325693
URL: https://svnweb.freebsd.org/changeset/base/325693

Log:
  Move LOADER_{NO,}_GELI_SUPPORT to MK_LOADER_GELI
  
  Transition to WITH/WITHOUT_LOADER_GELI to flag support or not of GELI
  in the boot loaders. Add HAVE_GELI so components can flag they need
  support (since it's too large to include everywhere). Add temporary
  warnings for the old forms to ease transition.
  
  Also, update test script to build without GELI on x86.
  
  Sponsored by: Netflix

Added:
  head/tools/build/options/WITHOUT_LOADER_GEIL   (contents, props changed)
Modified:
  head/UPDATING
  head/share/mk/src.opts.mk
  head/sys/boot/defs.mk
  head/sys/boot/geli/Makefile
  head/sys/boot/i386/gptboot/Makefile
  head/sys/boot/i386/gptzfsboot/Makefile
  head/sys/boot/i386/libi386/Makefile
  head/sys/boot/i386/loader/Makefile
  head/sys/boot/i386/zfsboot/Makefile
  head/sys/boot/i386/zfsloader/Makefile
  head/sys/boot/sparc64/loader/Makefile
  head/sys/boot/sparc64/zfsloader/Makefile
  head/tools/boot/universe.sh

Modified: head/UPDATING
==
--- head/UPDATING   Fri Nov 10 23:54:41 2017(r325692)
+++ head/UPDATING   Fri Nov 10 23:54:48 2017(r325693)
@@ -53,7 +53,8 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
 
 201711xx:
The LOADER_FIREWIRE_SUPPORT build variable as been renamed to
-   WITH_LOADER_FIREWIRE (or WITHOUT_LOADER_FIREWIRE).
+   WITH/OUT_LOADER_FIREWIRE. LOADER_{NO_,}GELI_SUPPORT has been renamed
+   to WITH/OUT_LOADER_GELI.
 
 20171106:
The naive and non-compliant support of posix_fallocate(2) in ZFS

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Fri Nov 10 23:54:41 2017(r325692)
+++ head/share/mk/src.opts.mk   Fri Nov 10 23:54:48 2017(r325693)
@@ -119,6 +119,7 @@ __DEFAULT_YES_OPTIONS = \
 LIB32 \
 LIBPTHREAD \
 LIBTHR \
+LOADER_GELI \
 LOCALES \
 LOCATE \
 LPR \

Modified: head/sys/boot/defs.mk
==
--- head/sys/boot/defs.mk   Fri Nov 10 23:54:41 2017(r325692)
+++ head/sys/boot/defs.mk   Fri Nov 10 23:54:48 2017(r325693)
@@ -85,10 +85,26 @@ CFLAGS+= -DLOADER_GPT_SUPPORT
 .if ${LOADER_MBR_SUPPORT:Uyes} == "yes"
 CFLAGS+= -DLOADER_MBR_SUPPORT
 .endif
-.if ${LOADER_GELI_SUPPORT:Uyes} == "yes"
-CFLAGS+= -DLOADER_GELI_SUPPORT
+
+# GELI Support, with backward compat hooks
+.if defined(HAVE_GELI)
+.if defined(LOADER_NO_GELI_SUPPORT)
+MK_LOADER_GELI=no
+.warning "Please move from LOADER_NO_GELI_SUPPORT to WITHOUT_LOADER_GELI"
 .endif
+.if defined(LOADER_GELI_SUPPORT)
+MK_LOADER_GELI=yes
+.warning "Please move from LOADER_GELI_SUPPORT to WITH_LOADER_GELI"
 .endif
+.if ${MK_LOADER_GELI} == "yes"
+CFLAGS+=   -DLOADER_GELI_SUPPORT
+CFLAGS+=   -I${BOOTSRC}/geli
+LIBGELIBOOT=   ${BOOTOBJ}/geli/libgeliboot.a
+.endif
+.endif
+.endif
+
+CFLAGS+=   -I${SYSDIR}
 
 # All PowerPC builds are 32 bit. We have no 64-bit loaders on powerpc
 # or powerpc64.

Modified: head/sys/boot/geli/Makefile
==
--- head/sys/boot/geli/Makefile Fri Nov 10 23:54:41 2017(r325692)
+++ head/sys/boot/geli/Makefile Fri Nov 10 23:54:48 2017(r325693)
@@ -49,5 +49,9 @@ SRCS+=rijndael-alg-fst.c rijndael-api-fst.c 
rijndael
 CFLAGS+=   -D_STAND
 SRCS+= geliboot_crypto.c g_eli_hmac.c g_eli_key.c g_eli_key_cache.c 
pkcs5v2.c
 
+# aes
+.PATH: ${SYSDIR}/opencrypto
+SRCS+= xform_aes_xts.c
+
 .include 
 .include 

Modified: head/sys/boot/i386/gptboot/Makefile
==
--- head/sys/boot/i386/gptboot/Makefile Fri Nov 10 23:54:41 2017
(r325692)
+++ head/sys/boot/i386/gptboot/Makefile Fri Nov 10 23:54:48 2017
(r325693)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+HAVE_GELI= yes
+
 .include 
 
 .PATH: ${BOOTSRC}/i386/boot2 ${BOOTSRC}/i386/common ${SASRC}
@@ -41,14 +43,6 @@ CFLAGS+=-DBOOTPROG=\"gptboot\" \
 
 CFLAGS.gcc+=   --param max-inline-insns-single=100
 
-.if ${LOADER_GELI_SUPPORT:Uyes} == "yes"
-CFLAGS+=   -DLOADER_GELI_SUPPORT
-CFLAGS+=   -I${BOOTSRC}/geli
-LIBGELIBOOT=   ${BOOTOBJ}/geli/libgeliboot.a
-.PATH: ${SYSDIR}/opencrypto
-OPENCRYPTO_XTS=xform_aes_xts.o
-.endif
-
 LD_FLAGS+=${LD_FLAGS_BIN}
 
 CLEANFILES=gptboot
@@ -66,12 +60,12 @@ gptldr.out: gptldr.o
${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o
 
 CLEANFILES+=   gptboot.bin gptboot.out gptboot.o sio.o crc32.o drv.o \
-   cons.o util.o ${OPENCRYPTO_XTS}
+   cons.o ${OPENCRYPTO_XTS}
 
 gptboot.bin: gptboot.out
${OBJCOPY} -S -O binary gptboot.out ${.TARGET}
 

svn commit: r325688 - head/sys/boot/powerpc/ps3

2017-11-10 Thread Warner Losh
Author: imp
Date: Fri Nov 10 23:54:18 2017
New Revision: 325688
URL: https://svnweb.freebsd.org/changeset/base/325688

Log:
  FDT support doesn't make sense for ps3. There's no support in the ps3
  port for FDT, and it's unlikely to grow support for that anytime soon.
  When it does, support can be added back easily enough.
  
  Supported by: Netflix

Modified:
  head/sys/boot/powerpc/ps3/Makefile

Modified: head/sys/boot/powerpc/ps3/Makefile
==
--- head/sys/boot/powerpc/ps3/Makefile  Fri Nov 10 23:54:13 2017
(r325687)
+++ head/sys/boot/powerpc/ps3/Makefile  Fri Nov 10 23:54:18 2017
(r325688)
@@ -7,7 +7,6 @@ LOADER_NET_SUPPORT?=yes
 LOADER_NFS_SUPPORT?=   yes
 LOADER_TFTP_SUPPORT?=  no
 LOADER_GZIP_SUPPORT?=  yes
-LOADER_FDT_SUPPORT?=   no
 LOADER_BZIP2_SUPPORT?= no
 
 .include 
@@ -24,12 +23,6 @@ SRCS+=   lv1call.S ps3cons.c font.h ps3mmu.c 
ps3net.c p
ps3stor.c ps3disk.c ps3cdrom.c
 SRCS+= ucmpdi2.c
 
-.if ${LOADER_FDT_SUPPORT} == "yes"
-CFLAGS+=   -I${FDTSRC}
-CFLAGS+=   -DLOADER_FDT_SUPPORT
-LIBFDT=${BOOTOBJ}/fdt/libfdt.a
-.endif
-
 CFLAGS+=   -mcpu=powerpc64
 
 # Always add MI sources
@@ -55,7 +48,7 @@ SC_DFLT_FONT=cp437
 font.h:
uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 
'u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && 
uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'u_char 
dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < 
/usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'u_char 
dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h
 
-loader.help: help.common ${FDTSRC}/help.fdt
+loader.help: help.common
cat ${.ALLSRC} | \
awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
 
___
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: r325692 - in head: . share/mk sys/boot/i386 sys/boot/i386/loader tools/boot tools/build/options

2017-11-10 Thread Warner Losh
Author: imp
Date: Fri Nov 10 23:54:41 2017
New Revision: 325692
URL: https://svnweb.freebsd.org/changeset/base/325692

Log:
  Replace LOADER_FIREWIRE_SUPPORT variable
  
  Rename LOADER_FIREWIRE_SUPPORT to MK_LOADER_FIREWIRE. Only build
  libfirewire when this is "yes". Add note to updating. Fix build script
  to build this for x86 so the option doesn't decay. sparc64 supports
  ZFS, so also build it MK_ZFS=no.
  
  Sponsored by: Netflix

Added:
  head/tools/build/options/WITH_LOADER_FIREWIRE   (contents, props changed)
Modified:
  head/UPDATING
  head/share/mk/src.opts.mk
  head/sys/boot/i386/Makefile
  head/sys/boot/i386/Makefile.inc
  head/sys/boot/i386/loader/Makefile
  head/tools/boot/universe.sh

Modified: head/UPDATING
==
--- head/UPDATING   Fri Nov 10 23:54:36 2017(r325691)
+++ head/UPDATING   Fri Nov 10 23:54:41 2017(r325692)
@@ -51,6 +51,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
 
 ** SPECIAL WARNING: **
 
+201711xx:
+   The LOADER_FIREWIRE_SUPPORT build variable as been renamed to
+   WITH_LOADER_FIREWIRE (or WITHOUT_LOADER_FIREWIRE).
+
 20171106:
The naive and non-compliant support of posix_fallocate(2) in ZFS
has been removed as of r325320.  The system call now returns EINVAL

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Fri Nov 10 23:54:36 2017(r325691)
+++ head/share/mk/src.opts.mk   Fri Nov 10 23:54:41 2017(r325692)
@@ -180,6 +180,7 @@ __DEFAULT_NO_OPTIONS = \
 GNU_GREP_COMPAT \
 HESIOD \
 LIBSOFT \
+LOADER_FIREWIRE \
 LOADER_FORCE_LE \
 NAND \
 OFED \

Modified: head/sys/boot/i386/Makefile
==
--- head/sys/boot/i386/Makefile Fri Nov 10 23:54:36 2017(r325691)
+++ head/sys/boot/i386/Makefile Fri Nov 10 23:54:41 2017(r325692)
@@ -3,7 +3,13 @@
 .include 
 
 SUBDIR=mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot \
-   libi386 libfirewire loader
+   libi386
+
+.if ${MK_LOADER_FIREWIRE} == "yes"
+SUBDIR+=   libfirewire
+.endif
+
+SUBDIR+=   loader
 
 # special boot programs, 'self-extracting boot2+loader'
 SUBDIR+=   pxeldr

Modified: head/sys/boot/i386/Makefile.inc
==
--- head/sys/boot/i386/Makefile.inc Fri Nov 10 23:54:36 2017
(r325691)
+++ head/sys/boot/i386/Makefile.inc Fri Nov 10 23:54:41 2017
(r325692)
@@ -28,4 +28,9 @@ LD_FLAGS_BIN=-static -N --gc-sections
 DO32=1
 .endif
 
+.if defined(LOADER_FIREWIRE_SUPPORT)
+MK_LOADER_FIREWIRE=yes
+.warning "LOADER_FIREWIRE_SUPPORT deprecated, please move to 
WITH_LOADER_FIREWIRE"
+.endif
+
 .include "../Makefile.inc"

Modified: head/sys/boot/i386/loader/Makefile
==
--- head/sys/boot/i386/loader/Makefile  Fri Nov 10 23:54:36 2017
(r325691)
+++ head/sys/boot/i386/loader/Makefile  Fri Nov 10 23:54:41 2017
(r325692)
@@ -26,18 +26,17 @@ VERSION_FILE=   ${.CURDIR}/../loader/version
 # architecture-specific loader code
 SRCS=  main.c conf.c vers.c chain.c
 
-# Put LOADER_FIREWIRE_SUPPORT=yes in /etc/make.conf for FireWire/dcons support
-.if defined(LOADER_FIREWIRE_SUPPORT)
-CFLAGS+=   -DLOADER_FIREWIRE_SUPPORT
-LIBFIREWIRE=   ${BOOTOBJ}/i386/libfirewire/libfirewire.a
-.endif
-
 # Include bcache code.
 HAVE_BCACHE=   yes
 
 # Enable PnP and ISA-PnP code.
 HAVE_PNP=  yes
 HAVE_ISABUS=   yes
+
+.if ${MK_LOADER_FIREWIRE} == "yes"
+CFLAGS+=   -DLOADER_FIREWIRE_SUPPORT
+LIBFIREWIRE=   ${BOOTOBJ}/i386/libfirewire/libfirewire.a
+.endif
 
 .if ${LOADER_GELI_SUPPORT:Uyes} == "yes"
 CFLAGS+=   -DLOADER_GELI_SUPPORT

Modified: head/tools/boot/universe.sh
==
--- head/tools/boot/universe.sh Fri Nov 10 23:54:36 2017(r325691)
+++ head/tools/boot/universe.sh Fri Nov 10 23:54:41 2017(r325692)
@@ -19,9 +19,30 @@
 # Output is put into _.boot.$TARGET_ARCH.log in sys.boot.
 #
 
+dobuild()
+{
+local ta=$1
+local lf=$2
+local opt=$3
+
+echo -n "Building $ta ${opt} ... "
+if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make clean cleandepend 
cleandir obj depend"  \
+> $lf 2>&1; then
+   echo "Fail (cleanup)"
+   continue
+fi
+if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make ${opt} -j 20 all"  
\
+>> $lf 2>&1; then
+   echo "Fail (build)"
+   continue
+fi
+echo "Success"
+}
+
 top=$(make -V SRCTOP)
 cd $top/sys/boot
 
+# Default build for a goodly selection of architectures
 for i in \
amd64/amd64 \
arm/arm 

svn commit: r325689 - in head/sys/boot: . arm/uboot efi/loader efi/loader/arch/arm efi/loader/arch/arm64 mips/uboot powerpc powerpc/kboot powerpc/ofw powerpc/uboot uboot/lib

2017-11-10 Thread Warner Losh
Author: imp
Date: Fri Nov 10 23:54:24 2017
New Revision: 325689
URL: https://svnweb.freebsd.org/changeset/base/325689

Log:
  Remove LOADER_FDT_SUPPORT as a Makefile variable.
  
  LOADER_FDT_SUPPORT was used inconsistently in the tree. In some
  places, it was used to control whether or not the user wanted FDT
  included, and in other places it was a command to include
  support. Remove it entirely. The former is now enabled -DWITH_FDT,
  while the latter is controlled by Makefiles defining HAVE_FDT.
  
  Supported by: Netflix

Added:
  head/sys/boot/fdt.mk   (contents, props changed)
Modified:
  head/sys/boot/arm/uboot/Makefile
  head/sys/boot/efi/loader/Makefile
  head/sys/boot/efi/loader/arch/arm/Makefile.inc
  head/sys/boot/efi/loader/arch/arm64/Makefile.inc
  head/sys/boot/mips/uboot/Makefile
  head/sys/boot/powerpc/Makefile
  head/sys/boot/powerpc/kboot/Makefile
  head/sys/boot/powerpc/ofw/Makefile
  head/sys/boot/powerpc/uboot/Makefile
  head/sys/boot/uboot.mk
  head/sys/boot/uboot/lib/Makefile

Modified: head/sys/boot/arm/uboot/Makefile
==
--- head/sys/boot/arm/uboot/MakefileFri Nov 10 23:54:18 2017
(r325688)
+++ head/sys/boot/arm/uboot/MakefileFri Nov 10 23:54:24 2017
(r325689)
@@ -9,7 +9,6 @@ LOADER_NFS_SUPPORT?=yes
 LOADER_TFTP_SUPPORT?=  no
 LOADER_GZIP_SUPPORT?=  no
 LOADER_BZIP2_SUPPORT?= no
-LOADER_FDT_SUPPORT=${MK_FDT}
 
 .include 
 

Modified: head/sys/boot/efi/loader/Makefile
==
--- head/sys/boot/efi/loader/Makefile   Fri Nov 10 23:54:18 2017
(r325688)
+++ head/sys/boot/efi/loader/Makefile   Fri Nov 10 23:54:24 2017
(r325689)
@@ -71,13 +71,9 @@ CFLAGS+= -DSMBIOS_NETWORK_ENDIAN_UUID
 .endif
 .endif
 
-LOADER_FDT_SUPPORT?=   no
-.if ${MK_FDT} != "no" && ${LOADER_FDT_SUPPORT} != "no"
-CFLAGS+=   -I${BOOTSRC}/fdt
-CFLAGS+=   -I${BOOTSRC}/fdt
-CFLAGS+=   -DLOADER_FDT_SUPPORT
+.if defined(HAVE_FDT) && ${MK_FDT} != "no"
+.include   "${BOOTSRC}/fdt.mk"
 LIBEFI_FDT=${BOOTOBJ}/efi/fdt/libefi_fdt.a
-LIBFDT=${BOOTOBJ}/fdt/libfdt.a
 .endif
 
 # Include bcache code.

Modified: head/sys/boot/efi/loader/arch/arm/Makefile.inc
==
--- head/sys/boot/efi/loader/arch/arm/Makefile.inc  Fri Nov 10 23:54:18 
2017(r325688)
+++ head/sys/boot/efi/loader/arch/arm/Makefile.inc  Fri Nov 10 23:54:24 
2017(r325689)
@@ -3,4 +3,4 @@
 SRCS+= exec.c \
start.S
 
-LOADER_FDT_SUPPORT=yes
+HAVE_FDT=yes

Modified: head/sys/boot/efi/loader/arch/arm64/Makefile.inc
==
--- head/sys/boot/efi/loader/arch/arm64/Makefile.incFri Nov 10 23:54:18 
2017(r325688)
+++ head/sys/boot/efi/loader/arch/arm64/Makefile.incFri Nov 10 23:54:24 
2017(r325689)
@@ -1,6 +1,7 @@
 # $FreeBSD$
 
-LOADER_FDT_SUPPORT=yes
+HAVE_FDT=yes
+
 SRCS+= exec.c \
start.S
 

Added: head/sys/boot/fdt.mk
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/boot/fdt.mkFri Nov 10 23:54:24 2017(r325689)
@@ -0,0 +1,9 @@
+# $FreeBSD$
+
+.if ${MK_FDT} == "yes"
+CFLAGS+=   -I${FDTSRC}
+CFLAGS+=   -I${BOOTOBJ}/fdt
+CFLAGS+=   -I${SYSDIR}/contrib/libfdt
+CFLAGS+=   -DLOADER_FDT_SUPPORT
+LIBFDT=${BOOTOBJ}/fdt/libfdt.a
+.endif

Modified: head/sys/boot/mips/uboot/Makefile
==
--- head/sys/boot/mips/uboot/Makefile   Fri Nov 10 23:54:18 2017
(r325688)
+++ head/sys/boot/mips/uboot/Makefile   Fri Nov 10 23:54:24 2017
(r325689)
@@ -9,7 +9,6 @@ LOADER_NFS_SUPPORT?=yes
 LOADER_TFTP_SUPPORT?=  no
 LOADER_GZIP_SUPPORT?=  no
 LOADER_BZIP2_SUPPORT?= no
-LOADER_FDT_SUPPORT=${MK_FDT}
 
 .include 
 

Modified: head/sys/boot/powerpc/Makefile
==
--- head/sys/boot/powerpc/Makefile  Fri Nov 10 23:54:18 2017
(r325688)
+++ head/sys/boot/powerpc/Makefile  Fri Nov 10 23:54:24 2017
(r325689)
@@ -1,8 +1,13 @@
 # $FreeBSD$
 
-SUBDIR=boot1.chrp kboot ofw uboot
+.include 
+
+SUBDIR=boot1.chrp ofw uboot
 .if ${MACHINE_ARCH} != "powerpcspe"
 SUBDIR+=   ps3
+.endif
+.if ${MK_FDT} == "yes"
+SUBDIR+=   kboot
 .endif
 
 .include 

Modified: head/sys/boot/powerpc/kboot/Makefile
==
--- head/sys/boot/powerpc/kboot/MakefileFri Nov 10 23:54:18 2017
(r325688)
+++ head/sys/boot/powerpc/kboot/MakefileFri Nov 10 23:54:24 2017
(r325689)
@@ -8,7 +8,6 @@ LOADER_NET_SUPPORT?=yes
 

svn commit: r325685 - head/sys/boot

2017-11-10 Thread Warner Losh
Author: imp
Date: Fri Nov 10 23:54:03 2017
New Revision: 325685
URL: https://svnweb.freebsd.org/changeset/base/325685

Log:
  libsa32 isn't needed for i386. It's already a 32-bit platform and
  libfoo32 is only needed when compiling 32-bit libraries on native
  64-bit architectures, and only when that 64-bit architecture needs
  mixed 32-bit and 64-bit binaries.
  
  Sponsored by: Netflix

Modified:
  head/sys/boot/Makefile.i386

Modified: head/sys/boot/Makefile.i386
==
--- head/sys/boot/Makefile.i386 Fri Nov 10 23:30:23 2017(r325684)
+++ head/sys/boot/Makefile.i386 Fri Nov 10 23:54:03 2017(r325685)
@@ -1,6 +1,5 @@
 # $FreeBSD$
 
-SUBDIR+=   libsa32
 .if ${LOADER_GELI_SUPPORT:Uyes} == "yes"
 SUBDIR+=   geli
 .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: r325684 - in head: lib/libefivar usr.sbin/efivar

2017-11-10 Thread Warner Losh
Author: imp
Date: Fri Nov 10 23:30:23 2017
New Revision: 325684
URL: https://svnweb.freebsd.org/changeset/base/325684

Log:
  Simplify the efivar interface a little.
  
  We started out having Linux compatible libefivar interfaces. This was
  in anticipation of porting the GPL'd efibootmgr to FreeBSD via a
  port. However, since we need that functionality in the base, that port
  isn't going to happened. It also appears that efivar is a private
  library that's not used much outside a command line util and
  efibootmgr. Reduce compatibility with the Linux version a little by
  removing the mode parameter to efi_set_variable (which was unused on
  FreeBSD, and not set to something useful in the code we'd
  written). Also remove some efi error routines that were never
  implemented and existed only to placate early GPL efibootmgr porting
  experiments.
  
  Suggested by: Matt Williams
  Sponsored by: Netflix

Modified:
  head/lib/libefivar/efivar.c
  head/lib/libefivar/efivar.h
  head/usr.sbin/efivar/efivar.c

Modified: head/lib/libefivar/efivar.c
==
--- head/lib/libefivar/efivar.c Fri Nov 10 22:17:30 2017(r325683)
+++ head/lib/libefivar/efivar.c Fri Nov 10 23:30:23 2017(r325684)
@@ -150,7 +150,7 @@ efi_append_variable(efi_guid_t guid, const char *name,
 {
 
return efi_set_variable(guid, name, data, data_size,
-   attributes | EFI_VARIABLE_APPEND_WRITE, 0);
+   attributes | EFI_VARIABLE_APPEND_WRITE);
 }
 
 int
@@ -158,7 +158,7 @@ efi_del_variable(efi_guid_t guid, const char *name)
 {
 
/* data_size of 0 deletes the variable */
-   return efi_set_variable(guid, name, NULL, 0, 0, 0);
+   return efi_set_variable(guid, name, NULL, 0, 0);
 }
 
 int
@@ -358,7 +358,7 @@ efi_name_to_guid(const char *name, efi_guid_t *guid)
 
 int
 efi_set_variable(efi_guid_t guid, const char *name,
-uint8_t *data, size_t data_size, uint32_t attributes, mode_t mode __unused)
+uint8_t *data, size_t data_size, uint32_t attributes)
 {
struct efi_var_ioc var;
int rv;

Modified: head/lib/libefivar/efivar.h
==
--- head/lib/libefivar/efivar.h Fri Nov 10 22:17:30 2017(r325683)
+++ head/lib/libefivar/efivar.h Fri Nov 10 23:30:23 2017(r325684)
@@ -83,7 +83,7 @@ int efi_guid_to_symbol(efi_guid_t *guid, char **symbol
 int efi_guid_to_str(const efi_guid_t *guid, char **sp);
 int efi_name_to_guid(const char *name, efi_guid_t *guid);
 int efi_set_variable(efi_guid_t guid, const char *name,
-uint8_t *data, size_t data_size, uint32_t attributes, mode_t mode);
+uint8_t *data, size_t data_size, uint32_t attributes);
 int efi_str_to_guid(const char *s, efi_guid_t *guid);
 int efi_variables_supported(void);
 
@@ -98,38 +98,5 @@ struct uuid_table
 int efi_known_guid(struct uuid_table **);
 
 extern const efi_guid_t efi_guid_empty;
-
-/* Stubs that are expected, but aren't really used */
-static inline int
-efi_error_get(unsigned int n __unused, char ** const fn __unused,
-char ** const func __unused, int *line __unused,
-char ** const msg __unused, int *err __unused)
-{
-   return 0;
-}
-
-static inline int
-efi_error_set(const char *fn __unused, const char *func __unused,
-int line __unused, int err __unused, const char *fmt __unused, ...)
-{
-   return 0;
-}
-
-static inline void
-efi_error_clear(void)
-{
-}
-
-static inline int
-efi_error(const char *fmt __unused, ...)
-{
-   return 0;
-}
-
-static inline int
-efi_error_val(int val __unused, const char *fmt __unused, ...)
-{
-   return 0;
-}
 
 #endif /* _EFIVAR_H_ */

Modified: head/usr.sbin/efivar/efivar.c
==
--- head/usr.sbin/efivar/efivar.c   Fri Nov 10 22:17:30 2017
(r325683)
+++ head/usr.sbin/efivar/efivar.c   Fri Nov 10 23:30:23 2017
(r325684)
@@ -147,7 +147,7 @@ write_variable(char *name, char *val)
 
breakdown_name(name, , );
data = get_value(val, );
-   if (efi_set_variable(guid, vname, data, datalen, attrib, 0) < 0)
+   if (efi_set_variable(guid, vname, data, datalen, attrib) < 0)
err(1, "efi_set_variable");
 }
 
___
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: r325594 - head/sys/ddb

2017-11-10 Thread Bryan Drewery
On 11/10/2017 1:49 PM, Rodney W. Grimes wrote:
> [ Charset UTF-8 unsupported, converting... ]
>> Author: gavin
>> Date: Thu Nov  9 13:38:24 2017
>> New Revision: 325594
>> URL: https://svnweb.freebsd.org/changeset/base/325594
>>
>> Log:
>>   Point people towards our https web site for documentation, http accesses 
>> are
>>   just redirected anyway.
>>   
>>   MFC after: 1 week
> 
> Why are we not sending them to man 4 ddb
> 
>> Modified:
>>   head/sys/ddb/db_command.c
>>
>> Modified: head/sys/ddb/db_command.c
>> ==
>> --- head/sys/ddb/db_command.cThu Nov  9 13:38:17 2017
>> (r325593)
>> +++ head/sys/ddb/db_command.cThu Nov  9 13:38:24 2017
>> (r325594)
>> @@ -398,7 +398,7 @@ db_command(struct command **last_cmdp, struct command_
>>  case CMD_HELP:
>>  if (cmd_table == _cmd_table) {
>>  db_printf("This is ddb(4), the kernel debugger; "

We sort of do here ^

>> -"see http://man.freebsd.org/ddb/4 for help.\n");
>> +"see https://man.FreeBSD.org/ddb/4 for 
>> help.\n");

But I think more importantly they may be stuck in a debugger and not be
able to run 'man'.  The same could be said for opening a browser but
it's more likely they're going to have another system that can load a
website but not as assured it will be FreeBSD with the ddb manpage.

>>  db_printf("Use \"bt\" for backtrace, \"dump\" for "
>>  "kernel core dump, \"reset\" to reboot.\n");
>>  db_printf("Available commands:\n");
>>
>>
> 


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r325681 - head/sys/boot/efi/boot1

2017-11-10 Thread John Baldwin
On Friday, November 10, 2017 09:26:44 PM Ed Maste wrote:
> Author: emaste
> Date: Fri Nov 10 21:26:44 2017
> New Revision: 325681
> URL: https://svnweb.freebsd.org/changeset/base/325681
> 
> Log:
>   boot1: avoid using NULL device path
>   
>   As of r323063 boot1 printed out the path & device from which it was
>   loaded, but uboot's EFI implementation lacked some support, resulting in
>   a NULL pointer and a crash.  Check for a NULL pointer and avoid
>   reporting (and storing in the environment) the device and path in this
>   case.
>   
>   Submitted by:   Zakary Nafziger 
>   MFC after:  1 week
>   Sponsored by:   The FreeBSD Foundation
>   Differential Revision:  https://reviews.freebsd.org/D13038
> 
> Modified:
>   head/sys/boot/efi/boot1/boot1.c
> 
> Modified: head/sys/boot/efi/boot1/boot1.c
> ==
> --- head/sys/boot/efi/boot1/boot1.c   Fri Nov 10 20:30:10 2017
> (r325680)
> +++ head/sys/boot/efi/boot1/boot1.c   Fri Nov 10 21:26:44 2017
> (r325681)
> @@ -460,22 +460,23 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab)
>   imgpath = NULL;
>   if (status == EFI_SUCCESS) {
>   text = efi_devpath_name(img->FilePath);
> - printf("   Load Path: %S\n", text);
> - efi_setenv_freebsd_wcs("Boot1Path", text);
> - efi_free_devpath_name(text);
> -
> - status = BS->HandleProtocol(img->DeviceHandle, ,
> - (void **));
> - if (status != EFI_SUCCESS) {
> - DPRINTF("Failed to get image DevicePath (%lu)\n",
> - EFI_ERROR_CODE(status));
> - } else {
> - text = efi_devpath_name(imgpath);
> - printf("   Load Device: %S\n", text);
> - efi_setenv_freebsd_wcs("Boot1Dev", text);
> + if (text != NULL) {
> + printf("   Load Path: %S\n", text);
> + efi_setenv_freebsd_wcs("Boot1Path", text);
>   efi_free_devpath_name(text);
> - }
>  
> + status = BS->HandleProtocol(img->DeviceHandle,
> + , (void **));
> + if (status != EFI_SUCCESS) {
> + DPRINTF("Failed to get image DevicePath 
> (%lu)\n",
> + EFI_ERROR_CODE(status));
> + } else {
> + text = efi_devpath_name(imgpath);

Shouldn't you check this for NULL as well then?

-- 
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: r325683 - head/sys/dev/vnic

2017-11-10 Thread Ed Maste
Author: emaste
Date: Fri Nov 10 22:17:30 2017
New Revision: 325683
URL: https://svnweb.freebsd.org/changeset/base/325683

Log:
  vnic: apply BPF tap before passing packet to hardware
  
  Previously we passed tx packets to hardware via nicvf_tx_mbuf_locked
  and then to the BPF tap, with a possibly invalid mbuf which would result
  in a panic.
  
  PR:   223600
  Discussed with:   bz
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation, Packet.net (hardware)

Modified:
  head/sys/dev/vnic/nicvf_queues.c

Modified: head/sys/dev/vnic/nicvf_queues.c
==
--- head/sys/dev/vnic/nicvf_queues.cFri Nov 10 21:52:33 2017
(r325682)
+++ head/sys/dev/vnic/nicvf_queues.cFri Nov 10 22:17:30 2017
(r325683)
@@ -992,6 +992,9 @@ nicvf_xmit_locked(struct snd_queue *sq)
err = 0;
 
while ((next = drbr_peek(ifp, sq->br)) != NULL) {
+   /* Send a copy of the frame to the BPF listener */
+   ETHER_BPF_MTAP(ifp, next);
+
err = nicvf_tx_mbuf_locked(sq, );
if (err != 0) {
if (next == NULL)
@@ -1002,8 +1005,6 @@ nicvf_xmit_locked(struct snd_queue *sq)
break;
}
drbr_advance(ifp, sq->br);
-   /* Send a copy of the frame to the BPF listener */
-   ETHER_BPF_MTAP(ifp, next);
}
return (err);
 }
___
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: r325682 - head

2017-11-10 Thread Bryan Drewery
Author: bdrewery
Date: Fri Nov 10 21:52:33 2017
New Revision: 325682
URL: https://svnweb.freebsd.org/changeset/base/325682

Log:
  Remove rerelease target that was added in r38978.
  
  I'm not sure what this target is but it doesn't exist now and doesn't seem
  to have existed before.
  
  Sponsored by: Dell EMC Isilon

Modified:
  head/Makefile

Modified: head/Makefile
==
--- head/Makefile   Fri Nov 10 21:26:44 2017(r325681)
+++ head/Makefile   Fri Nov 10 21:52:33 2017(r325682)
@@ -130,7 +130,7 @@ TGTS=   all all-man buildenv buildenvvars buildkernel bu
installkernel.debug packagekernel packageworld \
reinstallkernel reinstallkernel.debug \
installworld kernel-toolchain libraries lint maninstall \
-   obj objlink rerelease showconfig tags toolchain update \
+   obj objlink showconfig tags toolchain update \
_worldtmp _legacy _bootstrap-tools _cleanobj _obj \
_build-tools _build-metadata _cross-tools _includes _libraries \
build32 distribute32 install32 buildsoft distributesoft installsoft \
___
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: r325594 - head/sys/ddb

2017-11-10 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ]
> Author: gavin
> Date: Thu Nov  9 13:38:24 2017
> New Revision: 325594
> URL: https://svnweb.freebsd.org/changeset/base/325594
> 
> Log:
>   Point people towards our https web site for documentation, http accesses are
>   just redirected anyway.
>   
>   MFC after:  1 week

Why are we not sending them to man 4 ddb

> Modified:
>   head/sys/ddb/db_command.c
> 
> Modified: head/sys/ddb/db_command.c
> ==
> --- head/sys/ddb/db_command.c Thu Nov  9 13:38:17 2017(r325593)
> +++ head/sys/ddb/db_command.c Thu Nov  9 13:38:24 2017(r325594)
> @@ -398,7 +398,7 @@ db_command(struct command **last_cmdp, struct command_
>   case CMD_HELP:
>   if (cmd_table == _cmd_table) {
>   db_printf("This is ddb(4), the kernel debugger; "
> - "see http://man.freebsd.org/ddb/4 for help.\n");
> + "see https://man.FreeBSD.org/ddb/4 for 
> help.\n");
>   db_printf("Use \"bt\" for backtrace, \"dump\" for "
>   "kernel core dump, \"reset\" to reboot.\n");
>   db_printf("Available commands:\n");
> 
> 

-- 
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: r325568 - head

2017-11-10 Thread Bryan Drewery
On 11/10/2017 1:41 PM, Rodney W. Grimes wrote:
> [ Charset UTF-8 unsupported, converting... ]
>> Author: bdrewery
>> Date: Wed Nov  8 23:41:27 2017
>> New Revision: 325568
>> URL: https://svnweb.freebsd.org/changeset/base/325568
>>
>> Log:
>>   universe: Fix creating LINT files with AUTO_OBJ.
>>   
>>   These are expected to be created in .CURDIR.
>>   
> 
> Doesn't that fly in the face of a readonly src tree?

Yes, it's the wrong behavior IMO but it's how it was working before.  I
have this on my list to come back to later to see if I can avoid it.  It
was simpler to disable the new feature for now in this case.

> 
>>   Reported by:   kib
>>   Sponsored by:  Dell EMC Isilon
>>
>> Modified:
>>   head/Makefile
>>
>> Modified: head/Makefile
>> ==
>> --- head/MakefileWed Nov  8 23:32:56 2017(r325567)
>> +++ head/MakefileWed Nov  8 23:41:27 2017(r325568)
>> @@ -553,7 +553,8 @@ universe_${target}_kernels: universe_${target}_worlds 
>>  universe_${target}_kernels: universe_${target}_prologue .MAKE .PHONY
>>  .if exists(${KERNSRCDIR}/${target}/conf/NOTES)
>>  @(cd ${KERNSRCDIR}/${target}/conf && env __MAKE_CONF=/dev/null \
>> -${SUB_MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \
>> +${SUB_MAKE} -DNO_OBJ LINT \
>> +> ${.CURDIR}/_.${target}.makeLINT 2>&1 || \
>>  (echo "${target} 'make LINT' failed," \
>>  "check _.${target}.makeLINT for details"| ${MAKEFAIL}))
>>  .endif
>>
>>
> 


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r325568 - head

2017-11-10 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ]
> Author: bdrewery
> Date: Wed Nov  8 23:41:27 2017
> New Revision: 325568
> URL: https://svnweb.freebsd.org/changeset/base/325568
> 
> Log:
>   universe: Fix creating LINT files with AUTO_OBJ.
>   
>   These are expected to be created in .CURDIR.
>   

Doesn't that fly in the face of a readonly src tree?

>   Reported by:kib
>   Sponsored by:   Dell EMC Isilon
> 
> Modified:
>   head/Makefile
> 
> Modified: head/Makefile
> ==
> --- head/Makefile Wed Nov  8 23:32:56 2017(r325567)
> +++ head/Makefile Wed Nov  8 23:41:27 2017(r325568)
> @@ -553,7 +553,8 @@ universe_${target}_kernels: universe_${target}_worlds 
>  universe_${target}_kernels: universe_${target}_prologue .MAKE .PHONY
>  .if exists(${KERNSRCDIR}/${target}/conf/NOTES)
>   @(cd ${KERNSRCDIR}/${target}/conf && env __MAKE_CONF=/dev/null \
> - ${SUB_MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \
> + ${SUB_MAKE} -DNO_OBJ LINT \
> + > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \
>   (echo "${target} 'make LINT' failed," \
>   "check _.${target}.makeLINT for details"| ${MAKEFAIL}))
>  .endif
> 
> 

-- 
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: r325681 - head/sys/boot/efi/boot1

2017-11-10 Thread Ed Maste
Author: emaste
Date: Fri Nov 10 21:26:44 2017
New Revision: 325681
URL: https://svnweb.freebsd.org/changeset/base/325681

Log:
  boot1: avoid using NULL device path
  
  As of r323063 boot1 printed out the path & device from which it was
  loaded, but uboot's EFI implementation lacked some support, resulting in
  a NULL pointer and a crash.  Check for a NULL pointer and avoid
  reporting (and storing in the environment) the device and path in this
  case.
  
  Submitted by: Zakary Nafziger 
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D13038

Modified:
  head/sys/boot/efi/boot1/boot1.c

Modified: head/sys/boot/efi/boot1/boot1.c
==
--- head/sys/boot/efi/boot1/boot1.c Fri Nov 10 20:30:10 2017
(r325680)
+++ head/sys/boot/efi/boot1/boot1.c Fri Nov 10 21:26:44 2017
(r325681)
@@ -460,22 +460,23 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab)
imgpath = NULL;
if (status == EFI_SUCCESS) {
text = efi_devpath_name(img->FilePath);
-   printf("   Load Path: %S\n", text);
-   efi_setenv_freebsd_wcs("Boot1Path", text);
-   efi_free_devpath_name(text);
-
-   status = BS->HandleProtocol(img->DeviceHandle, ,
-   (void **));
-   if (status != EFI_SUCCESS) {
-   DPRINTF("Failed to get image DevicePath (%lu)\n",
-   EFI_ERROR_CODE(status));
-   } else {
-   text = efi_devpath_name(imgpath);
-   printf("   Load Device: %S\n", text);
-   efi_setenv_freebsd_wcs("Boot1Dev", text);
+   if (text != NULL) {
+   printf("   Load Path: %S\n", text);
+   efi_setenv_freebsd_wcs("Boot1Path", text);
efi_free_devpath_name(text);
-   }
 
+   status = BS->HandleProtocol(img->DeviceHandle,
+   , (void **));
+   if (status != EFI_SUCCESS) {
+   DPRINTF("Failed to get image DevicePath 
(%lu)\n",
+   EFI_ERROR_CODE(status));
+   } else {
+   text = efi_devpath_name(imgpath);
+   printf("   Load Device: %S\n", text);
+   efi_setenv_freebsd_wcs("Boot1Dev", text);
+   efi_free_devpath_name(text);
+   }
+   }
}
 
/* Get all the device handles */
___
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: r325680 - head/sys/dev/cxgbe/common

2017-11-10 Thread Navdeep Parhar
Author: np
Date: Fri Nov 10 20:30:10 2017
New Revision: 325680
URL: https://svnweb.freebsd.org/changeset/base/325680

Log:
  cxgbe(4): Excluce mdi from the check against port capabilities.
  
  MFC after:1 week
  Sponsored by: Chelsio Communications

Modified:
  head/sys/dev/cxgbe/common/t4_hw.c

Modified: head/sys/dev/cxgbe/common/t4_hw.c
==
--- head/sys/dev/cxgbe/common/t4_hw.c   Fri Nov 10 20:10:05 2017
(r325679)
+++ head/sys/dev/cxgbe/common/t4_hw.c   Fri Nov 10 20:30:10 2017
(r325680)
@@ -3727,12 +3727,13 @@ int t4_link_l1cfg(struct adapter *adap, unsigned int m
V_FW_PORT_CAP_SPEED(M_FW_PORT_CAP_SPEED);
}
 
-   rcap = aneg | speed | fc | fec | mdi;
+   rcap = aneg | speed | fc | fec;
if ((rcap | lc->supported) != lc->supported) {
CH_WARN(adap, "rcap 0x%08x, pcap 0x%08x\n", rcap,
lc->supported);
rcap &= lc->supported;
}
+   rcap |= mdi;
 
memset(, 0, sizeof(c));
c.op_to_portid = cpu_to_be32(V_FW_CMD_OP(FW_PORT_CMD) |
___
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: r325679 - head/share/mk

2017-11-10 Thread Bryan Drewery
Author: bdrewery
Date: Fri Nov 10 20:10:05 2017
New Revision: 325679
URL: https://svnweb.freebsd.org/changeset/base/325679

Log:
  AUTO_OBJ: Don't create .OBJDIR with 'make -n'.
  
  Sponsored by: Dell EMC Isilon

Modified:
  head/share/mk/sys.mk

Modified: head/share/mk/sys.mk
==
--- head/share/mk/sys.mkFri Nov 10 20:09:15 2017(r325678)
+++ head/share/mk/sys.mkFri Nov 10 20:10:05 2017(r325679)
@@ -118,7 +118,7 @@ NO_META_IGNORE_HOST_HEADERS=1
 # This needs to be done early - before .PATH is computed
 # Don't do this for 'make showconfig' as it enables all options where meta mode
 # is not expected.
-.if !make(showconfig) && !make(print-dir)
+.if !make(showconfig) && !make(print-dir) && empty(.MAKEFLAGS:M-[nN])
 .sinclude 
 .endif
 .endif # ${MK_AUTO_OBJ} == "yes"
___
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: r325677 - head/share/mk

2017-11-10 Thread Bryan Drewery
Author: bdrewery
Date: Fri Nov 10 20:09:11 2017
New Revision: 325677
URL: https://svnweb.freebsd.org/changeset/base/325677

Log:
  Allow consuming Makefiles to add to DEPENDFILES.
  
  Sponsored by: Dell EMC Isilon

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

Modified: head/share/mk/bsd.dep.mk
==
--- head/share/mk/bsd.dep.mkFri Nov 10 19:53:17 2017(r325676)
+++ head/share/mk/bsd.dep.mkFri Nov 10 20:09:11 2017(r325677)
@@ -182,7 +182,7 @@ DEPENDSRCS= ${SRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.
 .if !empty(DEPENDSRCS)
 DEPENDOBJS+=   ${DEPENDSRCS:${OBJS_SRCS_FILTER:ts:}:S,$,.o,}
 .endif
-DEPENDFILES_OBJS=  ${DEPENDOBJS:O:u:${DEPEND_FILTER}:C/^/${DEPENDFILE}./}
+DEPENDFILES+=  ${DEPENDOBJS:O:u:${DEPEND_FILTER}:C/^/${DEPENDFILE}./}
 .if defined(_SKIP_DEPEND)
 # Don't bother statting any .meta files for .depend*
 ${DEPENDOBJS}: .NOMETA
@@ -190,7 +190,7 @@ ${DEPENDFILE}:  .NOMETA
 # Unset these to avoid looping/statting on them later.
 .undef DEPENDSRCS
 .undef DEPENDOBJS
-.undef DEPENDFILES_OBJS
+.undef DEPENDFILES
 .endif # defined(_SKIP_DEPEND)
 DEPEND_CFLAGS+=-MD ${DEPEND_MP} 
-MF${DEPENDFILE}.${.TARGET:${DEPEND_FILTER}}
 DEPEND_CFLAGS+=-MT${.TARGET}
@@ -201,7 +201,7 @@ DEPEND_CFLAGS+= -MT${.TARGET}
 DEPEND_CFLAGS_CONDITION= 
"${DEPENDOBJS:${DEPEND_FILTER}:M${.TARGET:${DEPEND_FILTER}}}" != ""
 CFLAGS+=   ${${DEPEND_CFLAGS_CONDITION}:?${DEPEND_CFLAGS}:}
 .endif
-.for __depend_obj in ${DEPENDFILES_OBJS}
+.for __depend_obj in ${DEPENDFILES}
 .if ${MAKE_VERSION} < 20160220
 .sinclude "${.OBJDIR}/${__depend_obj}"
 .else
@@ -273,7 +273,7 @@ beforebuild: depend
 depend: beforedepend ${DEPENDFILE} afterdepend
 
 # Tell bmake not to look for generated files via .PATH
-.NOPATH: ${DEPENDFILE} ${DEPENDFILES_OBJS}
+.NOPATH: ${DEPENDFILE} ${DEPENDFILES}
 
 DPSRCS+= ${SRCS}
 # A .depend file will only be generated if there are commands in
___
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: r325678 - in head/lib/clang: libclang libllvm

2017-11-10 Thread Bryan Drewery
Author: bdrewery
Date: Fri Nov 10 20:09:15 2017
New Revision: 325678
URL: https://svnweb.freebsd.org/changeset/base/325678

Log:
  Tell bsd.dep.mk which depend files to dinclude.
  
  This allows the _SKIP_DEPEND optimization to work, avoiding reading
  the files when not needed.  It also fixes META_MODE incorrectly
  reading these files when not needed.
  
  Sponsored by: Dell EMC Isilon

Modified:
  head/lib/clang/libclang/Makefile
  head/lib/clang/libllvm/Makefile

Modified: head/lib/clang/libclang/Makefile
==
--- head/lib/clang/libclang/MakefileFri Nov 10 20:09:11 2017
(r325677)
+++ head/lib/clang/libclang/MakefileFri Nov 10 20:09:15 2017
(r325678)
@@ -790,16 +790,7 @@ clang/StaticAnalyzer/Checkers/Checkers.inc: \
${CLANG_SRCS}/include/clang/StaticAnalyzer/Checkers/Checkers.td
 TGHDRS+=   clang/StaticAnalyzer/Checkers/Checkers.inc
 
-.for dep in ${TGHDRS:C/$/.d/}
-. if ${MAKE_VERSION} < 20160220
-.  if !make(depend)
-.   sinclude "${dep}"
-.  endif
-. else
-.   dinclude "${dep}"
-. endif
-.endfor
-
+DEPENDFILES+=  ${TGHDRS:C/$/.d/}
 DPSRCS+=   ${TGHDRS}
 CLEANFILES+=   ${TGHDRS} ${TGHDRS:C/$/.d/}
 

Modified: head/lib/clang/libllvm/Makefile
==
--- head/lib/clang/libllvm/Makefile Fri Nov 10 20:09:11 2017
(r325677)
+++ head/lib/clang/libllvm/Makefile Fri Nov 10 20:09:15 2017
(r325678)
@@ -1412,16 +1412,7 @@ TGHDRS+= X86GenRegisterBank.inc
 TGHDRS+=   X86GenRegisterInfo.inc
 TGHDRS+=   X86GenSubtargetInfo.inc
 
-.for dep in ${TGHDRS:C/$/.d/}
-. if ${MAKE_VERSION} < 20160220
-.  if !make(depend)
-.   sinclude "${dep}"
-.  endif
-. else
-.   dinclude "${dep}"
-. endif
-.endfor
-
+DEPENDFILES+=  ${TGHDRS:C/$/.d/}
 DPSRCS+=   ${TGHDRS}
 CLEANFILES+=   ${TGHDRS} ${TGHDRS:C/$/.d/}
 
___
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: r325676 - head/share/mk

2017-11-10 Thread Bryan Drewery
Author: bdrewery
Date: Fri Nov 10 19:53:17 2017
New Revision: 325676
URL: https://svnweb.freebsd.org/changeset/base/325676

Log:
  No need to run 'make depend' with FAST_DEPEND logic in-tree.
  
  Sponsored by: Dell EMC Isilon

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

Modified: head/share/mk/bsd.crunchgen.mk
==
--- head/share/mk/bsd.crunchgen.mk  Fri Nov 10 19:53:14 2017
(r325675)
+++ head/share/mk/bsd.crunchgen.mk  Fri Nov 10 19:53:17 2017
(r325676)
@@ -122,7 +122,11 @@ ${OUTPUTS}: ${CONF}
${CRUNCHGEN} -fq -m ${OUTMK} -c ${OUTC} ${CONF}
# Avoid redundantly calling 'make objs' which we've done by our
# own dependencies.
-   sed -i '' -e "s/^\(${PROG}:.*\) \$$(SUBMAKE_TARGETS)/\1/" ${OUTMK}
+   # Also avoid unneeded 'make depend' call.
+   sed -i '' \
+   -e "s/^\(${PROG}:.*\) \$$(SUBMAKE_TARGETS)/\1/" \
+   -e '/$$(CRUNCHMAKE) $$(BUILDOPTS).* \ &&.*/d' \
+   ${OUTMK}
 
 # These 2 targets cannot use .MAKE since they depend on the generated
 # ${OUTMK} above.
___
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: r325674 - head/share/mk

2017-11-10 Thread Bryan Drewery
Author: bdrewery
Date: Fri Nov 10 19:53:11 2017
New Revision: 325674
URL: https://svnweb.freebsd.org/changeset/base/325674

Log:
  Pass down any PROG-specific buildopts for forwarded targets.
  
  This currently has no impact.
  
  Sponsored by: Dell EMC Isilon

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

Modified: head/share/mk/bsd.crunchgen.mk
==
--- head/share/mk/bsd.crunchgen.mk  Fri Nov 10 19:53:07 2017
(r325673)
+++ head/share/mk/bsd.crunchgen.mk  Fri Nov 10 19:53:11 2017
(r325674)
@@ -161,7 +161,8 @@ ${__target}_crunchdir_${P}: .PHONY .MAKE
${_+_}cd ${CRUNCH_SRCDIR_${P}} && \
${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \
${CRUNCHARGS} \
-   DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${__target}
+   DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} \
+   ${CRUNCH_BUILDOPTS_${P}} ${__target}
 ${__target}: ${__target}_crunchdir_${P}
 .endfor
 .endfor
___
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: r325675 - head/share/mk

2017-11-10 Thread Bryan Drewery
Author: bdrewery
Date: Fri Nov 10 19:53:14 2017
New Revision: 325675
URL: https://svnweb.freebsd.org/changeset/base/325675

Log:
  AUTO_OBJ: No need to tree-walk with 'make obj' here.
  
  Sponsored by: Dell EMC Isilon

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

Modified: head/share/mk/bsd.crunchgen.mk
==
--- head/share/mk/bsd.crunchgen.mk  Fri Nov 10 19:53:11 2017
(r325674)
+++ head/share/mk/bsd.crunchgen.mk  Fri Nov 10 19:53:14 2017
(r325675)
@@ -154,7 +154,10 @@ build-tools: build-tools-${_tool}
 # Yes, this does seem to partly duplicate bsd.subdir.mk, but I can't
 # get that to cooperate with bsd.prog.mk.  Besides, many of the standard
 # targets should NOT be propagated into the components.
-.for __target in clean cleandepend cleandir obj objlink
+.if ${MK_AUTO_OBJ} == "no"
+_obj=  obj
+.endif
+.for __target in clean cleandepend cleandir ${_obj} objlink
 .for D in ${CRUNCH_SRCDIRS}
 .for P in ${CRUNCH_PROGS_${D}}
 ${__target}_crunchdir_${P}: .PHONY .MAKE
___
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: r325673 - head

2017-11-10 Thread Bryan Drewery
Author: bdrewery
Date: Fri Nov 10 19:53:07 2017
New Revision: 325673
URL: https://svnweb.freebsd.org/changeset/base/325673

Log:
  native-xtools: Fix for GCC archs.
  
  - This also adds in a _cleanobj step as needed.
  - This redirects TARGET/TARGET_ARCH to NXB_TARGET/NXB_TARGET_ARCH in
Makefile.inc1 as the main build needs to be for MACHINE rather
than TARGET.
  
First build the toolchain and then use that as an external toolchain
to build the needed directories and NXB_TARGET-toolchain, all as
MACHINE files though via TARGET_TRIPLE=MACHINE_TRIPLE.
  
The NXBDIRS is evaluated in the 'everything' submake as it needs to be
based on TARGET's src.opts.mk values, such as MK_GCC=yes when building
on a MK_CLANG=yes MACHINE.  This can likely be changed to a specific
_native-xtools-everything target later and the funky late evaluation
of SUBDIR_OVERRIDE removed.
  
  X-MFC-With:   r325001
  Pointyhat to: bdrewery
  MFC after:2 months
  Sponsored by: Dell EMC Isilon

Modified:
  head/Makefile
  head/Makefile.inc1

Modified: head/Makefile
==
--- head/Makefile   Fri Nov 10 19:52:31 2017(r325672)
+++ head/Makefile   Fri Nov 10 19:53:07 2017(r325673)
@@ -290,6 +290,15 @@ ${XTGTS}: _assert_target
 _TARGET?=  ${MACHINE}
 _TARGET_ARCH?= ${MACHINE_ARCH}
 
+.if make(native-xtools*)
+NXB_TARGET:=   ${_TARGET}
+NXB_TARGET_ARCH:=  ${_TARGET_ARCH}
+_TARGET=   ${MACHINE}
+_TARGET_ARCH=  ${MACHINE_ARCH}
+_MAKE+=NXB_TARGET=${NXB_TARGET} \
+   NXB_TARGET_ARCH=${NXB_TARGET_ARCH}
+.endif
+
 .if make(print-dir)
 .SILENT:
 .endif

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Fri Nov 10 19:52:31 2017(r325672)
+++ head/Makefile.inc1  Fri Nov 10 19:53:07 2017(r325673)
@@ -2110,7 +2110,7 @@ cross-tools: .MAKE .PHONY
 # to pickup.
 #
 NXBOBJROOT=${OBJROOT}${MACHINE}.${MACHINE_ARCH}/nxb/
-NXBOBJTOP= ${NXBOBJROOT}${TARGET}.${TARGET_ARCH}
+NXBOBJTOP= ${NXBOBJROOT}${NXB_TARGET}.${NXB_TARGET_ARCH}
 NXTP?= /nxb-bin
 .if ${NXTP:N/*}
 .error NXTP variable should be an absolute path
@@ -2180,20 +2180,27 @@ NXBDIRS+= \
 usr.bin/yacc \
 usr.sbin/chown
 
+SUBDIR_DEPEND_usr.bin/clang=   lib/clang
 .if ${MK_CLANG} != "no"
 NXBDIRS+=  lib/clang
-SUBDIR_DEPEND_usr.bin/clang=   lib/clang
 NXBDIRS+=  usr.bin/clang
-.elif ${MK_GCC} != "no"
+.endif
+.if ${MK_GCC} != "no"
 NXBDIRS+=  gnu/usr.bin/cc
 .endif
 .if ${MK_BINUTILS} != "no"
 NXBDIRS+=  gnu/usr.bin/binutils
 .endif
+# XXX: native-xtools passes along ${NXBDIRS} in SUBDIR_OVERRIDE that needs
+# to be evaluated after NXBDIRS is set.
+.if make(install) && !empty(SUBDIR_OVERRIDE)
+SUBDIR=${SUBDIR_OVERRIDE}
+.endif
 
 NXBMAKEARGS+= \
OBJTOP=${NXBOBJTOP:Q} \
OBJROOT=${NXBOBJROOT:Q} \
+   MAKEOBJDIRPREFIX= \
-DNO_SHARED \
-DNO_CPU_CFLAGS \
-DNO_PIC \
@@ -2216,7 +2223,10 @@ NXBMAKEARGS+= \
MK_WARNS=no \
MK_ZFS=no
 
-
+.if make(native-xtools*) && \
+(!defined(NXB_TARGET) || !defined(NXB_TARGET_ARCH))
+.error Missing NXB_TARGET / NXB_TARGET_ARCH
+.endif
 # For 'toolchain' we want to produce native binaries that themselves generate
 # native binaries.
 NXBTMAKE=  ${NXBMAKEENV} ${MAKE} ${NXBMAKEARGS:N-DNO_PIC:N-DNO_SHARED} \
@@ -2224,11 +2234,32 @@ NXBTMAKE=   ${NXBMAKEENV} ${MAKE} 
${NXBMAKEARGS:N-DNO_PI
 # For 'everything' we want to produce native binaries (hence -target to
 # be MACHINE) that themselves generate TARGET.TARGET_ARCH binaries.
 # TARGET/TARGET_ARCH are still passed along from user.
-NXBMAKE=   ${NXBMAKEENV} ${MAKE} ${NXBMAKEARGS} \
+#
+# Use the toolchain we create as an external toolchain.
+.if ${USING_SYSTEM_COMPILER} == "yes" || ${XCC:N${CCACHE_BIN}:M/*}
+NXBMAKE+=  XCC="${XCC}" \
+   XCXX="${XCXX}" \
+   XCPP="${XCPP}"
+.else
+NXBMAKE+=  XCC="${NXBOBJTOP}/tmp/usr/bin/cc" \
+   XCXX="${NXBOBJTOP}/tmp/usr/bin/c++" \
+   XCPP="${NXBOBJTOP}/tmp/usr/bin/cpp"
+.endif
+NXBMAKE+=  ${NXBMAKEENV} ${MAKE} -f Makefile.inc1 ${NXBMAKEARGS} \
+   TARGET=${NXB_TARGET} TARGET_ARCH=${NXB_TARGET_ARCH} \
TARGET_TRIPLE=${MACHINE_TRIPLE:Q}
+# NXBDIRS is improperly based on MACHINE rather than NXB_TARGET.  Need to
+# invoke a sub-make to reevaluate MK_GCC, etc, for NXBDIRS.
+NXBMAKE+=  SUBDIR_OVERRIDE='$${NXBDIRS:M*}'
+# Need to avoid the -isystem logic when using clang as an external toolchain
+# even if the TARGET being built for wants GCC.
+NXBMAKE+=  WANT_COMPILER_TYPE='$${X_COMPILER_TYPE}'
 native-xtools: .PHONY
+   ${_+_}cd ${.CURDIR}; ${NXBTMAKE} _cleanobj
# Build the bootstrap/host/cross tools that produce native binaries
-   ${_+_}cd ${.CURDIR}; 

svn commit: r325672 - head/share/mk

2017-11-10 Thread Bryan Drewery
Author: bdrewery
Date: Fri Nov 10 19:52:31 2017
New Revision: 325672
URL: https://svnweb.freebsd.org/changeset/base/325672

Log:
  Don't append TARGET.TARGET_ARCH if OBJTOP is already set.
  
  This avoids flipping the expected TARGET.TARGET_ARCH suffix / OBJTOP when it 
is
  already set by a parent make which wants to control it more such as in
  something like 'make native-xtools'.
  
  Sponsored by: Dell EMC Isilon

Modified:
  head/share/mk/src.sys.obj.mk

Modified: head/share/mk/src.sys.obj.mk
==
--- head/share/mk/src.sys.obj.mkFri Nov 10 19:10:14 2017
(r325671)
+++ head/share/mk/src.sys.obj.mkFri Nov 10 19:52:31 2017
(r325672)
@@ -70,6 +70,7 @@ OBJROOT:= ${OBJROOT:H:tA}/${OBJROOT:T}
 .export OBJROOT SRCTOP
 .endif
 
+.if empty(OBJTOP)
 # SRCTOP == OBJROOT only happens with clever MAKEOBJDIRPREFIX=/.  Don't
 # append TARGET.TARGET_ARCH for that case since the user wants to build
 # in the source tree.
@@ -79,6 +80,7 @@ OBJTOP:=  ${OBJROOT}${TARGET:D${TARGET}.${TARGET_ARCH}:
 # TARGET.TARGET_ARCH handled in OBJROOT already.
 OBJTOP:=   ${OBJROOT:H}
 .endif # ${MK_UNIFIED_OBJDIR} == "yes"
+.endif
 
 # Fixup OBJROOT/OBJTOP if using MAKEOBJDIRPREFIX but leave it alone
 # for DIRDEPS_BUILD which really wants to know the absolute top at
___
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: r325671 - head/sys/dev/hwpmc

2017-11-10 Thread Konstantin Belousov
Author: kib
Date: Fri Nov 10 19:10:14 2017
New Revision: 325671
URL: https://svnweb.freebsd.org/changeset/base/325671

Log:
  Check that the pmc index is less than the number of hardware PMCs,
  instead of asserting the condition.
  
  The row index is directly supplied by userspace, the kernel must
  handle invalid values.
  
  Submitted by: pho
  MFC after:3 days

Modified:
  head/sys/dev/hwpmc/hwpmc_mod.c

Modified: head/sys/dev/hwpmc/hwpmc_mod.c
==
--- head/sys/dev/hwpmc/hwpmc_mod.c  Fri Nov 10 18:46:34 2017
(r325670)
+++ head/sys/dev/hwpmc/hwpmc_mod.c  Fri Nov 10 19:10:14 2017
(r325671)
@@ -2578,10 +2578,9 @@ pmc_find_pmc(pmc_id_t pmcid, struct pmc **pmc)
struct pmc_owner *po;
struct pmc_process *pp;
 
-   KASSERT(PMC_ID_TO_ROWINDEX(pmcid) < md->pmd_npmc,
-   ("[pmc,%d] Illegal pmc index %d (max %d)", __LINE__,
-   PMC_ID_TO_ROWINDEX(pmcid), md->pmd_npmc));
PMCDBG1(PMC,FND,1, "find-pmc id=%d", pmcid);
+   if (PMC_ID_TO_ROWINDEX(pmcid) >= md->pmd_npmc)
+   return (EINVAL);
 
if ((po = pmc_find_owner_descriptor(curthread->td_proc)) == 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: r325670 - in head/sys/contrib/dev/acpica: . common compiler components/debugger components/dispatcher components/events components/namespace components/parser components/utilities include

2017-11-10 Thread Jung-uk Kim
Author: jkim
Date: Fri Nov 10 18:46:34 2017
New Revision: 325670
URL: https://svnweb.freebsd.org/changeset/base/325670

Log:
  MFV:  r325668
  
  Merge ACPICA 20171110.

Modified:
  head/sys/contrib/dev/acpica/changes.txt
  head/sys/contrib/dev/acpica/common/dmtable.c
  head/sys/contrib/dev/acpica/common/dmtbdump.c
  head/sys/contrib/dev/acpica/common/dmtbinfo.c
  head/sys/contrib/dev/acpica/compiler/asldefine.h
  head/sys/contrib/dev/acpica/compiler/dttable2.c
  head/sys/contrib/dev/acpica/compiler/dttemplate.h
  head/sys/contrib/dev/acpica/components/debugger/dbexec.c
  head/sys/contrib/dev/acpica/components/debugger/dbinput.c
  head/sys/contrib/dev/acpica/components/dispatcher/dsfield.c
  head/sys/contrib/dev/acpica/components/dispatcher/dsobject.c
  head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c
  head/sys/contrib/dev/acpica/components/dispatcher/dswload.c
  head/sys/contrib/dev/acpica/components/dispatcher/dswload2.c
  head/sys/contrib/dev/acpica/components/events/evregion.c
  head/sys/contrib/dev/acpica/components/namespace/nsconvert.c
  head/sys/contrib/dev/acpica/components/namespace/nsnames.c
  head/sys/contrib/dev/acpica/components/parser/psargs.c
  head/sys/contrib/dev/acpica/components/utilities/utdecode.c
  head/sys/contrib/dev/acpica/components/utilities/uterror.c
  head/sys/contrib/dev/acpica/components/utilities/utmutex.c
  head/sys/contrib/dev/acpica/components/utilities/utstrsuppt.c
  head/sys/contrib/dev/acpica/components/utilities/uttrack.c
  head/sys/contrib/dev/acpica/components/utilities/utxferror.c
  head/sys/contrib/dev/acpica/include/acdebug.h
  head/sys/contrib/dev/acpica/include/acdisasm.h
  head/sys/contrib/dev/acpica/include/aclocal.h
  head/sys/contrib/dev/acpica/include/acmacros.h
  head/sys/contrib/dev/acpica/include/acnamesp.h
  head/sys/contrib/dev/acpica/include/acpixf.h
  head/sys/contrib/dev/acpica/include/actbl1.h
  head/sys/contrib/dev/acpica/include/actbl2.h
  head/sys/contrib/dev/acpica/include/acutils.h
Directory Properties:
  head/sys/contrib/dev/acpica/   (props changed)

Modified: head/sys/contrib/dev/acpica/changes.txt
==
--- head/sys/contrib/dev/acpica/changes.txt Fri Nov 10 17:55:44 2017
(r325669)
+++ head/sys/contrib/dev/acpica/changes.txt Fri Nov 10 18:46:34 2017
(r325670)
@@ -1,4 +1,57 @@
 
+10 November 2017. Summary of changes for version 20171110:
+
+
+1) ACPICA kernel-resident subsystem:
+
+This release implements full support for ACPI 6.2A:
+NFIT - Added a new subtable, "Platform Capabilities Structure"
+No other changes to ACPICA were required, since ACPI 6.2A is primarily an 
+errata release of the specification.
+
+Other ACPI table changes:
+IORT: Added the SMMUv3 Device ID mapping index. Hanjun Guo
+PPTT: Added cache attribute flag definitions to actbl1.h. Jeremy 
+Linton
+
+Utilities: Modified the string/integer conversion functions to use 
+internal 64-bit divide support instead of a native divide. On 32-bit 
+platforms, a 64-bit divide typically requires a library function which 
+may not be present in the build (kernel or otherwise).
+
+Implemented a targeted error message for timeouts returned from the 
+Embedded Controller device driver. This is seen frequently enough to 
+special-case an AE_TIME returned from an EC operation region access:
+"Timeout from EC hardware or EC device driver"
+
+Changed the "ACPI Exception" message prefix to "ACPI Error" so that all 
+runtime error messages have the identical prefix.
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+AcpiXtract: Fixed a problem with table header detection within the 
+acpidump file. Processing a table could be ended early if a 0x40 (@) 
+appears in the original binary table, resulting in the @ symbol appearing 
+in the decoded ASCII field at the end of the acpidump text line. The 
+symbol caused acpixtract to incorrectly think it had reached the end of 
+the current table and the beginning of a new table.
+
+AcpiXtract: Added an option (-f) to ignore some errors during table 
+extraction. This initial implementation ignores non-ASCII and non-
+printable characters found in the acpidump text file.
+
+TestSuite(ASLTS)/AcpiExec: Fixed and restored the memory usage statistics 
+for ASLTS. This feature is used to track memory allocations from 
+different memory caches within the ACPICA code. At the end of an ASLTS 
+run, these memory statistics are recorded and stored in a log file.
+
+Debugger (user-space version): Implemented a simple "Background" command. 
+Creates a new thread to execute a control method in the background, while 
+control returns to the debugger prompt to allow additional commands.
+Syntax: Background  [Arguments]
+
+
 29 September 2017. Summary of changes for version 20170929:
 
 

Modi

Re: svn commit: r325624 - head/libexec/rtld-elf/mips

2017-11-10 Thread John Baldwin
On Friday, November 10, 2017 01:17:26 AM John Baldwin wrote:
> Author: jhb
> Date: Fri Nov 10 01:17:26 2017
> New Revision: 325624
> URL: https://svnweb.freebsd.org/changeset/base/325624
> 
> Log:
>   Some fixups to the CFI directives for PLT stub entry points.
>   
>   The directives I added in r323466 and r323501 did not define a valid
>   CFA until several instructions into the associated functions.  This
>   triggers an assertion in GDB when generating a stack trace while
>   stopped at the first instruction of PLT stub entry point since there
>   is no valid CFA rule for the first instruction.
>   
>   This is probably just wrong on my part as the non-simple .cfi_startproc
>   would have defined a valid CFA.  Instead, define a valid CFA as sp + 0
>   at the start of the functions and then use .cfa_def_offset to change the
>   offset when sp is adjusted later in the function.
>   
>   Sponsored by:   DARPA / AFRL

Forgot to note: also explicitly set .cfi_sections to only include
unwind info in .debug_frame as none of these functions catch exceptions.

-- 
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: r325667 - in head/sys/dev: mpr mps

2017-11-10 Thread Scott Long
Author: scottl
Date: Fri Nov 10 17:01:51 2017
New Revision: 325667
URL: https://svnweb.freebsd.org/changeset/base/325667

Log:
  Refactoring the interrupt setup code introduced a bug where the drivers
  would attempt to re-allocate interrupts during a chip reset without
  first de-allocating them.  Doing that right is going to be tricky, so
  just band-aid it for now so that a re-init doesn't guarantee a failure
  due to resource re-use.
  
  Reported by:  gallatin
  Sponsored by: Netflix

Modified:
  head/sys/dev/mpr/mpr.c
  head/sys/dev/mps/mps.c

Modified: head/sys/dev/mpr/mpr.c
==
--- head/sys/dev/mpr/mpr.c  Fri Nov 10 15:28:17 2017(r325666)
+++ head/sys/dev/mpr/mpr.c  Fri Nov 10 17:01:51 2017(r325667)
@@ -677,7 +677,11 @@ mpr_iocfacts_allocate(struct mpr_softc *sc, uint8_t at
return (error);
}
 
-   if ((error = mpr_pci_setup_interrupts(sc)) != 0) {
+   /*
+* XXX If the number of MSI-X vectors changes during re-init, this
+* won't see it and adjust.
+*/
+   if (attaching && (error = mpr_pci_setup_interrupts(sc)) != 0) {
mpr_dprint(sc, MPR_INIT|MPR_ERROR,
"Failed to setup interrupts\n");
mpr_free(sc);

Modified: head/sys/dev/mps/mps.c
==
--- head/sys/dev/mps/mps.c  Fri Nov 10 15:28:17 2017(r325666)
+++ head/sys/dev/mps/mps.c  Fri Nov 10 17:01:51 2017(r325667)
@@ -665,7 +665,11 @@ mps_iocfacts_allocate(struct mps_softc *sc, uint8_t at
return (error);
}
 
-   if ((error = mps_pci_setup_interrupts(sc)) != 0) {
+   /*
+* XXX If the number of MSI-X vectors changes during re-init, this
+* won't see it and adjust.
+*/
+   if (attaching && (error = mps_pci_setup_interrupts(sc)) != 0) {
mps_dprint(sc, MPS_INIT|MPS_FAULT, "Failed to setup "
"interrupts\n");
mps_free(sc);
___
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: r325664 - in head/usr.sbin: jail jexec

2017-11-10 Thread Ed Maste
Author: emaste
Date: Fri Nov 10 14:53:16 2017
New Revision: 325664
URL: https://svnweb.freebsd.org/changeset/base/325664

Log:
  Strip EOL whitespace in usr.sbin/{jail,jexec}

Modified:
  head/usr.sbin/jail/command.c
  head/usr.sbin/jail/jail.8
  head/usr.sbin/jail/jail.c
  head/usr.sbin/jexec/jexec.c

Modified: head/usr.sbin/jail/command.c
==
--- head/usr.sbin/jail/command.cFri Nov 10 14:46:50 2017
(r325663)
+++ head/usr.sbin/jail/command.cFri Nov 10 14:53:16 2017
(r325664)
@@ -432,7 +432,7 @@ run_command(struct cfjail *j)
 
argv[argc] = down ? "-alias" : "alias";
argv[argc + 1] = NULL;
-   break;  
+   break;
 #endif
 
case IP_VNET_INTERFACE:
@@ -603,13 +603,13 @@ run_command(struct cfjail *j)
bg = 1;
}
comcs = alloca(comstring->len + 1);
-   strcpy(comcs, comstring->s);
+   strcpy(comcs, comstring->s);
argc = 0;
for (cs = strtok(comcs, " \t\f\v\r\n"); cs;
 cs = strtok(NULL, " \t\f\v\r\n"))
argc++;
argv = alloca((argc + 1) * sizeof(char *));
-   strcpy(comcs, comstring->s);
+   strcpy(comcs, comstring->s);
argc = 0;
for (cs = strtok(comcs, " \t\f\v\r\n"); cs;
 cs = strtok(NULL, " \t\f\v\r\n"))

Modified: head/usr.sbin/jail/jail.8
==
--- head/usr.sbin/jail/jail.8   Fri Nov 10 14:46:50 2017(r325663)
+++ head/usr.sbin/jail/jail.8   Fri Nov 10 14:53:16 2017(r325664)
@@ -483,7 +483,7 @@ and uname -K.
 Some restrictions of the jail environment may be set on a per-jail
 basis.
 With the exception of
-.Va allow.set_hostname 
+.Va allow.set_hostname
 and
 .Va allow.reserved_ports ,
 these boolean parameters are off by default.
@@ -614,7 +614,7 @@ Sockets within a jail are normally restricted to IPv4,
 (UNIX), and route.  This allows access to other protocol stacks that
 have not had jail functionality added to them.
 .It Va allow.reserved_ports
-The jail root may bind to ports lower than 1024. 
+The jail root may bind to ports lower than 1024.
 .El
 .El
 .Pp

Modified: head/usr.sbin/jail/jail.c
==
--- head/usr.sbin/jail/jail.c   Fri Nov 10 14:46:50 2017(r325663)
+++ head/usr.sbin/jail/jail.c   Fri Nov 10 14:53:16 2017(r325664)
@@ -94,7 +94,7 @@ static const enum intparam startcommands[] = {
 IP_MOUNT_DEVFS,
 IP_MOUNT_FDESCFS,
 IP_MOUNT_PROCFS,
-IP_EXEC_PRESTART, 
+IP_EXEC_PRESTART,
 IP__OP,
 IP_VNET_INTERFACE,
 IP_EXEC_START,
@@ -269,7 +269,7 @@ main(int argc, char **argv)
, , NULL, 0) == 0)
add_param(NULL, NULL,
perm_sysctl[pi].ipnum,
-   (sysval ? 1 : 0) ^ 
+   (sysval ? 1 : 0) ^
perm_sysctl[pi].rev
? NULL : "false");
}

Modified: head/usr.sbin/jexec/jexec.c
==
--- head/usr.sbin/jexec/jexec.c Fri Nov 10 14:46:50 2017(r325663)
+++ head/usr.sbin/jexec/jexec.c Fri Nov 10 14:53:16 2017(r325664)
@@ -187,5 +187,5 @@ usage(void)
 
fprintf(stderr, "%s\n",
"usage: jexec [-l] [-u username | -U username] jail [command ...]");
-   exit(1); 
+   exit(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: r325662 - in head/sys/dev/mlx5: . mlx5_ib

2017-11-10 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Nov 10 14:39:03 2017
New Revision: 325662
URL: https://svnweb.freebsd.org/changeset/base/325662

Log:
  Add more and update existing mlx5 core firmware structure definitions and 
bits.
  This change is part of coming ibcore and mlx5ib updates.
  
  Sponsored by: Mellanox Technologies
  MFC after:1 week

Modified:
  head/sys/dev/mlx5/device.h
  head/sys/dev/mlx5/driver.h
  head/sys/dev/mlx5/mlx5_ib/mlx5_ib_qp.c
  head/sys/dev/mlx5/mlx5_ifc.h
  head/sys/dev/mlx5/qp.h

Modified: head/sys/dev/mlx5/device.h
==
--- head/sys/dev/mlx5/device.h  Fri Nov 10 14:19:22 2017(r325661)
+++ head/sys/dev/mlx5/device.h  Fri Nov 10 14:39:03 2017(r325662)
@@ -100,6 +100,35 @@ __mlx5_mask(typ, fld))
 
 #define MLX5_GET64(typ, p, fld) be64_to_cpu(*((__be64 *)(p) + 
__mlx5_64_off(typ, fld)))
 
+#define MLX5_GET64_BE(typ, p, fld) (*((__be64 *)(p) +\
+   __mlx5_64_off(typ, fld)))
+
+#define MLX5_GET_BE(type_t, typ, p, fld) ({  \
+   type_t tmp;   \
+   switch (sizeof(tmp)) {\
+   case sizeof(u8):  \
+   tmp = (__force type_t)MLX5_GET(typ, p, fld);  \
+   break;\
+   case sizeof(u16): \
+   tmp = (__force type_t)cpu_to_be16(MLX5_GET(typ, p, 
fld)); \
+   break;\
+   case sizeof(u32): \
+   tmp = (__force type_t)cpu_to_be32(MLX5_GET(typ, p, 
fld)); \
+   break;\
+   case sizeof(u64): \
+   tmp = (__force type_t)MLX5_GET64_BE(typ, p, fld); \
+   break;\
+   } \
+   tmp;  \
+   })
+
+#define MLX5_BY_PASS_NUM_REGULAR_PRIOS 8
+#define MLX5_BY_PASS_NUM_DONT_TRAP_PRIOS 8
+#define MLX5_BY_PASS_NUM_MULTICAST_PRIOS 1
+#define MLX5_BY_PASS_NUM_PRIOS (MLX5_BY_PASS_NUM_REGULAR_PRIOS +\
+MLX5_BY_PASS_NUM_DONT_TRAP_PRIOS +\
+MLX5_BY_PASS_NUM_MULTICAST_PRIOS)
+
 enum {
MLX5_MAX_COMMANDS   = 32,
MLX5_CMD_DATA_BLOCK_SIZE= 512,
@@ -326,6 +355,17 @@ enum {
MLX5_CAP_OFF_CMDIF_CSUM = 46,
 };
 
+enum {
+   /*
+* Max wqe size for rdma read is 512 bytes, so this
+* limits our max_sge_rd as the wqe needs to fit:
+* - ctrl segment (16 bytes)
+* - rdma segment (16 bytes)
+* - scatter elements (16 bytes each)
+*/
+   MLX5_MAX_SGE_RD = (512 - 16 - 16) / 16
+};
+
 struct mlx5_inbox_hdr {
__be16  opcode;
u8  rsvd[4];
@@ -648,9 +688,9 @@ enum {
 };
 
 enum {
-   CQE_ROCE_L3_HEADER_TYPE_GRH = 0x0,
-   CQE_ROCE_L3_HEADER_TYPE_IPV6= 0x1,
-   CQE_ROCE_L3_HEADER_TYPE_IPV4= 0x2,
+   MLX5_CQE_ROCE_L3_HEADER_TYPE_GRH= 0x0,
+   MLX5_CQE_ROCE_L3_HEADER_TYPE_IPV6   = 0x1,
+   MLX5_CQE_ROCE_L3_HEADER_TYPE_IPV4   = 0x2,
 };
 
 enum {
@@ -1288,6 +1328,7 @@ enum {
MLX5_PER_PRIORITY_COUNTERS_GROUP  = 0x10,
MLX5_PER_TRAFFIC_CLASS_COUNTERS_GROUP = 0x11,
MLX5_PHYSICAL_LAYER_COUNTERS_GROUP= 0x12,
+   MLX5_PHYSICAL_LAYER_STATISTICAL_GROUP = 0x16,
MLX5_INFINIBAND_PORT_COUNTERS_GROUP = 0x20,
 };
 

Modified: head/sys/dev/mlx5/driver.h
==
--- head/sys/dev/mlx5/driver.h  Fri Nov 10 14:19:22 2017(r325661)
+++ head/sys/dev/mlx5/driver.h  Fri Nov 10 14:39:03 2017(r325662)
@@ -306,6 +306,11 @@ struct cmd_msg_cache {
 
 };
 
+struct mlx5_traffic_counter {
+   u64 packets;
+   u64 octets;
+};
+
 struct mlx5_cmd_stats {
u64 sum;
u64 n;
@@ -743,6 +748,13 @@ struct mlx5_pas {
u8  log_sz;
 };
 
+enum port_state_policy {
+   MLX5_POLICY_DOWN= 0,
+   MLX5_POLICY_UP  = 1,
+   MLX5_POLICY_FOLLOW  = 2,
+   MLX5_POLICY_INVALID = 0x
+};
+
 static inline void *
 mlx5_buf_offset(struct mlx5_buf *buf, int offset)
 {
@@ -809,6 +821,11 @@ static inline void *mlx5_vmalloc(unsigned long size)
if (!rtn)
rtn = vmalloc(size);
return rtn;
+}
+
+static inline u32 mlx5_base_mkey(const u32 key)
+{
+   return key & 0xff00u;
 }
 
 

svn commit: r325661 - head/sys/dev/mlx5/mlx5_en

2017-11-10 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Nov 10 14:19:22 2017
New Revision: 325661
URL: https://svnweb.freebsd.org/changeset/base/325661

Log:
  Expose the current hardware MTU in mlx5en(4) as a separate entry
  in the sysctl tree.
  
  Sponsored by: Mellanox Technologies
  MFC after:1 week

Modified:
  head/sys/dev/mlx5/mlx5_en/en.h
  head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c
  head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c

Modified: head/sys/dev/mlx5/mlx5_en/en.h
==
--- head/sys/dev/mlx5/mlx5_en/en.h  Fri Nov 10 14:14:54 2017
(r325660)
+++ head/sys/dev/mlx5/mlx5_en/en.h  Fri Nov 10 14:19:22 2017
(r325661)
@@ -412,6 +412,7 @@ struct mlx5e_params {
   m(+1, u64 modify_rx_dma, "modify_rx_dma", "0: Enable RX 1: Disable RX") \
   m(+1, u64 diag_pci_enable, "diag_pci_enable", "0: Disabled 1: Enabled") \
   m(+1, u64 diag_general_enable, "diag_general_enable", "0: Disabled 1: 
Enabled") \
+  m(+1, u64 hw_mtu, "hw_mtu", "Current hardware MTU value") \
   m(+1, u64 mc_local_lb, "mc_local_lb", "0: Local multicast loopback enabled 
1: Disabled") \
   m(+1, u64 uc_local_lb, "uc_local_lb", "0: Local unicast loopback enabled 1: 
Disabled")
 

Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c
==
--- head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Fri Nov 10 14:14:54 2017
(r325660)
+++ head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Fri Nov 10 14:19:22 2017
(r325661)
@@ -778,7 +778,8 @@ mlx5e_create_ethtool(struct mlx5e_priv *priv)
return;
for (x = 0; x != MLX5E_PARAMS_NUM; x++) {
/* check for read-only parameter */
-   if (strstr(mlx5e_params_desc[2 * x], "_max") != NULL) {
+   if (strstr(mlx5e_params_desc[2 * x], "_max") != NULL ||
+   strstr(mlx5e_params_desc[2 * x], "_mtu") != NULL) {
SYSCTL_ADD_PROC(>sysctl_ctx, 
SYSCTL_CHILDREN(node), OID_AUTO,
mlx5e_params_desc[2 * x], CTLTYPE_U64 | CTLFLAG_RD |
CTLFLAG_MPSAFE, priv, x, _ethtool_handler, 
"QU",

Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
==
--- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.cFri Nov 10 14:14:54 2017
(r325660)
+++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.cFri Nov 10 14:19:22 2017
(r325661)
@@ -2298,10 +2298,13 @@ mlx5e_set_dev_port_mtu(struct ifnet *ifp, int sw_mtu)
__func__, sw_mtu, err);
return (err);
}
+
+   ifp->if_mtu = sw_mtu;
err = mlx5_query_port_oper_mtu(mdev, _mtu);
if (err) {
if_printf(ifp, "Query port MTU, after setting new "
"MTU value, failed\n");
+   return (err);
} else if (MLX5E_HW2SW_MTU(hw_mtu) < sw_mtu) {
err = -E2BIG,
if_printf(ifp, "Port MTU %d is smaller than "
@@ -2311,7 +2314,8 @@ mlx5e_set_dev_port_mtu(struct ifnet *ifp, int sw_mtu)
 if_printf(ifp, "Port MTU %d is bigger than "
 "ifp mtu %d\n", hw_mtu, sw_mtu);
}
-   ifp->if_mtu = sw_mtu;
+   priv->params_ethtool.hw_mtu = hw_mtu;
+
return (err);
 }
 
___
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: r325660 - head/sys/dev/mlx5/mlx5_en

2017-11-10 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Nov 10 14:14:54 2017
New Revision: 325660
URL: https://svnweb.freebsd.org/changeset/base/325660

Log:
  Add support for configuring local multicast and unicast data traffic loopback
  in mlx5en(4) driver via the sysctl interface.
  
  Sponsored by: Mellanox Technologies
  MFC after:1 week

Modified:
  head/sys/dev/mlx5/mlx5_en/en.h
  head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c

Modified: head/sys/dev/mlx5/mlx5_en/en.h
==
--- head/sys/dev/mlx5/mlx5_en/en.h  Fri Nov 10 14:10:41 2017
(r325659)
+++ head/sys/dev/mlx5/mlx5_en/en.h  Fri Nov 10 14:14:54 2017
(r325660)
@@ -411,7 +411,9 @@ struct mlx5e_params {
   m(+1, u64 modify_tx_dma, "modify_tx_dma", "0: Enable TX 1: Disable TX") \
   m(+1, u64 modify_rx_dma, "modify_rx_dma", "0: Enable RX 1: Disable RX") \
   m(+1, u64 diag_pci_enable, "diag_pci_enable", "0: Disabled 1: Enabled") \
-  m(+1, u64 diag_general_enable, "diag_general_enable", "0: Disabled 1: 
Enabled")
+  m(+1, u64 diag_general_enable, "diag_general_enable", "0: Disabled 1: 
Enabled") \
+  m(+1, u64 mc_local_lb, "mc_local_lb", "0: Local multicast loopback enabled 
1: Disabled") \
+  m(+1, u64 uc_local_lb, "uc_local_lb", "0: Local unicast loopback enabled 1: 
Disabled")
 
 #defineMLX5E_PARAMS_NUM (0 MLX5E_PARAMS(MLX5E_STATS_COUNT))
 

Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c
==
--- head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Fri Nov 10 14:10:41 2017
(r325659)
+++ head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Fri Nov 10 14:14:54 2017
(r325660)
@@ -421,6 +421,30 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARGS)
priv->params_ethtool.diag_general_enable);
break;
 
+   case MLX5_PARAM_OFFSET(mc_local_lb):
+   priv->params_ethtool.mc_local_lb =
+   priv->params_ethtool.mc_local_lb ? 1 : 0;
+
+   if (MLX5_CAP_GEN(priv->mdev, disable_local_lb)) {
+   error = mlx5_nic_vport_modify_local_lb(priv->mdev,
+   MLX5_LOCAL_MC_LB, priv->params_ethtool.mc_local_lb);
+   } else {
+   error = EOPNOTSUPP;
+   }
+   break;
+
+   case MLX5_PARAM_OFFSET(uc_local_lb):
+   priv->params_ethtool.uc_local_lb =
+   priv->params_ethtool.uc_local_lb ? 1 : 0;
+
+   if (MLX5_CAP_GEN(priv->mdev, disable_local_lb)) {
+   error = mlx5_nic_vport_modify_local_lb(priv->mdev,
+   MLX5_LOCAL_UC_LB, priv->params_ethtool.uc_local_lb);
+   } else {
+   error = EOPNOTSUPP;
+   }
+   break;
+
default:
break;
}
@@ -731,6 +755,20 @@ mlx5e_create_ethtool(struct mlx5e_priv *priv)
priv->params_ethtool.hw_lro = priv->params.hw_lro_en;
priv->params_ethtool.cqe_zipping = priv->params.cqe_zipping_en;
mlx5e_ethtool_sync_tx_completion_fact(priv);
+
+   /* get default values for local loopback, if any */
+   if (MLX5_CAP_GEN(priv->mdev, disable_local_lb)) {
+   int err;
+   u8 val;
+
+   err = mlx5_nic_vport_query_local_lb(priv->mdev, 
MLX5_LOCAL_MC_LB, );
+   if (err == 0)
+   priv->params_ethtool.mc_local_lb = val;
+
+   err = mlx5_nic_vport_query_local_lb(priv->mdev, 
MLX5_LOCAL_UC_LB, );
+   if (err == 0)
+   priv->params_ethtool.uc_local_lb = val;
+   }
 
/* create root node */
node = SYSCTL_ADD_NODE(>sysctl_ctx,
___
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: r325659 - head/sys/dev/mlx5/mlx5_en

2017-11-10 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Nov 10 14:10:41 2017
New Revision: 325659
URL: https://svnweb.freebsd.org/changeset/base/325659

Log:
  Add support for disabling and enabling RX and TX DMA rings in mlx5en(4).
  This is useful for supporting setups similar to Netmap.
  
  Sponsored by: Mellanox Technologies
  MFC after:1 week

Modified:
  head/sys/dev/mlx5/mlx5_en/en.h
  head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c
  head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c

Modified: head/sys/dev/mlx5/mlx5_en/en.h
==
--- head/sys/dev/mlx5/mlx5_en/en.h  Fri Nov 10 14:02:12 2017
(r325658)
+++ head/sys/dev/mlx5/mlx5_en/en.h  Fri Nov 10 14:10:41 2017
(r325659)
@@ -408,6 +408,8 @@ struct mlx5e_params {
   m(+1, u64 tx_completion_fact_max, "tx_completion_fact_max", "Maximum 
completion event ratio") \
   m(+1, u64 hw_lro, "hw_lro", "set to enable hw_lro") \
   m(+1, u64 cqe_zipping, "cqe_zipping", "0 : CQE zipping disabled") \
+  m(+1, u64 modify_tx_dma, "modify_tx_dma", "0: Enable TX 1: Disable TX") \
+  m(+1, u64 modify_rx_dma, "modify_rx_dma", "0: Enable RX 1: Disable RX") \
   m(+1, u64 diag_pci_enable, "diag_pci_enable", "0: Disabled 1: Enabled") \
   m(+1, u64 diag_general_enable, "diag_general_enable", "0: Disabled 1: 
Enabled")
 
@@ -837,5 +839,8 @@ int mlx5e_enable_sq(struct mlx5e_sq *, struct mlx5e_sq
 intmlx5e_modify_sq(struct mlx5e_sq *, int curr_state, int next_state);
 void   mlx5e_disable_sq(struct mlx5e_sq *);
 void   mlx5e_drain_sq(struct mlx5e_sq *);
+void   mlx5e_modify_tx_dma(struct mlx5e_priv *priv, uint8_t value);
+void   mlx5e_modify_rx_dma(struct mlx5e_priv *priv, uint8_t value);
+void   mlx5e_resume_sq(struct mlx5e_sq *sq);
 
 #endif /* _MLX5_EN_H_ */

Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c
==
--- head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Fri Nov 10 14:02:12 2017
(r325658)
+++ head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Fri Nov 10 14:10:41 2017
(r325659)
@@ -377,6 +377,32 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARGS)
mlx5e_open_locked(priv->ifp);
break;
 
+   case MLX5_PARAM_OFFSET(modify_tx_dma):
+   /* check if network interface is opened */
+   if (was_opened) {
+   priv->params_ethtool.modify_tx_dma =
+   priv->params_ethtool.modify_tx_dma ? 1 : 0;
+   /* modify tx according to value */
+   mlx5e_modify_tx_dma(priv, value != 0);
+   } else {
+   /* if closed force enable tx */
+   priv->params_ethtool.modify_tx_dma = 0;
+   }
+   break;
+
+   case MLX5_PARAM_OFFSET(modify_rx_dma):
+   /* check if network interface is opened */
+   if (was_opened) {
+   priv->params_ethtool.modify_rx_dma =
+   priv->params_ethtool.modify_rx_dma ? 1 : 0;
+   /* modify rx according to value */
+   mlx5e_modify_rx_dma(priv, value != 0);
+   } else {
+   /* if closed force enable rx */
+   priv->params_ethtool.modify_rx_dma = 0;
+   }
+   break;
+
case MLX5_PARAM_OFFSET(diag_pci_enable):
priv->params_ethtool.diag_pci_enable =
priv->params_ethtool.diag_pci_enable ? 1 : 0;

Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
==
--- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.cFri Nov 10 14:02:12 2017
(r325658)
+++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.cFri Nov 10 14:10:41 2017
(r325659)
@@ -2928,6 +2928,164 @@ sysctl_firmware(SYSCTL_HANDLER_ARGS)
 }
 
 static void
+mlx5e_disable_tx_dma(struct mlx5e_channel *ch)
+{
+   int i;
+
+   for (i = 0; i < ch->num_tc; i++)
+   mlx5e_drain_sq(>sq[i]);
+}
+
+static void
+mlx5e_reset_sq_doorbell_record(struct mlx5e_sq *sq)
+{
+
+   sq->doorbell.d32[0] = cpu_to_be32(MLX5_OPCODE_NOP);
+   sq->doorbell.d32[1] = cpu_to_be32(sq->sqn << 8);
+   mlx5e_tx_notify_hw(sq, sq->doorbell.d32, 0);
+   sq->doorbell.d64 = 0;
+}
+
+void
+mlx5e_resume_sq(struct mlx5e_sq *sq)
+{
+   int err;
+
+   /* check if already enabled */
+   if (sq->stopped == 0)
+   return;
+
+   err = mlx5e_modify_sq(sq, MLX5_SQC_STATE_ERR,
+   MLX5_SQC_STATE_RST);
+   if (err != 0) {
+   if_printf(sq->ifp,
+   "mlx5e_modify_sq() from ERR to RST failed: %d\n", err);
+   }
+
+   sq->cc = 0;
+   sq->pc = 0;
+
+   /* reset doorbell prior to moving from RST to RDY */
+   mlx5e_reset_sq_doorbell_record(sq);
+
+   err = 

svn commit: r325658 - in head/sys/dev/mlx5: . mlx5_core

2017-11-10 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Nov 10 14:02:12 2017
New Revision: 325658
URL: https://svnweb.freebsd.org/changeset/base/325658

Log:
  Make physical address of init segment available in the priv of mlx5 core.
  This change is needed by mlx5ib(4).
  
  Sponsored by: Mellanox Technologies
  MFC after:1 week

Modified:
  head/sys/dev/mlx5/driver.h
  head/sys/dev/mlx5/mlx5_core/mlx5_main.c

Modified: head/sys/dev/mlx5/driver.h
==
--- head/sys/dev/mlx5/driver.h  Fri Nov 10 13:58:49 2017(r325657)
+++ head/sys/dev/mlx5/driver.h  Fri Nov 10 14:02:12 2017(r325658)
@@ -590,6 +590,7 @@ struct mlx5_core_dev {
struct mlx5_port_caps   port_caps[MLX5_MAX_PORTS];
u32 hca_caps_cur[MLX5_CAP_NUM][MLX5_UN_SZ_DW(hca_cap_union)];
u32 hca_caps_max[MLX5_CAP_NUM][MLX5_UN_SZ_DW(hca_cap_union)];
+   phys_addr_t iseg_base;
struct mlx5_init_seg __iomem *iseg;
enum mlx5_device_state  state;
void(*event) (struct mlx5_core_dev *dev,

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_main.c
==
--- head/sys/dev/mlx5/mlx5_core/mlx5_main.c Fri Nov 10 13:58:49 2017
(r325657)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_main.c Fri Nov 10 14:02:12 2017
(r325658)
@@ -716,8 +716,8 @@ static int mlx5_dev_init(struct mlx5_core_dev *dev, st
goto err_clr_master;
}
 
-   dev->iseg = ioremap(pci_resource_start(dev->pdev, 0),
-   sizeof(*dev->iseg));
+   dev->iseg_base = pci_resource_start(dev->pdev, 0);
+   dev->iseg = ioremap(dev->iseg_base, sizeof(*dev->iseg));
if (!dev->iseg) {
err = -ENOMEM;
device_printf((>dev)->bsddev, "ERR: ""Failed mapping 
initialization segment, aborting\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: r325657 - in head/sys/dev/mlx5: . mlx5_core

2017-11-10 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Nov 10 13:58:49 2017
New Revision: 325657
URL: https://svnweb.freebsd.org/changeset/base/325657

Log:
  Add API function to query port performance counters for infiniband and RoCE
  traffic in mlx5 core.
  
  Sponsored by: Mellanox Technologies
  MFC after:1 week

Modified:
  head/sys/dev/mlx5/mlx5_core/mlx5_vport.c
  head/sys/dev/mlx5/vport.h

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_vport.c
==
--- head/sys/dev/mlx5/mlx5_core/mlx5_vport.cFri Nov 10 13:56:11 2017
(r325656)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_vport.cFri Nov 10 13:58:49 2017
(r325657)
@@ -1757,3 +1757,25 @@ out:
return err;
 }
 EXPORT_SYMBOL_GPL(mlx5_query_hca_vport_state);
+
+int mlx5_core_query_ib_ppcnt(struct mlx5_core_dev *dev,
+u8 port_num, void *out, size_t sz)
+{
+   u32 *in;
+   int err;
+
+   in  = mlx5_vzalloc(sz);
+   if (!in) {
+   err = -ENOMEM;
+   return err;
+   }
+
+   MLX5_SET(ppcnt_reg, in, local_port, port_num);
+
+   MLX5_SET(ppcnt_reg, in, grp, MLX5_INFINIBAND_PORT_COUNTERS_GROUP);
+   err = mlx5_core_access_reg(dev, in, sz, out,
+  sz, MLX5_REG_PPCNT, 0, 0);
+
+   kvfree(in);
+   return err;
+}

Modified: head/sys/dev/mlx5/vport.h
==
--- head/sys/dev/mlx5/vport.h   Fri Nov 10 13:56:11 2017(r325656)
+++ head/sys/dev/mlx5/vport.h   Fri Nov 10 13:58:49 2017(r325657)
@@ -143,4 +143,6 @@ int mlx5_query_vport_counter(struct mlx5_core_dev *dev
 void *out, int out_size);
 int mlx5_get_vport_counters(struct mlx5_core_dev *dev, u8 port_num,
struct mlx5_vport_counters *vc);
+int mlx5_core_query_ib_ppcnt(struct mlx5_core_dev *dev,
+u8 port_num, void *out, size_t sz);
 #endif /* __MLX5_VPORT_H__ */
___
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: r325656 - in head/sys/dev/mlx5: . mlx5_core

2017-11-10 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Nov 10 13:56:11 2017
New Revision: 325656
URL: https://svnweb.freebsd.org/changeset/base/325656

Log:
  Add API functions to query and modify local loopback of multicast and
  unicast traffic in mlx5 core.
  
  Sponsored by: Mellanox Technologies
  MFC after:1 week

Modified:
  head/sys/dev/mlx5/mlx5_core/mlx5_vport.c
  head/sys/dev/mlx5/vport.h

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_vport.c
==
--- head/sys/dev/mlx5/mlx5_core/mlx5_vport.cFri Nov 10 13:53:53 2017
(r325655)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_vport.cFri Nov 10 13:56:11 2017
(r325656)
@@ -1485,6 +1485,72 @@ int mlx5_modify_nic_vport_promisc(struct mlx5_core_dev
 }
 EXPORT_SYMBOL_GPL(mlx5_modify_nic_vport_promisc);
 
+int mlx5_nic_vport_modify_local_lb(struct mlx5_core_dev *mdev,
+  enum mlx5_local_lb_selection selection,
+  u8 value)
+{
+   void *in;
+   int inlen = MLX5_ST_SZ_BYTES(modify_nic_vport_context_in);
+   int err;
+
+   in = mlx5_vzalloc(inlen);
+   if (!in) {
+   mlx5_core_warn(mdev, "failed to allocate inbox\n");
+   return -ENOMEM;
+   }
+
+   MLX5_SET(modify_nic_vport_context_in, in, vport_number, 0);
+
+   if (selection == MLX5_LOCAL_MC_LB) {
+   MLX5_SET(modify_nic_vport_context_in, in,
+field_select.disable_mc_local_lb, 1);
+   MLX5_SET(modify_nic_vport_context_in, in,
+nic_vport_context.disable_mc_local_lb,
+value);
+   } else {
+   MLX5_SET(modify_nic_vport_context_in, in,
+field_select.disable_uc_local_lb, 1);
+   MLX5_SET(modify_nic_vport_context_in, in,
+nic_vport_context.disable_uc_local_lb,
+value);
+   }
+
+   err = mlx5_modify_nic_vport_context(mdev, in, inlen);
+
+   kvfree(in);
+   return err;
+}
+EXPORT_SYMBOL_GPL(mlx5_nic_vport_modify_local_lb);
+
+int mlx5_nic_vport_query_local_lb(struct mlx5_core_dev *mdev,
+ enum mlx5_local_lb_selection selection,
+ u8 *value)
+{
+   void *out;
+   int outlen = MLX5_ST_SZ_BYTES(query_nic_vport_context_out);
+   int err;
+
+   out = kzalloc(outlen, GFP_KERNEL);
+   if (!out)
+   return -ENOMEM;
+
+   err = mlx5_query_nic_vport_context(mdev, 0, out, outlen);
+   if (err)
+   goto done;
+
+   if (selection == MLX5_LOCAL_MC_LB)
+   *value = MLX5_GET(query_nic_vport_context_out, out,
+ nic_vport_context.disable_mc_local_lb);
+   else
+   *value = MLX5_GET(query_nic_vport_context_out, out,
+ nic_vport_context.disable_uc_local_lb);
+
+done:
+   kfree(out);
+   return err;
+}
+EXPORT_SYMBOL_GPL(mlx5_nic_vport_query_local_lb);
+
 int mlx5_query_vport_counter(struct mlx5_core_dev *dev,
 u8 port_num, u16 vport_num,
 void *out, int out_size)

Modified: head/sys/dev/mlx5/vport.h
==
--- head/sys/dev/mlx5/vport.h   Fri Nov 10 13:53:53 2017(r325655)
+++ head/sys/dev/mlx5/vport.h   Fri Nov 10 13:56:11 2017(r325656)
@@ -41,7 +41,17 @@ int mlx5_vport_query_q_counter(struct mlx5_core_dev *m
 int mlx5_vport_query_out_of_rx_buffer(struct mlx5_core_dev *mdev,
  u16 counter_set_id,
  u32 *out_of_rx_buffer);
+enum mlx5_local_lb_selection {
+   MLX5_LOCAL_MC_LB,
+   MLX5_LOCAL_UC_LB
+};
 
+int mlx5_nic_vport_query_local_lb(struct mlx5_core_dev *mdev,
+ enum mlx5_local_lb_selection selection,
+ u8 *value);
+int mlx5_nic_vport_modify_local_lb(struct mlx5_core_dev *mdev,
+  enum mlx5_local_lb_selection selection,
+  u8 value);
 u8 mlx5_query_vport_state(struct mlx5_core_dev *mdev, u8 opmod, u16 vport);
 u8 mlx5_query_vport_admin_state(struct mlx5_core_dev *mdev, u8 opmod,
u16 vport);
___
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: r325655 - in head/sys/dev/mlx5: . mlx5_core

2017-11-10 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Nov 10 13:53:53 2017
New Revision: 325655
URL: https://svnweb.freebsd.org/changeset/base/325655

Log:
  Add API function to query virtual port counters in mlx5 core.
  
  Sponsored by: Mellanox Technologies
  MFC after:1 week

Modified:
  head/sys/dev/mlx5/mlx5_core/mlx5_vport.c
  head/sys/dev/mlx5/vport.h

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_vport.c
==
--- head/sys/dev/mlx5/mlx5_core/mlx5_vport.cFri Nov 10 13:50:08 2017
(r325654)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_vport.cFri Nov 10 13:53:53 2017
(r325655)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2013-2015, Mellanox Technologies, Ltd.  All rights reserved.
+ * Copyright (c) 2013-2017, Mellanox Technologies, Ltd.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -965,6 +965,43 @@ int mlx5_nic_vport_disable_roce(struct mlx5_core_dev *
return mlx5_nic_vport_enable_disable_roce(mdev, 0);
 }
 EXPORT_SYMBOL_GPL(mlx5_nic_vport_disable_roce);
+
+int mlx5_core_query_vport_counter(struct mlx5_core_dev *dev, u8 other_vport,
+ int vf, u8 port_num, void *out,
+ size_t out_sz)
+{
+   int in_sz = MLX5_ST_SZ_BYTES(query_vport_counter_in);
+   int is_group_manager;
+   void   *in;
+   int err;
+
+   is_group_manager = MLX5_CAP_GEN(dev, vport_group_manager);
+   in = mlx5_vzalloc(in_sz);
+   if (!in) {
+   err = -ENOMEM;
+   return err;
+   }
+
+   MLX5_SET(query_vport_counter_in, in, opcode,
+MLX5_CMD_OP_QUERY_VPORT_COUNTER);
+   if (other_vport) {
+   if (is_group_manager) {
+   MLX5_SET(query_vport_counter_in, in, other_vport, 1);
+   MLX5_SET(query_vport_counter_in, in, vport_number, vf + 
1);
+   } else {
+   err = -EPERM;
+   goto free;
+   }
+   }
+   if (MLX5_CAP_GEN(dev, num_ports) == 2)
+   MLX5_SET(query_vport_counter_in, in, port_num, port_num);
+
+   err = mlx5_cmd_exec(dev, in, in_sz, out,  out_sz);
+free:
+   kvfree(in);
+   return err;
+}
+EXPORT_SYMBOL_GPL(mlx5_core_query_vport_counter);
 
 int mlx5_query_hca_vport_context(struct mlx5_core_dev *mdev,
 u8 port_num, u8 vport_num, u32 *out,

Modified: head/sys/dev/mlx5/vport.h
==
--- head/sys/dev/mlx5/vport.h   Fri Nov 10 13:50:08 2017(r325654)
+++ head/sys/dev/mlx5/vport.h   Fri Nov 10 13:53:53 2017(r325655)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2013-2015, Mellanox Technologies, Ltd.  All rights reserved.
+ * Copyright (c) 2013-2017, Mellanox Technologies, Ltd.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -101,6 +101,9 @@ int mlx5_set_nic_vport_permanent_mac(struct mlx5_core_
 u8 *addr);
 int mlx5_nic_vport_enable_roce(struct mlx5_core_dev *mdev);
 int mlx5_nic_vport_disable_roce(struct mlx5_core_dev *mdev);
+int mlx5_core_query_vport_counter(struct mlx5_core_dev *dev, u8 other_vport,
+  int vf, u8 port_num, void *out,
+  size_t out_sz);
 int mlx5_query_nic_vport_system_image_guid(struct mlx5_core_dev *mdev,
   u64 *system_image_guid);
 int mlx5_query_vport_system_image_guid(struct mlx5_core_dev *dev,
___
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: r325654 - head/sys/dev/mlx5/mlx5_core

2017-11-10 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Nov 10 13:50:08 2017
New Revision: 325654
URL: https://svnweb.freebsd.org/changeset/base/325654

Log:
  Add API functions to modify the transport interface send object, TIS,
  in mlx5 core.
  
  Sponsored by: Mellanox Technologies
  MFC after:1 week

Modified:
  head/sys/dev/mlx5/mlx5_core/mlx5_transobj.c
  head/sys/dev/mlx5/mlx5_core/transobj.h

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_transobj.c
==
--- head/sys/dev/mlx5/mlx5_core/mlx5_transobj.c Fri Nov 10 13:44:12 2017
(r325653)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_transobj.c Fri Nov 10 13:50:08 2017
(r325654)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2013-2015, Mellanox Technologies, Ltd.  All rights reserved.
+ * Copyright (c) 2013-2017, Mellanox Technologies, Ltd.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -208,6 +208,17 @@ int mlx5_core_create_tis(struct mlx5_core_dev *dev, u3
*tisn = MLX5_GET(create_tis_out, out, tisn);
 
return err;
+}
+
+int mlx5_core_modify_tis(struct mlx5_core_dev *dev, u32 tisn, u32 *in,
+int inlen)
+{
+   u32 out[MLX5_ST_SZ_DW(modify_tis_out)] = {0};
+
+   MLX5_SET(modify_tis_in, in, tisn, tisn);
+   MLX5_SET(modify_tis_in, in, opcode, MLX5_CMD_OP_MODIFY_TIS);
+
+   return mlx5_cmd_exec(dev, in, inlen, out, sizeof(out));
 }
 
 void mlx5_core_destroy_tis(struct mlx5_core_dev *dev, u32 tisn)

Modified: head/sys/dev/mlx5/mlx5_core/transobj.h
==
--- head/sys/dev/mlx5/mlx5_core/transobj.h  Fri Nov 10 13:44:12 2017
(r325653)
+++ head/sys/dev/mlx5/mlx5_core/transobj.h  Fri Nov 10 13:50:08 2017
(r325654)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2013-2015, Mellanox Technologies, Ltd.  All rights reserved.
+ * Copyright (c) 2013-2017, Mellanox Technologies, Ltd.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -45,6 +45,8 @@ int mlx5_core_create_tir(struct mlx5_core_dev *dev, u3
 void mlx5_core_destroy_tir(struct mlx5_core_dev *dev, u32 tirn);
 int mlx5_core_create_tis(struct mlx5_core_dev *dev, u32 *in, int inlen,
 u32 *tisn);
+int mlx5_core_modify_tis(struct mlx5_core_dev *dev, u32 tisn, u32 *in,
+int inlen);
 void mlx5_core_destroy_tis(struct mlx5_core_dev *dev, u32 tisn);
 int mlx5_core_create_rmp(struct mlx5_core_dev *dev, u32 *in, int inlen, u32 
*rmpn);
 int mlx5_core_modify_rmp(struct mlx5_core_dev *dev, u32 *in, int inlen);
___
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: r325653 - in head/sys/dev/mlx5: . mlx5_core

2017-11-10 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Nov 10 13:44:12 2017
New Revision: 325653
URL: https://svnweb.freebsd.org/changeset/base/325653

Log:
  Add API functions to set and query dropless port mode in mlx5 core.
  
  Sponsored by: Mellanox Technologies
  MFC after:1 week

Modified:
  head/sys/dev/mlx5/driver.h
  head/sys/dev/mlx5/mlx5_core/mlx5_port.c

Modified: head/sys/dev/mlx5/driver.h
==
--- head/sys/dev/mlx5/driver.h  Fri Nov 10 13:40:27 2017(r325652)
+++ head/sys/dev/mlx5/driver.h  Fri Nov 10 13:44:12 2017(r325653)
@@ -966,6 +966,8 @@ int mlx5_core_destroy_psv(struct mlx5_core_dev *dev, i
 void mlx5_core_put_rsc(struct mlx5_core_rsc_common *common);
 u8 mlx5_is_wol_supported(struct mlx5_core_dev *dev);
 int mlx5_set_wol(struct mlx5_core_dev *dev, u8 wol_mode);
+int mlx5_set_dropless_mode(struct mlx5_core_dev *dev, u16 timeout);
+int mlx5_query_dropless_mode(struct mlx5_core_dev *dev, u16 *timeout);
 int mlx5_query_wol(struct mlx5_core_dev *dev, u8 *wol_mode);
 int mlx5_core_access_pvlc(struct mlx5_core_dev *dev,
  struct mlx5_pvlc_reg *pvlc, int write);

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_port.c
==
--- head/sys/dev/mlx5/mlx5_core/mlx5_port.c Fri Nov 10 13:40:27 2017
(r325652)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_port.c Fri Nov 10 13:44:12 2017
(r325653)
@@ -459,6 +459,46 @@ int mlx5_set_wol(struct mlx5_core_dev *dev, u8 wol_mod
 }
 EXPORT_SYMBOL_GPL(mlx5_set_wol);
 
+int mlx5_query_dropless_mode(struct mlx5_core_dev *dev, u16 *timeout)
+{
+   u32 in[MLX5_ST_SZ_DW(query_delay_drop_params_in)];
+   u32 out[MLX5_ST_SZ_DW(query_delay_drop_params_out)];
+   int err = 0;
+
+   memset(in, 0, sizeof(in));
+   memset(out, 0, sizeof(out));
+
+   MLX5_SET(query_delay_drop_params_in, in, opcode,
+MLX5_CMD_OP_QUERY_DELAY_DROP_PARAMS);
+
+   err = mlx5_cmd_exec_check_status(dev, in, sizeof(in), out, sizeof(out));
+   if (err)
+   return err;
+
+   *timeout = MLX5_GET(query_delay_drop_params_out, out,
+   delay_drop_timeout);
+
+   return 0;
+}
+EXPORT_SYMBOL_GPL(mlx5_query_dropless_mode);
+
+int mlx5_set_dropless_mode(struct mlx5_core_dev *dev, u16 timeout)
+{
+   u32 in[MLX5_ST_SZ_DW(set_delay_drop_params_in)];
+   u32 out[MLX5_ST_SZ_DW(set_delay_drop_params_out)];
+
+   memset(in, 0, sizeof(in));
+   memset(out, 0, sizeof(out));
+
+   MLX5_SET(set_delay_drop_params_in, in, opcode,
+MLX5_CMD_OP_SET_DELAY_DROP_PARAMS);
+   MLX5_SET(set_delay_drop_params_in, in, delay_drop_timeout, timeout);
+
+   return mlx5_cmd_exec_check_status(dev, in, sizeof(in),
+  out, sizeof(out));
+}
+EXPORT_SYMBOL_GPL(mlx5_set_dropless_mode);
+
 int mlx5_core_access_pvlc(struct mlx5_core_dev *dev,
  struct mlx5_pvlc_reg *pvlc, int write)
 {
___
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: r325652 - head/sys/dev/mlx5/mlx5_core

2017-11-10 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Nov 10 13:40:27 2017
New Revision: 325652
URL: https://svnweb.freebsd.org/changeset/base/325652

Log:
  Prevent mlx5 core from accessing host memory after shutdown by disabling
  PCI busmaster.
  
  Sponsored by: Mellanox Technologies
  MFC after:1 week

Modified:
  head/sys/dev/mlx5/mlx5_core/mlx5_main.c

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_main.c
==
--- head/sys/dev/mlx5/mlx5_core/mlx5_main.c Fri Nov 10 13:38:43 2017
(r325651)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_main.c Fri Nov 10 13:40:27 2017
(r325652)
@@ -1134,6 +1134,12 @@ static void remove_one(struct pci_dev *pdev)
kfree(dev);
 }
 
+static void shutdown_one(struct pci_dev *pdev)
+{
+   /* prevent device from accessing host memory after shutdown */
+   pci_clear_master(pdev);
+}
+
 static const struct pci_device_id mlx5_core_pci_table[] = {
{ PCI_VDEVICE(MELLANOX, 4113) }, /* Connect-IB */
{ PCI_VDEVICE(MELLANOX, 4114) }, /* Connect-IB VF */
@@ -1175,6 +1181,7 @@ MODULE_DEVICE_TABLE(pci, mlx5_core_pci_table);
 static struct pci_driver mlx5_core_driver = {
.name   = DRIVER_NAME,
.id_table   = mlx5_core_pci_table,
+   .shutdown   = shutdown_one,
.probe  = init_one,
.remove = remove_one
 };
___
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: r325651 - in head/sys/dev/mlx5: . mlx5_core

2017-11-10 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Nov 10 13:38:43 2017
New Revision: 325651
URL: https://svnweb.freebsd.org/changeset/base/325651

Log:
  Set ATOMIC endian mode in mlx5 core.
  
  The hardware is capable of 2 requestor endianness modes for standard 8
  byte atomics: BE (0x0) and host endianness (0x1). Read the supported
  modes from hca atomic capabilities and configure HW to host endianness
  mode if supported.
  
  Sponsored by: Mellanox Technologies
  MFC after:1 week

Modified:
  head/sys/dev/mlx5/mlx5_core/mlx5_main.c
  head/sys/dev/mlx5/mlx5_ifc.h

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_main.c
==
--- head/sys/dev/mlx5/mlx5_core/mlx5_main.c Fri Nov 10 13:30:14 2017
(r325650)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_main.c Fri Nov 10 13:38:43 2017
(r325651)
@@ -74,6 +74,11 @@ struct mlx5_device_context {
void   *context;
 };
 
+enum {
+   MLX5_ATOMIC_REQ_MODE_BE = 0x0,
+   MLX5_ATOMIC_REQ_MODE_HOST_ENDIANNESS = 0x1,
+};
+
 static struct mlx5_profile profiles[] = {
[0] = {
.mask   = 0,
@@ -393,6 +398,53 @@ query_ex:
return err;
 }
 
+static int handle_hca_cap_atomic(struct mlx5_core_dev *dev)
+{
+   void *set_ctx;
+   void *set_hca_cap;
+   int set_sz = MLX5_ST_SZ_BYTES(set_hca_cap_in);
+   int req_endianness;
+   int err;
+
+   if (MLX5_CAP_GEN(dev, atomic)) {
+   err = mlx5_core_get_caps(dev, MLX5_CAP_ATOMIC,
+HCA_CAP_OPMOD_GET_MAX);
+   if (err)
+   return err;
+
+   err = mlx5_core_get_caps(dev, MLX5_CAP_ATOMIC,
+HCA_CAP_OPMOD_GET_CUR);
+   if (err)
+   return err;
+   } else {
+   return 0;
+   }
+
+   req_endianness =
+   MLX5_CAP_ATOMIC(dev,
+   supported_atomic_req_8B_endianess_mode_1);
+
+   if (req_endianness != MLX5_ATOMIC_REQ_MODE_HOST_ENDIANNESS)
+   return 0;
+
+   set_ctx = kzalloc(set_sz, GFP_KERNEL);
+   if (!set_ctx)
+   return -ENOMEM;
+
+   MLX5_SET(set_hca_cap_in, set_ctx, op_mod,
+MLX5_SET_HCA_CAP_OP_MOD_ATOMIC << 1);
+   set_hca_cap = MLX5_ADDR_OF(set_hca_cap_in, set_ctx, capability);
+
+   /* Set requestor to host endianness */
+   MLX5_SET(atomic_caps, set_hca_cap, atomic_req_8B_endianess_mode,
+MLX5_ATOMIC_REQ_MODE_HOST_ENDIANNESS);
+
+   err = set_caps(dev, set_ctx, set_sz);
+
+   kfree(set_ctx);
+   return err;
+}
+
 static int set_hca_ctrl(struct mlx5_core_dev *dev)
 {
struct mlx5_reg_host_endianess he_in;
@@ -717,15 +769,21 @@ static int mlx5_dev_init(struct mlx5_core_dev *dev, st
goto err_pagealloc_stop;
}
 
+   err = set_hca_ctrl(dev);
+   if (err) {
+   device_printf((>dev)->bsddev, "ERR: ""set_hca_ctrl 
failed\n");
+   goto reclaim_boot_pages;
+   }
+
err = handle_hca_cap(dev);
if (err) {
device_printf((>dev)->bsddev, "ERR: ""handle_hca_cap 
failed\n");
goto reclaim_boot_pages;
}
 
-   err = set_hca_ctrl(dev);
+   err = handle_hca_cap_atomic(dev);
if (err) {
-   device_printf((>dev)->bsddev, "ERR: ""set_hca_ctrl 
failed\n");
+   device_printf((>dev)->bsddev, "ERR: 
""handle_hca_cap_atomic failed\n");
goto reclaim_boot_pages;
}
 

Modified: head/sys/dev/mlx5/mlx5_ifc.h
==
--- head/sys/dev/mlx5/mlx5_ifc.hFri Nov 10 13:30:14 2017
(r325650)
+++ head/sys/dev/mlx5/mlx5_ifc.hFri Nov 10 13:38:43 2017
(r325651)
@@ -74,6 +74,11 @@ enum {
 };
 
 enum {
+   MLX5_SET_HCA_CAP_OP_MOD_GENERAL_DEVICE= 0x0,
+   MLX5_SET_HCA_CAP_OP_MOD_ATOMIC= 0x3,
+};
+
+enum {
MLX5_CMD_OP_QUERY_HCA_CAP = 0x100,
MLX5_CMD_OP_QUERY_ADAPTER = 0x101,
MLX5_CMD_OP_INIT_HCA  = 0x102,
___
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: r325650 - in head/sys/dev/mlx5: . mlx5_core

2017-11-10 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Nov 10 13:30:14 2017
New Revision: 325650
URL: https://svnweb.freebsd.org/changeset/base/325650

Log:
  Add const keyword to input-only argument in mlx5 core.
  
  Sponsored by: Mellanox Technologies
  MFC after:1 week

Modified:
  head/sys/dev/mlx5/driver.h
  head/sys/dev/mlx5/mlx5_core/mlx5_mad.c

Modified: head/sys/dev/mlx5/driver.h
==
--- head/sys/dev/mlx5/driver.h  Fri Nov 10 13:28:23 2017(r325649)
+++ head/sys/dev/mlx5/driver.h  Fri Nov 10 13:30:14 2017(r325650)
@@ -862,7 +862,7 @@ int mlx5_core_dump_fill_mkey(struct mlx5_core_dev *dev
 u32 *mkey);
 int mlx5_core_alloc_pd(struct mlx5_core_dev *dev, u32 *pdn);
 int mlx5_core_dealloc_pd(struct mlx5_core_dev *dev, u32 pdn);
-int mlx5_core_mad_ifc(struct mlx5_core_dev *dev, void *inb, void *outb,
+int mlx5_core_mad_ifc(struct mlx5_core_dev *dev, const void *inb, void *outb,
  u16 opmod, u8 port);
 void mlx5_fwp_flush(struct mlx5_fw_page *fwp);
 void mlx5_fwp_invalidate(struct mlx5_fw_page *fwp);

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_mad.c
==
--- head/sys/dev/mlx5/mlx5_core/mlx5_mad.c  Fri Nov 10 13:28:23 2017
(r325649)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_mad.c  Fri Nov 10 13:30:14 2017
(r325650)
@@ -30,7 +30,7 @@
 #include 
 #include "mlx5_core.h"
 
-int mlx5_core_mad_ifc(struct mlx5_core_dev *dev, void *inb, void *outb,
+int mlx5_core_mad_ifc(struct mlx5_core_dev *dev, const void *inb, void *outb,
  u16 opmod, u8 port)
 {
struct mlx5_mad_ifc_mbox_in *in = 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: r325649 - head/sys/dev/mlx5/mlx5_core

2017-11-10 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Nov 10 13:28:23 2017
New Revision: 325649
URL: https://svnweb.freebsd.org/changeset/base/325649

Log:
  Make local variable 64-bits to avoid masking away bits in mlx5 core.
  
  Sponsored by: Mellanox Technologies
  MFC after:1 week

Modified:
  head/sys/dev/mlx5/mlx5_core/mlx5_eq.c

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_eq.c
==
--- head/sys/dev/mlx5/mlx5_core/mlx5_eq.c   Fri Nov 10 13:25:29 2017
(r325648)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_eq.c   Fri Nov 10 13:28:23 2017
(r325649)
@@ -510,7 +510,7 @@ void mlx5_eq_cleanup(struct mlx5_core_dev *dev)
 int mlx5_start_eqs(struct mlx5_core_dev *dev)
 {
struct mlx5_eq_table *table = >priv.eq_table;
-   u32 async_event_mask = MLX5_ASYNC_EVENT_MASK;
+   u64 async_event_mask = MLX5_ASYNC_EVENT_MASK;
int err;
 
if (MLX5_CAP_GEN(dev, port_module_event))
___
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: r325648 - in head/sys/dev/mlx5: . mlx5_core

2017-11-10 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Nov 10 13:25:29 2017
New Revision: 325648
URL: https://svnweb.freebsd.org/changeset/base/325648

Log:
  Implement support for decoding general port notification event in
  the mlx5 core module.
  
  Sponsored by: Mellanox Technologies
  MFC after:1 week

Modified:
  head/sys/dev/mlx5/device.h
  head/sys/dev/mlx5/mlx5_core/mlx5_eq.c

Modified: head/sys/dev/mlx5/device.h
==
--- head/sys/dev/mlx5/device.h  Fri Nov 10 13:17:40 2017(r325647)
+++ head/sys/dev/mlx5/device.h  Fri Nov 10 13:25:29 2017(r325648)
@@ -486,6 +486,11 @@ struct mlx5_eqe_port_module_event {
u8error_type;
 };
 
+struct mlx5_eqe_general_notification_event {
+   u32   rq_user_index_delay_drop;
+   u32   rsvd0[6];
+};
+
 union ev_data {
__be32  raw[7];
struct mlx5_eqe_cmd cmd;
@@ -499,6 +504,7 @@ union ev_data {
struct mlx5_eqe_page_reqreq_pages;
struct mlx5_eqe_port_module_event port_module_event;
struct mlx5_eqe_vport_changevport_change;
+   struct mlx5_eqe_general_notification_event general_notifications;
 } __packed;
 
 struct mlx5_eqe {
@@ -1386,6 +1392,10 @@ static inline int mlx5_get_cqe_format(const struct mlx
 {
return (cqe->op_own & MLX5E_CQE_FORMAT_MASK) >> 2;
 }
+
+enum {
+   MLX5_GEN_EVENT_SUBTYPE_DELAY_DROP_TIMEOUT = 0x1,
+};
 
 /* 8 regular priorities + 1 for multicast */
 #define MLX5_NUM_BYPASS_FTS9

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_eq.c
==
--- head/sys/dev/mlx5/mlx5_core/mlx5_eq.c   Fri Nov 10 13:17:40 2017
(r325647)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_eq.c   Fri Nov 10 13:25:29 2017
(r325648)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2013-2015, Mellanox Technologies, Ltd.  All rights reserved.
+ * Copyright (c) 2013-2017, Mellanox Technologies, Ltd.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -80,6 +80,8 @@ struct cre_des_eq {
 /*Function prototype*/
 static void mlx5_port_module_event(struct mlx5_core_dev *dev,
   struct mlx5_eqe *eqe);
+static void mlx5_port_general_notification_event(struct mlx5_core_dev *dev,
+struct mlx5_eqe *eqe);
 
 static int mlx5_cmd_destroy_eq(struct mlx5_core_dev *dev, u8 eqn)
 {
@@ -157,6 +159,8 @@ static const char *eqe_type_str(u8 type)
return "MLX5_EVENT_TYPE_NIC_VPORT_CHANGE";
case MLX5_EVENT_TYPE_CODING_DCBX_CHANGE_EVENT:
return "MLX5_EVENT_TYPE_CODING_DCBX_CHANGE_EVENT";
+   case MLX5_EVENT_TYPE_CODING_GENERAL_NOTIFICATION_EVENT:
+   return "MLX5_EVENT_TYPE_CODING_GENERAL_NOTIFICATION_EVENT";
default:
return "Unrecognized event";
}
@@ -296,6 +300,10 @@ static int mlx5_eq_int(struct mlx5_core_dev *dev, stru
}
break;
 
+   case MLX5_EVENT_TYPE_CODING_GENERAL_NOTIFICATION_EVENT:
+   mlx5_port_general_notification_event(dev, eqe);
+   break;
+
case MLX5_EVENT_TYPE_CQ_ERROR:
cqn = be32_to_cpu(eqe->data.cq_err.cqn) & 0xff;
mlx5_core_warn(dev, "CQ error on CQN 0x%x, syndrom 
0x%x\n",
@@ -665,5 +673,26 @@ static void mlx5_port_module_event(struct mlx5_core_de
/* store module status */
if (module_num < MLX5_MAX_PORTS)
dev->module_status[module_num] = module_status;
+}
+
+static void mlx5_port_general_notification_event(struct mlx5_core_dev *dev,
+struct mlx5_eqe *eqe)
+{
+   u8 port = (eqe->data.port.port >> 4) & 0xf;
+   u32 rqn = 0;
+   struct mlx5_eqe_general_notification_event *general_event = NULL;
+
+   switch (eqe->sub_type) {
+   case MLX5_GEN_EVENT_SUBTYPE_DELAY_DROP_TIMEOUT:
+   general_event = >data.general_notifications;
+   rqn = be32_to_cpu(general_event->rq_user_index_delay_drop) &
+ 0xff;
+   break;
+   default:
+   mlx5_core_warn(dev,
+  "general event with unrecognized subtype: port 
%d, sub_type %d\n",
+  port, eqe->sub_type);
+   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"


svn commit: r325641 - in head/sys/boot/efi: include libefi

2017-11-10 Thread Toomas Soome
Author: tsoome
Date: Fri Nov 10 12:07:56 2017
New Revision: 325641
URL: https://svnweb.freebsd.org/changeset/base/325641

Log:
  loader.efi: efi_devpath_is_prefix should return bool
  
  efi_devpath_is_prefix() is currently returning values 0 or 1, which means
  it really should return bool.
  
  Additionally, use unsigned len, because we only get unsigned values from
  DevicePathNodeLength().

Modified:
  head/sys/boot/efi/include/efilib.h
  head/sys/boot/efi/libefi/devpath.c

Modified: head/sys/boot/efi/include/efilib.h
==
--- head/sys/boot/efi/include/efilib.h  Fri Nov 10 11:19:47 2017
(r325640)
+++ head/sys/boot/efi/include/efilib.h  Fri Nov 10 12:07:56 2017
(r325641)
@@ -82,7 +82,7 @@ EFI_HANDLE efi_devpath_handle(EFI_DEVICE_PATH *);
 EFI_DEVICE_PATH *efi_devpath_last_node(EFI_DEVICE_PATH *);
 EFI_DEVICE_PATH *efi_devpath_trim(EFI_DEVICE_PATH *);
 bool efi_devpath_match(EFI_DEVICE_PATH *, EFI_DEVICE_PATH *);
-int efi_devpath_is_prefix(EFI_DEVICE_PATH *, EFI_DEVICE_PATH *);
+bool efi_devpath_is_prefix(EFI_DEVICE_PATH *, EFI_DEVICE_PATH *);
 CHAR16 *efi_devpath_name(EFI_DEVICE_PATH *);
 void efi_free_devpath_name(CHAR16 *);
 

Modified: head/sys/boot/efi/libefi/devpath.c
==
--- head/sys/boot/efi/libefi/devpath.c  Fri Nov 10 11:19:47 2017
(r325640)
+++ head/sys/boot/efi/libefi/devpath.c  Fri Nov 10 12:07:56 2017
(r325641)
@@ -167,13 +167,13 @@ efi_devpath_match(EFI_DEVICE_PATH *devpath1, EFI_DEVIC
return (true);
 }
 
-int
+bool
 efi_devpath_is_prefix(EFI_DEVICE_PATH *prefix, EFI_DEVICE_PATH *path)
 {
-   int len;
+   size_t len;
 
if (prefix == NULL || path == NULL)
-   return (0);
+   return (false);
 
while (1) {
if (IsDevicePathEnd(prefix))
@@ -181,17 +181,17 @@ efi_devpath_is_prefix(EFI_DEVICE_PATH *prefix, EFI_DEV
 
if (DevicePathType(prefix) != DevicePathType(path) ||
DevicePathSubType(prefix) != DevicePathSubType(path))
-   return (0);
+   return (false);
 
len = DevicePathNodeLength(prefix);
if (len != DevicePathNodeLength(path))
-   return (0);
+   return (false);
 
-   if (memcmp(prefix, path, (size_t)len) != 0)
-   return (0);
+   if (memcmp(prefix, path, len) != 0)
+   return (false);
 
prefix = NextDevicePathNode(prefix);
path = NextDevicePathNode(path);
}
-   return (1);
+   return (true);
 }
___
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: r325640 - head/share/man/man7

2017-11-10 Thread Tijl Coosemans
Author: tijl
Date: Fri Nov 10 11:19:47 2017
New Revision: 325640
URL: https://svnweb.freebsd.org/changeset/base/325640

Log:
  Remove deprecated OVERRIDE_LINUX_BASE_PORT.  It can be set via
  DEFAULT_VERSIONS now (e.g. DEFAULT_VERSIONS+=linux=c7).
  
  Noticed by:   xmj
  MFC after:2 weeks

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

Modified: head/share/man/man7/ports.7
==
--- head/share/man/man7/ports.7 Fri Nov 10 11:19:33 2017(r325639)
+++ head/share/man/man7/ports.7 Fri Nov 10 11:19:47 2017(r325640)
@@ -494,7 +494,7 @@ More information on these and other related variables 
 and the
 .Fx
 Porter's Handbook.
-.Bl -tag -width ".Va OVERRIDE_LINUX_BASE_PORT"
+.Bl -tag -width ".Va WITH_GHOSTSCRIPT_VER"
 .It Va WITH_OPENSSL_PORT
 .Pq Vt bool
 If set, causes ports that make use of OpenSSL to use the OpenSSL from
@@ -514,8 +514,6 @@ If set, enables
 for most ports.
 .It Va WITH_GHOSTSCRIPT_VER
 If set, the version of ghostscript to be used by ports.
-.It Va OVERRIDE_LINUX_BASE_PORT
-The default linux base to use.
 .It Va WITH_CCACHE_BUILD
 .Pq Vt bool
 If set, enables the use of
___
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: r325638 - in head/sys: conf dev/mlx5 dev/mlx5/mlx5_core dev/mlx5/mlx5_en modules/mlx5

2017-11-10 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Nov 10 09:49:08 2017
New Revision: 325638
URL: https://svnweb.freebsd.org/changeset/base/325638

Log:
  Refactor the flowsteering APIs used by mlx5en(4). This change is needed by
  the coming ibcore and mlx5ib updates in order to support traffic redirection
  to so-called raw ethernet QPs.
  
  Remove unused E-switch related routines and files while at it.
  
  Sponsored by: Mellanox Technologies
  MFC after:1 week

Added:
  head/sys/dev/mlx5/fs.h   (contents, props changed)
  head/sys/dev/mlx5/mlx5_core/fs_core.h   (contents, props changed)
  head/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c   (contents, props changed)
  head/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c   (contents, props changed)
Deleted:
  head/sys/dev/mlx5/eswitch_vacl.h
  head/sys/dev/mlx5/flow_table.h
  head/sys/dev/mlx5/mlx5_core/mlx5_eswitch_vacl.c
  head/sys/dev/mlx5/mlx5_core/mlx5_flow_table.c
Modified:
  head/sys/conf/files
  head/sys/dev/mlx5/device.h
  head/sys/dev/mlx5/driver.h
  head/sys/dev/mlx5/mlx5_core/mlx5_main.c
  head/sys/dev/mlx5/mlx5_en/en.h
  head/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c
  head/sys/dev/mlx5/mlx5_ifc.h
  head/sys/modules/mlx5/Makefile

Modified: head/sys/conf/files
==
--- head/sys/conf/files Fri Nov 10 08:58:42 2017(r325637)
+++ head/sys/conf/files Fri Nov 10 09:49:08 2017(r325638)
@@ -4644,7 +4644,9 @@ dev/mlx5/mlx5_core/mlx5_diagnostics.c 
optional mlx5 p
compile-with "${OFED_C}"
 dev/mlx5/mlx5_core/mlx5_eq.c   optional mlx5 pci   \
compile-with "${OFED_C}"
-dev/mlx5/mlx5_core/mlx5_flow_table.c   optional mlx5 pci   \
+dev/mlx5/mlx5_core/mlx5_fs_cmd.c   optional mlx5 pci   \
+   compile-with "${OFED_C}"
+dev/mlx5/mlx5_core/mlx5_fs_tree.c  optional mlx5 pci   \
compile-with "${OFED_C}"
 dev/mlx5/mlx5_core/mlx5_fw.c   optional mlx5 pci   \
compile-with "${OFED_C}"

Modified: head/sys/dev/mlx5/device.h
==
--- head/sys/dev/mlx5/device.h  Fri Nov 10 08:58:42 2017(r325637)
+++ head/sys/dev/mlx5/device.h  Fri Nov 10 09:49:08 2017(r325638)
@@ -1085,6 +1085,7 @@ enum {
MLX5_FLOW_TABLE_TYPE_ESWITCH = 4,
MLX5_FLOW_TABLE_TYPE_SNIFFER_RX  = 5,
MLX5_FLOW_TABLE_TYPE_SNIFFER_TX  = 6,
+   MLX5_FLOW_TABLE_TYPE_NIC_RX_RDMA = 7,
 };
 
 enum {

Modified: head/sys/dev/mlx5/driver.h
==
--- head/sys/dev/mlx5/driver.h  Fri Nov 10 08:58:42 2017(r325637)
+++ head/sys/dev/mlx5/driver.h  Fri Nov 10 09:49:08 2017(r325638)
@@ -582,6 +582,7 @@ struct mlx5_special_contexts {
int resd_lkey;
 };
 
+struct mlx5_flow_root_namespace;
 struct mlx5_core_dev {
struct pci_dev *pdev;
charboard_id[MLX5_BOARD_ID_LEN];
@@ -600,6 +601,12 @@ struct mlx5_core_dev {
u32 issi;
struct mlx5_special_contexts special_contexts;
unsigned int module_status[MLX5_MAX_PORTS];
+   struct mlx5_flow_root_namespace *root_ns;
+   struct mlx5_flow_root_namespace *fdb_root_ns;
+   struct mlx5_flow_root_namespace *esw_egress_root_ns;
+   struct mlx5_flow_root_namespace *esw_ingress_root_ns;
+   struct mlx5_flow_root_namespace *sniffer_rx_root_ns;
+   struct mlx5_flow_root_namespace *sniffer_tx_root_ns;
u32 num_q_counter_allocated[MLX5_INTERFACE_NUMBER];
 };
 

Added: head/sys/dev/mlx5/fs.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/mlx5/fs.h  Fri Nov 10 09:49:08 2017(r325638)
@@ -0,0 +1,232 @@
+/*-
+ * Copyright (c) 2013-2017, Mellanox Technologies, Ltd.  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 AUTHOR AND CONTRIBUTORS `AS IS' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF 

svn commit: r325637 - head/sys/ofed/drivers/infiniband/ulp/ipoib

2017-11-10 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Nov 10 08:58:42 2017
New Revision: 325637
URL: https://svnweb.freebsd.org/changeset/base/325637

Log:
  Mark ipoib device as initialized on device open.
  
  Set the IPOIB_FLAG_INITIALIZED on dev_open and clear it on dev_stop to
  avoid a race between ipoib load and the underlying device driver.
  
  The device module must dispatch the IB_EVENT_PORT_ACTIVE event before ipoib
  module is loaded. Otherwise, the flush will fail since no one set the
  IPOIB_FLAG_INITIALIZED.
  
  Submitted by: Slava Shwartsman 
  Sponsored by: Mellanox Technologies
  MFC after:1 week

Modified:
  head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c

Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c
==
--- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c   Fri Nov 10 
08:42:37 2017(r325636)
+++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c   Fri Nov 10 
08:58:42 2017(r325637)
@@ -638,6 +638,8 @@ int ipoib_ib_dev_open(struct ipoib_dev_priv *priv)
clear_bit(IPOIB_STOP_REAPER, >flags);
queue_delayed_work(ipoib_workqueue, >ah_reap_task, HZ);
 
+   set_bit(IPOIB_FLAG_INITIALIZED, >flags);
+
return 0;
 }
 
@@ -744,6 +746,8 @@ int ipoib_ib_dev_stop(struct ipoib_dev_priv *priv, int
unsigned long begin;
struct ipoib_tx_buf *tx_req;
int i;
+
+   clear_bit(IPOIB_FLAG_INITIALIZED, >flags);
 
ipoib_cm_dev_stop(priv);
 
___
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: r325635 - head/sys/compat/linuxkpi/common/include/linux

2017-11-10 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Nov 10 08:31:40 2017
New Revision: 325635
URL: https://svnweb.freebsd.org/changeset/base/325635

Log:
  Remove some not needed comments in the LinuxKPI. Use the Linux source tree
  to lookup documentation for the functions implemented in the LinuxKPI
  instead.
  
  MFC after:1 week
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/linux/list.h

Modified: head/sys/compat/linuxkpi/common/include/linux/list.h
==
--- head/sys/compat/linuxkpi/common/include/linux/list.hFri Nov 10 
08:00:09 2017(r325634)
+++ head/sys/compat/linuxkpi/common/include/linux/list.hFri Nov 10 
08:31:40 2017(r325635)
@@ -391,10 +391,6 @@ hlist_move_list(struct hlist_head *old, struct hlist_h
old->first = NULL;
 }
 
-/**
- * list_is_singular - tests whether a list has just one entry.
- * @head: the list to test.
- */
 static inline int list_is_singular(const struct list_head *head)
 {
return !list_empty(head) && (head->next == head->prev);
@@ -412,20 +408,6 @@ static inline void __list_cut_position(struct list_hea
new_first->prev = head;
 }
 
-/**
- * list_cut_position - cut a list into two
- * @list: a new list to add all removed entries
- * @head: a list with entries
- * @entry: an entry within head, could be the head itself
- * and if so we won't cut the list
- *
- * This helper moves the initial part of @head, up to and
- * including @entry, from @head to @list. You should
- * pass on @entry an element you know is on @head. @list
- * should be an empty list or a list you do not care about
- * losing its data.
- *
- */
 static inline void list_cut_position(struct list_head *list,
struct list_head *head, struct list_head *entry)
 {
@@ -440,11 +422,6 @@ static inline void list_cut_position(struct list_head 
__list_cut_position(list, head, entry);
 }
 
-/**
- *  list_is_last - tests whether @list is the last entry in list @head
- *   @list: the entry to test
- *@head: the head of the list
- */
 static inline int list_is_last(const struct list_head *list,
 const struct list_head *head)
 {
___
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: r325634 - head/share/mk

2017-11-10 Thread Bryan Drewery
Author: bdrewery
Date: Fri Nov 10 08:00:09 2017
New Revision: 325634
URL: https://svnweb.freebsd.org/changeset/base/325634

Log:
  Add some missed OBJS_SRCS_FILTER from r323637.
  
  Sponsored by: Dell EMC Isilon

Modified:
  head/share/mk/bsd.clang-analyze.mk
  head/share/mk/bsd.progs.mk

Modified: head/share/mk/bsd.clang-analyze.mk
==
--- head/share/mk/bsd.clang-analyze.mk  Fri Nov 10 07:53:02 2017
(r325633)
+++ head/share/mk/bsd.clang-analyze.mk  Fri Nov 10 08:00:09 2017
(r325634)
@@ -71,7 +71,7 @@ CLANG_ANALYZE_SRCS= \
${DPSRCS:M*.[cC]} ${DPSRCS:M*.cc} \
${DPSRCS:M*.cpp} ${DPSRCS:M*.cxx}
 .if !empty(CLANG_ANALYZE_SRCS)
-CLANG_ANALYZE_OBJS=${CLANG_ANALYZE_SRCS:O:u:R:S,$,.clang-analyzer,}
+CLANG_ANALYZE_OBJS=
${CLANG_ANALYZE_SRCS:O:u:${OBJS_SRCS_FILTER:ts:}:S,$,.clang-analyzer,}
 .NOPATH:   ${CLANG_ANALYZE_OBJS}
 .endif
 

Modified: head/share/mk/bsd.progs.mk
==
--- head/share/mk/bsd.progs.mk  Fri Nov 10 07:53:02 2017(r325633)
+++ head/share/mk/bsd.progs.mk  Fri Nov 10 08:00:09 2017(r325634)
@@ -104,7 +104,7 @@ _PROGS_ALL_SRCS+=   ${s}
 .if !empty(_PROGS_COMMON_SRCS)
 _PROGS_COMMON_OBJS=${_PROGS_COMMON_SRCS:M*.[dhly]}
 .if !empty(_PROGS_COMMON_SRCS:N*.[dhly])
-_PROGS_COMMON_OBJS+=   ${_PROGS_COMMON_SRCS:N*.[dhly]:R:S/$/.o/g}
+_PROGS_COMMON_OBJS+=   
${_PROGS_COMMON_SRCS:N*.[dhly]:${OBJS_SRCS_FILTER:ts:}:S/$/.o/g}
 .endif
 .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"