Commit Graph

196872 Commits

Author SHA1 Message Date
Glen Barber
c14e0e5390 Document r276881, libedit UTF-8 support.
Sponsored by:	The FreeBSD Foundation
2015-01-23 19:33:03 +00:00
Jung-uk Kim
ae1ef64fe4 Simplify retry loops. No functional change. 2015-01-23 18:55:04 +00:00
Jung-uk Kim
4552fccb4b Revert r216942. This commit was premature and caused too many complaints.
PR:		162859
MFC after:	3 days
2015-01-23 18:12:44 +00:00
Will Andrews
d0fde85e65 Use clock_gettime to measure the time that we spent asleep during
"vmstat -i" instead of assuming it's what we asked for.

Submitted by:	asomers
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1066751 on 2014/06/04
2015-01-23 16:21:31 +00:00
Will Andrews
157b158ea9 Use CLOCK_UPTIME to get the uptime instead of CLOCK_MONOTONIC.
Submitted by:	asomers
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1066740 on 2014/06/04
2015-01-23 16:18:39 +00:00
Will Andrews
961a5dae5c Make "vmstat -i" respect the -c <count> and -i <interval> options together.
Submitted by:	asomers
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1066735 on 2014/06/04
2015-01-23 16:15:55 +00:00
Ian Lepore
9e8ab8f731 Add pinctrl driver support for the encoded input register config words
that the linux guys made up on the fly (but didn't document) last August.
This type of encoded config now appears in the imx6 fdt data.
2015-01-23 16:05:47 +00:00
Will Andrews
ca71b908cc Allow lists for "nooption" and "nooptions" keywords.
usr.sbin/config/config.y
	According to config(5), the "device", "devices",
	"nodevice", "nodevices", "option", "options",
	"nooption", and "nooptions" keywords can all take a
	comma-separated list of values.  However, the yacc code
	did not allow lists for "nooption" and "nooptions", only
	single values.  This commit fixes the yacc code to allow
	comma separated values for all the above keywords.

Submitted by:	asomers
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1095296 on 2014/10/07
2015-01-23 16:03:02 +00:00
Will Andrews
abf607ed8f Print transfer times for read, write, & overall independently.
Round up calculated values for iops and average time per io to avoid a
shifting display if there are 1000+ (or even 10000+) iops, or if an
average time per io column is 1000+ ms.

Reviewed by:	ken
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1089947 on 2014/09/26
		1093625 on 2014/09/29
		1093650 on 2014/09/29
		1095662 on 2014/10/09
2015-01-23 15:55:03 +00:00
Kevin Lo
128236c022 Remove break after return. 2015-01-23 15:14:30 +00:00
Will Andrews
bb269f3ae4 Log hardware interface up/down as "hardware" rather than just "hw".
Suggested by:	glebius
MFC after:	1 week
MFC with:	277530
2015-01-23 14:30:24 +00:00
Will Andrews
369a670857 When a CARP state change is caused by an ifconfig request, log it accordingly.
Suggested by:	glebius
MFC after:	1 week
MFC with:	277530
2015-01-23 14:28:12 +00:00
Andrey V. Elsukov
ffc610b221 After r270929 RAW IP code assumes that all IP fields are in network
byte order. Fix ping(8) to pass an IP header with converted ip_off
and ip_len fields, when IP_HDRINCL socket option used.
2015-01-23 13:26:35 +00:00
Nathan Whitehorn
ec336f0f0c Use relocation-safe methods to determine the sizes of the exception handlers.
A "size" symbol with its address set to the length of handler would be
shifted forward with all other addresses when relocations are processed.
Instead, just note the end and do the subtraction at runtime.
2015-01-23 07:36:51 +00:00
Alexey Dokuchaev
c5f282daad Fix usage example in kvprintf(9) and its copy in libstand(3): trailing '\n'
in bitfield argument is wrong, as it will be treated as bit 10, causing any
code printing >=10 bits with bit 10 on as having a trailing comma.

Newline (intended one) should be part of the format string (already present
in the examples).

Also fix grammar and kill EOL whitespace in comment while here.

PR:		195005
Approved by:	bdrewery
2015-01-23 07:30:57 +00:00
Enji Cooper
43682290a5 Remove the duplicate zzz entry 2015-01-23 06:01:34 +00:00
Enji Cooper
57de838fe7 MFhead @ r277555 2015-01-23 01:39:04 +00:00
Ian Lepore
5087ad0212 Enable all the mmc/sd controllers, because there's no telling which ones
any given board will be using.

Yes, changing source is an unusually primitive power control implementation.
2015-01-23 01:18:08 +00:00
Will Andrews
0e5f55bb95 Improve the distribution of LAGG port traffic.
I edited the original change to retain the use of arc4random() as a seed for
the hashing as a very basic defense against intentional lagg port selection.

The author's original commit message (edited slightly):

sys/net/ieee8023ad_lacp.c
sys/net/if_lagg.c
	In lagg_hashmbuf, use the FNV hash instead of the old
	hash32_buf.  The hash32 family of functions operate one octet
	at a time, and when run on a string s of length n, their output
	is equivalent to :

		   ----- i=n-1
		   \
	       n    \           (n-i-1)              32
	( seed^  +  /        33^        * s[i] ) % 2^
		   /
		   ----- i=0

	The problem is that the last five bytes of input don't get
	multiplied by sufficiently many powers of 33 to rollover 2^32.
	That means that changing the last few bytes (but obviously not
	the very last) of input will always change the value of the
	hash by a multiple of 33.  In the case of lagg_hashmbuf() with
	ipv4 input, the last four bytes are the TCP or UDP port
	numbers.  Since the output of lagg_hashmbuf is always taken
	modulo the port count, and 3 is a common port count for a lagg,
	that's bad.  It means that the UDP or TCP source port will
	never affect which lagg member is selected on a 3-port lagg.

	At 10Gbps, I was not able to measure any difference in CPU
	consumption between the old and new hash.

Submitted by:	asomers (original commit)
Reviewed by:	emaste, glebius
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1001723 on 2013/08/28 (original)
		1114258 on 2015/01/22 (edit)
2015-01-23 00:06:35 +00:00
Enji Cooper
5e49723127 Add sample log rotation support for opensm
Up to 7 archives of the log will be kept (just for consistency with the other
log rotation rules)

PR: 196788
MFC after: 1 week
Reviewed by: hselasky
Sponsored by: EMC / Isilon Storage Division
2015-01-22 23:50:47 +00:00
Nathan Whitehorn
f70dd52fe6 Allow use of a pre-instantiated RTAS as well as a self-instantiated one. This
lets the kernel boot on RTAS-based systems by being kexec'ed from Linux.
2015-01-22 22:04:43 +00:00
Glen Barber
4afe7cf500 Rename the 'release' target to 'real-release', and
add two targets, 'vm-release' and 'cloudware-release',
that are invoked if WITH_VMIMAGES and WITH_CLOUDWARE
are not empty.

This fixes an issue where 'make release' would not
build the cloud provider targets because CLOUDWARE was
not yet set. [1]

Move the WITH_VMIMAGES and WITH_CLOUDWARE targets to
Makefile.vm.

Note: There is no 'cloudware-install' target yet, since
some of the disk image names may need to be specific to
the provider, so this is probably best handled by the
build scripts.

Reported by:	cperciva [1]
MFC after:	1 month
X-MFC-with:	r277458
Sponsored by:	The FreeBSD Foundation
2015-01-22 19:43:05 +00:00
Ed Maste
e9c93198bc Update reported elftoolchain version
The last elftoolchain update is upstream rev 3136. Update our reported
version and add M (Modified) suffix as our elftoolchain contains
additional fixes not yet committed upstream.

Sponsored by:	The FreeBSD Foundation
2015-01-22 17:53:30 +00:00
Ian Lepore
8436f7fe62 Declare Maxmem on arm. This should have been part of r277532. 2015-01-22 17:46:05 +00:00
Ian Lepore
f62ae5518e Add the Maxmem global and set it to the highest physical page number plus 1. 2015-01-22 17:42:30 +00:00
Hajimu UMEMOTO
f79998c8fc Don't include newvers.sh into freebsd-version. 2015-01-22 17:13:43 +00:00
Will Andrews
d01641e2c1 Improve CARP logging so that all state transitions are logged.
sys/netinet/ip_carp.c:
	Add a "reason" string parameter to carp_set_state() and
	carp_master_down_locked() allowing more specific logging
	information to be passed into these apis.

	Refactor existing state transition logging into a single
	log call in carp_set_state().

	Update all calls to carp_set_state() and
	carp_master_down_locked() to pass an appropriate reason
	string.  For state transitions that were previously logged,
	the output should be unchanged.

Submitted by:	gibbs (original), asomers (updated)
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1039697 on 2014/02/11 (original)
		1049992 on 2014/03/21 (updated)
2015-01-22 17:09:54 +00:00
Alexander Motin
379694e3d3 Don't count requests with status sent as overlapping.
While those requests are still in target OOA queue, for initiator they are
already completed, so tags can be reused.

MFC after:	1 week
2015-01-22 14:49:36 +00:00
Hans Petter Selasky
a115fb62ed Revert for r277213:
FreeBSD developers need more time to review patches in the surrounding
areas like the TCP stack which are using MPSAFE callouts to restore
distribution of callouts on multiple CPUs.

Bump the __FreeBSD_version instead of reverting it.

Suggested by:		kmacy, adrian, glebius and kib
Differential Revision:	https://reviews.freebsd.org/D1438
2015-01-22 11:12:42 +00:00
Enji Cooper
2decd8fc81 Make this compile with WARNS=6 and clang/gcc
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
2015-01-22 09:25:31 +00:00
Ryan Stone
6a429fa5d7 style(9) cleanup 2015-01-22 03:56:23 +00:00
Oleksandr Tymoshenko
5408fdf48d Add last_fault_code used in pmap-v6.c if kernel is compiled with "option DEBUG" 2015-01-22 03:33:51 +00:00
Oleksandr Tymoshenko
fbae9a50c4 Write ACK for all kinds of LCDC interrupts 2015-01-22 03:32:04 +00:00
Gleb Smirnoff
efc6c51ffa Back out r276841, r276756, r276747, r276746. The change in r276747 is very
very questionable, since it makes vimages more dependent on each other. But
the reason for the backout is that it screwed up shutting down the pf purge
threads, and now kernel immedially panics on pf module unload. Although module
unloading isn't an advertised feature of pf, it is very important for
development process.

I'd like to not backout r276746, since in general it is good. But since it
has introduced numerous build breakages, that later were addressed in
r276841, r276756, r276747, I need to back it out as well. Better replay it
in clean fashion from scratch.
2015-01-22 01:23:16 +00:00
Will Andrews
36fe5321f2 Enable nanobsd.sh to be executed when pwd != NANO_SRC.
While here, fix a bug in which NANO_PMAKE would not be appended at the
appropriate time.

Simply move both checks to after the call to set_defaults_and_export().

Tested by:	lstewart
Sponsored by:	Spectra Logic
2015-01-22 00:52:34 +00:00
Ed Maste
8b817932f7 Fix bootstrap on systems with old libdwarf and WITHOUT_CDDL
ELF Tool Chain tools need libelf and libdwarf.

Submitted by:	jmallett (earlier version)
Reviewed by:	jmallett
Sponsored by:	The FreeBSD Foundation
2015-01-21 21:49:03 +00:00
Ian Lepore
b9a1285191 Move the __aligned() declaration to where it will actually do something. 2015-01-21 21:31:26 +00:00
Will Andrews
35d002dc8f Fix SCSI status byte reporting on 4Gb and 8Gb Qlogic boards.
The newer boards don't have the response field that indicates
whether the SCSI status byte is present.  You have to just look to
see whether it is non-zero.

The code was looking to see whether the sense length was valid
before propagating the SCSI status byte (and sense information) up
the stack.  With a status like Reservation Conflict, there is no
sense information, only the SCSI status byte.  So it wasn't getting
correctly returned.

isp.c:
	In isp_intr(), if we are on a 2400 or 2500 type board and
	get a response, look at the actual contents of the
	SCSI status value and set the RQSF_GOT_STATUS flag
	accordingly so that return any SCSI status value we get.  The
	RQSF_GOT_SENSE flag will get set later on if there is
	actual sense information returned.

Submitted by:	ken
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1112791 on 2015/01/15
2015-01-21 20:32:36 +00:00
Will Andrews
5b14cb4136 Force commit to record the correct log for r277513.
If the user sends an XPT_RESET_DEV CCB, make sure to reset the
Fibre Channel Command Reference Number if we're running on a FC
controller.

We send a SCSI Target Reset when we get this CCB, and as a result
need to reset the CRN to 1 on the next command.

isp_freebsd.c:
	In the XPT_RESET_DEV implementation in isp_action(), reset
	the CRN if we're on a FC controller.

Submitted by:	ken
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1112787 on 2015/01/15
2015-01-21 20:27:11 +00:00
Will Andrews
b44e442e50 Change 1112791 by kenm@ken.spectrabsd8 on 2015/01/15 16:45:13
Fix SCSI status byte reporting on 4Gb and 8Gb Qlogic boards.

The newer boards don't have the response field that indicates
whether the SCSI status byte is present.  You have to just look to
see whether it is non-zero.

The code was looking to see whether the sense length was valid
before propagating the SCSI status byte (and sense information) up
the stack.  With a status like Reservation Conflict, there is no
sense information, only the SCSI status byte.  So it wasn't getting
correctly returned.

isp.c:
	In isp_intr(), if we are on a 2400 or 2500 type board and
	get a response, look at the actual contents of the
	SCSI status value and set the RQSF_GOT_STATUS flag
	accordingly so that return any SCSI status value we get.  The
	RQSF_GOT_SENSE flag will get set later on if there is
	actual sense information returned.

Submitted by:	ken
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1112791 on 2015/01/15
2015-01-21 20:22:53 +00:00
Ian Lepore
ede35faed2 Micro-optimize the new arm inline bus_space implementation by grouping all
the data the inline functions access together at the start of the bus_space
struct.  The start-of part isn't so important, it's the grouping-together
that's the point: now all the most-accessed data should be in one cache line.

Suggested by:	  cognet
2015-01-21 20:12:35 +00:00
Will Andrews
9129104227 Fix remote DMA based firewire debugging when targeting
systems with more than 4GB of physical memory.

To remotely debug the system 'stealthy' which has a kernel
with this change installed and firewire properly configured:

	% fwcontrol -m stealthy (or stealthy's firewire EUI64)
	% kgdb kernel /dev/fwmem0.0

sys/dev/firewire/fwohci.c:
	Rather than hard code the upper limit for hw based
	automatic responses to remote DMA requests at 4GB,
	program the hardware using Maxmem, the page number
	one higher than the highest physical page detected
	in the system.

	While here, garbage collect more useless splfw()
	calls.

Submitted by:	gibbs
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1110994 on 2015/01/06
2015-01-21 20:08:24 +00:00
Will Andrews
4dd896995c Fix firewire panic when issuing a reply to an unhandled
asynchronous remote dma request (DMA request that the
hardware cannot automatically handle).

sys/dev/firewire/firewire.c
	In fw_rcv(), add missing early return in the error
	path for DMA requests to unregistered regions.

Submitted by:	gibbs
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1110993 on 2015/01/06
2015-01-21 20:06:25 +00:00
Will Andrews
ed80123329 Properly lock accesss to the firewire_comm->devices list.
sys/dev/firewire/firewire.c:
	Add missing FW_GLOCK/UNLOCK() usage to fw_noderesolve_nodeid().

sys/dev/firewire/firewire.c:
sys/dev/firewire/fwmem.c:
	Remove no-op splfw() calls from functions that have been
	audited for proper lock usage.

Submitted by:	gibbs
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1110992 on 2015/01/06
2015-01-21 20:05:10 +00:00
Will Andrews
7eaab60d36 Fix panic in firewire and creation of invalid config ROM.
sys/boot/i386/libfirewire/firewire.c:
sys/dev/firewire/firewire.c:
	Fix configuration ROM generation count wrapping logic
	so that the generation count is never outside of
	allowed limits (0x2 -> 0xF).

sys/dev/firewire/firewire.c:
	In fw_xfer_unload(), xfer->fc may be NULL.  Protect
	against this before taking the fc lock.

Submitted by:	gibbs
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1110685 on 2015/01/05
2015-01-21 20:03:46 +00:00
Will Andrews
ff9ae2210b Fix a FWXF_INQ race in the firewire driver.
sys/dev/firewire/firewire.c:
	In fw_xfer_unload() expand lock coverage so that
	the test for FWXF_INQ doesn't race with it being
	cleared in another thread.

Submitted by:	gibbs
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1110207 on 2015/01/02
2015-01-21 20:02:16 +00:00
Will Andrews
26f1289e49 Fix one cause of firewire panics.
sys/dev/firewire/firewire.c:
	In fw_xfer_unload(), clear the FWXF_INQ flag on the
	xfer under protection of the FW_GMTX, after the
	xfer is removeed from the tx/rx queue.  Otherwise
	it is possible for the xfer to be removed again
	(corrupting the list or immediately panicing) from
	another thread that has found this xfer in the
	transaction label table.

Submitted by:	gibbs
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1110200 on 2015/01/02
2015-01-21 19:59:09 +00:00
Will Andrews
49f159beef Garbage collect dragonfly and legacy FreeBSD system support from dcons(4).
Submitted by:	gibbs
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1110990 on 2015/01/06
2015-01-21 19:53:52 +00:00
Will Andrews
bd3a7c08c4 Remove commented log messages. 2015-01-21 19:30:01 +00:00
Will Andrews
35b540bfb2 Ignore sync requests from the system syncher, i.e. VFS_SYNC(waitfor=MNT_LAZY).
ZFS already commits outstanding data every zfs_txg_timeout seconds, so these
syncs are unnecessarily intrusive.

Submitted by:	gibbs
Sponsored by:	Spectra Logic
MFSpectraBSD:	1105759 on 2014/12/11
2015-01-21 19:25:57 +00:00