Commit Graph

196976 Commits

Author SHA1 Message Date
Dimitry Andric
09a4a1f2d8 Partially revert r273382, to reduce diffs against upstream. This was a
temporary fix to solve a conflict with an older version of libc++, and
it is no longer relevant.

MFC after:	3 days
2015-01-30 18:26:38 +00:00
Doug Ambrisko
b6a6b77b12 Fix UEFI PXE boot on a NIC that isn't the first NIC.
In UEFI it appears all available NICS are present to pass network traffic.
This gives the capability to load the loader.efi from disk then set
currdev="net3:" and then all I/O will over over the 2nd NIC.  On this
machine is appears the first handle is the first NIC in IPv4 mode and
then the 2nd handle is the first NIC in IPv6 mode.  The 3rd handle is
the 2nd NIC in IPv4 mode.  The fix is to index into the handle based
on the unit cached from boot device passed into the loader.

Some testing info from a test boot via kenv:
	currdev="net3:"
	loaddev="net3:"
	boot.netif.name="igb1"
2015-01-30 18:25:53 +00:00
Eric Joyner
e3bf410907 Add myself (erj) to committers-src.dot.
Approved by:	gnn (mentor), jfv (mentor)
2015-01-30 18:19:22 +00:00
Luiz Otavio O Souza
c213658943 The BCM2835 GPIO controller uses has interrupt lines and not only one.
Allocate all four, we will use them soon.

Simplificate the allocation of memory and interrupt resources with a single
bus_alloc_resources() call instead of doing them separately.

Destroy the mutex in case of errors.
2015-01-30 18:18:09 +00:00
Dimitry Andric
c234c2de73 For clang, disable -Wcast-qual warnings for specific aesni files, since
clang 3.6.0 will emit a number of such warnings for those files, and
they are partially contributed code.
2015-01-30 18:17:17 +00:00
Enji Cooper
b7c2ba84c9 Create MANLINKS for lzgrep, etc when MK_LZMA_SUPPORT != no
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
2015-01-30 18:07:46 +00:00
Hiren Panchasara
ec446b1375 Make syncookie_mac() use 'tcp_seq irs' in computing hash.
This fixes what seems like a simple oversight when the function was added in
r253210.

Reported by:            Daniel Borkmann <dborkman@redhat.com>
                        Florian Westphal <fw@strlen.de>
Differential Revision:  https://reviews.freebsd.org/D1628
Reviewed by:            gnn
MFC after:              1 month
Sponsored by:           Limelight Networks
2015-01-30 17:29:07 +00:00
Michael Reifenberger
c47ef15f23 Keep original images, dont compile tests,
makefs for iso images translates labes to uppercase, so adopt fstab for this case.
2015-01-30 15:42:52 +00:00
Konstantin Belousov
803fc2ca26 Use powerof2(). Remove single-use variable.
Submitted by:	Conrad Meyer
Differential Revision:	https://reviews.freebsd.org/D1724
MFC after:	1 week
2015-01-30 15:32:35 +00:00
Luiz Otavio O Souza
99a2011188 Allow the retrieving of the reserved pins state.
With this change, it is now possible to verify the pin function and level
of reserved pins (but not set them).

The use of reserved pins on Raspberry pi can lead to short circuits and
real damage to the SoC.

While here, remove duplicated code, make use of OF_getencprop_alloc()
instead of using fixed sized variables and reduce the dmesg spam by
printing reserved pin ranges (when possible) instead of printing each pin
in the range.
2015-01-30 14:35:04 +00:00
Luiz Otavio O Souza
9855acef2a Do not leak the OFW memory when the result does not satisfy our alignment
requirement.

While here, fix style(9) issues.
2015-01-30 14:09:07 +00:00
Pawel Jakub Dawidek
33c380b096 Make gcc happy.
Reported by:	bz
2015-01-30 13:03:36 +00:00
Pawel Jakub Dawidek
b4b884751b Add missing nvlist_get_parent(3) link.
Submitted by:	Mariusz Zaborski <oshogbo@FreeBSD.org>
2015-01-30 12:57:35 +00:00
Pawel Jakub Dawidek
c06165279d Handle empty nvlists correctly.
Submitted by:	Mariusz Zaborski <oshogbo@FreeBSD.org>
2015-01-30 12:31:29 +00:00
Konstantin Belousov
1c9b585695 When mounting SU-enabled mount point, wait until the softdep_flush()
thread started and incremented the stat_flush_threads [1].

Unconditionally wakeup softdep_flush threads when needed, do not try
to check wchan, which is racy and breaks abstraction.

Reported by and discussed with:	glebius, neel
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2015-01-30 11:41:46 +00:00
Pawel Jakub Dawidek
aa2e2bdaf2 Modify nvlist_get_parent() API to take additional cookie argument.
This allow for non-recursive iteration over nested nvlists, as in documented
example.

Submitted by:	Mariusz Zaborski <oshogbo@FreeBSD.org>
2015-01-30 10:08:38 +00:00
Pawel Jakub Dawidek
00294559aa If moving descriptor or binary data to an nvlist fails, we need to close the
descriptor or free the memory before returning.

Submitted by:	Mariusz Zaborski <oshogbo@FreeBSD.org>

While here, protect errno, so it won't be overwritted by close(2) or free(3).
2015-01-30 09:44:29 +00:00
Kenneth D. Merry
e761f855a0 Improve SCSI Extended Inquiry VPD page (0x86) support.
sys/cam/scsi/scsi_all.h:
	In struct scsi_extended_inquiry_data:
	- Increase the length field to 2 bytes, as it is 2 bytes in SPC-4.
	- Add bit definitions for the various Activiate Microcode actions.
	- Add the Sequential Access Logical Block Protection support bit,
	  since we need that in the sa(4) driver.  (For modifications
	  that will come later.)
	- Add definitions for the various Multi I_T Nexus Microcode
	  Download modes.

sys/cam/ctl/ctl.c:
	As of SPC-4, a single report of "REPORTED LUNS DATA HAS CHANGED"
	is to be given per I_T nexus.  Once it is reported, the unit
	attention condition should be cleared for all LUNS attached to
	an I_T nexus.

	Previously that only happened when a REPORT LUNS command was
	processed.

	This behavior may be different (according to SAM-5) when the
	UA_INTLCK_CTRL bits are non-zero in the control mode page but
	CTL does not currently support that.

	So, in view of the spec, whenever we report a LUN inventory
	change unit attention, clear it on all LUNs for that
	particular I_T nexus.

	Add a new function, ctl_clear_ua() that will clear a unit
	attention on all LUNs for the given I_T nexus.

	One field in the extended inquiry data that we could potentially
	report at some point is the maximum supported sense data length.
	To do that, we would the SIM to report (via path inquiry
	perhaps) how much sense data it is able to send.

	Add comments to explain some of the bits that are set in the
	Extended Inquiry VPD page.

	Add a few comments to make it more clear which functions handle
	various VPD pages.

Sponsored by:	Spectra Logic
MFC after:	1 week
2015-01-30 05:23:39 +00:00
Mark Johnston
2afbb2e1b8 pause() isn't a system call on FreeBSD; use sigsuspend(2) instead.
MFC after:	1 week
2015-01-30 05:14:01 +00:00
Mark Johnston
a70a59ea73 Don't attempt to disable enabled fasttrap probes in an exiting process.
There's no need to do so, and we can't hold an exiting process, so this
race can result in panics.

MFC after:	1 week
2015-01-30 05:03:23 +00:00
Mark Johnston
1eb8ad64ea In fasttrap_sigtrap(), use tdsendsignal() rather than tdksignal() to send
SIGTRAP. The latter requires that its thread argument be non-NULL, but
fasttrap_sigtrap() does not.

PR:		193593
MFC after:	1 week
Reported by:	danilo
2015-01-30 04:51:59 +00:00
Mark Johnston
c0d678c9dd The DTrace harness (dtest.pl) executes DTrace scripts with the -C flag,
which causes dtrace(1) to run the C preprocessor on input scripts before
executing them. Suppress some warnings emitted by the preprocessor which are
confusing the DTrace lexer tests.

MFC after:	1 week
2015-01-30 04:41:49 +00:00
Mark Johnston
6e9584fd15 Include required headers in DTrace test programs.
MFC after:	1 week
2015-01-30 04:37:57 +00:00
Mark Johnston
bc8eecf7d4 Replace Solaris identifiers and types with their FreeBSD equivalents.
MFC after:	1 week
2015-01-30 04:30:18 +00:00
Mark Johnston
7c39b67011 Use the correct field when reading the PID out of a struct proc.
MFC after:	1 week
2015-01-30 04:14:19 +00:00
Mark Johnston
ea2e7ddab1 When searching for an accompanying test program, look in the directory
containing the test script rather than the current directory. This is needed
in order to run the DTrace tests under Kyua.

MFC after:	1 week
2015-01-30 04:11:30 +00:00
Ed Maste
5d64c46856 Add note that contigfree(9) does not accept NULL
Differential Revision: https://reviews.freebsd.org/D1721
2015-01-30 03:17:07 +00:00
Pyun YongHyeon
0a9aceb8ee Correct device description message. 2015-01-30 01:13:07 +00:00
Craig Rodrigues
69627a0de1 Add -s option to config.
This option allows for specifying the directory to use as the location for
kernel source files. This option was ported from NetBSD.

GitHub Pull Request:   https://github.com/freebsd/freebsd/pull/18
Submitted by:          Steve Kiernan <stevek@juniper.net>, Simon Gerraty <sjg@juniper.net>
Obtained from:         Juniper Networks, Inc.
Reviewed by:           imp
Differential Revision: https://reviews.freebsd.org/D1722
Relnotes:              yes
2015-01-29 22:49:30 +00:00
Dimitry Andric
0b77a417c8 Similar to r277901, fix more -Wcast-qual warnings in libkern's strtoq(),
strtoul() and strtouq(), by using __DECONST.  No functional change.

MFC after:	3 days
2015-01-29 21:54:01 +00:00
Dimitry Andric
b94d92e5c8 Fix a -Wcast-qual warning in libkern's strtol(), by using __DECONST. No
functional change.

MFC after:	3 days
2015-01-29 21:16:45 +00:00
John Baldwin
d141141610 Opt for performance over power-saving on Intel CPUs that have a
P-state but not C-state invariant TSC by changing the default behavior
to leaving the TSC enabled as the timecounter and disabling C2+ instead
of disabling the TSC by default.

Discussed with:		jkim
Tested by:		Jan Kokemuller <jan.kokemueller@gmail.com>
2015-01-29 20:41:42 +00:00
Dimitry Andric
03ce3d7219 Fix a bunch of -Wcast-qual warnings in cd9660_util.c, by using
__DECONST.  No functional change.

MFC after:	3 days
2015-01-29 20:40:25 +00:00
Dimitry Andric
09bb4a314a Fix a bunch of -Wcast-qual warnings in msdosfs_conv.c, by using
__DECONST.  No functional change.

MFC after:	3 days
2015-01-29 20:30:13 +00:00
John Baldwin
304d020165 Remove the d_thread_t compatibility shim provided in 5.0 to handle the
struct thread (<= 4.x) vs struct proc (>= 5.0) argument to cdevsw routines.
It is long past its expiration date.

PR:		196544 (exp-run)
2015-01-29 19:55:33 +00:00
Andrew Rybchenko
93929f253d sfxge: Separate software Tx queue limit for non-TCP traffic
Add separate software Tx queue limit for non-TCP traffic to make total
limit higher and avoid local drops of TCP packets because of no
backpressure.
There is no point to make non-TCP limit high since without backpressure
UDP stream easily overflows any sensible limit.

Split early drops statistics since it is better to have separate counter
for each drop reason to make it unabmiguous.

Add software Tx queue high watermark. The information is very useful to
understand how big queues grow under traffic load.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-01-29 19:11:37 +00:00
Andrew Rybchenko
d9e49c8352 sfxge: implemented parameter to restrict RSS channels
Submitted by:   Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-01-29 19:09:14 +00:00
Andrew Rybchenko
745714c104 sfxge: Use SFXGE_MODERATION to initialize event moderation
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-01-29 19:06:14 +00:00
Andrew Rybchenko
123b769617 sfxge: Pass correct address to free allocated memory in the case of load error
Most likely is was just memory leak on the error handling path since
typically efsys_mem_t is filled in by zeros on allocation.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-01-29 19:04:42 +00:00
Andrew Rybchenko
495d35b1d7 sfxge: Remove unused esm_size member of the efsys_mem_t structure
esm_size is not even initialized properly when memory is allocated.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-01-29 19:03:33 +00:00
Andrew Rybchenko
8402a8688e sfxge: Do not bzero() DMA allocated memory once again
sfxge_dma_alloc() calls bus_dmamem_alloc() with BUS_DMA_ZERO flag, so
allocated memory is already filled in by zeros

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-01-29 19:02:25 +00:00
Andrew Rybchenko
cc933626d4 sfxge: Add evq argument to sfxge_tx_qcomplete()
It removes necessity to get evq pointer by its index in soft context.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-01-29 19:01:09 +00:00
Andrew Rybchenko
a35485aa72 sfxge: fixed TSO code to cope with VLAN headers
Submitted by:   Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-01-29 18:59:22 +00:00
Andrew Rybchenko
76c8553679 sfxge: Remove extra cache-line alignment and reorder sfxge_evq_t
Remove the first member alignment to cacheline since it is nop.
Use __aligned() for the whole structure to make sure that the structure
size is cacheline aligned.
Remove lock alignment to make the structure smaller and fit all members
used on event queue processing into one cacheline (128 bytes) on x86-64.
The lock is obtained as well from different context when event queue
statistics are retrived from sysctl context, but it is infrequent.
Reorder members to avoid padding and go in usage order on event
processing.
As the result all structure members used on event queue processing fit
into exactly one cacheline (128 byte) now.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-01-29 18:57:27 +00:00
Andrew Rybchenko
fe9000816a sfxge: Make it possible to build without EVQ statistics
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-01-29 18:54:43 +00:00
Andrew Rybchenko
e5e313603c sfxge: Move txq->next pointer to part writable on completion path
In fact the pointer is used only if more than one TXQ is processed in
one interrupt.
It is used (read-write) on completion path only.
Also it makes the first part of the structure smaller and it fits now
into one 128byte cache line. So, TXQ structure becomes 128 bytes smaller.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-01-29 18:52:33 +00:00
Andrew Rybchenko
b64af6b0fb sfxge: Change sfxge_ev_qpoll() proto to avoid EVQ pointers array access
It was the only place on data path where sc->evq array is accessed.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-01-29 18:50:25 +00:00
Dimitry Andric
f8270a6221 Ensure that lint does not pick up C11 keywords (e.g. _Noreturn), even
if C11 mode is used.  It does not support any C11 constructs.

MFC after:	3 days
2015-01-29 18:44:21 +00:00
Luiz Otavio O Souza
c67d5d66bf Rename the avila, cambria and zynq GPIO driver names to match the expected
string.

With this change it is not necessary redeclare the driver relations with
gpiobus and gpioc.

This also prevents redundant declarations when gpiobusvar.h is included
(which is going to happen soon).
2015-01-29 18:08:50 +00:00
Pedro F. Giffuni
71501ba6e3 MFV r277870
Fix compile warnings for gcc-4.4.x
This also fixes at least a warning with clang 3.6.0
including the fix for r277841.

MFC after:	1 week
2015-01-29 15:35:55 +00:00