Commit Graph

209633 Commits

Author SHA1 Message Date
Bryan Drewery
54bc9e303d Partially revert r266227 and stop stripping paths in ldscripts.
Specifically this fixes /usr/lib/libc.so stripping the paths to the
libraries.  The reason for this in r266227 was both likely because ld(1) did
not fully respect --sysroot until r291226 and because of the lib32
build.  The lib32 build does not use --sysroot into the /usr/lib32 path,
rather it only uses -L and -B into the /usr/lib32 path and --sysroot
into the normal (64bit) /usr/lib.  The _LDSCRIPTROOT was added with
the ldscript support in bsd.lib.mk so that it builds a 32-bit-sysrooted pathed
ldscript in the object directory and then installs a normal unprefixed
version in installworld.  This commit also fixes the rebuild during
install which was broken in r266227.  This commit would break DIRDEPS_BUILD
build of lib32 but it does not currently have a way to build it anyhow.

For example, before this change we had in /usr/lib/libc.so:
  GROUP ( libc.so.7 libc_nonshared.a libssp_nonshared.a )
Now it is restored to pre-r266227:
  GROUP ( /lib/libc.so.7 /usr/lib/libc_nonshared.a /usr/lib/libssp_nonshared.a )

The motivation for this is in testing of lld.
From emaste:
  lld does not have built-in search paths (e.g. /lib, /usr/lib) and relies on
  -L arguments passed by the caller.  As the linker is nearly always invoked
  from the clang driver this is fine other than the fact that /usr/lib/libc.so
  is an ldscript that refers to libc.so.7 which is in /lib, not /usr/lib.

PR:		207980
Reported by:	emaste
Submitted by:	emaste (based on)
Differential Revision:	https://reviews.freebsd.org/D5637
2016-03-15 22:27:29 +00:00
Ed Maste
0f2d5632a5 vtfontcvt: support .hex fonts with characters beyond the Unicode BMP
This is already supported by the vt(4) vfnt format mapping from code
points to glyphs. Update the .hex font parser to accept up to six hex
digits.
2016-03-15 21:32:46 +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
c38dac681d libc: don't build compat functions if building WITHOUT_SYMVER
WITHOUT_SYMVER necessarily implies building a system without symver
backwards compatability.

Sponsored by:	The FreeBSD Foundation
2016-03-15 19:26:32 +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
Hans Petter Selasky
95891718f5 Improve detection of extended QSFP diagnostics.
The standards in the QSFP diagnostics area are not clear when the
additional measurements are present or not. Use a valid temperature
reading as an indicator for the presence of voltage and TX/RX power
measurements.

MFC after:	1 week
Sponsored by:	Mellanox Technologies
Tested by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D5391
Reviewed by:	gallatin
2016-03-15 15:24:55 +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
Edward Tomasz Napierala
535bd9beaf Make fail() preserve the errno.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-03-15 11:10:08 +00:00
Edward Tomasz Napierala
e19462c33b Use the log_errno value passed to the function instead of the errno global
variable.

Suggested by:	Daniel Braniss
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-03-15 11:03:45 +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
Warner Losh
486607d0b6 Just install ar5523.bin into /usr/share/firmware and stop compiling it
in.

Differential Review: https://reviews.freebsd.org/D5639
2016-03-15 04:42:37 +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
dbfd87087b Print running TCP connection counts with TCP statistics. 2016-03-15 00:19:30 +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
Kurt Lidl
6e786098f2 Do not truncate office phones in finger's summary listing
When finger is invoked as as "finger username", it produces the
long listing by default, and phones numbers are pretty-printed
by the prphone() function. When invoked as just "finger", the
same pretty-printing happens, but is truncated at 9 characters.
Given the summary listing is already greater than 80 columns,
making it even wider is of no harm.

Approved by:	rpaulo (mentor)
Differential Revision:	https://reviews.freebsd.org/D5638
2016-03-14 22:20:22 +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
Edward Tomasz Napierala
94e900c6cd Restore accidentaly removed comment line.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-03-14 18:57:09 +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
Edward Tomasz Napierala
0cae9d3d4a Fix autofs handling of filesystem labels containing plus signs and slashes.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-03-14 17:45:39 +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
Edward Tomasz Napierala
7f9b1e693a Add myself to MAINTAINERS.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-03-14 16:27:43 +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
George V. Neville-Neil
69ab30910f Fix typo: nmd->cur_tx_ring should be used in pci_vtnet_netmap_writev()
The buffer length should be checked to avoid overflow, but there
is no API to get the slot length, so the hardcoded value is used.
Return the currently-first request chain back to the available
queue if there are no more packets.
Report the link as up if we managed to open vale port.
Use consistent coding style.

Submitted by: btw
MFC after: 1 week
Differential Revision:	https://reviews.freebsd.org/D5595
2016-03-14 08:48:16 +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
Bryan Drewery
6ccfaffdd1 Reword SX_NOADAPTIVE description to be clear that adaptive is default.
The default changed in r193011.

MFC after:	 1 week
2016-03-14 00:51:45 +00:00
Pedro F. Giffuni
273df42911 libdtrace: use calloc(3) instead of malloc(3) when it makes sense.
calloc(3) is faster and occasionally safer than malloc(3) + bzero(3).

In one case, pointed out by Mark[1], this also cleans up a calculation.

Reviewed by:	markj [1]
MFC after:	1 week
2016-03-14 00:34:12 +00:00
Jilles Tjoelker
7d980385e8 sh: Fix copying uninitialized field 'special'.
This just copied uninitialized data and did not depend on it later, so it
should not be dangerous.

Found by:	clang static analyzer
2016-03-13 22:54:14 +00:00