svn commit: r351067 - head/share/mk

2019-08-14 Thread Simon J. Gerraty
Author: sjg
Date: Thu Aug 15 06:00:55 2019
New Revision: 351067
URL: https://svnweb.freebsd.org/changeset/base/351067

Log:
  Revert prior change till installworld sorted

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

Modified: head/share/mk/bsd.files.mk
==
--- head/share/mk/bsd.files.mk  Thu Aug 15 04:47:42 2019(r351066)
+++ head/share/mk/bsd.files.mk  Thu Aug 15 06:00:55 2019(r351067)
@@ -101,11 +101,11 @@ STAGE_AS_SETS+=   ${file}
 STAGE_AS_${file}= ${${group}NAME_${file}}
 # XXX {group}OWN,GRP,MODE
 STAGE_DIR.${file}= ${STAGE_OBJTOP}${${_${group}DIR_${file}}}
-stage_as.${file:T}: ${file}
+stage_as.${file}: ${file}
 
 installfiles-${group}: _${group}INS1_${file}
-_${group}INS1_${file:T}: installdirs-${_${group}DIR_${file}} 
_${group}INS_${file}
-_${group}INS_${file:T}: ${file}
+_${group}INS1_${file}: installdirs-${_${group}DIR_${file}} _${group}INS_${file}
+_${group}INS_${file}: ${file}
${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN_${file}} \
-g ${${group}GRP_${file}} -m ${${group}MODE_${file}} \
${.ALLSRC} ${${group}PREFIX_${file}}/${${group}NAME_${file}}
___
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: r351055 - head/share/mk

2019-08-14 Thread Simon J. Gerraty via svn-src-head
O. Hartmann  wrote:
> This commit seems to break "make installworld" by this error during install:

Sorry, I'll revert if I cannot quickly spot the issue

> 
> [...]
> ===> share/doc (install)
> ===> share/doc/IPv6 (install)
> installing DIRS FILESDIR
> install  -d -m 0755 -o root  -g wheel  /usr/share/doc/IPv6
> install  -o root  -g wheel -m 444  /usr/src/share/doc/IPv6/IMPLEMENTATION
> /usr/share/doc/IPv6/IMPLEMENTATION ===> share/doc/legal (install)
> ===> share/doc/legal/intel_ipw (install)
> make[7]: don't know how to make
> _FILESINS1_/usr/src/sys/contrib/dev/ipw/LICENSE. Stop
> 
> make[7]: stopped in /usr/src/share/doc/legal/intel_ipw
> *** Error code 2
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r351055 - head/share/mk

2019-08-14 Thread O. Hartmann
On Wed, 14 Aug 2019 22:33:46 + (UTC)
"Simon J. Gerraty"  wrote:

> Author: sjg
> Date: Wed Aug 14 22:33:46 2019
> New Revision: 351055
> URL: https://svnweb.freebsd.org/changeset/base/351055
>
> Log:
>   bsd.files.mk: fix targets to avoid directories
>
>   Reintroduce :T when file is used as part of a target name.
>
>   Reviewed by:stevek
>
> Modified:
>   head/share/mk/bsd.files.mk
>
> Modified: head/share/mk/bsd.files.mk
> ==
> --- head/share/mk/bsd.files.mkWed Aug 14 22:13:11 2019
> (r351054) +++ head/share/mk/bsd.files.mk  Wed Aug 14 22:33:46
> 2019  (r351055) @@ -101,11 +101,11 @@ STAGE_AS_SETS+= ${file}
>  STAGE_AS_${file}= ${${group}NAME_${file}}
>  # XXX {group}OWN,GRP,MODE
>  STAGE_DIR.${file}= ${STAGE_OBJTOP}${${_${group}DIR_${file}}}
> -stage_as.${file}: ${file}
> +stage_as.${file:T}: ${file}
>
>  installfiles-${group}: _${group}INS1_${file}
> -_${group}INS1_${file}: installdirs-${_${group}DIR_${file}}
> _${group}INS_${file} -_${group}INS_${file}: ${file}
> +_${group}INS1_${file:T}: installdirs-${_${group}DIR_${file}}
> _${group}INS_${file} +_${group}INS_${file:T}: ${file}
>   ${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN_${file}} \
>   -g ${${group}GRP_${file}} -m ${${group}MODE_${file}} \
>   ${.ALLSRC} ${${group}PREFIX_${file}}/${${group}NAME_${file}}
> ___
> 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"



This commit seems to break "make installworld" by this error during install:

[...]
===> share/doc (install)
===> share/doc/IPv6 (install)
installing DIRS FILESDIR
install  -d -m 0755 -o root  -g wheel  /usr/share/doc/IPv6
install  -o root  -g wheel -m 444  /usr/src/share/doc/IPv6/IMPLEMENTATION
/usr/share/doc/IPv6/IMPLEMENTATION ===> share/doc/legal (install)
===> share/doc/legal/intel_ipw (install)
make[7]: don't know how to make
_FILESINS1_/usr/src/sys/contrib/dev/ipw/LICENSE. Stop

make[7]: stopped in /usr/src/share/doc/legal/intel_ipw
*** Error code 2
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r351066 - head/tests/sys/fs/fusefs

2019-08-14 Thread Alan Somers
Author: asomers
Date: Thu Aug 15 04:47:42 2019
New Revision: 351066
URL: https://svnweb.freebsd.org/changeset/base/351066

Log:
  fusefs: fix conditional from r351061
  
  The entirety of r351061 was a copy/paste error.  I'm sorry I've been
  comitting so hastily.
  
  Reported by:  rpokala
  Reviewed by:  rpokala
  MFC after:2 weeks
  MFC-With: 351061
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D21265

Modified:
  head/tests/sys/fs/fusefs/mockfs.cc

Modified: head/tests/sys/fs/fusefs/mockfs.cc
==
--- head/tests/sys/fs/fusefs/mockfs.cc  Thu Aug 15 03:42:15 2019
(r351065)
+++ head/tests/sys/fs/fusefs/mockfs.cc  Thu Aug 15 04:47:42 2019
(r351066)
@@ -842,8 +842,7 @@ void MockFS::read_request(mockfs_buf_in &in) {
 * request,including header, even though fuse_out_header.len excludes
 * the size of the header.
 */
-   ASSERT_TRUE(res == static_cast(sizeof(in.header.len)) ||
-   m_quit);
+   ASSERT_TRUE(res == static_cast(in.header.len) || m_quit);
 }
 
 void MockFS::write_response(const mockfs_buf_out &out) {
___
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: r351065 - in head/sys/powerpc: booke include

2019-08-14 Thread Justin Hibbits
Author: jhibbits
Date: Thu Aug 15 03:42:15 2019
New Revision: 351065
URL: https://svnweb.freebsd.org/changeset/base/351065

Log:
  powerpc/pmap: Enable UMA_MD_SMALL_ALLOC for 64-bit booke
  
  The only thing blocking UMA_MD_SMALL_ALLOC from working on 64-bit booke
  powerpc was a missing check in pmap_kextract().  Adding DMAP handling into
  pmap_kextract(), we can now use UMA_MD_SMALL_ALLOC.  This should improve
  performance and stability a bit, since DMAP is always mapped in TLB1, so
  this relieves pressure on TLB0.
  
  MFC after:3 weeks

Modified:
  head/sys/powerpc/booke/pmap.c
  head/sys/powerpc/include/vmparam.h

Modified: head/sys/powerpc/booke/pmap.c
==
--- head/sys/powerpc/booke/pmap.c   Thu Aug 15 02:30:44 2019
(r351064)
+++ head/sys/powerpc/booke/pmap.c   Thu Aug 15 03:42:15 2019
(r351065)
@@ -1958,6 +1958,11 @@ mmu_booke_kextract(mmu_t mmu, vm_offset_t va)
vm_paddr_t p = 0;
int i;
 
+#ifdef __powerpc64__
+   if (va >= DMAP_BASE_ADDRESS && va <= DMAP_MAX_ADDRESS)
+   return (DMAP_TO_PHYS(va));
+#endif
+
if (va >= VM_MIN_KERNEL_ADDRESS && va <= VM_MAX_KERNEL_ADDRESS)
p = pte_vatopa(mmu, kernel_pmap, va);


Modified: head/sys/powerpc/include/vmparam.h
==
--- head/sys/powerpc/include/vmparam.h  Thu Aug 15 02:30:44 2019
(r351064)
+++ head/sys/powerpc/include/vmparam.h  Thu Aug 15 03:42:15 2019
(r351065)
@@ -133,6 +133,11 @@
 
 #else /* Book-E */
 
+/* Use the direct map for UMA small allocs on powerpc64. */
+#ifdef __powerpc64__
+#define UMA_MD_SMALL_ALLOC
+#endif
+
 #defineKERNBASE0x04000100  /* start of kernel 
physical */
 #ifndef __powerpc64__
 #defineVM_MIN_KERNEL_ADDRESS   0xc000
___
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: r351064 - in head: sbin/swapon share/man/man5 sys/vm

2019-08-14 Thread Doug Moore
Author: dougm
Date: Thu Aug 15 02:30:44 2019
New Revision: 351064
URL: https://svnweb.freebsd.org/changeset/base/351064

Log:
  swap_pager.c reserves 2 blocks for a bsd label.  Change that 2 to the
  expression howmany(BBSIZE, PAGE_SIZE), where BBSIZE is the size of the
  boot block area.  That can be less than 2 if PAGE_SIZE is big.
  
  swapon(8) has an option to trim (delete) all the blocks of a device at
  startup.  However, if the first of those blocks is a bsd label, then
  trimming those blocks is destructive.  Change swapon to leave the
  first BBSIZE bytes untrimmed.
  
  Update manual pages to reflect changes in how swapon and how it may be
  used, espeically in association with savecore.
  
  Reviewed by: alc
  Approved by: markj (mentor)
  MFC after: 3 days
  Differential Revision: https://reviews.freebsd.org/D21191

Modified:
  head/sbin/swapon/swapon.8
  head/sbin/swapon/swapon.c
  head/share/man/man5/fstab.5
  head/sys/vm/swap_pager.c

Modified: head/sbin/swapon/swapon.8
==
--- head/sbin/swapon/swapon.8   Thu Aug 15 02:14:44 2019(r351063)
+++ head/sbin/swapon/swapon.8   Thu Aug 15 02:30:44 2019(r351064)
@@ -90,7 +90,17 @@ The
 .Fl E
 option causes each of following devices to receive a
 .Dv BIO_DELETE
-command to mark all blocks as unused.
+command.
+This command marks the device's blocks as unused, except those that
+might store a disk label.
+This marking can erase a crash dump.
+To delay
+.Nm swapon
+for a device until after
+.Nm savecore
+has copied the crash dump to another location, use the 
+.Dq late
+option.
 .Pp
 The
 .Nm swapoff

Modified: head/sbin/swapon/swapon.c
==
--- head/sbin/swapon/swapon.c   Thu Aug 15 02:14:44 2019(r351063)
+++ head/sbin/swapon/swapon.c   Thu Aug 15 02:30:44 2019(r351064)
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -761,8 +762,8 @@ swapon_trim(const char *name)
} else
errx(1, "%s has an invalid file type", name);
/* Trim the device. */
-   ioarg[0] = 0;
-   ioarg[1] = sz;
+   ioarg[0] = BBSIZE;
+   ioarg[1] = sz - BBSIZE;
if (ioctl(fd, DIOCGDELETE, ioarg) != 0)
warn("ioctl(DIOCGDELETE)");
 

Modified: head/share/man/man5/fstab.5
==
--- head/share/man/man5/fstab.5 Thu Aug 15 02:14:44 2019(r351063)
+++ head/share/man/man5/fstab.5 Thu Aug 15 02:30:44 2019(r351064)
@@ -246,8 +246,17 @@ For swap devices, the keyword
 .Dq trimonce
 triggers the delivery of a
 .Dv BIO_DELETE
-command to the device to mark
-all blocks as unused.
+command to the device.
+This command marks the device's blocks as unused, except those that
+might store a disk label.
+This marking can erase a crash dump.
+To delay
+.Nm swapon
+for a device until after
+.Nm savecore
+has copied the crash dump to another location, use the 
+.Dq late
+option.
 For vnode-backed swap spaces,
 .Dq file
 is supported in the

Modified: head/sys/vm/swap_pager.c
==
--- head/sys/vm/swap_pager.cThu Aug 15 02:14:44 2019(r351063)
+++ head/sys/vm/swap_pager.cThu Aug 15 02:30:44 2019(r351064)
@@ -79,6 +79,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -2298,10 +2299,11 @@ swaponsomething(struct vnode *vp, void *id, u_long nbl
 
sp->sw_blist = blist_create(nblks, M_WAITOK);
/*
-* Do not free the first two block in order to avoid overwriting
+* Do not free the first blocks in order to avoid overwriting
 * any bsd label at the front of the partition
 */
-   blist_free(sp->sw_blist, 2, nblks - 2);
+   blist_free(sp->sw_blist, howmany(BBSIZE, PAGE_SIZE),
+   nblks - howmany(BBSIZE, PAGE_SIZE));
 
dvbase = 0;
mtx_lock(&sw_dev_mtx);
@@ -2319,7 +2321,7 @@ swaponsomething(struct vnode *vp, void *id, u_long nbl
sp->sw_end = dvbase + nblks;
TAILQ_INSERT_TAIL(&swtailq, sp, sw_list);
nswapdev++;
-   swap_pager_avail += nblks - 2;
+   swap_pager_avail += nblks - howmany(BBSIZE, PAGE_SIZE);
swap_total += nblks;
swapon_check_swzone();
swp_sizecheck();
___
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: r351063 - head/share/man/man7

2019-08-14 Thread Ed Maste
Author: emaste
Date: Thu Aug 15 02:14:44 2019
New Revision: 351063
URL: https://svnweb.freebsd.org/changeset/base/351063

Log:
  arch.7: be explicit about the future for unmigrated GCC 4.2.1 archs
  
  Reported by:  imp
  MFC after:1 week
  MFC with: r351036

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

Modified: head/share/man/man7/arch.7
==
--- head/share/man/man7/arch.7  Thu Aug 15 00:39:53 2019(r351062)
+++ head/share/man/man7/arch.7  Thu Aug 15 02:14:44 2019(r351063)
@@ -336,8 +336,9 @@ This table shows the default tool chain for each archi
 (1) External toolchain provided by ports/packages.
 .Pp
 Note that GCC 4.2.1 is deprecated, and scheduled for removal on 2020-03-31.
-CPU architectures not migrated to either base system Clang or external
-toolchain by then will be desupported.
+Any CPU architectures not migrated by then
+(to either base system Clang or external toolchain)
+may be removed from the tree after that date.
 .Ss Predefined Macros
 The compiler provides a number of predefined macros.
 Some of these provide architecture-specific details and are explained below.
___
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: r351062 - head/sys/dev/random

2019-08-14 Thread Conrad Meyer
Author: cem
Date: Thu Aug 15 00:39:53 2019
New Revision: 351062
URL: https://svnweb.freebsd.org/changeset/base/351062

Log:
  random(4): Remove "EXPERIMENTAL" verbiage from concurrent operation
  
  No functional change.
  
  Add a verbose comment giving an example side-by-side comparison between the
  prior and Concurrent modes of Fortuna, and why one should believe they
  produce the same result.
  
  The intent is to flip this on by default prior to 13.0, so testing is
  encouraged.  To enable, add the following to loader.conf:
  
  kern.random.fortuna.concurrent_read="1"
  
  The intent is also to flip the default blockcipher to the faster Chacha-20
  prior to 13.0, so testing of that mode of operation is also appreciated.
  To enable, add the following to loader.conf:
  
  kern.random.use_chacha20_cipher="1"
  
  Approved by:  secteam(implicit)

Modified:
  head/sys/dev/random/fortuna.c

Modified: head/sys/dev/random/fortuna.c
==
--- head/sys/dev/random/fortuna.c   Thu Aug 15 00:23:03 2019
(r351061)
+++ head/sys/dev/random/fortuna.c   Thu Aug 15 00:39:53 2019
(r351062)
@@ -125,8 +125,8 @@ static struct fortuna_state {
 } fortuna_state;
 
 /*
- * Experimental concurrent reads feature.  For now, disabled by default.  But
- * we may enable it in the future.
+ * This knob enables or disables Concurrent Reads.  The plan is to turn it on
+ * by default sometime before 13.0 branches.
  *
  * The benefit is improved concurrency in Fortuna.  That is reflected in two
  * related aspects:
@@ -141,6 +141,107 @@ static struct fortuna_state {
  *global state mutex, potentially blocking on a reader.  Our adaptive
  *mutexes assume that a lock holder currently on CPU will release the lock
  *quickly, and spin if the owning thread is currently running.
+ *
+ * The concern is that the reduced lock scope might results in a less safe
+ * random(4) design.  However, the reduced-lock scope design is still
+ * fundamentally Fortuna.  This is discussed below.
+ *
+ * Fortuna Read() only needs mutual exclusion between readers to correctly
+ * update the shared read-side state: just C, the 128-bit counter, and K, the
+ * current cipher key.
+ *
+ * In the Fortuna design, the global counter C should provide an independent
+ * range of values per generator (CTR-mode cipher or similar) invocation.
+ *
+ * Under lock, we can save a copy of C on the stack, and increment the global C
+ * by the number of blocks a Read request will require.
+ *
+ * Still under lock, we can save a copy of the key K on the stack, and then
+ * perform the usual key erasure K' <- Keystream(C, K, ...).  This does require
+ * generating 256 bits (32 bytes) of cryptographic keystream output with the
+ * global lock held, but that's all; none of the user keystream generation must
+ * be performed under lock.
+ *
+ * At this point, we may unlock.
+ *
+ * Some example timelines below (to oversimplify, all requests are in units of
+ * native blocks, and the keysize happens to be equal or less to the native
+ * blocksize of the underlying cipher, and the same sequence of two requests
+ * arrive in the same order).  The possibly expensive consumer keystream
+ * generation portion is marked with '**'.
+ *
+ * Status Quo fortuna_read()   Reduced-scope locking
+ * -   -
+ * C=C_0, K=K_0C=C_0, K=K_0
+ *
+ * 1:Lock()1:Lock()
+ *
+ * 1:GenBytes()1:stack_C := C_0
+ * 1:  Keystream(C_0, K_0, N)  1:stack_K := K_0
+ * 1:**1:C' := C_0 + N
+ * 1:C' := C_0 + N 1:K' := Keystream(C', K_0, 1)
+ * 1:<- Keystream  1:  <1 block generated>
+ * 1:  K' := Keystream(C', K_0, 1) 1:  C'' := C' + 1
+ * 1:<1 block generated>   1:  <- Keystream
+ * 1:C'' := C' + 1 1:Unlock()
+ * 1:<- Keystream
+ * 1:  <- GenBytes()
+ * 1:Unlock()
+ *
+ * Just prior to unlock, shared state is identical:
+ * 
+ * C'' == C_0 + N + 1  C'' == C_0 + N + 1
+ * K' == keystream generated from  K' == keystream generated from
+ *   C_0 + N, K_0.   C_0 + N, K_0.
+ * K_0 has been erased.K_0 has been erased.
+ *
+ * After both designs unlock, the 2nd reader is unblocked.
+ *
+ * 2:Lock()2:Lock()
+ * 2:GenBytes()2:stack_C' := C''
+ * 2:  Keystream(C'', K', M)   2:stack_K' := K'
+ * 2:**2:C''' := C'' + M
+ * 2:C''' := C'' + M   2:K'' := Keystream(C''', K', 1)
+ * 2:<- Keystream  2:  <1 block generated>
+ * 2:  K'' := Keystream(C''', K', 1)   2:  C := C''' + 1
+ * 2:<1 block generated>   2:  <- Keystream
+ * 2:C := 

svn commit: r351061 - head/tests/sys/fs/fusefs

2019-08-14 Thread Alan Somers
Author: asomers
Date: Thu Aug 15 00:23:03 2019
New Revision: 351061
URL: https://svnweb.freebsd.org/changeset/base/351061

Log:
  fusefs: fix the 32-bit build after 351042
  
  Reported by:  jhb
  MFC after:2 weeks
  MFC-With: 351042
  Sponsored by: The FreeBSD Foundation

Modified:
  head/tests/sys/fs/fusefs/mockfs.cc

Modified: head/tests/sys/fs/fusefs/mockfs.cc
==
--- head/tests/sys/fs/fusefs/mockfs.cc  Wed Aug 14 23:31:53 2019
(r351060)
+++ head/tests/sys/fs/fusefs/mockfs.cc  Thu Aug 15 00:23:03 2019
(r351061)
@@ -842,7 +842,8 @@ void MockFS::read_request(mockfs_buf_in &in) {
 * request,including header, even though fuse_out_header.len excludes
 * the size of the header.
 */
-   ASSERT_TRUE(res == in.header.len || m_quit);
+   ASSERT_TRUE(res == static_cast(sizeof(in.header.len)) ||
+   m_quit);
 }
 
 void MockFS::write_response(const mockfs_buf_out &out) {
___
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: r351056 - head/sys/dev/ntb/ntb_hw

2019-08-14 Thread Alexander Motin
Author: mav
Date: Wed Aug 14 22:35:11 2019
New Revision: 351056
URL: https://svnweb.freebsd.org/changeset/base/351056

Log:
  Add support for PCI Device ID 0x148B in ntb_hw_amd driver.
  
  Submitted by: Rajesh Kumar 
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D20892

Modified:
  head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c
  head/sys/dev/ntb/ntb_hw/ntb_hw_amd.h

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw_amd.cWed Aug 14 22:33:46 2019
(r351055)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw_amd.cWed Aug 14 22:35:11 2019
(r351056)
@@ -80,8 +80,35 @@ __FBSDID("$FreeBSD$");
 
 MALLOC_DEFINE(M_AMD_NTB, "amd_ntb_hw", "amd_ntb_hw driver memory allocations");
 
-struct pci_device_table amd_ntb_devs[] = {
-   { PCI_DEV(NTB_HW_AMD_VENDOR_ID, NTB_HW_AMD_DEVICE_ID),
+static const struct amd_ntb_hw_info amd_ntb_hw_info_list[] = {
+
+   { .vendor_id = NTB_HW_AMD_VENDOR_ID,
+ .device_id = NTB_HW_AMD_DEVICE_ID1,
+ .mw_count = 3,
+ .bar_start_idx = 1,
+ .spad_count = 16,
+ .db_count = 16,
+ .msix_vector_count = 24,
+ .quirks = QUIRK_MW0_32BIT,
+ .desc = "AMD Non-Transparent Bridge"},
+
+   { .vendor_id = NTB_HW_AMD_VENDOR_ID,
+ .device_id = NTB_HW_AMD_DEVICE_ID2,
+ .mw_count = 2,
+ .bar_start_idx = 2,
+ .spad_count = 16,
+ .db_count = 16,
+ .msix_vector_count = 24,
+ .quirks = 0,
+ .desc = "AMD Non-Transparent Bridge"},
+};
+
+static const struct pci_device_table amd_ntb_devs[] = {
+   { PCI_DEV(NTB_HW_AMD_VENDOR_ID, NTB_HW_AMD_DEVICE_ID1),
+ .driver_data = (uintptr_t)&amd_ntb_hw_info_list[0],
+ PCI_DESCR("AMD Non-Transparent Bridge") },
+   { PCI_DEV(NTB_HW_AMD_VENDOR_ID, NTB_HW_AMD_DEVICE_ID2),
+ .driver_data = (uintptr_t)&amd_ntb_hw_info_list[1],
  PCI_DESCR("AMD Non-Transparent Bridge") }
 };
 
@@ -299,7 +326,7 @@ amd_ntb_mw_count(device_t dev)
 {
struct amd_ntb_softc *ntb = device_get_softc(dev);
 
-   return (ntb->mw_count);
+   return (ntb->hw_info->mw_count);
 }
 
 static int
@@ -310,10 +337,10 @@ amd_ntb_mw_get_range(device_t dev, unsigned mw_idx, vm
struct amd_ntb_softc *ntb = device_get_softc(dev);
struct amd_ntb_pci_bar_info *bar_info;
 
-   if (mw_idx < 0 || mw_idx >= ntb->mw_count)
+   if (mw_idx < 0 || mw_idx >= ntb->hw_info->mw_count)
return (EINVAL);
 
-   bar_info = &ntb->bar_info[mw_idx+1];
+   bar_info = &ntb->bar_info[ntb->hw_info->bar_start_idx + mw_idx];
 
if (base != NULL)
*base = bar_info->pbase;
@@ -331,10 +358,15 @@ amd_ntb_mw_get_range(device_t dev, unsigned mw_idx, vm
*align_size = 1;
 
if (plimit != NULL) {
-   if (mw_idx != 0)
-   *plimit = BUS_SPACE_MAXADDR;
-   else
+   /*
+* For Device ID 0x145B (which has 3 memory windows),
+* memory window 0 use a 32-bit bar. The remaining
+* cases all use 64-bit bar.
+*/
+   if ((mw_idx == 0) && (ntb->hw_info->quirks & QUIRK_MW0_32BIT))
*plimit = BUS_SPACE_MAXADDR_32BIT;
+   else
+   *plimit = BUS_SPACE_MAXADDR;
}
 
return (0);
@@ -346,12 +378,12 @@ amd_ntb_mw_set_trans(device_t dev, unsigned mw_idx, bu
struct amd_ntb_softc *ntb = device_get_softc(dev);
struct amd_ntb_pci_bar_info *bar_info;
 
-   if (mw_idx < 0 || mw_idx >= ntb->mw_count)
+   if (mw_idx < 0 || mw_idx >= ntb->hw_info->mw_count)
return (EINVAL);
 
-   bar_info = &ntb->bar_info[mw_idx+1];
+   bar_info = &ntb->bar_info[ntb->hw_info->bar_start_idx + mw_idx];
 
-   /* make sure the range fits in the usable mw size */
+   /* Make sure the range fits in the usable mw size. */
if (size > bar_info->size) {
amd_ntb_printf(0, "%s: size 0x%x greater than mw_size 0x%x\n",
__func__, (uint32_t)size, (uint32_t)bar_info->size);
@@ -364,26 +396,34 @@ amd_ntb_mw_set_trans(device_t dev, unsigned mw_idx, bu
 
/*
 * AMD NTB XLAT and Limit registers needs to be written only after
-* link enable
+* link enable.
 *
-* set and verify setting the translation address
+* Set and verify setting the translation address register.
 */
amd_ntb_peer_reg_write(8, bar_info->xlat_off, (uint64_t)addr);
amd_ntb_printf(0, "%s: mw %d xlat_off 0x%x cur_val 0x%jx addr %p\n",
__func__, mw_idx, bar_info->xlat_off,
amd_ntb_peer_reg_read(8, bar_info->xlat_off), (void *)addr);
 
-   /* set and verify setting the limit */
-   if (mw_idx != 0) {
-   amd_ntb_reg_

svn commit: r351055 - head/share/mk

2019-08-14 Thread Simon J. Gerraty
Author: sjg
Date: Wed Aug 14 22:33:46 2019
New Revision: 351055
URL: https://svnweb.freebsd.org/changeset/base/351055

Log:
  bsd.files.mk: fix targets to avoid directories
  
  Reintroduce :T when file is used as part of a target name.
  
  Reviewed by:  stevek

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

Modified: head/share/mk/bsd.files.mk
==
--- head/share/mk/bsd.files.mk  Wed Aug 14 22:13:11 2019(r351054)
+++ head/share/mk/bsd.files.mk  Wed Aug 14 22:33:46 2019(r351055)
@@ -101,11 +101,11 @@ STAGE_AS_SETS+=   ${file}
 STAGE_AS_${file}= ${${group}NAME_${file}}
 # XXX {group}OWN,GRP,MODE
 STAGE_DIR.${file}= ${STAGE_OBJTOP}${${_${group}DIR_${file}}}
-stage_as.${file}: ${file}
+stage_as.${file:T}: ${file}
 
 installfiles-${group}: _${group}INS1_${file}
-_${group}INS1_${file}: installdirs-${_${group}DIR_${file}} _${group}INS_${file}
-_${group}INS_${file}: ${file}
+_${group}INS1_${file:T}: installdirs-${_${group}DIR_${file}} 
_${group}INS_${file}
+_${group}INS_${file:T}: ${file}
${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN_${file}} \
-g ${${group}GRP_${file}} -m ${${group}MODE_${file}} \
${.ALLSRC} ${${group}PREFIX_${file}}/${${group}NAME_${file}}
___
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: r351054 - head/sys/x86/x86

2019-08-14 Thread John Baldwin
Author: jhb
Date: Wed Aug 14 22:13:11 2019
New Revision: 351054
URL: https://svnweb.freebsd.org/changeset/base/351054

Log:
  Stop listing "on motherboard" as the parent of nexus devices on x86.
  
  Reviewed by:  imp
  Differential Revision:https://reviews.freebsd.org/D21256

Modified:
  head/sys/x86/x86/io_apic.c
  head/sys/x86/x86/legacy.c
  head/sys/x86/x86/nexus.c

Modified: head/sys/x86/x86/io_apic.c
==
--- head/sys/x86/x86/io_apic.c  Wed Aug 14 20:58:50 2019(r351053)
+++ head/sys/x86/x86/io_apic.c  Wed Aug 14 22:13:11 2019(r351054)
@@ -924,7 +924,7 @@ ioapic_register(void *cookie)
flags = ioapic_read(apic, IOAPIC_VER) & IOART_VER_VERSION;
STAILQ_INSERT_TAIL(&ioapic_list, io, io_next);
mtx_unlock_spin(&icu_lock);
-   printf("ioapic%u  irqs %u-%u on motherboard\n",
+   printf("ioapic%u  irqs %u-%u\n",
io->io_id, flags >> 4, flags & 0xf, io->io_intbase,
io->io_intbase + io->io_numintr - 1);
 

Modified: head/sys/x86/x86/legacy.c
==
--- head/sys/x86/x86/legacy.c   Wed Aug 14 20:58:50 2019(r351053)
+++ head/sys/x86/x86/legacy.c   Wed Aug 14 22:13:11 2019(r351054)
@@ -169,8 +169,7 @@ legacy_attach(device_t dev)
bus_generic_attach(dev);
 
/*
-* If we didn't see ISA on a pci bridge, create some
-* connection points now so they show up "on motherboard".
+* If we didn't see ISA on a PCI bridge, add a top-level bus.
 */
if (!devclass_get_device(devclass_find("isa"), 0)) {
child = BUS_ADD_CHILD(dev, 0, "isa", 0);
@@ -191,7 +190,7 @@ legacy_print_child(device_t bus, device_t child)
retval += bus_print_child_header(bus, child);
if (atdev->lg_pcibus != -1)
retval += printf(" pcibus %d", atdev->lg_pcibus);
-   retval += printf(" on motherboard\n");  /* XXX "motherboard", ick */
+   retval += printf("\n");
 
return (retval);
 }

Modified: head/sys/x86/x86/nexus.c
==
--- head/sys/x86/x86/nexus.cWed Aug 14 20:58:50 2019(r351053)
+++ head/sys/x86/x86/nexus.cWed Aug 14 22:13:11 2019(r351054)
@@ -322,7 +322,7 @@ nexus_print_child(device_t bus, device_t child)
retval += nexus_print_all_resources(child);
if (device_get_flags(child))
retval += printf(" flags %#x", device_get_flags(child));
-   retval += printf(" on motherboard\n");  /* XXX "motherboard", ick */
+   retval += printf("\n");
 
return (retval);
 }
___
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: r351009 - head/sys/compat/linuxkpi/common/include/linux

2019-08-14 Thread Cy Schubert
On August 14, 2019 2:15:22 PM PDT, Niclas Zeising  wrote:
>On 2019-08-14 21:24, Cy Schubert wrote:
>> On August 14, 2019 12:06:24 PM PDT, Hans Petter Selasky
> wrote:
>>> On 2019-08-14 21:00, Cy Schubert wrote:
 John's patch to drm-current-kmod (ports r508877) works! This broke
 drm-current-kmod.
>>>
>>> You need to update the port. This patch should have been tested too.
>>>
>>> Did you try that first?
>>>
>>> --HPS
>> 
>> The port is up to date. Sorry for not attaching output. I was in a
>rush to get back to $JOB. I'll rerun it tonight.
>> 
>> 
>
>Ports should be updated with a fix now, sorry about that.
>Regards

NP. I just noticed the commit email. I'll give it a spin when I get home.

Thanks for all your work maintaining drm for us.


-- 
Pardon the typos and autocorrect, small keyboard in use.
Cheers,
Cy Schubert 
FreeBSD UNIX:  Web: http://www.FreeBSD.org

The need of the many outweighs the greed of the few.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r351009 - head/sys/compat/linuxkpi/common/include/linux

2019-08-14 Thread Cy Schubert
On August 14, 2019 12:24:19 PM PDT, Cy Schubert  
wrote:
>On August 14, 2019 12:06:24 PM PDT, Hans Petter Selasky
> wrote:
>>On 2019-08-14 21:00, Cy Schubert wrote:
>>> John's patch to drm-current-kmod (ports r508877) works! This broke
>>> drm-current-kmod.
>>
>>You need to update the port. This patch should have been tested too.
>>
>>Did you try that first?
>>
>>--HPS
>
>The port is up to date. Sorry for not attaching output. I was in a rush
>to get back to $JOB. I'll rerun it tonight.

I see a ports commit that looks like it will fix this. I'll give it a spin when 
I get home tonight. 


-- 
Pardon the typos and autocorrect, small keyboard in use.
Cheers,
Cy Schubert 
FreeBSD UNIX:  Web: http://www.FreeBSD.org

The need of the many outweighs the greed of the few.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r351009 - head/sys/compat/linuxkpi/common/include/linux

2019-08-14 Thread Niclas Zeising

On 2019-08-14 21:24, Cy Schubert wrote:

On August 14, 2019 12:06:24 PM PDT, Hans Petter Selasky  
wrote:

On 2019-08-14 21:00, Cy Schubert wrote:

John's patch to drm-current-kmod (ports r508877) works! This broke
drm-current-kmod.


You need to update the port. This patch should have been tested too.

Did you try that first?

--HPS


The port is up to date. Sorry for not attaching output. I was in a rush to get 
back to $JOB. I'll rerun it tonight.




Ports should be updated with a fix now, sorry about that.
Regards
--
Niclas Zeising
___
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: r351051 - head/sys/conf

2019-08-14 Thread Warner Losh
Author: imp
Date: Wed Aug 14 20:58:39 2019
New Revision: 351051
URL: https://svnweb.freebsd.org/changeset/base/351051

Log:
  Windows ndis support is x86 only. Move the MI parts there.
  
  Reviewed by: jhb (verbal OK on irc)
  Differential Revision: https://reviews.freebsd.org/D21248

Modified:
  head/sys/conf/files.amd64
  head/sys/conf/files.i386
  head/sys/conf/files.x86

Modified: head/sys/conf/files.amd64
==
--- head/sys/conf/files.amd64   Wed Aug 14 20:58:34 2019(r351050)
+++ head/sys/conf/files.amd64   Wed Aug 14 20:58:39 2019(r351051)
@@ -444,16 +444,6 @@ compat/linux/linux_event.c optionalcompat_linux32
 compat/linux/linux.c   optionalcompat_linux32
 dev/amr/amr_linux.coptionalcompat_linux32 amr
 dev/mfi/mfi_linux.coptionalcompat_linux32 mfi
-#
-# Windows NDIS driver support
-#
-compat/ndis/kern_ndis.coptionalndisapi pci
-compat/ndis/kern_windrv.c  optionalndisapi pci
-compat/ndis/subr_hal.c optionalndisapi pci
-compat/ndis/subr_ndis.coptionalndisapi pci
-compat/ndis/subr_ntoskrnl.coptionalndisapi pci
-compat/ndis/subr_pe.c  optionalndisapi pci
-compat/ndis/subr_usbd.coptionalndisapi pci
 compat/ndis/winx64_wrap.S  optionalndisapi pci
 #
 # x86 real mode BIOS emulator, required by dpms/pci/vesa

Modified: head/sys/conf/files.i386
==
--- head/sys/conf/files.i386Wed Aug 14 20:58:34 2019(r351050)
+++ head/sys/conf/files.i386Wed Aug 14 20:58:39 2019(r351051)
@@ -84,13 +84,6 @@ compat/linux/linux_uid16.c   optional compat_linux
 compat/linux/linux_util.c  optional compat_linux
 compat/linux/linux_vdso.c  optional compat_linux
 compat/linux/linux.c   optional compat_linux
-compat/ndis/kern_ndis.coptional ndisapi pci
-compat/ndis/kern_windrv.c  optional ndisapi pci
-compat/ndis/subr_hal.c optional ndisapi pci
-compat/ndis/subr_ndis.coptional ndisapi pci
-compat/ndis/subr_ntoskrnl.coptional ndisapi pci
-compat/ndis/subr_pe.c  optional ndisapi pci
-compat/ndis/subr_usbd.coptional ndisapi pci
 compat/ndis/winx32_wrap.S  optional ndisapi pci
 bf_enc.o   optional crypto | ipsec | ipsec_support \
dependency  "$S/crypto/blowfish/arch/i386/bf_enc.S 
$S/crypto/blowfish/arch/i386/bf_enc_586.S 
$S/crypto/blowfish/arch/i386/bf_enc_686.S" \

Modified: head/sys/conf/files.x86
==
--- head/sys/conf/files.x86 Wed Aug 14 20:58:34 2019(r351050)
+++ head/sys/conf/files.x86 Wed Aug 14 20:58:39 2019(r351051)
@@ -20,6 +20,13 @@ cddl/dev/dtrace/x86/instr_size.c 
optional dtrace_fbt
 cddl/dev/fbt/x86/fbt_isa.c optional dtrace_fbt | 
dtraceall compile-with "${FBT_C}"
 cddl/dev/dtrace/x86/dis_tables.c   optional dtrace_fbt | 
dtraceall compile-with "${DTRACE_C}"
 cddl/dev/dtrace/x86/instr_size.c   optional dtrace_fbt | 
dtraceall compile-with "${DTRACE_C}"
+compat/ndis/kern_ndis.coptional ndisapi pci
+compat/ndis/kern_windrv.c  optional ndisapi pci
+compat/ndis/subr_hal.c optional ndisapi pci
+compat/ndis/subr_ndis.coptional ndisapi pci
+compat/ndis/subr_ntoskrnl.coptional ndisapi pci
+compat/ndis/subr_pe.c  optional ndisapi pci
+compat/ndis/subr_usbd.coptional ndisapi pci
 crypto/aesni/aesni.c   optional aesni
 aesni_ghash.o  optional aesni  \
dependency  "$S/crypto/aesni/aesni_ghash.c" \
___
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: r351049 - head/sys/conf

2019-08-14 Thread Warner Losh
Author: imp
Date: Wed Aug 14 20:58:28 2019
New Revision: 351049
URL: https://svnweb.freebsd.org/changeset/base/351049

Log:
  Move hyperv to files.x86
  
  Move the comomon part of hyperv to files.x86.
  
  Reviewed by: jhb (verbal OK on irc)
  Differential Revision: https://reviews.freebsd.org/D21248

Modified:
  head/sys/conf/files.amd64
  head/sys/conf/files.i386
  head/sys/conf/files.x86

Modified: head/sys/conf/files.amd64
==
--- head/sys/conf/files.amd64   Wed Aug 14 20:58:23 2019(r351048)
+++ head/sys/conf/files.amd64   Wed Aug 14 20:58:28 2019(r351049)
@@ -230,28 +230,6 @@ dev/hwpmc/hwpmc_core.c optionalhwpmc
 dev/hwpmc/hwpmc_uncore.c   optionalhwpmc
 dev/hwpmc/hwpmc_tsc.c  optionalhwpmc
 dev/hwpmc/hwpmc_x86.c  optionalhwpmc
-dev/hyperv/input/hv_kbd.c  optionalhyperv
-dev/hyperv/input/hv_kbdc.c optionalhyperv
-dev/hyperv/pcib/vmbus_pcib.c   optionalhyperv 
pci
-dev/hyperv/netvsc/hn_nvs.c optionalhyperv
-dev/hyperv/netvsc/hn_rndis.c   optionalhyperv
-dev/hyperv/netvsc/if_hn.c  optionalhyperv
-dev/hyperv/storvsc/hv_storvsc_drv_freebsd.coptionalhyperv
-dev/hyperv/utilities/hv_kvp.c  optionalhyperv
-dev/hyperv/utilities/hv_snapshot.c optionalhyperv
-dev/hyperv/utilities/vmbus_heartbeat.c optionalhyperv
-dev/hyperv/utilities/vmbus_ic.coptional
hyperv
-dev/hyperv/utilities/vmbus_shutdown.c  optionalhyperv
-dev/hyperv/utilities/vmbus_timesync.c  optionalhyperv
-dev/hyperv/vmbus/hyperv.c  optionalhyperv
-dev/hyperv/vmbus/hyperv_busdma.c   optionalhyperv
-dev/hyperv/vmbus/vmbus.c   optionalhyperv 
pci
-dev/hyperv/vmbus/vmbus_br.coptionalhyperv
-dev/hyperv/vmbus/vmbus_chan.c  optionalhyperv
-dev/hyperv/vmbus/vmbus_et.coptionalhyperv
-dev/hyperv/vmbus/vmbus_if.moptionalhyperv
-dev/hyperv/vmbus/vmbus_res.c   optionalhyperv
-dev/hyperv/vmbus/vmbus_xact.c  optionalhyperv
 dev/hyperv/vmbus/amd64/hyperv_machdep.coptional
hyperv
 dev/hyperv/vmbus/amd64/vmbus_vector.S  optionalhyperv
 dev/nctgpio/nctgpio.c  optionalnctgpio

Modified: head/sys/conf/files.i386
==
--- head/sys/conf/files.i386Wed Aug 14 20:58:23 2019(r351048)
+++ head/sys/conf/files.i386Wed Aug 14 20:58:28 2019(r351049)
@@ -148,26 +148,6 @@ dev/hwpmc/hwpmc_core.c optional hwpmc
 dev/hwpmc/hwpmc_uncore.c   optional hwpmc
 dev/hwpmc/hwpmc_tsc.c  optional hwpmc
 dev/hwpmc/hwpmc_x86.c  optional hwpmc
-dev/hyperv/pcib/vmbus_pcib.c   optionalhyperv 
pci
-dev/hyperv/netvsc/hn_nvs.c optionalhyperv
-dev/hyperv/netvsc/hn_rndis.c   optionalhyperv
-dev/hyperv/netvsc/if_hn.c  optionalhyperv
-dev/hyperv/storvsc/hv_storvsc_drv_freebsd.coptionalhyperv
-dev/hyperv/utilities/hv_kvp.c  optionalhyperv
-dev/hyperv/utilities/hv_snapshot.c optionalhyperv
-dev/hyperv/utilities/vmbus_heartbeat.c optionalhyperv
-dev/hyperv/utilities/vmbus_ic.coptional
hyperv
-dev/hyperv/utilities/vmbus_shutdown.c  optionalhyperv
-dev/hyperv/utilities/vmbus_timesync.c  optionalhyperv
-dev/hyperv/vmbus/hyperv.c  optionalhyperv
-dev/hyperv/vmbus/hyperv_busdma.c   optionalhyperv
-dev/hyperv/vmbus/vmbus.c   optionalhyperv 
pci
-dev/hyperv/vmbus/vmbus_br.coptionalhyperv
-dev/hyperv/vmbus/vmbus_chan.c  optionalhyperv
-dev/hyperv/vmbus/vmbus_et.coptionalhyperv
-dev/hyperv/vmbus/vmbus_if.moptionalhyperv
-dev/hyperv/vmbus/vmbus_res.c   optionalhyperv
-dev/hyperv/vmbus/vmbus_xact.c  optionalhyperv
 dev/hyperv/vmbus/i386/hyperv_machdep.c   

svn commit: r351048 - head/sys/conf

2019-08-14 Thread Warner Losh
Author: imp
Date: Wed Aug 14 20:58:23 2019
New Revision: 351048
URL: https://svnweb.freebsd.org/changeset/base/351048

Log:
  The bxe driver, QLogic NetXtreme II Ethernet 10Gb PCIe adapter driver, is x86
  specific, and only builds there. Likewise the module is built there. Move it 
to
  the x86-only files.x86.
  
  Reviewed by: jhb (verbal OK on irc)
  Differential Revision: https://reviews.freebsd.org/D21248

Modified:
  head/sys/conf/files.amd64
  head/sys/conf/files.i386
  head/sys/conf/files.x86

Modified: head/sys/conf/files.amd64
==
--- head/sys/conf/files.amd64   Wed Aug 14 20:58:17 2019(r351047)
+++ head/sys/conf/files.amd64   Wed Aug 14 20:58:23 2019(r351048)
@@ -164,14 +164,6 @@ dev/atkbdc/atkbdc.coptionalatkbdc
 dev/atkbdc/atkbdc_isa.coptionalatkbdc isa
 dev/atkbdc/atkbdc_subr.c   optionalatkbdc
 dev/atkbdc/psm.c   optionalpsm atkbdc
-dev/bxe/bxe.c   optional   bxe pci
-dev/bxe/bxe_stats.c optional   bxe pci
-dev/bxe/bxe_debug.c optional   bxe pci
-dev/bxe/ecore_sp.c  optional   bxe pci
-dev/bxe/bxe_elink.c optional   bxe pci
-dev/bxe/57710_init_values.c optional   bxe pci
-dev/bxe/57711_init_values.c optional   bxe pci
-dev/bxe/57712_init_values.c optional   bxe pci
 dev/coretemp/coretemp.coptionalcoretemp
 dev/cpuctl/cpuctl.coptionalcpuctl
 dev/dpms/dpms.coptionaldpms

Modified: head/sys/conf/files.i386
==
--- head/sys/conf/files.i386Wed Aug 14 20:58:17 2019(r351047)
+++ head/sys/conf/files.i386Wed Aug 14 20:58:23 2019(r351048)
@@ -118,14 +118,6 @@ dev/atkbdc/atkbdc.coptional atkbdc
 dev/atkbdc/atkbdc_isa.coptional atkbdc isa
 dev/atkbdc/atkbdc_subr.c   optional atkbdc
 dev/atkbdc/psm.c   optional psm atkbdc
-dev/bxe/bxe.c   optional bxe pci
-dev/bxe/bxe_stats.c optional bxe pci
-dev/bxe/bxe_debug.c optional bxe pci
-dev/bxe/ecore_sp.c  optional bxe pci
-dev/bxe/bxe_elink.c optional bxe pci
-dev/bxe/57710_init_values.c optional bxe pci
-dev/bxe/57711_init_values.c optional bxe pci
-dev/bxe/57712_init_values.c optional bxe pci
 dev/ce/ceddk.c optional ce
 dev/ce/if_ce.c optional ce
 dev/ce/tau32-ddk.c optional ce \

Modified: head/sys/conf/files.x86
==
--- head/sys/conf/files.x86 Wed Aug 14 20:58:17 2019(r351047)
+++ head/sys/conf/files.x86 Wed Aug 14 20:58:23 2019(r351048)
@@ -58,6 +58,14 @@ dev/acpica/acpi_pcib_acpi.c  optionalacpi pci
 dev/acpica/acpi_pcib_pci.c optionalacpi pci
 dev/acpica/acpi_pxm.c  optionalacpi
 dev/acpica/acpi_timer.coptionalacpi
+dev/bxe/bxe.c   optional   bxe pci
+dev/bxe/bxe_stats.c optional   bxe pci
+dev/bxe/bxe_debug.c optional   bxe pci
+dev/bxe/ecore_sp.c  optional   bxe pci
+dev/bxe/bxe_elink.c optional   bxe pci
+dev/bxe/57710_init_values.c optional   bxe pci
+dev/bxe/57711_init_values.c optional   bxe pci
+dev/bxe/57712_init_values.c optional   bxe pci
 dev/fdc/fdc.c  optionalfdc
 dev/fdc/fdc_acpi.c optionalfdc
 dev/fdc/fdc_isa.c  optionalfdc isa
___
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: r351052 - head/sys/conf

2019-08-14 Thread Warner Losh
Author: imp
Date: Wed Aug 14 20:58:44 2019
New Revision: 351052
URL: https://svnweb.freebsd.org/changeset/base/351052

Log:
  The x86 part of hwpmc is shared, so move it to files.x86.
  
  Reviewed by: jhb (verbal OK on irc)
  Differential Revision: https://reviews.freebsd.org/D21248

Modified:
  head/sys/conf/files.amd64
  head/sys/conf/files.i386
  head/sys/conf/files.x86

Modified: head/sys/conf/files.amd64
==
--- head/sys/conf/files.amd64   Wed Aug 14 20:58:39 2019(r351051)
+++ head/sys/conf/files.amd64   Wed Aug 14 20:58:44 2019(r351052)
@@ -224,12 +224,6 @@ dev/ixl/i40e_dcb.c optionalixl pci \
compile-with "${NORMAL_C} -I$S/dev/ixl"
 dev/gpio/bytgpio.c optionalbytgpio
 dev/gpio/chvgpio.c optionalchvgpio
-dev/hwpmc/hwpmc_amd.c  optionalhwpmc
-dev/hwpmc/hwpmc_intel.coptionalhwpmc
-dev/hwpmc/hwpmc_core.c optionalhwpmc
-dev/hwpmc/hwpmc_uncore.c   optionalhwpmc
-dev/hwpmc/hwpmc_tsc.c  optionalhwpmc
-dev/hwpmc/hwpmc_x86.c  optionalhwpmc
 dev/hyperv/vmbus/amd64/hyperv_machdep.coptional
hyperv
 dev/hyperv/vmbus/amd64/vmbus_vector.S  optionalhyperv
 dev/nctgpio/nctgpio.c  optionalnctgpio

Modified: head/sys/conf/files.i386
==
--- head/sys/conf/files.i386Wed Aug 14 20:58:39 2019(r351051)
+++ head/sys/conf/files.i386Wed Aug 14 20:58:44 2019(r351052)
@@ -135,12 +135,6 @@ dev/glxsb/glxsb.c  optional glxsb
 dev/glxsb/glxsb_hash.c optional glxsb
 dev/gpio/bytgpio.c optionalbytgpio
 dev/gpio/chvgpio.c optionalchvgpio
-dev/hwpmc/hwpmc_amd.c  optional hwpmc
-dev/hwpmc/hwpmc_intel.coptional hwpmc
-dev/hwpmc/hwpmc_core.c optional hwpmc
-dev/hwpmc/hwpmc_uncore.c   optional hwpmc
-dev/hwpmc/hwpmc_tsc.c  optional hwpmc
-dev/hwpmc/hwpmc_x86.c  optional hwpmc
 dev/hyperv/vmbus/i386/hyperv_machdep.c optionalhyperv
 dev/hyperv/vmbus/i386/vmbus_vector.S   optionalhyperv
 dev/ichwd/ichwd.c  optional ichwd

Modified: head/sys/conf/files.x86
==
--- head/sys/conf/files.x86 Wed Aug 14 20:58:39 2019(r351051)
+++ head/sys/conf/files.x86 Wed Aug 14 20:58:44 2019(r351052)
@@ -107,6 +107,12 @@ hptrr_lib.ooptionalhptrr   
\
dependency  "$S/dev/hptrr/$M-elf.hptrr_lib.o.uu"\
compile-with"uudecode < $S/dev/hptrr/$M-elf.hptrr_lib.o.uu" \
no-implicit-rule
+dev/hwpmc/hwpmc_amd.c  optionalhwpmc
+dev/hwpmc/hwpmc_intel.coptionalhwpmc
+dev/hwpmc/hwpmc_core.c optionalhwpmc
+dev/hwpmc/hwpmc_uncore.c   optionalhwpmc
+dev/hwpmc/hwpmc_tsc.c  optionalhwpmc
+dev/hwpmc/hwpmc_x86.c  optionalhwpmc
 dev/hyperv/pcib/vmbus_pcib.c   optionalhyperv 
pci
 dev/hyperv/netvsc/hn_nvs.c optionalhyperv
 dev/hyperv/netvsc/hn_rndis.c   optionalhyperv
___
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: r351050 - head/sys/conf

2019-08-14 Thread Warner Losh
Author: imp
Date: Wed Aug 14 20:58:34 2019
New Revision: 351050
URL: https://svnweb.freebsd.org/changeset/base/351050

Log:
  Intel's isci is part of the chipset, so it is x86 specific.
  
  Reviewed by: jhb (verbal OK on irc)
  Differential Revision: https://reviews.freebsd.org/D21248

Modified:
  head/sys/conf/files.amd64
  head/sys/conf/files.i386
  head/sys/conf/files.x86

Modified: head/sys/conf/files.amd64
==
--- head/sys/conf/files.amd64   Wed Aug 14 20:58:28 2019(r351049)
+++ head/sys/conf/files.amd64   Wed Aug 14 20:58:34 2019(r351050)
@@ -393,115 +393,6 @@ dev/vmware/vmci/vmci_resource.c   optional
vmci
 dev/wbwd/wbwd.coptionalwbwd
 dev/xen/pci/xen_acpi_pci.c optionalxenhvm
 dev/xen/pci/xen_pci.c  optionalxenhvm
-dev/isci/isci.c
optional isci
-dev/isci/isci_controller.c optional isci
-dev/isci/isci_domain.c optional isci
-dev/isci/isci_interrupt.c  optional isci
-dev/isci/isci_io_request.c optional isci
-dev/isci/isci_logger.c optional isci
-dev/isci/isci_oem_parameters.c optional isci
-dev/isci/isci_remote_device.c  optional isci
-dev/isci/isci_sysctl.c optional isci
-dev/isci/isci_task_request.c   optional isci
-dev/isci/isci_timer.c  optional isci
-dev/isci/scil/sati.c   optional isci
-dev/isci/scil/sati_abort_task_set.coptional isci
-dev/isci/scil/sati_atapi.c optional isci
-dev/isci/scil/sati_device.coptional isci
-dev/isci/scil/sati_inquiry.c   optional isci
-dev/isci/scil/sati_log_sense.c optional isci
-dev/isci/scil/sati_lun_reset.c optional isci
-dev/isci/scil/sati_mode_pages.c
optional isci
-dev/isci/scil/sati_mode_select.c   optional isci
-dev/isci/scil/sati_mode_sense.c
optional isci
-dev/isci/scil/sati_mode_sense_10.c optional isci
-dev/isci/scil/sati_mode_sense_6.c  optional isci
-dev/isci/scil/sati_move.c  optional isci
-dev/isci/scil/sati_passthrough.c   optional isci
-dev/isci/scil/sati_read.c  optional isci
-dev/isci/scil/sati_read_buffer.c   optional isci
-dev/isci/scil/sati_read_capacity.c optional isci
-dev/isci/scil/sati_reassign_blocks.c   optional isci
-dev/isci/scil/sati_report_luns.c   optional isci
-dev/isci/scil/sati_request_sense.c optional isci
-dev/isci/scil/sati_start_stop_unit.c   optional isci
-dev/isci/scil/sati_synchronize_cache.c optional isci
-dev/isci/scil/sati_test_unit_ready.c   optional isci
-dev/isci/scil/sati_unmap.c optional isci
-dev/isci/scil/sati_util.c  optional isci
-dev/isci/scil/sati_verify.coptional isci
-dev/isci/scil/sati_write.c optional isci
-dev/isci/scil/sati_write_and_verify.c  optional isci
-dev/isci/scil/sati_write_buffer.c  optional isci
-dev/isci/scil/sati_write_long.c
optional isci
-dev/isci/scil/sci_abstract_list.c  optional isci
-dev/isci/scil/sci_base_controller.coptional isci
-dev/isci/scil/sci_base_domain.c
optional isci
-dev/isci/scil/sci_base_iterator.c  optional isci
-dev/isci/scil/sci_base_library.c   optional isci
-dev/isci/scil/sci_base_logger.c
optional isci
-dev/isci/scil/sci_base_memory_descriptor_list.c
optional isci
-dev/isci/scil/sci_base_memory_descriptor_list_decorator.c  optional isci
-dev/isci/scil/sci_base_object.c
optional isci
-dev/isci/scil/sci_base_observer.c  optional isci
-dev/isci/scil/sci_base_phy.c

svn commit: r351053 - head/sys/conf

2019-08-14 Thread Warner Losh
Author: imp
Date: Wed Aug 14 20:58:50 2019
New Revision: 351053
URL: https://svnweb.freebsd.org/changeset/base/351053

Log:
  Move the common x86 ipmi files to files.x86. The powerpc file list is 
different
  enough that unification will have to wait for the next pass.
  
  Reviewed by: jhb (verbal OK on irc)
  Differential Revision: https://reviews.freebsd.org/D21248

Modified:
  head/sys/conf/files.amd64
  head/sys/conf/files.i386
  head/sys/conf/files.x86

Modified: head/sys/conf/files.amd64
==
--- head/sys/conf/files.amd64   Wed Aug 14 20:58:44 2019(r351052)
+++ head/sys/conf/files.amd64   Wed Aug 14 20:58:50 2019(r351053)
@@ -182,16 +182,6 @@ dev/intel/spi.coptionalintelspi
 dev/io/iodev.c optionalio
 dev/ioat/ioat.coptionalioat pci
 dev/ioat/ioat_test.c   optionalioat pci
-dev/ipmi/ipmi.coptionalipmi
-dev/ipmi/ipmi_acpi.c   optionalipmi acpi
-dev/ipmi/ipmi_isa.coptionalipmi isa
-dev/ipmi/ipmi_kcs.coptionalipmi
-dev/ipmi/ipmi_smic.c   optionalipmi
-dev/ipmi/ipmi_smbus.c  optionalipmi smbus
-dev/ipmi/ipmi_smbios.c optionalipmi
-dev/ipmi/ipmi_ssif.c   optionalipmi smbus
-dev/ipmi/ipmi_pci.coptionalipmi pci
-dev/ipmi/ipmi_linux.c  optionalipmi compat_linux32
 dev/ixl/if_ixl.c   optionalixl pci \
compile-with "${NORMAL_C} -I$S/dev/ixl"
 dev/ixl/ixl_pf_main.c  optionalixl pci \

Modified: head/sys/conf/files.i386
==
--- head/sys/conf/files.i386Wed Aug 14 20:58:44 2019(r351052)
+++ head/sys/conf/files.i386Wed Aug 14 20:58:50 2019(r351053)
@@ -146,16 +146,6 @@ dev/imcsmb/imcsmb.coptional imcsmb
 dev/imcsmb/imcsmb_pci.coptional imcsmb pci
 dev/intel/spi.coptional intelspi
 dev/io/iodev.c optional io
-dev/ipmi/ipmi.coptional ipmi
-dev/ipmi/ipmi_acpi.c   optional ipmi acpi
-dev/ipmi/ipmi_isa.coptional ipmi isa
-dev/ipmi/ipmi_kcs.coptional ipmi
-dev/ipmi/ipmi_smic.c   optional ipmi
-dev/ipmi/ipmi_smbus.c  optional ipmi smbus
-dev/ipmi/ipmi_smbios.c optional ipmi
-dev/ipmi/ipmi_ssif.c   optional ipmi smbus
-dev/ipmi/ipmi_pci.coptional ipmi pci
-dev/ipmi/ipmi_linux.c  optional ipmi compat_linux
 dev/le/if_le_isa.c optional le isa
 dev/nctgpio/nctgpio.c  optional nctgpio
 dev/nfe/if_nfe.c   optional nfe pci

Modified: head/sys/conf/files.x86
==
--- head/sys/conf/files.x86 Wed Aug 14 20:58:44 2019(r351052)
+++ head/sys/conf/files.x86 Wed Aug 14 20:58:50 2019(r351053)
@@ -133,6 +133,16 @@ dev/hyperv/vmbus/vmbus_et.c
optionalhyperv
 dev/hyperv/vmbus/vmbus_if.moptionalhyperv
 dev/hyperv/vmbus/vmbus_res.c   optionalhyperv
 dev/hyperv/vmbus/vmbus_xact.c  optionalhyperv
+dev/ipmi/ipmi.coptionalipmi
+dev/ipmi/ipmi_acpi.c   optionalipmi acpi
+dev/ipmi/ipmi_isa.coptionalipmi isa
+dev/ipmi/ipmi_kcs.coptionalipmi
+dev/ipmi/ipmi_smic.c   optionalipmi
+dev/ipmi/ipmi_smbus.c  optionalipmi smbus
+dev/ipmi/ipmi_smbios.c optionalipmi
+dev/ipmi/ipmi_ssif.c   optionalipmi smbus
+dev/ipmi/ipmi_pci.coptionalipmi pci
+dev/ipmi/ipmi_linux.c  optionalipmi compat_linux32
 dev/isci/isci.c
optional isci
 dev/isci/isci_controller.c optional isci
 dev/isci/isci_domain.c optional isci
___
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: r351045 - head/sys/conf

2019-08-14 Thread Warner Losh
Author: imp
Date: Wed Aug 14 20:58:06 2019
New Revision: 351045
URL: https://svnweb.freebsd.org/changeset/base/351045

Log:
  Apart from one MD file, aesni is common to x86. Move it into files.x86.
  
  Reviewed by: jhb (verbal OK on irc)
  Differential Revision: https://reviews.freebsd.org/D21248

Modified:
  head/sys/conf/files.amd64
  head/sys/conf/files.i386
  head/sys/conf/files.x86

Modified: head/sys/conf/files.amd64
==
--- head/sys/conf/files.amd64   Wed Aug 14 20:58:01 2019(r351044)
+++ head/sys/conf/files.amd64   Wed Aug 14 20:58:06 2019(r351045)
@@ -145,35 +145,9 @@ cddl/contrib/opensolaris/common/atomic/amd64/opensolar
 cddl/dev/dtrace/amd64/dtrace_asm.S optional dtrace 
compile-with "${DTRACE_S}"
 cddl/dev/dtrace/amd64/dtrace_subr.coptional dtrace 
compile-with "${DTRACE_C}"
 crypto/aesni/aeskeys_amd64.S   optional aesni
-crypto/aesni/aesni.c   optional aesni
-aesni_ghash.o  optional aesni  \
-   dependency  "$S/crypto/aesni/aesni_ghash.c" \
-   compile-with"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} 
${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \
-   no-implicit-rule\
-   clean   "aesni_ghash.o"
-aesni_ccm.ooptional aesni  \
-   dependency  "$S/crypto/aesni/aesni_ccm.c"   \
-   compile-with"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} 
${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \
-   no-implicit-rule\
-   clean   "aesni_ccm.o"
-aesni_wrap.o   optional aesni  \
-   dependency  "$S/crypto/aesni/aesni_wrap.c"  \
-   compile-with"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} 
${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes ${.IMPSRC}" \
-   no-implicit-rule\
-   clean   "aesni_wrap.o"
 crypto/blowfish/bf_enc.c   optionalcrypto | ipsec | ipsec_support
 crypto/des/des_enc.c   optionalcrypto | ipsec | \
ipsec_support | netsmb
-intel_sha1.o   optionalaesni   \
-   dependency  "$S/crypto/aesni/intel_sha1.c"  \
-   compile-with"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} 
${PROF} -mmmx -msse -msse4 -msha ${.IMPSRC}" \
-   no-implicit-rule\
-   clean   "intel_sha1.o"
-intel_sha256.o optionalaesni   \
-   dependency  "$S/crypto/aesni/intel_sha256.c"\
-   compile-with"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} 
${PROF} -mmmx -msse -msse4 -msha ${.IMPSRC}" \
-   no-implicit-rule\
-   clean   "intel_sha256.o"
 crypto/via/padlock.c   optionalpadlock
 crypto/via/padlock_cipher.coptionalpadlock
 crypto/via/padlock_hash.c  optionalpadlock

Modified: head/sys/conf/files.i386
==
--- head/sys/conf/files.i386Wed Aug 14 20:58:01 2019(r351044)
+++ head/sys/conf/files.i386Wed Aug 14 20:58:06 2019(r351045)
@@ -97,33 +97,7 @@ bf_enc.o optional crypto | ipsec | 
ipsec_support \
compile-with"${CC} -c -I$S/crypto/blowfish/arch/i386 ${ASM_CFLAGS} 
${WERROR} ${.IMPSRC}" \
no-implicit-rule
 crypto/aesni/aeskeys_i386.Soptional aesni
-crypto/aesni/aesni.c   optional aesni
-aesni_ghash.o  optional aesni  \
-   dependency  "$S/crypto/aesni/aesni_ghash.c" \
-   compile-with"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} 
${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \
-   no-implicit-rule\
-   clean   "aesni_ghash.o"
-aesni_ccm.ooptional aesni  \
-   dependency  "$S/crypto/aesni/aesni_ccm.c"   \
-   compile-with"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} 
${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \
-   no-implicit-rule\
-   clean   "aesni_ccm.o"
-aesni_wrap.o   optional aesni  \
-   dependency  "$S/crypto/aesni/aesni_wrap.c"  \
-   compile-with"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WE

svn commit: r351047 - head/sys/conf

2019-08-14 Thread Warner Losh
Author: imp
Date: Wed Aug 14 20:58:17 2019
New Revision: 351047
URL: https://svnweb.freebsd.org/changeset/base/351047

Log:
  The ACPI parts are identical between i386 and amd64
  
  Apart from one MD file, ACPI is a x86 implementation, not specific to either
  i386 or amd64, so put it into files.x86. Other architectures include fewer
  files for the same options, so it can't move into the MI files file.
  
  Reviewed by: jhb (verbal OK on irc)
  Differential Revision: https://reviews.freebsd.org/D21248

Modified:
  head/sys/conf/files.amd64
  head/sys/conf/files.i386
  head/sys/conf/files.x86

Modified: head/sys/conf/files.amd64
==
--- head/sys/conf/files.amd64   Wed Aug 14 20:58:12 2019(r351046)
+++ head/sys/conf/files.amd64   Wed Aug 14 20:58:17 2019(r351047)
@@ -148,15 +148,6 @@ crypto/aesni/aeskeys_amd64.S   optional aesni
 crypto/blowfish/bf_enc.c   optionalcrypto | ipsec | ipsec_support
 crypto/des/des_enc.c   optionalcrypto | ipsec | \
ipsec_support | netsmb
-dev/acpica/acpi_if.m   standard
-dev/acpica/acpi_hpet.c optional acpi
-dev/acpica/acpi_pci.c  optional acpi pci
-dev/acpica/acpi_pci_link.c optional acpi pci
-dev/acpica/acpi_pcib.c optional acpi pci
-dev/acpica/acpi_pcib_acpi.coptional acpi pci
-dev/acpica/acpi_pcib_pci.c optional acpi pci
-dev/acpica/acpi_pxm.c  optionalacpi
-dev/acpica/acpi_timer.coptionalacpi
 dev/acpi_support/acpi_wmi_if.m standard
 dev/agp/agp_amd64.coptionalagp
 dev/agp/agp_i810.c optionalagp

Modified: head/sys/conf/files.i386
==
--- head/sys/conf/files.i386Wed Aug 14 20:58:12 2019(r351046)
+++ head/sys/conf/files.i386Wed Aug 14 20:58:17 2019(r351047)
@@ -98,11 +98,6 @@ bf_enc.o optional crypto | ipsec | 
ipsec_support \
no-implicit-rule
 crypto/aesni/aeskeys_i386.Soptional aesni
 crypto/des/arch/i386/des_enc.S optional crypto | ipsec | ipsec_support | netsmb
-dev/acpica/acpi_pci.c  optional acpi pci
-dev/acpica/acpi_pci_link.c optional acpi pci
-dev/acpica/acpi_pcib.c optional acpi pci
-dev/acpica/acpi_pcib_acpi.coptional acpi pci
-dev/acpica/acpi_pcib_pci.c optional acpi pci
 dev/agp/agp_ali.c  optional agp
 dev/agp/agp_amd.c  optional agp
 dev/agp/agp_amd64.coptional agp
@@ -246,10 +241,6 @@ dev/vmware/vmci/vmci_kernel_if.c   optionalvmci
 dev/vmware/vmci/vmci_qpair.c   optionalvmci
 dev/vmware/vmci/vmci_queue_pair.c  optionalvmci
 dev/vmware/vmci/vmci_resource.coptionalvmci
-dev/acpica/acpi_if.m   standard
-dev/acpica/acpi_hpet.c optional acpi
-dev/acpica/acpi_timer.coptional acpi
-dev/acpica/acpi_pxm.c  optional acpi
 dev/acpi_support/acpi_wmi_if.m standard
 dev/wbwd/wbwd.coptional wbwd
 dev/isci/isci.c
optional isci

Modified: head/sys/conf/files.x86
==
--- head/sys/conf/files.x86 Wed Aug 14 20:58:12 2019(r351046)
+++ head/sys/conf/files.x86 Wed Aug 14 20:58:17 2019(r351047)
@@ -49,6 +49,15 @@ intel_sha256.o   optionalaesni   
\
 crypto/via/padlock.c   optional padlock
 crypto/via/padlock_cipher.coptional padlock
 crypto/via/padlock_hash.c  optional padlock
+dev/acpica/acpi_hpet.c optionalacpi
+dev/acpica/acpi_if.m   standard
+dev/acpica/acpi_pci.c  optionalacpi pci
+dev/acpica/acpi_pci_link.c optionalacpi pci
+dev/acpica/acpi_pcib.c optionalacpi pci
+dev/acpica/acpi_pcib_acpi.coptionalacpi pci
+dev/acpica/acpi_pcib_pci.c optionalacpi pci
+dev/acpica/acpi_pxm.c  optionalacpi
+dev/acpica/acpi_timer.coptionalacpi
 dev/fdc/fdc.c  optionalfdc
 dev/fdc/fdc_acpi.c optionalfdc
 dev/fdc/fdc_isa.c  optionalfdc isa
___
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: r351046 - head/sys/conf

2019-08-14 Thread Warner Losh
Author: imp
Date: Wed Aug 14 20:58:12 2019
New Revision: 351046
URL: https://svnweb.freebsd.org/changeset/base/351046

Log:
  Move via padlock files to files.x86.
  
  VIA Padlock support is for VIA C3, C7 and Eden processors, which are 64bit x86
  processors.
  
  Reviewed by: jhb (verbal OK on irc)
  Differential Revision: https://reviews.freebsd.org/D21248

Modified:
  head/sys/conf/files.amd64
  head/sys/conf/files.i386
  head/sys/conf/files.x86

Modified: head/sys/conf/files.amd64
==
--- head/sys/conf/files.amd64   Wed Aug 14 20:58:06 2019(r351045)
+++ head/sys/conf/files.amd64   Wed Aug 14 20:58:12 2019(r351046)
@@ -148,9 +148,6 @@ crypto/aesni/aeskeys_amd64.Soptional aesni
 crypto/blowfish/bf_enc.c   optionalcrypto | ipsec | ipsec_support
 crypto/des/des_enc.c   optionalcrypto | ipsec | \
ipsec_support | netsmb
-crypto/via/padlock.c   optionalpadlock
-crypto/via/padlock_cipher.coptionalpadlock
-crypto/via/padlock_hash.c  optionalpadlock
 dev/acpica/acpi_if.m   standard
 dev/acpica/acpi_hpet.c optional acpi
 dev/acpica/acpi_pci.c  optional acpi pci

Modified: head/sys/conf/files.i386
==
--- head/sys/conf/files.i386Wed Aug 14 20:58:06 2019(r351045)
+++ head/sys/conf/files.i386Wed Aug 14 20:58:12 2019(r351046)
@@ -98,9 +98,6 @@ bf_enc.o  optional crypto | ipsec | 
ipsec_support \
no-implicit-rule
 crypto/aesni/aeskeys_i386.Soptional aesni
 crypto/des/arch/i386/des_enc.S optional crypto | ipsec | ipsec_support | netsmb
-crypto/via/padlock.c   optional padlock
-crypto/via/padlock_cipher.coptional padlock
-crypto/via/padlock_hash.c  optional padlock
 dev/acpica/acpi_pci.c  optional acpi pci
 dev/acpica/acpi_pci_link.c optional acpi pci
 dev/acpica/acpi_pcib.c optional acpi pci

Modified: head/sys/conf/files.x86
==
--- head/sys/conf/files.x86 Wed Aug 14 20:58:06 2019(r351045)
+++ head/sys/conf/files.x86 Wed Aug 14 20:58:12 2019(r351046)
@@ -46,6 +46,9 @@ intel_sha256.ooptionalaesni   
\
compile-with"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} 
${PROF} -mmmx -msse -msse4 -msha ${.IMPSRC}" \
no-implicit-rule\
clean   "intel_sha256.o"
+crypto/via/padlock.c   optional padlock
+crypto/via/padlock_cipher.coptional padlock
+crypto/via/padlock_hash.c  optional padlock
 dev/fdc/fdc.c  optionalfdc
 dev/fdc/fdc_acpi.c optionalfdc
 dev/fdc/fdc_isa.c  optionalfdc isa
___
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: r351044 - head/sys/conf

2019-08-14 Thread Warner Losh
Author: imp
Date: Wed Aug 14 20:58:01 2019
New Revision: 351044
URL: https://svnweb.freebsd.org/changeset/base/351044

Log:
  Move all the hp* drivers too files.x86
  
  The HPT drivers are all x86 only. Move them to files.x86. Because of the way 
we
  run uudecode, we can use $M instead of needing entries for them in separate
  files.
  
  Reviewed by: jhb (verbal OK on irc)
  Differential Revision: https://reviews.freebsd.org/D21248

Modified:
  head/sys/conf/files.amd64
  head/sys/conf/files.i386
  head/sys/conf/files.x86

Modified: head/sys/conf/files.amd64
==
--- head/sys/conf/files.amd64   Wed Aug 14 20:57:54 2019(r351043)
+++ head/sys/conf/files.amd64   Wed Aug 14 20:58:01 2019(r351044)
@@ -82,26 +82,6 @@ atkbdmap.h   optional
atkbd_dflt_keymap   \
no-obj no-implicit-rule before-depend   \
clean   "atkbdmap.h"
 #
-hpt27xx_lib.o  optionalhpt27xx \
-   dependency  "$S/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu" \
-   compile-with"uudecode < $S/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu" \
-   no-implicit-rule
-#
-hptmvraid.ooptionalhptmv   \
-   dependency  "$S/dev/hptmv/amd64-elf.raid.o.uu"  \
-   compile-with"uudecode < $S/dev/hptmv/amd64-elf.raid.o.uu" \
-   no-implicit-rule
-#
-hptnr_lib.ooptionalhptnr   \
-   dependency  "$S/dev/hptnr/amd64-elf.hptnr_lib.o.uu" \
-   compile-with"uudecode < $S/dev/hptnr/amd64-elf.hptnr_lib.o.uu" \
-   no-implicit-rule
-#
-hptrr_lib.ooptionalhptrr   \
-   dependency  "$S/dev/hptrr/amd64-elf.hptrr_lib.o.uu" \
-   compile-with"uudecode < $S/dev/hptrr/amd64-elf.hptrr_lib.o.uu" \
-   no-implicit-rule
-#
 amd64/acpica/acpi_machdep.coptionalacpi
 acpi_wakecode.ooptionalacpi
\
dependency  "$S/amd64/acpica/acpi_wakecode.S assym.inc" \
@@ -290,20 +270,6 @@ dev/ixl/i40e_dcb.c optionalixl pci \
compile-with "${NORMAL_C} -I$S/dev/ixl"
 dev/gpio/bytgpio.c optionalbytgpio
 dev/gpio/chvgpio.c optionalchvgpio
-dev/hpt27xx/hpt27xx_os_bsd.c   optionalhpt27xx
-dev/hpt27xx/hpt27xx_osm_bsd.c  optionalhpt27xx
-dev/hpt27xx/hpt27xx_config.c   optionalhpt27xx
-dev/hptmv/entry.c  optionalhptmv
-dev/hptmv/mv.c optionalhptmv
-dev/hptmv/gui_lib.coptionalhptmv
-dev/hptmv/hptproc.coptionalhptmv
-dev/hptmv/ioctl.c  optionalhptmv
-dev/hptnr/hptnr_os_bsd.c   optionalhptnr
-dev/hptnr/hptnr_osm_bsd.c  optionalhptnr
-dev/hptnr/hptnr_config.c   optionalhptnr
-dev/hptrr/hptrr_os_bsd.c   optionalhptrr
-dev/hptrr/hptrr_osm_bsd.c  optionalhptrr
-dev/hptrr/hptrr_config.c   optionalhptrr
 dev/hwpmc/hwpmc_amd.c  optionalhwpmc
 dev/hwpmc/hwpmc_intel.coptionalhwpmc
 dev/hwpmc/hwpmc_core.c optionalhwpmc

Modified: head/sys/conf/files.i386
==
--- head/sys/conf/files.i386Wed Aug 14 20:57:54 2019(r351043)
+++ head/sys/conf/files.i386Wed Aug 14 20:58:01 2019(r351044)
@@ -57,26 +57,6 @@ atkbdmap.h   optional
atkbd_dflt_keymap   \
no-obj no-implicit-rule before-depend   \
clean   "atkbdmap.h"
 #
-hpt27xx_lib.o  optionalhpt27xx \
-   dependency  "$S/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu"  \
-   compile-with"uudecode < $S/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu" \
-   no-implicit-rule
-#
-hptmvraid.ooptionalhptmv   \
-   dependency  "$S/dev/hptmv/i386-elf.raid.o.uu"   \
-   compile-with"uudecode < $S/dev/hptmv/i386-elf.raid.o.uu"\
-   no-implicit-rule
-#
-hptnr_lib.ooptionalhptnr   \
-   dependency  "$S/dev/hptnr/i386-elf.hptnr_lib.o.uu"  \
-   compile-with"uudecode < $S/dev/hptnr/i386-elf.hptnr_lib.o.uu" \
-   no-implicit-rule
-#
-hptrr_lib.ooptionalhptrr   \
-   dependency  "$S/dev/hptrr/i386-elf.hptrr_lib.o.uu"  \
-   compile-with"uudecode < $S/dev/hptrr/i386-elf.hptrr_lib.o.uu" \
-   no-implicit-rule
-#
 cddl/contrib/opensolaris/common/atomic/i386/opensolaris_atomic.S   
optional zfs | dtrace compile-with "${ZFS_S}"
 cddl/dev/dtrace/i386/dtrace_asm.S 

svn commit: r351043 - head/sys/conf

2019-08-14 Thread Warner Losh
Author: imp
Date: Wed Aug 14 20:57:54 2019
New Revision: 351043
URL: https://svnweb.freebsd.org/changeset/base/351043

Log:
  Move the identical x86 lines to files.x86
  
  Move all the identical x86 lines to files.x86. The non-identical ones should 
be
  unified and moved as well, but that would require additional changes that 
would
  need a more careful review and may not be MFCable, so I'll do them
  separately. I'll delete the mildly snarky comment when things are unified.
  
  Reviewed by: jhb (verbal OK on irc)
  Differential Revision: https://reviews.freebsd.org/D21248

Modified:
  head/sys/conf/files.amd64
  head/sys/conf/files.i386
  head/sys/conf/files.x86

Modified: head/sys/conf/files.amd64
==
--- head/sys/conf/files.amd64   Wed Aug 14 20:45:00 2019(r351042)
+++ head/sys/conf/files.amd64   Wed Aug 14 20:57:54 2019(r351043)
@@ -164,9 +164,6 @@ amd64/pci/pci_cfgreg.c  optionalpci
 cddl/contrib/opensolaris/common/atomic/amd64/opensolaris_atomic.S  
optional zfs | dtrace compile-with "${ZFS_S}"
 cddl/dev/dtrace/amd64/dtrace_asm.S optional dtrace 
compile-with "${DTRACE_S}"
 cddl/dev/dtrace/amd64/dtrace_subr.coptional dtrace 
compile-with "${DTRACE_C}"
-cddl/dev/fbt/x86/fbt_isa.c optional dtrace_fbt | 
dtraceall compile-with "${FBT_C}"
-cddl/dev/dtrace/x86/dis_tables.c   optional dtrace_fbt | 
dtraceall compile-with "${DTRACE_C}"
-cddl/dev/dtrace/x86/instr_size.c   optional dtrace_fbt | 
dtraceall compile-with "${DTRACE_C}"
 crypto/aesni/aeskeys_amd64.S   optional aesni
 crypto/aesni/aesni.c   optional aesni
 aesni_ghash.o  optional aesni  \
@@ -612,7 +609,6 @@ isa/vga_isa.c   optionalvga
 kern/kern_clocksource.cstandard
 kern/imgact_aout.c optional compat_aout
 kern/link_elf_obj.cstandard
-libkern/x86/crc32_sse42.c  standard
 #
 # IA32 binary support
 #
@@ -680,72 +676,20 @@ contrib/x86emu/x86emu.c   optional x86bios | dpms 
| pci
 #
 dev/bvm/bvm_console.c  optionalbvmconsole
 dev/bvm/bvm_dbg.c  optionalbvmdebug
-#
-# x86 shared code between IA32 and AMD64 architectures
-#
-x86/acpica/OsdEnvironment.coptionalacpi
-x86/acpica/acpi_apm.c  optionalacpi
-x86/acpica/acpi_wakeup.c   optionalacpi
+# Common files where we currently configure the system differently, but 
perhaps shouldn't
+# config(8) doesn't have a way to force standard options, so we've been 
inconsistent
+# about marking non-optional things 'standard'.
 x86/acpica/madt.c  optionalacpi
-x86/acpica/srat.c  optionalacpi
-x86/bios/smbios.c  optionalsmbios
-x86/bios/vpd.c optionalvpd
-x86/cpufreq/powernow.c optionalcpufreq
-x86/cpufreq/est.c  optionalcpufreq
-x86/cpufreq/hwpstate.c optionalcpufreq
-x86/cpufreq/p4tcc.coptionalcpufreq
-x86/iommu/busdma_dmar.coptionalacpi acpi_dmar pci
-x86/iommu/intel_ctx.c  optionalacpi acpi_dmar pci
-x86/iommu/intel_drv.c  optionalacpi acpi_dmar pci
-x86/iommu/intel_fault.coptionalacpi acpi_dmar pci
-x86/iommu/intel_gas.c  optionalacpi acpi_dmar pci
-x86/iommu/intel_idpgtbl.c  optionalacpi acpi_dmar pci
-x86/iommu/intel_intrmap.c  optionalacpi acpi_dmar pci
-x86/iommu/intel_qi.c   optionalacpi acpi_dmar pci
-x86/iommu/intel_quirks.c   optionalacpi acpi_dmar pci
-x86/iommu/intel_utils.coptionalacpi acpi_dmar pci
 x86/isa/atpic.coptionalatpic isa
-x86/isa/atrtc.cstandard
-x86/isa/clock.cstandard
 x86/isa/elcr.c optionalatpic isa | mptable
 x86/isa/isa.c  standard
 x86/isa/isa_dma.c  standard
-x86/isa/nmi.c  standard
-x86/isa/orm.c  optionalisa
-x86/pci/pci_bus.c  optionalpci
 x86/pci/pci_early_quirks.c optionalpci
-x86/pci/qpi.c  optionalpci
-x86/x86/autoconf.c standard
-x86/x86/bus_machdep.c  standard
-x86/x86/busdma_bounce.cstandard
-x86/x86/busdma_machdep.c   standard
-x86/x86/cpu_machdep.c  standard
-x86/x86/dump_machdep.c standard
-x86/x86/fdt_machdep.c  optionalfdt
-x86/x86/identcpu.c standard
-x86/x86/intr_machdep.c standard
 x86/x86/io_apic.c  standard
-x86/x86/legacy.c   standard
 x86/x86/local_apic.c   standard
-x

svn commit: r351042 - in head: sys/fs/fuse tests/sys/fs/fusefs

2019-08-14 Thread Alan Somers
Author: asomers
Date: Wed Aug 14 20:45:00 2019
New Revision: 351042
URL: https://svnweb.freebsd.org/changeset/base/351042

Log:
  fusefs: Fix the size of fuse_getattr_in
  
  In FUSE protocol 7.9, the size of the FUSE_GETATTR request has increased.
  However, the fusefs driver is currently not sending the additional fields.
  In our implementation, the additional fields are always zero, so I there
  haven't been any test failures until now.  But fusefs-lkl requires the
  request's length to be correct.
  
  Fix this bug, and also enhance the test suite to catch similar bugs.
  
  PR:   239830
  MFC after:2 weeks
  MFC-With: 350665
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/fs/fuse/fuse_internal.c
  head/tests/sys/fs/fusefs/getattr.cc
  head/tests/sys/fs/fusefs/mockfs.cc
  head/tests/sys/fs/fusefs/mockfs.hh

Modified: head/sys/fs/fuse/fuse_internal.c
==
--- head/sys/fs/fuse/fuse_internal.cWed Aug 14 19:21:26 2019
(r351041)
+++ head/sys/fs/fuse/fuse_internal.cWed Aug 14 20:45:00 2019
(r351042)
@@ -868,7 +868,7 @@ fuse_internal_do_getattr(struct vnode *vp, struct vatt
enum vtype vtyp;
int err;
 
-   fdisp_init(&fdi, 0);
+   fdisp_init(&fdi, sizeof(*fgai));
fdisp_make_vp(&fdi, FUSE_GETATTR, vp, td, cred);
fgai = fdi.indata;
/* 
@@ -877,7 +877,7 @@ fuse_internal_do_getattr(struct vnode *vp, struct vatt
 * care.
 */
fgai->getattr_flags = 0;
-   if ((err = fdisp_simple_putget_vp(&fdi, FUSE_GETATTR, vp, td, cred))) {
+   if ((err = fdisp_wait_answ(&fdi))) {
if (err == ENOENT)
fuse_internal_vnode_disappear(vp);
goto out;

Modified: head/tests/sys/fs/fusefs/getattr.cc
==
--- head/tests/sys/fs/fusefs/getattr.cc Wed Aug 14 19:21:26 2019
(r351041)
+++ head/tests/sys/fs/fusefs/getattr.cc Wed Aug 14 20:45:00 2019
(r351042)
@@ -195,6 +195,7 @@ TEST_F(Getattr, ok)
EXPECT_CALL(*m_mock, process(
ResultOf([](auto in) {
return (in.header.opcode == FUSE_GETATTR &&
+   in.body.getattr.getattr_flags == 0 &&
in.header.nodeid == ino);
}, Eq(true)),
_)

Modified: head/tests/sys/fs/fusefs/mockfs.cc
==
--- head/tests/sys/fs/fusefs/mockfs.cc  Wed Aug 14 19:21:26 2019
(r351041)
+++ head/tests/sys/fs/fusefs/mockfs.cc  Wed Aug 14 20:45:00 2019
(r351042)
@@ -467,6 +467,156 @@ MockFS::~MockFS() {
close(m_kq);
 }
 
+void MockFS::audit_request(const mockfs_buf_in &in) {
+   uint32_t inlen = in.header.len;
+   size_t fih = sizeof(in.header);
+   switch (in.header.opcode) {
+   case FUSE_LOOKUP:
+   case FUSE_RMDIR:
+   case FUSE_SYMLINK:
+   case FUSE_UNLINK:
+   ASSERT_GT(inlen, fih) << "Missing request filename";
+   break;
+   case FUSE_FORGET:
+   ASSERT_EQ(inlen, fih + sizeof(in.body.forget));
+   break;
+   case FUSE_GETATTR:
+   ASSERT_EQ(inlen, fih + sizeof(in.body.getattr));
+   break;
+   case FUSE_SETATTR:
+   ASSERT_EQ(inlen, fih + sizeof(in.body.setattr));
+   break;
+   case FUSE_READLINK:
+   ASSERT_EQ(inlen, fih) << "Unexpected request body";
+   break;
+   case FUSE_MKNOD:
+   {
+   size_t s;
+   if (m_kernel_minor_version >= 12)
+   s = sizeof(in.body.mknod);
+   else
+   s = FUSE_COMPAT_MKNOD_IN_SIZE;
+   ASSERT_GE(inlen, fih + s) << "Missing request body";
+   ASSERT_GT(inlen, fih + s) << "Missing request filename";
+   break;
+   }
+   case FUSE_MKDIR:
+   ASSERT_GE(inlen, fih + sizeof(in.body.mkdir)) <<
+   "Missing request body";
+   ASSERT_GT(inlen, fih + sizeof(in.body.mkdir)) <<
+   "Missing request filename";
+   break;
+   case FUSE_RENAME:
+   ASSERT_GE(inlen, fih + sizeof(in.body.rename)) <<
+   "Missing request body";
+   ASSERT_GT(inlen, fih + sizeof(in.body.rename)) <<
+   "Missing request filename";
+   break;
+   case FUSE_LINK:
+   ASSERT_GE(inlen, fih + sizeof(in.body.link)) <<
+   "Missing request body";
+   ASSERT_GT(inlen, fih + sizeof(in.body.link)) <<
+   "Missing request filename";
+   break;
+   case F

Re: svn commit: r351036 - head/share/man/man7

2019-08-14 Thread Warner Losh
On Wed, Aug 14, 2019 at 12:52 PM Ed Maste  wrote:

> On Wed, 14 Aug 2019 at 13:25, Warner Losh  wrote:
> >
> > would using 'removed from the tree' be better here? Because that's the
> current plan of record.
>
> I originally had "removed" but then noticed your mail had 05-31 as the
> date for "svn rm all non-clang platforms not supported by in-tree LLVM
> or converted to ext toolchain". I didn't want to overwhelm with dates
> that might change.  Maybe something like "may be removed from the tree
> after that date"?
>

That works. I want the threat of removal to be there, though honestly I
don't think it will matter. nobody is going to step up and do it.

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


Re: svn commit: r351009 - head/sys/compat/linuxkpi/common/include/linux

2019-08-14 Thread Cy Schubert
On August 14, 2019 12:06:24 PM PDT, Hans Petter Selasky  
wrote:
>On 2019-08-14 21:00, Cy Schubert wrote:
>> John's patch to drm-current-kmod (ports r508877) works! This broke
>> drm-current-kmod.
>
>You need to update the port. This patch should have been tested too.
>
>Did you try that first?
>
>--HPS

The port is up to date. Sorry for not attaching output. I was in a rush to get 
back to $JOB. I'll rerun it tonight.


-- 
Pardon the typos and autocorrect, small keyboard in use.
Cheers,
Cy Schubert 
FreeBSD UNIX:  Web: http://www.FreeBSD.org

The need of the many outweighs the greed of the few.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r351009 - head/sys/compat/linuxkpi/common/include/linux

2019-08-14 Thread Hans Petter Selasky

On 2019-08-14 21:00, Cy Schubert wrote:

John's patch to drm-current-kmod (ports r508877) works! This broke
drm-current-kmod.


You need to update the port. This patch should have been tested too.

Did you try that first?

--HPS
___
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: r351009 - head/sys/compat/linuxkpi/common/include/linux

2019-08-14 Thread Cy Schubert
In message <201908140936.x7e9aqac069...@repo.freebsd.org>, Hans Petter 
Selasky
writes:
> Author: hselasky
> Date: Wed Aug 14 09:36:25 2019
> New Revision: 351009
> URL: https://svnweb.freebsd.org/changeset/base/351009
>
> Log:
>   Implement pci_enable_msi() and pci_disable_msi() in the LinuxKPI.
>   This patch makes the DRM graphics driver in ports usable on aarch64.
>   
>   Submitted by:   Greg V 
>   Differential Revision:  https://reviews.freebsd.org/D21008
>   MFC after:  1 week
>   Sponsored by:   Mellanox Technologies
>
> Modified:
>   head/sys/compat/linuxkpi/common/include/linux/device.h
>   head/sys/compat/linuxkpi/common/include/linux/interrupt.h
>   head/sys/compat/linuxkpi/common/include/linux/pci.h
>
> Modified: head/sys/compat/linuxkpi/common/include/linux/device.h
> =
> =
> --- head/sys/compat/linuxkpi/common/include/linux/device.hWed Aug 14 06:4
> 1:22 2019 (r351008)
> +++ head/sys/compat/linuxkpi/common/include/linux/device.hWed Aug 14 09:3
> 6:25 2019 (r351009)
> @@ -110,8 +110,8 @@ struct device {
>   void*driver_data;
>   unsigned intirq;
>  #define  LINUX_IRQ_INVALID   65535
> - unsigned intmsix;
> - unsigned intmsix_max;
> + unsigned intirq_start;
> + unsigned intirq_end;
>   const struct attribute_group **groups;
>   struct fwnode_handle *fwnode;
>  
>
> Modified: head/sys/compat/linuxkpi/common/include/linux/interrupt.h
> =
> =
> --- head/sys/compat/linuxkpi/common/include/linux/interrupt.h Wed Aug 14 06:4
> 1:22 2019 (r351008)
> +++ head/sys/compat/linuxkpi/common/include/linux/interrupt.h Wed Aug 14 09:3
> 6:25 2019 (r351009)
> @@ -55,9 +55,11 @@ struct irq_ent {
>  static inline int
>  linux_irq_rid(struct device *dev, unsigned int irq)
>  {
> - if (irq == dev->irq)
> + /* check for MSI- or MSIX- interrupt */
> + if (irq >= dev->irq_start && irq < dev->irq_end)
> + return (irq - dev->irq_start + 1);
> + else
>   return (0);
> - return irq - dev->msix + 1;
>  }
>  
>  extern void linux_irq_handler(void *);
>
> Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h
> =
> =
> --- head/sys/compat/linuxkpi/common/include/linux/pci.h   Wed Aug 14 06:4
> 1:22 2019 (r351008)
> +++ head/sys/compat/linuxkpi/common/include/linux/pci.h   Wed Aug 14 09:3
> 6:25 2019 (r351009)
> @@ -228,6 +228,7 @@ struct pci_dev {
>   unsigned intdevfn;
>   uint32_tclass;
>   uint8_t revision;
> + boolmsi_enabled;
>  };
>  
>  static inline struct resource_list_entry *
> @@ -262,7 +263,7 @@ linux_pci_find_irq_dev(unsigned int irq)
>   spin_lock(&pci_lock);
>   list_for_each_entry(pdev, &pci_devices, links) {
>   if (irq == pdev->dev.irq ||
> - (irq >= pdev->dev.msix && irq < pdev->dev.msix_max)) {
> + (irq >= pdev->dev.irq_start && irq < pdev->dev.irq_end)) {
>   found = &pdev->dev;
>   break;
>   }
> @@ -424,10 +425,25 @@ pci_disable_msix(struct pci_dev *pdev)
>* linux_pci_find_irq_dev() does no longer see them by
>* resetting their references to zero:
>*/
> - pdev->dev.msix = 0;
> - pdev->dev.msix_max = 0;
> + pdev->dev.irq_start = 0;
> + pdev->dev.irq_end = 0;
>  }
>  
> +#define  pci_disable_msi(pdev) \
> +  linux_pci_disable_msi(pdev)
> +
> +static inline void
> +linux_pci_disable_msi(struct pci_dev *pdev)
> +{
> +
> + pci_release_msi(pdev->dev.bsddev);
> +
> + pdev->dev.irq_start = 0;
> + pdev->dev.irq_end = 0;
> + pdev->irq = pdev->dev.irq;
> + pdev->msi_enabled = false;
> +}
> +
>  unsigned longpci_resource_start(struct pci_dev *pdev, int bar);
>  unsigned longpci_resource_len(struct pci_dev *pdev, int bar);
>  
> @@ -562,10 +578,10 @@ pci_enable_msix(struct pci_dev *pdev, struct msix_entr
>   return avail;
>   }
>   rle = linux_pci_get_rle(pdev, SYS_RES_IRQ, 1);
> - pdev->dev.msix = rle->start;
> - pdev->dev.msix_max = rle->start + avail;
> + pdev->dev.irq_start = rle->start;
> + pdev->dev.irq_end = rle->start + avail;
>   for (i = 0; i < nreq; i++)
> - entries[i].vector = pdev->dev.msix + i;
> + entries[i].vector = pdev->dev.irq_start + i;
>   return (0);
>  }
>  
> @@ -593,6 +609,32 @@ pci_enable_msix_range(struct pci_dev *dev, struct msix
>   }
>   } while (rc);
>   return (nvec);
> +}
> +
> +#define  pci_enable_msi(pdev) \
> +  linux_pci_enable_msi(pdev)
> +
> +static inline int
> +pci_enable_msi(struct pci_dev *pdev)
> +{
> + struct resource_lis

Re: svn commit: r351036 - head/share/man/man7

2019-08-14 Thread Ed Maste
On Wed, 14 Aug 2019 at 13:25, Warner Losh  wrote:
>
> would using 'removed from the tree' be better here? Because that's the 
> current plan of record.

I originally had "removed" but then noticed your mail had 05-31 as the
date for "svn rm all non-clang platforms not supported by in-tree LLVM
or converted to ext toolchain". I didn't want to overwhelm with dates
that might change.  Maybe something like "may be removed from the tree
after that date"?
___
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: r351040 - head/lib/libcompiler_rt

2019-08-14 Thread Ed Maste
Author: emaste
Date: Wed Aug 14 18:41:28 2019
New Revision: 351040
URL: https://svnweb.freebsd.org/changeset/base/351040

Log:
  compiler-rt: enable __bswapsi2/__bswapdi2 for RISC-V
  
  As with other archs the compiler may emit calls to the byte swap routines
  under certain conditions.
  
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation

Modified:
  head/lib/libcompiler_rt/Makefile.inc

Modified: head/lib/libcompiler_rt/Makefile.inc
==
--- head/lib/libcompiler_rt/Makefile.incWed Aug 14 18:04:04 2019
(r351039)
+++ head/lib/libcompiler_rt/Makefile.incWed Aug 14 18:41:28 2019
(r351040)
@@ -234,7 +234,8 @@ SRCS+=  sync_synchronize.S
 .endif
 
 # On some archs GCC-6.3 requires bswap32 built-in.
-.if ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "sparc64"
+.if ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "riscv" || \
+${MACHINE_CPUARCH} == "sparc64"
 SRCS+= bswapdi2.c
 SRCS+= bswapsi2.c
 .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: r351039 - head/tests/sys/fs/fusefs

2019-08-14 Thread Alan Somers
Author: asomers
Date: Wed Aug 14 18:04:04 2019
New Revision: 351039
URL: https://svnweb.freebsd.org/changeset/base/351039

Log:
  fusefs: fix intermittency in the default_permissions.Unlink.ok test
  
  The test needs to expect a FUSE_FORGET operation. Most of the time the test
  would pass anyway, because by chance FUSE_FORGET would arrive after the
  unmount.
  
  MFC after:2 weeks
  MFC-With: 350665
  Sponsored by: The FreeBSD Foundation

Modified:
  head/tests/sys/fs/fusefs/default_permissions.cc

Modified: head/tests/sys/fs/fusefs/default_permissions.cc
==
--- head/tests/sys/fs/fusefs/default_permissions.cc Wed Aug 14 17:36:26 
2019(r351038)
+++ head/tests/sys/fs/fusefs/default_permissions.cc Wed Aug 14 18:04:04 
2019(r351039)
@@ -40,6 +40,7 @@ extern "C" {
 #include 
 
 #include 
+#include 
 #include 
 }
 
@@ -1157,12 +1158,19 @@ TEST_F(Unlink, ok)
const char FULLPATH[] = "mountpoint/some_file.txt";
const char RELPATH[] = "some_file.txt";
uint64_t ino = 42;
+   sem_t sem;
 
+   ASSERT_EQ(0, sem_init(&sem, 0, 0)) << strerror(errno);
+
expect_getattr(FUSE_ROOT_ID, S_IFDIR | 0777, UINT64_MAX, 1);
expect_lookup(RELPATH, ino, S_IFREG | 0644, UINT64_MAX, geteuid());
expect_unlink(FUSE_ROOT_ID, RELPATH, 0);
+   expect_forget(ino, 1, &sem);
 
ASSERT_EQ(0, unlink(FULLPATH)) << strerror(errno);
+
+   sem_wait(&sem);
+   sem_destroy(&sem);
 }
 
 /*
___
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: r351038 - head/sbin/nvmecontrol

2019-08-14 Thread Alexander Motin
Author: mav
Date: Wed Aug 14 17:36:26 2019
New Revision: 351038
URL: https://svnweb.freebsd.org/changeset/base/351038

Log:
  Print few more useful identify fields.
  
  MFC after:2 weeks

Modified:
  head/sbin/nvmecontrol/identify.c
  head/sbin/nvmecontrol/identify_ext.c

Modified: head/sbin/nvmecontrol/identify.c
==
--- head/sbin/nvmecontrol/identify.cWed Aug 14 17:17:52 2019
(r351037)
+++ head/sbin/nvmecontrol/identify.cWed Aug 14 17:36:26 2019
(r351038)
@@ -62,6 +62,7 @@ static struct options {
 void
 print_namespace(struct nvme_namespace_data *nsdata)
 {
+   char cbuf[UINT128_DIG + 1];
uint32_ti;
uint32_tlbaf, lbads, ms, rp;
uint8_t thin_prov, ptype;
@@ -73,15 +74,12 @@ print_namespace(struct nvme_namespace_data *nsdata)
flbas_fmt = (nsdata->flbas >> NVME_NS_DATA_FLBAS_FORMAT_SHIFT) &
NVME_NS_DATA_FLBAS_FORMAT_MASK;
 
-   printf("Size (in LBAs):  %lld (%lldM)\n",
-   (long long)nsdata->nsze,
-   (long long)nsdata->nsze / 1024 / 1024);
-   printf("Capacity (in LBAs):  %lld (%lldM)\n",
-   (long long)nsdata->ncap,
-   (long long)nsdata->ncap / 1024 / 1024);
-   printf("Utilization (in LBAs):   %lld (%lldM)\n",
-   (long long)nsdata->nuse,
-   (long long)nsdata->nuse / 1024 / 1024);
+   printf("Size:%lld blocks\n",
+   (long long)nsdata->nsze);
+   printf("Capacity:%lld blocks\n",
+   (long long)nsdata->ncap);
+   printf("Utilization: %lld blocks\n",
+   (long long)nsdata->nuse);
printf("Thin Provisioning:   %s\n",
thin_prov ? "Supported" : "Not Supported");
printf("Number of LBA Formats:   %d\n", nsdata->nlbaf+1);
@@ -148,7 +146,22 @@ print_namespace(struct nvme_namespace_data *nsdata)
 NVME_NS_DATA_DLFEAT_DWZ_MASK ? ", Write Zero" : "",
(nsdata->dlfeat >> NVME_NS_DATA_DLFEAT_GCRC_SHIFT) &
 NVME_NS_DATA_DLFEAT_GCRC_MASK ? ", Guard CRC" : "");
-   printf("Optimal I/O Boundary (LBAs): %u\n", nsdata->noiob);
+   printf("Optimal I/O Boundary:%u blocks\n", nsdata->noiob);
+   printf("NVM Capacity:%s bytes\n",
+  uint128_to_str(to128(nsdata->nvmcap), cbuf, sizeof(cbuf)));
+   if ((nsdata->nsfeat >> NVME_NS_DATA_NSFEAT_NPVALID_SHIFT) &
+   NVME_NS_DATA_NSFEAT_NPVALID_MASK) {
+   printf("Preferred Write Granularity: %u blocks",
+   nsdata->npwg + 1);
+   printf("Preferred Write Alignment:   %u blocks",
+   nsdata->npwa + 1);
+   printf("Preferred Deallocate Granul: %u blocks",
+   nsdata->npdg + 1);
+   printf("Preferred Deallocate Align:  %u blocks",
+   nsdata->npda + 1);
+   printf("Optimal Write Size:  %u blocks",
+   nsdata->nows + 1);
+   }
printf("Globally Unique Identifier:  ");
for (i = 0; i < sizeof(nsdata->nguid); i++)
printf("%02x", nsdata->nguid[i]);

Modified: head/sbin/nvmecontrol/identify_ext.c
==
--- head/sbin/nvmecontrol/identify_ext.cWed Aug 14 17:17:52 2019
(r351037)
+++ head/sbin/nvmecontrol/identify_ext.cWed Aug 14 17:36:26 2019
(r351038)
@@ -121,7 +121,7 @@ nvme_print_controller(struct nvme_controller_data *cda
if (cdata->mdts == 0)
printf("Unlimited\n");
else
-   printf("%ld\n", PAGE_SIZE * (1L << cdata->mdts));
+   printf("%ld bytes\n", PAGE_SIZE * (1L << cdata->mdts));
printf("Controller ID:   0x%04x\n", cdata->ctrlr_id);
printf("Version: %d.%d.%d\n",
(cdata->ver >> 16) & 0x, (cdata->ver >> 8) & 0xff,
@@ -184,6 +184,14 @@ nvme_print_controller(struct nvme_controller_data *cda
ns_smart ? "Yes" : "No");
printf("Error Log Page Entries:  %d\n", cdata->elpe+1);
printf("Number of Power States:  %d\n", cdata->npss+1);
+   if (cdata->ver >= 0x010200) {
+   printf("Total NVM Capacity:  %s bytes\n",
+   uint128_to_str(to128(cdata->untncap.tnvmcap),
+   cbuf, sizeof(cbuf)));
+   printf("Unallocated NVM Capacity:%s bytes\n",
+   uint128_to_str(to128(cdata->untncap.unvmcap),
+   cbuf, sizeof(cbuf)));
+   }
 
printf("\n");
printf("NVM Command Set Attributes\n");
@@ -235,13 +243,6 @@ nvme_print_controller(struct nvme_controller_data *cda
(t == NVME_CTRLR_DATA_VWC_ALL_NO) ? ", no flush all" :
(t == NVME

Re: svn commit: r351036 - head/share/man/man7

2019-08-14 Thread Warner Losh
On Wed, Aug 14, 2019 at 11:13 AM Ed Maste  wrote:

> Author: emaste
> Date: Wed Aug 14 17:13:36 2019
> New Revision: 351036
> URL: https://svnweb.freebsd.org/changeset/base/351036
>
> Log:
>   arch.7: add deprecation notice for GCC 4.2.1
>
>   MFC after:1 week
>   Sponsored by: The FreeBSD Foundation
>
> Modified:
>   head/share/man/man7/arch.7
>
> Modified: head/share/man/man7/arch.7
>
> ==
> --- head/share/man/man7/arch.7  Wed Aug 14 17:04:28 2019(r351035)
> +++ head/share/man/man7/arch.7  Wed Aug 14 17:13:36 2019(r351036)
> @@ -333,6 +333,10 @@ or an external toolchain compiler and linker provided
>  .El
>  .Pp
>  (1) External toolchain provided by ports/packages.
> +.Pp
> +Note that GCC 4.2.1 is deprecated, and scheduled for removal on
> 2020-03-31.
> +CPU architectures not migrated to either base system Clang or external
> +toolchain by then will be desupported.
>

would using 'removed from the tree' be better here? Because that's the
current plan of record.

Warner

 .Ss Predefined Macros
>  The compiler provides a number of predefined macros.
>  Some of these provide architecture-specific details and are explained
> below.
>
>
___
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: r351037 - head/share/man/man7

2019-08-14 Thread Ed Maste
Author: emaste
Date: Wed Aug 14 17:17:52 2019
New Revision: 351037
URL: https://svnweb.freebsd.org/changeset/base/351037

Log:
  arch.7: clarify that the table shows the default tool chain
  
  Reported by:  jhb
  MFC after:1 week
  MFC with: r351035
  Sponsored by: The FreeBSD Foundation

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

Modified: head/share/man/man7/arch.7
==
--- head/share/man/man7/arch.7  Wed Aug 14 17:13:36 2019(r351036)
+++ head/share/man/man7/arch.7  Wed Aug 14 17:17:52 2019(r351037)
@@ -295,7 +295,7 @@ is 8 bytes on all supported architectures except i386.
 .Fx 11.0 ,
 armv6 used the softfp ABI even though it supported only processors
 with a floating point unit.
-.Ss Tool Chain
+.Ss Default Tool Chain
 .Fx uses a variety of tool chain components for the supported CPU
 architectures:
 .Xr clang 1
@@ -307,6 +307,7 @@ GNU
 and Binutils
 .Xr ld 1 ,
 or an external toolchain compiler and linker provided by a port or package.
+This table shows the default tool chain for each architecture.
 .Bl -column -offset indent "Sy Architecture" "Sy Compiler" "Sy Linker"
 .It Sy Architecture Ta Sy Compiler Ta Sy Linker
 .It aarch64 Ta Clang Ta lld
___
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: r351036 - head/share/man/man7

2019-08-14 Thread Ed Maste
Author: emaste
Date: Wed Aug 14 17:13:36 2019
New Revision: 351036
URL: https://svnweb.freebsd.org/changeset/base/351036

Log:
  arch.7: add deprecation notice for GCC 4.2.1
  
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation

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

Modified: head/share/man/man7/arch.7
==
--- head/share/man/man7/arch.7  Wed Aug 14 17:04:28 2019(r351035)
+++ head/share/man/man7/arch.7  Wed Aug 14 17:13:36 2019(r351036)
@@ -333,6 +333,10 @@ or an external toolchain compiler and linker provided 
 .El
 .Pp
 (1) External toolchain provided by ports/packages.
+.Pp
+Note that GCC 4.2.1 is deprecated, and scheduled for removal on 2020-03-31.
+CPU architectures not migrated to either base system Clang or external
+toolchain by then will be desupported.
 .Ss Predefined Macros
 The compiler provides a number of predefined macros.
 Some of these provide architecture-specific details and are explained below.
___
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: r351035 - head/share/man/man7

2019-08-14 Thread Ed Maste
Author: emaste
Date: Wed Aug 14 17:04:28 2019
New Revision: 351035
URL: https://svnweb.freebsd.org/changeset/base/351035

Log:
  arch.7: add tool chain table
  
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation

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

Modified: head/share/man/man7/arch.7
==
--- head/share/man/man7/arch.7  Wed Aug 14 17:02:36 2019(r351034)
+++ head/share/man/man7/arch.7  Wed Aug 14 17:04:28 2019(r351035)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 5, 2018
+.Dd August 14, 2019
 .Dt ARCH 7
 .Os
 .Sh NAME
@@ -295,6 +295,44 @@ is 8 bytes on all supported architectures except i386.
 .Fx 11.0 ,
 armv6 used the softfp ABI even though it supported only processors
 with a floating point unit.
+.Ss Tool Chain
+.Fx uses a variety of tool chain components for the supported CPU
+architectures:
+.Xr clang 1
+and
+.Xr ld.lld 1
+provided by the base system,
+GNU
+.Xr gcc 1
+and Binutils
+.Xr ld 1 ,
+or an external toolchain compiler and linker provided by a port or package.
+.Bl -column -offset indent "Sy Architecture" "Sy Compiler" "Sy Linker"
+.It Sy Architecture Ta Sy Compiler Ta Sy Linker
+.It aarch64 Ta Clang Ta lld
+.It amd64   Ta Clang Ta lld
+.It arm Ta Clang Ta GNU ld 2.17.50
+.It armv6   Ta Clang Ta GNU ld 2.17.50
+.It armv7   Ta Clang Ta lld
+.It i386Ta Clang Ta lld
+.It mipsTa GCC 4.2.1 Ta GNU ld 2.17.50
+.It mipsel  Ta GCC 4.2.1 Ta GNU ld 2.17.50
+.It mipselhfTa GCC 4.2.1 Ta GNU ld 2.17.50
+.It mipshf  Ta GCC 4.2.1 Ta GNU ld 2.17.50
+.It mipsn32 Ta GCC 4.2.1 Ta GNU ld 2.17.50
+.It mips64  Ta GCC 4.2.1 Ta GNU ld 2.17.50
+.It mips64elTa GCC 4.2.1 Ta GNU ld 2.17.50
+.It mips64elhf  Ta GCC 4.2.1 Ta GNU ld 2.17.50
+.It mips64hfTa GCC 4.2.1 Ta GNU ld 2.17.50
+.It powerpc Ta GCC 4.2.1 Ta GNU ld 2.17.50
+.It powerpcspe  Ta GCC 4.2.1 Ta GNU ld 2.17.50
+.It powerpc64   Ta GCC 4.2.1 Ta GNU ld 2.17.50
+.It riscv64 Ta GCC(1)Ta GNU ld(1)
+.It riscv64sf   Ta GCC(1)Ta GNU ld(1)
+.It sparc64 Ta GCC 4.2.1 Ta GNU ld 2.17.50
+.El
+.Pp
+(1) External toolchain provided by ports/packages.
 .Ss Predefined Macros
 The compiler provides a number of predefined macros.
 Some of these provide architecture-specific details and are explained below.
___
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: r351033 - head/sbin/ping

2019-08-14 Thread Alan Somers
Author: asomers
Date: Wed Aug 14 16:55:06 2019
New Revision: 351033
URL: https://svnweb.freebsd.org/changeset/base/351033

Log:
  ping: Make in_cksum() operate on u_char buffer
  
  This fixes -Wcast-align errors for in_cksum() calls when compiled with
  WARNS=6.
  
  Submitted by: Ján Sučan 
  MFC after:2 weeks
  Sponsored by: Google, inc. (Google Summer of Code 2019)
  Differential Revision:https://reviews.freebsd.org/D21261

Modified:
  head/sbin/ping/ping.c

Modified: head/sbin/ping/ping.c
==
--- head/sbin/ping/ping.c   Wed Aug 14 16:54:51 2019(r351032)
+++ head/sbin/ping/ping.c   Wed Aug 14 16:55:06 2019(r351033)
@@ -209,7 +209,7 @@ static volatile sig_atomic_t siginfo_p;
 static cap_channel_t *capdns;
 
 static void fill(char *, char *);
-static u_short in_cksum(u_short *, int);
+static u_short in_cksum(u_char *, int);
 static cap_channel_t *capdns_setup(void);
 static void check_status(void);
 static void finish(void) __dead2;
@@ -1046,13 +1046,13 @@ pinger(void)
cc = ICMP_MINLEN + phdr_len + datalen;
 
/* compute ICMP checksum here */
-   icp->icmp_cksum = in_cksum((u_short *)icp, cc);
+   icp->icmp_cksum = in_cksum((u_char *)icp, cc);
 
if (options & F_HDRINCL) {
cc += sizeof(struct ip);
ip = (struct ip *)outpackhdr;
ip->ip_len = htons(cc);
-   ip->ip_sum = in_cksum((u_short *)outpackhdr, cc);
+   ip->ip_sum = in_cksum(outpackhdr, cc);
packet = outpackhdr;
}
i = send(ssend, (char *)packet, cc, 0);
@@ -1348,10 +1348,10 @@ pr_pack(char *buf, int cc, struct sockaddr_in *from, s
  * Checksum routine for Internet Protocol family headers (C Version)
  */
 u_short
-in_cksum(u_short *addr, int len)
+in_cksum(u_char *addr, int len)
 {
int nleft, sum;
-   u_short *w;
+   u_char *w;
union {
u_short us;
u_char  uc[2];
@@ -1368,13 +1368,17 @@ in_cksum(u_short *addr, int len)
 * carry bits from the top 16 bits into the lower 16 bits.
 */
while (nleft > 1)  {
-   sum += *w++;
-   nleft -= 2;
+   u_short data;
+
+   memcpy(&data, w, sizeof(data));
+   sum += data;
+   w += sizeof(data);
+   nleft -= sizeof(data);
}
 
/* mop up an odd byte, if necessary */
if (nleft == 1) {
-   last.uc[0] = *(u_char *)w;
+   last.uc[0] = *w;
last.uc[1] = 0;
sum += last.us;
}
___
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: r351030 - head/sbin/ping

2019-08-14 Thread Alan Somers
Author: asomers
Date: Wed Aug 14 16:45:09 2019
New Revision: 351030
URL: https://svnweb.freebsd.org/changeset/base/351030

Log:
  ping: fix triptime calculation after r350998
  
  That revision changed the internal clock to the monotonic, but neglected to
  change the datagram's timestamp source.
  
  Reported by:  Oliver Hartmann, Michael Butler
  Reviewed by:  Ján Sučan , allanjude
  MFC after:2 weeks
  MFC-With: r350998
  Differential Revision:https://reviews.freebsd.org/D21258

Modified:
  head/sbin/ping/ping.c

Modified: head/sbin/ping/ping.c
==
--- head/sbin/ping/ping.c   Wed Aug 14 16:40:23 2019(r351029)
+++ head/sbin/ping/ping.c   Wed Aug 14 16:45:09 2019(r351030)
@@ -760,9 +760,15 @@ main(int argc, char *const *argv)
}
}
 #ifdef SO_TIMESTAMP
-   { int on = 1;
-   if (setsockopt(srecv, SOL_SOCKET, SO_TIMESTAMP, &on, sizeof(on)) < 0)
-   err(EX_OSERR, "setsockopt SO_TIMESTAMP");
+   {
+   int on = 1;
+   int ts_clock = SO_TS_MONOTONIC;
+   if (setsockopt(srecv, SOL_SOCKET, SO_TIMESTAMP, &on,
+   sizeof(on)) < 0)
+   err(EX_OSERR, "setsockopt SO_TIMESTAMP");
+   if (setsockopt(srecv, SOL_SOCKET, SO_TS_CLOCK, &ts_clock,
+   sizeof(ts_clock)) < 0)
+   err(EX_OSERR, "setsockopt SO_TS_CLOCK");
}
 #endif
if (sweepmax) {
___
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: r351028 - head/sys/dev/nvme

2019-08-14 Thread Alexander Motin
Author: mav
Date: Wed Aug 14 16:12:03 2019
New Revision: 351028
URL: https://svnweb.freebsd.org/changeset/base/351028

Log:
  Report NOIOB and NPWG fields as stripe size.
  
  Namespace Optimal I/O Boundary field added in NVMe 1.3 and Namespace
  Preferred Write Granularity added in 1.4 allow upper layers to align
  I/Os for improved SSD performance and endurance.
  
  I don't have hardware reportig those yet, but NPWG could probably be
  reported by bhyve.
  
  MFC after:2 weeks
  Sponsored by: iXsystems, Inc.

Modified:
  head/sys/dev/nvme/nvme_ns.c
  head/sys/dev/nvme/nvme_private.h

Modified: head/sys/dev/nvme/nvme_ns.c
==
--- head/sys/dev/nvme/nvme_ns.c Wed Aug 14 14:31:17 2019(r351027)
+++ head/sys/dev/nvme/nvme_ns.c Wed Aug 14 16:12:03 2019(r351028)
@@ -231,7 +231,11 @@ uint32_t
 nvme_ns_get_stripesize(struct nvme_namespace *ns)
 {
 
-   return (ns->stripesize);
+   if (((ns->data.nsfeat >> NVME_NS_DATA_NSFEAT_NPVALID_SHIFT) &
+   NVME_NS_DATA_NSFEAT_NPVALID_MASK) != 0 && ns->data.npwg != 0) {
+   return ((ns->data.npwg + 1) * nvme_ns_get_sector_size(ns));
+   }
+   return (ns->boundary);
 }
 
 static void
@@ -447,12 +451,12 @@ nvme_ns_bio_process(struct nvme_namespace *ns, struct 
 
bp->bio_driver1 = cb_fn;
 
-   if (ns->stripesize > 0 &&
+   if (ns->boundary > 0 &&
(bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE)) {
num_bios = nvme_get_num_segments(bp->bio_offset,
-   bp->bio_bcount, ns->stripesize);
+   bp->bio_bcount, ns->boundary);
if (num_bios > 1)
-   return (nvme_ns_split_bio(ns, bp, ns->stripesize));
+   return (nvme_ns_split_bio(ns, bp, ns->boundary));
}
 
switch (bp->bio_cmd) {
@@ -511,27 +515,8 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t 
 
ns->ctrlr = ctrlr;
ns->id = id;
-   ns->stripesize = 0;
 
/*
-* Older Intel devices advertise in vendor specific space an alignment
-* that improves performance.  If present use for the stripe size.  NVMe
-* 1.3 standardized this as NOIOB, and newer Intel drives use that.
-*/
-   switch (pci_get_devid(ctrlr->dev)) {
-   case 0x09538086:/* Intel DC PC3500 */
-   case 0x0a538086:/* Intel DC PC3520 */
-   case 0x0a548086:/* Intel DC PC4500 */
-   case 0x0a558086:/* Dell Intel P4600 */
-   if (ctrlr->cdata.vs[3] != 0)
-   ns->stripesize =
-   (1 << ctrlr->cdata.vs[3]) * ctrlr->min_page_size;
-   break;
-   default:
-   break;
-   }
-
-   /*
 * Namespaces are reconstructed after a controller reset, so check
 *  to make sure we only call mtx_init once on each mtx.
 *
@@ -574,6 +559,27 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t 
printf("lba format %d exceeds number supported (%d)\n",
flbas_fmt, ns->data.nlbaf + 1);
return (ENXIO);
+   }
+
+   /*
+* Older Intel devices advertise in vendor specific space an alignment
+* that improves performance.  If present use for the stripe size.  NVMe
+* 1.3 standardized this as NOIOB, and newer Intel drives use that.
+*/
+   switch (pci_get_devid(ctrlr->dev)) {
+   case 0x09538086:/* Intel DC PC3500 */
+   case 0x0a538086:/* Intel DC PC3520 */
+   case 0x0a548086:/* Intel DC PC4500 */
+   case 0x0a558086:/* Dell Intel P4600 */
+   if (ctrlr->cdata.vs[3] != 0)
+   ns->boundary =
+   (1 << ctrlr->cdata.vs[3]) * ctrlr->min_page_size;
+   else
+   ns->boundary = 0;
+   break;
+   default:
+   ns->boundary = ns->data.noiob * nvme_ns_get_sector_size(ns);
+   break;
}
 
if (nvme_ctrlr_has_dataset_mgmt(&ctrlr->cdata))

Modified: head/sys/dev/nvme/nvme_private.h
==
--- head/sys/dev/nvme/nvme_private.hWed Aug 14 14:31:17 2019
(r351027)
+++ head/sys/dev/nvme/nvme_private.hWed Aug 14 16:12:03 2019
(r351028)
@@ -223,7 +223,7 @@ struct nvme_namespace {
uint32_tflags;
struct cdev *cdev;
void*cons_cookie[NVME_MAX_CONSUMERS];
-   uint32_tstripesize;
+   uint32_tboundary;
struct mtx  lock;
 };
 
___
svn-src-head@freebsd.org mailing list
https://li

svn commit: r351027 - head/share/mk

2019-08-14 Thread Andrew Turner
Author: andrew
Date: Wed Aug 14 14:31:17 2019
New Revision: 351027
URL: https://svnweb.freebsd.org/changeset/base/351027

Log:
  Enable BSD_CRTBEGIN on powerpc
  
  In r342974 jhibbits added support to build crtsavres.o. This was the
  blocker for BSD_CRTBEGIN to be enabled there. As such enable this
  option again.
  
  Reviewed by:  jhibbits
  Sponsored by: DARPA, AFRL

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

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Wed Aug 14 13:15:38 2019(r351026)
+++ head/share/mk/src.opts.mk   Wed Aug 14 14:31:17 2019(r351027)
@@ -394,8 +394,8 @@ BROKEN_OPTIONS+=HYPERV
 BROKEN_OPTIONS+=NVME
 .endif
 
-# PowerPC and Sparc64 need extra crt*.o files
-.if ${__T:Mpowerpc*} || ${__T:Msparc64}
+# Sparc64 need extra crt*.o files
+.if ${__T:Msparc64}
 BROKEN_OPTIONS+=BSD_CRTBEGIN
 .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: r351009 - head/sys/compat/linuxkpi/common/include/linux

2019-08-14 Thread Hans Petter Selasky
Author: hselasky
Date: Wed Aug 14 09:36:25 2019
New Revision: 351009
URL: https://svnweb.freebsd.org/changeset/base/351009

Log:
  Implement pci_enable_msi() and pci_disable_msi() in the LinuxKPI.
  This patch makes the DRM graphics driver in ports usable on aarch64.
  
  Submitted by: Greg V 
  Differential Revision:https://reviews.freebsd.org/D21008
  MFC after:1 week
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/linux/device.h
  head/sys/compat/linuxkpi/common/include/linux/interrupt.h
  head/sys/compat/linuxkpi/common/include/linux/pci.h

Modified: head/sys/compat/linuxkpi/common/include/linux/device.h
==
--- head/sys/compat/linuxkpi/common/include/linux/device.h  Wed Aug 14 
06:41:22 2019(r351008)
+++ head/sys/compat/linuxkpi/common/include/linux/device.h  Wed Aug 14 
09:36:25 2019(r351009)
@@ -110,8 +110,8 @@ struct device {
void*driver_data;
unsigned intirq;
 #defineLINUX_IRQ_INVALID   65535
-   unsigned intmsix;
-   unsigned intmsix_max;
+   unsigned intirq_start;
+   unsigned intirq_end;
const struct attribute_group **groups;
struct fwnode_handle *fwnode;
 

Modified: head/sys/compat/linuxkpi/common/include/linux/interrupt.h
==
--- head/sys/compat/linuxkpi/common/include/linux/interrupt.h   Wed Aug 14 
06:41:22 2019(r351008)
+++ head/sys/compat/linuxkpi/common/include/linux/interrupt.h   Wed Aug 14 
09:36:25 2019(r351009)
@@ -55,9 +55,11 @@ struct irq_ent {
 static inline int
 linux_irq_rid(struct device *dev, unsigned int irq)
 {
-   if (irq == dev->irq)
+   /* check for MSI- or MSIX- interrupt */
+   if (irq >= dev->irq_start && irq < dev->irq_end)
+   return (irq - dev->irq_start + 1);
+   else
return (0);
-   return irq - dev->msix + 1;
 }
 
 extern void linux_irq_handler(void *);

Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h
==
--- head/sys/compat/linuxkpi/common/include/linux/pci.h Wed Aug 14 06:41:22 
2019(r351008)
+++ head/sys/compat/linuxkpi/common/include/linux/pci.h Wed Aug 14 09:36:25 
2019(r351009)
@@ -228,6 +228,7 @@ struct pci_dev {
unsigned intdevfn;
uint32_tclass;
uint8_t revision;
+   boolmsi_enabled;
 };
 
 static inline struct resource_list_entry *
@@ -262,7 +263,7 @@ linux_pci_find_irq_dev(unsigned int irq)
spin_lock(&pci_lock);
list_for_each_entry(pdev, &pci_devices, links) {
if (irq == pdev->dev.irq ||
-   (irq >= pdev->dev.msix && irq < pdev->dev.msix_max)) {
+   (irq >= pdev->dev.irq_start && irq < pdev->dev.irq_end)) {
found = &pdev->dev;
break;
}
@@ -424,10 +425,25 @@ pci_disable_msix(struct pci_dev *pdev)
 * linux_pci_find_irq_dev() does no longer see them by
 * resetting their references to zero:
 */
-   pdev->dev.msix = 0;
-   pdev->dev.msix_max = 0;
+   pdev->dev.irq_start = 0;
+   pdev->dev.irq_end = 0;
 }
 
+#definepci_disable_msi(pdev) \
+  linux_pci_disable_msi(pdev)
+
+static inline void
+linux_pci_disable_msi(struct pci_dev *pdev)
+{
+
+   pci_release_msi(pdev->dev.bsddev);
+
+   pdev->dev.irq_start = 0;
+   pdev->dev.irq_end = 0;
+   pdev->irq = pdev->dev.irq;
+   pdev->msi_enabled = false;
+}
+
 unsigned long  pci_resource_start(struct pci_dev *pdev, int bar);
 unsigned long  pci_resource_len(struct pci_dev *pdev, int bar);
 
@@ -562,10 +578,10 @@ pci_enable_msix(struct pci_dev *pdev, struct msix_entr
return avail;
}
rle = linux_pci_get_rle(pdev, SYS_RES_IRQ, 1);
-   pdev->dev.msix = rle->start;
-   pdev->dev.msix_max = rle->start + avail;
+   pdev->dev.irq_start = rle->start;
+   pdev->dev.irq_end = rle->start + avail;
for (i = 0; i < nreq; i++)
-   entries[i].vector = pdev->dev.msix + i;
+   entries[i].vector = pdev->dev.irq_start + i;
return (0);
 }
 
@@ -593,6 +609,32 @@ pci_enable_msix_range(struct pci_dev *dev, struct msix
}
} while (rc);
return (nvec);
+}
+
+#definepci_enable_msi(pdev) \
+  linux_pci_enable_msi(pdev)
+
+static inline int
+pci_enable_msi(struct pci_dev *pdev)
+{
+   struct resource_list_entry *rle;
+   int error;
+   int avail;
+
+   avail = pci_msi_count(pdev->dev.bsddev);
+   if (avail < 1)
+   return -EINVAL;
+
+   avail = 1;  /* this function only enable one MSI IRQ */
+   if ((error = -pci_al