Commit Graph

200646 Commits

Author SHA1 Message Date
Baptiste Daroussin
8faa40d1a0 Switch to mandoc's version of makewhatis(8), whatis(1), apropos(1) utilities.
This change among other things improve search capabilities over the manpages
allowing fine grain query.

A new build option WITHOUT_MANDOCDB has been added to keep the ancient version
of the database and the tools. The plan is to entirely remove this option before
11.0-RELEASE.

Differential Revision:	https://reviews.freebsd.org/D2603
2015-05-30 17:41:37 +00:00
Luiz Otavio O Souza
b1621f22b3 Actually check the DTS node value to enable the uart quirks.
Without this fix, you cannot disable the quirks by setting it to 0, just
the presence of the FDT node was enough to enable it.
2015-05-30 16:30:51 +00:00
Baptiste Daroussin
645acf41e3 Do not make libsqlite3 dependency chain only defined for kerberos, soon more
options would need libsqlite3 as well thus depends on this definitions
2015-05-30 16:00:33 +00:00
Simon J. Gerraty
6332aaacb4 Use SRCTOP when defining ROOTOBJDIR
Excplicitly check rather than assume that .CURDIR is
a component of .OBJDIR
Otherwise check for OBJTOP and if that is a match use it.
2015-05-30 15:13:18 +00:00
Simon J. Gerraty
883e6bfbb1 Define SRCTOP in src.sys.mk
Because src.sys.mk should only ever be found in the src tree
we can use its position (.PARSEDIR) to set SRCTOP.

Reviewed by:	bapt, imp
2015-05-30 15:08:52 +00:00
Michael Gmelin
71d51719ea ig4 - Intel fourth gen integrated I2C SMBus driver.
Differential Revision:	https://reviews.freebsd.org/D2372
Reviewed by:	jhb, wblock, adrian
Approved by:	jhb, wblock
Relnotes:	yes
2015-05-30 12:17:18 +00:00
Marcel Moolenaar
ca4a0f7b65 Do not set d_fwsectors nor d_fwheads. Primarily because the values
tend to be invalid. On a Beaglebone Black, we get 8192 sectors per
track and that causes major breakages.

Differential Revision: D2646
Reviewed by:	ian@ imp@
2015-05-29 20:50:41 +00:00
Rick Macklem
0c419e226c Make the NFS server use shared vnode locks for a few cases
that are allowed by the VFS/VOP interface instead of using
exclusive locks.

MFC after:	2 weeks
2015-05-29 20:22:53 +00:00
Brooks Davis
0aa6527ff0 Removed unused special fork() implementations.
The arm version hasn't been used in ages.

The mips version uses a valid, but pointless check of v1 and has been
unhooked from the build since r276630.

Differential Revision:	https://reviews.freebsd.org/D2592
Reviewed by:	emaste
Sponsored by:	DARPA, AFRL
2015-05-29 19:42:55 +00:00
Konstantin Belousov
aef68c961a When delivering a signal with default disposition to the thread,
tdsigwakeup() increases the priority of the low-priority threads, to
give them a chance to be terminated timely.  Also, kernel allows user
to signal kernel processes.  The combined effect is that signalling
idle process bump a priority of the selected delivery thread, which
starts eating CPU.

Check for the delivery thread be an idle thread and do not raise its
priority then.

The signal delivery to the kernel threads must be opt-in feature.
Kernel thread should explicitely declare the ability to handle signals
directed to it.  E.g., nfsd threads check for signal as an indication
of exit request.

Most threads do not handle signals at all, and queuing the signal to
them causes odd side-effects.  Most innocent consequence is the memory
leak due to queued ksiginfo, which is never deleted from the sigqueue.
Code to prevent even queuing signals to the kernel threads is trivial,
but it requires careful examination of each call to kproc/kthread
creation to decide should the signalling be allowed.  The commit is a
stop-gap measure which fixes the immediate case for now.

PR:	200493
Reported and tested by:	trasz
Discussed with:	trasz, emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-05-29 16:26:08 +00:00
Gleb Smirnoff
76e6fd5d6c Use device_printf() instead of if_printf(). No functional changes. 2015-05-29 14:35:16 +00:00
Maxim Konovalov
0b163ef243 Kill EoL whitespace. 2015-05-29 14:03:07 +00:00
Maxim Konovalov
ac1c13c4f2 arm64 added to CSCOPE_ARCHDIR. 2015-05-29 14:02:37 +00:00
Konstantin Belousov
69baeadc31 Remove several write-only variables, all reported by the gcc 4.9
buildkernel run.

Some of them were write-only under some kernel options, e.g. variables
keeping values only used by CTR() macros.  It costs nothing to the
code readability and correctness to eliminate the warnings in those
cases too by removing the local cached values used only for
single-access.

Review:	https://reviews.freebsd.org/D2665
Reviewed by:	rodrigc
Looked at by:	bjk
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-05-29 13:24:17 +00:00
Andrey V. Elsukov
4e870f943f Move RTM announces into generic code to be independent from Layer2 code.
This fixes bug introduced in 274988, when announces about new addresses
don't sent for tunneling interfaces.

Reported by:	tuexen@
MFC after:	1 week
2015-05-29 10:24:16 +00:00
Baptiste Daroussin
6b6b47d0e3 Remove dead declaration
PR:		195928
MFC after:	2 days
2015-05-29 10:07:20 +00:00
Andrew Turner
5d8564aec8 Fix __fpclassifyl when double == long double. As with r283693 this is
needed on ARM and PowerPC.

MFC after:	1 Week
2015-05-29 09:26:10 +00:00
Andrew Turner
275ac7729e Fix __isinfl on architectures where double == long double. This is the
case on at least ARM and PowerPC.

MFC after:	1 week
2015-05-29 09:23:20 +00:00
Konstantin Belousov
35725a97c4 Explicitely enable queued invalidation completion interrupt when the
queue is started, not relying on the interrupt remaping method to
happen.  Also disable interrupts when shooting down the queue.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-05-29 09:17:59 +00:00
Michael Tuexen
c06184c814 Remove printf() noise...
MFC after: 3 days
2015-05-29 08:31:15 +00:00
Dmitry Chagin
0b6ce4efa9 The linux_common module only for 64bit Linuxulators.
Its my fault.
2015-05-29 05:50:33 +00:00
Dmitry Chagin
506bd395a7 Move linux64 and linux_common to it's right place and make them not
depend on bhyve.

Submitted by:	Oliver Pinter <oliver.pinter from hardenedbsd.org>
2015-05-29 05:46:58 +00:00
Andrew Rybchenko
c378187825 sfxge: do not use DEBUG_FLAGS to enable extra debug checks
DEBUG_FLAGS are set to DEBUG option value when kernel is built.
For example, it is -g in GENERIC config to have debug symbols.
Also DEBUG_FLAGS are used to determine if ctfconvert should keep
debug symbols.
Since we redefined DEBUG_FLAGS, debug symbols were always missing.
ctfconvert complains about it during kernel build.
It is incorrect to append DEBUG_FLAGS, since if DEBUG has no -g (or
similar), we'll have no debug symbols and ctfconvert will complain.
If it incorrect to always have -g in our DEBUG_FLAGS, since debug
symbols presence should be controllable by kernel config.
So, just add disabled by default addition of -DDEBUG=1 to CFLAGS.

Reviewed by:    imp
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2666
2015-05-29 05:44:56 +00:00
Rui Paulo
78fd538146 acpi_ibm: add per-model default events mask.
Add support for the hotkeys on a Lenovo X1 3rd gen. This also enables
event reporting by default.
2015-05-29 05:28:24 +00:00
Glen Barber
d917e7d549 Export 'BOARDNAME' when differs from the KERNCONF.
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2015-05-29 02:16:40 +00:00
Glen Barber
ed3d3a8943 Sort configuration options for consistency with other boards.
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2015-05-29 02:15:05 +00:00
Brooks Davis
c0f9cb13c5 Revert r102953
The bitfile padding was always unallocated on real-world FreeBSD systems and
depended on the assumption that (abs(sizeof(long) - sizeof(char*)) <= 32).

Differential Revision:	https://reviews.freebsd.org/D2667
Reviewed by:	eadler
Sponsored by:	DARPA, AFRL
2015-05-28 22:06:05 +00:00
John Baldwin
f3bb925153 Create a separate kobj interface for leaf-driver PCI IOV methods.
Leaf drivers should not import the PCI bus interface to add IOV handling.
Instead, move the IOV client methods to a separate kobj interface.

Differential Revision:	https://reviews.freebsd.org/D2584
Reviewed by:	rstone
2015-05-28 22:01:50 +00:00
Pedro F. Giffuni
e54a659a26 Provide VOP_GETPAGES_ASYNC() for extfs.
Merge the filesystem specific part from r274914 to ext2fs.

I only did regular testing with the change but UFS and our ext2fs
are similar enough that the code should just work with the new
sendfile.

Discussed with:	glebius
2015-05-28 21:06:59 +00:00
Michael Tuexen
c913390df3 Report the MTU consistently as specified in
https://tools.ietf.org/html/rfc6458
Thanks to Irene Ruengeler for helping me to fix this bug.
MFC after: 3 days
2015-05-28 20:33:28 +00:00
Michael Tuexen
0818979a3c Take source and destination address into account when determining
the scope.
This fixes a problem when a client with a global address
connects to a server with a private address.
Thanks to Irene Ruengeler in helping me to find the issue.

MFC after: 3 days
2015-05-28 19:28:08 +00:00
Michael Tuexen
d60568d78a Retire SCTP_DONT_DO_PRIVADDR_SCOPE which was never defined.
MFC after: 3 days
2015-05-28 18:52:32 +00:00
Michael Tuexen
70fa550b45 Fix a bug where messages would not be sent in SHUTDOWN_RECEIVED state.
This problem was reported by Mark Bonnekessel and Markus Boese.
Thanks to Irene Ruengeler for helping me to fix the cause of
the problem. It can be tested with the following packetdrill script:

+0.0 socket(..., SOCK_STREAM, IPPROTO_SCTP) = 3
+0.0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
+0.0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
// Check the handshake with an empty(!) cookie
+0.1 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress)
+0.0 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=0, ...]
+0.1 < sctp: INIT_ACK[flgs=0, tag=2, a_rwnd=10000, os=1, is=1, tsn=0, STATE_COOKIE[len=4, val=...]]
+0.0 > sctp: COOKIE_ECHO[flgs=0, len=4, val=...]
+0.1 < sctp: COOKIE_ACK[flgs=0]
+0.0 getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
+0.0 write(3, ..., 1024) = 1024
+0.0 > sctp: DATA[flgs=BE, len=1040, tsn=0, sid=0, ssn=0, ppid=0]
+0.0 write(3, ..., 1024) = 1024 // Pending due to Nagle
+0.0 < sctp: SHUTDOWN[flgs=0, cum_tsn=0]
+0.0 > sctp: DATA[flgs=BE, len=1040, tsn=1, sid=0, ssn=1, ppid=0]
+0.0 < sctp: SACK[flgs=0, cum_tsn=1, a_rwnd=10000, gaps=[], dups=[]] // Do we need another SHUTDOWN here?
+0.0 > sctp: SHUTDOWN_ACK[flgs=0]
+0.0 < sctp: SHUTDOWN_COMPLETE[flgs=0]
+0.0 close(3) = 0

MFC after: 3 days
2015-05-28 18:34:02 +00:00
Stephen McConnell
a2c1487946 The wrong commit message was given with r283632. This is the correct message.
- Updated all files with 2015 Avago copyright, and updated LSI's copyright
  dates.

- Changed all of the PCI device strings from LSI to Avago Technologies (LSI).

- Added a sysctl variable to control how StartStopUnit behavior works. User can
  select to spin down disks based on if disk is SSD or HDD.

- Inquiry data is required to tell if a disk will support SSU at shutdown or
  not. Due to the addition of mpssas_async, which gets Advanced Info but not
  Inquiry data, the setting of supports_SSU was moved to the
  mpssas_scsiio_complete function, which snoops for any Inquiry commands. And,
  since disks are shutdown as a target and not a LUN, this process was
  simplified by basing it on targets and not LUNs.

- Added a sysctl variable that sets the amount of time to retry after sending a
  failed SATA ID command. This helps with some bad disks and large disks that
  require a lot of time to spin up. Part of this change was to add a callout to
  handle timeouts with the SATA ID command. The callout function is called
  mpssas_ata_id_timeout(). (Fixes PR 191348)

- Changed the way resets work by allowing I/O to continue to devices that are
  not currently under a reset condition. This uses devq's instead of simq's and
  makes use of the MPSSAS_TARGET_INRESET flag. This change also adds a function
  called mpssas_prepare_tm().

- Some changes were made to reduce code duplication when getting a SAS address
  for a SATA disk.

- Fixed some formatting and whitespace.

- Bump version of mps driver to 9.255.01.00-fbsd

PR:		191348
Reviewed by:	ken, scottl
Approved by:	ken, scottl
MFC after:	1 week
2015-05-28 18:24:22 +00:00
Stephen McConnell
c91d307f52 The wrong commit message was given with r283632. To get the correct commit
message synced to the changes in r283632, those changes are now backed out.
Another commit will be done that is exactly the same as r283632 except it will
have to correct commit message.

Approved by:	ken, scottl, asomers, gibbs
2015-05-28 18:14:55 +00:00
Michael Tuexen
1c7db386c4 Use macros for overhead in a consistent way. No functional change.
Thanks to Irene Ruengeler for suggesting the change.

MFC after: 3 days
2015-05-28 17:57:56 +00:00
Neel Natu
248e6799e9 Fix non-deterministic delays when accessing a vcpu that was in "running" or
"sleeping" state. This is done by forcing the vcpu to transition to "idle"
by returning to userspace with an exit code of VM_EXITCODE_REQIDLE.

MFC after:      2 weeks
2015-05-28 17:37:01 +00:00
Michael Tuexen
ba78590287 Some more debug info cleanup.
MFC after: 3 days
2015-05-28 16:39:22 +00:00
Patrick Kelsey
e5315a56df Provide an unambiguous description of the potential hazard in calling
pthread_setspecific(3) from a key destructor.

Reviewed by: jhb
Approved by: jmallett (mentor)
MFC after: 3 days
2015-05-28 16:18:41 +00:00
Michael Tuexen
b7d130befc Fix and cleanup the debug information. This has no user-visible changes.
Thanks to Irene Ruengeler for proving a patch.

MFC after: 3 days
2015-05-28 16:00:23 +00:00
Michael Tuexen
548f47a8f1 Address some compiler warnings. No functional change.
MFC after: 3 days
2015-05-28 14:24:21 +00:00
John Baldwin
2f0219986c Tweak the description of when waitpid() doesn't return any status for a
non-blocking wait to avoid the word "empty".

Requested by:	ngie
2015-05-28 13:56:19 +00:00
Bjoern A. Zeeb
b748af7305 Similarly to other architecture, add the include for cpufunc.h which is
needed for pte.h by vmstat to resolve MIPS_CCA_UNCACHED.
2015-05-28 12:33:21 +00:00
Scott Long
2ae078a31d Follow-up r283636 with a fix to the other abuses of BUS_SPACE_MAXSIZE_32BIT.
It makes no sense to specify a segment size that's larger than the total
amount that you want to allocate.
2015-05-28 08:00:11 +00:00
Patrick Kelsey
19342eee9d Add CAP_FCNTL to the lease file capsicum rights, and limit to
CAP_FCNTL_GETFL.  Without CAP_FCNTL_GETFL, the lease file truncation
in rewrite_client_leases() will fail to trim old data when rewriting
the file with a lesser amount of data.

Reviewed by: pjd, rwatson
Approved by: jmallett (mentor)
MFC after: 1 week
2015-05-28 05:38:07 +00:00
Gleb Smirnoff
c803f24b28 To avoid sleeping in firmware_get() with bwi mutex held, call
bwi_mac_fw_alloc() at the device attach, not in the interface
init.
2015-05-27 22:30:21 +00:00
Gleb Smirnoff
15692978d7 In bwi_mac_fw_alloc():
- Use device_printf() instead of if_printf().
- Reduce cut and paste.
2015-05-27 22:29:19 +00:00
Gleb Smirnoff
46a8b17df3 Setup the interrupt handler after bwi_attach(). If IRQ is shared, interrupt
may come during bwi_attach().
2015-05-27 22:27:15 +00:00
Gleb Smirnoff
515b3730c6 - Don't request BUS_DMA_ALLOCNOW for dma tags, that requires enormous
amount of memory.
- Don't request segsize of BUS_SPACE_MAXSIZE_32BIT, when maxsize is
  MCLBYTES.

With this change bwi_attach() can succeed on i386.

Submitted by:	scottl
2015-05-27 22:25:49 +00:00
Rick Macklem
1f54e596ad Make the size of the hash tables used by the NFSv4 server tunable.
No appreciable change in performance was observed after increasing
the sizes of these tables and then testing with a single client.
However, there was an email that indicated high CPU overheads for
a heavily loaded NFSv4 and it is hoped that increasing the sizes
of the hash tables via these tunables might help.
The tables remain the same size by default.

Differential Revision:	https://reviews.freebsd.org/D2596
MFC after:	2 weeks
2015-05-27 22:00:05 +00:00