Commit Graph

212197 Commits

Author SHA1 Message Date
Warner Losh
2c0e9e2a09 Make armv6 hard float abi by default. Kill armv6hf.
Allow CPUTYPE=soft to build the current soft-float abi libraries.
Add UPDATING entry to announce this.

Approved by: re@ (gjb)
2016-05-18 06:01:18 +00:00
Glen Barber
c42a9b6a73 Revert r300003, and use proper grammar.
While here, bump .Dd, which should have been done with
previous commit.
2016-05-18 06:00:32 +00:00
Warner Losh
9a0b26ec6f Fix several instances where the boot loader ignored pager_output
return value when it could return 1 (indicating we should stop).
Fix a few instances of pager_open() / pager_close() not being called.
Actually use these routines for the environment variable printing code
I just committed.
2016-05-18 05:59:05 +00:00
Warner Losh
4a619be4bb Fix build breakage on arm64 by papering over the problem. We implement
a slightly non-standard %S that's more useful in the UEFI environment,
so ignore printf errors. There's no good cast to use. We'll need to
revisit this in the future.
2016-05-18 05:58:58 +00:00
Warner Losh
0f897f87b9 Explain why extra sutff always outputs even when it shouldn't for the
'?' command. Wasted a bunch of time tracking it down tonight.
2016-05-18 05:58:57 +00:00
Adrian Chadd
a74bf02069 [bwn] add initial 5xx firmware API support
* Add the new TX/RX frame formats;
* Use the right TX/RX format based on the frame info;
* Disable the 5xx firmware check, since now it should
  somewhat work (but note, we don't yet use it unless
  you manually add ucode11/initvals11 from the 5.x driver
  to bwn-kmod-firmware;

* Misc: update some comments/debugging now I know what's
  actually going on.

Tested:

* BCM4321MC, STA mode, both 4xx and 666 firmware, DMA mode

TODO:

* The newer firmware ends up logging "warn: firmware state (0)";
  not sure yet what's going on there.  But, yes, it still works.
  I'm committing this via a BCM4321MC, 11a station, firmware
  rev 666.

Obtained from:	Linux b43 (TX/RX descriptor format for 5xx)
2016-05-18 05:56:25 +00:00
Scott Long
4c7070db25 Import the 'iflib' API library for network drivers. From the author:
"iflib is a library to eliminate the need for frequently duplicated device
independent logic propagated (poorly) across many network drivers."

Participation is purely optional.  The IFLIB kernel config option is
provided for drivers that want to transition between legacy and iflib
modes of operation.  ixl and ixgbe driver conversions will be committed
shortly.  We hope to see participation from the Broadcom and maybe
Chelsio drivers in the near future.

Submitted by:   mmacy@nextbsd.org
Reviewed by:    gallatin
Differential Revision:  D5211
2016-05-18 04:35:58 +00:00
Sepherosa Ziehau
679afe0d78 hyperv/vmbus: Function renaming vmbus_msg_swintr -> vmbus_msg_task
It is not an SWI handler for a long time.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6409
2016-05-18 04:04:14 +00:00
Sepherosa Ziehau
a5dcd30f69 hyperv/vmbus: Utilize curcpu
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6408
2016-05-18 03:58:04 +00:00
Mark Johnston
ef89d843d9 Do not acquire the thread lock in hardclock_cnt() unless needed.
This function only sets thread flags if a SIGPROF or SIGVTALRM timer
has fired, which is almost never the case.

MFC after:	2 weeks
2016-05-18 03:55:54 +00:00
Mark Johnston
d2f5f8db87 Micro-optimize sleepq_broadcast().
- Avoid a conditional branch on the return value of sleepq_resume_thread()
  by ORing its return value into the boolean wakeup_swapper. This is
  consistent with other sleepqueue functions which just pass this return
  value to their caller.
- sleepq_resume_thread() unconditionally removes the thread from its queue,
  so there's no need to maintain a pointer to the next element in the queue.

MFC after:	2 weeks
2016-05-18 03:50:21 +00:00
Sepherosa Ziehau
f9ce274675 hyperv/vmbus: Minor white space and style cleanup
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6407
2016-05-18 03:50:18 +00:00
Sepherosa Ziehau
646995bdda hyperv/vmbus: Avoid two unnecessary protocol checks on isr handling path
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6405
2016-05-18 03:41:37 +00:00
Mark Johnston
be2dfd58fe Remove the MUTEX_DEBUG kernel option.
It has no counterpart among the other lock primitives and has been a
no-op for years. Mutex consistency checks are generally done whenver
INVARIANTS is enabled.
2016-05-18 03:34:02 +00:00
Sepherosa Ziehau
632da4eb89 hyperv/vmbus: Use atomic swap and flsl to process event flags
Greatly reduce the locked instructions and reduce number of inner loops.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6404
2016-05-18 03:28:51 +00:00
Mark Johnston
5002e19502 Guard the lockstat:::thread-spin probe with KDTRACE_HOOKS.
X-MFC-With:	r300103
2016-05-18 03:23:07 +00:00
Mark Johnston
156fbc14a0 lockstat:::thread-spin should only fire after spinning for the lock.
MFC after:	1 week
2016-05-18 03:21:21 +00:00
Sepherosa Ziehau
008024f2b8 hyperv/vmbus: Reduce the # of event loops by recording event flag count
Use vmbus softc to save vmbus per-cpu data.  More stuffs will be moved
into vmbus softc.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6403
2016-05-18 03:19:53 +00:00
Sepherosa Ziehau
8080722aee hyperv/vmbus: Use unsigned long for event bits.
And move base channel id calculation out of inner loop.  This prepares
for more event processing optimization.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6384
2016-05-18 02:59:46 +00:00
Conrad Meyer
2d3192783d ntb_hw(4): Add sysctls for administrative/test link config, state
dev.ntb_hw.0.admin_up=0/1: Like ifconfig UP/DOWN.
dev.ntb_hw.0.active=0/1:   Like ifconfig 'status'

Reviewed by:	ngie
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D6429
2016-05-18 02:10:05 +00:00
Pedro F. Giffuni
00b8e9fe52 makefs(8): Clarify the comment concerning seeding.
Avoid giving the impression makefs currently supports reproduceable
builds.
2016-05-18 00:22:52 +00:00
Gleb Smirnoff
17cd649f4a Add a comment and KASSERT that a M_NOFREE mbuf has always EXT_EXTREF ext.
Submitted by:	kmacy
2016-05-17 23:15:16 +00:00
Gleb Smirnoff
f59d975e10 Tiny refactor of r294869/r296881: use defines to mask the VNET() macro.
Suggested by:	bz
2016-05-17 23:14:17 +00:00
Warner Losh
0ac974ec78 Don't forget to quote \ characters with \. 2016-05-17 22:52:42 +00:00
Gleb Smirnoff
7349ea785c Validate that user supplied control message length is not negative.
Submitted by:	C Turt <cturt hardenedbsd.org>
Security:	SA-16:19
Security:	CVE-2016-1887
2016-05-17 22:28:53 +00:00
Gleb Smirnoff
c9d2719027 Use unsigned version of min() when handling arguments of SETFKEY ioctl.
Submitted by:	C Turt <cturt hardenedbsd.org>
Security:	SA-16:18
Security:	CVE-2016-1886
2016-05-17 22:28:42 +00:00
Konstantin Belousov
bfe89a8ee1 Do enable io accounting for read-only mounts and mounts which are
remounted to writeable after initial read-only.  Assign to
dev->si_mountpt earlier to account the accesses done at the mount
time.

Based on submission by:	bde
MFC after:	1 week
2016-05-17 21:35:35 +00:00
Konstantin Belousov
f30ddc49e6 If IO_SYNC was passed to ffs_truncate(), request synchronous inode
update from the final ffs_update().

Noted by:	bde
MFC after:	1 week
2016-05-17 21:30:58 +00:00
Konstantin Belousov
3d0691acdc For async UFS mounts, shrink the directory asynchronously, at least do
not pass IO_SYNC to ffs_truncate() unneccessary.

Submitted by:	bde
MFC after:	1 week
2016-05-17 21:28:28 +00:00
Warner Losh
53ff4bbc05 Implement UEFI set environment variable, as well as exporting the EFI
version. This is also scriptable, though additional scripting will be
needed.

Differential Review: https://reviews.freebsd.org/D4494
MFC After: 3 days
2016-05-17 21:25:20 +00:00
Warner Losh
d437521495 Implement uuid-to-string and uuid-from-string. uuid-from-string takes
a string, interprets it as a standard UUID, and returns a binary from
of the UUID. uuid-to-string does the reverse. The binary UUID is in
allocated memory, so you'll need to free it with 'free' after you are
done using it. It won't be automatically garbage collected. Likewise
with the string...

MFC After: 3 days
2016-05-17 21:25:18 +00:00
Adrian Chadd
3095d9fbc6 [bwn] correctly calculate RSSI level.
Tested:

* BCM4311, PHY-G, STA mode
* BCM4312, PHY-LP, STA mode
* BCM4321, PHY-N, STA moe
2016-05-17 21:24:10 +00:00
Warner Losh
da019dfdd5 Add support for %S to libstand as well so /boot/loader and friends can
use it.
2016-05-17 21:23:13 +00:00
Andriy Voskoboinyk
a54e0911c4 mwl: drop unneeded NULL pointer check.
mh_streams[] is a fixed-length array, not a pointer.
2016-05-17 20:53:56 +00:00
Adrian Chadd
0a27537893 [bwn] print out a very obvious notice that GPLv2 code is compiled in if it is. 2016-05-17 20:21:39 +00:00
Adrian Chadd
f629a23855 [bwn] always allocate maximum size txhdr entries; prepare for fw 598
* always allocate maximum size txhdr entries
* set the right rx header offset/framesize based on firmware

This still isn't what's completely required for fw 598 support; there's
more to come.

Tested:

* Apple BCM94321MC 11abgn NIC, 11a STA mode, firmware version 4xx.

Obtained from:	DragonflyBSD (txhdr entry sizing), fw 598 RX header size (linux b43)
2016-05-17 20:18:23 +00:00
John Baldwin
07454911f0 Rework managing hotplug commands with command completions.
Previously the command completion interrupt would post any pending
command immediately before pcib_pcie_hotplug_update() had been
run to inspect the current status.  Now, the command completion
interrupt merely clears the flag and stops the timer assuming that
the caller is always going to call pcib_pcie_hotplug_update() to
generate the next hotplug command if one is needed.

While here, fix a bug for systems with command completion where the
old (existing) value was written to the slot control register instead
of the new value.  This fixes the complaint about a missing hotplug
interrupt on my T400.

Differential Revision:	https://reviews.freebsd.org/D6363
2016-05-17 19:48:28 +00:00
John Baldwin
ed7ed7f0ca Document the formatting requirements of location and pnpinfo strings.
devd requires location and pnpinfo strings generated by bus drivers
to be formatted as a list of name=value keypairs.  Non-conforming
bus drivers cause devd to mis-parse device events for these buses.

Note that this documents the desired requirements.  devctl_safe_quote()
doesn't yet escape backslash characters, and devd doesn't handle escaped
characters in quoted values.

Differential Revision:	https://reviews.freebsd.org/D6252
2016-05-17 19:34:07 +00:00
Alexander Motin
0f85a96bbf Fix NULL-dereference panic if VESA reports zero modes.
MFC after:	1 week
2016-05-17 19:00:09 +00:00
John Baldwin
23f765d0c8 Remove the reiserfs(5) manpage and an example of loading the kernel module. 2016-05-17 18:42:38 +00:00
Pedro F. Giffuni
40d39b4bf5 makefs(1): use all the random(3) range.
The generation number is uint32_t so we can fit the complete range
of random(3). We could have used arc4random() but the result would
be unpredictable and it would prohibit reproducible builds.

While here add a comment where seeding is done: this affects
reproducible builds and might have to be re-visited to use a
release dependent value.

MFC after:	2 weeks
2016-05-17 18:20:33 +00:00
Emmanuel Vadot
d71896a76a Add driver for "generic-ohci" as defined by FDT.
If platform support EXT_RESOURCES, clocks and resets are handled out of
the box.
If not driver can be subclassed using the generic_usb interface.
generic_usb name was choosed because at one point I'll add generic-ehci
FDT driver.

Reviewed by:	jmcneill, hselasky
Approved by:	andrew (mentor)
Differential Revision:	https://reviews.freebsd.org/D5481
2016-05-17 17:46:12 +00:00
George V. Neville-Neil
50f0439087 Final nit in ReiserFS removal. 2016-05-17 17:09:45 +00:00
Warner Losh
c6755605f6 Per Ravi Pokala's suggestion, rewrite the g_reset_bio description to
be clearer. It also describes it with more nuance. Add missing MLINKS
noticed by trasz@. Bump the date.
2016-05-17 17:08:13 +00:00
George V. Neville-Neil
706923d700 Finish cleaning up after killing ReiserFS.
Remove LINT/NOTES option and file linkages.
2016-05-17 16:59:53 +00:00
Pedro F. Giffuni
9f36c1fa71 makefs(8): use NULL instead of zero for pointers. 2016-05-17 16:58:39 +00:00
Andriy Voskoboinyk
7cde0202f7 net80211: unbreak 'show all vaps(/a)' ddb command
Replace ifnet list lookup (which is broken since r287197, because
IFT_IEEE80211 type is not used anymore) with iteration on
ieee80211com list.

Reviewed by:	adrian
Differential Revision:	https://reviews.freebsd.org/D6419
2016-05-17 16:38:18 +00:00
George V. Neville-Neil
bde75b9b3e Kill off ReiserFS as it is no longer supported, for obvious reasons. 2016-05-17 15:36:40 +00:00
Edward Tomasz Napierala
257cbe3410 Rename icl_proxy.c to icl_soft_proxy.c, to make it clear it's a part
of software ICL backend.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-05-17 15:21:17 +00:00
Alan Somers
5f7b3969e9 Speed up vdev_geom_open_by_guids
Speedup is hard to measure because the only time vdev_geom_open_by_guids
gets called on many drives at the same time is during boot. But with
vdev_geom_open hacked to always call vdev_geom_open_by_guids, operations
like "zpool create" speed up by 65%.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c

	* Read all of a vdev's labels in parallel instead of sequentially.
	* In vdev_geom_read_config, don't read the entire label, including
	  the uberblock.  That's a waste of RAM.  Just read the vdev config
	  nvlist.  Reduces the IO and RAM involved with tasting from 1MB to
	  448KB.

Reviewed by:	avg
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D6153
2016-05-17 15:17:23 +00:00