]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agohyperv/hn: Fix multi-packet RNDIS message aggregation size setting.
sephe [Mon, 28 Nov 2016 05:31:36 +0000 (05:31 +0000)]
hyperv/hn: Fix multi-packet RNDIS message aggregation size setting.

Just in case that no chimney sending buffer can be used.

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

7 years agohyperv/hn: Fix detach error handling.
sephe [Mon, 28 Nov 2016 05:23:57 +0000 (05:23 +0000)]
hyperv/hn: Fix detach error handling.

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

7 years agohyperv/hn: Utilize vmbus_chan_xact_wait
sephe [Mon, 28 Nov 2016 05:15:28 +0000 (05:15 +0000)]
hyperv/hn: Utilize vmbus_chan_xact_wait

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

7 years agohyperv/vmbus: Add supportive transaction wait function.
sephe [Mon, 28 Nov 2016 05:07:48 +0000 (05:07 +0000)]
hyperv/vmbus: Add supportive transaction wait function.

This function supports channel revocation properly.

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

7 years agohyperv/vmbus: Zero out GPADL if error happens.
sephe [Mon, 28 Nov 2016 04:53:36 +0000 (04:53 +0000)]
hyperv/vmbus: Zero out GPADL if error happens.

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

7 years ago[ath] fix target beacon interval programming for STA mode when in powersave.
adrian [Mon, 28 Nov 2016 02:59:33 +0000 (02:59 +0000)]
[ath] fix target beacon interval programming for STA mode when in powersave.

This bug has been bugging me for quite some time.  I finally sat down
with enough coffee to figure it out.

The short of it - rounding up to the next intval multiple of the TSF value
only works if the AP is transmitting all its beacons on an interval of
the TSF.  If it isn't - for example, doing staggered beacons on a multi-VAP
setup with a single hardware TSF - then weird things occur.

The long of it -

When powersave is enabled, the MAC and PHY are partially powered off.
They can't receive any packets (or transmit, for that matter.)
The target beacon timer programming will wake up the MAC/PHY just before
the beacon is supposed to be received (well, strictly speaking, at DTIM
so it can see the TIM - traffic information map - telling the STA whether
any traffic is there for it) and it happens automatically.

However, this relies on the target beacon time being programmed correctly.
If it isn't then the hardware will wake up and not hear any beacons -
and then it'll be asleep for said beacons.  After enough of this, net80211
will give up and assume the AP went away.

This should fix both TSFOOR interrupts and disconnects from APs with powersave
enabled.

The annoying bit is that it only happens if APs stagger things or start
on a non-zero TSF.  So, this would sometimes be fine and sometimes not be
fine.

What:

* I don't know (yet) why the code rounds up to the next intval.
  For now, just disable rounding it and trust the value we get.

TODO:

* If we do see a beacon miss in STA mode then we should transition
  out of sleep for a while so we can hear beacons to resync against.
  I'd love a patch from someone to enable that particular behaviour.
  Note - that doesn't require that net80211 brings the chip out of
  sleep state - only that we wake the chip up through to full-on and
  then let it go to sleep again when we've seen a beacon.  The wifi
  stack and AP can still completely just stay believing we're in sleep
  mode.

Tested:

* AR9485, STA mode, powersave enabled

MFC after: 1 week
Relnotes: Yes

7 years ago[ath] include logging of TU versions of the TSF values.
adrian [Mon, 28 Nov 2016 02:51:55 +0000 (02:51 +0000)]
[ath] include logging of TU versions of the TSF values.

The beacon programming side of things deals in TUs and 1/8th TUs, so
it's good to se the TU value here when debugging beaconing issues.

7 years agoindent(1): Properly handle the wide string literal and wide char constant L.
pfg [Sun, 27 Nov 2016 20:38:14 +0000 (20:38 +0000)]
indent(1): Properly handle the wide string literal and wide char constant L.

indent(1) treated the "L" in "L'a'" as if it were an identifier and forced
a space character after it, breaking valid code.

PR: 143090
MFC after: 2 weeks

7 years agoindent(1): fix regression introduced in r303596.
pfg [Sun, 27 Nov 2016 20:30:09 +0000 (20:30 +0000)]
indent(1): fix regression introduced in r303596.

Multi-line comments are always block comments in KNF. Restore properly,
handling the case when a long one-liner gets wrapped and becomes a
multi-line comment.

Obtained from: Piotr Stefaniak

7 years agoindent(1): minor off-by-one error.
pfg [Sun, 27 Nov 2016 20:11:55 +0000 (20:11 +0000)]
indent(1): minor off-by-one error.

This was introduced in r303571.

Obtianed from: Piotr Stefaniak

7 years agoProperly initialize nextp
bapt [Sun, 27 Nov 2016 19:27:13 +0000 (19:27 +0000)]
Properly initialize nextp

MFC after: 1 day

7 years ago[ath] Begin to lay the groundwork for btcoex related ioctl controls.
adrian [Sun, 27 Nov 2016 18:34:29 +0000 (18:34 +0000)]
[ath] Begin to lay the groundwork for btcoex related ioctl controls.

7 years agorsu: add support for hardware multicast filter setup.
avos [Sun, 27 Nov 2016 18:06:03 +0000 (18:06 +0000)]
rsu: add support for hardware multicast filter setup.

The algorithm is the same as in rtwn(4).

Tested with Asus USB-N10 (STA) + RTL8188CUS (AP).

7 years agoAdd a few missed clang 3.9.0 files to OptionalObsoleteFiles.
dim [Sun, 27 Nov 2016 14:19:19 +0000 (14:19 +0000)]
Add a few missed clang 3.9.0 files to OptionalObsoleteFiles.

X-MFC-With: 309149

7 years agoFix spelling.
hselasky [Sun, 27 Nov 2016 12:04:54 +0000 (12:04 +0000)]
Fix spelling.

7 years agorsu: various scanning fixes.
avos [Sun, 27 Nov 2016 12:03:34 +0000 (12:03 +0000)]
rsu: various scanning fixes.

- Set IEEE80211_FEXT_SCAN_OFFLOAD flag; firmware can send null data
frames when associated.
- Check IEEE80211_SCAN_ACTIVE scan flag instead of IEEE80211_F_ASCAN
ic flag; the last is never set since r170530.
- Eliminate software scan (net80211) <-> site_survey (driver) race:
 * override ic_scan_curchan and ic_scan_mindwell pointers so net80211
will not try to finish scanning automatically;
 * inform net80211 about current status via ieee80211_cancel_scan()
and ieee80211_scan_done();
 * remove corresponding workaround from rsu_join_bss().

Now the driver can associate to an AP with hidden SSID.

Tested with Asus USB-N10.

7 years agoNFSv4 client tracks opens, and the track records are only dropped when
kib [Sun, 27 Nov 2016 09:20:58 +0000 (09:20 +0000)]
NFSv4 client tracks opens, and the track records are only dropped when
the vnode is inactivated.  This contradicts with the nullfs caching
which keeps upper vnode around, as consequence keeping the use
reference to lower vnode.

Add a filesystem flag to request nullfs to not cache when mounted over
that filesystem, and set the flag for nfs v4 mounts.

Reported by: asomers
Reviewed by: rmacklem
Tested by: asomers, rmacklem
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoThe function vm_page_cache() no longer exists. Remove its man page.
alc [Sun, 27 Nov 2016 01:44:31 +0000 (01:44 +0000)]
The function vm_page_cache() no longer exists.  Remove its man page.

7 years agoRecursion on the free page queue mutex occurred when UMA needed to allocate
alc [Sun, 27 Nov 2016 01:42:53 +0000 (01:42 +0000)]
Recursion on the free page queue mutex occurred when UMA needed to allocate
a new page of radix trie nodes to complete a vm_radix_insert() operation
that was requested by vm_page_cache().  Specifically, vm_page_cache()
already held the free page queue lock when UMA tried to acquire it through
a call to vm_page_alloc().  This code path no longer exists, so there is no
longer any reason to allow recursion on the free page queue mutex.

Improve nearby comments.

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

7 years agobhnd(4): Unify NVRAM/SPROM parsing, implement compact SPROM layout encoding.
landonf [Sat, 26 Nov 2016 23:22:32 +0000 (23:22 +0000)]
bhnd(4): Unify NVRAM/SPROM parsing, implement compact SPROM layout encoding.

- Defined an abstract NVRAM I/O API (bhnd_nvram_io), decoupling NVRAM/SPROM
  parsing from the actual underlying NVRAM data provider (e.g. CFE firmware
  devices).
- Defined an abstract NVRAM data API (bhnd_nvram_data), decoupling
  higher-level NVRAM operations (indexed lookup, data conversion, etc) from
  the underlying NVRAM file format parsing/serialization.
- Implemented a new high-level bhnd_nvram_store API, providing indexed
  variable lookup, pending write tracking, etc on top of an arbitrary
  bhnd_nvram_data instance.
- Migrated all bhnd(4) NVRAM device drivers to the common bhnd_nvram_store
  API.
- Implemented a common bhnd_nvram_val API for parsing/encoding NVRAM
  variable values, including applying format-specific behavior when
  converting to/from the NVRAM string representations.
- Dropped the now unnecessary bhnd_nvram driver, and moved the
  broadcom/mips-specific CFE NVRAM driver out into sys/mips/broadcom.
- Implemented a new nvram_map file format:
        - Variable definitions are now defined separately from the SPROM
          layout. This will also allow us to define CIS tuple NVRAM
          mappings referencing the common NVRAM variable definitions.
        - Variables can now be defined within arbitrary named groups.
        - Textual descriptions and help information can be defined inline
          for both variables and variable groups.
        - Implemented a new, compact encoding of SPROM image layout
          offsets.
- Source-level (but not build system) support for building the NVRAM file
  format APIs (bhnd_nvram_io, bhnd_nvram_data, bhnd_nvram_store) as a
  userspace library.

The new compact SPROM image layout encoding is loosely modeled on Apple
dyld compressed LINKEDIT symbol binding opcodes; it provides a compact
state-machine encoding of the mapping between NVRAM variables and the SPROM
image offset, mask, and shift instructions necessary to decode or encode
the SPROM variable data.

The compact encoding reduces the size of the generated SPROM layout data
from roughly 60KB to 3KB. The sequential nature SPROM layout opcode tables
also simplify iteration of the SPROM variables, as it's no longer
neccessary to iterate the full NVRAM variable definition table, but
instead simply scan the SPROM revision's layout opcode table.

Approved by:    adrian (mentor)
Differential Revision:  https://reviews.freebsd.org/D8645

7 years agoAdd a missing header
scottl [Sat, 26 Nov 2016 23:15:11 +0000 (23:15 +0000)]
Add a missing header

7 years agoLaunder VPO_NOSYNC pages upon vnode deactivation.
markj [Sat, 26 Nov 2016 21:00:27 +0000 (21:00 +0000)]
Launder VPO_NOSYNC pages upon vnode deactivation.

As of r234483, vnode deactivation causes non-VPO_NOSYNC pages to be
laundered. This behaviour has two problems:

1. Dirty VPO_NOSYNC pages must be laundered before the vnode can be
   reclaimed, and this work may be unfairly deferred to the vnlru process
   or an unrelated application when the system is under vnode pressure.
2. Deactivation of a vnode with dirty VPO_NOSYNC pages requires a scan of
   the corresponding VM object's memq for non-VPO_NOSYNC dirty pages; if
   the laundry thread needs to launder pages from an unreferenced such
   vnode, it will reactivate and deactivate the vnode with each laundering,
   potentially resulting in a large number of expensive scans.

Therefore, ensure that all dirty pages are laundered upon deactivation,
i.e., when all maps of the vnode are removed and all references are
released.

Reviewed by: alc, kib
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D8641

7 years agoUse November instead of the abbreviation.
rmacklem [Sat, 26 Nov 2016 20:58:05 +0000 (20:58 +0000)]
Use November instead of the abbreviation.

Requested by: Ed Shouten
MFC after: 2 weeks

7 years agoDocument the -E flag for nfsstat.
rmacklem [Sat, 26 Nov 2016 20:53:22 +0000 (20:53 +0000)]
Document the -E flag for nfsstat.
This is a content change.

Reviewed by: bcr
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D8626

7 years agoAdd a -E flag to nfsstat.c so that it prints out the NFSv4.1
rmacklem [Sat, 26 Nov 2016 20:47:11 +0000 (20:47 +0000)]
Add a -E flag to nfsstat.c so that it prints out the NFSv4.1
procedure/operation counts.
It also avoids clipping the counts at 9 digits.

Reviewed by: bcr (doc parts)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D8626

7 years agorsu: fix R92S_TXDW1_QSEL_H2C definition (0x1f -> 0x13).
avos [Sat, 26 Nov 2016 20:26:29 +0000 (20:26 +0000)]
rsu: fix R92S_TXDW1_QSEL_H2C definition (0x1f -> 0x13).

Without this fix firmware ignores all but first 32 commands
(= almost everything (except plain Tx / Rx) stops working).

Tested with ASUS USB-N10.

7 years agoAdd an ethernet0 alias pointing to the /aix/usb/hub/ethernet node. This
ian [Sat, 26 Nov 2016 17:55:46 +0000 (17:55 +0000)]
Add an ethernet0 alias pointing to the /aix/usb/hub/ethernet node.  This
is required for u-boot to locate the ethernet node when it's doing fixup
of the mac-address property when the user has overridden the default addr.

7 years agoinitialize *nextp which could be left uninitialized in case the configuration
bapt [Sat, 26 Nov 2016 15:49:59 +0000 (15:49 +0000)]
initialize *nextp which could be left uninitialized in case the configuration
file cannot be open/read

Reported by: Coverity via cem
MFC after: 2 days
CID: 1365665

7 years agoFix null dereference when running out of nodes during rename.
sevan [Sat, 26 Nov 2016 13:26:29 +0000 (13:26 +0000)]
Fix null dereference when running out of nodes during rename.

PR: 212370
Submitted by: Sascha Wildner <swildner AT gmail>
Reviewed by: bcr (mentor)
Approved by: bapt
Obtained from: NetBSD
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D8643

7 years agofdt: Expect strchr() to return a const char*
rakuco [Sat, 26 Nov 2016 12:36:11 +0000 (12:36 +0000)]
fdt: Expect strchr() to return a const char*

In C, strchr(3) returns a char*, whereas C++ defines two overloads:
* const char *strchr(const char*, int)
* char *strchr(char*, int)

Building fdt.cc (with the WITHOUT_GPL_DTC knob set) with libc++ 3.9.0 (imported
in r309124) was failing because libc++ r260377 added the first overload to
string.h, leading to failures such as:

    fdt.cc:1638:8: error: cannot initialize a variable of type 'char *' with an
    rvalue of type 'const char *'

Just define val as a const char* to fix it.

Upstreamed in https://github.com/davidchisnall/dtc/pull/14

Reviewed by: emaste
Approved by: emaste

7 years agoPLL3 have a fractional mode where an explicit frequency (297Mhz or 270)
manu [Sat, 26 Nov 2016 10:36:48 +0000 (10:36 +0000)]
PLL3 have a fractional mode where an explicit frequency (297Mhz or 270)
can be selected for it. If the desired frequency is one of those two, use
this mode instead of the integer one.
When calculating the PLL3 freq for the dotclock, check if it is a multiple
of the fracional frequencies.

MFC after: 2 weeks

7 years agoFix automatic eventtimer hardware selection when ARAT
kib [Sat, 26 Nov 2016 10:33:53 +0000 (10:33 +0000)]
Fix automatic eventtimer hardware selection when ARAT
(APIC-Timer-always-running) is not implemented.

If machine has ncpus >= 8 and non-FSB interrupt routing from HPET,
default HPET eventtimer quality 450 is reduced by 100, i.e. it is
350. On the other hand, LAPIC default quality is 600 and it is reduced
by 200 if ARAT is not reported. We end up with HPET quality 350 <
LAPIC quality 400, despite ARAT is not set.  Then, since deep Cx
states are active by default, eventtimer fail.

E.g., on Nehalem Core i7 CPU and X58 chipset, LAPIC only works in
C0/C1/C1E and HPET does not implement FSB mode, which otherwise
requires manual switch to HPET to get working system.

Set LAPIC eventtimer quality to 100 if no ARAT.
While there, do not ignore deadlint TSC mode for LAPIC timer if ARAT
is not implemented.  If user manually selected LAPIC eventtimer on
such CPU, there is no reason to not use deadline if available and not
disabled administratively.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoDon't build Ingenic kernels until we have non-static FDT support
br [Sat, 26 Nov 2016 10:20:33 +0000 (10:20 +0000)]
Don't build Ingenic kernels until we have non-static FDT support
for them.

Sponsored by: DARPA, AFRL

7 years agoFix ICMPv6 Time Exceeded error message translation.
ae [Sat, 26 Nov 2016 10:04:05 +0000 (10:04 +0000)]
Fix ICMPv6 Time Exceeded error message translation.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

7 years agostyle(9) indent changes, no actual code change.
delphij [Sat, 26 Nov 2016 07:02:44 +0000 (07:02 +0000)]
style(9) indent changes, no actual code change.

MFC after: 2 weeks

7 years agoext2: avoid possible overflow when calculating malloc size.
pfg [Sat, 26 Nov 2016 02:06:33 +0000 (02:06 +0000)]
ext2: avoid possible overflow when calculating malloc size.

This is inspired on r308064 for case of reloading UFS.

MFC after: 1 week

7 years agonetipsec: fix build after 309144
emaste [Sat, 26 Nov 2016 00:59:01 +0000 (00:59 +0000)]
netipsec: fix build after 309144

Reported by: rakuco

7 years agoStop "nfsstat -z" from clearing counts of NFSv4 state structures.
rmacklem [Fri, 25 Nov 2016 23:28:09 +0000 (23:28 +0000)]
Stop "nfsstat -z" from clearing counts of NFSv4 state structures.

The "-z" option on nfsstats was erroneously zeroing out the counts
of NFSv4 state structures. These counts will normally go back down
to zero as state is released. When zeroed out by "-z", these counts
can go negative. This patch fixes this problem.

MFC after: 2 weeks

7 years agoAdd an isync to after mtsrin, required by the MPC750 errata
jhibbits [Fri, 25 Nov 2016 19:36:27 +0000 (19:36 +0000)]
Add an isync to after mtsrin, required by the MPC750 errata

MPC750 User Manual Errata (rev 1) adds a note to C.4.2.2 noting that mtsr,
mtsrin, and mtmsr all require a isync after the instruction and before data
address translation uses any of the segment registers.  This should make FreeBSD
run correctly on the G3 again.

Reported by: Mark Millard
MFC after: 1 week

7 years agoUse explicit 0x200000 instead of MAXPAGESIZE for the amd64 kernel physaddr
emaste [Fri, 25 Nov 2016 18:57:14 +0000 (18:57 +0000)]
Use explicit 0x200000 instead of MAXPAGESIZE for the amd64 kernel physaddr

MAXPAGESIZE is not well defined by the GNU ld documentation.
Different linkers, and different versions of the same linker, use
different MAXPAGESIZE values. Current versions of GNU gold and LLVM's
lld use 4K. When set to 4K the kernel panics at boot due to an issue
with x86bios.

Here we want the kernel physaddr to be the amd64 superpage size, so use
that value (2MB) explicitly. With this change GNU gold and LLVM lld can
link a working amd64 kernel.

PR: 214718 (x86bios)
Differential Revision: https://reviews.freebsd.org/D8610

7 years agoBump FREEBSD_CC_VERSION again for r309147 and 309149.
dim [Fri, 25 Nov 2016 18:12:57 +0000 (18:12 +0000)]
Bump FREEBSD_CC_VERSION again for r309147 and 309149.

7 years agoPull in r283060 from upstream llvm trunk (by Hal Finkel):
dim [Fri, 25 Nov 2016 18:12:13 +0000 (18:12 +0000)]
Pull in r283060 from upstream llvm trunk (by Hal Finkel):

  [PowerPC] Refactor soft-float support, and enable PPC64 soft float

  This change enables soft-float for PowerPC64, and also makes
  soft-float disable all vector instruction sets for both 32-bit and
  64-bit modes. This latter part is necessary because the PPC backend
  canonicalizes many Altivec vector types to floating-point types, and
  so soft-float breaks scalarization support for many operations. Both
  for embedded targets and for operating-system kernels desiring
  soft-float support, it seems reasonable that disabling hardware
  floating-point also disables vector instructions (embedded targets
  without hardware floating point support are unlikely to have Altivec,
  etc. and operating system kernels desiring not to use floating-point
  registers to lower syscall cost are unlikely to want to use vector
  registers either). If someone needs this to work, we'll need to
  change the fact that we promote many Altivec operations to act on
  v4f32. To make it possible to disable Altivec when soft-float is
  enabled, hardware floating-point support needs to be expressed as a
  positive feature, like the others, and not a negative feature,
  because target features cannot have dependencies on the disabling of
  some other feature. So +soft-float has now become -hard-float.

  Fixes PR26970.

Pull in r283061 from upstream clang trunk (by Hal Finkel):

  [PowerPC] Enable soft-float for PPC64, and +soft-float -> -hard-float

  Enable soft-float support on PPC64, as the backend now supports it.
  Also, the backend now uses -hard-float instead of +soft-float, so set
  the target features accordingly.

  Fixes PR26970.

Reported by: Mark Millard
PR: 214433

7 years agoPermit timed sleeps for threads other than thread0 before timers are working.
jhb [Fri, 25 Nov 2016 18:02:43 +0000 (18:02 +0000)]
Permit timed sleeps for threads other than thread0 before timers are working.

The callout subsystem already handles early callouts and schedules
the first clock interrupt appropriately based on the currently pending
callouts.  The one nit to fix was that callouts scheduled via C_HARDCLOCK
during early boot could fire too early once timers were enabled as the
per-CPU base time is always zero until timers are initialized.  The change
in callout_when() handles this case by using the current uptime as the
base time of the callout during bootup if the per-CPU base time is zero.

Reviewed by: kib
MFC after: 2 weeks
Sponsored by: Netflix

7 years agoPull in r282174 from upstream llvm trunk (by Krzysztof Parzyszek):
dim [Fri, 25 Nov 2016 18:01:32 +0000 (18:01 +0000)]
Pull in r282174 from upstream llvm trunk (by Krzysztof Parzyszek):

  [PPC] Set SP after loading data from stack frame, if no red zone is
  present

  Follow-up to r280705: Make sure that the SP is only restored after
  all data is loaded from the stack frame, if there is no red zone.

  This completes the fix for
  https://llvm.org/bugs/show_bug.cgi?id=26519.

  Differential Revision: https://reviews.llvm.org/D24466

Reported by:    Mark Millard
PR:             214433

7 years agoUpdate r309143 to prevent false sharing.
fabient [Fri, 25 Nov 2016 17:20:23 +0000 (17:20 +0000)]
Update r309143 to prevent false sharing.

Reported by: mjg
Approved by: so
MFC after: 1 month

7 years agoFix the TLB conflict abort value. This should be a no-op as we don't use
andrew [Fri, 25 Nov 2016 16:04:36 +0000 (16:04 +0000)]
Fix the TLB conflict abort value. This should be a no-op as we don't use
this value in the code.

7 years agoIPsec RFC6479 support for replay window sizes up to 2^32 - 32 packets.
fabient [Fri, 25 Nov 2016 14:44:49 +0000 (14:44 +0000)]
IPsec RFC6479 support for replay window sizes up to 2^32 - 32 packets.

Since the previous algorithm, based on bit shifting, does not scale
with large replay windows, the algorithm used here is based on
RFC 6479: IPsec Anti-Replay Algorithm without Bit Shifting.
The replay window will be fast to be updated, but will cost as many bits
in RAM as its size.

The previous implementation did not provide a lock on the replay window,
which may lead to replay issues.

Reviewed by: ae
Obtained from: emeric.poupon@stormshield.eu
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D8468

7 years agoIn a dual processor system (2*6 cores) during IPSec throughput tests,
fabient [Fri, 25 Nov 2016 13:49:33 +0000 (13:49 +0000)]
In a dual processor system (2*6 cores) during IPSec throughput tests,
we see a lot of contention on the arc4 lock, used to generate the IV
of the ESP output packets.

The idea of this patch is to split this mutex in order to reduce the
contention on this lock.

Reviewed by: delphij, markm, ache
Approved by: so
Obtained from: emeric.poupon@stormshield.eu
MFC after: 1 month
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D8130

7 years agoAdd WITH_LLD_AS_LD build knob
emaste [Fri, 25 Nov 2016 13:15:28 +0000 (13:15 +0000)]
Add WITH_LLD_AS_LD build knob

If set it installs LLD as /usr/bin/ld.  LLD (as of version 3.9) is not
capable of linking the world and kernel, but can self-host and link many
substantial applications. GNU ld continues to be used for the world and
kernel build, regardless of how this knob is set.

It is on by default for arm64, and off for all other CPU architectures.

Sponsored by: The FreeBSD Foundation

7 years agohyperv/vmbus: Add a simplified version of channel close.
sephe [Fri, 25 Nov 2016 09:13:10 +0000 (09:13 +0000)]
hyperv/vmbus: Add a simplified version of channel close.

So that the caller can know the channel close error and react accordingly.

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

7 years agohyperv/vmbus: Propagate close error.
sephe [Fri, 25 Nov 2016 08:57:52 +0000 (08:57 +0000)]
hyperv/vmbus: Propagate close error.

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

7 years agohyperv/vmbus: Always try disconnect/free bufring memory upon channel close
sephe [Fri, 25 Nov 2016 08:31:13 +0000 (08:31 +0000)]
hyperv/vmbus: Always try disconnect/free bufring memory upon channel close

While I'm here, minor wording and style changes.

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

7 years agohyperv/vmbus: Don't free the bufring if its GPADL can't be disconnected.
sephe [Fri, 25 Nov 2016 07:41:42 +0000 (07:41 +0000)]
hyperv/vmbus: Don't free the bufring if its GPADL can't be disconnected.

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

7 years agohyperv/vmbus: Return EISCONN if the bufring GPADL can't be disconnected.
sephe [Fri, 25 Nov 2016 07:24:11 +0000 (07:24 +0000)]
hyperv/vmbus: Return EISCONN if the bufring GPADL can't be disconnected.

So that the callers of vmbus_chan_open_br() could handle the passed in
bufring memory properly.

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

7 years agohyperv/vmbus: No stranded bufring GPADL is allowed.
sephe [Fri, 25 Nov 2016 07:03:45 +0000 (07:03 +0000)]
hyperv/vmbus: No stranded bufring GPADL is allowed.

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

7 years agohyperv/vmbus: GPADL disconnect error on a revoked channel is benign.
sephe [Fri, 25 Nov 2016 06:48:53 +0000 (06:48 +0000)]
hyperv/vmbus: GPADL disconnect error on a revoked channel is benign.

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

7 years agohyperv/vmbus: Don't close unopened channels.
sephe [Fri, 25 Nov 2016 06:12:18 +0000 (06:12 +0000)]
hyperv/vmbus: Don't close unopened channels.

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

7 years agohyperv/vmbus: Fix sysctl tree leakage, if channel open fails.
sephe [Fri, 25 Nov 2016 06:01:45 +0000 (06:01 +0000)]
hyperv/vmbus: Fix sysctl tree leakage, if channel open fails.

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

7 years agohyperv/vmbus: Minor style changes.
sephe [Fri, 25 Nov 2016 05:46:15 +0000 (05:46 +0000)]
hyperv/vmbus: Minor style changes.

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

7 years agohyperv/vmbus: Commit the GPADL id only after the connection succeeds.
sephe [Fri, 25 Nov 2016 05:35:29 +0000 (05:35 +0000)]
hyperv/vmbus: Commit the GPADL id only after the connection succeeds.

Minor style change.

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

7 years agohyperv/vmbus,pcib: unbreak build in case NEW_PCIB is undefined
dexuan [Fri, 25 Nov 2016 04:35:40 +0000 (04:35 +0000)]
hyperv/vmbus,pcib: unbreak build in case NEW_PCIB is undefined

vmbus_pcib requires NEW_PCIB, but in case that's not defined, we at
least shouldn't break build.

Reviewed by: sephe
Approved by: sephe (mentor)
MFC after: 3 days
Sponsored by: Microsoft

7 years agoCorrect lld llvm-tblgen dependency file name
emaste [Fri, 25 Nov 2016 01:24:35 +0000 (01:24 +0000)]
Correct lld llvm-tblgen dependency file name

7 years agoUpgrade our copies of clang, llvm, lldb, compiler-rt and libc++ to 3.9.0
dim [Thu, 24 Nov 2016 22:55:24 +0000 (22:55 +0000)]
Upgrade our copies of clang, llvm, lldb, compiler-rt and libc++ to 3.9.0
release, and add lld 3.9.0.  Also completely revamp the build system for
clang, llvm, lldb and their related tools.

Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11
support to build; see UPDATING for more information.

Release notes for llvm, clang and lld are available here:
<http://llvm.org/releases/3.9.0/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.9.0/tools/clang/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.9.0/tools/lld/docs/ReleaseNotes.html>

Thanks to Ed Maste, Bryan Drewery, Andrew Turner, Antoine Brodin and Jan
Beich for their help.

Relnotes: yes
MFC after: 1 month

7 years agoMerge ^/head r309118 through r309122.
dim [Thu, 24 Nov 2016 22:33:18 +0000 (22:33 +0000)]
Merge ^/head r309118 through r309122.

7 years agoAdd UPDATING entry for clang/llvm 3.9.0 import.
dim [Thu, 24 Nov 2016 22:18:55 +0000 (22:18 +0000)]
Add UPDATING entry for clang/llvm 3.9.0 import.

7 years agovirtio_console: handle short writes to an Unix domain socket gracefully.
jceel [Thu, 24 Nov 2016 22:16:18 +0000 (22:16 +0000)]
virtio_console: handle short writes to an Unix domain socket gracefully.

writev() can do a short write.  Retrying it results in a very convoluted
and complex code, so we iterate over iovec and do regular stream_write()
instead.

Approved by: trasz
Sponsored by: iXsystems, Inc.

7 years agoAllow opening virtio-console ports from the host side before guest
jceel [Thu, 24 Nov 2016 21:53:42 +0000 (21:53 +0000)]
Allow opening virtio-console ports from the host side before guest
enumerates them.

Approved by: trasz
Sponsored by: iXsystems, Inc.

7 years agovirtio_pci: fix announcement of MSI-X interrupts for queues
avg [Thu, 24 Nov 2016 21:32:04 +0000 (21:32 +0000)]
virtio_pci: fix announcement of MSI-X interrupts for queues

Queues that do not need interrupts - for instance, output queues - do
not have a corresponding entry in vtpci_msix_vq_interrupts.
So, it was wrong to increment a pointer into that array when iterating
over such a queue.

I ran into this bug while trying to use virtio_console(4) that allocates
a lot of queues with every other being an output queue without an
interrupt handler (if MultiplePorts feature is negotiated).

MFC after: 2 weeks

7 years agoMerge ^/head r309106 through r309117.
dim [Thu, 24 Nov 2016 21:14:22 +0000 (21:14 +0000)]
Merge ^/head r309106 through r309117.

7 years agoIn preparation for merging back to head, bump __FreeBSD_version,
dim [Thu, 24 Nov 2016 21:12:43 +0000 (21:12 +0000)]
In preparation for merging back to head, bump __FreeBSD_version,
FREEBSD_CC_VERSION and set date in ObsoleteFiles.inc.

7 years agovirtio_console: correctly determine presense of payload and its length
avg [Thu, 24 Nov 2016 21:12:32 +0000 (21:12 +0000)]
virtio_console: correctly determine presense of payload and its length

MFC after: 2 weeks

7 years agoFix the build post-r309017 for MPC85XX/MPC85XXSPE
jhibbits [Thu, 24 Nov 2016 20:31:46 +0000 (20:31 +0000)]
Fix the build post-r309017 for MPC85XX/MPC85XXSPE

r309017 removed two fields from struct vmmeter, which is embedded in struct
pcpu.  This caused the struct size to change, triggering the CTASSERT in
sys/pcpu.h.  Add the extra 8 bytes back in as padding.

7 years agoAdd the etherswitch(4) support for TI CPSW.
loos [Thu, 24 Nov 2016 20:14:43 +0000 (20:14 +0000)]
Add the etherswitch(4) support for TI CPSW.

Adds VLAN and port management abilities for etherswitchcfg(8).

The code is conditionally enabled for now, because it is not necessary on
single ethernet use cases.

Obtained from: pfSense
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC (Netgate)

7 years ago[bytgpio] Fix pc98 build by disabling bytgpio module for this platform
gonzo [Thu, 24 Nov 2016 20:08:17 +0000 (20:08 +0000)]
[bytgpio] Fix pc98 build by disabling bytgpio module for this platform

Reported by: dim

7 years agowait: avoid relocking the child if proc_to_reap returns 1
mjg [Thu, 24 Nov 2016 18:21:48 +0000 (18:21 +0000)]
wait: avoid relocking the child if proc_to_reap returns 1

proc_to_reap would always unlock. However, if it returned 1, kern_wait6
would immediately lock it again. Save the dance.

Reviewed by: kib

7 years agoAdd a warning against modifying this code without understanding it, and
des [Thu, 24 Nov 2016 14:50:21 +0000 (14:50 +0000)]
Add a warning against modifying this code without understanding it, and
an example of how not to make it more portable.  I've had this lying
around uncommitted since 2009...

7 years agoMerge ^/head r308870 through r309105.
dim [Thu, 24 Nov 2016 14:39:04 +0000 (14:39 +0000)]
Merge ^/head r308870 through r309105.

7 years agoSync the rtwn(4) entry with the manpage.
brueffer [Thu, 24 Nov 2016 10:35:49 +0000 (10:35 +0000)]
Sync the rtwn(4) entry with the manpage.

7 years agoMFV r308990: 7181 race between zfs_mount and zfs_ioc_rollback
avg [Thu, 24 Nov 2016 10:34:42 +0000 (10:34 +0000)]
MFV r308990: 7181 race between zfs_mount and zfs_ioc_rollback

illumos/illumos-gate@90f2c094b3822f4825f21cef2c2faf7d03b55139
https://github.com/illumos/illumos-gate/commit/90f2c094b3822f4825f21cef2c2faf7d03b55139

https://www.illumos.org/issues/7181
  zfsvfs_setup() is called in both zfs_mount and zfs_resume_fs paths.
  dmu_objset_set_user(zfsvfs->z_os, zfsvfs) is called early in zfsvfs_setup()
  before the setup is actually completed,
  thus an under-constructed zfsvfs becomes visible.
  Additionally, there is nothing to serialize the two call paths. As a result two
  threads can step on each other's toes.
  assertion failed: zilog->zl_clean_taskq == NULL, file:
  ../../common/fs/zfs/zil.c, line: 1772

  > $c
  vpanic()
  0xfffffffffbdf6928()
  zil_open+0x45(ffffff1bbc5dd000fffffffff7993880)
  zfsvfs_setup+0x84(ffffffb378d77000, 0)
  zfs_resume_fs+0x132(ffffffb378d77000ffffffb37ddcf000)
  zfs_ioc_rollback+0x96(ffffffb37ddcf000ffffff01dcdc4cd0ffffff01aa091000)
  zfsdev_ioctl+0x215(10a00000000, 5a19, 80465f8, 100003, ffffff01ab318368,
  ffffff0004b59e58)
  cdev_ioctl+0x39(10a00000000, 5a19, 80465f8, 100003, ffffff01ab318368,
  ffffff0004b59e58)
  spec_ioctl+0x60(ffffff0197737700, 5a19, 80465f8, 100003,
  ffffff01ab318368ffffff0004b59e58)
  fop_ioctl+0x55(ffffff0197737700, 5a19, 80465f8, 100003,
  ffffff01ab318368ffffff0004b59e58)
  ioctl+0x9b(7, 5a19, 80465f8)
  sys_syscall32+0x1f7()

  > ffffff1bbc5dd000::print objset_t os_zil
  os_zil = 0xffffff1c053cf7c0
  > 0xffffff1c053cf7c0::print zilog_t zl_clean_taskq

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
Author: Andriy Gapon <andriy.gapon@clusterhq.com>

MFC after: 2 weeks

7 years agoMFV r308988: 7199, 7200 dsl_dataset_rollback_sync may try to free
avg [Thu, 24 Nov 2016 10:29:21 +0000 (10:29 +0000)]
MFV r308988: 7199, 7200 dsl_dataset_rollback_sync may try to free
already free blocks

7199 dsl_dataset_rollback_sync may try to free already free blocks
7200 no blocks must be born in a txg after a snaphot is created

illumos/illumos-gate@bfaed0b91e57062c38bc16b4f89db3c8f0052a9b
https://github.com/illumos/illumos-gate/commit/bfaed0b91e57062c38bc16b4f89db3c8f0052a9b

https://www.illumos.org/issues/7199
  dsl_dataset_rollback_sync may try to free already freed blocks when it calls
  dsl_destroy_head_sync_impl to destroy a temporary clone.
  That happens if a snapshot to which we are rolling back and from which the
  clone is created has some ZIL records.

https://www.illumos.org/issues/7200
  No new blocks must be born in a dataset in the same TXG after a snapshot of the
  dataset is taken.
  Those blocks would have the same blk_birth as the dataset's ds_prev_snap_txg
  and as such they would be presumed to belong o the snapshot while in fact they
  do not.
  All the datasets must be clean before sync tasks are run, so the described
  scenario may happen only if one of the sync tasks dirties the dataset and
  another sync task takes its snapshot.
  Then, there will be another sync pass because of the dirty data and the new
  blocks will be born in the same TXG when the data is written out.
  It seems that almost all of the existing sync tasks modify only MOS and do not
  dirty any objsets.
  The only exception that I've been able to identify so far is the rollback which
  can modify an objset when it zeroes out the objset's ZIL.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
Author: Andriy Gapon <andriy.gapon@clusterhq.com>

MFC after: 3 weeks

7 years agoMFV r308987: 7180 potential race between zfs_suspend_fs+zfs_resume_fs
avg [Thu, 24 Nov 2016 10:21:22 +0000 (10:21 +0000)]
MFV r308987: 7180 potential race between zfs_suspend_fs+zfs_resume_fs
and zfs_ioc_rename

illumos/illumos-gate@690041b9caf801816f2d0bac90bc7cecefb73523
https://github.com/illumos/illumos-gate/commit/690041b9caf801816f2d0bac90bc7cecefb73523

https://www.illumos.org/issues/7180
  If a filesystem is not unmounted while the rename is being performed, then, for
  example, a concurrect zfs rollback may call zfs_suspend_fs followed by
  zfs_resume_fs on the same filesystem.
  The latter takes the filesystem's name as an argument. If the filesystem name
  changes as a result of the rename, then dmu_objset_hold(osname, zfsvfs, &os)
  call in zfs_resume_fs would fail resulting in a kernel panic.
  So far I have been able to reproduce this problem on FreeBSD where zfs rename
  has -u option that skips the unmounting before doing the renaming.
  But I think that in theory the same problem can occur on illumos as well,
  because the unmounting is done in userland before invoking the rename ioctl and
  there could be a race with, e.g., zfs mount.
  panic: solaris assert: dmu_objset_hold(osname, zfsvfs, &zfsvfs->z_os) == 0 (0x2
  == 0x0), file: /usr/devel/svn/head/sys/cddl/contrib/opensolaris/uts/common/fs/
  zfs/zfs_vfsops.c, line: 2210
  KDB: stack backtrace:
  db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe004df30710
  vpanic() at vpanic+0x182/frame 0xfffffe004df30790
  panic() at panic+0x43/frame 0xfffffe004df307f0
  assfail3() at assfail3+0x2c/frame 0xfffffe004df30810
  zfs_resume_fs() at zfs_resume_fs+0xb9/frame 0xfffffe004df30860
  zfs_ioc_rollback() at zfs_ioc_rollback+0x61/frame 0xfffffe004df308a0
  zfsdev_ioctl() at zfsdev_ioctl+0x65c/frame 0xfffffe004df30940
  devfs_ioctl_f() at devfs_ioctl_f+0x156/frame 0xfffffe004df309a0
  kern_ioctl() at kern_ioctl+0x246/frame 0xfffffe004df30a00
  sys_ioctl() at sys_ioctl+0x171/frame 0xfffffe004df30ae0
  amd64_syscall() at amd64_syscall+0x2db/frame 0xfffffe004df30bf0
  Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe004df30bf0

Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>

MFC after: 2 weeks

7 years agoMFV r308989: 6428 set canmount=off on unmounted filesystem tries to
avg [Thu, 24 Nov 2016 10:11:09 +0000 (10:11 +0000)]
MFV r308989: 6428 set canmount=off on unmounted filesystem tries to
unmount children

This is a cosmetic and bookkeeping change as the actual change is
already in FreeBSD.
See r297521, r304520, r308985.

7 years agoFix path for per-user nsmb.conf file
martymac [Thu, 24 Nov 2016 10:04:20 +0000 (10:04 +0000)]
Fix path for per-user nsmb.conf file

~/nsmb.conf, as erroneously introduced by r214387, is never used. Fix the man
page to specify that ~/.nsmbrc is used instead.

PR: 210652
Submitted by: ganael.laplanche@corp.ovh.com
Approved by: gjb (doceng@)

7 years agofirewire: initialize tag label to -1 in fw_xfer_alloc()
avg [Thu, 24 Nov 2016 09:47:56 +0000 (09:47 +0000)]
firewire: initialize tag label to -1 in fw_xfer_alloc()

Zero can be confused for a potentially valid value.
For example, if I load and unload sbp driver I get a lot of messages
like the following:

fw_tl_free: the xfer is not in the queue (tlabel=0, flag=0x0)
send: dst=0x00 tl=0x00 rt=0 tcode=0x0 pri=0x0 src=0x000
recv: dst=0x01 tl=0x21 rt=1 tcode=0x1 pri=0x0 src=0xffc0
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe04464407e0
fw_tl_free() at fw_tl_free+0x18d/frame 0xfffffe0446440820
fw_xfer_unload() at fw_xfer_unload+0xca/frame 0xfffffe0446440840
fw_xferlist_remove() at fw_xferlist_remove+0x2f/frame 0xfffffe0446440870
sbp_detach() at sbp_detach+0x1e0/frame 0xfffffe04464408e0
device_detach() at device_detach+0x80/frame 0xfffffe0446440900
devclass_driver_deleted() at devclass_driver_deleted+0x6a/frame 0xfffffe0446440940
devclass_delete_driver() at devclass_delete_driver+0x7d/frame 0xfffffe0446440980
driver_module_handler() at driver_module_handler+0xff/frame 0xfffffe04464409d0
module_unload() at module_unload+0x32/frame 0xfffffe04464409f0
linker_file_unload() at linker_file_unload+0x24b/frame 0xfffffe0446440a40
kern_kldunload() at kern_kldunload+0xbc/frame 0xfffffe0446440a70
amd64_syscall() at amd64_syscall+0x314/frame 0xfffffe0446440bf0
Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe0446440bf0

MFC after: 2 weeks

7 years agofwohci: report whether PhysicalUpperBound register is implemented
avg [Thu, 24 Nov 2016 09:43:42 +0000 (09:43 +0000)]
fwohci: report whether PhysicalUpperBound register is implemented

Please see section 5.15 of 1394 OHCI Specification.
If the register is not implemented, then the physical response unit is
limited to the first 4GB of the physical memory.
In that case the non-cooperative debugging over firewire (using /dev/fwmem)
can not be expected to work if a target has more RAM than that.
The method is described in gdb.4 and the Developer's Handbook.

It seems that most of the consumer hardware does not implement
PhysicalUpperBound register.

MFC after: 1 week

7 years agofurther fix zfs_lock() diagnostics
avg [Thu, 24 Nov 2016 09:00:51 +0000 (09:00 +0000)]
further fix zfs_lock() diagnostics

It was very wrong to look at the vnode and znode internals without
having locked the vnode first.

Reported by: pho
Tested by: pho
MFC after: 1 week
X-MFC with: r308887

7 years agohyperv/hn: Fix primary channel revocation
sephe [Thu, 24 Nov 2016 07:35:16 +0000 (07:35 +0000)]
hyperv/hn: Fix primary channel revocation

Since hypervisor will not drain the TX bufring, once the channels are
revoked:
- Setup vmbus orphan handler properly.
- Make sure that suspension will not wait the TX bufring draining
  forever.
- GC the pending TX descs on detach path, before freeing the busdma
  stuffs.

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

7 years agoEnable the SPI1 and SPI2 node for Olimex A20 SOM EVB.
manu [Thu, 24 Nov 2016 06:43:11 +0000 (06:43 +0000)]
Enable the SPI1 and SPI2 node for Olimex A20 SOM EVB.
This was missed in r309079.

7 years agohyperv/vmbus: Fix the multi-channel revoking on vmbus side.
sephe [Thu, 24 Nov 2016 06:01:29 +0000 (06:01 +0000)]
hyperv/vmbus: Fix the multi-channel revoking on vmbus side.

- Reference count the sub-channel when channel offer message is
  processed, so that immediate rescind message on the same channel
  will not race sub-channel open on driver side.
- Drop the above reference when sub-channel is closed, this closely
  mimics the hypervisor's reaction when primary channel is closed
  on the VM side.  No drivers use sub-channel after primary channel
  is closed.

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

7 years agoshare/man/man4/Makefile: Only install Hyper-V man pages on amd64 and i386
dexuan [Thu, 24 Nov 2016 05:52:28 +0000 (05:52 +0000)]
share/man/man4/Makefile: Only install Hyper-V man pages on amd64 and i386

We shouldn't install them on the architectures not supported by Hyper-V.

And, hv_ata_pci_disengage.4.gz should be removed from all architectures:
1) It should have only applied to Hyper-V;
2) For Hyper-V platforms (amd64 and i386), the related driver was removed by
r306426 | sephe | 2016-09-29 09:41:52 +0800 (Thu, 29 Sep 2016),
because now we have a better mechanism to disble the ata driver for hard
disks when the VM runs on Hyper-V.

Reviewed by: sephe, andrew, jhb
Approved by: sephe (mentor)
MFC after: 3 days
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8572

7 years agohyperv/vmbus: Fix the primary channel revoking on vmbus side.
sephe [Thu, 24 Nov 2016 05:18:45 +0000 (05:18 +0000)]
hyperv/vmbus: Fix the primary channel revoking on vmbus side.

Drivers can now use vmbus_chan_{is_revoked,set_orphan,unset_orphan}() and
vmbus_xact_ctx_orphan() to fix their attach/detach DEVMETHODs for revoked
primary channels.

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

7 years agohyperv/vmbus: Implement orphan support for transaction API
sephe [Thu, 24 Nov 2016 04:58:13 +0000 (04:58 +0000)]
hyperv/vmbus: Implement orphan support for transaction API

It will be used to fix the primary channel revocation support.

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

7 years agoEnable the SCL and SDA i2c line for DDC.
manu [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
shurd [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
gonzo [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
gonzo [Thu, 24 Nov 2016 00:39:17 +0000 (00:39 +0000)]
[rpi3] Fix SMP build for FreeBSD/arm64

7 years agoFix version string
shurd [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.
avos [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
gnn [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.
jhb [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