Commit Graph

214413 Commits

Author SHA1 Message Date
Ed Maste
18c23dffac ANSIfy kern_proc.c and delete register keyword
Reviewed by:	kib
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D6478
2016-07-27 14:27:08 +00:00
Ed Maste
6f1f849cf7 syscons,vt: improve phrasing in kern.vty man page description
Submitted by:	wblock
2016-07-27 14:12:04 +00:00
Konstantin Belousov
1822421c0b Remove Giant from settime(), tc_setclock_mtx guards tc_windup() calls,
and there is no other issues with parallel settime().  Remove spl()
vestiges there as well.

Tested by:	pho (as part of the whole patch)
Reviewed by:	jhb (same)
Discussed wit:	bde
Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
Differential revision:	https://reviews.freebsd.org/D7302
2016-07-27 11:54:24 +00:00
Konstantin Belousov
5760b029ee Prevent parallel tc_windup() calls, both parallel top-level calls from
setclock() and from simultaneous top-level and interrupt.  For this,
tc_windup() is protected with a tc_setclock_mtx spinlock, in the try
mode when called from hardclock interrupt.  If spinlock cannot be
obtained without spinning from the interrupt context, this means that
top-level executes tc_windup() on other core and our try may be
avoided.

The boottimebin and boottime variables should be adjusted from
tc_windup().  To be correct, they must be part of the timehands and
read using lockless protocol.  Remove the globals and reimplement the
getboottime(9)/getboottimebin(9) KPI using the timehands read
protocol.

Tested by:	pho (as part of the whole patch)
Reviewed by:	jhb (same)
Discussed wit:	bde
Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
X-Differential revision:	https://reviews.freebsd.org/D7302
2016-07-27 11:49:41 +00:00
Konstantin Belousov
4493f659e5 Fix a bug in r302252.
Change ntpadj_lock to spinlock always, and rename stuff removing
ADJ/adj from the names. ntp_update_second() requires ntp_lock and is
called from the tc_windup(), so ntp_lock must be a spinlock.  Add
missed lock to ntp_update_second().

Tested by:	pho (as part of the whole patch)
Reviewed by:	jhb (same)
Noted by:	bde
Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
X-Differential revision:	https://reviews.freebsd.org/D7302
2016-07-27 11:40:06 +00:00
Konstantin Belousov
21547fc7ca Reduce the resettodr_lock scope to only CLOCK_SETTIME() call.
Tested by:	pho (as part of the whole patch)
Reviewed by:	jhb (same)
Discussed with:	bde
Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
X-Differential revision:	https://reviews.freebsd.org/D7302
2016-07-27 11:34:25 +00:00
Konstantin Belousov
4d29106e55 Style.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
X-Differential revision:	https://reviews.freebsd.org/D7302
2016-07-27 11:33:33 +00:00
Konstantin Belousov
a83c016f00 Reduce number of timehands to just two. This is useful because
consumers can now be only one tc_windup() call late.

Use C99 initialization.

Tested by:	pho (as part of the whole patch)
Reviewed by:	jhb (same)
Discussed with:	bde
Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
X-Differential revision:	https://reviews.freebsd.org/D7302
2016-07-27 11:27:52 +00:00
Konstantin Belousov
584b675ed6 Hide the boottime and bootimebin globals, provide the getboottime(9)
and getboottimebin(9) KPI. Change consumers of boottime to use the
KPI.  The variables were renamed to avoid shadowing issues with local
variables of the same name.

Issue is that boottime* should be adjusted from tc_windup(), which
requires them to be members of the timehands structure.  As a
preparation, this commit only introduces the interface.

Some uses of boottime were found doubtful, e.g. NLM uses boottime to
identify the system boot instance.  Arguably the identity should not
change on the leap second adjustment, but the commit is about the
timekeeping code and the consumers were kept bug-to-bug compatible.

Tested by:	pho (as part of the bigger patch)
Reviewed by:	jhb (same)
Discussed with:	bde
Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
X-Differential revision:	https://reviews.freebsd.org/D7302
2016-07-27 11:08:59 +00:00
Sepherosa Ziehau
dc831186e3 hyperv/vmbus: Rename cleaned up bufring code
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7318
2016-07-27 09:27:08 +00:00
Andrey V. Elsukov
6a5d9be9fe Due to dropped mbuf in netisr queue route(8) can fall into infinity
loop of reading the rtsock's feed. When it used by some scripts,
this leads to growing number of not finished route(8) instances and
thus growing number of rtsock consumers. Add SIGALRM handler to prevent this.

Reviewed by:	melifaro
Obtained from:	Yandex LLC
MFC after:	2 weeks
Sponsored by:	Yandex LLC
2016-07-27 08:26:34 +00:00
Kevin Lo
a7c6b160b3 Regenerate timedef for zh_TW.
Reviewed by:	bapt
2016-07-27 08:11:08 +00:00
Kevin Lo
4d6d0d24b3 Fix cldr2def.pl script to add weekday to the date format of zh_TW locales.
While here, mention dependency on textproc/p5-XML-Parser in README.

Reviewed by:	bapt
2016-07-27 08:08:46 +00:00
Sepherosa Ziehau
b5ddb4093a hyperv/vmbus: Cleanup RX bufring read process.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7317
2016-07-27 07:36:54 +00:00
Sepherosa Ziehau
3ddfec1f17 hyperv/vmbus: Stringent RX bufring data length checks.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7316
2016-07-27 07:19:06 +00:00
Sepherosa Ziehau
455cc95f3f hyperv/vmbus: Cleanup TX bufring write process.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7315
2016-07-27 06:52:43 +00:00
Enji Cooper
60b0ea0dfb Testcase 7.8 no longer needs to be marked TODO
It passes out of the box today

MFC after: 2 months
Sponsored by: EMC / Isilon Storage Division
2016-07-27 06:49:16 +00:00
Sepherosa Ziehau
ca7c18e5c4 hyperv/vmbus: Update comment for bufring
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7314
2016-07-27 06:36:57 +00:00
Sepherosa Ziehau
ea06b5d3ec hyperv/vmbus: Use different struct for RX/TX bufring.
So that they can use suitable MP synchronization mechanism.

While I'm here change the bufring init/read/write function names.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7313
2016-07-27 06:17:20 +00:00
Sepherosa Ziehau
a0c3998ea9 hyperv/vmbus: Initialize RX/TX bufring mutex at channel creation time
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7312
2016-07-27 05:47:32 +00:00
Alan Cox
a766ffd061 Update a comment to reflect r284376.
MFC after:	3 days
2016-07-27 03:49:00 +00:00
Stephen J. Kiernan
cc37baea09 Add the NUM_CORE_FILES kernel config option which specifies the limit for the
number of core files allowed by a particular process when using the %I core
file name pattern.

Sanity check at compile time to ensure the value is within the valid range of
0-10.

Reviewed by:	jtl, sjg
Approved by:	sjg (mentor)
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D6812
2016-07-27 03:21:02 +00:00
Kevin Lo
dff611b2c6 Add weekday to the date format. 2016-07-27 00:46:48 +00:00
Ian Lepore
fe67c84656 Annotate the usb-serial drivers which always return 0 for line status,
so that it'll be easier to find and fix them in the future.
2016-07-27 00:08:01 +00:00
Peter Grehan
5a347e3bc3 - Change the fbuf "vga" parameter to "vga=on|io|off".
"io" is the default, and allows VGA i/o registers to be
   accessed. This is required by Win7/2k8 graphics guests that
   use a combination of BIOS int10 and UEFI.
   "off" disables all VGA i/o and mem accesses.
   "on" is not yet hooked up, but will enable full VGA rendering.

   OpenBSD/UEFI >= 5.9 graphics guests can be booted using "vga=off"

- Allow "rfb" to be used instead of "tcp" for the fbuf VNC
  description. "tcp" will be removed at a future point and is
  kept as an alias.

Discussed with:	Leon Dang
MFC after:	3 days
2016-07-27 00:03:29 +00:00
Ian Lepore
d83433299b Translate modem status reg bits from ns16550 to SER_* values used by the
tty layer.

Also annotate a switch case fall-through per style(9).
2016-07-27 00:03:18 +00:00
Ian Lepore
d88e7bb082 Translate modem status reg bits from ns16550 to SER_* values used by the
tty layer.

Also annotate a switch case fall-through per style(9).
2016-07-26 23:42:42 +00:00
Peter Grehan
34b1e8a155 Catch another case where an XHCI interrupt was being
injected without state being set up.

This fixes a core dump when dropping to the UEFI prompt
with graphics enabled and moving the mouse around.

Discussed with:	Leon Dang
MFC after:	3 days
2016-07-26 23:40:25 +00:00
Navdeep Parhar
17146cd543 cxgbe(4): Initialize the adapter queues (fwq and mgmtq) instead of
returning EAGAIN if they aren't available when the user tries to program
a filter.  Do this after validating the filter so that the driver
doesn't bring up the queues if it doesn't have to.
2016-07-26 23:29:37 +00:00
Ian Lepore
ab3249b590 Translate modem status reg bits from ns16550 to SER_* values used by the
tty layer.  Also, the line status reg bits are already ns16550 as expected
by the ucom layer, so no need for translation or a local var to hold them.
2016-07-26 23:27:28 +00:00
Ian Lepore
b90ce50491 Actually return line status register values from umoscom_cfg_get_status().
The hardware delivers ns16550-compatible status bits, which is what the
usb_serial code expects, so no need for translation, no need for a local
variable to hold a temporary lsr result.
2016-07-26 22:26:49 +00:00
Imre Vadász
b34d420935 Mention AC3165 and AC8260 chipsets in iwm(4) and mention AC3165 in iwmfw(4)
- Support for the AC3165 and AC8260 chipsets was added by r303322 and r303327.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D7322
2016-07-26 21:27:02 +00:00
Brad Davis
439e76ec22 Fix the case for some sysctl descriptions.
Reviewed by:	gnn
2016-07-26 20:20:09 +00:00
Ed Schouten
8de6c26711 Fix typing of srandom() and initstate().
POSIX requires that these functions have an unsigned int for their first
argument; not an unsigned long.

My reasoning is that we can safely change these functions without
breaking the ABI. As far as I know, our supported architectures either
use registers for passing function arguments that are at least as big as
long (e.g., amd64), or int and long are of the same size (e.g., i386).

Reviewed by:	ache
Differential Revision:	https://reviews.freebsd.org/D6644
2016-07-26 20:11:29 +00:00
Phil Shafer
7ee4fff4e7 Fix start date to not be in the future.
Submitted by:	phil
Reviewed by:	sjg (mentor)
Approved by:	sjg
2016-07-26 18:27:48 +00:00
Ed Schouten
f63cd251b2 Add shmatt_t.
It looks like our "struct shmid_ds::shm_nattch" deviates from the
standard in the sense that it is a signed integer, whereas POSIX
requires that it is unsigned, having a special type shmatt_t.

Patch up our native and 32-bit copies to use a new shmatt_t that is an
unsigned integer. As it's unsigned, we can relax the comparisons that
are performed on it. Leave the Linux, iBCS2, etc. copies of the
structure alone.

Reviewed by:	ngie
Differential Revision:	https://reviews.freebsd.org/D6655
2016-07-26 17:23:49 +00:00
Adrian Chadd
a68401914f Update my TODO items. 2016-07-26 16:40:03 +00:00
Ed Maste
8ee0bdb9fb vt: lock Giant around kbd calls in CONS_GETINFO
Note that keyboards are stored in an array and are not freed (just
"unregistered" by clearing some fields) so a race would be limited to
obtaining stale information about an unregistered keyboard.

Reported by:	CTurt
MFC after:	3 days
2016-07-26 15:34:26 +00:00
Ed Maste
bbecb73b0e apply some style(9) to kbd: make function name start in column 1
Sponsored by:	The FreeBSD Foundation
2016-07-26 13:36:28 +00:00
Sepherosa Ziehau
34c30e12e2 hyperv/vmbus: Nuke unnecessary accessor functions.
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7303
2016-07-26 05:06:00 +00:00
Bryan Drewery
e7f9419458 Add links for bit_ffc_at(3) and bit_ffs_at(3).
MFC after:	3 days
2016-07-26 03:47:16 +00:00
Sean Bruno
6a5bc1d1ee iwm(4) synchronize driver to DragonFlyBSD version and recent f/w update.
Submitted by:	Kevin Bowling (kevin.bowling@kev009.com)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D6967
2016-07-26 00:02:17 +00:00
Sean Bruno
33c7715f9b iwm(4): switch to ieee80211_runtask()
Submitted by:	Andiry Voskoboinyk (s3erios@gmail.com)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D5054
2016-07-25 23:44:44 +00:00
Sean Bruno
e4ff429714 Update iwmfw(4) to include support for 8260 series units and update
f/w for the other devices supported by this driver.

Patch linked in https://reviews.freebsd.org/D6967 but not actually
a part of the review.

Obtained from DragonflyBSD.

Submitted by:   Kevin Bowling <kev009@kev009.com>
MFC after:      2 weeks
Relnotes:       yes
2016-07-25 23:05:25 +00:00
Rene Ladan
d5887f37d3 miwi resigned from FreeBSD, update the graph 2016-07-25 20:49:16 +00:00
Warner Losh
964fee41a3 Remove some extraneous printfs. 2016-07-25 19:16:30 +00:00
Conrad Meyer
af326ace9d devfs: Move most ioctl logic down to vnode layer
Devfs' file layer ioctl is now just a thin shim around the vnode layer.

Reviewed by:	kib
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D7286
2016-07-25 16:28:02 +00:00
Andrew Turner
1af4207389 Remove an unused variable.
Obtained from:	ABT Systems Ltd
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-07-25 16:18:20 +00:00
Andrew Turner
0f0b7aa289 Fix a typo in a string in a KASSERT to sanity check the CPU IDs.
Obtained from:	ABT Systems Ltd
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-07-25 15:59:31 +00:00
Andrew Turner
8ec2b5df73 Rework how we number CPUs on arm64 to try and keep clusters together.
Obtained from:	ABT Systems Ltd
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-07-25 15:57:13 +00:00