]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoAddress some (although not all) style(9) issues in event.h after r335776.
dab [Wed, 11 Jul 2018 02:09:11 +0000 (02:09 +0000)]
Address some (although not all) style(9) issues in event.h after r335776.

Reported by: bde@
MFC after: 1 day
Sponsored by: Dell EMC

5 years agoacpidump(8): Add ACPI LPIT (Low Power Idle Table)
bwidawsk [Wed, 11 Jul 2018 01:37:01 +0000 (01:37 +0000)]
acpidump(8): Add ACPI LPIT (Low Power Idle Table)

The LPIT is the part of the "standardized" way that one can enumerate
various power state information on Intel platforms.

The documentation for this change can be found here:
http://www.uefi.org/sites/default/files/resources/Intel_ACPI_Low_Power_S0_Idle.pdf

Reviewed By: jhb
Approved By: jhb
Differential Revision: https://reviews.freebsd.org/D15931

5 years agonet80211: Fix ifdetach w/o ifattach, small whitespace cleanup
kevans [Tue, 10 Jul 2018 23:30:19 +0000 (23:30 +0000)]
net80211: Fix ifdetach w/o ifattach, small whitespace cleanup

As the comment says, ifdetach might be called during the course of driver
detach if initialization failed. This shouldn't be a total failure, though,
we just have nothing to do there.

This has been modified slightly from Augustin's original commit to move the
bail-out slightly earlier since the ic wouldn't have been added to the
ic list in the first place, and a comment has been added describing when
this might be an issue.

Submitted by: Augustin Cavalier <waddlesplash@gmail.com>
Obtained from: Haiku (e6f6c1b4633532a8ad37c803dc7c65601e5b24ba)

5 years agoUpdate the pnfs(4) man page.
rmacklem [Tue, 10 Jul 2018 22:53:07 +0000 (22:53 +0000)]
Update the pnfs(4) man page.

This is a content change.

5 years agoRemove bits of the old NUMA.
kib [Tue, 10 Jul 2018 22:00:20 +0000 (22:00 +0000)]
Remove bits of the old NUMA.

Remove numactl(1), edit numa(4) to bring it some closer to reality,
provide libc ABI shims for old NUMA syscalls.

Noted and reviewed by: brooks (previous version)
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D16142

5 years agoFix parsing of create-kernel-packages
bdrewery [Tue, 10 Jul 2018 21:20:49 +0000 (21:20 +0000)]
Fix parsing of create-kernel-packages

MFC after: 3 days
Reported by: rene

5 years agoFix up some missed and mis-merges from the sequential scan code
sef [Tue, 10 Jul 2018 20:11:32 +0000 (20:11 +0000)]
Fix up some missed and mis-merges from the sequential scan code
(r334844). Most of the changes involve moving some code around to
reduce conflicts with future merges.  One of the missing changes
included a notification on scrub cancellation.

Approved by: mav
Sponsored by: iXsystems Inc

5 years agoDocument the "-f" option added to pnfsdskill(8) by r336176.
rmacklem [Tue, 10 Jul 2018 18:44:44 +0000 (18:44 +0000)]
Document the "-f" option added to pnfsdskill(8) by r336176.

This is a content change.

5 years agoAdd a "-f" option to pnfsdskill(8) to force disabling of a DS.
rmacklem [Tue, 10 Jul 2018 18:41:16 +0000 (18:41 +0000)]
Add a "-f" option to pnfsdskill(8) to force disabling of a DS.

The pnfsdskill(8) command will normally fail if there is no valid mirror
for the DS to be disabled. However, a system administrator may need to
disable a DS which does not have a valid mirror so that the nfsd threads
can be terminated. This patch adds a "-f" option to pnfsdskill(8) that
uses the kernel changes made by r336141 to implement this "forced" case
of disabling a DS.
This patch only affects the pNFS server.

5 years agoEliminate unnecessary differences between i386's pmap_enter() and amd64's.
alc [Tue, 10 Jul 2018 18:00:55 +0000 (18:00 +0000)]
Eliminate unnecessary differences between i386's pmap_enter() and amd64's.
For example, fully construct the new PTE before entering the critical
section.  This change is a stepping stone to psind == 1 support on i386.

Reviewed by: kib, markj
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D16188

5 years agoFix thread state summary line display after r334918.
markj [Tue, 10 Jul 2018 17:20:27 +0000 (17:20 +0000)]
Fix thread state summary line display after r334918.

5 years agoCorrect the identifier for the Unifi Security Gateway
jhibbits [Tue, 10 Jul 2018 17:01:19 +0000 (17:01 +0000)]
Correct the identifier for the Unifi Security Gateway

The USG is really E120, not E110.

5 years agoRegen after r336171.
brooks [Tue, 10 Jul 2018 14:04:52 +0000 (14:04 +0000)]
Regen after r336171.

5 years agoGet rid of netbsd_lchown and netbsd_msync syscall entries.
brooks [Tue, 10 Jul 2018 13:32:04 +0000 (13:32 +0000)]
Get rid of netbsd_lchown and netbsd_msync syscall entries.

No valid FreeBSD binary very called them (they would call lchown and
msync directly) and we haven't supported NetBSD binaries in ages.

This is a respin of r335983 with a workaround for the ancient BFD linker
in the libc stubs.

Reviewed by: kib
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D16193

5 years agoUse uintptr_t alone when assigning to kvaddr_t variables.
brooks [Tue, 10 Jul 2018 13:03:06 +0000 (13:03 +0000)]
Use uintptr_t alone when assigning to kvaddr_t variables.

Suggested by: jhb

5 years agoA direct call to echo was intruduced in r333407, which made messages
garga [Tue, 10 Jul 2018 11:33:37 +0000 (11:33 +0000)]
A direct call to echo was intruduced in r333407, which made messages
to be displayed when make is called with -s.  Replace it by ${ECHO}.

Reviewed by: brd, bdrewery
Approved by: brd, bdrewery
Sponsored by: Rubicon Communications, LLC (Netgate)
Differential Revision: https://reviews.freebsd.org/D16195

5 years agoAdd support for printing the TCP FO client-side cookie cache via the
tuexen [Tue, 10 Jul 2018 10:50:43 +0000 (10:50 +0000)]
Add support for printing the TCP FO client-side cookie cache via the
sysctl interface. This is similar to the TCP host cache.

Reviewed by: pkelsey@, kbowling@
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D14554

5 years agoUse appropriate MSS value when populating the TCP FO client cookie cache
tuexen [Tue, 10 Jul 2018 10:42:48 +0000 (10:42 +0000)]
Use appropriate MSS value when populating the TCP FO client cookie cache

When a client receives a SYN-ACK segment with a TFP fast open cookie,
but without an MSS option, an MSS value from uninitialised stack memory is used.
This patch ensures that in case no MSS option is included in the SYN-ACK,
the appropriate value as given in RFC 7413 is used.

Reviewed by: kbowling@
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D16175

5 years agoFix build broken by r336130
wma [Tue, 10 Jul 2018 09:49:27 +0000 (09:49 +0000)]
Fix build broken by r336130

Add ifdef's to compile parts of pci_host_generic only on armv8

5 years agoRemoved pointless NULL check
smh [Tue, 10 Jul 2018 08:05:32 +0000 (08:05 +0000)]
Removed pointless NULL check

Removed pointless NULL check after malloc with M_WAITOK which can never
return NULL.

Sponsored by: Multiplay

5 years agoFix vertical whitespace nit in cxgbe.
np [Tue, 10 Jul 2018 06:09:25 +0000 (06:09 +0000)]
Fix vertical whitespace nit in cxgbe.

5 years agoFix style(9) space and tab.
araujo [Tue, 10 Jul 2018 05:36:32 +0000 (05:36 +0000)]
Fix style(9) space and tab.

5 years agotop(1): rollback r335836
daichi [Tue, 10 Jul 2018 03:49:48 +0000 (03:49 +0000)]
top(1): rollback r335836

Encoding-specific processing introduced in r335836 is not recommended.
And doing getenv("LANG") and assuming an encoding based on it is a
very bad practice to internationalize software.

Submitted by: hrs
Differential Revision: https://reviews.freebsd.org/D16203

5 years agocxgbe(4): Add a sysctl to report the chip's microprocessor's load
np [Tue, 10 Jul 2018 03:03:10 +0000 (03:03 +0000)]
cxgbe(4): Add a sysctl to report the chip's microprocessor's load
averages.  This works with debug or custom firmwares only.

sysctl dev.<nexus>.<instance>.loadavg
sysctl dev.t6nex.0.loadavg

MFC after: 1 month
Sponsored by: Chelsio Communications

5 years agokern_environment: bool'itize dynamic_kenv; fix small style(9) nit
kevans [Tue, 10 Jul 2018 02:43:22 +0000 (02:43 +0000)]
kern_environment: bool'itize dynamic_kenv; fix small style(9) nit

5 years agoUse endian.h le32dec() instead of rolling our own.
delphij [Tue, 10 Jul 2018 01:42:28 +0000 (01:42 +0000)]
Use endian.h le32dec() instead of rolling our own.

Suggested by: phk
Reviewed by: imp, pfg
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D16192

5 years agosubr_hints: Skip static_env and static_hints if they don't contain hints
kevans [Tue, 10 Jul 2018 00:36:37 +0000 (00:36 +0000)]
subr_hints: Skip static_env and static_hints if they don't contain hints

This is possible because, well, they're static. Both the dynamic environment
and the MD-environment (generally loader(8) environment) can potentially
have room for new variables to be set, and thus do not receive this
treatment.

5 years agosubr_hints: Convert some bool-like ints to bools
kevans [Tue, 10 Jul 2018 00:34:19 +0000 (00:34 +0000)]
subr_hints: Convert some bool-like ints to bools

5 years agosubr_hints: Use goto/label instead of series of conditionals
kevans [Tue, 10 Jul 2018 00:33:31 +0000 (00:33 +0000)]
subr_hints: Use goto/label instead of series of conditionals

5 years agoRemove redundant space.
cy [Tue, 10 Jul 2018 00:26:13 +0000 (00:26 +0000)]
Remove redundant space.

MFC after: 3 days

5 years agotop(1): Fix the prompt bug and core dump problem in o / p mode that occurred by r336028
daichi [Tue, 10 Jul 2018 00:19:52 +0000 (00:19 +0000)]
top(1): Fix the prompt bug and core dump problem in o / p mode that occurred by r336028

Reviewed by: cy
Approved by: gnn (mentor)
Differential Revision: https://reviews.freebsd.org/D16174

5 years agoFix pre-SI_SUB_CPU initialization of per-CPU counters.
markj [Tue, 10 Jul 2018 00:18:12 +0000 (00:18 +0000)]
Fix pre-SI_SUB_CPU initialization of per-CPU counters.

r336020 introduced pcpu_page_alloc(), replacing page_alloc() as the
backend allocator for PCPU UMA zones.  Unlike page_alloc(), it does
not honour malloc(9) flags such as M_ZERO or M_NODUMP, so fix that.

r336020 also changed counter(9) to initialize each counter using a
CPU_FOREACH() loop instead of an SMP rendezvous.  Before SI_SUB_CPU,
smp_rendezvous() will only execute the callback on the current CPU
(i.e., CPU 0), so only one counter gets zeroed.  The rest are zeroed
by virtue of the fact that UMA gratuitously zeroes slabs when importing
them into a zone.

Prior to SI_SUB_CPU, all_cpus is clear, so with r336020 we weren't
zeroing vm_cnt counters during boot: the CPU_FOREACH() loop had no
effect, and pcpu_page_alloc() didn't honour M_ZERO.  Fix this by
iterating over the full range of CPU IDs when zeroing counters,
ignoring whether the corresponding bits in all_cpus are set.

Reported and tested by: pho (previous version)
Reviewed by: kib (previous version)
Differential Revision: https://reviews.freebsd.org/D16190

5 years agoTweak documentation to RB_ constants to reflect current use
imp [Tue, 10 Jul 2018 00:01:14 +0000 (00:01 +0000)]
Tweak documentation to RB_ constants to reflect current use

RB_ASKNAME is no longer instructions to the boot loader to request a
prompt for which kernel to boot. Instead, it asks for what the root
file system to use. RB_INITNAME is unused, and never has been in
FreeBSD as far as I can tell. Remove it from the documentation and fix
comment. RB_SELFTEST and RB_MINIROOT likewise (though they were
completely undocumented). These last three constants can likely just
be deleted as nothing references them (even to set useless bits).

RB_ASKNAME doesn't actually survive reboot, however, so needs to be
communicated to the bootloader via other means. If the bootloader sets
it, though, it will be honored.

5 years agolocaledef(1): remove duplicated includes.
pfg [Mon, 9 Jul 2018 20:38:47 +0000 (20:38 +0000)]
localedef(1): remove duplicated includes.

Hinted by: DragonFlyBSD

5 years agopowerpc/powernv: Make opal_i2c driver work with attached i2c drivers
jhibbits [Mon, 9 Jul 2018 20:33:48 +0000 (20:33 +0000)]
powerpc/powernv: Make opal_i2c driver work with attached i2c drivers

* FreeBSD stores addresses in 8 bit format, but the OPAL API requires the 7-bit
  address, and encodes the direction elsewhere.  Behave like other i2c drivers,
  and shift accordingly.
* The OPAL API can already handle multiple requests in flight.  Change the async
  token to be private to the thread, so as not to stomp across i2c accesses,
  remove the limitation error message, and use the correct message index to
  transfer all messages in the list.
* Micro-optimize the async handler to not continuously call pmap_kextract() when
  spin-waiting for the operation to complete.

This has been tested by hexdumping an EEPROM attached via the icee(4) driver.

5 years agosed(1): Suppress implicit-fallthrough.
pfg [Mon, 9 Jul 2018 20:27:31 +0000 (20:27 +0000)]
sed(1): Suppress implicit-fallthrough.

Apparently some tools are not able to determine if all the cases of a
switch are covered. Make use of the attribute for cases like this.

Hinted by: DragonFlyBSD GGC8 (but fixed differently)

CID: 976552

5 years agoig4(4): add devmatch(8) PNP info
gonzo [Mon, 9 Jul 2018 20:00:45 +0000 (20:00 +0000)]
ig4(4): add devmatch(8) PNP info

Now that we have all devices ids in a table add MODULE_PNP_INFO macro
to let devmatch autoload module

5 years agoAdd support for a "forced" pnfsdskill to the pNFS server kernel code.
rmacklem [Mon, 9 Jul 2018 19:58:01 +0000 (19:58 +0000)]
Add support for a "forced" pnfsdskill to the pNFS server kernel code.

The pnfsdskill(8) command will normally fail if there is no valid mirror
for the DS to be disabled. However, a system administrator may need to
disable a DS which does not have a valid mirror so that the nfsd threads
can be terminated. This patch adds the kernel code needed by pnfsdskill(8)
to implement this "forced" case of disabling a DS.
This patch only affects the pNFS server.

5 years agotruncate: Add support for -s % and /
manu [Mon, 9 Jul 2018 19:03:30 +0000 (19:03 +0000)]
truncate: Add support for -s % and /

% round up to the multiple size and / round down
This is compatible with gnu truncate.
Add tests and document in the man page.

5 years agotruncate: style(9) some parts
manu [Mon, 9 Jul 2018 19:02:05 +0000 (19:02 +0000)]
truncate: style(9) some parts

5 years agoAdd pnp info to the imx_spi driver.
ian [Mon, 9 Jul 2018 19:00:39 +0000 (19:00 +0000)]
Add pnp info to the imx_spi driver.

5 years agoAdd a manpage for the imx_spi driver.
ian [Mon, 9 Jul 2018 19:00:13 +0000 (19:00 +0000)]
Add a manpage for the imx_spi driver.

5 years agoRemove gateworks nanobsd support.
imp [Mon, 9 Jul 2018 18:02:35 +0000 (18:02 +0000)]
Remove gateworks nanobsd support.

A quick test of this shows multiple problems. Rather than fix the
problems, just retire this board's support. It's for a 12 year old
board that's been out of production for at least 7 years and generally
lacks the memory to run even a stripped down NanoBSD image well. It's
not really relevant anymore.

5 years agoRemove armeb from the list of architectures we build for the boot
imp [Mon, 9 Jul 2018 18:02:23 +0000 (18:02 +0000)]
Remove armeb from the list of architectures we build for the boot
laoder testing scripts. It just adds to the build time, and will be
retired soon anyway, per discussions in freebsd-arch@ last month.

5 years agoAdd missing generated header file.
ian [Mon, 9 Jul 2018 14:18:03 +0000 (14:18 +0000)]
Add missing generated header file.

Reported by: Julian H. Stacey <jhs@berklix.com>

5 years agoAdd "record-state", "set-limit" and "defer-action" rule options to ipfw.
ae [Mon, 9 Jul 2018 11:35:18 +0000 (11:35 +0000)]
Add "record-state", "set-limit" and "defer-action" rule options to ipfw.

"record-state" is similar to "keep-state", but it doesn't produce implicit
O_PROBE_STATE opcode in a rule. "set-limit" is like "limit", but it has the
same feature as "record-state", it is single opcode without implicit
O_PROBE_STATE opcode. "defer-action" is targeted to be used with dynamic
states. When rule with this opcode is matched, the rule's action will
not be executed, instead dynamic state will be created. And when this
state will be matched by "check-state", then rule action will be executed.
This allows create a more complicated rulesets.

Submitted by: lev
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D1776

5 years agoDeduplicate the code.
ae [Mon, 9 Jul 2018 11:03:28 +0000 (11:03 +0000)]
Deduplicate the code.

Add generic function if_tunnel_check_nesting() that does check for
allowed nesting level for tunneling interfaces and also does loop
detection. Use it in gif(4), gre(4) and me(4) interfaces.

Differential Revision: https://reviews.freebsd.org/D16162

5 years agoARM64: Add quirk mechanism to pci_host_generic_acpi
wma [Mon, 9 Jul 2018 09:00:16 +0000 (09:00 +0000)]
ARM64: Add quirk mechanism to pci_host_generic_acpi

Add few quirks which are necessary to use AHCI on ThX2

Submitted by:          Patryk Duda <pdk@semihalf.com>
Obtained from:         Semihalf
Sponsored by:          Cavium
Differential revision: https://reviews.freebsd.org/D15929

5 years agoARM64: Add support for ThunderX2 PCIe
wma [Mon, 9 Jul 2018 08:55:07 +0000 (08:55 +0000)]
ARM64: Add support for ThunderX2 PCIe

Submitted by:          Patryk Duda <pdk@semihalf.com>
Obtained from:         Semihalf
Sponsored by:          Cavium
Differential revision: https://reviews.freebsd.org/D15141

5 years agoARM64: Add ThunderX2 CPU revision macro. Add ThunderX2 name in identcpu.c
wma [Mon, 9 Jul 2018 08:41:54 +0000 (08:41 +0000)]
ARM64: Add ThunderX2 CPU revision macro. Add ThunderX2 name in identcpu.c

Submitted by:          Patryk Duda <pdk@semihalf.com>
Obtained from:         Semihalf
Sponsored by:          Cavium

5 years agogzip(1): Don't shadow global 'err'
cem [Mon, 9 Jul 2018 08:37:55 +0000 (08:37 +0000)]
gzip(1): Don't shadow global 'err'

Unbreak work build on ppc due to -Werror=shadow.  Introduced in r336121.

X-MFC-With: r336121

5 years agoIntegrate SHA2-224 with userspace components
cem [Mon, 9 Jul 2018 08:19:04 +0000 (08:19 +0000)]
Integrate SHA2-224 with userspace components

The double compilation of the kernel sources in libmd and libcrypt is
baffling, but add yet another define hack to prevent duplicate symbols.

Add documentation and SHA2-224 test cases to libmd.

Integrate with the md5(1) command, document, and add more test cases;
self-tests pass.

5 years agoOCF: Add plain hash modes
cem [Mon, 9 Jul 2018 07:28:13 +0000 (07:28 +0000)]
OCF: Add plain hash modes

In part, to support OpenSSL's use of cryptodev, which puts the HMAC pieces
in software and only offloads the raw hash primitive.

The following cryptodev identifiers are added:

 * CRYPTO_RIPEMD160 (not hooked up)
 * CRYPTO_SHA2_224
 * CRYPTO_SHA2_256
 * CRYPTO_SHA2_384
 * CRYPTO_SHA2_512

The plain SHA1 and 2 hashes are plumbed through cryptodev (feels like there
is a lot of redundancy here...) and cryptosoft.

This adds new auth_hash implementations for the plain hashes, as well as
SHA1 (which had a cryptodev.h identifier, but no implementation).

Add plain SHA 1 and 2 hash tests to the cryptocheck tool.

Motivation stems from John Baldwin's earlier OCF email,
https://lists.freebsd.org/pipermail/freebsd-arch/2018-January/018835.html .

5 years agoOCF: Add CRYPTO_SHA2_224_HMAC mode
cem [Mon, 9 Jul 2018 07:26:12 +0000 (07:26 +0000)]
OCF: Add CRYPTO_SHA2_224_HMAC mode

Round out the complete set of basic SHA2 HMAC modes with SHA2-224.

Support is added to the cryptocheck test tool.

5 years agoImplement SHA2-224 submode of SHA2-256
cem [Mon, 9 Jul 2018 07:24:05 +0000 (07:24 +0000)]
Implement SHA2-224 submode of SHA2-256

Like SHA2-384:SHA2-512, SHA2-224 is simply a truncated SHA2-256 with a
different initial vector.  Add to round out the complete basic SHA2 family.

5 years agoRemove "HMAC" from <HASH>_HMAC_BLOCK_LEN macro names
cem [Mon, 9 Jul 2018 07:21:37 +0000 (07:21 +0000)]
Remove "HMAC" from <HASH>_HMAC_BLOCK_LEN macro names

The block size is a property of the underlying hash algorithm, and has
nothing to do with the HMAC construction.

No functional change.

5 years agoDon't delete outfile unconditionally.
delphij [Mon, 9 Jul 2018 06:19:33 +0000 (06:19 +0000)]
Don't delete outfile unconditionally.

MFC after: 1 month

5 years agoRemove dirs that git svn should have removed but didn't.
imp [Mon, 9 Jul 2018 03:57:23 +0000 (03:57 +0000)]
Remove dirs that git svn should have removed but didn't.

5 years agolibiconv: correct undefined behavior.
pfg [Sun, 8 Jul 2018 23:22:04 +0000 (23:22 +0000)]
libiconv: correct undefined behavior.

Detected on NetBSD:
# nm /usr/lib/libc.so|grep sanit
    /public/src.git/lib/libc/citrus/modules/citrus_mapper_std.c:173:8:
runtime error: left shift of 1 by 31 places cannot be represented in type 'int'

Obtained from: NetBSD (CVS Rev. 1.11)
MFC after: 1 week

5 years agoRemove stray space from PNP string.
imp [Sun, 8 Jul 2018 23:12:27 +0000 (23:12 +0000)]
Remove stray space from PNP string.

5 years agogzip: fix for undefined behavior.
pfg [Sun, 8 Jul 2018 22:39:33 +0000 (22:39 +0000)]
gzip: fix for undefined behavior.

Unportable left shift reported with MKSANITIZER=yes
USE_SANITIZER=undefined:

# progress -zf ./games.tgz  tar -xp -C "./" -f -
/public/src.git/usr.bin/gzip/gzip.c:2126:33: runtime error: left shift of
251 by 24 places cannot be represented in type 'int'
100%
|****************************************************************************************************************|
44500 KiB  119.69 MiB/s    00:00 ETA

Refactor the following code into something that is more clear
and fix signed integer shift, by casting all buf[] elements to
(unsigned int):

unsigned char buf[8];
uint32_t usize;
[...]
else {
    usize = buf[4] | buf[5] << 8 |
            buf[6] << 16 | buf[7] << 24;
[...]

New version:

    usize = buf[4];
    usize |= (unsigned int)buf[5] << 8;
    usize |= (unsigned int)buf[6] << 16;
    usize |= (unsigned int)buf[7] << 24;

Only the "<< 24" part needs explicit cast, but for consistency make the
integer promotion explicit and clear to a code reader.

Sponsored by <The NetBSD Foundation>

Obtained from: NetBSD (CVS rev. 1.113)
MFC after: 1 week

5 years agoOops, fix a typo: imx_snvs should be imx6_snvs.
ian [Sun, 8 Jul 2018 21:14:43 +0000 (21:14 +0000)]
Oops, fix a typo:  imx_snvs should be imx6_snvs.

5 years agoMove device statements out of std.imx* and into kernel config files.
ian [Sun, 8 Jul 2018 21:09:52 +0000 (21:09 +0000)]
Move device statements out of std.imx* and into kernel config files.

In the armv4/5 world device statements in these files were common, but in
the v6/7 world, other socs don't put device statements into those files, so
this just brings imx5 and imx6 into line with the current conventions.

5 years agoAdd PNP info to PCI attachment of et driver
imp [Sun, 8 Jul 2018 20:40:28 +0000 (20:40 +0000)]
Add PNP info to PCI attachment of et driver

Reviewed by: imp, chuck
Submitted by: Lakhan Shiva Kamireddy <lakhanshiva@gmail.com>
Sponsored by: Google, Inc. (GSoC 2018)
Differential Revision: https://reviews.freebsd.org/D15979

5 years agoAdd PNP info to PCI attachment of ipw driver
imp [Sun, 8 Jul 2018 20:40:23 +0000 (20:40 +0000)]
Add PNP info to PCI attachment of ipw driver

Reviewed by: imp, chuck
Submitted by: Lakhan Shiva Kamireddy <lakhanshiva@gmail.com>
Sponsored by: Google, Inc. (GSoC 2018)
Differential Revision: https://reviews.freebsd.org/D15979

5 years agoAdd PNP info to PCI attachment of ixv driver
imp [Sun, 8 Jul 2018 20:40:19 +0000 (20:40 +0000)]
Add PNP info to PCI attachment of ixv driver

Reviewed by: imp, chuck
Submitted by: Lakhan Shiva Kamireddy <lakhanshiva@gmail.com>
Sponsored by: Google, Inc. (GSoC 2018)
Differential Revision: https://reviews.freebsd.org/D15979

5 years agoAdd PNP info to PCI attachment of ix driver
imp [Sun, 8 Jul 2018 20:40:14 +0000 (20:40 +0000)]
Add PNP info to PCI attachment of ix driver

Reviewed by: imp, chuck
Submitted by: Lakhan Shiva Kamireddy <lakhanshiva@gmail.com>
Sponsored by: Google, Inc. (GSoC 2018)
Differential Revision: https://reviews.freebsd.org/D15979

5 years agoAdd PNP info to PCI attachments of ciss driver
imp [Sun, 8 Jul 2018 20:40:10 +0000 (20:40 +0000)]
Add PNP info to PCI attachments of ciss driver

Move the module declaration so that it's after the device table.
The PNP_INFO must come after the module declaration.

Reviewed by: imp, chuck
Submitted by: Lakhan Shiva Kamireddy <lakhanshiva@gmail.com>
Sponsored by: Google, Inc. (GSoC 2018)
Differential Revision: https://reviews.freebsd.org/D15995

5 years agoAdd PNP info to PCI attachment of dc driver
imp [Sun, 8 Jul 2018 20:40:06 +0000 (20:40 +0000)]
Add PNP info to PCI attachment of dc driver

Reviewed by: imp, chuck
Submitted by: Lakhan Shiva Kamireddy <lakhanshiva@gmail.com>
Sponsored by: Google, Inc. (GSoC 2018)
Differential Revision: https://reviews.freebsd.org/D15995

5 years agoAdd PNP info to PCI attachments of bge driver
imp [Sun, 8 Jul 2018 20:40:01 +0000 (20:40 +0000)]
Add PNP info to PCI attachments of bge driver

Reviewed by: imp, chuck
Submitted by: Lakhan Shiva Kamireddy <lakhanshiva@gmail.com>
Sponsored by: Google, Inc. (GSoC 2018)
Differential Revision: https://reviews.freebsd.org/D15995

5 years agoAdd PNP info to PCI attachments of bfe driver
imp [Sun, 8 Jul 2018 20:39:57 +0000 (20:39 +0000)]
Add PNP info to PCI attachments of bfe driver

Reviewed by: imp, chuck
Submitted by: Lakhan Shiva Kamireddy <lakhanshiva@gmail.com>
Sponsored by: Google, Inc. (GSoC 2018)
Differential Revision: https://reviews.freebsd.org/D15995

5 years agoAdd PNP info to PCI attachment of alc driver
imp [Sun, 8 Jul 2018 20:39:52 +0000 (20:39 +0000)]
Add PNP info to PCI attachment of alc driver

Reviewed by: imp, chuck
Submitted by: Lakhan Shiva Kamireddy <lakhanshiva@gmail.com>
Sponsored by: Google, Inc. (GSoC 2018)
Pull Request: https://github.com/bsdimp/freebsd/pull/4

5 years agoAdd PNP info to PCI attachment of gem driver
imp [Sun, 8 Jul 2018 20:39:48 +0000 (20:39 +0000)]
Add PNP info to PCI attachment of gem driver

Move device table earlier in the file so we can reference it in the
PNP_INFO macro.

Reviewed by: imp, chuck
Submitted by: Lakhan Shiva Kamireddy <lakhanshiva@gmail.com>
Sponsored by: Google, Inc. (GSoC 2018)
Pull Request: https://github.com/bsdimp/freebsd/pull/5

5 years agoAdd PNP info to PCI attachment of fxp driver
imp [Sun, 8 Jul 2018 20:39:43 +0000 (20:39 +0000)]
Add PNP info to PCI attachment of fxp driver

Reviewed by: imp, chuck
Submitted by: Lakhan Shiva Kamireddy <lakhanshiva@gmail.com>
Sponsored by: Google, Inc. (GSoC 2018)
Pull Request: https://github.com/bsdimp/freebsd/pull/5

5 years agoAdd PNP info to PCI attachment of ena driver
imp [Sun, 8 Jul 2018 20:39:38 +0000 (20:39 +0000)]
Add PNP info to PCI attachment of ena driver

Make unsigned values uint16_t for pnp table. They are properly
uint16_t befause they are 16-bit PCI IDs. The PNP_INFO language has no
type for bare unsigned.

Reviewed by: imp, chuck
Submitted by: Lakhan Shiva Kamireddy <lakhanshiva@gmail.com>
Sponsored by: Google, Inc. (GSoC 2018)
Pull Request: https://github.com/bsdimp/freebsd/pull/5

5 years agoAdd PNP info to PCI attachment of cas driver
imp [Sun, 8 Jul 2018 20:39:23 +0000 (20:39 +0000)]
Add PNP info to PCI attachment of cas driver

Move module delcaration to be after device table. The PNP_INFO must
follow the module declaration.

Reviewed by: imp, chuck
Submitted by: Lakhan Shiva Kamireddy <lakhanshiva@gmail.com>
Sponsored by: Google, Inc. (GSoC 2018)
Pull Request: https://github.com/bsdimp/freebsd/pull/5

5 years agoReuse the PV entry when updating a mapping in pmap_enter().
markj [Sun, 8 Jul 2018 20:38:46 +0000 (20:38 +0000)]
Reuse the PV entry when updating a mapping in pmap_enter().

This addresses a problem described in r335784, where memory
pressure forces reclamation of a PV chunk and in rare cases leads to a
use-after-free of a page table page.

Reviewed by: alc, kib
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D16181

5 years agoMake the imx6_snvs driver usable as a module, add pnp info. Add a manpage.
ian [Sun, 8 Jul 2018 19:35:41 +0000 (19:35 +0000)]
Make the imx6_snvs driver usable as a module, add pnp info.  Add a manpage.

5 years agocritical_{enter, exit}: add missing compiler barrier
mmacy [Sun, 8 Jul 2018 19:35:29 +0000 (19:35 +0000)]
critical_{enter, exit}: add missing compiler barrier

Reported by: markj

5 years agoCatch up with improvements in RTC handling... It's no longer necessary to
ian [Sun, 8 Jul 2018 18:44:42 +0000 (18:44 +0000)]
Catch up with improvements in RTC handling... It's no longer necessary to
ignore the timestamp passed in to settime() due to inaccuracy, the core
routines now pass in a nanosecond-accurate time freshly-obtained before
calling each driver's settime() method.  Also, add calls to the new
debugging output helpers.

5 years agoFix the kernel part of pnfsdscopymr() to handle holes in the file being copied.
rmacklem [Sun, 8 Jul 2018 18:15:55 +0000 (18:15 +0000)]
Fix the kernel part of pnfsdscopymr() to handle holes in the file being copied.

If a mirrored DS is being recovered that has a lot of large sparse files,
pnfsdscopymr(8) would use a lot of space on the recovered mirror since it
would write the "holes" in the file being mirrored.
This patch adds code to check for a "hole" and skip doing the write.
The check is done on a "per PNFSDS_COPYSIZ size block", which is currently 64K.
I think that most file server file systems will be using a blocksize at
least this large. If the file server is using a smaller blocksize and
smaller holes need to be preserved, PNFSDS_COPYSIZ could be decreased.
The block of 0s is malloc()d, since pnfsdcopymr(8) should be an infrequent
occurrence.

5 years agoInvalidate the mapping before updating its physical address.
alc [Sun, 8 Jul 2018 16:51:54 +0000 (16:51 +0000)]
Invalidate the mapping before updating its physical address.

Doing so ensures that all threads sharing the pmap have a consistent
view of the mapping.  This fixes the problem described in the commit
log messages for r329254 without the overhead of an extra fault in the
common case.  Once other pmap_enter() implementations are similarly
modified, the workaround added in r329254 can be removed, reducing the
overhead of CoW faults.

See also r335784 for amd64.  The i386 implementation of pmap_enter()
already reused the PV entry from the old mapping.

Reviewed by: kib, markj
Tested by: pho
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D16133

5 years agoReduce diff between msun/src/e_pow.c and msun/src/e_powf.c.
markj [Sun, 8 Jul 2018 16:33:58 +0000 (16:33 +0000)]
Reduce diff between msun/src/e_pow.c and msun/src/e_powf.c.

Remove unnecessary casts, use integer literal constants instead of
floating point constants where possible, and introduce three const
static variables to hold 0.5, 0.25, and 1/3.

PR: 229420
Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu>
MFC after: 1 week

5 years agoFix whitespace issues in bessel function routines.
markj [Sun, 8 Jul 2018 16:26:13 +0000 (16:26 +0000)]
Fix whitespace issues in bessel function routines.

PR: 229423
Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu>
MFC after: 3 days

5 years agoAdd a missed chunk r335939.
kib [Sun, 8 Jul 2018 15:48:47 +0000 (15:48 +0000)]
Add a missed chunk r335939.

Noted by: David Carlier
MFC after: 9 days
Differential revision: https://reviews.freebsd.org/D16178

5 years agoUse the FQDN in the newsyslog log message when RFC 5424 is enabled.
ed [Sun, 8 Jul 2018 10:08:24 +0000 (10:08 +0000)]
Use the FQDN in the newsyslog log message when RFC 5424 is enabled.

The RFC 5424 spec mentions that logging FQDNs over short hostnames is
preferred. Alter this code, so that the hostname doesn't get truncated
on startup. Keep track of the length of the short hostname, so that
fprintf() can do the truncation where necessary.

MFC after: 1 month

5 years agoStop using ../zfs/libzfs.h but instead use libzfs.h.
imp [Sun, 8 Jul 2018 07:42:58 +0000 (07:42 +0000)]
Stop using ../zfs/libzfs.h but instead use libzfs.h.

While ../zfs/libzfs.h mostly works, there are a few situations where
it does not. Eliminate the problem by using plain libzfs.h, like we do
for ufs support. This fixes the weird cases, and is easier to
understand. It also follows the general style convetion of avoiding
../ in #includes.

5 years agoMove ZFS files into libsa
imp [Sun, 8 Jul 2018 07:42:49 +0000 (07:42 +0000)]
Move ZFS files into libsa

Move the libzfs stuff into libsa. There's no need for it to be a
separate library. The separate library adds to the issues of build
ordering that we see from time to time. Move the filesystem support
into libsa, like all the other filesystem support rather than making
zfs the odd-duck out.

Discussed with: allanjude@

5 years agoCreate an aarch64 subdir under man4, now that we have aarch64 manpages.
ian [Sun, 8 Jul 2018 01:29:48 +0000 (01:29 +0000)]
Create an aarch64 subdir under man4, now that we have aarch64 manpages.

Reported by: Mark Millard

5 years agoAdd pnp info to imx6_ahci, and add a module makefile, and a manpage for it.
ian [Sun, 8 Jul 2018 00:27:28 +0000 (00:27 +0000)]
Add pnp info to imx6_ahci, and add a module makefile, and a manpage for it.

5 years agoMove armv8crypto.4 into the aarch64 dir; should have been part of r336077.
ian [Sun, 8 Jul 2018 00:02:14 +0000 (00:02 +0000)]
Move armv8crypto.4 into the aarch64 dir; should have been part of r336077.

Pointy hat: ian@
Reported by: rpokola@

5 years agoMove arm- and aarch64-specific manpages into arch-specific directories.
ian [Sat, 7 Jul 2018 21:49:30 +0000 (21:49 +0000)]
Move arm- and aarch64-specific manpages into arch-specific directories.

This removes a bit of the .if/.endif clutter from man4/Makefile by using
the existing machinery that supports per-arch manpages.

5 years agoAdd a manpage for the imx5/6 watchdog driver.
ian [Sat, 7 Jul 2018 20:43:01 +0000 (20:43 +0000)]
Add a manpage for the imx5/6 watchdog driver.

5 years agoFix handling of the hybrid DS case for a pNFS server.
rmacklem [Sat, 7 Jul 2018 19:27:49 +0000 (19:27 +0000)]
Fix handling of the hybrid DS case for a pNFS server.

After the addition of the "#mds_path" suffix for a DS specification on the
"-p" nfsd option, it is possible to have a mix of DSs assigned to an MDS
file system and DSs that store files for all DSs. This is what I referred
to as "hybrid" above.
At first, I didn't think this hybrid case would be useful, but I now believe
that some system administrators may fine it useful.
This patch modifies the file storage assignment algorithm so that it
makes the "#mds_path" DSs take priority and the all file systems DSs
are now only used for MDS file systems with no "#mds_path" DS servers.
This only affects the pNFS server for this "hybrid" case.

5 years agoImport commit from NetBSD with checkin message:
mckusick [Sat, 7 Jul 2018 19:11:43 +0000 (19:11 +0000)]
Import commit from NetBSD with checkin message:

    Avoid Undefined Behavior in ffs_clusteracct()

    Change the type of 'bit' variable from int to unsigned int and use unsigned
    values consistently.

    sys/ufs/ffs/ffs_subr.c:336:10, shift exponent -1 is negative

    Detected with Kernel Undefined Behavior Sanitizer.

    Reported by <Harry Pantazis>

Submitted by: Pedro Giffuni

5 years agoAdd support to the imx watchdog for the FDT "timeout-sec" property, by
ian [Sat, 7 Jul 2018 19:10:00 +0000 (19:10 +0000)]
Add support to the imx watchdog for the FDT "timeout-sec" property, by
automatically initializing the watchdog using the given value.  Also,
attach at BUS_PASS_TIMER to extend watchdog protection to more of the
kernel init process.

5 years agoCorrectly calculate the value to put in the imx wdog countdown register.
ian [Sat, 7 Jul 2018 19:03:38 +0000 (19:03 +0000)]
Correctly calculate the value to put in the imx wdog countdown register.

The correct value is seconds*2-1.  The code was using just seconds*2, which
led to being off by a half-second -- usually not a big deal, except when the
value was the max (128) it overflowed so zero would get written to the
countdown register, which equates to a timeout of a half second.

5 years agoAdd pnp info and a module makefile for the imx_wdog watchdog driver.
ian [Sat, 7 Jul 2018 17:25:09 +0000 (17:25 +0000)]
Add pnp info and a module makefile for the imx_wdog watchdog driver.

5 years agoFix PCI_SUBDEV call
imp [Sat, 7 Jul 2018 15:55:58 +0000 (15:55 +0000)]
Fix PCI_SUBDEV call

5 years agoUpdate AMDSMB to use PCI_MATCH
imp [Sat, 7 Jul 2018 15:55:52 +0000 (15:55 +0000)]
Update AMDSMB to use PCI_MATCH

Differential Review: https://reviews.freebsd.org/D16172