Commit Graph

109027 Commits

Author SHA1 Message Date
Steven Hartland
d775d23ac5 Prevent invalid ixgbe advertise setting warning
Prevent ixgbe outputting "Invalid advertised speed" warning on boot with
no customisations by moving test from sysctl handler to set handler.

PR:		208022
MFC after:	3 days
Sponsored by:	Multiplay
2016-03-16 01:41:55 +00:00
Alexander Motin
fa9de58388 Fix small memory leak on attempt to access deleted snapshot.
MFC after:	3 days
2016-03-15 21:21:28 +00:00
Edward Tomasz Napierala
ee4256cf01 Pacify Coverity.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-03-15 20:42:36 +00:00
Ed Maste
931ef67a96 Fix copy-n-pasteo in r296899 ukbdmap.h header generation for pc98
The ukbd default is specified by UKBD_DFLT_KEYMAP not ATKBD_DFLT_KEYMAP.

PR:		193865
Submitted by:	Harald Schmalzbauer
2016-03-15 17:32:29 +00:00
Hans Petter Selasky
1f20c68e07 Use hardware computed Toeplitz hash for incoming flowids
Use the Toeplitz hash value as source for the flowid. This makes the
hash value more suitable for so-called hash bucket algorithms which
are used in the FreeBSD's TCP/IP stack when RSS is enabled.

Sponsored by:	Mellanox Technologies
MFC after:	1 week
2016-03-15 15:53:37 +00:00
Hans Petter Selasky
9319562b86 Fix witness panic in the ipoib_ioctl() function when unloading the
ipoib module.

The bpfdetach() function is trying to turn off promiscious mode on the
network interface it is attached to while holding a mutex. The fix
consists of ignoring any further calls to the ipoib_ioctl() function
when the network interface is going to be detached. The ipoib_ioctl()
function might sleep.

Sponsored by:	Mellanox Technologies
MFC after:	1 week
2016-03-15 15:47:26 +00:00
Konstantin Belousov
3ef966c4c0 The PKRU state size is 4 bytes, its support makes the XSAVE area size
non-multiple of 64 bytes.  Thereafter, the user state save area is
misaligned, which triggers assertion in the debugging kernels, or
segmentation violation on accesses for non-debugging configs.

Force the desired alignment of the user save area as the fix
(workaround is to disable bit 9 in the hw.xsave_mask loader tunable).
This correction is required for booting on the upcoming Intel' Purley
platform.

Reported and tested by:	"Pieper, Jeffrey E" <jeffrey.e.pieper@intel.com>,
	jimharris
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2016-03-15 15:42:53 +00:00
Michal Meloun
4e3d35d76e Add phy framework, a next part of new 'extended resources' family of
support frameworks (i.e. clk/regulators/tsensors/fuses...).

It provides simple unified consumers interface for manipulations with
phy (USB/SATA/PCIe) resources.
2016-03-15 15:31:17 +00:00
Michal Meloun
878ca242eb Add regulator framework, a next part of new 'extended resources' family of
support frameworks(i.e. clk/reset/phy/tsensors/fuses...).

The framework is still far from perfect and probably doesn't have stable
interface yet, but we want to start testing it on more real boards and
different architectures.
2016-03-15 15:30:17 +00:00
Michal Meloun
cc42bd4f3d CLK: Add and use explicit locking for access to clock device registers.
Implicit locking (for read/write/modify) is not sufficient for complex
cases.
2016-03-15 15:28:24 +00:00
Michal Meloun
58de845996 CLK: Add enumerator for 'clocks' OFW node. Add bus device bindings
for clk_fixed class.
2016-03-15 15:27:15 +00:00
Michal Meloun
3ad8c0e5a1 CLK: Remove forgotten mutex from clk_fixed class. 2016-03-15 15:25:26 +00:00
Michal Meloun
12bc2abb4f Use EARLY_DRIVER_MODULE() with BUS_PASS_BUS priority for ofw_gpiobus
and ofw_iicbus. This causes enumeration of gpiobus/iicbus at the base driver
attach time. Due to this, childern drivers can be also attached early.
2016-03-15 15:24:18 +00:00
Ed Maste
3aa274f7d7 Fix atkbdmap.h generation for sc/vt consoles
Keymap header files have historically been generated using the build
host's /usr/sbin/kbdcontrol and using the host's keymap files.

However, that introduces an issue when building a kernel to use vt(4)
on a system using sc(4), or vice versa: kbdcontrol searches for keymap
files in the /usr/share subdirectory appropriate for the host, not the
target.

With this change the build searches both the and sc keymap directories
from the source tree.

PR:		193865
Submitted by:	Harald Schmalzbauer
2016-03-15 13:38:15 +00:00
Wojciech Macek
7e53dd7474 Remove redefinitions in ARMADA code
* Rename IRQ_MASK to MPIC_IRQ_MASK not to overlap with
  register name from mvreg.h
* Remove ARM_INTRNG from ARMADA38X, apparently was already
  included.
2016-03-15 06:06:09 +00:00
Warner Losh
735a5d0b0b ms_abi is supported with gcc 4.5 or newer, so build it with gcc if it
is 4.5 or newer.
2016-03-15 05:17:31 +00:00
Warner Losh
4aa947cb70 Make sure we check for CAM_CDB_POINTER for all drivers. Also, for the
drivers I've touched, filter out CAM_CDB_PHYS.

Differential Revision: https://reviews.freebsd.org/D5585
2016-03-15 05:17:29 +00:00
Warner Losh
225e4b4296 Remove bare & 0x3; it encodes the values of BIO_READ and
BIO_WRITE. It's also unnecessary since the only cases in this switch
are those two.
2016-03-15 04:56:39 +00:00
Maxim Sobolev
dd923e0c4a Fix build with HWPMC_HOOKS enabled. 2016-03-15 01:17:38 +00:00
Gleb Smirnoff
1d52250154 Free the temporary buffer in sysctl_handle_counter_u64_array().
Submitted by:	mjg
2016-03-15 00:21:32 +00:00
Gleb Smirnoff
bf840a1707 Redo r294869. The array of counters for TCP states doesn't belong to
struct tcpstat, because the structure can be zeroed out by netstat(1) -z,
and of course running connection counts shouldn't be touched.

Place running connection counts into separate array, and provide
separate read-only sysctl oid for it.
2016-03-15 00:15:10 +00:00
Gleb Smirnoff
b5b7b142a7 Provide sysctl(9) macro to deal with array of counter(9). 2016-03-15 00:05:00 +00:00
Gleb Smirnoff
d6231037df Revert r296868. The cast is useful to protect against passing incorrect
argument type to the macro.

Submitted by:	rstone
2016-03-14 20:34:30 +00:00
Gleb Smirnoff
9580c0f7ce Remove useless cast in SYSCTL_ADD_COUNTER_U64 macro. 2016-03-14 18:07:59 +00:00
Gleb Smirnoff
2f06d2ab91 Comment fix: statistics are not read-only. 2016-03-14 18:06:59 +00:00
Ryan Stone
faf139cc5d Clean up repeated "All rights reserved" 2016-03-14 17:41:17 +00:00
Adrian Chadd
23ed552b40 class -> i_class. Thanks C++.
Noticed by: jbeich@
2016-03-14 16:52:05 +00:00
Bjoern A. Zeeb
a3f2eca5d7 Fix the printf for PAE kernels where it'd be long long to unbreak
the build.
2016-03-14 16:19:50 +00:00
Bjoern A. Zeeb
61fc4ac3aa Only check for SYS_freebsd6_lseek if the syscall code is defined.
Whether this is the right or best solution is unclear but it fixes the
build for now.
2016-03-14 14:55:15 +00:00
Wojciech Macek
f54153bb08 pmap arm64: fixing pmap_invalidate_range
It seems that if range within one page is given this page will not be
invalidated at all. Clean it up.

Submitted by:          Dominik Ermel <der@semihalf.com>
Obtained from:         Semihalf
Sponsored by:          Cavium
Reviewed by:           wma, zbb
Approved by:           cognet (mentor)
Differential Revision: https://reviews.freebsd.org/D5569
2016-03-14 07:26:38 +00:00
Wojciech Macek
9147c9b8b2 Add xhci_mv.c
Add missing xhci driver for Marvell systems.

Submitted by:          Bartosz Szczepanek <bsz@semihalf.com>
Obtained from:         Semihalf
Sponsored by:          Stormshield
Reviewed by:           hselasky
Approved by:           cognet (mentor)
Differential Revision: https://reviews.freebsd.org/D5031
2016-03-14 07:24:08 +00:00
Wojciech Macek
34a3d2c6e7 Add support for USB3.0 on Armada38x
This commit provides attachment of xhci-platform for A38X boards, making
it possible to mount FreeBSD world from USB3.0 flash. 'xhci' device was
added to files.mv (as optional) and kernconf of Armada38x was enhanced.

It was also necessary to open programmable memory windows of USB3.0.
fdt_win_setup needed improvement so it's able to traverse through
children of internal-regs node.

Submitted by:          Bartosz Szczepanek <bsz@semihalf.com>
Obtained from:         Semihalf
Sponsored by:          Stormshield
Reviewed by:           hselasky
Approved by:           cognet (mentor)
Differential Revision: https://reviews.freebsd.org/D5031
2016-03-14 07:14:34 +00:00
Wojciech Macek
ca8e20784a Make MPIC compatible with ARM_INTRNG
After ARM_INTRNG introduction, MPIC code needed several modifications:
- IRQ resource and its handler added
-  several DEVMETHODs of INTRNG interface implemented
-  defines enhanced to ensure code compiles as well for AXP as for A38X
- added dummy MSI_IRQ, ERR_IRQ defines for Armada38x
- MPIC driver was added to files.armada38x, ARM_INTRNG option enabled in
  kernconf file and regs of MPIC corrected in dts file.

Instead of modifying Armada38X DTS, offsets to CPU registers defined in
driver were changed. That required restoring 'reg' property of mpic node
in ArmadaXP to state compliant with Linux DTS.

Additionally, required ARM_INTRNG definitions were added to mv_common.c.

Submitted by:          Bartosz Szczepanek <bsz@semihalf.com>
Obtained from:         Semihalf
Sponsored by:          Stormshield
Reviewed by:           adrian, andrew, ian, skra
Approved by:           cognet (mentor)
Differential Revision: https://reviews.freebsd.org/D5030
2016-03-14 07:05:41 +00:00
Wojciech Macek
64f7e6aeee Fix GIC interrupt decoding in INTRNG code
Bug was already fixed in not-INTRNG code, it needs to be corrected
   here as well.  Source: https://reviews.freebsd.org/rS294422

Submitted by:          Bartosz Szczepanek <bsz@semihalf.com>
Obtained from:         Semihalf
Sponsored by:          Stormshield
Reviewed by:           cognet, wma
Approved by:           cognet (mentor)
Differential Revision: https://reviews.freebsd.org/D5029
2016-03-14 06:30:37 +00:00
Adrian Chadd
523210fbaf [net80211] handle unlisted information elements.
This displays the IE names in ifconfig but it doesn't yet decode things.

Submitted by: Idwer Vollering <vidwer@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3782
2016-03-14 04:39:35 +00:00
Bjoern A. Zeeb
19edab1711 Remove duplicate external declaration of tcprexmtthresh making
gcc compiles barf.
2016-03-13 21:26:18 +00:00
Robert Watson
bc84fc89be Put IPSec's anouncement of its successful intialisation under bootverbose:
now that it's a default kernel option, we don't really need to tell the
world about it on every boot, especially as it won't be used by most users.
2016-03-13 19:27:46 +00:00
Bryan Drewery
1270146286 We only support GCC 4.8 for these flags.
- 4.7 introduced maybe-uninitialized
- 4.8 introduced aggressive-loop-optimizations

Sponsored by:	EMC / Isilon Storage Division
2016-03-13 19:17:48 +00:00
Edward Tomasz Napierala
49d8ebfe0e Remove name length limitation from autofs(5). The linear search with
strlens is somewhat suboptimal, but it's a temporary measure that will
be replaced with red-black trees later on.

PR:		204417
Reviewed by:	kib@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5266
2016-03-13 14:17:23 +00:00
Jared McNeill
e9a37ecaab Add HDMI device nodes to Banana Pi dts.
PR:		207912
Approved by:	gonzo (mentor)
2016-03-13 01:49:36 +00:00
Jared McNeill
f7f2f3a975 Fix display output for non-HDMI display devices.
Only set the display to HDMI mode if a CEA-861 extension block was found
on the connected display.

PR:		207912
Approved by:	gonzo (mentor)
2016-03-13 01:47:42 +00:00
Justin T. Gibbs
5405e7e2ee Provide high precision conversion from ns,us,ms -> sbintime in kevent
In timer2sbintime(), calculate the second and fractional second portions of
the sbintime separately. When calculating the the fractional second portion,
use a 64bit multiply to prevent excess truncation. This avoids the ~7% error
in the original conversion for ns, and smaller errors of the same type for us
and ms.

PR: 198139
Reviewed by: jhb
MFC after: 1 week
Differential Revision:    https://reviews.freebsd.org/D5397
2016-03-12 23:02:53 +00:00
John Baldwin
823590d40e Regen. 2016-03-12 22:55:07 +00:00
John Baldwin
f479b2ac89 Do not include system call wrappers in libc for old FreeBSD system calls.
The base system libc is only used to run binaries built on FreeBSD 7.0 and
later.  It does not need to include system call wrappers for system calls
only used by FreeBSD binaries built on versions older than 7.0.  This was
already true for "COMPAT" system calls, but now wrappers for system calls
used on FreeBSD 4 and 6 are excluded as well.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D5597
2016-03-12 22:53:46 +00:00
Bryan Drewery
1329d41cb6 Enable FAST_DEPEND by default.
Missed in r296668.

Discussed on:	arch
Sponsored by:	EMC / Isilon Storage Division
2016-03-12 22:25:10 +00:00
Bryan Drewery
ec4047ade2 Reduce duplicated logic from r291744.
Sponsored by:	EMC / Isilon Storage Division
2016-03-12 22:21:14 +00:00
Bryan Drewery
ebf5587eca Stop looking up these values in every subdir on install.
This was slowing down installkernel since it was rerunning this in
every module directory.

Sponsored by:	EMC / Isilon Storage Division
2016-03-12 22:21:02 +00:00
Ed Maste
6d51bbb52a boot/efi: Prefer nm to objdump
Both objdump and nm are equally capable of reporting undefined symbols.

This gets us a step closer to building without binutils as we have an nm
implementation from ELF Tool Chain.

Reviewed by:	bdrewery
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5613
2016-03-12 21:44:33 +00:00
Jean-Sébastien Pédron
33a4a11703 drm/i915: Import Linux commit 168f83660211b9e059e3bc0638daaa01e9ea0b71
This makes sure the default context of each ring is cleaned up with the
ring itself and fixes a memory leak.

Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Date:   Fri May 3 16:29:08 2013 +0300

    drm/i915: unreference default context on module unload

    Before module unload is called, gpu_idle() will switch
    to default context. This will increment ref count of base
    object as the default context is 'running' on module unload
    time. Unreference the drm object so that when context
    is freed, base object is freed as well.

    v2: added comment to explain the refcounts (Ben Widawsky)

    Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
    Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Obtained from:	Linux
2016-03-12 20:05:23 +00:00
Ed Maste
65d641e6bb Bump __FreeBSD_version for libelf cross-endian fix in r296685 2016-03-12 19:05:41 +00:00