Commit Graph

210368 Commits

Author SHA1 Message Date
Glen Barber
876d357fa7 MFH
Sponsored by:	The FreeBSD Foundation
2016-04-11 15:24:59 +00:00
Andrey V. Elsukov
b2d7040c1c Fix the problem, when gpart(8) can't write both bootcode and partcode
in one command due to wrong file size limit. Do not use bootcode size
to calculate partsize limit.
Also add report message about successful partcode writing.

Reported by:	Trond Endrestøl
MFC after:	2 weeks
2016-04-11 13:44:31 +00:00
Steven Hartland
2dcee04b3a Only include sysctl in kernel build
Only include sysctl in kernel builds fixing warning about implicit
declaration of function 'sysctl_handle_int'.

PR:		204140
MFC after:	1 week
X-MFC-With:	r297813
Sponsored by:	Multiplay
2016-04-11 13:17:11 +00:00
Alexander Motin
2b2f4008d0 Update 25xx chips firmware from 7.03.00 to 8.03.00.
While the same update is also available for 24xx chips, it seems have
a problem with disabling virtual ports -- firmware handles the request,
but does not respong on it, causing timeout in driver.

MFC after:	1 month
2016-04-11 10:53:25 +00:00
Alexander Motin
5e3e6a8241 Polish debugging IOCB dumping.
Add few more missing cases, unify byte order.

MFC after:	1 month
2016-04-11 10:48:26 +00:00
Bjoern A. Zeeb
05fc416403 During if_vmove() we call if_detach_internal() which in turn calls the event
handler notifying about interface departure and one of the consumers will
detach if_bpf.
There is no way for us to re-attach this easily as the DLT and hdrlen are
only given on interface creation.
Add a function to allow us to query the DLT and hdrlen from a current
BPF attachment and after if_attach_internal() manually re-add the if_bpf
attachment using these values.

Found by panics triggered by nd6 packets running past BPF_MTAP() with no
proper if_bpf pointer on the interface.

Also add a basic DDB show function to investigate the if_bpf attachment
of an interface.

Reviewed by:	gnn
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5896
2016-04-11 10:00:38 +00:00
Sepherosa Ziehau
9859c43dfe hyperv: Typo
Noticed by:	kib
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-11 09:52:24 +00:00
Steven Hartland
7bc47b4ea3 Only include sysctl in kernel build
Only include sysctl in kernel builds fixing warning about implicit
declaration of function 'sysctl_handle_int'.

Sponsored by:	Multiplay
2016-04-11 08:57:54 +00:00
Andriy Gapon
1da2e1e353 zio: align use of "no dump" flag between use_uma and !use_uma cases
At the moment no ZFS buffers are included into a crash dump unless
ZFS_DEBUG (or INVARIANTS) kernel option is enabled.  That's not very
helpful for debugging of ZFS problems, because important information
often resides in metadata buffers.
This change switches the dumping behavior when UMA is used from the
illumos behavior to a more useful behavior that we have on FreeBSD
when ZFS buffers are allocated via malloc.

Reviewed by:	smh, mav
MFC after:	3 weeks
Differential Revision: https://reviews.freebsd.org/D5892
2016-04-11 07:11:20 +00:00
Sepherosa Ziehau
e331206e0f hyperv/hn: Remove unnecessary NULL checks
Submitted by:	Jun Su <junsu microsoft com>
Reviewed by:	sephe
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5905
2016-04-11 06:59:13 +00:00
Sepherosa Ziehau
b81e22fced hyperv/hn: By default enable multiple TX/RX rings, aka vRSS.
Reviewed by:	Dexuan Cui <decui microsoft com>
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5880
2016-04-11 06:37:50 +00:00
Sepherosa Ziehau
0e86334196 hyperv/hn: Cap default # of rings to 8.
8 gives the best performance in both Azure and local Hyper-V on both
10Ge and 40Ge. More rings are still allowed by manual configuration.

Reviewed by:	Dexuan Cui <decui microsoft com>
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5879
2016-04-11 06:31:52 +00:00
Sepherosa Ziehau
083b2c353d hyperv: Define macro for Hyper-V interface
Suggested by:	rpokala
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-11 06:22:26 +00:00
Sepherosa Ziehau
29b7b56766 hyperv: Print more features
And add comment about the MSR features.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-11 06:15:40 +00:00
Anish Gupta
441a3497f5 Allow guest writes to AMD microcode update[0xc0010020] MSR without updating actual hardware MSR. This allows guest microcode update to go through which otherwise failing because wrmsr() was returning EINVAL.
Submitted by:Yamagi Burmeister
Approved by:grehan
MFC after:2 weeks
2016-04-11 05:09:43 +00:00
Sepherosa Ziehau
3f2b057e35 hyperv: Break long line
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-11 04:56:23 +00:00
Sepherosa Ziehau
e4276edca5 hyperv: Declare hyperv_{features,recommends} properly
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-11 04:49:21 +00:00
Sepherosa Ziehau
c8d7fb6a5c hyperv: Resurrect r297481
This time we make sure that the TIME_REF_COUNT MSR exists.

Submitted by:	Jun Su <junsu microsoft com>
Reviewed by:	sephe, Dexuan Cui <decui microsoft com>
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-11 03:36:07 +00:00
Sepherosa Ziehau
68247c05c2 hyperv: Identify Hyper-V features and recommends properly
Features bits will be used to detect devices, e.g. timers, which
do not have corresponding event channels.

Submitted by:	Jun Su <junsu microsoft com>
Reviewed by:	sephe, Dexuan Cui <decui microsoft com>
Rearranged by:	sephe
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-11 03:28:17 +00:00
Sepherosa Ziehau
e69fbdcbdf hyperv/vmbus: Get rid of max_leaf detection; this is actually not used.
It will be replaced by a new one.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-11 03:14:28 +00:00
Sepherosa Ziehau
2924c4efeb hyperv/vmbus: Nuke unused function
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-11 03:07:35 +00:00
Navdeep Parhar
2829f76d1a cxgbe(4): Provide an explicit value for nqpcq in the firmware
configuration file.
2016-04-11 02:18:59 +00:00
Pedro F. Giffuni
e45e8680ed ext2fs: replace 0 with NULL for pointers.
While here do late initialization of ebap, similar as was
done in UFS.

Found with devel/coccinelle.

MFC after:	2 weeks
2016-04-11 00:12:24 +00:00
Pedro F. Giffuni
bc17d12da3 lpr: replace 0 with NULL for pointers.
Found with devel/coccinelle.

Reviewed by:	gad
2016-04-10 23:47:40 +00:00
Oleksandr Tymoshenko
71c1e74434 Fix IIC "how" argument dereferencing on big-endian platforms
"how" argument is passed as value of int* pointer to callback
function but dereferenced as char* so only one byte taken into
into account. On little-endian systems it happens to work because
first byte is LSB that contains actual value, on big-endian it's
MSB and in this case it's always equal zero

PR:		207786
Submitted by:	chadf@triularity.org
2016-04-10 23:17:06 +00:00
Pedro F. Giffuni
74b8d63dcc Cleanup unnecessary semicolons from the kernel.
Found with devel/coccinelle.
2016-04-10 23:07:00 +00:00
Marius Strobl
61a4e586d4 Since r296250 it is no longer possible for devices to use bus space
addresses exceeding 32 bit, so bump BUS_SPACE_MAXADDR to 64 bit.
The whole situation is sub par, though; prior to r296250 and despite
what their names imply, BUS_SPACE_MAX* were primarily, even almost
exclusively used for bus_dma(9). Now these macros also have a vital
role for bus_space(9). However, it does not necessarily hold that
both bus DMA and space addresses universally have the same limits
per platform.
As for sparc64, 64 bit clearly is beyond what can be addressed via
the various IOMMUs. With this change in place, we now rely on the
parent bus DMA tags of the host-to-foo drivers causing the child
tags to be capped as necessary.

PR:		207998
2016-04-10 22:43:36 +00:00
Pedro F. Giffuni
abafa4db03 ufs: replace 0 with NULL for pointers.
While here also do late initialization of the variables we are
changing.

Found with devel/coccinelle.

Reviewed by:	mckusick
MFC after:	2 weeks
2016-04-10 21:48:11 +00:00
Pedro F. Giffuni
513004a23d libc: replace 0 with NULL for pointers.
While here also cleanup some surrounding code; particularly
drop some malloc() casts.

Found with devel/coccinelle.

Reviewed by:	bde (previous version - all new bugs are mine)
2016-04-10 19:33:58 +00:00
Muhammad Moinur Rahman
6e5bbb486c Add bofh@ in calendar.freebsd 2016-04-10 16:48:21 +00:00
Justin Hibbits
f00e990465 VM_MAXUSER_ADDRESS is highest page start, not highest address.
In case a single page mapping is requested first, which might overlap the user
address space, fix the device map block to the next page.
2016-04-10 15:50:45 +00:00
Justin Hibbits
f2c3b7f2ba Restructure device mappings for Book-E.
Summary:
There is currently a 1GB hole between user and kernel address spaces
into which direct (1:1 PA:VA) device mappings go.  This appears to go largely
unused, leaving all devices to contend with the 128MB block at the end of the
32-bit space (0xf8000000-0xffffffff).  This easily fills up, and needs to be
densely packed.  However, dense packing wastes precious TLB1 space, of which
there are only 16 (e500v2) or 64(e5500) entries available.

Change this by using the 1GB space for all device mappings, and allow the kernel
to use the entire upper 1GB for KVA.  This also allows us to use sparse device
mappings, freeing up TLB entries.

Test Plan: Boot tested on p5020.

Differential Revision: https://reviews.freebsd.org/D5832
2016-04-10 15:48:09 +00:00
Dmitry Chagin
5743aa47f5 More complete implementation of /proc/self/limits.
Fix the way the code accesses process limits struct - pointed out by mjg@.

PR:		207386
Reviewed by:	no objection form des@
MFC after:	3 weeks
2016-04-10 07:11:29 +00:00
John Baldwin
307734b6d4 Add a 'show t4 devlog <nexus>' DDB command.
This command displays the adapter's firmware device log similar to the
dev.<nexus>.misc.devlog sysctl.

Sponsored by:	Chelsio Communications
2016-04-10 06:19:26 +00:00
Peter Grehan
5ccf6ce169 Allow the location of the kernel source tree to be overridden.
This makes it easier for the bhyve executable to be built
out of the tree.
2016-04-10 05:58:19 +00:00
John Baldwin
113f2316c6 Add a 'show t4 tcb <nexus> <tid>' command to dump a TCB from DDB.
This allows the contents of a TCB to be extracted from a T4/T5 card in
DDB after a panic.
2016-04-10 05:06:58 +00:00
John Baldwin
70e22add96 Add a function to lookup a device_t object by name.
This just walks the global list of devices looking for one with the
requested name.  The one use case outside of devctl2's implementation
is for DDB commands that wish to lookup devices by name.
2016-04-10 05:05:02 +00:00
Adrian Chadd
b4fb3d6e02 [net80211] correctly (i hope, wow) do a ticks comparison to limit A-MPDU attempts
I was seeing the stack constantly attempt to renegotiate A-MPDU TX
even after 3 failures.  My hunch is that the direct ticks comparison
is failing around the ticks wrap-around point.

This failure shouldn't /really/ happen normally, but it turns out being
the IBSS master node on FreeBSD doesn't quite setup 11n right, so
negotiating A-MPDU TX fails.
2016-04-10 04:16:34 +00:00
Adrian Chadd
6548c62c97 [net80211] unconditionally do A-MPDU RX aging.
It's 2016 and vendors (including us!) still have 802.11n TX/RX sequence
handling bugs.  It's suboptimal, but I'd rather see us default to handling
things in a sensible way.

So, just delete the #ifdef'ed code for now.  I'll leave the option in
so it doesn't break existing configurations.

This all started because I've started getting reports about urtwn not
working after I enabled 802.11n support, and it's because the ARM kernel
configs don't include A-MPDU RX aging.
2016-04-10 03:35:17 +00:00
Mark Johnston
b529028676 Implement support for boot-time DTrace.
This allows one to enable DTrace probes relatively early during boot,
during SI_SUB_DTRACE_ANON, before dtrace(1) can invoked. The desired
enabling is created using dtrace -A, which writes a /boot/dtrace.dof
file and uses nextboot(8) to ensure that DTrace kernel modules are loaded
and that the DOF file describing the enabling is loaded by loader(8)
during the subsequent boot. The trace output can then be fetched with
dtrace -a.

With this commit, boot-time DTrace is only functional on i386 and amd64: on
other architectures, the high-resolution timer frequency is initialized
during SI_SUB_CLOCKS and is thus not available when the anonymous
tracing state is initialized. On x86, the TSC is used and is thus available
earlier.

MFC after:	1 month
Relnotes:	yes
2016-04-10 01:25:48 +00:00
Mark Johnston
8553156023 nextboot(8): add a -a option for appending to a configuration.
By default, a nextboot invocation will clobber any existing nextboot
configuration.

MFC after:	2 weeks
Relnotes:	yes
2016-04-10 01:25:12 +00:00
Mark Johnston
33b454938a Initialize SDT probes during SI_SUB_DTRACE_PROVIDER.
This is consistent with all other DTrace providers and ensures that
SDT probes are available for boot-time tracing.

MFC after:	2 weeks
2016-04-10 01:24:27 +00:00
Mark Johnston
e1e33ff912 Initialize DTrace hrtimer frequency during SI_SUB_CPU on i386 and amd64.
This allows the hrtimer to be used earlier during boot. This is required
for boot-time DTrace: anonymous enablings are created during
SI_SUB_DTRACE_ANON, which runs before APs are started. In particular,
the DTrace deadman timer requires that the hrtimer be functional.

MFC after:	2 weeks
2016-04-10 01:23:39 +00:00
Adrian Chadd
5cf581e264 [net80211] log the node pointer when calling ht node init/cleanup
This makes it easier to track which node is having what done do it
during normal use.

This is likely the eighth time I've done this since I started doing
net80211 development, so I think it's about time I just committed it.
2016-04-09 22:01:32 +00:00
Adrian Chadd
169c392c43 [net80211] add back in the ff/superg node init call that I accidentally
deleted.

It's mostly a no-op right now, so it shouldn't have changed behaviour.
2016-04-09 21:57:34 +00:00
Pedro F. Giffuni
2bf493863f USB: replace 0 with NULL for pointers.
Found with devel/coccinelle.

Reviewed by:	hselasky
2016-04-09 20:36:07 +00:00
Alexander Motin
eaee150e3f MFV r297760: 6418 zpool should have a label clearing command
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Author: Will Andrews <will@firepipe.net>

Closes #83
Closes #32

openzfs/openzfs@9663688425

FreeBSD already had `zpool labelclear` functionality, so this is mostly
just a diff reduction.

MFC after:	1 month
2016-04-09 20:30:50 +00:00
John Baldwin
59e4a8cd1c Use DELAY() instead of sleeping during boot-time attach.
Tested by:	Wolfgang Zenker <wolfgang@lyxys.ka.sub.org>
2016-04-09 20:18:34 +00:00
Pedro F. Giffuni
74136dc300 sh(1): replace 0 with NULL for pointers.
Found with devel/coccinelle.

Reviewed by:	jilles
2016-04-09 20:05:39 +00:00
Alexander Motin
41e0d6d109 6418 zpool should have a label clearing command
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Author: Will Andrews <will@firepipe.net>

Closes #83
Closes #32
2016-04-09 19:49:40 +00:00