]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoEnable the SCL and SDA i2c line for DDC.
Emmanuel Vadot [Thu, 24 Nov 2016 01:24:26 +0000 (01:24 +0000)]
Enable the SCL and SDA i2c line for DDC.
This is an undocumented register that we need to set if we do not want to
rely on u-boot or other bootloader.

7 years agoAdd new device IDs
Stephen Hurd [Thu, 24 Nov 2016 00:49:00 +0000 (00:49 +0000)]
Add new device IDs

Add device IDs for new hardware, sort the device IDs, add comment
regarding fragice NPAR/VF detection.

Approved by: davidch
MFC after: 6 days
Sponsored by: Broadcom Limited

7 years ago[rpi3] Move SOC_BRCM_BCM2837 from UP config to SMP one
Oleksandr Tymoshenko [Thu, 24 Nov 2016 00:45:52 +0000 (00:45 +0000)]
[rpi3] Move SOC_BRCM_BCM2837 from UP config to SMP one

Now that BCM283x source are buildable with SMP option it cam be moved to
GENERIC SMP config. SMP itself does not work on RPi3 yet due to lack of
PSCI monitor which is work in progress at the moment

7 years ago[rpi3] Fix SMP build for FreeBSD/arm64
Oleksandr Tymoshenko [Thu, 24 Nov 2016 00:39:17 +0000 (00:39 +0000)]
[rpi3] Fix SMP build for FreeBSD/arm64

7 years agoFix version string
Stephen Hurd [Thu, 24 Nov 2016 00:15:32 +0000 (00:15 +0000)]
Fix version string

This is no longer on github, but in FreeBSD base.

Approved by: davidch
MFC after: 6 days
Sponsored by: Broadcom Limited

7 years agortwn.4: fix hostapd(8) man page section.
Andriy Voskoboinyk [Wed, 23 Nov 2016 22:57:47 +0000 (22:57 +0000)]
rtwn.4: fix hostapd(8) man page section.

7 years agoAdd tunable to disable destructive dtrace
George V. Neville-Neil [Wed, 23 Nov 2016 22:50:20 +0000 (22:50 +0000)]
Add tunable to disable destructive dtrace

Submitted by: Joerg Pernfuss <code.jpe@gmail.com>
Reviewed by: rstone, markj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D8624

7 years agoFix _mips_rtld_bind() to handle ELF filters.
John Baldwin [Wed, 23 Nov 2016 20:21:53 +0000 (20:21 +0000)]
Fix _mips_rtld_bind() to handle ELF filters.

MIPS does not use the common _rtld_bind() to handle runtime binding.
Instead, it uses a private _mips_rtld_bind().  Update _mips_rtld_bind()
to include the changes made to _rtld_bind() in r216695 and r218476 to
support upgrading the read-locked rtld_bind_lock to a write lock when
an object with a filter is encountered.

While here, add a 'where' variable to track the location of the fixup
in the GOT to make the code flow more closely match _rtld_bind().

Reviewed by: kib
Obtained from: CheriBSD
Sponsored by: DARPA / AFRL
Differential Revision: https://reviews.freebsd.org/D8625

7 years agocache: ensure that the number of bucket locks does not exceed hash size
Mateusz Guzik [Wed, 23 Nov 2016 19:50:12 +0000 (19:50 +0000)]
cache: ensure that the number of bucket locks does not exceed hash size

The size can be changed by side effect of modifying kern.maxvnodes.

Since numbucketlocks was not modified, setting a sufficiently low value
would give more locks than actual buckets, which would then lead to
corruption.

Force the number of buckets to be not smaller.

Note this should not matter for real world cases.

Reported and tested by: pho

7 years agoFix various mdoc issues reported by mandoc -Tlint.
Christian Brueffer [Wed, 23 Nov 2016 19:19:11 +0000 (19:19 +0000)]
Fix various mdoc issues reported by mandoc -Tlint.

7 years agoFix various mdoc issues reported by mandoc -Tlint.
Christian Brueffer [Wed, 23 Nov 2016 18:45:15 +0000 (18:45 +0000)]
Fix various mdoc issues reported by mandoc -Tlint.

7 years agoEnable UEXT related nodes for Olimex A20 SOM
Emmanuel Vadot [Wed, 23 Nov 2016 18:31:34 +0000 (18:31 +0000)]
Enable UEXT related nodes for Olimex A20 SOM

UEXT are Universal EXTension connector from Olimex. They embed i2c, spi
and uart pins along power in one connector and are found on most,
if not all, Olimex boards.
The Olimex A20 SOM EVB have two UEXT connector so enable the nodes found on
those two connectors.

Patch has been applied upstream, in the meantime add the nodes to our custom
DTS.

7 years agoTest that the emac device is enabled in probe function
Emmanuel Vadot [Wed, 23 Nov 2016 18:07:44 +0000 (18:07 +0000)]
Test that the emac device is enabled in probe function

MFC after: 3 days

7 years agoRelease laundered vnode pages to the head of the inactive queue.
Mark Johnston [Wed, 23 Nov 2016 17:53:07 +0000 (17:53 +0000)]
Release laundered vnode pages to the head of the inactive queue.

The swap pager enqueues laundered pages near the head of the inactive queue
to avoid another trip through LRU before reclamation. This change adds
support for this behaviour to the vnode pager and makes use of it in UFS and
ext2fs. Some ioflag handling is consolidated into a common subroutine so
that this support can be easily extended to other filesystems which make use
of the buffer cache. No changes are needed for ZFS since its putpages
routine always undirties the pages before returning, and the laundry
thread requeues the pages appropriately in this case.

Reviewed by: alc, kib
Differential Revision: https://reviews.freebsd.org/D8589

7 years agoFix comment typo.
Christian Brueffer [Wed, 23 Nov 2016 16:54:27 +0000 (16:54 +0000)]
Fix comment typo.

PR: 208484
Submitted by: madpilot
MFC after: 1 week

7 years ago- Add myself (misha) as a ports committer
Mikhail Pchelin [Wed, 23 Nov 2016 14:15:51 +0000 (14:15 +0000)]
- Add myself (misha) as a ports committer
- Update mentor/mentee relationships

Approved by: jpaetzel (mentor)

7 years agoSplit MALTA board config to big and little endian versions.
Ruslan Bukin [Wed, 23 Nov 2016 11:56:22 +0000 (11:56 +0000)]
Split MALTA board config to big and little endian versions.

This fixes compilation after r308807 ("Pass MACHINE_ARCH on
command line for MIPS kernels.")

Sponsored by: DARPA, AFRL

7 years agoIncrease pcpu size to 512 so it become both denominator
Ruslan Bukin [Wed, 23 Nov 2016 11:30:40 +0000 (11:30 +0000)]
Increase pcpu size to 512 so it become both denominator
of PAGE_SIZE and aligned to CACHE_LINE_SIZE.

This fixes CTASSERT.

Sponsored by: DARPA, AFRL

7 years agoRemove debugging code.
Dag-Erling Smørgrav [Wed, 23 Nov 2016 10:52:19 +0000 (10:52 +0000)]
Remove debugging code.

7 years agoMark cpu_find_cpu0_fdt as FDT only. It's only called when this is set, and
Andrew Turner [Wed, 23 Nov 2016 09:38:10 +0000 (09:38 +0000)]
Mark cpu_find_cpu0_fdt as FDT only. It's only called when this is set, and
the kernel is using FDT.

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

7 years agoRemove the unneeded ofw_cpu_reg function signature, it's not used in this
Andrew Turner [Wed, 23 Nov 2016 09:33:47 +0000 (09:33 +0000)]
Remove the unneeded ofw_cpu_reg function signature, it's not used in this
file.

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

7 years agohyperv/vmbus: Merge free/active locks.
Sepherosa Ziehau [Wed, 23 Nov 2016 08:30:02 +0000 (08:30 +0000)]
hyperv/vmbus: Merge free/active locks.

These functions are only used by management stuffs, so there are
no needs to introduce extra complexity.

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

7 years agoThis little BSD licensed library has been kicking around for years.
Julian Elischer [Wed, 23 Nov 2016 07:57:52 +0000 (07:57 +0000)]
This little BSD licensed library has been kicking around for years.
It allows one to trivially convert an absolute path to a relative path
and the reverse. The test programs themselves are very useful in scripts
but the real use comes shortly with the -r and -a arguments to ln.
These are sometimes known as the --relative and --absolute flags and
can force a symlink to be relative when you only have an absolue path.
Another place these are sometimes used is to add -a and -r args to 'realpath'.
Incredibly useful in Makefiles.

I was going to just add the files in with 'ln' but a library makes more sense.
The test programs may come out in their own right some day for scripting.

released under a BSD 2-clause:
 * Copyright (c) 1997 Shigio Yamaguchi. All rights reserved.
 * Copyright (c) 1999 Tama Communications Corporation. All rights reserved.

The test directry does not conform to any framework.
Not connected to build.
doc people may want to play with the manual pages.

Obtained from:  https://www.tamacom.com/pathconvert.html  Shigio Yamaguchi.
MFC after: 1 month
Relnotes:       yes
Sponsored by:   Panzura, Tama Communications Corporation

7 years agohyperv/vmbus: Set a mark on the revoked channel.
Sepherosa Ziehau [Wed, 23 Nov 2016 05:03:44 +0000 (05:03 +0000)]
hyperv/vmbus: Set a mark on the revoked channel.

This will be used to fix device detach DEVMETHOD for revoked primary
channel.

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

7 years agoDo not attempt to disable/release clock if it had not been enabled.
Emmanuel Vadot [Wed, 23 Nov 2016 01:44:28 +0000 (01:44 +0000)]
Do not attempt to disable/release clock if it had not been enabled.
While here fix a style(9) issue.

MFC after: 1 week

7 years agoAdd missing break to switch statement
Stephen Hurd [Wed, 23 Nov 2016 00:26:31 +0000 (00:26 +0000)]
Add missing break to switch statement

Minimal impact, would allow selection of LR media when KR is connected.

Reported by: Coverity
Approved by: davidch
MFC after: 7 days
Sponsored by: Broadcom Limited

7 years agoAllocate a struct ifreq rather than using a (wrong) computed size for
Brooks Davis [Tue, 22 Nov 2016 22:45:15 +0000 (22:45 +0000)]
Allocate a struct ifreq rather than using a (wrong) computed size for
the BIOCSETIF ioctl.

The kernel always copies an entire struct ifreq and IPv4 addresses will
always fit in an ifreq.

On systems with pointers larger than 64-bits, the computed size will be
less than the size of struct ifreq, potentially resulting in the kernel
attempting to copyin memory from outside the allocation.

Reviewed by: jhb
Obtained from: CheriBSD
MFC after: 1 week
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D8445

7 years agoopen(2): Clarify non-POSIX error when opening a symlink with O_NOFOLLOW.
Jilles Tjoelker [Tue, 22 Nov 2016 22:30:55 +0000 (22:30 +0000)]
open(2): Clarify non-POSIX error when opening a symlink with O_NOFOLLOW.

We return [EMLINK] instead of [ELOOP] when trying to open a symlink with
O_NOFOLLOW, so that the original case of [ELOOP] can be distinguished. Code
like cmp -h and xz takes advantage of this.

PR: 214633
Reviewed by: kib, imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8586

7 years agoPass the correct size argument to ioctl(DIOCGSECTORSIZE)
Poul-Henning Kamp [Tue, 22 Nov 2016 22:10:58 +0000 (22:10 +0000)]
Pass the correct size argument to ioctl(DIOCGSECTORSIZE)

7 years agoAdd the missing DEVMETHOD_ENDs to the arm64 nexus ACPI and FDT drivers.
Andrew Turner [Tue, 22 Nov 2016 19:31:32 +0000 (19:31 +0000)]
Add the missing DEVMETHOD_ENDs to the arm64 nexus ACPI and FDT drivers.

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

7 years agoAdd myself (dab) as a src committer and vangyzen as my mentor.
David Bright [Tue, 22 Nov 2016 18:32:20 +0000 (18:32 +0000)]
Add myself (dab) as a src committer and vangyzen as my mentor.

Approved by: vangyzen (mentor)

7 years agoRevert r306186 ("Adjust the sopt_val pointer on bigendian systems").
Ruslan Bukin [Tue, 22 Nov 2016 18:31:43 +0000 (18:31 +0000)]
Revert r306186 ("Adjust the sopt_val pointer on bigendian systems").

This logic doesn't work with bigger sopt_valsize (e.g. when ipfw
passing 2048 bytes rule).

Reported by: adrian
Sponsored by: DARPA, AFRL

7 years agoRemove PG_CACHED-related fields from struct vmmeter, because they are no
Alan Cox [Tue, 22 Nov 2016 18:13:46 +0000 (18:13 +0000)]
Remove PG_CACHED-related fields from struct vmmeter, because they are no
longer used.  More precisely, they are always zero because the code that
decremented and incremented them no longer exists.

Bump __FreeBSD_version to mark this change.

Reviewed by: kib, markj
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8583

7 years agoOnly build acpi_timer.c on x86, it fails on arm64 as it attempts to access
Andrew Turner [Tue, 22 Nov 2016 18:13:04 +0000 (18:13 +0000)]
Only build acpi_timer.c on x86, it fails on arm64 as it attempts to access
an invalid address. It is also unneeded on arm64 as we use the ARM Generic
Timer driver.

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

7 years ago[net80211] high oops on the high seas, or "god damnit compilers, it's 2016 and you...
Adrian Chadd [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
Ed Maste [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
Dag-Erling Smørgrav [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.
Konstantin Belousov [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
Andriy Gapon [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.
Konstantin Belousov [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.
Konstantin Belousov [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.
Konstantin Belousov [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 Turner [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.
Xin LI [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:
Xin LI [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 Chadd [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.
Xin LI [Tue, 22 Nov 2016 06:28:26 +0000 (06:28 +0000)]
Vendor import of ntp-4.2.8p9.

7 years agoMerge ACPICA 20161117.
Jung-uk Kim [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 Chadd [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 Chadd [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 Chadd [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 Chadd [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.
John Baldwin [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,
Robert Watson [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.
Glen Barber [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 Panchasara [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 Panchasara [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)
Oleksandr Tymoshenko [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
Oleksandr Tymoshenko [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
Oleksandr Tymoshenko [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 Turner [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 Turner [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
Michael Zhilin [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 Turner [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 Turner [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 Turner [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 Turner [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 Turner [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.
Ruslan Bukin [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
Ruslan Bukin [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
Sean Bruno [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
Konstantin Belousov [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.
Ruslan Bukin [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 Turner [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 Turner [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.
Kevin Lo [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.
Sepherosa Ziehau [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.
Sepherosa Ziehau [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
Sepherosa Ziehau [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.
Sepherosa Ziehau [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.
Sepherosa Ziehau [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()
Eric van Gyzen [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
Jared McNeill [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.
Jared McNeill [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.
Jared McNeill [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.
Jared McNeill [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
Oleksandr Tymoshenko [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
Oleksandr Tymoshenko [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
Emmanuel Vadot [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 Tjoelker [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
Emmanuel Vadot [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
Andriy Gapon [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
Poul-Henning Kamp [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
Justin Hibbits [Sun, 20 Nov 2016 06:11:30 +0000 (06:11 +0000)]
Actually bump __FreeBSD_version

7 years agoFix buildworld for powerpc.
Justin Hibbits [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
Alexander Kabaev [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
Rick Macklem [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
Warner Losh [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 Chadd [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.
Ruslan Bukin [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