svn commit: r360808 - in stable/12/sys: conf riscv/include riscv/riscv

2020-05-07 Thread John Baldwin
Author: jhb
Date: Fri May  8 05:30:10 2020
New Revision: 360808
URL: https://svnweb.freebsd.org/changeset/base/360808

Log:
  MFC 354719,354720,354721,354722,357480: OpenSBI support.
  
  354719:
  RISC-V: pass arg6 in sbi_call
  
  Allow for an additional argument to sbi_call which will be passed in a6.
  This is required for SBI spec 0.2 support, as a6 will indicate the SBI
  function ID.
  
  While here, introduce some macros to clean up the calls.
  
  354720:
  RISC-V: add support for SBI spec v0.2
  
  The Supervisor Binary Interface (SBI) specification v0.2 is a backwards
  incompatible update to the SBI call interface for kernels running in
  supervisor mode. The goal of this update was to make it easier for new
  and optional functionality to be added to the SBI.
  
  SBI functions are now called by passing an "extension ID" and a
  "function ID" which are passed in a7 and a6 respectively. SBI calls
  will also return an error and value in the following struct:
  
  struct sbi_ret {
  long error;
  long value;
  }
  
  This version introduces several new functions under the "base"
  extension. It is expected that all SBI implementations >= 0.2 will
  support this base set of functions, as they implement some essential
  services such as obtaining the SBI version, CPU implementation info, and
  extension probing.
  
  Existing SBI functions have been designated as "legacy". For the time
  being they will remain implemented, but it is expected that in the
  future their functionality will be duplicated or replaced by new SBI
  extensions. Each legacy function has been assigned its own extension ID,
  and for now we simply probe and assert for their existence.
  
  Compatibility with legacy SBI implementations (such as BBL) is
  maintained by checking the output of sbi_get_spec_version(). This
  function is guaranteed to succeed by the new spec, but will return an
  error in legacy implementations. We use this as an indicator of whether
  or not we can rely on the new SBI base extensions.
  
  For further info on the Supervisor Binary Interface, see:
  https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc
  
  354721:
  Add missing files from r354720
  
  354722:
  RISC-V: Print SBI info at startup
  
  SBI version 0.2 introduces functions for obtaining the details of the
  SBI implementation, such as version and implemntation ID. Print this
  info at startup when it is available.
  
  357480:
  Set the LMA of the riscv kernel to the OpenSBI jump target by default
  
  This allows us to boot FreeBSD RISCV on QEMU using the -kernel command line
  options. When using that option, QEMU maps the kernel ELF file to the
  addresses specified in the LMAs in the program headers.
  
  Since version 4.2 QEMU ships with OpenSBI fw_jump by default so this allows
  booting FreeBSD using the following command line:
  qemu-system-riscv64 -bios default -kernel /.../boot/kernel/kernel -nographic 
-M virt
  
  Without this change the -kernel option cannot be used since the LMAs start
  at address zero and QEMU already maps a ROM to these low physical addresses.
  
  For targets that require a different kernel LMA the make variable
  KERNEL_LMA can be overwritten in the config file. For example, adding
  `makeoptionsKERNEL_LMA=0xc020` will create an ELF file that will be
  loaded at 0xc020.
  
  Before:
  There are 4 program headers, starting at offset 64
  
  Program Headers:
Type   Offset   VirtAddr   PhysAddr   FileSiz  
MemSiz   Flg Align
LOAD   0x001000 0xffc0 0x 0x75e598 
0x8be318 RWE 0x1000
DYNAMIC0x71fb20 0xffc00071eb20 0x0071eb20 0x000100 
0x000100 RW  0x8
GNU_STACK  0x00 0x 0x 0x00 
0x00 RW  0x0
NOTE   0x693400 0xffc000692400 0x00692400 0x24 
0x24 R   0x4
  
  After:
  
  There are 4 program headers, starting at offset 64
  
  Program Headers:
Type   Offset   VirtAddr   PhysAddr   FileSiz  
MemSiz   Flg Align
LOAD   0x001000 0xffc0 0x8020 0x734198 
0x893e18 RWE 0x1000
DYNAMIC0x6f7810 0xffc0006f6810 0x808f6810 0x000100 
0x000100 RW  0x8
GNU_STACK  0x00 0x 0x 0x00 
0x00 RW  0x0
NOTE   0x66ca70 0xffc00066ba70 0x8086ba70 0x24 
0x24 R   0x4

Added:
  stable/12/sys/riscv/riscv/sbi.c
 - copied, changed from r354720, head/sys/riscv/riscv/sbi.c
Modified:
  stable/12/sys/conf/Makefile.riscv
  stable/12/sys/conf/files.riscv
  stable/12/sys/conf/ldscript.riscv
  stable/12/sys/riscv/include/md_var.h
  stable/12/sys/riscv/include/sbi.h
  stable/12/sys/riscv/riscv/identcpu.c
  stable/12/sys/riscv/riscv/machdep.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/conf/Makefile.riscv

svn commit: r360807 - head/tests/sys/geom/class/multipath

2020-05-07 Thread Alan Somers
Author: asomers
Date: Fri May  8 02:42:15 2020
New Revision: 360807
URL: https://svnweb.freebsd.org/changeset/base/360807

Log:
  Fix the sys.geom.class.multipath.misc.fail_on_error test on stable/12
  
  This test uses a gnop feature (delay probability) that isn't available on
  stable/12.  But it's unnecessary; the test works fine without it.  Removing
  it simplifies the test and, once MFCed, will allow it to pass on stable/12.
  
  PR:   244158
  Reported by:  lwhsu
  MFC after:2 weeks

Modified:
  head/tests/sys/geom/class/multipath/misc.sh

Modified: head/tests/sys/geom/class/multipath/misc.sh
==
--- head/tests/sys/geom/class/multipath/misc.sh Fri May  8 01:19:29 2020
(r360806)
+++ head/tests/sys/geom/class/multipath/misc.sh Fri May  8 02:42:15 2020
(r360807)
@@ -186,7 +186,7 @@ fail_on_error_body()
atf_check -s exit:0 gmultipath create "$name" ${md0}.nop ${md1}.nop
# The first I/O to the first path should fail, causing gmultipath to
# fail over to the second path.
-   atf_check gnop configure -q 100 -r 100 -w 100 -x 100 ${md0}.nop
+   atf_check gnop configure -r 100 -w 100 ${md0}.nop
atf_check -s exit:0 -o ignore -e ignore dd if=/dev/zero 
of=/dev/multipath/"$name" bs=4096 count=1
check_multipath_state ${md1}.nop "DEGRADED" "FAIL" "ACTIVE" 
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360806 - head/usr.sbin/bluetooth/hccontrol

2020-05-07 Thread Takanori Watanabe
Author: takawata
Date: Fri May  8 01:19:29 2020
New Revision: 360806
URL: https://svnweb.freebsd.org/changeset/base/360806

Log:
  Document le_enable subcommand

Modified:
  head/usr.sbin/bluetooth/hccontrol/hccontrol.8

Modified: head/usr.sbin/bluetooth/hccontrol/hccontrol.8
==
--- head/usr.sbin/bluetooth/hccontrol/hccontrol.8   Fri May  8 00:04:25 
2020(r360805)
+++ head/usr.sbin/bluetooth/hccontrol/hccontrol.8   Fri May  8 01:19:29 
2020(r360806)
@@ -145,6 +145,7 @@ are:
 .It Cm Reset_Failed_Contact_Counter
 .It Cm Get_Link_Quality
 .It Cm Read_RSSI
+.It Cm LE_Enable
 .It Cm LE_Read_Local_Supported_Features
 .It Cm LE_Set_Advertising_Parameters 
 .It Cm LE_Read_Advertising_Physical_Channel_Tx_Power 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360805 - in stable/11/sys: conf sys

2020-05-07 Thread Glen Barber
Author: gjb
Date: Fri May  8 00:04:25 2020
New Revision: 360805
URL: https://svnweb.freebsd.org/changeset/base/360805

Log:
  - Update stable/11 from PRERELEASE to STABLE after releng/11.4
had branched.
  - Bump __FreeBSD_version.
  
  Approved by:  re (implicit)
  Sponsored by: Rubicon Communications, LLC (netgate.com)

Modified:
  stable/11/sys/conf/newvers.sh
  stable/11/sys/sys/param.h

Modified: stable/11/sys/conf/newvers.sh
==
--- stable/11/sys/conf/newvers.sh   Fri May  8 00:02:59 2020
(r360804)
+++ stable/11/sys/conf/newvers.sh   Fri May  8 00:04:25 2020
(r360805)
@@ -44,7 +44,7 @@
 
 TYPE="FreeBSD"
 REVISION="11.4"
-BRANCH="PRERELEASE"
+BRANCH="STABLE"
 if [ -n "${BRANCH_OVERRIDE}" ]; then
BRANCH=${BRANCH_OVERRIDE}
 fi

Modified: stable/11/sys/sys/param.h
==
--- stable/11/sys/sys/param.h   Fri May  8 00:02:59 2020(r360804)
+++ stable/11/sys/sys/param.h   Fri May  8 00:04:25 2020(r360805)
@@ -58,7 +58,7 @@
  * in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1103511  /* Master, propagated to newvers */
+#define __FreeBSD_version 1104500  /* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360804 - in releng/11.4: etc/pkg release/pkg_repos sys/conf sys/sys

2020-05-07 Thread Glen Barber
Author: gjb
Date: Fri May  8 00:02:59 2020
New Revision: 360804
URL: https://svnweb.freebsd.org/changeset/base/360804

Log:
  - Copy stable/11@r360774 to releng/11.4 as part of the 11.4-RELEASE
cycle.
  - Update releng/11.4 from PRERELEASE to BETA1.
  - Switch the default dvd1.iso pkg(8) repository from latest to
  - quarterly.
  - Bump __FreeBSD_version.
  - Prune vestigial svn:mergeinfo from the new branch.
  
  Approved by:  re (implicit)
  Sponsored by: Rubicon Communications, LLC (netgate.com)

Added:
 - copied from r360774, stable/11/
Directory Properties:
  releng/11.4/   (props changed)
Modified:
  releng/11.4/etc/pkg/FreeBSD.conf
  releng/11.4/release/pkg_repos/release-dvd.conf
  releng/11.4/sys/conf/newvers.sh
  releng/11.4/sys/sys/param.h
Directory Properties:
  releng/11.4/contrib/llvm-project/clang/   (props changed)
  releng/11.4/contrib/llvm-project/compiler-rt/   (props changed)
  releng/11.4/contrib/llvm-project/libcxx/   (props changed)
  releng/11.4/contrib/llvm-project/libunwind/   (props changed)
  releng/11.4/contrib/llvm-project/lld/   (props changed)
  releng/11.4/contrib/llvm-project/lldb/   (props changed)
  releng/11.4/contrib/llvm-project/llvm/   (props changed)
  releng/11.4/contrib/llvm-project/openmp/   (props changed)

Modified: releng/11.4/etc/pkg/FreeBSD.conf
==
--- stable/11/etc/pkg/FreeBSD.conf  Thu May  7 08:22:47 2020
(r360774)
+++ releng/11.4/etc/pkg/FreeBSD.confFri May  8 00:02:59 2020
(r360804)
@@ -8,7 +8,7 @@
 #
 
 FreeBSD: {
-  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest;,
+  url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly;,
   mirror_type: "srv",
   signature_type: "fingerprints",
   fingerprints: "/usr/share/keys/pkg",

Modified: releng/11.4/release/pkg_repos/release-dvd.conf
==
--- stable/11/release/pkg_repos/release-dvd.confThu May  7 08:22:47 
2020(r360774)
+++ releng/11.4/release/pkg_repos/release-dvd.conf  Fri May  8 00:02:59 
2020(r360804)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 release: {
-  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest;,
+  url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly;,
   mirror_type: "srv",
   signature_type: "fingerprints",
   fingerprints: "/usr/share/keys/pkg",

Modified: releng/11.4/sys/conf/newvers.sh
==
--- stable/11/sys/conf/newvers.sh   Thu May  7 08:22:47 2020
(r360774)
+++ releng/11.4/sys/conf/newvers.sh Fri May  8 00:02:59 2020
(r360804)
@@ -44,7 +44,7 @@
 
 TYPE="FreeBSD"
 REVISION="11.4"
-BRANCH="PRERELEASE"
+BRANCH="BETA1"
 if [ -n "${BRANCH_OVERRIDE}" ]; then
BRANCH=${BRANCH_OVERRIDE}
 fi

Modified: releng/11.4/sys/sys/param.h
==
--- stable/11/sys/sys/param.h   Thu May  7 08:22:47 2020(r360774)
+++ releng/11.4/sys/sys/param.h Fri May  8 00:02:59 2020(r360804)
@@ -58,7 +58,7 @@
  * in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1103510  /* Master, propagated to newvers */
+#define __FreeBSD_version 1104000  /* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360803 - svnadmin/conf

2020-05-07 Thread Glen Barber
Author: gjb
Date: Thu May  7 23:42:07 2020
New Revision: 360803
URL: https://svnweb.freebsd.org/changeset/base/360803

Log:
  Remove references to stable/{7,8,9,10} from the approvers file, as they
  are EoL.
  
  Approved by:  re (implicit)
  Sponsored by: Rubicon Communications, LLC (netgate.com)

Modified:
  svnadmin/conf/approvers

Modified: svnadmin/conf/approvers
==
--- svnadmin/conf/approvers Thu May  7 23:32:09 2020(r360802)
+++ svnadmin/conf/approvers Thu May  7 23:42:07 2020(r360803)
@@ -37,5 +37,5 @@
 ^head/LOCKScore
 ^head/sys/dev/random   (security-officer|so|secteam|core|csprng)
 ^head/sys/libkern/arc4random.c (security-officer|so|secteam|core|csprng)
-^stable/([7-9]|1[012])/sys/dev/random  
(security-officer|so|secteam|core|csprng)
-^stable/([7-9]|1[012])/sys/libkern/arc4random.c
(security-officer|so|secteam|core|csprng)
+^stable/(1[12])/sys/dev/random (security-officer|so|secteam|core|csprng)
+^stable/(1[12])/sys/libkern/arc4random.c   
(security-officer|so|secteam|core|csprng)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360802 - svnadmin/conf

2020-05-07 Thread Glen Barber
Author: gjb
Date: Thu May  7 23:32:09 2020
New Revision: 360802
URL: https://svnweb.freebsd.org/changeset/base/360802

Log:
  Add releng/11.4 to svnadmin/conf/approvers.
  
  Approved by:  re (implicit)
  Sponsored by: Rubicon Communications, LLC (netgate.com)

Modified:
  svnadmin/conf/approvers

Modified: svnadmin/conf/approvers
==
--- svnadmin/conf/approvers Thu May  7 21:18:37 2020(r360801)
+++ svnadmin/conf/approvers Thu May  7 23:32:09 2020(r360802)
@@ -20,6 +20,7 @@
 #^stable/12/   re
 #^stable/11/   re
 ^release/  re
+^releng/11.4/  re
 ^releng/12.[0-1]/  (security-officer|so)
 ^releng/11.[0-3]/  (security-officer|so)
 ^releng/10.[0-4]/  (security-officer|so)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360801 - head/contrib/llvm-project/llvm/lib/Support/Unix

2020-05-07 Thread Ed Maste
Author: emaste
Date: Thu May  7 21:18:37 2020
New Revision: 360801
URL: https://svnweb.freebsd.org/changeset/base/360801

Log:
  Merge commit 21e5e1724b75 from llvm git:
  
getMainExecutable: Fix hand-rolled AT_EXECPATH for older FreeBSD
  
Once we hit AT_NULL, we need to bail out of the loop; not just the
enclosing switch.  This fixes basic usage (e.g. `cc --version`) when
AT_EXECPATH isn't present on older branches (e.g. under
emu-user-static, at the moment), where we would previously run off
the end of ::environ.
  
Patch By: kevans
  
Reviewed By: arichardson
  
Differential Revision:  https://reviews.llvm.org/D79239
  
  MFC after:3 days

Modified:
  head/contrib/llvm-project/llvm/lib/Support/Unix/Path.inc

Modified: head/contrib/llvm-project/llvm/lib/Support/Unix/Path.inc
==
--- head/contrib/llvm-project/llvm/lib/Support/Unix/Path.incThu May  7 
21:14:12 2020(r360800)
+++ head/contrib/llvm-project/llvm/lib/Support/Unix/Path.incThu May  7 
21:18:37 2020(r360801)
@@ -208,14 +208,9 @@ std::string getMainExecutable(const char *argv0, void 
   while (*p++ != 0)
 ;
   // Iterate through auxiliary vectors for AT_EXECPATH.
-  for (;;) {
-switch (*(uintptr_t *)p++) {
-case AT_EXECPATH:
+  for (; *(uintptr_t *)p != AT_NULL; p++) {
+if (*(uintptr_t *)p++ == AT_EXECPATH)
   return *p;
-case AT_NULL:
-  break;
-}
-p++;
   }
 #endif
   // Fall back to argv[0] if auxiliary vectors are not available.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360800 - stable/11/lib/libc/net

2020-05-07 Thread Kristof Provost
Author: kp
Date: Thu May  7 21:14:12 2020
New Revision: 360800
URL: https://svnweb.freebsd.org/changeset/base/360800

Log:
  MFC r360231:
  
  libc: Shortcut if_indextoname() if index == 0
  
  If the index we're trying to convert is 0 we can avoid a potentially
  expensive call to getifaddrs(). No interface has an ifindex of zero, so
  we can handle this as an error: set the errno to ENXIO and return NULL.
  
  Submitted by: Nick Rogers
  Sponsored by: RG Nets

Modified:
  stable/11/lib/libc/net/if_indextoname.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libc/net/if_indextoname.c
==
--- stable/11/lib/libc/net/if_indextoname.c Thu May  7 21:14:11 2020
(r360799)
+++ stable/11/lib/libc/net/if_indextoname.c Thu May  7 21:14:12 2020
(r360800)
@@ -64,6 +64,11 @@ if_indextoname(unsigned int ifindex, char *ifname)
struct ifaddrs *ifaddrs, *ifa;
int error = 0;
 
+   if (ifindex == 0) {
+   errno = ENXIO;
+   return(NULL);
+   }
+
if (getifaddrs() < 0)
return(NULL);   /* getifaddrs properly set errno */
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360799 - stable/12/lib/libc/net

2020-05-07 Thread Kristof Provost
Author: kp
Date: Thu May  7 21:14:11 2020
New Revision: 360799
URL: https://svnweb.freebsd.org/changeset/base/360799

Log:
  MFC r360231:
  
  libc: Shortcut if_indextoname() if index == 0
  
  If the index we're trying to convert is 0 we can avoid a potentially
  expensive call to getifaddrs(). No interface has an ifindex of zero, so
  we can handle this as an error: set the errno to ENXIO and return NULL.
  
  Submitted by: Nick Rogers
  Sponsored by: RG Nets

Modified:
  stable/12/lib/libc/net/if_indextoname.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/lib/libc/net/if_indextoname.c
==
--- stable/12/lib/libc/net/if_indextoname.c Thu May  7 20:29:38 2020
(r360798)
+++ stable/12/lib/libc/net/if_indextoname.c Thu May  7 21:14:11 2020
(r360799)
@@ -66,6 +66,11 @@ if_indextoname(unsigned int ifindex, char *ifname)
struct ifaddrs *ifaddrs, *ifa;
int error = 0;
 
+   if (ifindex == 0) {
+   errno = ENXIO;
+   return(NULL);
+   }
+
if (getifaddrs() < 0)
return(NULL);   /* getifaddrs properly set errno */
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360798 - head/sys/netinet/tcp_stacks

2020-05-07 Thread Randall Stewart
Author: rrs
Date: Thu May  7 20:29:38 2020
New Revision: 360798
URL: https://svnweb.freebsd.org/changeset/base/360798

Log:
  When in the SYN-SENT state bbr and rack will not properly send an ACK but 
instead start the D-ACK timer. This
  causes so_reuseport_lb_test to fail since it slows down how quickly the 
program runs until the timeout occurs
  and fails the test
  
  Sponsored by: Netflix inc.
  Differential Revision:https://reviews.freebsd.org/D24747

Modified:
  head/sys/netinet/tcp_stacks/bbr.c
  head/sys/netinet/tcp_stacks/rack.c

Modified: head/sys/netinet/tcp_stacks/bbr.c
==
--- head/sys/netinet/tcp_stacks/bbr.c   Thu May  7 20:27:32 2020
(r360797)
+++ head/sys/netinet/tcp_stacks/bbr.c   Thu May  7 20:29:38 2020
(r360798)
@@ -4078,6 +4078,7 @@ bbr_cong_signal(struct tcpcb *tp, struct tcphdr *th, u
  */
 #define DELAY_ACK(tp, bbr, nsegs)  \
(((tp->t_flags & TF_RXWIN0SENT) == 0) &&\
+((tp->t_flags & TF_DELACK) == 0) &&\
 ((bbr->bbr_segs_rcvd + nsegs) < tp->t_delayed_ack) &&  \
 (tp->t_delayed_ack || (tp->t_flags & TF_NEEDSYN)))
 
@@ -8992,7 +8993,7 @@ bbr_do_syn_sent(struct mbuf *m, struct tcphdr *th, str
 * If there's data, delay ACK; if there's also a FIN ACKNOW
 * will be turned on later.
 */
-   if (DELAY_ACK(tp, bbr, 1) && tlen != 0 && (tfo_partial == 0)) {
+   if (DELAY_ACK(tp, bbr, 1) && tlen != 0 && !tfo_partial) {
bbr->bbr_segs_rcvd += 1;
tp->t_flags |= TF_DELACK;
bbr_timer_cancel(bbr, __LINE__, bbr->r_ctl.rc_rcvtime);

Modified: head/sys/netinet/tcp_stacks/rack.c
==
--- head/sys/netinet/tcp_stacks/rack.c  Thu May  7 20:27:32 2020
(r360797)
+++ head/sys/netinet/tcp_stacks/rack.c  Thu May  7 20:29:38 2020
(r360798)
@@ -9320,7 +9320,15 @@ rack_do_syn_sent(struct mbuf *m, struct tcphdr *th, st
 * If there's data, delay ACK; if there's also a FIN ACKNOW
 * will be turned on later.
 */
-   rack_handle_delayed_ack(tp, rack, tlen, tfo_partial);
+   if (DELAY_ACK(tp, tlen) && tlen != 0 && !tfo_partial) {
+   rack_timer_cancel(tp, rack,
+ rack->r_ctl.rc_rcvtime, __LINE__);
+   tp->t_flags |= TF_DELACK;
+   } else {
+   rack->r_wanted_output = 1;
+   tp->t_flags |= TF_ACKNOW;
+   rack->rc_dack_toggle = 0;
+   }
if (((thflags & (TH_CWR | TH_ECE)) == TH_ECE) &&
(V_tcp_do_ecn == 1)) {
tp->t_flags2 |= TF2_ECN_PERMIT;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360797 - in stable/12/lib: libproc/tests msun/tests

2020-05-07 Thread Li-Wen Hsu
Author: lwhsu
Date: Thu May  7 20:27:32 2020
New Revision: 360797
URL: https://svnweb.freebsd.org/changeset/base/360797

Log:
  MFC r358887:
  
  Temporarily skip 2 failing tests after llvm10 import
  
  PR:   244732
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/12/lib/libproc/tests/proc_test.c
  stable/12/lib/msun/tests/ctrig_test.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/lib/libproc/tests/proc_test.c
==
--- stable/12/lib/libproc/tests/proc_test.c Thu May  7 19:51:53 2020
(r360796)
+++ stable/12/lib/libproc/tests/proc_test.c Thu May  7 20:27:32 2020
(r360797)
@@ -270,6 +270,9 @@ ATF_TC_BODY(symbol_lookup, tc)
u_long saved;
int error;
 
+   if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
+   atf_tc_skip("https://bugs.freebsd.org/244732;);
+
phdl = start_prog(tc, false);
 
error = proc_name2sym(phdl, target_prog_file, "main", _sym, NULL);

Modified: stable/12/lib/msun/tests/ctrig_test.c
==
--- stable/12/lib/msun/tests/ctrig_test.c   Thu May  7 19:51:53 2020
(r360796)
+++ stable/12/lib/msun/tests/ctrig_test.c   Thu May  7 20:27:32 2020
(r360797)
@@ -248,6 +248,9 @@ ATF_TC_BODY(test_inf_inputs, tc)
long double complex z, c, s;
unsigned i;
 
+   if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
+   atf_tc_skip("https://bugs.freebsd.org/244732;);
+
/*
 * IN   CSINH   CCOSH   CTANH
 * Inf,Inf  +-Inf,NaN inval +-Inf,NaN inval 1,+-0
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360796 - head/sys/sys

2020-05-07 Thread Emmanuel Vadot
Author: manu
Date: Thu May  7 19:51:53 2020
New Revision: 360796
URL: https://svnweb.freebsd.org/changeset/base/360796

Log:
  Bump __FreeBSD_version after linuxkpi changes
  
  Requested by: zeising

Modified:
  head/sys/sys/param.h

Modified: head/sys/sys/param.h
==
--- head/sys/sys/param.hThu May  7 19:38:39 2020(r360795)
+++ head/sys/sys/param.hThu May  7 19:51:53 2020(r360796)
@@ -60,7 +60,7 @@
  * in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1300093  /* Master, propagated to newvers */
+#define __FreeBSD_version 1300094  /* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360795 - stable/11/stand/lua

2020-05-07 Thread Kyle Evans
Author: kevans
Date: Thu May  7 19:38:39 2020
New Revision: 360795
URL: https://svnweb.freebsd.org/changeset/base/360795

Log:
  lualoader: fix loader.lua mis-merge
  
  This mis-merge came from r360599; r331321 introduced core.isUEFIBoot but
  will not get merged back to stable/11 due to being somewhat disruptive. I
  had resolved the conflict once, but had to re-do the merge locally due to
  another conflict and failed to resolve it the second time.
  
  This mistake is explosive to those trying to run lualoader on stable/11, but
  is mitigated by the fact that lualoader is not the default here.
  
  PR:   246291

Modified:
  stable/11/stand/lua/loader.lua

Modified: stable/11/stand/lua/loader.lua
==
--- stable/11/stand/lua/loader.lua  Thu May  7 19:32:49 2020
(r360794)
+++ stable/11/stand/lua/loader.lua  Thu May  7 19:38:39 2020
(r360795)
@@ -41,9 +41,6 @@ local password = require("password")
 
 config.load()
 
-if core.isUEFIBoot() then
-   loader.perform("efi-autoresizecons")
-end
 -- Our console may have been setup with different settings before we get
 -- here, so make sure we reset everything back to default.
 if color.isEnabled() then
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360794 - in head/sys: conf kern powerpc/aim powerpc/include powerpc/ofw powerpc/powerpc

2020-05-07 Thread Brandon Bergren
Author: bdragon
Date: Thu May  7 19:32:49 2020
New Revision: 360794
URL: https://svnweb.freebsd.org/changeset/base/360794

Log:
  [PowerPC] kernel ifunc support for powerpc*, fix ppc64 relocation oddities.
  
  This is a general cleanup of the relocatable kernel support on powerpc,
  needed to enable kernel ifuncs.
  
   * Fix some relocatable issues in the kernel linker, and change to using
 a RELOCATABLE_KERNEL #define instead of #ifdef __powerpc__ for parts that
 other platforms can use in the future if they wish to have ET_DYN kernels.
  
   * Get rid of the DB_STOFFS hack now that the kernel is relocated to the DMAP
 properly across the board on powerpc64.
  
   * Add powerpc64 and powerpc32 ifunc functionality.
  
   * Allow AIM64 virtual mode OF kernels to run from the DMAP like other AIM64
 by implementing a virtual mode restart. This fixes the runtime address on
 PowerMac G5.
  
   * Fix symbol relocation problems on post-relocation kernels by relocating
 the symbol table.
  
   * Add an undocumented method for supplying kernel symbols on powernv and
 other powerpc machines using linux-style kernel/initrd loading -- If
 you pass the kernel in as the initrd as well, the copy resident in initrd
 will be used as a source for symbols when initializing the debugger.
 This method is subject to removal once we have a better way of doing this.
  
  Approved by:  jhibbits
  Relnotes: yes
  Sponsored by: Tag1 Consulting, Inc.
  Differential Revision:https://reviews.freebsd.org/D23156

Modified:
  head/sys/conf/kern.pre.mk
  head/sys/conf/ldscript.powerpc
  head/sys/conf/ldscript.powerpc64
  head/sys/conf/ldscript.powerpcspe
  head/sys/kern/link_elf.c
  head/sys/powerpc/aim/aim_machdep.c
  head/sys/powerpc/aim/locore64.S
  head/sys/powerpc/include/db_machdep.h
  head/sys/powerpc/include/param.h
  head/sys/powerpc/ofw/ofw_initrd.c
  head/sys/powerpc/powerpc/elf32_machdep.c
  head/sys/powerpc/powerpc/elf64_machdep.c
  head/sys/powerpc/powerpc/machdep.c

Modified: head/sys/conf/kern.pre.mk
==
--- head/sys/conf/kern.pre.mk   Thu May  7 19:19:39 2020(r360793)
+++ head/sys/conf/kern.pre.mk   Thu May  7 19:32:49 2020(r360794)
@@ -161,9 +161,9 @@ LDFLAGS+=   --build-id=sha1
 .endif
 
 .if (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
-${MACHINE_CPUARCH} == "i386") && \
+${MACHINE_CPUARCH} == "i386" || ${MACHINE} == "powerpc") && \
 defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == ""
-.error amd64/arm64/i386 kernel requires linker ifunc support
+.error amd64/arm64/i386/ppc* kernel requires linker ifunc support
 .endif
 .if ${MACHINE_CPUARCH} == "amd64"
 LDFLAGS+=  -z max-page-size=2097152

Modified: head/sys/conf/ldscript.powerpc
==
--- head/sys/conf/ldscript.powerpc  Thu May  7 19:19:39 2020
(r360793)
+++ head/sys/conf/ldscript.powerpc  Thu May  7 19:32:49 2020
(r360794)
@@ -6,6 +6,11 @@ OUTPUT_ARCH(powerpc)
 ENTRY(__start)
 SEARCH_DIR(/usr/lib);
 PROVIDE (__stack = 0);
+PHDRS
+{
+   kernel PT_LOAD;
+   dynamic PT_DYNAMIC;
+}
 SECTIONS
 {
   /* Read-only sections, merged into text segment: */
@@ -21,7 +26,7 @@ SECTIONS
 /* .gnu.warning sections are handled specially by elf32.em.  */
 *(.gnu.warning)
 *(.gnu.linkonce.t*)
-  } =0
+  } :kernel =0
   _etext = .;
   PROVIDE (etext = .);
 
@@ -77,7 +82,7 @@ SECTIONS
   .got.plt: { *(.got.plt) }
 
 
-  .dynamic: { *(.dynamic) }
+  .dynamic: { *(.dynamic) } :kernel :dynamic
   /* Put .ctors and .dtors next to the .got2 section, so that the pointers
  get relocated with -mrelocatable. Also put in the .fixup pointers.
  The current compiler no longer needs this, but keep it around for 2.7.2  
*/
@@ -96,7 +101,7 @@ SECTIONS
   /* We want the small data sections together, so single-instruction offsets
  can access them all, and initialized data all before uninitialized, so
  we can shorten the on-disk segment size.  */
-  .sdata : { *(.sdata) }
+  .sdata : { *(.sdata) } :kernel
   _edata  =  .;
   PROVIDE (edata = .);
   .sbss  :

Modified: head/sys/conf/ldscript.powerpc64
==
--- head/sys/conf/ldscript.powerpc64Thu May  7 19:19:39 2020
(r360793)
+++ head/sys/conf/ldscript.powerpc64Thu May  7 19:32:49 2020
(r360794)
@@ -8,15 +8,15 @@ SEARCH_DIR(/usr/lib);
 PROVIDE (__stack = 0);
 PHDRS
 {
-   text PT_LOAD ;
-   dynamic PT_DYNAMIC ;
+   kernel PT_LOAD;
+   dynamic PT_DYNAMIC;
 }
 SECTIONS
 {
 
   /* Low-address wrapper for bootloaders (kexec/kboot) that can't parse ELF */
   . = kernbase - 0x100;
-  .kboot : { *(.text.kboot) } :text
+  .kboot : { *(.text.kboot) } :kernel
 
   /* Read-only sections, merged 

svn commit: r360793 - in stable/12/sys: conf riscv/riscv

2020-05-07 Thread John Baldwin
Author: jhb
Date: Thu May  7 19:19:39 2020
New Revision: 360793
URL: https://svnweb.freebsd.org/changeset/base/360793

Log:
  MFC 356481:
  Work around lld's inability to handle undefined weak symbols on risc-v.
  
  lld on RISC-V is not yet able to handle undefined weak symbols for
  non-PIC code in the code model (medany/medium) used by the RISC-V
  kernel.
  
  Both GCC and clang emit an auipc / addi pair of instructions to
  generate an address relative to the current PC with a 31-bit offset.
  Undefined weak symbols need to have an address of 0, but the kernel
  runs with PC values much greater than 2^31, so there is no way to
  construct a NULL pointer as a PC-relative value.  The bfd linker
  rewrites the instruction pair to use lui / addi with values of 0 to
  force a NULL pointer address.  (There are similar cases for 'ld'
  becoming auipc / ld that bfd rewrites to lui / ld with an address of
  0.)
  
  To work around this, compile the kernel with -fPIE when using lld.
  This does not make the kernel position-independent, but it does
  force the compiler to indirect address lookups through GOT entries
  (so auipc / ld against a GOT entry to fetch the address).  This
  adds extra memory indirections for global symbols, so should be
  disabled once lld is finally fixed.
  
  A few 'la' instructions in locore that depend on PC-relative
  addressing to load physical addresses before paging is enabled have to
  use auipc / addi and not indirect via GOT entries, so change those to
  use 'lla' which always uses auipc / addi for both PIC and non-PIC.
  
  Note that the followup fix for SMP (r356675) was previously merged to
  stable/12.

Modified:
  stable/12/sys/conf/kern.pre.mk
  stable/12/sys/riscv/riscv/locore.S
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/conf/kern.pre.mk
==
--- stable/12/sys/conf/kern.pre.mk  Thu May  7 18:47:54 2020
(r360792)
+++ stable/12/sys/conf/kern.pre.mk  Thu May  7 19:19:39 2020
(r360793)
@@ -143,6 +143,17 @@ LDFLAGS+=  -z notext -z ifunc-noplt
 .endif
 .endif
 
+.if ${MACHINE_CPUARCH} == "riscv"
+# Hack: Work around undefined weak symbols being out of range when linking with
+# LLD (address is a PC-relative calculation, and BFD works around this by
+# rewriting the instructions to generate an absolute address of 0); -fPIE
+# avoids this since it uses the GOT for all extern symbols, which is overly
+# inefficient for us. Drop once undefined weak symbols work with medany.
+.if ${LINKER_TYPE} == "lld"
+CFLAGS+=   -fPIE
+.endif
+.endif
+
 NORMAL_C= ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.IMPSRC}
 NORMAL_S= ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC}
 PROFILE_C= ${CC} -c ${CFLAGS} ${WERROR} ${.IMPSRC}

Modified: stable/12/sys/riscv/riscv/locore.S
==
--- stable/12/sys/riscv/riscv/locore.S  Thu May  7 18:47:54 2020
(r360792)
+++ stable/12/sys/riscv/riscv/locore.S  Thu May  7 19:19:39 2020
(r360793)
@@ -54,7 +54,7 @@
.globl _start
 _start:
/* Get the physical address kernel loaded to */
-   la  t0, virt_map
+   lla t0, virt_map
ld  t1, 0(t0)
sub t1, t1, t0
li  t2, KERNBASE
@@ -66,7 +66,7 @@ _start:
 */
 
/* Pick a hart to run the boot process. */
-   la  t0, hart_lottery
+   lla t0, hart_lottery
li  t1, 1
amoadd.w t0, t1, 0(t0)
 
@@ -82,8 +82,8 @@ _start:
 */
 1:
/* Add L1 entry for kernel */
-   la  s1, pagetable_l1
-   la  s2, pagetable_l2/* Link to next level PN */
+   lla s1, pagetable_l1
+   lla s2, pagetable_l2/* Link to next level PN */
srlis2, s2, PAGE_SHIFT
 
li  a5, KERNBASE
@@ -100,7 +100,7 @@ _start:
sd  t6, (t0)
 
/* Level 2 superpages (512 x 2MiB) */
-   la  s1, pagetable_l2
+   lla s1, pagetable_l2
srlit4, s9, 21  /* Div physmem base by 2 MiB */
li  t2, 512 /* Build 512 entries */
add t3, t4, t2
@@ -116,8 +116,8 @@ _start:
bltut4, t3, 2b
 
/* Create an L1 page for early devmap */
-   la  s1, pagetable_l1
-   la  s2, pagetable_l2_devmap /* Link to next level PN */
+   lla s1, pagetable_l1
+   lla s2, pagetable_l2_devmap /* Link to next level PN */
srlis2, s2, PAGE_SHIFT
 
li  a5, (VM_MAX_KERNEL_ADDRESS - L2_SIZE)
@@ -134,7 +134,7 @@ _start:
sd  t6, (t0)
 
/* Create an L2 page superpage for DTB */
-   la  s1, pagetable_l2_devmap
+   lla s1, pagetable_l2_devmap
mv  s2, a1
srlis2, s2, PAGE_SHIFT
 
@@ -152,14 +152,14 @@ _start:
/* Page tables END */
 
/* Setup supervisor trap 

svn commit: r360792 - stable/12/sys/conf

2020-05-07 Thread John Baldwin
Author: jhb
Date: Thu May  7 18:47:54 2020
New Revision: 360792
URL: https://svnweb.freebsd.org/changeset/base/360792

Log:
  MFC 357145: Compile hack.c with normal CFLAGS + -shared -nostdlib.
  
  Originally, hack.c was compiled into a shard object with just -shared
  -nostdlib.  This assumed that ${CC} did not require any additional
  flags for ABIs, cross-building, etc.
  
  When kern.post.mk was created in r89509 by reducing duplication in
  kernel Makefile. files, the -shared flag was moved into a
  HACK_EXTRA_FLAGS variable so that sparc64 could override it with
  -Wl,-shared.  The sparc64 hack was removed in r111650, but
  HACK_EXTRA_FLAGS was left in place.  Over time, we have started
  support toolchains that require flags to support alternate ABIs on
  MIPS and PowerPC and started (ab)using HACK_EXTRA_FLAGS to set only
  those flags.
  
  I need to fix risc-v to pass -mno-relax to the hack.c build for lld in
  llvm 10, and the patches to support cross-build from non-FreeBSD hosts
  need to include -target for clang in CFLAGS for hack.c.  Rather than
  adding more hacks into HACK_EXTRA_FLAGS, just use the full set of
  CFLAGS with hack.c.

Modified:
  stable/12/sys/conf/Makefile.mips
  stable/12/sys/conf/kern.post.mk
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/conf/Makefile.mips
==
--- stable/12/sys/conf/Makefile.mipsThu May  7 18:24:32 2020
(r360791)
+++ stable/12/sys/conf/Makefile.mipsThu May  7 18:47:54 2020
(r360792)
@@ -44,12 +44,9 @@ TRAMPLOADADDR?=0x807963c0
 ARCH_FLAGS?=-march=mips32
 EXTRA_FLAGS=-fno-pic -mno-abicalls -G0 -DKERNLOADADDR=${KERNLOADADDR}
 
-HACK_EXTRA_FLAGS=-shared
-
 # We add the -fno-pic flag to kernels because otherwise performance
 # is extremely poor, as well as -mno-abicalls to force no ABI usage.
 CFLAGS+=${EXTRA_FLAGS} $(ARCH_FLAGS)
-HACK_EXTRA_FLAGS+=${EXTRA_FLAGS} $(ARCH_FLAGS)
 TRAMP_ARCH_FLAGS?=$(ARCH_FLAGS)
 TRAMP_EXTRA_FLAGS=${EXTRA_FLAGS} ${TRAMP_ARCH_FLAGS}
 # Kernel code is always compiled with soft-float on MIPS

Modified: stable/12/sys/conf/kern.post.mk
==
--- stable/12/sys/conf/kern.post.mk Thu May  7 18:24:32 2020
(r360791)
+++ stable/12/sys/conf/kern.post.mk Thu May  7 18:47:54 2020
(r360792)
@@ -192,10 +192,9 @@ kernel-clean:
 # This is a hack.  BFD "optimizes" away dynamic mode if there are no
 # dynamic references.  We could probably do a '-Bforcedynamic' mode like
 # in the a.out ld.  For now, this works.
-HACK_EXTRA_FLAGS?= -shared
 hack.pico: Makefile
:> hack.c
-   ${CC} ${HACK_EXTRA_FLAGS} -nostdlib hack.c -o hack.pico
+   ${CC} -shared ${CFLAGS} -nostdlib hack.c -o hack.pico
rm -f hack.c
 
 offset.inc: $S/kern/genoffset.sh genoffset.o
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360791 - head/tools/build/mk

2020-05-07 Thread Ed Maste
Author: emaste
Date: Thu May  7 18:24:32 2020
New Revision: 360791
URL: https://svnweb.freebsd.org/changeset/base/360791

Log:
  OptionalObsoleteFiles.inc: remove objdump
  
  objdump is removed unconditionally in ObsoleteFiles.inc

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Thu May  7 18:15:35 
2020(r360790)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Thu May  7 18:24:32 
2020(r360791)
@@ -207,7 +207,6 @@ OLD_FILES+=usr/bin/as
 OLD_FILES+=usr/bin/ld
 OLD_FILES+=usr/share/man/man1/ld.1.gz
 .endif
-OLD_FILES+=usr/bin/objdump
 .endif
 OLD_FILES+=usr/libdata/ldscripts/armelf_fbsd.x
 OLD_FILES+=usr/libdata/ldscripts/armelf_fbsd.xbn
@@ -406,7 +405,6 @@ OLD_FILES+=usr/libdata/ldscripts/elf_x86_64_fbsd.xu
 OLD_FILES+=usr/libdata/ldscripts/elf_x86_64_fbsd.xw
 .if !defined(WITH_PORT_BASE_BINUTILS)
 OLD_FILES+=usr/share/man/man1/as.1.gz
-OLD_FILES+=usr/share/man/man1/objdump.1.gz
 OLD_FILES+=usr/share/man/man7/as.7.gz
 OLD_FILES+=usr/share/man/man7/ld.7.gz
 OLD_FILES+=usr/share/man/man7/ldint.7.gz
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360790 - head/sys/dev/sound/pcm

2020-05-07 Thread Hans Petter Selasky
Author: hselasky
Date: Thu May  7 18:15:35 2020
New Revision: 360790
URL: https://svnweb.freebsd.org/changeset/base/360790

Log:
  Set PCM_CAP_VIRTUAL for virtual DSP devices.
  
  Submitted by: Kevin Zheng 
  PR:   246206
  MFC after:1 week
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/dev/sound/pcm/dsp.c

Modified: head/sys/dev/sound/pcm/dsp.c
==
--- head/sys/dev/sound/pcm/dsp.cThu May  7 17:59:17 2020
(r360789)
+++ head/sys/dev/sound/pcm/dsp.cThu May  7 18:15:35 2020
(r360790)
@@ -1703,6 +1703,10 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg,
*arg_i = PCM_CAP_REALTIME | PCM_CAP_MMAP | PCM_CAP_TRIGGER;
if (rdch && wrch && !(dsp_get_flags(i_dev) & SD_F_SIMPLEX))
*arg_i |= PCM_CAP_DUPLEX;
+   if (rdch && (rdch->flags & CHN_F_VIRTUAL) != 0)
+   *arg_i |= PCM_CAP_VIRTUAL;
+   if (wrch && (wrch->flags & CHN_F_VIRTUAL) != 0)
+   *arg_i |= PCM_CAP_VIRTUAL;
PCM_UNLOCK(d);
break;
 
@@ -2653,6 +2657,7 @@ dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *a
 *   these in pcmchan::caps?
 */
ai->caps = PCM_CAP_REALTIME | PCM_CAP_MMAP | 
PCM_CAP_TRIGGER |
+   ((ch->flags & CHN_F_VIRTUAL) ? PCM_CAP_VIRTUAL : 0) 
|
((ch->direction == PCMDIR_PLAY) ? PCM_CAP_OUTPUT : 
PCM_CAP_INPUT);
 
/*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r360722 - head/sys/dev/virtio/mmio

2020-05-07 Thread Jessica Clarke
On 7 May 2020, at 18:25, Li-Wen Hsu  wrote:
> On Wed, May 06, 2020 at 23:28:51 +, Jessica Clarke wrote:
>> Author: jrtc27
>> Date: Wed May  6 23:28:51 2020
>> New Revision: 360722
>> URL: https://svnweb.freebsd.org/changeset/base/360722
>> 
>> Log:
>>  virtio_mmio: Support non-transitional version 2 devices
>> 
>>  The non-legacy virtio MMIO specification drops the use of PFNs and
>>  replaces them with physical addresses. Whilst many implementations are
>>  so-called transitional devices, also implementing the legacy
>>  specification, TinyEMU[1] does not. Device-specific configuration
>>  registers have also changed to being little-endian, and must be accessed
>>  using a single aligned access for registers up to 32 bits, and two
>>  32-bit aligned accesses for 64-bit registers.
>> 
>>  [1] https://bellard.org/tinyemu/
>> 
>>  Reviewed by:br, brooks (mentor)
>>  Approved by:br, brooks (mentor)
>>  Differential Revision:  https://reviews.freebsd.org/D24681
>> 
>> Modified:
>>  head/sys/dev/virtio/mmio/virtio_mmio.c
>>  head/sys/dev/virtio/mmio/virtio_mmio.h
> 
> Hi Jessica,
> 
> It looks this commit breaks armv6 and armv7 builds:
> 
> 
> --- virtio_mmio.o ---
> /usr/src/sys/dev/virtio/mmio/virtio_mmio.c:442:13: error: shift count >= 
> width of type [-Werror,-Wshift-count-overflow]
>paddr >> 32);
>  ^  ~~
> /usr/src/sys/dev/virtio/mmio/virtio_mmio.c:127:44: note: expanded from macro 
> 'vtmmio_write_config_4'
>VIRTIO_MMIO_PREWRITE(sc->platform, (o), (v));   \
> ^
> ...
> 
> https://ci.freebsd.org/job/FreeBSD-head-armv6-build/9109/console
> https://ci.freebsd.org/job/FreeBSD-head-armv7-build/9035/console

Thanks, yes, of course. This should be fixed as of r360789.

Jess

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


svn commit: r360789 - head/sys/dev/virtio/mmio

2020-05-07 Thread Jessica Clarke
Author: jrtc27
Date: Thu May  7 17:59:17 2020
New Revision: 360789
URL: https://svnweb.freebsd.org/changeset/base/360789

Log:
  virtio_mmio: Add casts missing from r360722
  
  This fixes -Wshift-count-overflow warnings/errors on architectures using
  32-bit physical addresses.
  
  Reported by:  lwhsu

Modified:
  head/sys/dev/virtio/mmio/virtio_mmio.c

Modified: head/sys/dev/virtio/mmio/virtio_mmio.c
==
--- head/sys/dev/virtio/mmio/virtio_mmio.c  Thu May  7 17:58:07 2020
(r360788)
+++ head/sys/dev/virtio/mmio/virtio_mmio.c  Thu May  7 17:59:17 2020
(r360789)
@@ -439,19 +439,19 @@ vtmmio_set_virtqueue(struct vtmmio_softc *sc, struct v
vtmmio_write_config_4(sc, VIRTIO_MMIO_QUEUE_DESC_LOW,
paddr);
vtmmio_write_config_4(sc, VIRTIO_MMIO_QUEUE_DESC_HIGH,
-   paddr >> 32);
+   ((uint64_t)paddr) >> 32);
 
paddr = virtqueue_avail_paddr(vq);
vtmmio_write_config_4(sc, VIRTIO_MMIO_QUEUE_AVAIL_LOW,
paddr);
vtmmio_write_config_4(sc, VIRTIO_MMIO_QUEUE_AVAIL_HIGH,
-   paddr >> 32);
+   ((uint64_t)paddr) >> 32);
 
paddr = virtqueue_used_paddr(vq);
vtmmio_write_config_4(sc, VIRTIO_MMIO_QUEUE_USED_LOW,
paddr);
vtmmio_write_config_4(sc, VIRTIO_MMIO_QUEUE_USED_HIGH,
-   paddr >> 32);
+   ((uint64_t)paddr) >> 32);
 
vtmmio_write_config_4(sc, VIRTIO_MMIO_QUEUE_READY, 1);
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360788 - head/sys/kern

2020-05-07 Thread Brandon Bergren
Author: bdragon
Date: Thu May  7 17:58:07 2020
New Revision: 360788
URL: https://svnweb.freebsd.org/changeset/base/360788

Log:
  [PowerPC] Fix powerpcspe build failure after r360569
  
  On powerpcspe, vm_paddr_t is 64 bit despite it being a 32 bit platform.
  Adjust compile time assertion to compensate.

Modified:
  head/sys/kern/uipc_mbuf.c

Modified: head/sys/kern/uipc_mbuf.c
==
--- head/sys/kern/uipc_mbuf.c   Thu May  7 17:00:51 2020(r360787)
+++ head/sys/kern/uipc_mbuf.c   Thu May  7 17:58:07 2020(r360788)
@@ -167,7 +167,12 @@ CTASSERT(sizeof(struct m_ext) == 160);
 #else
 CTASSERT(offsetof(struct mbuf, m_dat) == 24);
 CTASSERT(sizeof(struct pkthdr) == 48);
+#if defined(__powerpc__) && defined(BOOKE)
+/* PowerPC booke has 64-bit physical pointers. */
+CTASSERT(sizeof(struct m_ext) == 184);
+#else
 CTASSERT(sizeof(struct m_ext) == 180);
+#endif
 #endif
 
 /*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r360722 - head/sys/dev/virtio/mmio

2020-05-07 Thread Li-Wen Hsu
On Wed, May 06, 2020 at 23:28:51 +, Jessica Clarke wrote:
> Author: jrtc27
> Date: Wed May  6 23:28:51 2020
> New Revision: 360722
> URL: https://svnweb.freebsd.org/changeset/base/360722
>
> Log:
>   virtio_mmio: Support non-transitional version 2 devices
>
>   The non-legacy virtio MMIO specification drops the use of PFNs and
>   replaces them with physical addresses. Whilst many implementations are
>   so-called transitional devices, also implementing the legacy
>   specification, TinyEMU[1] does not. Device-specific configuration
>   registers have also changed to being little-endian, and must be accessed
>   using a single aligned access for registers up to 32 bits, and two
>   32-bit aligned accesses for 64-bit registers.
>
>   [1] https://bellard.org/tinyemu/
>
>   Reviewed by:br, brooks (mentor)
>   Approved by:br, brooks (mentor)
>   Differential Revision:  https://reviews.freebsd.org/D24681
>
> Modified:
>   head/sys/dev/virtio/mmio/virtio_mmio.c
>   head/sys/dev/virtio/mmio/virtio_mmio.h

Hi Jessica,

It looks this commit breaks armv6 and armv7 builds:


--- virtio_mmio.o ---
/usr/src/sys/dev/virtio/mmio/virtio_mmio.c:442:13: error: shift count >= width 
of type [-Werror,-Wshift-count-overflow]
paddr >> 32);
  ^  ~~
/usr/src/sys/dev/virtio/mmio/virtio_mmio.c:127:44: note: expanded from macro 
'vtmmio_write_config_4'
VIRTIO_MMIO_PREWRITE(sc->platform, (o), (v));   \
 ^
/usr/src/sys/dev/virtio/mmio/virtio_mmio.c:442:13: error: shift count >= width 
of type [-Werror,-Wshift-count-overflow]
paddr >> 32);
  ^  ~~
/usr/src/sys/dev/virtio/mmio/virtio_mmio.c:128:34: note: expanded from macro 
'vtmmio_write_config_4'
bus_write_4((sc)->res[0], (o), (v));\
^
/usr/src/sys/sys/bus.h:919:59: note: expanded from macro 'bus_write_4'
bus_space_write_4((r)->r_bustag, (r)->r_bushandle, (o), (v))
 ^
/usr/src/sys/dev/virtio/mmio/virtio_mmio.c:442:13: error: shift count >= width 
of type [-Werror,-Wshift-count-overflow]
paddr >> 32);
  ^  ~~
/usr/src/sys/dev/virtio/mmio/virtio_mmio.c:130:40: note: expanded from macro 
'vtmmio_write_config_4'
VIRTIO_MMIO_NOTE(sc->platform, (o), (v));   \
 ^
/usr/src/sys/dev/virtio/mmio/virtio_mmio.c:448:13: error: shift count >= width 
of type [-Werror,-Wshift-count-overflow]
paddr >> 32);
  ^  ~~
/usr/src/sys/dev/virtio/mmio/virtio_mmio.c:127:44: note: expanded from macro 
'vtmmio_write_config_4'
VIRTIO_MMIO_PREWRITE(sc->platform, (o), (v));   \
 ^
/usr/src/sys/dev/virtio/mmio/virtio_mmio.c:448:13: error: shift count >= width 
of type [-Werror,-Wshift-count-overflow]
paddr >> 32);
  ^  ~~
/usr/src/sys/dev/virtio/mmio/virtio_mmio.c:128:34: note: expanded from macro 
'vtmmio_write_config_4'
bus_write_4((sc)->res[0], (o), (v));\
^
/usr/src/sys/sys/bus.h:919:59: note: expanded from macro 'bus_write_4'
bus_space_write_4((r)->r_bustag, (r)->r_bushandle, (o), (v))
 ^
/usr/src/sys/dev/virtio/mmio/virtio_mmio.c:448:13: error: shift count >= width 
of type [-Werror,-Wshift-count-overflow]
paddr >> 32);
  ^  ~~
/usr/src/sys/dev/virtio/mmio/virtio_mmio.c:130:40: note: expanded from macro 
'vtmmio_write_config_4'
VIRTIO_MMIO_NOTE(sc->platform, (o), (v));   \
 ^
/usr/src/sys/dev/virtio/mmio/virtio_mmio.c:454:13: error: shift count >= width 
of type [-Werror,-Wshift-count-overflow]
paddr >> 32);
  ^  ~~
/usr/src/sys/dev/virtio/mmio/virtio_mmio.c:127:44: note: expanded from macro 
'vtmmio_write_config_4'
VIRTIO_MMIO_PREWRITE(sc->platform, (o), (v));   \
 ^
/usr/src/sys/dev/virtio/mmio/virtio_mmio.c:454:13: error: shift count >= width 
of type [-Werror,-Wshift-count-overflow]
paddr >> 32);
  ^  ~~
/usr/src/sys/dev/virtio/mmio/virtio_mmio.c:128:34: note: expanded from macro 
'vtmmio_write_config_4'
bus_write_4((sc)->res[0], (o), (v));\
^
/usr/src/sys/sys/bus.h:919:59: note: expanded from macro 'bus_write_4'
bus_space_write_4((r)->r_bustag, (r)->r_bushandle, (o), (v))
 

svn commit: r360787 - in head/sys/compat/linuxkpi/common: include/linux src

2020-05-07 Thread Emmanuel Vadot
Author: manu
Date: Thu May  7 17:00:51 2020
New Revision: 360787
URL: https://svnweb.freebsd.org/changeset/base/360787

Log:
  linuxkpi: Add pci_iomap and pci_iounmap
  
  Those function are use to map/unmap io region of a pci device.
  Different resource can be mapped depending on the bar so use a
  tailq to store them all.
  
  Sponsored-by: The FreeBSD Foundation
  
  Reviewed by:  emaste, hselasky
  Differential Revision:https://reviews.freebsd.org/D24696

Modified:
  head/sys/compat/linuxkpi/common/include/linux/pci.h
  head/sys/compat/linuxkpi/common/src/linux_pci.c

Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h
==
--- head/sys/compat/linuxkpi/common/include/linux/pci.h Thu May  7 16:56:18 
2020(r360786)
+++ head/sys/compat/linuxkpi/common/include/linux/pci.h Thu May  7 17:00:51 
2020(r360787)
@@ -222,6 +222,13 @@ extern spinlock_t pci_lock;
 
 #define__devexit_p(x)  x
 
+struct pci_mmio_region {
+   TAILQ_ENTRY(pci_mmio_region)next;
+   struct resource *res;
+   int rid;
+   int type;
+};
+
 struct pci_dev {
struct device   dev;
struct list_headlinks;
@@ -236,6 +243,8 @@ struct pci_dev {
uint32_tclass;
uint8_t revision;
boolmsi_enabled;
+
+   TAILQ_HEAD(, pci_mmio_region)   mmio;
 };
 
 static inline struct resource_list_entry *
@@ -657,6 +666,41 @@ static inline int pci_enable_sriov(struct pci_dev *dev
 }
 static inline void pci_disable_sriov(struct pci_dev *dev)
 {
+}
+
+static inline void *
+pci_iomap(struct pci_dev *dev, int mmio_bar, int mmio_size __unused)
+{
+   struct pci_mmio_region *mmio;
+
+   mmio = malloc(sizeof(*mmio), M_DEVBUF, M_WAITOK | M_ZERO);
+   mmio->rid = PCIR_BAR(mmio_bar);
+   mmio->type = pci_resource_type(dev, mmio_bar);
+   mmio->res = bus_alloc_resource_any(dev->dev.bsddev, mmio->type,
+   >rid, RF_ACTIVE);
+   if (mmio->res == NULL) {
+   free(mmio, M_DEVBUF);
+   return (NULL);
+   }
+   TAILQ_INSERT_TAIL(>mmio, mmio, next);
+
+   return ((void *)rman_get_bushandle(mmio->res));
+}
+
+static inline void
+pci_iounmap(struct pci_dev *dev, void *res)
+{
+   struct pci_mmio_region *mmio, *p;
+
+   TAILQ_FOREACH_SAFE(mmio, >mmio, next, p) {
+   if (res != (void *)rman_get_bushandle(mmio->res))
+   continue;
+   bus_release_resource(dev->dev.bsddev,
+   mmio->type, mmio->rid, mmio->res);
+   TAILQ_REMOVE(>mmio, mmio, next);
+   free(mmio, M_DEVBUF);
+   return;
+   }
 }
 
 #define DEFINE_PCI_DEVICE_TABLE(_table) \

Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c
==
--- head/sys/compat/linuxkpi/common/src/linux_pci.c Thu May  7 16:56:18 
2020(r360786)
+++ head/sys/compat/linuxkpi/common/src/linux_pci.c Thu May  7 17:00:51 
2020(r360787)
@@ -271,6 +271,7 @@ linux_pci_attach_device(device_t dev, struct pci_drive
if (error)
goto out_dma_init;
 
+   TAILQ_INIT(>mmio);
pbus = malloc(sizeof(*pbus), M_DEVBUF, M_WAITOK | M_ZERO);
pbus->self = pdev;
pbus->number = pci_get_bus(dev);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360786 - head/bin/ps

2020-05-07 Thread Piotr Pawel Stefaniak
Author: pstef
Date: Thu May  7 16:56:18 2020
New Revision: 360786
URL: https://svnweb.freebsd.org/changeset/base/360786

Log:
  ps: extend the non-standard option -d (tree view) to work with -p
  
  Initially it seemed that there were multiple possible ways to do it.
  
  Processing option -p could conditionally add selected processes and
  their descendants to the list for further work, but it is not guaranteed
  to know whether the -d option has been used or not, and it also doesn't
  have access to the process list just yet.
  
  There is also descendant_sort() which has access to all possibly needed
  information, but serves the purely post-processing purpose of sorting
  output.
  
  Then there is the loop that uses invocation information and full process
  list to create a list of processes for final display. It seems the most
  natural place to implement this, but indeterminate state of the process
  list and volatility of the final list that is being created obstruct
  adding an elegant search for all elements of process descendancy trees.
  
  So I opted for adding another loop, just before the one I mentioned
  above. For all selected processes it conditionally adds direct
  descendants to the end of this list of selected processes.
  
  Possible usage:
  * ps -auxd -p $$
  * ps -auxd -p 1
  * while x=$(pgrep svnlite); do clear; ps auxd -p $x; sleep 2; done
  * ps -auxd -p `pgrep make`
  
  Reviewed by:  kevans, kaktus (earlier version)
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D24380

Modified:
  head/bin/ps/ps.c

Modified: head/bin/ps/ps.c
==
--- head/bin/ps/ps.cThu May  7 16:40:33 2020(r360785)
+++ head/bin/ps/ps.cThu May  7 16:56:18 2020(r360786)
@@ -506,7 +506,7 @@ main(int argc, char *argv[])
what = KERN_PROC_PGRP | showthreads;
flag = *pgrplist.l.pids;
nselectors = 0;
-   } else if (pidlist.count == 1) {
+   } else if (pidlist.count == 1 && !descendancy) {
what = KERN_PROC_PID | showthreads;
flag = *pidlist.l.pids;
nselectors = 0;
@@ -544,6 +544,14 @@ main(int argc, char *argv[])
if ((kp == NULL && errno != ESRCH) || (kp != NULL && nentries < 0))
xo_errx(1, "%s", kvm_geterr(kd));
nkept = 0;
+   if (descendancy)
+   for (elem = 0; elem < pidlist.count; elem++)
+   for (i = 0; i < nentries; i++)
+   if (kp[i].ki_ppid == pidlist.l.pids[elem]) {
+   if (pidlist.count >= pidlist.maxcount)
+   expand_list();
+   pidlist.l.pids[pidlist.count++] = 
kp[i].ki_pid;
+   }
if (nentries > 0) {
if ((kinfo = malloc(nentries * sizeof(*kinfo))) == NULL)
xo_errx(1, "malloc failed");
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360785 - stable/11

2020-05-07 Thread Dimitry Andric
Author: dim
Date: Thu May  7 16:40:33 2020
New Revision: 360785
URL: https://svnweb.freebsd.org/changeset/base/360785

Log:
  Adjust UPDATING and ObsoleteFiles.inc dates to match reality.

Modified:
  stable/11/ObsoleteFiles.inc
  stable/11/UPDATING

Modified: stable/11/ObsoleteFiles.inc
==
--- stable/11/ObsoleteFiles.inc Thu May  7 16:34:01 2020(r360784)
+++ stable/11/ObsoleteFiles.inc Thu May  7 16:40:33 2020(r360785)
@@ -38,7 +38,7 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
-# 20200505: new clang import which bumps version from 9.0.1 to 10.0.0.
+# 20200507: new clang import which bumps version from 9.0.1 to 10.0.0.
 OLD_FILES+=usr/lib/clang/9.0.1/include/cuda_wrappers/algorithm
 OLD_FILES+=usr/lib/clang/9.0.1/include/cuda_wrappers/complex
 OLD_FILES+=usr/lib/clang/9.0.1/include/cuda_wrappers/new

Modified: stable/11/UPDATING
==
--- stable/11/UPDATING  Thu May  7 16:34:01 2020(r360784)
+++ stable/11/UPDATING  Thu May  7 16:40:33 2020(r360785)
@@ -16,7 +16,7 @@ from older versions of FreeBSD, try WITHOUT_CLANG and 
 the tip of head, and then rebuild without this option. The bootstrap process
 from older version of current across the gcc/clang cutover is a bit fragile.
 
-20200505:
+20200507:
Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have
been upgraded to 10.0.0.  Please see the 20141231 entry below for
information about prerequisites and upgrading, if you are not already
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360783 - stable/12/lib/libc/riscv/gen

2020-05-07 Thread John Baldwin
Author: jhb
Date: Thu May  7 15:59:55 2020
New Revision: 360783
URL: https://svnweb.freebsd.org/changeset/base/360783

Log:
  MFC 355403: Use "far" calls and branches so that lld uses valid relocations.
  
  Conditional branch and jump instructions do not always call via PLT
  stubs and thus will not honor LD_PRELOAD, etc.  lld warns about using
  non-preemptible relocations for preemptible or unknown symbols whereas
  bfd does not (at least for RISC-V).

Modified:
  stable/12/lib/libc/riscv/gen/setjmp.S
  stable/12/lib/libc/riscv/gen/sigsetjmp.S
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/lib/libc/riscv/gen/setjmp.S
==
--- stable/12/lib/libc/riscv/gen/setjmp.S   Thu May  7 15:12:56 2020
(r360782)
+++ stable/12/lib/libc/riscv/gen/setjmp.S   Thu May  7 15:59:55 2020
(r360783)
@@ -46,7 +46,7 @@ ENTRY(setjmp)
addia2, a0, (_JB_SIGMASK * 8)   /* oset */
li  a1, 0   /* set */
li  a0, 1   /* SIG_BLOCK */
-   jal sigprocmask
+   call_C_LABEL(sigprocmask)
 
ld  a0, 0(sp)
ld  ra, 8(sp)
@@ -110,7 +110,7 @@ ENTRY(longjmp)
li  a2, 0   /* oset */
addia1, a0, (_JB_SIGMASK * 8)   /* set */
li  a0, 3   /* SIG_BLOCK */
-   jal sigprocmask
+   call_C_LABEL(sigprocmask)
 
ld  a1, (2 * 8)(sp)
ld  ra, (1 * 8)(sp)

Modified: stable/12/lib/libc/riscv/gen/sigsetjmp.S
==
--- stable/12/lib/libc/riscv/gen/sigsetjmp.SThu May  7 15:12:56 2020
(r360782)
+++ stable/12/lib/libc/riscv/gen/sigsetjmp.SThu May  7 15:59:55 2020
(r360783)
@@ -38,8 +38,10 @@ __FBSDID("$FreeBSD$");
 #include 
 
 ENTRY(sigsetjmp)
-   beqza1, _C_LABEL(_setjmp)
-   j   _C_LABEL(setjmp)
+   beqza1, 1f
+   tail_C_LABEL(setjmp)
+1:
+   tail_C_LABEL(_setjmp)
 END(sigsetjmp)
 
 ENTRY(siglongjmp)
@@ -48,8 +50,10 @@ ENTRY(siglongjmp)
ld  a3, 0(a0)
 
/* Check the magic */
-   beq a2, a3, _C_LABEL(_longjmp)
-   j   _C_LABEL(longjmp)
+   beq a2, a3, 1f
+   tail_C_LABEL(longjmp)
+1:
+   tail_C_LABEL(_longjmp)
 
.align  3
 .Lmagic:
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360782 - stable/11/sys/dev/atkbdc

2020-05-07 Thread Dimitry Andric
Author: dim
Date: Thu May  7 15:12:56 2020
New Revision: 360782
URL: https://svnweb.freebsd.org/changeset/base/360782

Log:
  MFC r306679 (by glebius):
  
  Fix indentation.
  
  CID:  1363671

Modified:
  stable/11/sys/dev/atkbdc/psm.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/atkbdc/psm.c
==
--- stable/11/sys/dev/atkbdc/psm.c  Thu May  7 14:49:17 2020
(r360781)
+++ stable/11/sys/dev/atkbdc/psm.c  Thu May  7 15:12:56 2020
(r360782)
@@ -3366,7 +3366,7 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, 
guest_buttons |= MOUSE_BUTTON1DOWN;
if (pb->ipacket[1] & 0x04)
guest_buttons |= MOUSE_BUTTON2DOWN;
-   if (pb->ipacket[1] & 0x02)
+   if (pb->ipacket[1] & 0x02)
guest_buttons |= MOUSE_BUTTON3DOWN;
 #ifdef EVDEV_SUPPORT
if (evdev_rcpt_mask & EVDEV_RCPT_HW_MOUSE) {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360781 - stable/12/sys/net

2020-05-07 Thread Mark Johnston
Author: markj
Date: Thu May  7 14:49:17 2020
New Revision: 360781
URL: https://svnweb.freebsd.org/changeset/base/360781

Log:
  MFC r360498:
  Increase the iflib txq callout mutex name length to 32 bytes.
  
  PR:   245712

Modified:
  stable/12/sys/net/iflib.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/net/iflib.c
==
--- stable/12/sys/net/iflib.c   Thu May  7 14:20:52 2020(r360780)
+++ stable/12/sys/net/iflib.c   Thu May  7 14:49:17 2020(r360781)
@@ -359,7 +359,7 @@ struct iflib_txq {
bus_dma_tag_t   ift_buf_tag;
bus_dma_tag_t   ift_tso_buf_tag;
iflib_dma_info_tift_ifdi;
-#define MTX_NAME_LEN 16
+#defineMTX_NAME_LEN32
charift_mtx_name[MTX_NAME_LEN];
bus_dma_segment_t   ift_segs[IFLIB_MAX_TX_SEGS]  
__aligned(CACHE_LINE_SIZE);
 #ifdef IFLIB_DIAGNOSTICS
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360780 - in stable/12: share/mk sys/conf

2020-05-07 Thread John Baldwin
Author: jhb
Date: Thu May  7 14:20:52 2020
New Revision: 360780
URL: https://svnweb.freebsd.org/changeset/base/360780

Log:
  MFC 355428,356504: Add a new "riscv-relaxations" linker feature.
  
  355428:
  Add a new "riscv-relaxations" linker feature.
  
  When the linker doesn't have this feature, add -mno-relax to CFLAGS
  on RISC-V.
  
  Define the feature for ld.bfd, but not lld.  If lld gains relaxation
  support in a newer version, we can enable it for those versions of lld
  in bsd.linker.mk.
  
  356504:
  Add -mno-relax to CFLAGS in bsd.prog/lib.mk instead of bsd.cpu.mk.
  
  bsd.cpu.mk is included by bsd.init.mk before bsd.linker.mk, so it
  was always setting the flag since LINKER_FEATURES wasn't defined.

Modified:
  stable/12/share/mk/bsd.lib.mk
  stable/12/share/mk/bsd.linker.mk
  stable/12/share/mk/bsd.prog.mk
  stable/12/sys/conf/kern.mk
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/share/mk/bsd.lib.mk
==
--- stable/12/share/mk/bsd.lib.mk   Thu May  7 13:11:32 2020
(r360779)
+++ stable/12/share/mk/bsd.lib.mk   Thu May  7 14:20:52 2020
(r360780)
@@ -86,6 +86,10 @@ CXXFLAGS+= ${DEBUG_FILES_CFLAGS}
 CTFFLAGS+= -g
 .endif
 
+.if ${MACHINE_CPUARCH} == "riscv" && ${LINKER_FEATURES:Mriscv-relaxations} == 
""
+CFLAGS += -mno-relax
+.endif
+
 .include 
 
 # prefer .s to a .c, add .po, remove stuff not used in the BSD libraries

Modified: stable/12/share/mk/bsd.linker.mk
==
--- stable/12/share/mk/bsd.linker.mkThu May  7 13:11:32 2020
(r360779)
+++ stable/12/share/mk/bsd.linker.mkThu May  7 14:20:52 2020
(r360780)
@@ -82,6 +82,9 @@ ${X_}LINKER_FEATURES=
 ${X_}LINKER_FEATURES+= build-id
 ${X_}LINKER_FEATURES+= ifunc
 .endif
+.if ${${X_}LINKER_TYPE} == "bfd" && ${${X_}LINKER_VERSION} > 21750
+${X_}LINKER_FEATURES+= riscv-relaxations
+.endif
 .if ${${X_}LINKER_TYPE} != "lld" || ${${X_}LINKER_VERSION} >= 5
 ${X_}LINKER_FEATURES+= filter
 .endif

Modified: stable/12/share/mk/bsd.prog.mk
==
--- stable/12/share/mk/bsd.prog.mk  Thu May  7 13:11:32 2020
(r360779)
+++ stable/12/share/mk/bsd.prog.mk  Thu May  7 14:20:52 2020
(r360780)
@@ -52,6 +52,10 @@ LDFLAGS+= -Wl,-zretpolineplt
 .endif
 .endif
 
+.if ${MACHINE_CPUARCH} == "riscv" && ${LINKER_FEATURES:Mriscv-relaxations} == 
""
+CFLAGS += -mno-relax
+.endif
+
 .if defined(CRUNCH_CFLAGS)
 CFLAGS+=${CRUNCH_CFLAGS}
 .else

Modified: stable/12/sys/conf/kern.mk
==
--- stable/12/sys/conf/kern.mk  Thu May  7 13:11:32 2020(r360779)
+++ stable/12/sys/conf/kern.mk  Thu May  7 14:20:52 2020(r360780)
@@ -147,6 +147,10 @@ CFLAGS+=   -march=rv64imafdc -mabi=lp64
 CFLAGS.clang+= -mcmodel=medium
 CFLAGS.gcc+=   -mcmodel=medany
 INLINE_LIMIT?= 8000
+
+.if ${LINKER_FEATURES:Mriscv-relaxations} == ""
+CFLAGS+=   -mno-relax
+.endif
 .endif
 
 #
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360779 - head/sys/dev/gpio

2020-05-07 Thread Andriy Gapon
Author: avg
Date: Thu May  7 13:11:32 2020
New Revision: 360779
URL: https://svnweb.freebsd.org/changeset/base/360779

Log:
  gpioiic_attach: fix a NULL pointer crash on hints-based systems
  
  The attach method uses GPIO_GET_BUS() to get a "newbus" device
  that provides a pin.  But on hints-based systems a GPIO controller
  driver might not be fully initialized yet and it does not know gpiobus
  hanging off it.  Thus, GPIO_GET_BUS() cannot be called yet.
  The reason is that controller drivers typically create a child gpiobus
  using gpiobus_attach_bus() and that leads to the following call chain:
  gpiobus_attach_bus() -> gpiobus_attach() ->
  bus_generic_attach(gpiobus) -> gpioiic_attach().
  So, gpioiic_attach() is called before gpiobus_attach_bus() returns.
  
  I observed this bug with nctgpio driver on amd64.
  I think that the problem was introduced in r355276.
  
  The fix is to avoid calling GPIO_GET_BUS() from the attach method.
  Instead, we know that on hints-based systems only the parent gpiobus can
  provide the pins.
  Nothing is changed for FDT-based systems.
  
  MFC after:1 week

Modified:
  head/sys/dev/gpio/gpioiic.c

Modified: head/sys/dev/gpio/gpioiic.c
==
--- head/sys/dev/gpio/gpioiic.c Thu May  7 12:43:28 2020(r360778)
+++ head/sys/dev/gpio/gpioiic.c Thu May  7 13:11:32 2020(r360779)
@@ -303,10 +303,20 @@ gpioiic_attach(device_t dev)
return (ENXIO);
}
 
-   /* Say what we came up with for pin config. */
+   /*
+* Say what we came up with for pin config.
+* NB: in the !FDT case the controller driver might not be set up enough
+* for GPIO_GET_BUS() to work.  Also, our parent is the only gpiobus
+* that can provide our pins.
+*/
device_printf(dev, "SCL pin: %s:%d, SDA pin: %s:%d\n",
+#ifdef FDT
device_get_nameunit(GPIO_GET_BUS(sc->sclpin->dev)), sc->sclpin->pin,
device_get_nameunit(GPIO_GET_BUS(sc->sdapin->dev)), 
sc->sdapin->pin);
+#else
+   device_get_nameunit(device_get_parent(dev)), sc->sclpin->pin,
+   device_get_nameunit(device_get_parent(dev)), sc->sdapin->pin);
+#endif
 
/* Add the bitbang driver as our only child; it will add iicbus. */
device_add_child(sc->dev, "iicbb", -1);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360778 - head/share/termcap

2020-05-07 Thread Baptiste Daroussin
Author: bapt
Date: Thu May  7 12:43:28 2020
New Revision: 360778
URL: https://svnweb.freebsd.org/changeset/base/360778

Log:
  Update the screen termcap entries
  
  Those updates have been obtained form converting the terminfo information
  provided by the screen sources to termcap.
  
  MFC after:3 days

Modified:
  head/share/termcap/termcap

Modified: head/share/termcap/termcap
==
--- head/share/termcap/termcap  Thu May  7 11:28:39 2020(r360777)
+++ head/share/termcap/termcap  Thu May  7 12:43:28 2020(r360778)
@@ -2758,35 +2758,35 @@ vt340-color|vt340 co:\
 # SC,SB,SH,SW names needed for screen(1)
 #
 SC|screen|VT 100/ANSI X3.64 virtual terminal:\
-   :am:xn:ms:mi:G0:km:\
-   :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:bs:bt=\E[Z:\
-   :cb=\E[1K:cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:ct=\E[3g:\
-   :do=^J:nd=\E[C:pt:rc=\E8:rs=\Ec:sc=\E7:st=\EH:up=\EM:\
-   :le=^H:bl=^G:cr=^M:it#8:ho=\E[H:nw=\EE:ta=^I:is=\E)0:\
-   :li#24:co#80:us=\E[4m:ue=\E[24m:so=\E[3m:se=\E[23m:\
-   :mb=\E[5m:md=\E[1m:mr=\E[7m:me=\E[m:sr=\EM:al=\E[L:\
-   :AL=\E[%dL:dl=\E[M:DL=\E[%dM:cs=\E[%i%d;%dr:dc=\E[P:\
-   :DC=\E[%dP:im=\E[4h:ei=\E[4l:IC=\E[%d@:\
-   :ks=\E[?1h\E=:ke=\E[?1l\E>:vb=\Eg:\
-   :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\
-   :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\
-   :k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:F1=\E[23~:F2=\E[24~:\
-   :F3=\E[25~:F4=\E[26~:F5=\E[28~:F6=\E[29~:\
-   :F7=\E[31~:F8=\E[32~:F9=\E[33~:FA=\E[34~:\
-   :kh=\E[1~:kI=\E[2~:kD=\E[3~:@7=\E[4~:kP=\E[5~:\
-   :kN=\E[6~:eA=\E(B\E)0:as=^N:ae=^O:ti=\E[?1049h:te=\E[?1049l:\
-   :vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l:\
-   :Co#8:pa#64:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:AX:\
-   :ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++,,hhII00:
+   :am:km:mi:ms:xn:\
+   :Co#8:co#80:it#8:li#24:pa#64:\
+   :@7=\E[4~:AB=\E[4%dm:AF=\E[3%dm:AL=\E[%dL:DC=\E[%dP:\
+   :DL=\E[%dM:DO=\E[%dB:F1=\E[23~:F2=\E[24~:IC=\E[%d@:\
+   :LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:\
+   :ac=++,,--..00II``aaffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~:\
+   :ae=^O:al=\E[L:as=^N:bl=^G:bt=\E[Z:cb=\E[1K:cd=\E[J:ce=\E[K:\
+   :cl=\E[H\E[J:cm=\E[%i%d;%dH:cr=\r:cs=\E[%i%d;%dr:\
+   :ct=\E[3g:dc=\E[P:dl=\E[M:do=\n:eA=\E(B\E)0:ei=\E[4l:\
+   :ho=\E[H:im=\E[4h:is=\E)0:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:\
+   :k5=\E[15~:k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:\
+   :k;=\E[21~:kD=\E[3~:kI=\E[2~:kN=\E[6~:kP=\E[5~:kd=\EOB:\
+   :ke=\E[?1l\E>:kh=\E[1~:kl=\EOD:kr=\EOC:ks=\E[?1h\E=:\
+   :ku=\EOA:le=^H:mb=\E[5m:md=\E[1m:me=\E[m:mr=\E[7m:nd=\E[C:\
+   :nw=\EE:op=\E[39;49m:rc=\E8:rs=\Ec:sc=\E7:se=\E[23m:sf=\n:\
+   :so=\E[3m:sr=\EM:st=\EH:ta=^I:te=\E[?1049l:ti=\E[?1049h:\
+   :ue=\E[24m:up=\EM:us=\E[4m:vb=\Eg:ve=\E[34h\E[?25h:\
+   :vi=\E[?25l:vs=\E[34l:
 SB|screen-bce|VT 100/ANSI X3.64 virtual terminal with bce:\
:ut:tc=screen:
 SH|screen-s|VT 100/ANSI X3.64 virtual terminal with hardstatus line:\
-   :ts=\E_:fs=\E\\:ds=\E_\E\\:tc=screen:
+   :ut:hs:ts=\E_:fs=\E\\:ds=\E_\E\\:tc=screen:
 SW|screen-w|VT 100/ANSI X3.64 virtual terminal with 132 cols:\
:co#132:tc=screen:
 screen-256color|VT 100/ANSI X3.64 terminal with 256 colors:\
+   :cc:\
:Co#256:pa#32767:\
-   :AB=\E[48;5;%dm:AF=\E[38;5;%dm:tc=screen:
+   :AB=\E[48;5;%dm:AF=\E[38;5;%dm:\
+   :Sb=\E[48;5;%dm:Sf=\E[38;5;%dm:tc=screen:
 
 ecma+italics|ECMA-48 italics:\
:ZH=\E[3m:ZR=\E[23m:
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360777 - head/sys/dev/ena

2020-05-07 Thread Marcin Wojtas
Author: mw
Date: Thu May  7 11:28:39 2020
New Revision: 360777
URL: https://svnweb.freebsd.org/changeset/base/360777

Log:
  Optimize ENA Rx refill for low memory conditions
  
  Sometimes, especially when there is not much memory in the system left,
  allocating mbuf jumbo clusters (like 9KB or 16KB) can take a lot of time
  and it is not guaranteed that it'll succeed. In that situation, the
  fallback will work, but if the refill needs to take a place for a lot of
  descriptors at once, the time spent in m_getjcl looking for memory can
  cause system unresponsiveness due to high priority of the Rx task. This
  can also lead to driver reset, because Tx cleanup routine is being
  blocked and timer service could detect that Tx packets aren't cleaned
  up. The reset routine can further create another unresponsiveness - Rx
  rings are being refilled there, so m_getjcl will again burn the CPU.
  This was causing NVMe driver timeouts and resets, because network driver
  is having higher priority.
  
  Instead of 16KB jumbo clusters for the Rx buffers, 9KB clusters are
  enough - ENA MTU is being set to 9K anyway, so it's very unlikely that
  more space than 9KB will be needed.
  
  However, 9KB jumbo clusters can still cause issues, so by default the
  page size mbuf cluster will be used for the Rx descriptors. This can have a
  small (~2%) impact on the throughput of the device, so to restore
  original behavior, one must change sysctl "hw.ena.enable_9k_mbufs" to
  "1" in "/boot/loader.conf" file.
  
  As a part of this patch (important fix), the version of the driver
  was updated to v2.1.2.
  
  Submitted by:   cperciva
  Reviewed by:Michal Krawczyk 
  Reviewed by:Ido Segev 
  Reviewed by:Guy Tzalik 
  MFC after:  3 days
  PR: 225791, 234838, 235856, 236989, 243531
  Differential Revision: https://reviews.freebsd.org/D24546

Modified:
  head/sys/dev/ena/ena.c
  head/sys/dev/ena/ena.h
  head/sys/dev/ena/ena_sysctl.c
  head/sys/dev/ena/ena_sysctl.h

Modified: head/sys/dev/ena/ena.c
==
--- head/sys/dev/ena/ena.c  Thu May  7 10:46:02 2020(r360776)
+++ head/sys/dev/ena/ena.c  Thu May  7 11:28:39 2020(r360777)
@@ -368,6 +368,7 @@ ena_init_io_rings_common(struct ena_adapter *adapter, 
ring->ena_dev = adapter->ena_dev;
ring->first_interrupt = false;
ring->no_interrupt_event_cnt = 0;
+   ring->rx_mbuf_sz = ena_mbuf_sz;
 }
 
 static void
@@ -508,9 +509,9 @@ ena_setup_rx_dma_tag(struct ena_adapter *adapter)
ENA_DMA_BIT_MASK(adapter->dma_width), /* lowaddr of excl window  */
BUS_SPACE_MAXADDR,/* highaddr of excl window */
NULL, NULL,   /* filter, filterarg   */
-   MJUM16BYTES,  /* maxsize */
+   ena_mbuf_sz,  /* maxsize */
adapter->max_rx_sgl_size, /* nsegments   */
-   MJUM16BYTES,  /* maxsegsize  */
+   ena_mbuf_sz,  /* maxsegsize  */
0,/* flags   */
NULL, /* lockfunc*/
NULL, /* lockarg */
@@ -963,7 +964,8 @@ ena_alloc_rx_mbuf(struct ena_adapter *adapter,
return (0);
 
/* Get mbuf using UMA allocator */
-   rx_info->mbuf = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM16BYTES);
+   rx_info->mbuf = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR,
+   rx_ring->rx_mbuf_sz);
 
if (unlikely(rx_info->mbuf == NULL)) {
counter_u64_add(rx_ring->rx_stats.mjum_alloc_fail, 1);
@@ -974,7 +976,7 @@ ena_alloc_rx_mbuf(struct ena_adapter *adapter,
}
mlen = MCLBYTES;
} else {
-   mlen = MJUM16BYTES;
+   mlen = rx_ring->rx_mbuf_sz;
}
/* Set mbuf length*/
rx_info->mbuf->m_pkthdr.len = rx_info->mbuf->m_len = mlen;

Modified: head/sys/dev/ena/ena.h
==
--- head/sys/dev/ena/ena.h  Thu May  7 10:46:02 2020(r360776)
+++ head/sys/dev/ena/ena.h  Thu May  7 11:28:39 2020(r360777)
@@ -41,7 +41,7 @@
 
 #define DRV_MODULE_VER_MAJOR   2
 #define DRV_MODULE_VER_MINOR   1
-#define DRV_MODULE_VER_SUBMINOR 1
+#define DRV_MODULE_VER_SUBMINOR 2
 
 #define DRV_MODULE_NAME"ena"
 
@@ -307,8 +307,13 @@ struct ena_ring {
 
/* Determines if device will use LLQ or normal mode for TX */
enum ena_admin_placement_policy_type tx_mem_queue_type;
-   /* The maximum length the driver can push to the device (For LLQ) */
-   uint8_t tx_max_header_size;
+   union 

svn commit: r360776 - head/sys/netinet/tcp_stacks

2020-05-07 Thread Randall Stewart
Author: rrs
Date: Thu May  7 10:46:02 2020
New Revision: 360776
URL: https://svnweb.freebsd.org/changeset/base/360776

Log:
  NF has an internal option that changes the tcp_mcopy_m routine slightly (has
  a few extra arguments). Recently that changed to only have one arg extra so
  that two ifdefs around the call are no longer needed. Lets take out the
  extra ifdef and arg.
  
  Sponsored by: Netflix Inc
  Differential Revision: https://reviews.freebsd.org/D24736

Modified:
  head/sys/netinet/tcp_stacks/bbr.c
  head/sys/netinet/tcp_stacks/rack.c

Modified: head/sys/netinet/tcp_stacks/bbr.c
==
--- head/sys/netinet/tcp_stacks/bbr.c   Thu May  7 08:58:08 2020
(r360775)
+++ head/sys/netinet/tcp_stacks/bbr.c   Thu May  7 10:46:02 2020
(r360776)
@@ -13420,9 +13420,6 @@ send:
 #endif
orig_len = len;
m->m_next = tcp_m_copym(
-#ifdef NETFLIX_COPY_ARGS
-   tp,
-#endif
mb, moff, ,
if_hw_tsomaxsegcount,
if_hw_tsomaxsegsize, msb,

Modified: head/sys/netinet/tcp_stacks/rack.c
==
--- head/sys/netinet/tcp_stacks/rack.c  Thu May  7 08:58:08 2020
(r360775)
+++ head/sys/netinet/tcp_stacks/rack.c  Thu May  7 10:46:02 2020
(r360776)
@@ -13353,9 +13353,6 @@ send:
else
msb = sb;
m->m_next = tcp_m_copym(
-#ifdef NETFLIX_COPY_ARGS
-   tp,
-#endif
mb, moff, ,
if_hw_tsomaxsegcount, if_hw_tsomaxsegsize, msb,
((rsm == NULL) ? hw_tls : 0)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360775 - head/share/termcap

2020-05-07 Thread Baptiste Daroussin
Author: bapt
Date: Thu May  7 08:58:08 2020
New Revision: 360775
URL: https://svnweb.freebsd.org/changeset/base/360775

Log:
  Fix indentation of the Kitty entry
  
  MFC after:2 days

Modified:
  head/share/termcap/termcap

Modified: head/share/termcap/termcap
==
--- head/share/termcap/termcap  Thu May  7 08:22:47 2020(r360774)
+++ head/share/termcap/termcap  Thu May  7 08:58:08 2020(r360775)
@@ -4752,22 +4752,22 @@ xterm-kitty|KovId's TTY:\
:tc=xterm-256color:tc=kitty+common:
 
 kitty+common|KovId's TTY common properties:\
-:am:hs:km:mi:ms:xn:\
-:co#80:it#8:li#24:\
-:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:K1=:K3=:\
-:K4=:K5=:LE=\E[%dD:RI=\E[%dC:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:\
-:ae=\E(B:al=\E[L:as=\E(0:bl=^G:bt=\E[Z:cd=\E[J:ce=\E[K:\
-:cl=\E[H\E[2J:cm=\E[%i%d;%dH:cr=\r:cs=\E[%i%d;%dr:\
-:ct=\E[3g:dc=\E[P:dl=\E[M:do=\n:ds=\E]2;\007:ec=\E[%dX:\
-:ei=\E[4l:fs=^G:ho=\E[H:im=\E[4h:k1=\EOP:k2=\EOQ:k3=\EOR:\
-:k4=\EOS:k5=\E[15~:k6=\E[17~:k7=\E[18~:k8=\E[19~:\
-:k9=\E[20~:kD=\E[3~:kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=\177:\
-:kd=\EOB:ke=\E[?1l:kh=\EOH:kl=\EOD:kr=\EOC:ks=\E[?1h:\
-:ku=\EOA:le=^H:md=\E[1m:me=\E[0m:mh=\E[2m:mr=\E[7m:nd=\E[C:\
-:rc=\E8:sc=\E7:se=\E[27m:sf=\n:so=\E[7m:sr=\EM:st=\EH:ta=^I:\
-:te=\E[?1049l:ti=\E[?1049h:ts=\E]2;:ue=\E[24m:up=\E[A:\
-:us=\E[4m:vb=\E[?5h\E[?5l:ve=\E[?12l\E[?25h:vi=\E[?25l:\
-:vs=\E[?12;25h:
+   :am:hs:km:mi:ms:xn:\
+   :co#80:it#8:li#24:\
+   :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:K1=:K3=:\
+   :K4=:K5=:LE=\E[%dD:RI=\E[%dC:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:\
+   :ae=\E(B:al=\E[L:as=\E(0:bl=^G:bt=\E[Z:cd=\E[J:ce=\E[K:\
+   :cl=\E[H\E[2J:cm=\E[%i%d;%dH:cr=\r:cs=\E[%i%d;%dr:\
+   :ct=\E[3g:dc=\E[P:dl=\E[M:do=\n:ds=\E]2;\007:ec=\E[%dX:\
+   :ei=\E[4l:fs=^G:ho=\E[H:im=\E[4h:k1=\EOP:k2=\EOQ:k3=\EOR:\
+   :k4=\EOS:k5=\E[15~:k6=\E[17~:k7=\E[18~:k8=\E[19~:\
+   :k9=\E[20~:kD=\E[3~:kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=\177:\
+   :kd=\EOB:ke=\E[?1l:kh=\EOH:kl=\EOD:kr=\EOC:ks=\E[?1h:\
+   :ku=\EOA:le=^H:md=\E[1m:me=\E[0m:mh=\E[2m:mr=\E[7m:nd=\E[C:\
+   :rc=\E8:sc=\E7:se=\E[27m:sf=\n:so=\E[7m:sr=\EM:st=\EH:ta=^I:\
+   :te=\E[?1049l:ti=\E[?1049h:ts=\E]2;:ue=\E[24m:up=\E[A:\
+   :us=\E[4m:vb=\E[?5h\E[?5l:ve=\E[?12l\E[?25h:vi=\E[?25l:\
+   :vs=\E[?12;25h:
 
 #
 # END OF TERMCAP
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360774 - stable/11/sys/dev/vxge/vxgehal

2020-05-07 Thread Dimitry Andric
Author: dim
Date: Thu May  7 08:22:47 2020
New Revision: 360774
URL: https://svnweb.freebsd.org/changeset/base/360774

Log:
  Fix misleading indentation warning:
  
  sys/dev/vxge/vxgehal/vxgehal-virtualpath.c:5550:6: error: misleading 
indentation; statement is not part of the previous 'if' 
[-Werror,-Wmisleading-indentation]
  return 
(VXGE_HAL_ERR_EVENT_MRPCIM_CRITICAL);
  ^
  sys/dev/vxge/vxgehal/vxgehal-virtualpath.c:5545:5: note: previous statement 
is here
  if (!skip_alarms)
  ^
  
  Direct commit to stable/11, since vxge(4) has been removed from FreeBSD
  12 and later.

Modified:
  stable/11/sys/dev/vxge/vxgehal/vxgehal-virtualpath.c

Modified: stable/11/sys/dev/vxge/vxgehal/vxgehal-virtualpath.c
==
--- stable/11/sys/dev/vxge/vxgehal/vxgehal-virtualpath.cThu May  7 
08:11:36 2020(r360773)
+++ stable/11/sys/dev/vxge/vxgehal/vxgehal-virtualpath.cThu May  7 
08:22:47 2020(r360774)
@@ -5547,7 +5547,7 @@ __hal_vpath_alarm_process(__hal_virtualpath_t *vpath, 
hldev->header.regh0,

VXGE_HAL_MRPCIM_TO_VPATH_ALARM_REG_ALARM,

>vp_reg->mrpcim_to_vpath_alarm_reg);
-   return 
(VXGE_HAL_ERR_EVENT_MRPCIM_CRITICAL);
+   return (VXGE_HAL_ERR_EVENT_MRPCIM_CRITICAL);
}
 
if (!skip_alarms)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360773 - in head/sys/net: . route

2020-05-07 Thread Alexander V. Chernikov
Author: melifaro
Date: Thu May  7 08:11:36 2020
New Revision: 360773
URL: https://svnweb.freebsd.org/changeset/base/360773

Log:
  Add rib_lookup() sockaddr lookup wrapper and make ifa_ifwithroute use it.
  
  Create rib_lookup() wrapper around per-af dataplane lookup functions.
  This will help in the cases of having control plane af-agnostic code.
  
  Switch ifa_ifwithroute() to use this function instead of rtalloc1().
  
  Reviewed by:  ae
  Differential Revision:https://reviews.freebsd.org/D24731

Modified:
  head/sys/net/route.c
  head/sys/net/route.h
  head/sys/net/route/route_helpers.c

Modified: head/sys/net/route.c
==
--- head/sys/net/route.cThu May  7 03:50:34 2020(r360772)
+++ head/sys/net/route.cThu May  7 08:11:36 2020(r360773)
@@ -683,7 +683,6 @@ ifa_ifwithroute(int flags, const struct sockaddr *dst,
u_int fibnum)
 {
struct ifaddr *ifa;
-   int not_found = 0;
 
NET_EPOCH_ASSERT();
if ((flags & RTF_GATEWAY) == 0) {
@@ -710,34 +709,17 @@ ifa_ifwithroute(int flags, const struct sockaddr *dst,
if (ifa == NULL)
ifa = ifa_ifwithnet(gateway, 0, fibnum);
if (ifa == NULL) {
-   struct rtentry *rt;
+   struct nhop_object *nh;
 
-   rt = rtalloc1_fib(gateway, 0, flags, fibnum);
-   if (rt == NULL)
-   goto out;
+   nh = rib_lookup(fibnum, gateway, NHR_NONE, 0);
+
/*
 * dismiss a gateway that is reachable only
 * through the default router
 */
-   switch (gateway->sa_family) {
-   case AF_INET:
-   if (satosin(rt_key(rt))->sin_addr.s_addr == INADDR_ANY)
-   not_found = 1;
-   break;
-   case AF_INET6:
-   if 
(IN6_IS_ADDR_UNSPECIFIED((rt_key(rt))->sin6_addr))
-   not_found = 1;
-   break;
-   default:
-   break;
-   }
-   if (!not_found && rt->rt_nhop->nh_ifa != NULL) {
-   ifa = rt->rt_nhop->nh_ifa;
-   }
-   RT_REMREF(rt);
-   RT_UNLOCK(rt);
-   if (not_found || ifa == NULL)
-   goto out;
+   if ((nh == NULL) || (nh->nh_flags & NHF_DEFAULT))
+   return (NULL);
+   ifa = nh->nh_ifa;
}
if (ifa->ifa_addr->sa_family != dst->sa_family) {
struct ifaddr *oifa = ifa;
@@ -745,7 +727,7 @@ ifa_ifwithroute(int flags, const struct sockaddr *dst,
if (ifa == NULL)
ifa = oifa;
}
- out:
+
return (ifa);
 }
 

Modified: head/sys/net/route.h
==
--- head/sys/net/route.hThu May  7 03:50:34 2020(r360772)
+++ head/sys/net/route.hThu May  7 08:11:36 2020(r360773)
@@ -436,6 +436,8 @@ int rib_add_redirect(u_int fibnum, struct sockaddr *ds
 
 /* New API */
 void   rib_walk(int af, u_int fibnum, rt_walktree_f_t *wa_f, void *arg);
+struct nhop_object *rib_lookup(uint32_t fibnum, const struct sockaddr *dst,
+   uint32_t flags, uint32_t flowid);
 #endif
 
 #endif

Modified: head/sys/net/route/route_helpers.c
==
--- head/sys/net/route/route_helpers.c  Thu May  7 03:50:34 2020
(r360772)
+++ head/sys/net/route/route_helpers.c  Thu May  7 08:11:36 2020
(r360773)
@@ -55,6 +55,12 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#ifdef INET
+#include 
+#endif
+#ifdef INET6
+#include 
+#endif
 #include 
 
 /*
@@ -79,5 +85,50 @@ rib_walk(int af, u_int fibnum, rt_walktree_f_t *wa_f, 
RIB_RLOCK(rnh);
rnh->rnh_walktree(>head, (walktree_f_t *)wa_f, arg);
RIB_RUNLOCK(rnh);
+}
+
+/*
+ * Wrapper for the control plane functions for performing af-agnostic
+ *  lookups.
+ * @fibnum: fib to perform the lookup.
+ * @dst: sockaddr with family and addr filled in. IPv6 addresses needs to be in
+ *  deembedded from.
+ * @flags: fib(9) flags.
+ * @flowid: flow id for path selection in multipath use case.
+ *
+ * Returns nhop_object or NULL.
+ *
+ * Requires NET_EPOCH.
+ *
+ */
+struct nhop_object *
+rib_lookup(uint32_t fibnum, const struct sockaddr *dst, uint32_t flags,
+uint32_t flowid)
+{
+   struct nhop_object *nh;
+
+   nh = NULL;
+
+   switch (dst->sa_family) {
+#ifdef INET
+   case AF_INET:
+   {
+   const struct sockaddr_in *a = (const struct sockaddr_in *)dst;
+   nh = fib4_lookup(fibnum, a->sin_addr, 0, flags, flowid);
+   break;
+   }
+#endif
+#ifdef INET6
+