]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years ago[net80211] high oops on the high seas, or "god damnit compilers, it's 2016 and you...
adrian [Tue, 22 Nov 2016 17:36:16 +0000 (17:36 +0000)]
[net80211] high oops on the high seas, or "god damnit compilers, it's 2016 and you're supposed to save me from this."

TODO:

* drink real coffee before committing in the morning, or there's a high
  risk of more obviously self-evident commits being turned into attempts
  at humour.

Reported by: cem, Coverity CID 1366219

7 years agoremove unnecessary vm includes from setproctitle
emaste [Tue, 22 Nov 2016 16:00:18 +0000 (16:00 +0000)]
remove unnecessary vm includes from setproctitle

vm headers were needed only for the PS_STRINGS fallback, which was
removed in r297888.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

7 years agoRefactor fetch_connect() and fetch_bind() to improve readability and avoid
des [Tue, 22 Nov 2016 13:30:07 +0000 (13:30 +0000)]
Refactor fetch_connect() and fetch_bind() to improve readability and avoid
repeating the same DNS lookups.

MFC after: 3 weeks

7 years agoOn error, bread(9) zeroes buffer pointer, do not dereference it.
kib [Tue, 22 Nov 2016 13:24:57 +0000 (13:24 +0000)]
On error, bread(9) zeroes buffer pointer, do not dereference it.
See r294954 for the bread(9) change and r297401 for similar cd9660 fix.

Reported and tested by: Joshua Kinard <kumba@gentoo.org>
PR: 214705
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agorevert r304520, set canmount=on is not supposed to mount the filesystem
avg [Tue, 22 Nov 2016 11:44:30 +0000 (11:44 +0000)]
revert r304520, set canmount=on is not supposed to mount the filesystem

Not sure where I got the idea that it should.

See https://github.com/openzfs/openzfs/pull/218

Reported by: mahrens
Pointyhat to: avg
MFC after: 5 days

7 years agoUse buffer pager for NFS.
kib [Tue, 22 Nov 2016 10:58:24 +0000 (10:58 +0000)]
Use buffer pager for NFS.

The pager, due to its construction, implements clustering for the
page-ins.  In particular, buildworld load demonstrates reduction of
the READ RPCs from 39k down to 24k.  No change in real or CPU time was
observed.

Discussed with, and measured by: bde
No objections from: rmacklem
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoMinor cleanup, remove unneeded XXX comments and unused re-define.
kib [Tue, 22 Nov 2016 10:24:59 +0000 (10:24 +0000)]
Minor cleanup, remove unneeded XXX comments and unused re-define.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoRestore vnode pager statistic for buffer pagers.
kib [Tue, 22 Nov 2016 10:06:39 +0000 (10:06 +0000)]
Restore vnode pager statistic for buffer pagers.

Reviewed by: alc, markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D8585

7 years agoSplit out the FDT parts of the pmu driver to make way for adding ACPI
andrew [Tue, 22 Nov 2016 09:39:31 +0000 (09:39 +0000)]
Split out the FDT parts of the pmu driver to make way for adding ACPI
support.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years agoReplay r304721 in contrib/ so the change won't get lost across import.
delphij [Tue, 22 Nov 2016 08:30:32 +0000 (08:30 +0000)]
Replay r304721 in contrib/ so the change won't get lost across import.

7 years agoMFV r308954:
delphij [Tue, 22 Nov 2016 08:27:49 +0000 (08:27 +0000)]
MFV r308954:

ntp 4.2.8p9.

Approved by: so

7 years ago[net80211] Only send out a probe request if we see an unknown IBSS node that matches...
adrian [Tue, 22 Nov 2016 06:53:52 +0000 (06:53 +0000)]
[net80211] Only send out a probe request if we see an unknown IBSS node that matches our SSID.

7 years agoVendor import of ntp-4.2.8p9.
delphij [Tue, 22 Nov 2016 06:28:26 +0000 (06:28 +0000)]
Vendor import of ntp-4.2.8p9.

7 years agoMerge ACPICA 20161117.
jkim [Tue, 22 Nov 2016 05:54:37 +0000 (05:54 +0000)]
Merge ACPICA 20161117.

7 years ago[net80211] store references to VHT and related IEs.
adrian [Tue, 22 Nov 2016 02:51:06 +0000 (02:51 +0000)]
[net80211] store references to VHT and related IEs.

This just stores pointers to the IE; it doesn't yet parse anything.

Note: it blows out the size of ieee80211_node, so this will require
ye olde kernel/modules recompile.

7 years ago[ath] obey the peer A-MPDU density and max-size.
adrian [Tue, 22 Nov 2016 02:42:00 +0000 (02:42 +0000)]
[ath] obey the peer A-MPDU density and max-size.

* Obey the peer A-MPDU density if it's larger than the currently configured
  one.

* Pay attention to the peer A-MPDU max-size and don't assume we can transmit
  a full A-MPDU (64k!) if the peer announces smaller values.

Relnotes: ath(4): Fix A-MPDU transmit; obey A-MPDU density and max size.

7 years ago[net80211] Remove extra \n.
adrian [Tue, 22 Nov 2016 02:02:13 +0000 (02:02 +0000)]
[net80211] Remove extra \n.

7 years ago[net80211] flesh out more IBSS 11n support
adrian [Tue, 22 Nov 2016 01:22:54 +0000 (01:22 +0000)]
[net80211] flesh out more IBSS 11n support

* Pepper comments around which describe what state(s) we're in when faking
  up 11n nodes.
* By default don't fake it up as 11n until we properly negotiate the 11n
  capabilities using probe request/response frames.
* Send a probe request with our HT information, as the 802.11-2012 spec
  suggests.
* Reassociate with the driver if we've been promoted.

This is done because although learning a peer via beacons can learn 11n
state, learning peers via hearing probe frames and broadcast frames
does not.  Thus, sometimes you end up with an 11n peer in the peer
table and sometimes you don't.

Note that the probe request/response exchange may not actually succeed.
Ideally we'd put the peer into some blocking state until we've exchanged
probe request/reponse to learn capabilities, or we timeout and just
stay non-11n.

This is more an experiment to get 11n IBSS nodes actually discovering
each other and be able to transmit.  There are other issues that creep
up which I'll attempt to address in future commits.

Tested:

* AR9380 NICs in 11n mode.

Reviewed by: avos
Differential Revision: https://reviews.freebsd.org/D8365

7 years agoInitialize 'ticks' earlier in boot after 'hz' is set.
jhb [Tue, 22 Nov 2016 01:02:59 +0000 (01:02 +0000)]
Initialize 'ticks' earlier in boot after 'hz' is set.

This avoids the time-warp after kthreads have started running and the
required fixup to td_slptick and td_blktick in the EARLY_AP_STARTUP
case.  Now, 'ticks' is initialized before any kthreads are created or
any context switches are performed.

Tested by: gavin
MFC after: 2 weeks
Sponsored by: Netflix

7 years agoAudit 'fd' and 'cmd' arguments to fcntl(2), and when generating BSM,
rwatson [Tue, 22 Nov 2016 00:41:24 +0000 (00:41 +0000)]
Audit 'fd' and 'cmd' arguments to fcntl(2), and when generating BSM,
always audit the file-descriptor number and vnode information for all
fnctl(2) commands, not just locking-related ones.  This was likely an
oversight in the original adaptation of this code from XNU.

MFC after: 3 days
Sponsored by: DARPA, AFRL

7 years agoSet the 'vital' flag on the runtime and jail packages.
gjb [Mon, 21 Nov 2016 23:29:28 +0000 (23:29 +0000)]
Set the 'vital' flag on the runtime and jail packages.

The default pkg(8) from pkg.freebsd.org requires libjail.so,
so mark the jail package as vital along with the runtime
package to avoid errors when libjail.so is removed.  This is
a no-op for systems with WITHOUT_JAIL in src.conf(5) and pkg(8)
built from the Ports Collection.

In order to make this work without marking packages such as
the jail-lib32, for example, the jail.ucl file needed to be
split out into separate files similarly to the runtime-*.ucl
files.

Glanced at by: brd
MFC after: 5 days
Sponsored by: The FreeBSD Foundation

7 years agor308942 broke kernel build.
hiren [Mon, 21 Nov 2016 21:07:43 +0000 (21:07 +0000)]
r308942 broke kernel build.
Add acpi_if.h to module makefile to fix it.

Submitted by: peter

7 years agoFor RTT calculations mid-session, we explicitly ignore ACKs with tsecr of 0 as
hiren [Mon, 21 Nov 2016 20:53:11 +0000 (20:53 +0000)]
For RTT calculations mid-session, we explicitly ignore ACKs with tsecr of 0 as
many borken middle-boxes tend to do that. But during 3whs, in syncache_expand(),
we don't do that which causes us to send a RST to such a client. Relax this
constraint by only using tsecr to compare against timestamp that we sent when it
is not 0. As a result, we'd now accept the final ACK of 3whs with tsecr of 0.

Reviewed by:     jtl, gnn
Sponsored by:     Limelight Networks
Differential Revision: https://reviews.freebsd.org/D8552

7 years ago[bytgpio] Add module for bytgpio(4)
gonzo [Mon, 21 Nov 2016 19:47:37 +0000 (19:47 +0000)]
[bytgpio] Add module for bytgpio(4)

MFC after: 3 days

7 years ago[bytgpio] Add bytgpio(4) man page with general description of the driver
gonzo [Mon, 21 Nov 2016 19:46:10 +0000 (19:46 +0000)]
[bytgpio] Add bytgpio(4) man page with general description of the driver

MFC after: 3 days

7 years ago[bytgpio] prepare bytgpio(4) for modularization
gonzo [Mon, 21 Nov 2016 19:43:01 +0000 (19:43 +0000)]
[bytgpio] prepare bytgpio(4) for modularization

- Add detach method
- module should depend on gpiobus, not gpio

7 years agoInclude the missing accommon.h from the ACPI uart code.
andrew [Mon, 21 Nov 2016 19:38:57 +0000 (19:38 +0000)]
Include the missing accommon.h from the ACPI uart code.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years agoAdd support to find the arm64 serial using the ACPI tables. This uses the
andrew [Mon, 21 Nov 2016 19:26:58 +0000 (19:26 +0000)]
Add support to find the arm64 serial using the ACPI tables. This uses the
Serial Port Console Redirection Table to find the device to use.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years ago[etherswitch] add ukswitch hint that is phy offset at mdio register
mizhka [Mon, 21 Nov 2016 19:26:22 +0000 (19:26 +0000)]
[etherswitch] add ukswitch hint that is phy offset at mdio register

This patch allows to specify PHY register offset for ukswitch. For instance,
switch MAICREL KS8995XA connected via MDIO to SoC, but PHY register starts
at 1. So hint for this case is: hint.ukswitch.0.phyoffset=1

No change/effect if hint is not set.

Submitted by: Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by: adrian, mizhka
Approved by: adrian(mentor)
Differential Revision: https://reviews.freebsd.org/D8584

7 years agoMark virtio_mmio as FDT only, it lacks an ACPI attachment.
andrew [Mon, 21 Nov 2016 19:14:46 +0000 (19:14 +0000)]
Mark virtio_mmio as FDT only, it lacks an ACPI attachment.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years agoMark uart_dev_snps.c as FDT only, it doesn't have and ACPI bindings.
andrew [Mon, 21 Nov 2016 19:13:33 +0000 (19:13 +0000)]
Mark uart_dev_snps.c as FDT only, it doesn't have and ACPI bindings.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years agoMark extres as FDT only. Much of this assumes FDT and fails to build
andrew [Mon, 21 Nov 2016 19:03:51 +0000 (19:03 +0000)]
Mark extres as FDT only. Much of this assumes FDT and fails to build
without it.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years agoMark the Allwinner drivers as FDT only. These are mobile and embedded parts
andrew [Mon, 21 Nov 2016 18:50:45 +0000 (18:50 +0000)]
Mark the Allwinner drivers as FDT only. These are mobile and embedded parts
so are unlikely to use ACPI.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years agoTo allow for an ACPI attachment to the generic PCIe driver split off the
andrew [Mon, 21 Nov 2016 18:24:05 +0000 (18:24 +0000)]
To allow for an ACPI attachment to the generic PCIe driver split off the
FDT attachment to a new file. A separate ACPI attachment will then be added
to allow arm64 servers with ACPI to use it over FDT.

This should also help with merging this with the ofwpci driver, with
further work needed to remove restrictions this driver places on resource
allocation.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D7319

7 years agoAdd PDMA controller registers.
br [Mon, 21 Nov 2016 15:42:54 +0000 (15:42 +0000)]
Add PDMA controller registers.

Obtained from: X1000 IoT Application Processor Programming Manual
Sponsored by: DARPA, AFRL

7 years agoMove FDT option to the main SoC file and mark boards config
br [Mon, 21 Nov 2016 15:35:56 +0000 (15:35 +0000)]
Move FDT option to the main SoC file and mark boards config
as NO_UNIVERSE.

Pointed out by: andrew
Sponsored by: DARPA, AFRL

7 years agoAdd Intel Atom Cherryview SOC HSUART support
sbruno [Mon, 21 Nov 2016 14:43:31 +0000 (14:43 +0000)]
Add Intel Atom Cherryview SOC HSUART support

PR: 207910
Submitted by: johannes@brilliantservice.co.jp
MFC after: 1 week

7 years agoAdjust r308689 to make rtld compilable with either in-tree or
kib [Mon, 21 Nov 2016 14:13:57 +0000 (14:13 +0000)]
Adjust r308689 to make rtld compilable with either in-tree or
(hopefully) stock gcc 4.2.1 on i386 and other arches.

In particular:
- Do not use %ebx in the asm constraints on i386, since rtld is
  compiled with -fPIC and gcc cannot handle GOT-base register reload
  (clang and newer gcc can).
- Avoid direct use of [static N] construct in the function
  declaration/definion.  In-tree gcc was patched to support this, but
  stock 4.2.1 cannot handle the feature.

Requested by: bde
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoDisable superpages reservations as we don't have implemented them yet.
br [Mon, 21 Nov 2016 12:00:31 +0000 (12:00 +0000)]
Disable superpages reservations as we don't have implemented them yet.

Requested by: Alan Cox <alc@rice.edu>
Sponsored by: DARPA, AFRL

7 years agoAdd an arm64 specific uart cpu driver. As arm64 may use ACPI to find the
andrew [Mon, 21 Nov 2016 11:27:14 +0000 (11:27 +0000)]
Add an arm64 specific uart cpu driver. As arm64 may use ACPI to find the
uart we need to handle both it and FDT, and as such we need to have an
architecture specific driver.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D7796

7 years agoAdd accelerated AES with using the ARMv8 crypto instructions. This is based
andrew [Mon, 21 Nov 2016 11:18:00 +0000 (11:18 +0000)]
Add accelerated AES with using the ARMv8 crypto instructions. This is based
on the AES-NI code, and modified as needed for use on ARMv8. When loaded
the driver will check the appropriate field in the id_aa64isar0_el1
register to see if AES is supported, and if so the probe function will
signal the driver should attach.

With this I have seen up to 2000Mb/s from the cryptotest test with a single
thread on a ThunderX Pass 2.0.

Reviewed by: imp
Obtained from: ABT Systems Ltd
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8297

7 years agoUpdate struct r12a_rom.
kevlo [Mon, 21 Nov 2016 09:23:42 +0000 (09:23 +0000)]
Update struct r12a_rom.

Reviewed by: avos

7 years agohyperv/hn: Don't abuse hn_{tx,rx}_ring_inuse.
sephe [Mon, 21 Nov 2016 05:54:31 +0000 (05:54 +0000)]
hyperv/hn: Don't abuse hn_{tx,rx}_ring_inuse.

Just in case, the # of TX/RX rings is changed upon synthetic parts
re-attach.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8520

7 years agohyperv/hn: Allow enabling IPv6 TX checksum offloading and IPv6 TSO.
sephe [Mon, 21 Nov 2016 05:41:08 +0000 (05:41 +0000)]
hyperv/hn: Allow enabling IPv6 TX checksum offloading and IPv6 TSO.

They are still disabled by default.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8490

7 years agohyperv/hn: Fix WITNESS warnings
sephe [Mon, 21 Nov 2016 05:21:15 +0000 (05:21 +0000)]
hyperv/hn: Fix WITNESS warnings

And re-enable SIOCADDMULTI/SIOCDELMULTI, after WITNESS warning is fixed.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8489

7 years agohyperv/vmbus: Support transction result busy-wait.
sephe [Mon, 21 Nov 2016 05:09:43 +0000 (05:09 +0000)]
hyperv/vmbus: Support transction result busy-wait.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8488

7 years agohyperv/hn: Implement RNDIS multi-packet message support.
sephe [Mon, 21 Nov 2016 05:00:51 +0000 (05:00 +0000)]
hyperv/hn: Implement RNDIS multi-packet message support.

Currently, it is only applied to packet sent through chimney sending
buffers.  Not enabled by default yet.

This one gives 20%~30% performance boost for non-TSO usage in both
bit/packet rate tests and nginx performance test.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8560

7 years agoFix error reporting from wcstof()
vangyzen [Sun, 20 Nov 2016 20:13:22 +0000 (20:13 +0000)]
Fix error reporting from wcstof()

When wcstof() skipped initial space and then parsing failed, it set
endptr to the first non-space character.  Fix it to correctly report
failure by setting endptr to the beginning of the input string.
The fix is from theraven@, who fixed this bug in wcstod() and
wcstold() in r227753.

While I'm here:

Move assignments out of declarations in wcstod() and wcstold().
This is against my personal preference, but it is our agreed style(9).

Set endptr correctly on malloc() failure in all three functions.

Remove an incorrect comment:  This is pointer arithmetic,
so the code was not actually making that assumption.

wcstold() advanced the wcp pointer beyond leading whitespace
and then reset it back to the beginning of the string.
Do not reset it.  This seems to have no functional effect,
since strtold_l() also skips leading whitespace.  I'm making
the change to keep this function consistent with wcstof() and
wcstod(), and because the C11 spec prescribes the use of iswspace()
to skip leading space.

Reported by: libc++ unit test for std::stof(std::wstring)
MFC after: 8 days
Sponsored by: Dell EMC

7 years agoBuild and install nanopi-neo.dts and orangepi-plus-2e.dts
jmcneill [Sun, 20 Nov 2016 19:39:55 +0000 (19:39 +0000)]
Build and install nanopi-neo.dts and orangepi-plus-2e.dts

7 years agoAdd dts for Xunlong Orange Pi Plus 2E.
jmcneill [Sun, 20 Nov 2016 19:38:46 +0000 (19:38 +0000)]
Add dts for Xunlong Orange Pi Plus 2E.

7 years agoAdd dts for FriendlyARM NanoPi NEO.
jmcneill [Sun, 20 Nov 2016 19:38:05 +0000 (19:38 +0000)]
Add dts for FriendlyARM NanoPi NEO.

7 years agoAdd dtsi for FreeBSD-specific Allwinner H3 nodes.
jmcneill [Sun, 20 Nov 2016 19:36:17 +0000 (19:36 +0000)]
Add dtsi for FreeBSD-specific Allwinner H3 nodes.

7 years ago[FDT] Remove empty wrapper for upstream am335x-evm.dts
gonzo [Sun, 20 Nov 2016 18:56:04 +0000 (18:56 +0000)]
[FDT] Remove empty wrapper for upstream am335x-evm.dts

Remove empty wrapper for sys/gnu version of am335x-evm.dts located in
sys/boot/fdt, with current include paths priority it's recursive #include
and current build system can find file in sys/gnu when generating dtb

Reported by: Jared McNeill

7 years ago[bytgpio] Fix USB disconnect event after listsing pins on gpioc2
gonzo [Sun, 20 Nov 2016 18:38:32 +0000 (18:38 +0000)]
[bytgpio] Fix USB disconnect event after listsing pins on gpioc2

- Do not set input flag when reading value from GPIO pin, it is not
  required and for gpioc2(S5 bank) setting both input and output flags
  leads to some kind of electric interference (curren drop?) that
  causes USB devices to disconnect

- Check pad configuration when attaching device and provide IN/OUT
  capabilities only for pads that are configured as GPIO. Do not let
  user code to configure or change value of non-GPIO pads. There is
  no information for NC bank in intel's datasheet so for now function
  check is ignored for pins in it

Reported by: Frank H.
MFC after: 3 days

7 years agoAdd spigen to the ARMv6 GENERIC kernel
manu [Sun, 20 Nov 2016 18:21:42 +0000 (18:21 +0000)]
Add spigen to the ARMv6 GENERIC kernel

7 years agorc.subr: $(ps -p $$ -o jid=) is always 0, so do not fork ps for it.
jilles [Sun, 20 Nov 2016 18:21:05 +0000 (18:21 +0000)]
rc.subr: $(ps -p $$ -o jid=) is always 0, so do not fork ps for it.

The JID keyword writes 0 for a process also in the host system or in the
same jail.

7 years agoEnable the use of spigen on FDT platform
manu [Sun, 20 Nov 2016 18:20:28 +0000 (18:20 +0000)]
Enable the use of spigen on FDT platform

MFC after: 2 weeks

7 years agofix unsafe modification of zfs_vnodeops when DIAGNOSTIC is enabled
avg [Sun, 20 Nov 2016 14:00:50 +0000 (14:00 +0000)]
fix unsafe modification of zfs_vnodeops when DIAGNOSTIC is enabled

The idea was to avoid a false assertion in zfs_lock, but it was
implemented very dangerously and incorrectly.

Reported by: pho
Tested by: pho
MFC after: 1 week

7 years agoAttempt package build even if dependencies seems to be missing
phk [Sun, 20 Nov 2016 10:01:21 +0000 (10:01 +0000)]
Attempt package build even if dependencies seems to be missing

7 years agoActually bump __FreeBSD_version
jhibbits [Sun, 20 Nov 2016 06:11:30 +0000 (06:11 +0000)]
Actually bump __FreeBSD_version

7 years agoFix buildworld for powerpc.
jhibbits [Sun, 20 Nov 2016 06:10:12 +0000 (06:10 +0000)]
Fix buildworld for powerpc.

vmpage requires struct pmap to exist and contain a pm_stats field.  As of
r308817, either AIM or BOOKE is required to be set in order to get their
respective pmap structs.  Rather than expose them both, or try to unify them
unnecessarily, add a third option which contains only a pm_stats field, and
change the two existing pmap structures to place the common fields at the
beginning of the struct.  This actually fixes the stats collection by libkvm on
AIM hardware, because before it was accessing a possibly different offset, which
would cause it to read garbage.

Bump __FreeBSD_version to denote this ABI change, so that ports which depend on
libkvm can be rebuilt.

7 years agoUse ofw_gpiobus instead of plain gpiobus for CI20
kan [Sun, 20 Nov 2016 01:59:22 +0000 (01:59 +0000)]
Use ofw_gpiobus instead of plain gpiobus for CI20

Requesed by: mmel

7 years agoModify umount so that it does not do an Unmount RPC for NFSv4 mounts
rmacklem [Sat, 19 Nov 2016 23:58:50 +0000 (23:58 +0000)]
Modify umount so that it does not do an Unmount RPC for NFSv4 mounts
and uses TCP for the Unmount RPC if the mount is over TCP.
Without this patch, umount does an Unmount RPC over UDP for all NFS mounts.

Suggested by: cperciva
Reviewed by: cperciva
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D8503

7 years agoi386 turns out to not have __uint128_t. So confusingly use 64-bit math
imp [Sat, 19 Nov 2016 21:46:13 +0000 (21:46 +0000)]
i386 turns out to not have __uint128_t. So confusingly use 64-bit math
instead. Since we're little endian, we can get away with it. Also,
since the counters in quesitons would require billions of iops for
tens of billions of seconds to overflow, and since such data rates are
unlikely for people using i386 for a while, that's OK. The fastest
cards today can't do even a million IOPs.

Noticed by: dim@
Sponsored by: Netflix, Inc

7 years ago[dd] Revert the capsicum bits for now until it gets fixed.
adrian [Sat, 19 Nov 2016 18:19:21 +0000 (18:19 +0000)]
[dd] Revert the capsicum bits for now until it gets fixed.

dd is a bootstrap tool and that header isn't installed as part of the
bootstrap environment for previous releases (eg freebsd-10.)

We'll figure it out in post and then re-commit it.

7 years agoEnable SMP on Ingenic JZ4780.
br [Sat, 19 Nov 2016 18:03:46 +0000 (18:03 +0000)]
Enable SMP on Ingenic JZ4780.

It is required to proceed full cache flush before we can use wait
instruction on multicore, so use nop instead for now.

Submitted by: kan
Sponsored by: DARPA, AFRL

7 years agoRestore dd changes included accidentally in r308857.
br [Sat, 19 Nov 2016 17:51:02 +0000 (17:51 +0000)]
Restore dd changes included accidentally in r308857.

7 years agoBring in support for Ingenic XBurst JZ4780 and
br [Sat, 19 Nov 2016 17:46:18 +0000 (17:46 +0000)]
Bring in support for Ingenic XBurst JZ4780 and
X1000 systems on chips.

Imgtec CI20 and Ingenic CANNA boards supported.

Submitted by: Alexander Kabaev <kan@FreeBSD.org>
Reviewed by: Ruslan Bukin <br@FreeBSD.org>
Sponsored by: DARPA, AFRL

7 years agoDecode the Intel-specific Additional SMART data page (0xca) and print
imp [Sat, 19 Nov 2016 17:13:12 +0000 (17:13 +0000)]
Decode the Intel-specific Additional SMART data page (0xca) and print
it in human readable form. Include a pointer to the public spec that
was followed to implement this in the code. Samsung also implements
page 0xca on some of their drives, but the format is slighly
different, so the code skips printing zero keys. Samsung's log page
has additional, unknown data after the end of Intel defined data which
isn't displayed.

Supported by: Netfix, Inc

7 years agoImplement HGST Log page 0xc1, as documented in the HGST SN100 and
imp [Sat, 19 Nov 2016 17:13:08 +0000 (17:13 +0000)]
Implement HGST Log page 0xc1, as documented in the HGST SN100 and
SN150 product manuals. Subpage 0x32 is documented, but not implemented.

Sponsored by: Netflix, Inc

7 years agoPrint Intel's expanded Temperature log page.
imp [Sat, 19 Nov 2016 17:13:03 +0000 (17:13 +0000)]
Print Intel's expanded Temperature log page.

Sponsored by: Netflix, Inc

7 years agoAdd log pages that Intel SSDs provide. It turns out that many of these
imp [Sat, 19 Nov 2016 17:12:58 +0000 (17:12 +0000)]
Add log pages that Intel SSDs provide. It turns out that many of these
are widely implemented beyond just Intel drives.

Sponsored by: Netflix, Inc

7 years agoAdd log pages defined through NVM Express 1.2.1.
imp [Sat, 19 Nov 2016 17:12:53 +0000 (17:12 +0000)]
Add log pages defined through NVM Express 1.2.1.

Sponsored by: Netflix, Inc

7 years agoExpand the SMART / Health Information Log Page (Page 02) printout
imp [Sat, 19 Nov 2016 17:12:49 +0000 (17:12 +0000)]
Expand the SMART / Health Information Log Page (Page 02) printout
based on NVM Express 1.2.1 Standard.

Sponsored by: Netflix, Inc

7 years agoPrint numbers instead of hex values for smart data. The full 128-bit
imp [Sat, 19 Nov 2016 17:12:44 +0000 (17:12 +0000)]
Print numbers instead of hex values for smart data. The full 128-bit
number is printed, even though you'd need like a billion IOPs for a 10
billion seconds to overflow the 64-bit counters (~300 years).

Sponsored by: Netflix, Inc

7 years agoUse a table for pages we know the size of. We have a special case for
imp [Sat, 19 Nov 2016 17:12:39 +0000 (17:12 +0000)]
Use a table for pages we know the size of. We have a special case for
the error log since it isn't a fixed size.

Sponsored by: Netflix, Inc

7 years agoRemove check for valid log pages. Let the drive tell us which pages
imp [Sat, 19 Nov 2016 17:12:28 +0000 (17:12 +0000)]
Remove check for valid log pages. Let the drive tell us which pages
are valid or not. While many pages are reserved in the standard, that
doesn't make them invalid and future versions of the standard may
define then.

Sponsored by: Netflix, Inc

7 years agoAdd XBurst CPU option.
br [Sat, 19 Nov 2016 17:12:24 +0000 (17:12 +0000)]
Add XBurst CPU option.

Submitted by: kan
Sponsored by: DARPA, AFRL

7 years agoMove intrng includes to the main MIPS includes file.
br [Sat, 19 Nov 2016 17:01:06 +0000 (17:01 +0000)]
Move intrng includes to the main MIPS includes file.

Sponsored by: DARPA, AFRL

7 years agoAccount for bigger secondary data cache line size.
br [Sat, 19 Nov 2016 16:36:38 +0000 (16:36 +0000)]
Account for bigger secondary data cache line size.

Secondary data cache line size can be bigger than
primary data cache line size, so use biggest value
as a minimum alignment.

Submitted by: kan
Sponsored by: DARPA, AFRL

7 years agoloader: smbios version check is not correct
tsoome [Sat, 19 Nov 2016 16:08:40 +0000 (16:08 +0000)]
loader: smbios version check is not correct

The version check for sku and family values is not correct, as this data is
valid for version 2.4+, that also includes version 3.0 and above.

Reported by: Dan McDonald
Reviewed by: allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D8578

7 years agoAdd receiver timeout interrupt enable bit implemented in some
br [Sat, 19 Nov 2016 16:00:05 +0000 (16:00 +0000)]
Add receiver timeout interrupt enable bit implemented in some
system on chips.

Submitted by: kan
Sponsored by: DARPA, AFRL

7 years agoThe only remaining offender that used ti_chip() without checking for
cognet [Sat, 19 Nov 2016 15:43:22 +0000 (15:43 +0000)]
The only remaining offender that used ti_chip() without checking for
compatibility first was the gpio code, so change that, and re-assert
that the TI chip is a known chip

7 years agoAdd Ingenic XBurst coprocessor 0 extra bits.
br [Sat, 19 Nov 2016 15:38:13 +0000 (15:38 +0000)]
Add Ingenic XBurst coprocessor 0 extra bits.

Submitted by: kan
Sponsored by: DARPA, AFRL

7 years agoDon't panic if it's not a TI chip, this code can be called when it is not.
cognet [Sat, 19 Nov 2016 15:35:40 +0000 (15:35 +0000)]
Don't panic if it's not a TI chip, this code can be called when it is not.

7 years agoDon't attempt to get the chip revision if it's not a supported TI chip
cognet [Sat, 19 Nov 2016 15:35:10 +0000 (15:35 +0000)]
Don't attempt to get the chip revision if it's not a supported TI chip

7 years agoIdentify Ingenic CPUs.
br [Sat, 19 Nov 2016 15:10:10 +0000 (15:10 +0000)]
Identify Ingenic CPUs.

Submitted by: kan
Sponsored by: DARPA, AFRL

7 years agoAdd Ingenic X1000 DTS files (unofficial).
br [Sat, 19 Nov 2016 15:03:49 +0000 (15:03 +0000)]
Add Ingenic X1000 DTS files (unofficial).

This is based on JZ4780 due to missing original X1000 parts.

Sponsored by: DARPA, AFRL

7 years agoOn H3, initialize alarm and shutdown trip points and do temperature
jmcneill [Sat, 19 Nov 2016 14:56:22 +0000 (14:56 +0000)]
On H3, initialize alarm and shutdown trip points and do temperature
conversion as it is done in the BSP.

7 years agoEnsure that TCP state changes to state-closing are reported via dtrace.
tuexen [Sat, 19 Nov 2016 14:45:08 +0000 (14:45 +0000)]
Ensure that TCP state changes to state-closing are reported via dtrace.
This does not cover state changes from TIME-WAIT.

Reviewed by: gnn
MFC after: 3 weeks
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D8443

7 years agoMake fdt_is_compatible a static function. It's only used in fdt_common.c.
andrew [Sat, 19 Nov 2016 13:57:21 +0000 (13:57 +0000)]
Make fdt_is_compatible a static function. It's only used in fdt_common.c.

Sponsored by: ABT Systems Ltd

7 years agoMove the pandaboard initialization from the probe to the attach method.
cognet [Sat, 19 Nov 2016 13:11:03 +0000 (13:11 +0000)]
Move the pandaboard initialization from the probe to the attach method.
Use ofw_bus_node_is_compatible instead of fdt_is_compatible, as the
later is deprecated.

Suggested by: andrew

7 years agolsdev device name section headers should be printed by dv_print callback.
tsoome [Sat, 19 Nov 2016 08:54:21 +0000 (08:54 +0000)]
lsdev device name section headers should be printed by dv_print callback.

lsdev command does walk over devsw list, prints list element name and
will use dv_print() callback to print the device list.
Unfortunately this approach will add unneeded noise when there are no
particular devices detected.

To remove "empty" device section headers, the dv_print() callback
should print the header instead.

In addition, fixed dv_print callback for md module.

Reviewed by: imp
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D8551

7 years agozfs: fix up after the removal of PG_CACHED pages in r308691
avg [Sat, 19 Nov 2016 08:12:57 +0000 (08:12 +0000)]
zfs: fix up after the removal of PG_CACHED pages in r308691

PR: 214629
Reported by: mshirk@daemon-security.com
Reviewed by: alc
Tested by: Shawn Webb <shawn.webb@hardenedbsd.org>
X-MFC with: 308691

7 years agoFor RTL8812AU:
kevlo [Sat, 19 Nov 2016 07:28:00 +0000 (07:28 +0000)]
For RTL8812AU:
- The Tx power (diff) values should be signed
- Fix an off by one error when reading Tx power (diff) values

Reviewed by: avos, adrian
Differential Revision: https://reviews.freebsd.org/D8571

7 years agolocale: fix display of "grouping" and "mon_grouping" values
vangyzen [Sat, 19 Nov 2016 02:09:58 +0000 (02:09 +0000)]
locale: fix display of "grouping" and "mon_grouping" values

The "grouping" and "mon_grouping" values are arrays of one-byte
integers, not arrays of ASCII characters.  Display them in a format
similar to GNU and MacOS.

MFC after: 3 days
Sponsored by: Dell EMC

7 years ago[net80211] handle hardware encryption offload in the receive path
adrian [Sat, 19 Nov 2016 02:00:24 +0000 (02:00 +0000)]
[net80211] handle hardware encryption offload in the receive path

* teach the crypto modules about receive offload - although I have
  to do some further reviewing in places where we /can't/ have an RX key
* teach the RX data path about receive offload encryption - check the flag,
  handle NULL key, do decap and checking as appropriate.

Tested:

* iwn(4), STA mode
* ath(4), STA and AP mode
* ath10k port, STA mode (hardware encryption)

Reviewed by: avos
Differential Revision: https://reviews.freebsd.org/D8533

7 years agoResolv the remaining conflicting symbols between omap4 and am335x, and
cognet [Sat, 19 Nov 2016 01:51:56 +0000 (01:51 +0000)]
Resolv the remaining conflicting symbols between omap4 and am335x, and
add omap4/pandaboard into the GENERIC kernel.

7 years agoMFamd64: Various fatal page fault fixes.
jhb [Sat, 19 Nov 2016 01:36:44 +0000 (01:36 +0000)]
MFamd64: Various fatal page fault fixes.

- If a page fault is triggered due to reserved bits in a PTE, treat it
  as a fatal fault and panic.
- If PG_NX is in use, report whether a fatal page fault is due to an
  instruction fetch or a data access.
- If a fatal page fault is due to reserved bits in a PTE, report that as
  the page fault type rather than a protection violation.

MFC after: 1 month

7 years agoReport page faults due to reserved bits in PTEs as a separate fault type.
jhb [Sat, 19 Nov 2016 01:34:12 +0000 (01:34 +0000)]
Report page faults due to reserved bits in PTEs as a separate fault type.

Rather than reporting a page fault due to a bad PTE as a protection
violation with the "rsv" flag, treat these faults as a separate type of
fault altogether.

MFC after: 1 month