Commit Graph

207223 Commits

Author SHA1 Message Date
Enji Cooper
3baa096447 Add "options ZFS" to NOTES so this will be tested with the LINT
KERNCONF when "make tinderbox" is run

This will help ensure that "options ZFS" will not be accidentally
regressed, as the current LINT configuration tests the zfs module

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-03 04:38:17 +00:00
Warner Losh
c333c74aef If md_exec_hook is defined, provide a way to create the strings
for the environment variables we look up at runtime. Otherwise,
there's no way they will change, optimize it at compile time.

Differential Review: https://reviews.freebsd.org/D2718
2016-01-03 04:32:13 +00:00
Warner Losh
2db56e791f Add libsoft to the tree, just like lib32. 2016-01-03 04:32:05 +00:00
Warner Losh
c42ade6081 Add new LIBSOFT option. This is similar to the LIB32 option, except
for libraries that follow the soft float ABI. It's only supported on
armv6 as a transition to the new hard float ABI, so mark as broken
everywhere else.
2016-01-03 04:32:04 +00:00
Warner Losh
8fd53f4577 Create a generalized exec hook that different architectures can hook
into if they need to, but default to no action.

Differential Review: https://reviews.freebsd.org/D2718
2016-01-03 04:32:02 +00:00
Ian Lepore
9df1d85ebb Reword the comment to better describe what I found while researching the
problem that led to this temporary workaround (and also so I can properly
cite the PR in the commit this time).

In general this is intended to be a temporary workaround until we can figure
out why including any ram from the last megabyte of the physical address
space leads to a NULL pointer deref.  Debugging that is made trickier by the
fact that I couldn't even get a backtrace in ddb.

PR:		201614
2016-01-02 23:14:52 +00:00
Ian Lepore
24bbe7a40c Cast pointer through uintptr_t on the way to uint64_t to squelch a warning. 2016-01-02 22:55:59 +00:00
Ian Lepore
95181ed7ff Work around problems that happen when there is ram at the end of the
physical address space.
2016-01-02 22:31:14 +00:00
Andreas Tobler
76cbcfdcfc Fix booting of 32-bit kernels on 64-bit G5 hardware.
For rs6000, most memory insns and addi/addis do not allow GPR0 for RA
(they use literal zero there instead). So use a 'b' constraint to make
sure to have a base register other than GPR0.
GCC-4.7 and up handles this with allocating r9 instead of r0.
2016-01-02 22:04:37 +00:00
Ian Lepore
e376ad23c2 Use 64-bit math when processing the lists of physical and excluded memory
to generate the phys_avail and dump_avail arrays.

This is a partial fix for the kernel side of the problem mentioned in the
PR.  This part handles the cases where comparing start and end addresses of
a block would fail because 32-bit wrap caused the end address to come out
zero if the end of the region is the end of the address space (0xffffffff
with 32-bit vm_paddr_t, but now the code should also work right if we ever
support LPAE with 36-bit addresses).

More work is necessary to make systems with ram at the end of the physical
address space usable, but at least initially it's going to be more like a
workaround than a fix, so this non-hacky part is being committed first.

PR:		201614
2016-01-02 22:00:52 +00:00
Ian Lepore
a195a8e177 Fix the arm64 build by adding an all-important '&' to get a pointer.
I'm not sure how I missed the error when I test-built here, I guess the
pointy hat must have slipped down over my eyes.
2016-01-02 21:13:14 +00:00
Konstantin Belousov
fb57d63e47 Hide transient EBADF errors caused by the parallel revoke(2) or forced
unmount of devfs mounts, by restarting the failed syscall.

When restarted, failing syscalls eventually either stop finding the
node and returning ENOENT, or the vnode op vectors finally transition
to the deadfs vop.  The later return EIO or other error, more
appropriate for the operation.

Submitted by:	bde
Tested by:	pho
MFC after:	3 weeks
2016-01-02 20:29:28 +00:00
Nathan Whitehorn
2f204e1fe4 Bump the maximum number of interrupt controllers to allow for the
proliferation of them on large IBM systems and add some error checking if
we exceed that number.

MFC after:	1 week
2016-01-02 19:34:37 +00:00
Nathan Whitehorn
9f4a7eae43 Make using the #address-cells property on the interrupt parent in device
tree parsing opt-out rather than opt-in. All FDT-based systems as well as
PowerPC systems with real Open Firmware use the CHRP-derived binding that
includes it, which makes SPARC the odd man out here. Making it opt-out
avoids astonishment on new platform bring up.
2016-01-02 19:28:35 +00:00
Ian Lepore
002ef20ca8 Add an OF_decode_addr() implementation for arm64.
Discussed with:		andrew
2016-01-02 19:14:19 +00:00
Ed Maste
647129e382 kbdmap.5: Use current names for ASCII control codes lf, ff, us
Refer to the old names nl, np, ns as historical aliases.

PR:		205776, 205778
MFC After:	1 week
Sponsored by:	The FreeBSD Foundation
2016-01-02 18:35:11 +00:00
Adrian Chadd
fdee6e3bba ... and that would've never worked. Sorry!
(Note: everything I tested on locally has ATH_DEBUG / AH_DEBUG set.)
2016-01-02 18:32:20 +00:00
Ian Lepore
577353fcbf Use 64-bit math when finding a block of ram to hold the kernel. This fixes
a problem on 32-bit systems which have ram occupying the end of the physical
address space -- for example, a block of ram at 0x80000000 with a size of
0x80000000 was overflowing 32 bit math and ending up with a calculated size
of zero.

This is a fix for one of the two problems mentioned in the PR.  Something
similar will need to be done on the kernel side before the PR is closed.

PR:		201614
2016-01-02 18:16:24 +00:00
Nathan Whitehorn
b0bf7fcd29 Bring CPU features list in line with the ABI requirements.
MFC after:	1 week
2016-01-02 18:15:10 +00:00
Nathan Whitehorn
86c94d24fa Switch setting MSR[SF] to C code. This removes any CPU-specific code
(MSF[SF] is a Book 3-S thing) in the 64-bit locore64.S.
2016-01-02 18:10:53 +00:00
Adrian Chadd
ef91dbcec6 [ath] add explicit bus barriers.
The ath hal and driver code all assume the world is an x86 or the
bus layer does an explicit bus flush after each operation (eg netbsd.)

However, we don't do that.

So, to be "correct" on platforms like sparc64, mips and ppc (and maybe
ARM, I am not sure), just do explicit barriers after each operation.

Now, this does slow things down a tad on embedded platforms but I'd
rather things be "correct" versus "fast."  At some later point if someone
wishes it to be fast then we should add the barrier calls to the HAL and
driver.

Tested:

* carambola 2 (AR9331.)
2016-01-02 17:14:22 +00:00
Dag-Erling Smørgrav
23e6278ed9 Replace the cosine table with a sine table, which (due to the vagaries of
rounding) has better spread.  Implement fp16_sin() to go along with
fp16_cos().  In the rendering loop, switch from addition to subtraction
so the center of the pattern will be a trough rather than a peak.  This
is completely arbitrary, of course, but looks better to me.
2016-01-02 16:40:37 +00:00
Enji Cooper
e50b18a333 - Use a temporary file for the temporary md(4) devices instead of
hardcoding it
- Remove the temporary file in the cleanup routine

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-02 10:07:31 +00:00
Ed Maste
80cc8ef4d7 Use correct name 'us' for character 31 in keymaps
'ns' was a historical accident, and kbdcontrol(1) has accepted the
correct 'us' as well as 'ns' since r38139.

PR:		205776
MFC after:	1 week
2016-01-02 04:42:53 +00:00
Ian Lepore
3110868268 Revert accidental change that snuck into r293045. 2016-01-02 03:00:31 +00:00
Ian Lepore
69dcb7e771 Make the 'env' directive described in config(5) work on all architectures,
providing compiled-in static environment data that is used instead of any
data passed in from a boot loader.

Previously 'env' worked only on i386 and arm xscale systems, because it
required the MD startup code to examine the global envmode variable and
decide whether to use static_env or an environment obtained from the boot
loader, and set the global kern_envp accordingly.  Most startup code wasn't
doing so.  Making things even more complex, some mips startup code uses an
alternate scheme that involves calling init_static_kenv() to pass an empty
buffer and its size, then uses a series of kern_setenv() calls to populate
that buffer.

Now all MD startup code calls init_static_kenv(), and that routine provides
a single point where envmode is checked and the decision is made whether to
use the compiled-in static_kenv or the values provided by the MD code.

The routine also continues to serve its original purpose for mips; if a
non-zero buffer size is passed the routine installs the empty buffer ready
to accept kern_setenv() values.  Now if the size is zero, the provided buffer
full of existing env data is installed.  A NULL pointer can be passed if the
boot loader provides no env data; this allows the static env to be installed
if envmode is set to do so.

Most of the work here is a near-mechanical change to call the init function
instead of directly setting kern_envp.  A notable exception is in xen/pv.c;
that code was originally installing a buffer full of preformatted env data
along with its non-zero size (like mips code does), which would have allowed
kern_setenv() calls to wipe out the preformatted data.  Now it passes a zero
for the size so that the buffer of data it installs is treated as
non-writeable.
2016-01-02 02:53:48 +00:00
Justin Hibbits
2afca09419 Accidentally dropped the 0 padding.
Pointed out by:	cmeyer
2016-01-01 17:56:52 +00:00
Josh Paetzel
21d7e927b5 Unset the gss kernel state when gssd exits
When gssd exits it leaves the kernel state set by
gssd_syscall().  nfsd sees this and waits endlessly
in an unkillable state for gssd to come back.  If you
had acidentally started gssd then stopped it, then
started nfsd you'd be in a bad way until you either
restarted gssd or rebooted the system.  This change
fixes that by setting the kernel state to "" when
gssd exits.
Reviewed by:	rmacklem
MFC after:	1 week
Sponsored by:	iXsystems
2016-01-01 17:06:16 +00:00
Konstantin Belousov
d52aff3c7a Minor style cleanup.
Submitted by:	bde
MFC after:	1 week
2016-01-01 15:48:48 +00:00
Justin Hibbits
295be3307c Use uint32_t for LBC block size.
LBC block size can only be up to 4GB.  The existing code already clamps it, but
mixes unsigned long and uint32_t.  This works on 32-bit targets, but not 64-bit,
so isn't completely correct.  This fixes the type confusion.
2016-01-01 15:36:56 +00:00
Ed Maste
9ed9d9bc3c Reduce libstand Makefile duplication
libstand is built in three places (lib/libstand, sys/boot/libstand32,
and sys/boot/userboot/libstand). Reduce Makefile duplication by
.including libstand/Makefile from sys/boot/libstand32/Makefile.

sys/boot/userboot/libstand/Makefile will be addressed later, as it
contains additional differences yet to be handled.

This change also switches libstand32 to use the new uuid_from_string
and uuid_to_string, which was not included in r292473.

Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D4747
2016-01-01 15:30:11 +00:00
Justin Hibbits
38f004fbb0 Fix a couple printf formats.
This was found when working on 64-bit PowerPC book-e support.
2016-01-01 15:17:24 +00:00
Alexander V. Chernikov
9a7ee988b5 Use lltable_get_ifp() instead of direct access to lltable fields. 2016-01-01 12:35:33 +00:00
Cy Schubert
72b4a35f34 Update leap-seconds to latest. This will satisfy the ntpd leap-second
version check.

Obtained from:	ftp://tycho.usno.navy.mil/pub/ntp/.
See also:	http://www.iers.org/SharedDocs/News/EN/BulletinC.html
2016-01-01 11:57:32 +00:00
Alexander V. Chernikov
6cdb18544d Remove second EVENTHANDLER_REGISTER slipped in r292978.
Describe the reason of doing unconditional M_PREPEND in ether_output().
2016-01-01 10:15:06 +00:00
Dag-Erling Smørgrav
a50b01d224 17 years and change after I wrote warp_saver, here's a simple plasma effect
(currently only three circular patterns) which requires quite a bit of
fixed-point arithmetic, including sqrt() and cos().  Happy New Year!
2016-01-01 04:04:40 +00:00
Dag-Erling Smørgrav
93bffaf2cd In the unload target, check that the module is loaded first.
Add a reload target which unloads and then loads the module.
2016-01-01 03:59:09 +00:00
Enji Cooper
92a889c673 Use randomly generated device names in testcases via mktemp -u instead of using
the hardcoded device name, "test"

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-01 03:12:51 +00:00
Justin Hibbits
637f34cb64 Extend idle support for newer Book-E cores.
Newer Book-E cores (e500mc, e5500, e6500) do not support the WE bit in the MSR,
and instead delegate CPU idling to the SoC.

Perhaps in the future the QORIQ_DPAA option for the mpc85xx platform will become
a subclass, which will eliminate most of the #ifdef's.
2016-01-01 02:47:40 +00:00
Enji Cooper
18e6b1b067 Add functions for managing md(4) devices and cleaning up said md(4) devices
These will be used soon in the various test scripts that source geom_subr.sh

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-01 02:25:10 +00:00
Enji Cooper
cad12e04c6 - Use geom <class> load instead of g<class> load; g<class> doesn't exist
for all geom classes, e.g. geom_uzip(4)
- These tests require root. Skip all of the tests if they're run as non-root

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-01 02:22:45 +00:00
Adrian Chadd
80d653987b [net80211] document the (not completely complete) set of places where
we're assuming hz=1000 and not gracefully handling when it isn't.

The math involved will return 0 for hz < 1000, which it is on some
platforms and on DragonflyBSD.

This doesn't fix it, it:

* converts one manual use over to use the macro, and
* comments where it needs some thought/fixing.

I'll think about this a bit more before fixing it.

Submitted by:	imre@vdsz.com
2016-01-01 00:21:07 +00:00
Nathan Whitehorn
a4c5dfc0fa Unify the ELFv1 and ELFv2 code paths and make ELFv1 (the normal ABI) more
correct in the process.

MFC after:	2 weeks
2016-01-01 00:11:29 +00:00
Adrian Chadd
43a57fd160 [rtwn] add rtwn module directory.
Pointed out by: dim
2015-12-31 23:48:07 +00:00
Dimitry Andric
89d224ab48 Merge r293013 from clang380-import branch:
Fix a clang 3.8.0 warning in pflogd.c:

contrib/pf/pflogd/pflogd.c:769:8: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
			if (!if_exists(interface) == -1) {
			    ^                     ~~

The if_exists() function does not return -1, and even if it did, it
would not be the correct way to check.  Just ditch the == -1 instead.

Obtained from:	OpenBSD's pflogd.c 1.49
MFC after:	3 days
2015-12-31 22:52:11 +00:00
Dimitry Andric
381fba8537 Merge r293006 from clang380-import branch:
For determining the compiler version, quote the string to be echo'd,
otherwise the command might fail.  This is because clang -v now results
in the following:

FreeBSD clang version 3.8.0 (trunk 256633) (based on LLVM 3.8.0svn)

The second "3.8.8svn)" string tripped up the shell command.

MFC after:	3 days
2015-12-31 22:48:46 +00:00
Dimitry Andric
f7862a87d0 Fix a clang 3.8.0 warning in pflogd.c:
contrib/pf/pflogd/pflogd.c:769:8: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
                        if (!if_exists(interface) == -1) {
                            ^                     ~~

The if_exists() function does not return -1, and even if it did, it
would not be the correct way to check.  Just ditch the == -1 instead.

Obtained from:	OpenBSD's pflogd.c 1.49
MFC after:	3 days
2015-12-31 22:45:00 +00:00
Adrian Chadd
2600131bd6 [rtwn] Add initial manpages for the rtwn driver. 2015-12-31 22:34:16 +00:00
Adrian Chadd
b6ac0e6565 [rtwn] Add rtwn firmware and driver module.
Submitted by:	kevlo
2015-12-31 22:33:32 +00:00
Adrian Chadd
bcaed14bd9 [rtwn] bring over initial rtwn driver.
This is a port from openbsd.  It's incomplete and unstable, but it's better
than nothing.  I have no plans to MFC this until it's complete and stable.

Submitted by:	kevlo
2015-12-31 22:32:36 +00:00