]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
4 years agopmc: restore "unhalted-cycles" alias
Matt Macy [Thu, 15 Aug 2019 21:51:11 +0000 (21:51 +0000)]
pmc: restore "unhalted-cycles" alias

Reported by: mav@

4 years agoping6: Fix alignment errors
Alan Somers [Thu, 15 Aug 2019 19:52:32 +0000 (19:52 +0000)]
ping6: Fix alignment errors

This fixes -Wcast-align errors when compiled with WARNS=6.

Submitted by: Ján Sučan <sucanjan@gmail.com>
MFC after: 2 weeks
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21217

4 years agoping6: fix uninitialized variable warnings when MK_CASPER=no
Alan Somers [Thu, 15 Aug 2019 19:27:36 +0000 (19:27 +0000)]
ping6: fix uninitialized variable warnings when MK_CASPER=no

Submitted by: Ján Sučan <sucanjan@gmail.com>
MFC after: 2 weeks
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21273

4 years agotwsi: Fix build when DEBUG is used on 32bits arch.
Emmanuel Vadot [Thu, 15 Aug 2019 18:59:52 +0000 (18:59 +0000)]
twsi: Fix build when DEBUG is used on 32bits arch.

MFC after: 3 days

4 years agoarm: allwinner: Set aw_ccu to BUS_PASS_BUS
Emmanuel Vadot [Thu, 15 Aug 2019 18:57:48 +0000 (18:57 +0000)]
arm: allwinner: Set aw_ccu to BUS_PASS_BUS

In r350842 I've switched the bus pass to resource so it matches the other
clock drivers but this cannot work as this drivers is meant to match
the dts node '/clocks' and if we don't do it at this pass simplebus is
catching this node and we cannot attach.
This solve booting on Allwinner boards that are still using /clocks (A20 SoC)

MFC after: 3 days

4 years agoAdd missing comma in calendar.freebsd
Kirk McKusick [Thu, 15 Aug 2019 18:46:27 +0000 (18:46 +0000)]
Add missing comma in calendar.freebsd

4 years agogptzfsboot: remove CLANG_NO_IAS
Ed Maste [Thu, 15 Aug 2019 18:43:01 +0000 (18:43 +0000)]
gptzfsboot: remove CLANG_NO_IAS

Many components under stand/ had CLANG_NO_IAS added when Clang's
Integrated Assembler did not handle .codeNN directives.  Clang gained
support quite some time ago, so we can build stand/ with IAS.

In some cases there were small differences in generated object output.
In the case of gptzfsboot however using GNU as or Clang IAS to assemble
gptldr.S resulted in identical final gptzfsboot binary output.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D11115

4 years agostand: remove CLANG_NO_IAS from pxeldr
Ed Maste [Thu, 15 Aug 2019 17:59:22 +0000 (17:59 +0000)]
stand: remove CLANG_NO_IAS from pxeldr

Many components under stand/ had CLANG_NO_IAS added when Clang's
Integrated Assembler (IAS) did not handle .codeNN directives.  Clang
gained support quite some time ago, and we can now build stand/ with
IAS.  In most cases IAS- and GNU as-assembled boot components were
identical, and CLANG_NO_IAS was already removed from other components.

Clang IAS produces different output for some components, including
pxeldr, so CLANG_NO_IAS was not previously removed for those.

In the case of pxeldr the difference is that IAS adds a size override
prefix (67h) to three instructions to specify a 32-bit address, even
though the two high bytes are zero and the address fits in 16 bits.
this wastes three bytes per instruction and causes some additional nop
npadding to be required elsewhere in the object, but pxeboot is not
size-constrained so it doesn't matter.

Sponsored by: The FreeBSD Foundation

4 years agoMFV: r351091
Jung-uk Kim [Thu, 15 Aug 2019 17:43:36 +0000 (17:43 +0000)]
MFV: r351091

Fix the reported boot failures and revert r350510.

Note this commit is effectively merging ACPICA 20190703 again and applying
an upstream patch.

https://github.com/acpica/acpica/commit/73f6372

Tested by: scottl

4 years agortld-elf: fix build with xtoolchain-llvm90
Kyle Evans [Thu, 15 Aug 2019 17:35:24 +0000 (17:35 +0000)]
rtld-elf: fix build with xtoolchain-llvm90

strstr ends up using bcmp when compiled with llvm90; pull it in from libc
as well.

MFC after: 3 days

4 years agostand: remove CLANG_NO_IAS from cdboot
Ed Maste [Thu, 15 Aug 2019 17:32:39 +0000 (17:32 +0000)]
stand: remove CLANG_NO_IAS from cdboot

Many components under stand/ had CLANG_NO_IAS added when Clang's
Integrated Assembler (IAS) did not handle .codeNN directives.  Clang
gained support quite some time ago, and we can now build stand/ with
IAS.  In most cases IAS- and GNU as-assembled boot components were
identical, and CLANG_NO_IAS was already removed from other components.

Clang IAS produces different output for some components, including
cdboot, so CLANG_NO_IAS was not previously removed for those.

In the case of cdboot the difference is that IAS adds a size override
prefix (67h) to many instructions to specify a 32-bit address, even
though the two high bytes are zero.  This wastes three bytes per
instance, but as cdboot is not size-constrained it doesn't matter.
Padding is also different in one case; Clang used two one-byte nops
while GNU as used a single two-byte xchg %eax, %eax.  In any case, there
is no functional change.

Sponsored by:   The FreeBSD Foundation

4 years agoExit interpreter before initializing objects.
Jung-uk Kim [Thu, 15 Aug 2019 17:31:11 +0000 (17:31 +0000)]
Exit interpreter before initializing objects.

https://github.com/acpica/acpica/commit/73f6372

4 years agoping6: Fix data type of the buffer for ancillary data of a received message
Alan Somers [Thu, 15 Aug 2019 17:24:10 +0000 (17:24 +0000)]
ping6: Fix data type of the buffer for ancillary data of a received message

The old code worked, but wasted some stack space.

Submitted by: Ján Sučan <sucanjan@gmail.com>
MFC after: 2 weeks
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21275

4 years agoCatch mkheaders.c up to the removal of counted device support in 2005.
Warner Losh [Thu, 15 Aug 2019 17:21:38 +0000 (17:21 +0000)]
Catch mkheaders.c up to the removal of counted device support in 2005.

mkheaders.c hasn't made headers in ~15 years. Belatedly update the comments to
reflect that all it does these days is warn about 'device foo' lines in the
config where we don't know what a 'foo' is.

Remove extra includes too. These also haven't been needed for 15 years and
weren't removed at the time the comment wasn't updated...

4 years agoRevert r351078, r351085: stand/quad.h eviction
Kyle Evans [Thu, 15 Aug 2019 17:15:32 +0000 (17:15 +0000)]
Revert r351078, r351085: stand/quad.h eviction

It did not go well; further examination is required...

4 years agoSort getopt(3) options and case statements per style(9)
Warner Losh [Thu, 15 Aug 2019 17:06:53 +0000 (17:06 +0000)]
Sort getopt(3) options and case statements per style(9)

Alphebetize the options and cases without regard for case.

4 years agofinish the pcp feature, but documenting it in the man page...
John-Mark Gurney [Thu, 15 Aug 2019 16:58:00 +0000 (16:58 +0000)]
finish the pcp feature, but documenting it in the man page...

4 years agolibc quad.h: one last _STANDALONE correction
Kyle Evans [Thu, 15 Aug 2019 16:28:05 +0000 (16:28 +0000)]
libc quad.h: one last _STANDALONE correction

4 years agoAdd NTB modules to i386 build.
Alexander Motin [Thu, 15 Aug 2019 16:27:04 +0000 (16:27 +0000)]
Add NTB modules to i386 build.

There is no reason why NTB should not be usable on i386 if memory windows
are small enough.

4 years agoFix i386 LINT build after r351056.
Alexander Motin [Thu, 15 Aug 2019 16:22:15 +0000 (16:22 +0000)]
Fix i386 LINT build after r351056.

MFC after: 13 days

4 years agoping6: fix uninitialized variable warning for intvl
Alan Somers [Thu, 15 Aug 2019 16:09:27 +0000 (16:09 +0000)]
ping6: fix uninitialized variable warning for intvl

GCC isn't smart enough to realize that this variable was always initialized.

Submitted by: Ján Sučan <sucanjan@gmail.com>
MFC after: 2 weeks
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21271

4 years agoEnable ACPICA mutex debugging in INVARIANTS case.
Jung-uk Kim [Thu, 15 Aug 2019 16:04:22 +0000 (16:04 +0000)]
Enable ACPICA mutex debugging in INVARIANTS case.

This lets us detect lock order reversal in ACPICA code to avoid deadlock.

4 years agoping6: quiet an undefined variable warning
Alan Somers [Thu, 15 Aug 2019 15:55:01 +0000 (15:55 +0000)]
ping6: quiet an undefined variable warning

GCC 4.2 isn't smart enough to know that this variable is already defined by
the time it's used.

Submitted by: Ján Sučan <sucanjan@gmail.com>
MFC after: 2 weeks
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21269

4 years agoping6: quiet warning about unused copyright variable
Alan Somers [Thu, 15 Aug 2019 15:49:01 +0000 (15:49 +0000)]
ping6: quiet warning about unused copyright variable

Submitted by: Ján Sučan <sucanjan@gmail.com>
MFC after: 2 weeks
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21270

4 years agostand: kick out quad.h
Kyle Evans [Thu, 15 Aug 2019 15:47:48 +0000 (15:47 +0000)]
stand: kick out quad.h

Use quad.h from libc instead for the time being. This reduces the number of
nearly-identical-quad.h we have in tree to two with only minor changes.

Prototypes for some *sh*di3 have been added to match the copy in libkern.
The differences between the two are likely few enough that they can perhaps
be merged with little additional effort to bring us down to 1.

MFC after: 3 days

4 years agoRevert r351076 and r351074 because of atomic_swap_64 on 32-bit platforms
Andriy Gapon [Thu, 15 Aug 2019 15:27:58 +0000 (15:27 +0000)]
Revert r351076 and r351074 because of atomic_swap_64 on 32-bit platforms

Trying to sort it out.

4 years agoMFV r351075: 10406 large_dnode changes broke zfs recv of legacy stream
Andriy Gapon [Thu, 15 Aug 2019 15:11:20 +0000 (15:11 +0000)]
MFV r351075: 10406 large_dnode changes broke zfs recv of legacy stream

illumos/illumos-gate@811964cd9f1fbae0fc3b93d116269e9b1fca090a
https://github.com/illumos/illumos-gate/commit/811964cd9f1fbae0fc3b93d116269e9b1fca090a

https://www.illumos.org/issues/10406
  The large dnode changes from 8423 caused problems in zfs recv for a legacy
  stream. This manifests when attempting to mount the received stream, but the
  problem is in the receive code. We missed the following commit from ZoL which
  fixes this.
  commit da2feb42fb5c7a8c1e1cc67f7a880da9d8e97bc2
  Author: Tom Caputi <tcaputi@datto.com>
  Date: Thu Jun 28 17:55:11 2018 -0400
  Fix 'zfs recv' of non large_dnode send streams
  Currently, there is a bug where older send streams without the
      DMU_BACKUP_FEATURE_LARGE_DNODE flag are not handled correctly.
      The code in receive_object() fails to handle cases where
      drro->drr_dn_slots is set to 0, which is always the case when the
      sending code does not support this feature flag. This patch fixes
      the issue by ensuring that that a value of 0 is treated as
      DNODE_MIN_SLOTS.

Author: Tom Caputi <tcaputi@datto.com>

MFC after: 3 weeks
X-MFC after: r351074

4 years ago10406 large_dnode changes broke zfs recv of legacy stream
Andriy Gapon [Thu, 15 Aug 2019 15:07:17 +0000 (15:07 +0000)]
10406 large_dnode changes broke zfs recv of legacy stream

illumos/illumos-gate@811964cd9f1fbae0fc3b93d116269e9b1fca090a
https://github.com/illumos/illumos-gate/commit/811964cd9f1fbae0fc3b93d116269e9b1fca090a

https://www.illumos.org/issues/10406
  The large dnode changes from 8423 caused problems in zfs recv for a legacy
  stream. This manifests when attempting to mount the received stream, but the
  problem is in the receive code. We missed the following commit from ZoL which
  fixes this.
  commit da2feb42fb5c7a8c1e1cc67f7a880da9d8e97bc2
  Author: Tom Caputi <tcaputi@datto.com>
  Date: Thu Jun 28 17:55:11 2018 -0400
  Fix 'zfs recv' of non large_dnode send streams
  Currently, there is a bug where older send streams without the
      DMU_BACKUP_FEATURE_LARGE_DNODE flag are not handled correctly.
      The code in receive_object() fails to handle cases where
      drro->drr_dn_slots is set to 0, which is always the case when the
      sending code does not support this feature flag. This patch fixes
      the issue by ensuring that that a value of 0 is treated as
      DNODE_MIN_SLOTS.

Author: Tom Caputi <tcaputi@datto.com>

4 years agoMFV r350898: 8423 8199 7432 Implement large_dnode pool feature
Andriy Gapon [Thu, 15 Aug 2019 14:57:27 +0000 (14:57 +0000)]
MFV r350898: 8423 8199 7432 Implement large_dnode pool feature

8423 8199 7432 Implement large_dnode pool feature

8423 Implement large_dnode pool feature
8199 multi-threaded dmu_object_alloc()
7432 Large dnode pool feature

llumos/illumos-gate@54811da5ac6b517992fdc173df5d605e4e61fdc0
https://github.com/illumos/illumos-gate/commit/54811da5ac6b517992fdc173df5d605e4e61fdc0
https://www.illumos.org/issues/8423
https://www.illumos.org/issues/8199
https://www.illumos.org/issues/7432

  ZoL issues:
  Improved dnode allocation #6564
  Clean up large dnode code #6262
  Fix dnode_hold() freeing dnode behavior #8172
  Fix dnode allocation race #6414, #6439
  Partial: Raw sends must be able to decrease nlevels #6821, #6864
  Remove unnecessary txg syncs from receive_object() Closes #7197

This updates FreeBSD large_dnode code (that was imported from ZoL) to a version
that was committed to illumos.  It has some cleanups, improvements and fixes
comparing to what we have in FreeBSD now.  I think that the most significant
update is 8199 multi-threaded dmu_object_alloc().

Obtained from: illumos
MFC after: 3 weeks

4 years agostand: remove CLANG_NO_IAS from boot2
Ed Maste [Thu, 15 Aug 2019 14:54:18 +0000 (14:54 +0000)]
stand: remove CLANG_NO_IAS from boot2

Many components under stand/ had CLANG_NO_IAS added when Clang's
Integrated Assembler (IAS) did not handle .codeNN directives.  Clang
gained support quite some time ago, and we can now build stand/ with
IAS.  In most cases IAS- and GNU as-assembled boot components were
identical, and CLANG_NO_IAS was already removed from other components.

Clang IAS produces different output for some components, including
boot2, so CLANG_NO_IAS was not previously removed for those.

In the case of boot2 the difference is that IAS produces a larger
encoding for one instruction (the testb at the beginning of read).

GNU as produces:

    2e    f6 06 b0 08       80

while IAS includes an address size override prefix (67) and produces:

    2e 67 f6 05 b3 08 00 00 80

This results in three fewer NOPs elsewhere in boot2 but no functional
change, so switch to IAS for boot2.

(We can separately pursue improved 16-bit IAS support with the LLVM
developers.)

Sponsored by: The FreeBSD Foundation

4 years agoImplement new methods for Intel and PLX NTB.
Alexander Motin [Thu, 15 Aug 2019 14:11:11 +0000 (14:11 +0000)]
Implement new methods for Intel and PLX NTB.

This restores parity with AMD NTB driver.  Though without any drivers
supporting more then one peer and respective KPI modification to pass
peer index to most of the calls this addition is pretty useless now.

MFC after: 2 weeks

4 years agoFix rule truncation on external action module unloading.
Andrey V. Elsukov [Thu, 15 Aug 2019 13:44:33 +0000 (13:44 +0000)]
Fix rule truncation on external action module unloading.

Obtained from: Yandex LLC
MFC after: 1 week
Sponsored by: Yandex LLC

4 years agotelnet: remove 3rd clause from Berkeley copyrights
Ed Maste [Thu, 15 Aug 2019 13:27:57 +0000 (13:27 +0000)]
telnet: remove 3rd clause from Berkeley copyrights

Per the July 22, 1999 letter (in /COPYRIGHT) from
William Hoskins
Director, Office of Technology Licensing
University of California, Berkeley

MFC after: 1 week

4 years agodo not enable userland retpoline if not supported by compiler/linker
Ed Maste [Thu, 15 Aug 2019 12:48:17 +0000 (12:48 +0000)]
do not enable userland retpoline if not supported by compiler/linker

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21101

4 years agopf tests: Fix accidental duplication of content
Mateusz Piotrowski [Thu, 15 Aug 2019 12:00:59 +0000 (12:00 +0000)]
pf tests: Fix accidental duplication of content

Some files got their contented duplicated in r345409. Some mistakes where
fixed in r345430. The only file that was left with a duplicated content was
CVE-2019-5598.py.

Reviewed by: kp
Approved by: src (kp)
Differential Revision: https://reviews.freebsd.org/D21267

4 years agoRevert prior change till installworld sorted
Simon J. Gerraty [Thu, 15 Aug 2019 06:00:55 +0000 (06:00 +0000)]
Revert prior change till installworld sorted

4 years agofusefs: fix conditional from r351061
Alan Somers [Thu, 15 Aug 2019 04:47:42 +0000 (04:47 +0000)]
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

4 years agopowerpc/pmap: Enable UMA_MD_SMALL_ALLOC for 64-bit booke
Justin Hibbits [Thu, 15 Aug 2019 03:42:15 +0000 (03:42 +0000)]
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

4 years agoswap_pager.c reserves 2 blocks for a bsd label. Change that 2 to the
Doug Moore [Thu, 15 Aug 2019 02:30:44 +0000 (02:30 +0000)]
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

4 years agoarch.7: be explicit about the future for unmigrated GCC 4.2.1 archs
Ed Maste [Thu, 15 Aug 2019 02:14:44 +0000 (02:14 +0000)]
arch.7: be explicit about the future for unmigrated GCC 4.2.1 archs

Reported by: imp
MFC after: 1 week
MFC with: r351036

4 years agorandom(4): Remove "EXPERIMENTAL" verbiage from concurrent operation
Conrad Meyer [Thu, 15 Aug 2019 00:39:53 +0000 (00:39 +0000)]
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)

4 years agofusefs: fix the 32-bit build after 351042
Alan Somers [Thu, 15 Aug 2019 00:23:03 +0000 (00:23 +0000)]
fusefs: fix the 32-bit build after 351042

Reported by: jhb
MFC after: 2 weeks
MFC-With: 351042
Sponsored by: The FreeBSD Foundation

4 years agoAdd support for PCI Device ID 0x148B in ntb_hw_amd driver.
Alexander Motin [Wed, 14 Aug 2019 22:35:11 +0000 (22:35 +0000)]
Add support for PCI Device ID 0x148B in ntb_hw_amd driver.

Submitted by: Rajesh Kumar <rajesh1.kumar@amd.com>
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D20892

4 years agobsd.files.mk: fix targets to avoid directories
Simon J. Gerraty [Wed, 14 Aug 2019 22:33:46 +0000 (22:33 +0000)]
bsd.files.mk: fix targets to avoid directories

Reintroduce :T when file is used as part of a target name.

Reviewed by: stevek

4 years agoStop listing "on motherboard" as the parent of nexus devices on x86.
John Baldwin [Wed, 14 Aug 2019 22:13:11 +0000 (22:13 +0000)]
Stop listing "on motherboard" as the parent of nexus devices on x86.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D21256

4 years agoMove the common x86 ipmi files to files.x86. The powerpc file list is different
Warner Losh [Wed, 14 Aug 2019 20:58:50 +0000 (20:58 +0000)]
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

4 years agoThe x86 part of hwpmc is shared, so move it to files.x86.
Warner Losh [Wed, 14 Aug 2019 20:58:44 +0000 (20:58 +0000)]
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

4 years agoWindows ndis support is x86 only. Move the MI parts there.
Warner Losh [Wed, 14 Aug 2019 20:58:39 +0000 (20:58 +0000)]
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

4 years agoIntel's isci is part of the chipset, so it is x86 specific.
Warner Losh [Wed, 14 Aug 2019 20:58:34 +0000 (20:58 +0000)]
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

4 years agoMove hyperv to files.x86
Warner Losh [Wed, 14 Aug 2019 20:58:28 +0000 (20:58 +0000)]
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

4 years agoThe bxe driver, QLogic NetXtreme II Ethernet 10Gb PCIe adapter driver, is x86
Warner Losh [Wed, 14 Aug 2019 20:58:23 +0000 (20:58 +0000)]
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

4 years agoThe ACPI parts are identical between i386 and amd64
Warner Losh [Wed, 14 Aug 2019 20:58:17 +0000 (20:58 +0000)]
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

4 years agoMove via padlock files to files.x86.
Warner Losh [Wed, 14 Aug 2019 20:58:12 +0000 (20:58 +0000)]
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

4 years agoApart from one MD file, aesni is common to x86. Move it into files.x86.
Warner Losh [Wed, 14 Aug 2019 20:58:06 +0000 (20:58 +0000)]
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

4 years agoMove all the hp* drivers too files.x86
Warner Losh [Wed, 14 Aug 2019 20:58:01 +0000 (20:58 +0000)]
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

4 years agoMove the identical x86 lines to files.x86
Warner Losh [Wed, 14 Aug 2019 20:57:54 +0000 (20:57 +0000)]
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

4 years agofusefs: Fix the size of fuse_getattr_in
Alan Somers [Wed, 14 Aug 2019 20:45:00 +0000 (20:45 +0000)]
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

4 years agocompiler-rt: enable __bswapsi2/__bswapdi2 for RISC-V
Ed Maste [Wed, 14 Aug 2019 18:41:28 +0000 (18:41 +0000)]
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

4 years agofusefs: fix intermittency in the default_permissions.Unlink.ok test
Alan Somers [Wed, 14 Aug 2019 18:04:04 +0000 (18:04 +0000)]
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

4 years agoPrint few more useful identify fields.
Alexander Motin [Wed, 14 Aug 2019 17:36:26 +0000 (17:36 +0000)]
Print few more useful identify fields.

MFC after: 2 weeks

4 years agoarch.7: clarify that the table shows the default tool chain
Ed Maste [Wed, 14 Aug 2019 17:17:52 +0000 (17:17 +0000)]
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

4 years agoarch.7: add deprecation notice for GCC 4.2.1
Ed Maste [Wed, 14 Aug 2019 17:13:36 +0000 (17:13 +0000)]
arch.7: add deprecation notice for GCC 4.2.1

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

4 years agoarch.7: add tool chain table
Ed Maste [Wed, 14 Aug 2019 17:04:28 +0000 (17:04 +0000)]
arch.7: add tool chain table

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

4 years agoping: Make in_cksum() operate on u_char buffer
Alan Somers [Wed, 14 Aug 2019 16:55:06 +0000 (16:55 +0000)]
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 <sucanjan@gmail.com>
MFC after: 2 weeks
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21261

4 years agoping: fix triptime calculation after r350998
Alan Somers [Wed, 14 Aug 2019 16:45:09 +0000 (16:45 +0000)]
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 <sucanjan@gmail.com>, allanjude
MFC after: 2 weeks
MFC-With: r350998
Differential Revision: https://reviews.freebsd.org/D21258

4 years agoReport NOIOB and NPWG fields as stripe size.
Alexander Motin [Wed, 14 Aug 2019 16:12:03 +0000 (16:12 +0000)]
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.

4 years agoEnable BSD_CRTBEGIN on powerpc
Andrew Turner [Wed, 14 Aug 2019 14:31:17 +0000 (14:31 +0000)]
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

4 years agoImplement pci_enable_msi() and pci_disable_msi() in the LinuxKPI.
Hans Petter Selasky [Wed, 14 Aug 2019 09:36:25 +0000 (09:36 +0000)]
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 <greg@unrelenting.technology>
Differential Revision: https://reviews.freebsd.org/D21008
MFC after: 1 week
Sponsored by: Mellanox Technologies

4 years agoAdd missing break statements in r351004.
Alexander Motin [Wed, 14 Aug 2019 02:02:14 +0000 (02:02 +0000)]
Add missing break statements in r351004.

Surprisingly code still worked, but thanks imp@ for noticing it.

MFC after: 1 week

4 years agogeom_uzip(4), mkuzip(8): Add Zstd image mode
Conrad Meyer [Tue, 13 Aug 2019 23:32:56 +0000 (23:32 +0000)]
geom_uzip(4), mkuzip(8): Add Zstd image mode

The Zstd format bumps the CLOOP major number to 4 to avoid incompatibility
with older systems.  Support in geom_uzip(4) is conditional on the ZSTDIO
kernel option, which is enabled in amd64 GENERIC, but not all in-tree
configurations.

mkuzip(8) was modified slightly to always initialize the nblocks + 1'th
offset in the CLOOP file format.  Previously, it was only initialized in the
case where the final compressed block happened to be unaligned w.r.t.
DEV_BSIZE.  The "Fake" last+1 block change in r298619 means that the final
compressed block's 'blen' was never correct unless the compressed uzip image
happened to be BSIZE-aligned.  This happened in about 1 out of every 512
cases.  The zlib and lzma decompressors are probably tolerant of extra trash
following the frame they were told to decode, but Zstd complains that the
input size is incorrect.

Correspondingly, geom_uzip(4) was modified slightly to avoid trashing the
nblocks + 1'th offset when it is known to be initialized to a good value.
This corrects the calculated final real cluster compressed length to match
that printed by mkuzip(8).

mkuzip(8) was refactored somewhat to reduce code duplication and increase
ease of adding other compression formats.

  * Input block size validation was pulled out of individual compression
    init routines into main().

  * Init routines now validate a user-provided compression level or select
    an algorithm-specific default, if none was provided.

  * A new interface for calculating the maximal compressed size of an
    incompressible input block was added for each driver.  The generic code
    uses it to validate against MAXPHYS as well as to allocate compression
    result buffers in the generic code.

  * Algorithm selection is now driven by a table lookup, to increase ease of
    adding other formats in the future.

mkuzip(8) gained the ability to explicitly specify a compression level with
'-C'.  The prior defaults -- 9 for zlib and 6 for lzma -- are maintained.
The new zstd default is 9, to match zlib.

Rather than select lzma or zlib with '-L' or its absense, respectively, a
new argument '-A <algorithm>' is provided to select 'zlib', 'lzma', or
'zstd'.  '-L' is considered deprecated, but will probably never be removed.

All of the new features were documented in mkuzip.8; the page was also
cleaned up slightly.

Relnotes: yes

4 years agoMake nvd(4) report NGUID or EUI64 as GEOM::lunid.
Alexander Motin [Tue, 13 Aug 2019 21:49:07 +0000 (21:49 +0000)]
Make nvd(4) report NGUID or EUI64 as GEOM::lunid.

With support for multiple namespaces and multiple ports in NVMe there is
now a need for reliable unique namespace identification alike to SCSI.

MFC after: 1 weeks
Sponsored by: iXsystems, Inc.

4 years agoFix build with DRM and INVARIANTS enabled.
John Baldwin [Tue, 13 Aug 2019 21:15:59 +0000 (21:15 +0000)]
Fix build with DRM and INVARIANTS enabled.

The DRM drivers use the lockdep assertion macros with spinlock_t locks
which are backed by mutexes, not sx locks.  This causes compile
failures since you can't use sx_assert with a mutex.  Instead, change
the lockdep macros to use lock_class methods.  This works by assuming
that each LinuxKPI locking primitive embeds a FreeBSD lock as its
first structure and uses a cast to get to the underlying 'struct
lock_object'.

Reviewed by: hselasky
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D20992

4 years agoClarify comment that describes how the FS_METACKHASH is managed.
Kirk McKusick [Tue, 13 Aug 2019 20:56:44 +0000 (20:56 +0000)]
Clarify comment that describes how the FS_METACKHASH is managed.

MFC after: 3 days

4 years agoRemove deprecated GEOM classes
Conrad Meyer [Tue, 13 Aug 2019 20:06:55 +0000 (20:06 +0000)]
Remove deprecated GEOM classes

Follow-up on r322318 and r322319 and remove the deprecated modules.

Shift some now-unused kernel files into userspace utilities that incorporate
them.  Remove references to removed GEOM classes in userspace utilities.

Reviewed by: imp (earlier version)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D21249

4 years agosys/{x86,amd64}: remove one of doubled ;s
Ed Maste [Tue, 13 Aug 2019 19:39:36 +0000 (19:39 +0000)]
sys/{x86,amd64}: remove one of doubled ;s

MFC after: 1 week

4 years agoping: use the monotonic clock to measure durations
Alan Somers [Tue, 13 Aug 2019 19:27:23 +0000 (19:27 +0000)]
ping: use the monotonic clock to measure durations

Submitted by: Ján Sučan <sucanjan@gmail.com>
MFC after: 2 weeks
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21245

4 years agoping6: use the monotonic clock to measure durations
Alan Somers [Tue, 13 Aug 2019 19:24:17 +0000 (19:24 +0000)]
ping6: use the monotonic clock to measure durations

Submitted by: Ján Sučan <sucanjan@gmail.com>
MFC after: 2 weeks
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21226

4 years agoping: fix data type of a variable for a packet sequence number
Alan Somers [Tue, 13 Aug 2019 16:25:23 +0000 (16:25 +0000)]
ping: fix data type of a variable for a packet sequence number

Submitted by: Ján Sučan <sucanjan@gmail.com>
MFC after: 2 weeks
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21244

4 years agoConsistently use the byteorder functions in the correct direction
Alan Somers [Tue, 13 Aug 2019 16:22:43 +0000 (16:22 +0000)]
Consistently use the byteorder functions in the correct direction

Though ntohs and htons are functionally identical, they have different meanings.Using the correct one helps to document the code.

Submitted by: Ján Sučan <sucanjan@gmail.com>
MFC after: 2 weeks
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21219

4 years agofusefs: skip some tests when unsafe aio is disabled
Alan Somers [Tue, 13 Aug 2019 15:52:28 +0000 (15:52 +0000)]
fusefs: skip some tests when unsafe aio is disabled

MFC after:      15 days
MFC-With:       r350665
Sponsored by:   The FreeBSD Foundation

4 years agor350976 accidentally removed nvram device. Restore it.
Warner Losh [Tue, 13 Aug 2019 15:50:47 +0000 (15:50 +0000)]
r350976 accidentally removed nvram device. Restore it.

4 years agofusefs: add SVN Keywords to the test files
Alan Somers [Tue, 13 Aug 2019 15:49:40 +0000 (15:49 +0000)]
fusefs: add SVN Keywords to the test files

Reported by: SVN pre-commit hooks
MFC after: 15 days
MFC-With: r350665
Sponsored by: The FreeBSD Foundation

4 years agoRemove some more leftover rlogin man page xrefs
Ed Maste [Tue, 13 Aug 2019 15:41:36 +0000 (15:41 +0000)]
Remove some more leftover rlogin man page xrefs

rcmds were removed in r32435 and these three man pages can trivially
drop the references.

There's still a reference in pts.4 because it describes a mode
(TIOCPKT_NOSTOP), and only lists rlogin/rlogind as examples of programs
that use that mode.  To update later.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

4 years agoAdd PNP_INFO to the gpiopps driver.
Ian Lepore [Tue, 13 Aug 2019 15:38:05 +0000 (15:38 +0000)]
Add PNP_INFO to the gpiopps driver.

4 years agoping6: Fix data type of a variable for a packet sequence number
Alan Somers [Tue, 13 Aug 2019 15:30:29 +0000 (15:30 +0000)]
ping6: Fix data type of a variable for a packet sequence number

Submitted by:   Ján Sučan <sucanjan@gmail.com>
MFC after:      2 weeks
Sponsored by:   Google, inc. (Google Summer of Code 2019)
Differential Revision:  https://reviews.freebsd.org/D21218

4 years agoFlowtables were removed in r321618, remove stray reference here.
Warner Losh [Tue, 13 Aug 2019 15:28:22 +0000 (15:28 +0000)]
Flowtables were removed in r321618, remove stray reference here.

4 years agovx(4) was removed in r347921. Remove stray reference.
Warner Losh [Tue, 13 Aug 2019 15:28:18 +0000 (15:28 +0000)]
vx(4) was removed in r347921. Remove stray reference.

4 years agonsp(4) was removed in r339571. Remove stray reference.
Warner Losh [Tue, 13 Aug 2019 15:28:11 +0000 (15:28 +0000)]
nsp(4) was removed in r339571. Remove stray reference.

4 years agocrunch: remove rsh and rlogin from example config file
Ed Maste [Tue, 13 Aug 2019 15:23:14 +0000 (15:23 +0000)]
crunch: remove rsh and rlogin from example config file

rcmds removed in r324351.

Historical references in the README are maintained.  There's a paragraph
describing a "980K crunched 'fixit'" that references rsh and rlogin.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

4 years agofe(4) driver has been removed from the tree in r347914. Remove stray reference.
Warner Losh [Tue, 13 Aug 2019 15:16:42 +0000 (15:16 +0000)]
fe(4) driver has been removed from the tree in r347914. Remove stray reference.

4 years agoRegen src.conf.5 after r350980 (remove rsh/rlogin references)
Ed Maste [Tue, 13 Aug 2019 14:57:04 +0000 (14:57 +0000)]
Regen src.conf.5 after r350980 (remove rsh/rlogin references)

Also pick up changes to LLVM_TARGET_RISCV, NAND, NVME, OPENM

Sponsored by: The FreeBSD Foundation

4 years agoRemove rlogin/rsh references from src.conf(5) WITHOUT_BLACKLIST_SUPPORT
Ed Maste [Tue, 13 Aug 2019 14:51:16 +0000 (14:51 +0000)]
Remove rlogin/rsh references from src.conf(5) WITHOUT_BLACKLIST_SUPPORT

rcmds were removed in r324351

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

4 years agoRemove rsh/rlogin references from security man page
Ed Maste [Tue, 13 Aug 2019 14:47:24 +0000 (14:47 +0000)]
Remove rsh/rlogin references from security man page

More extensive changes to this page are certainly needed, but at least
remove references to binaries that no longer exist.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

4 years agonvme has been moved to 'files' so shouldn't be here anymore. It works on
Warner Losh [Tue, 13 Aug 2019 13:41:46 +0000 (13:41 +0000)]
nvme has been moved to 'files' so shouldn't be here anymore. It works on
powerpc64 and arm64 these days as well as amd64/i386.

4 years agoed(4) has been removed from the tree, but these were forgotten in r347911.
Warner Losh [Tue, 13 Aug 2019 13:28:12 +0000 (13:28 +0000)]
ed(4) has been removed from the tree, but these were forgotten in r347911.

4 years agoSave ip_ttl value and restore it after checksum calculation.
Andrey V. Elsukov [Tue, 13 Aug 2019 12:47:53 +0000 (12:47 +0000)]
Save ip_ttl value and restore it after checksum calculation.

Since ipvoly is used for checksum calculation, part of original IP
header is zeroed. This part includes ip_ttl field, that can be used
later in IP_MINTTL socket option handling.

PR: 239799
MFC after: 1 week

4 years agoPlace back in the dependency on HPTS via module depends versus
Randall Stewart [Tue, 13 Aug 2019 12:41:15 +0000 (12:41 +0000)]
Place back in the dependency on HPTS via module depends versus
a fatal error in compiling. This was taken out by mistake
when I mis-merged from the 18q22p2 sources of rack in NF. Opps.

Reported by: sbruno

4 years agoMove scheduler state into the per-cpu area where it can be allocated on the
Jeff Roberson [Tue, 13 Aug 2019 04:54:02 +0000 (04:54 +0000)]
Move scheduler state into the per-cpu area where it can be allocated on the
correct NUMA domain.

Reviewed by: markj, gallatin
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D19315

4 years agoFix the driver name in ads111x.4, and hook the manpage up to the build.
Ian Lepore [Tue, 13 Aug 2019 03:49:53 +0000 (03:49 +0000)]
Fix the driver name in ads111x.4, and hook the manpage up to the build.

The driver was originally written with the name ads1115, but at the last
minute it got renamed to ads111x to reflect its support for many related
chips, but I forgot to update the manpage to match the renaming before
committing it all.

4 years agoAdd deprecation notice to snd_maestro(4).
Pedro F. Giffuni [Tue, 13 Aug 2019 01:25:07 +0000 (01:25 +0000)]
Add deprecation notice to snd_maestro(4).

As suggested in:
https://wiki.freebsd.org/WhatsGoing/FreeBSD13

this old driver is buggy and no one is working on it so we should deprecate
it for the next release.

MFC after: 3 days
Diferential Revision: https://reviews.freebsd.org/D21139