Commit Graph

230587 Commits

Author SHA1 Message Date
Alan Somers
7d3761dc72 Don't declare __assfail as static
It gets called by dmu_buf_init_user, which is inline but not static.  So it
needs global linkage itself.

Reported by:	GCC-6
MFC after:	17 days
X-MFC-With:	329722
2018-02-25 14:29:43 +00:00
Dimitry Andric
4f8786afe3 Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to
6.0.0 (branches/release_60 r325932).  This corresponds to 6.0.0 rc3.

MFC after:	3 months
X-MFC-With:	r327952
PR:		224669
2018-02-25 13:20:32 +00:00
Kristof Provost
bf56a3fe47 pf: Cope with overly large net.pf.states_hashsize
If the user configures a states_hashsize or source_nodes_hashsize value we may
not have enough memory to allocate this. This used to lock up pf, because these
allocations used M_WAITOK.

Cope with this by attempting the allocation with M_NOWAIT and falling back to
the default sizes (with M_WAITOK) if these fail.

PR:		209475
Submitted by:	Fehmi Noyan Isi <fnoyanisi AT yahoo.com>
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D14367
2018-02-25 08:56:44 +00:00
Kyle Evans
22ae8ae1f4 lualoader: Explain deviation from naming guidelines
cli_execute is likely the only exception that we should make, due to it
being a global. We don't really need other globals, so this won't really end
up an epidemic.
2018-02-25 05:14:06 +00:00
Kyle Evans
ca16d83fd4 lualoader: Pull autoboot handling out into menu.run()
There's no reason for autoboot handling to be mixed in with menu processing.
It is a distinct process that should only be done once when entering the
menu system.

menu.process has been modified to take an initial keypress to process and to
only draw the screen initially if it's been invalidated. The keypress is
kind of a kludge, although it could be argued to be a potentially useful
kludge if there are other processes that may need to feed a keypress into
the menu system.
2018-02-25 05:00:54 +00:00
Kyle Evans
28384160a7 lualoader: Pull menu redrawing specifics out of menu.process
In general, every menu redraw is going to require a screen clear and cursor
reset. Each redraw also has the potential to invalidate the alias table, so
we move the alias table being used out into a module variable. This allows
third party consumers to also inspect or update the alias table if they need
to.

While here, stop searching the alias table once we've found a match.
2018-02-25 04:44:45 +00:00
Kyle Evans
da9ab82706 lualoader: Clean up menu handling a little bit
This is driven by an urge to separate out the bits that really only need to
happen when the menu system starts up. Key points:

- menu.process now does the bulk of menu handling. It retains autoboot
  handling for dubious reasons, and it no longer accepts a 'nil' menu to
  process as 'the default'. Its return value is insignificant.
- The MENU_SUBMENU handler now returns nothing. If menu.process has exited,
  then we continue processing menu items on the parent menu as expected.
- menu.run is now the entry point of the menu system. It checks whether the
  menu should be skipped, processes the default menu, then returns.
2018-02-25 04:11:08 +00:00
Kyle Evans
3cd5547b1b lualoader: menu: Terminate final values in tables with a comma 2018-02-25 03:33:25 +00:00
Kyle Evans
e1a8835aa8 lualoader: Don't explicitly index tables without reason
These indices were assigned the same values as they would've been implicitly
assigned anyways.

While here, throw terminating commas after the last value of tables.
2018-02-25 03:30:24 +00:00
Jeff Roberson
1c2529ab32 Fix issues with sparse cpu allocation. Consistently use mp_maxid + 1.
Reported by:	pho
Reviewed by:	markj
Sponsored by:	Netflix, Dell/EMC Isilon
2018-02-25 00:35:21 +00:00
Nathan Whitehorn
f638d50513 Avoid dereferencing random memory when kickstarting DMA.
MFC after: 1 week
2018-02-24 22:34:56 +00:00
Dimitry Andric
adc606d1b7 Vendor import of lldb release_60 branch r325932:
https://llvm.org/svn/llvm-project/lldb/branches/release_60@325932
2018-02-24 21:28:02 +00:00
Dimitry Andric
59909f3a4e Vendor import of lld release_60 branch r325932:
https://llvm.org/svn/llvm-project/lld/branches/release_60@325932
2018-02-24 21:27:54 +00:00
Dimitry Andric
93179bb90b Vendor import of clang release_60 branch r325932:
https://llvm.org/svn/llvm-project/cfe/branches/release_60@325932
2018-02-24 21:27:39 +00:00
Dimitry Andric
0f8e52dfc6 Vendor import of llvm release_60 branch r325932:
https://llvm.org/svn/llvm-project/llvm/branches/release_60@325932
2018-02-24 21:27:30 +00:00
Eugene Grosbein
0d41f9c9f0 route(8): make it possible to manually delete pinned route
Reported by:	Andreas Longwitz <longwitz@incore.de>
Approved by:	avg (mentor)
MFC after:	1 week
2018-02-24 21:25:56 +00:00
Mark Johnston
59d3150b58 Restore the pre-r329882 inactive page shortage computation.
With r329882, in the absence of a free page shortage we would only take
len(PQ_INACTIVE)+len(PQ_LAUNDRY) into account when deciding whether to
aggressively scan PQ_ACTIVE. Previously we would also include the
number of free pages in this computation, ensuring that we wouldn't scan
PQ_ACTIVE with plenty of free memory available. The change in behaviour
was most noticeable immediately after booting, when PQ_INACTIVE and
PQ_LAUNDRY are nearly empty.

Reviewed by:	jeff
2018-02-24 20:47:22 +00:00
Kyle Evans
67eae5035b lualoader: Remove inaccurate part of comment 2018-02-24 20:24:57 +00:00
Kyle Evans
322a2dddba lualoader: Clean up naming conventions a little bit
We mostly use camel case for function names, but some local functions got
mixed in using internal underscores. Doubles down on camel case.
2018-02-24 20:21:21 +00:00
Oleksandr Tymoshenko
9b7ae69179 Add SPDX tags for chvgpio driver sources
Also move $FreeBSD$ keyword in header to BSD license

MFC after:	2 weeks
2018-02-24 20:19:31 +00:00
Kyle Evans
ddfae7e314 lualoader: throw out nextboot's usage of standard config processing
It should use the common parser, but it should not be processed like a
standard file. Rewite check_nextboot to read the file in, check whether it
should continue, then parse as needed.

This allows us to throw the recently introduced check_and_halt callback
swiftly out the window.
2018-02-24 20:07:39 +00:00
Kyle Evans
4adde50db2 lualoader: Strip config.parse of its I/O privileges
config.parse is now purely a parser, rather than a whole proccessor. The
standard process for loading a config file has been split out into
config.processFile.

This clears the way for having nextboot read its own config file and decide
there whether it should parse the rest of the file.
2018-02-24 20:00:31 +00:00
Kyle Evans
164b58fdd3 lualoader: Split config file I/O out into a separate function
This is step 1 towards revoking config.parse of it I/O privileges. Ideally,
all reading would be done before config.parse and config.parse would just
take text and parse it rather than being charged with the entire process.
2018-02-24 19:51:18 +00:00
Conrad Meyer
aab3e059e4 libc: Remove unused definition
RANDOMDEV isn't used after r306636.  Remove the unneeded definition.

No functional change.

Sponsored by:	Dell EMC Isilon
2018-02-24 19:40:23 +00:00
Justin Hibbits
7eb6081727 Unbreak 64-bit Book-E builds post r329712
can_wakeup is defined only in AIM's locore64.S, so conditionalize use of it
on AIM in addition to powerpc64.
2018-02-24 18:12:38 +00:00
Justin Hibbits
635d2bed1d Make MPC85XXSPE kernel conf ident match the file name 2018-02-24 17:54:12 +00:00
Justin Hibbits
675147dd7b Change ident for QORIQ64 kernel conf
Make it match the conf file name.
2018-02-24 17:53:22 +00:00
Justin Hibbits
571892ff4d Unbreak the build after r329891
I was apparently a little too excited with deleting code, and apparently
didn't do a final test build before commit.  Restore cpu_idle_wakeup().
2018-02-24 17:29:29 +00:00
Devin Teske
03a3981b89 Updates and enhancements to io.d to aid DTrace scripting
+ Add dev_type do devinfo_t
+ Add b_cmd to bufinfo_t
+ Add constants for BIO_* and DEVSTAT_TYPE_*
+ Add inline for converting BIO_* int to string
+ Add inline for converting DEVSTAT_TYPE_* int to string
+ Add mask for dev_type & DEVSTAT_TYPE_MASK to string
+ Add mask for dev_type & DEVSTAT_TYPE_IF_MASK to string

Reviewed by:	markj
Sponsored by:	Smule, Inc.
Differential Revision:	https://reviews.freebsd.org/D14396
2018-02-24 17:13:15 +00:00
Mariusz Zaborski
a241c14f9a Fix reference to nvlist in man pages.
Reviewed by:	@bcr @brueffer
Pointed out by:	@brueffer
Differential Revision:	https://reviews.freebsd.org/D14410
2018-02-24 16:31:26 +00:00
Ian Lepore
aae18dcc87 Add a functional detach() routine, to make things kldunload-friendly. 2018-02-24 16:28:45 +00:00
Alan Somers
92bd443160 Implement CTASSERT using _Static_assert
Prevents warnings about "unused typedef" with GCC-6

Reported by:	GCC-6
MFC after:	18 days
X-MFC-With:	329722
2018-02-24 16:01:21 +00:00
Alan Somers
b8f7774edf tests: require ksh93 in the Kyuafiles for all atf-ksh93 test programs 2018-02-24 15:13:20 +00:00
Olivier Houchard
6cd04bcd8e Use NULL as a mtx type instead of "", as it otherwise confuses WITNESS. 2018-02-24 14:34:23 +00:00
Andrew Turner
4f3cad09fe Correctly set the 16kB page size field in the ITS BASER register. Some
new arm64 hardware, e.g. ThunderX2, seems to use this page size so was
failing to attach as the register value read back was incorrect.

While here fix the spelling on shareability.

Sponsored by:	DARPA, AFRL
2018-02-24 10:33:31 +00:00
Konstantin Belousov
cd84455f91 Hide all vm/vm_pageout.h content under #ifdef _KERNEL.
There are no parts useful for usermode applications in
vm/vm_pageout.h.  Even for the specific applications like fstat and
lsof.

In my opinion, this protection is redundant and instead userspace
should not include the header at all.  Since there are apparently
broken third party codebases, give them a bit of slack by providing
transitional period.

Reported by:	julian
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2018-02-24 10:26:26 +00:00
Hans Petter Selasky
7ef4e76f74 Fix race when detach is called right after attach in if_axge, that the
network device pointer might be NULL. Wait for any pending tasks to
complete before calling axge_stop().

MFC after:	1 week
Sponsored by:	Mellanox Technologies
2018-02-24 08:44:51 +00:00
Kyle Evans
eed91cae68 lualoader: Explain nextboot stuff a little bit more 2018-02-24 04:02:06 +00:00
Kyle Evans
d709f254c2 lualoader: Remove unused variable; we now use the effective line number 2018-02-24 03:48:52 +00:00
Kyle Evans
d930cdc295 lualoader: Add comment on trailing space, don't operate on nil
Functionally, the latter error wouldn't necessarily hurt anything. io.write
will just error out as it's not passed a valid file handle. Still, we can do
better than that.
2018-02-24 03:47:04 +00:00
Kyle Evans
483f0a33f3 lualoader: Correct test and name
The functionality was correct, but our style guidelines tend to request that
we shy away from using boolean operations in place of explicit comparisons
to nil.
2018-02-24 03:43:10 +00:00
Kyle Evans
e83d7bf208 lualoader: Plug file handle not properly closed 2018-02-24 03:38:51 +00:00
Kyle Evans
3dcb764877 lualoader: Add nextboot support
config.parse now takes an extra callback that is invoked on the full text of
the config file. This callback dictates where we should actually try to
parse this file or not.

For nextboot, we use this to halt parsing if we see 'nextboot_enable="NO"'.
If we don't, parse it and write 'nextboot_enable="NO" ' to it. The same
caveat as with forth still applies- writing is only supported by UFS.
2018-02-24 03:35:35 +00:00
Kirk McKusick
4cbd996a84 Relax the location restraints when validating one of the
backup superblocks.
2018-02-24 03:33:46 +00:00
Kyle Evans
82c85a42b4 liblua: Implement write support
Write support (even if it only works on UFS) will be needed for nextboot
functionality.

Reviewed by:	cem, imp
Differential Revision:	https://reviews.freebsd.org/D14478
2018-02-24 02:57:24 +00:00
Conrad Meyer
061577c5fe libsa: Change write(2)-alike prototype to match definition
Broken in r329879.

Apparently old GCC detects this, but modern GCC didn't.  Mea culpa.

Reported by:	np
Sponsored by:	Dell EMC Isilon
2018-02-24 01:58:53 +00:00
Justin Hibbits
6708989b60 Remove platform_cpu_idle() and platform_cpu_idle_wakeup() interfaces
These interfaces were put in place to let QorIQ SoCs dictate CPU idling
semantics, in order to support capabilities such as NAP mode and deep sleep.
However, this never stabilized, and the idling support reverted back to
CPU-level rather than SoC level.  Move this code back to cpu.c instead.  If
at a later date the lower power modes do come to fruition, it should be done
by overriding the cpu_idle_hook instead of this platform hook.
2018-02-24 01:46:56 +00:00
Bryan Drewery
fc287c10fb Fix installation with read-only OBJDIR.
Reported by:	npn
Sponsored by:	Dell EMC
2018-02-24 01:33:17 +00:00
Jung-uk Kim
0ef8c0cb57 Partially revert r197863 to reduce diff against i386.
When I wrote the patch, I wanted to remove SYSINIT() usage from amd64 code.
There is no reason to keep the divergence any more because iwasaki merged
most amd64 suspend/resume code to i386 with r235622.  Note this also fixed
an enge case reported by royger. [1]

Suggested by:		jhb
Reviewed by:		royger
Tested by:		royger [1]
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D14400 [1]
2018-02-24 01:24:57 +00:00
Conrad Meyer
63901c0171 kern/sys_generic.c: style(9) return(foo) -> return (foo)
No functional change.

Sponsored by:	Dell EMC Isilon
2018-02-24 01:15:33 +00:00