Commit Graph

207895 Commits

Author SHA1 Message Date
Konstantin Belousov
f132cd0547 Use ANSI definitions. Wrap long line.
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2016-01-19 08:08:08 +00:00
Konstantin Belousov
b57e68141f Clear whole XMM register file instead of only XMM0. Also clear x87
registers.  This brings amd64 on par with i386, providing consistent
initial FPU state.

Note that we do not clear any extended state, at least because kernel
does not understand extended state structure and consequences of zero
overwrite after fninit()/fpusave().

Submitted by:	joss.upton@yahoo.com
PR:	206370
MFC after:	2 weeks
2016-01-19 08:04:02 +00:00
Andrew Rybchenko
c0b9f85bd6 sfxge: improve error handling in ef10_ev_rx()
Ensure that checksum flags and L3/L4 fields are ignored
if lower level errors are reported in the event.

Remove checks for CRC0_ERR (bad iSCSI header CRC) and
CRC1_ERR (bad iSCSI payload or FCoE/FCoIP CRC) as they
are not used by any existing code.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4975
2016-01-19 06:07:39 +00:00
Andrew Rybchenko
9ad7e03f72 sfxge: select whether to read current or backup partition in Medford A/B scheme
The dynamic config on Medford is stored using two partitions in flash, and at
any time one is the 'current' partition, used to provide the active config,
and the other 'backup' partition is used for writes.  This means that there
are two potential partitions that can be used to service reads, and which is
required can depend on, for example, whether the read is to get the current
contents or to verify a write.

When the partition write lock is held, the default behaviour is to read from
the backup partition, which was wrong for most reads in the common code which
require the current partition. This change allows the current partition to be
read whilst the write lock is held.
There is one read in Manftest which needs the backup partition.

ef10_nvram_partn_read_mode() is created to avoid changing
ef10_nvram_partn_read() which shares a prototype with the equivalent Falcon
and Siena methods.

MC_CMD_NVRAM_READ_IN_V2 adds an extra field, but firmware which doesn't support
it just ignores it.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4974
2016-01-19 06:03:44 +00:00
Ed Maste
c4601d6dfb Remove local override for .cpp.So rule
The standard bsd.lib.mk rule is suitable for libgcc_s's C++ source.

The local rule had the following non-functional argument differences
or additions:

1. -DSHARED (rather than -DPIC from bsd.lib.mk)

   The C++ sources don't have an #ifdef for either one.

2. -fexceptions

   This is enabled by default for C++ so does not need to be set
   explicitly.

3. -D__GLIBC__=3

   Not used by LLVM libunwind.

4. -DElfW=__ElfN

   LLVM libunwind provides its own definition.

PR:		206381
Differential Revision:	The FreeBSD Foundation
2016-01-19 03:54:38 +00:00
Justin Hibbits
ca31148c56 Hide most of the PTE initialization and management.
By confining the page table management to a handful of functions it'll be
easier to modify the page table scheme without affecting other functions.
This will be necessary when 64-bit support is added, and page tables become
much larger.
2016-01-19 03:07:25 +00:00
Mark Johnston
793c381706 Add vrefl(), a locked variant of vref(9).
This API has no in-tree consumers at the moment but is useful to at least
one out-of-tree consumer, and naturally complements existing vnode refcount
functions (vholdl(9), vdropl(9)).

Obtained from:	kib (sys/ portion)
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D4947
Differential Revision:	https://reviews.freebsd.org/D4953
2016-01-18 22:21:46 +00:00
Baptiste Daroussin
4d3c8f6a38 Import misc.c,v 1.46 from OpenBSD (by espie@)
Yet another missed ferror call
2016-01-18 22:12:07 +00:00
Ed Maste
d47c0c97de Update elftc version to 3272M, imported in r292120 2016-01-18 21:53:39 +00:00
Warner Losh
3dda93b9a7 Restore ABI variants now that ldconfig groks -soft. In addition, as a
transition mechanism, if we don't have /usr/libsoft, assume that soft
float ABI binaries are the default, so treat them as default binaries.
When we've fully transitioned, it will make no sense to do this stat,
and it will be removed.
2016-01-18 21:40:20 +00:00
Warner Losh
4153c21113 Add ldconfig -soft to process the soft float abi libraries and put it
into startup scripts for armv6. It acts much like ldconfig -32 does.
2016-01-18 21:40:18 +00:00
Baptiste Daroussin
410df9fd8d Fix printing multibyte printing when performing a networked finger(1) request
MFC after:	1 week
2016-01-18 20:47:04 +00:00
Andrew Turner
f3750b35c4 Reset the filesystem cache before reading from a potentially new
filesystem. Without this we only read from the first UFS filesystem we
find, caching the result.

X-MFC with:	The recent boot1.efi changes
2016-01-18 20:22:51 +00:00
Joel Dahl
5837aafd13 mdoc: sort Xr 2016-01-18 20:21:38 +00:00
Ed Maste
49d592ec08 boot1: correct typo in error message 2016-01-18 18:41:09 +00:00
Ruslan Bukin
02568041ed Correct RISC-V exception types. 2016-01-18 17:49:32 +00:00
Nathan Whitehorn
613d01fe04 Move RTAS PCI-specific interpretation of the "reg" property of the PCI host
device to the RTAS driver, where it belongs.
2016-01-18 17:27:16 +00:00
Ian Lepore
2a81017500 Use OF_decode_addr() to create a bus_space tag and handle for the console
on FDT/OFW platforms.

After the refactoring of the powerpc code so that OF_decode_addr() is usable
on all FDT/OFW platforms, this switches uart(4) to using it.

Differential Revision:	https://reviews.freebsd.org/D4675
2016-01-18 17:03:12 +00:00
Ruslan Bukin
b1aaaae600 Add RISC-V relocation types.
Reviewed by:	emaste
2016-01-18 16:54:26 +00:00
Zbigniew Bodek
107ef92ffe Enable AIO interface on ARM64 platforms
Add VFS_AIO to generic config to allow using of high-performance
asynchronous disk AIO operation.

Reviewed by:   imp
Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D4979
2016-01-18 14:11:34 +00:00
Zbigniew Bodek
6f675c9d20 Update ThunderX PCIe driver to fit new DTS layout
In recent EFI the DTS entries changed for PCIe controller.
This commit fixes internal PCIe, external is yet TBD.

Submitted by:  Dominik Ermel <der@semihalf.com>
Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D4976
2016-01-18 13:31:29 +00:00
Steven Hartland
45c5f4a4c9 Fix EFI_DEBUG option
Fix broken DPRINTF and wire up EFI_DEBUG so -DEFI_DEBUG to make works.

MFC after:	2 weeks
X-MFC-With:	r293268
Sponsored by:	Multiplay
2016-01-18 12:02:05 +00:00
Ruslan Bukin
2ca92170c4 Fix compilation on MIPS (typo introduced in r294227). 2016-01-18 09:36:10 +00:00
Xin LI
9123584634 MFV r294260:
Fix a wrong assertion in mandoc by applying OpenBSD
main.c,v 1.170 (florian):

Unbreak reading from stdin after recent parse() restructuring.
OK schwarze@
2016-01-18 08:52:09 +00:00
Xin LI
9927192e4f Fix a wrong assertion in mandoc by applying OpenBSD
main.c,v 1.170 (florian):

Unbreak reading from stdin after recent parse() restructuring.
OK schwarze@
2016-01-18 08:41:03 +00:00
Andrew Rybchenko
e78e1b4ddc sfxge: regenerate EF10 registers definition for Medford
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-18 06:59:00 +00:00
Andrew Rybchenko
199852a593 sfxge: fix unused function warning
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-18 06:54:15 +00:00
Andrew Rybchenko
e76a641b7a sfxge: regenerate siena_flash.h from FW sources
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-18 06:45:45 +00:00
Andrew Rybchenko
3e83cbac2a sfxge: cleanup: remove extra empty lines
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-18 06:39:06 +00:00
Andrew Rybchenko
5a59cbc95e sfxge: highlight that descriptor cache sizes are configured using TLV now
Submitted by:   Tom Millington <tmillington at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-18 06:38:21 +00:00
Andrew Rybchenko
8b18714db0 sfxge: support RFID-selectable segments of dynamic configuration
tlv_partition_header has field *preset* to support RFID-selectable
segments of dynamic configuration

Submitted by:   Mateusz Wrzesinski <mwrzesinski at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-18 06:33:15 +00:00
Andrew Rybchenko
08c5af79d9 sfxge: if supported by firmware, use enhanced SET_MAC command to only configure the MTU
This allows an MTU change to be requested on unpriviliged functions
without also setting all the other parameters supported by MC_CMD_SET_MAC.

The enhanced SET_MAC command was introduced in v4_7 firmware.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4958
2016-01-18 06:19:28 +00:00
Andrew Rybchenko
6d0b856c80 sfxge: convert nvram set_version method to use partition id
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-18 06:18:01 +00:00
Andrew Rybchenko
9218711910 sfxge: convert nvram get_version method to use partition id
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-18 06:16:51 +00:00
Andrew Rybchenko
eb9703da94 sfxge: convert nvram rw_finish method to use partition id
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-18 06:14:43 +00:00
Andrew Rybchenko
134c4c4a6c sfxge: convert nvram write method to use partition id
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4961
2016-01-18 06:13:09 +00:00
Adrian Chadd
88ecff8b96 [iwm] fix up the rate control setup code to initialise rates in the order
we want to use it.

The rate table was being initialised in low->high, but the link quality
table was being initialised high->low. So, when we did a lookup, we
would get the indexes wrong.

This started by a patch from dragonflybsd which reversed how the ni->in_ridx[]
array is being used; I'd rather it all be consistent.  So, this is consistent.

Inspired by: what I did to iwn(4) a while ago
Inspired by: DragonflyBSD; <imre@vdsz.com>
2016-01-18 05:43:34 +00:00
Andrew Turner
0cd387161a Add extra checks to make sure the size is valid. We may get an integer
underflow when we have small blocks of memory at the start and end of the
32-bit address range.

While here, only insert mappings pointing at a non-zero amount of memory.

Sponsored by:	ABT Systems Ltd
2016-01-18 00:07:04 +00:00
Justin Hibbits
02630b085c Quick exit after setting the clock control register.
Discussed with:	ian
2016-01-17 23:03:21 +00:00
Ian Lepore
5508dc2afe Make PPS ASSERT/CLEAR events match the RS-232 signal levels as per RFC 2783.
Previously the polarity was for TTL levels, which are the reverse of RS-232.

Also add handling of the UART_PPS_INVERT_PULSE option bit in the sysctl
value, the same as was recently added to uart(4), so that people using TTL
level connections can request a logical inverting of the signal.

Use the named constants from the new dev/uart/uart_ppstypes.h for the pps
capture modes and option bits.
2016-01-17 21:19:45 +00:00
Jilles Tjoelker
9ff8318f65 utimensat(2): Correct description of [EINVAL] error.
MFC after:	4 days
2016-01-17 21:14:27 +00:00
Dmitry Chagin
67968b35a0 Prevent double free of control in common sendmsg path as sosend
already freeing it.
2016-01-17 19:28:13 +00:00
Ruslan Bukin
0bfee92849 Bring in initial libc and libstand support for RISC-V.
Reviewed by:	andrew, emaste, kib
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
Differential Revision:	https://reviews.freebsd.org/D4943
2016-01-17 15:21:23 +00:00
Konstantin Belousov
ce958bdefe When cleaning up from failed adv locking and checking for write, do
not call VOP_CLOSE() manually.  Instead, delegate the close to
fo_close() performed as part of the fdrop() on the file failed to
open.  For this, finish constructing file on error, in particular, set
f_vnode and f_ops.

Forcibly resetting f_ops to badfileops disabled additional cleanups
performed by fo_close() for some file types, in this case it was noted
that cdevpriv data was corrupted.  Since fo_close() call must be
enabled for some file types, it makes more sense to enable it for all
files opened through vn_open_cred().

In collaboration with:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2016-01-17 08:40:51 +00:00
Konstantin Belousov
aeace3c33c Assert that the linkage between struct cdev_privdata and and struct
file is consistent.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2016-01-17 08:34:35 +00:00
Andrew Rybchenko
b60ff8405f sfxge: convert nvram erase method to use partition id
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4957
2016-01-17 05:12:37 +00:00
Ravi Pokala
bc089e5d7d [PR 206224] bv_cnt is sometimes examined without holding the bufobj lock
Add locking around access to bv_cnt which is currently being done unlocked

PR:		206224
Reviewed by:	imp
Approved by:	jhb
MFC after:	1 week
Sponsored by:	Panasas, Inc.
Differential Revision:	https://reviews.freebsd.org/D4931
2016-01-17 01:04:20 +00:00
Dimitry Andric
66817b4bbc Remove leading slashes added to ObsoleteFiles.inc in r294113. 2016-01-17 00:52:28 +00:00
Andriy Voskoboinyk
8a1d6d278d urtwn: add ROM structure for RTL8188EU
- Add the structure with already known fields offsets
  (some of them were taken from this driver,
  some (channel_plan, rf_* fields) - from TP-LINK official driver)
- Fix a typo / dehardcode a constant in RTL8192C ROM structure.

Tested with RTL8188EU, STA mode

Reviewed by:	kevlo
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D4274
2016-01-17 00:52:21 +00:00
Justin Hibbits
cdf9344e50 e5500 HWPMC is identical to e500mc, so add support check for it. 2016-01-17 00:14:22 +00:00