Commit Graph

194829 Commits

Author SHA1 Message Date
Warner Losh
7bfa86f62a Modernize comments about BIOSes being lame since in this detail they
aren't lame, the rules changed along the way. Catch up to 1999 or so
with the new rules.
2014-11-18 01:39:21 +00:00
Luiz Otavio O Souza
138bf90953 Add basic interrupt management code to gpiobus and ofw_gpiobus.
This is the general support to allow the use of GPIO pins as interrupt
sources for direct gpiobus children.

The use of GPIO pins as generic interrupt sources (for an ethernet driver
for example) will only be possible when arm/intrng is complete.  Then, most
of this code will need to be rewritten, but it works for now, is better
than what we have and will allow further developments.

Tested on:	ar71xx (RSPRO), am335x (BBB), bcm2835 (Raspberry pi)
Differential Revision:	https://reviews.freebsd.org/D999
Reviewed by:	rpaulo
2014-11-18 01:38:39 +00:00
Mark Johnston
af62c4ddd0 DTrace imposes a 128-byte limit on the length of the function component of
a probe name. When dtrace -G builds up a DOF section for the specified
provider(s), the probe function names are truncated to fit in this limit.
The DOF is later used to build the symbol table for the generated object
file, so the table can end up with truncated references, causing link
errors.

Instead of potentially truncating symbol table entries, write the full
function name to the DOF string table and allow the kernel to enforce the
128-byte function name limit when a process attempts to load its DOF.

PR:		194757
Differential Revision:	https://reviews.freebsd.org/D1175
Reviewed by:	rpaulo
MFC after:	2 weeks
2014-11-17 22:22:16 +00:00
Xin LI
4facd36ca0 Sync with userland variant.
MFC after:	2 weeks
2014-11-17 21:01:35 +00:00
Dmitry Chagin
91bd62caf5 Use the correct device as the power_for_sleep() method
always pass request up to parent bridge.

Reviewed by:	jhb
MFC after:	1 week
xMFC:		r274386,r274397
2014-11-17 20:25:21 +00:00
Warner Losh
707767a88c Remove stray empty comment. The code is adequately explained in the
block comment above, so there's nothing to add here.
2014-11-17 16:30:51 +00:00
Brad Davis
f3bcbf2399 Clean up some language
Reviewed by:	will
2014-11-17 15:44:00 +00:00
Mark Felder
e2d52f146f Fix geom's "usage" generation to not fabricate usage/help output for any
imaginary class we give it.

Differential Revision:	https://reviews.freebsd.org/D1150
Submitted by:	homerj
Approved by:	pjd
2014-11-17 15:19:57 +00:00
Mark Felder
f88076f062 Add logic for detecting non-persistent filesystems being utilized by
workdir which would break the upgrade process upon reboot.

Currently we check for tmpfs and mdmfs.

PR:		195006
Differential Revision:	https://reviews.freebsd.org/D1163
Approved by:	cperciva
2014-11-17 15:12:46 +00:00
Julien Charbon
71da715374 Re-introduce padding fields removed with r264321 to keep
struct tcptw ABI unchanged.

Suggested by:	jhb
Approved by:	jhb (mentor)
MFC after:	1 day
X-MFC-With:	r264321
2014-11-17 14:56:02 +00:00
Andriy Gapon
2c51c83bc8 l2arc: restore correct rounding up of asize of compressed data
This rounding up was lost in a mismerge of illumos code.
See r268075 MFV r267565.
After that commit zio_compress_data() no longer performs any compressed
size adjustment, so it needs to be done externally.  On FreeBSD we round
up the size using vdev_ashift rather than SPA_MINBLOCKSIZE so that 4KB
devices are properly supported.

Additionally, zero out the buffer tail only if compression succeeds.
The compression is considered successful if the size of compressed
data after rounding up to account for the vdev ashift is less than the
original data size.  It does not make sense to have the data compressed
if all the savings are lost to rounding up.
With the new zio_compress_data() it could have been possible that the
rounded compressed size would be greater than the original size and thus
we could zero beyond the allocated buffer if the zeroing code was kept
at the original place.

Discussed with:	delphij, gibbs
MFC after:	2 weeks
X-MFC with:	r274627
2014-11-17 14:45:42 +00:00
Andriy Gapon
0908b20b7e Revert r269093 which introduced physical zio alignment transform
Size of physical ZIOs must never be implicitly adjusted, it's
a responsibility of a caller to make sure that such a ZIO has proper offset
and size.

Discussed with:	delphij, gibbs
MFC after:	2 weeks
2014-11-17 14:16:02 +00:00
Enji Cooper
ff0ba87247 Mechanically replace #if defined(__FreeBSD__) and #if defined(__NetBSD__) with
their #ifdef equivalents for everything changed in contrib/netbsd-tests. There
are some items from the vendor tree that use #if defined(__FreeBSD__) or
#if defined(__NetBSD__) which are being left alone

Requested by: bde, rpaulo
Sponsored by: EMC / Isilon Storage Division
2014-11-17 13:39:00 +00:00
Edward Tomasz Napierala
c26264ace9 The "intr" option is NFS-specific; fix examples in auto_master(5).
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-11-17 12:36:01 +00:00
Steven Hartland
7d0c9ddcc3 Revert r273630 as the panic was fixed by r274619
The panic was caused by TRIM requests run against file based vdevs as write
requests.

PR:		191573
Sponsored by:	Multiplay
2014-11-17 11:35:30 +00:00
Steven Hartland
a559adfbce Disable TRIM on file backed ZFS vdevs and fix TRIM on init
After r265152 TRIM requests are ZIO_TYPE_FREE instead of ZIO_TYPE_IOCTL
this meant file backed vdevs to attempted to process the ZIO as a write
causing a panic.

We now disable TRIM on file backed vdevs and ASSERT the ZIO types supported
by each vdev type to ensure we explicity support the ZIO type being
processed.

Also ensure that TRIM on init is not procesed for devices which declare they
didn't support TRIM via vdev_notrim.

PR:		195061, 194976, 191573
Sponsored by:	Multiplay
2014-11-17 11:32:10 +00:00
Enji Cooper
4cef7be5c3 Add reachover Makefiles for contrib/netbsd-tests/lib/librt
A variant of this code has been tested on amd64/i386 for some time by
EMC/Isilon on 10-STABLE/11-CURRENT. It builds on other architectures, but the
code will remain off until it's proven it works on virtual hardware or real
hardware on other architectures

Sponsored by: EMC / Isilon Storage Division
2014-11-17 09:19:09 +00:00
Alexander V. Chernikov
7f948f12f6 Finish r274175: do control plane MTU tracking.
Update route MTU in case of ifnet MTU change.
Add new RTF_FIXEDMTU to track explicitly specified MTU.

Old behavior:
ifconfig em0 mtu 1500->9000 -> all routes traversing em0 do not change MTU.
User has to manually update all routes.
ifconfig em0 mtu 9000->1500 -> all routes traversing em0 do not change MTU.
However, if ip[6]_output finds route with rt_mtu > interface mtu, rt_mtu
gets updated.

New behavior:
ifconfig em0 mtu 1500->9000 -> all interface routes in all fibs gets updated
with new MTU unless RTF_FIXEDMTU flag set on them.
ifconfig em0 mtu 9000->1500 -> all routes in all fibs gets updated with new
MTU unless RTF_FIXEDMTU flag set on them AND rt_mtu is less than ifp mtu.

route add ... -mtu XXX automatically sets RTF_FIXEDMTU flag.
route change .. -mtu 0 automatically removes RTF_FIXEDMTU flag.

PR:		194238
MFC after:	1 month
CR:		D1125
2014-11-17 01:05:29 +00:00
Sean Bruno
e93397e537 Add mv, echo and hostname to the native-xtools target. Missed these
when profiling.

MFC after:	2 weeks
2014-11-16 23:31:23 +00:00
Ian Lepore
a178f1f70a No functional changes. Remove a couple outdated or inane comments and
add new comment blocks describing why the cache maintenance sequences are
done in the order they are for each case.
2014-11-16 21:39:56 +00:00
Ian Lepore
0c4f0ef9ae Correct the sequence of busdma sync ops involved with PRE/POSTREAD syncs.
We used to invalidate the cache for PREREAD alone, or writeback+invalidate
for PREREAD with PREWRITE, then treat POSTREAD as a no-op.  Prefetching on
modern systems can lead to parts of a DMA buffer getting pulled into the
caches while DMA is in progress (due to access of "nearby" data), so it's
mandatory to invalidate during the POSTREAD sync even if a PREREAD
invalidate also happened.

In the PREREAD case the invalidate is done to ensure that there are no
dirty cache lines that might get automatically evicted during the DMA,
corrupting the buffer.  In a PREREAD+PREWRITE case the writeback which is
required for PREWRITE handling is suffficient to avoid corruption caused
by eviction and no invalidate need be done until POSTREAD time.

Submitted by:	Michal Meloun <meloun@miracle.cz>
2014-11-16 21:22:42 +00:00
Ian Lepore
1c716437d5 Do the cache invalidate sequence from the outermost to innermost, required
for correct operation.

Submitted by:	Michal Meloun <meloun@miracle.cz>
2014-11-16 20:59:27 +00:00
Ian Lepore
f5b11228ad Do not do a cache invalidate on a PREREAD sync that is also a PREWRITE sync.
The PREWRITE handling does a writeback of any dirty cachelines, so there's
no danger of an eviction during the DMA corrupting the buffer.  There will
be an invalidate done during POSTREAD, so doing it before the read too is
wasted time.
2014-11-16 20:55:51 +00:00
Enji Cooper
1268301a8d - Skip over the testcases that call cbrtl on platforms where LDBL_PREC == 53
(arm, mips, powerpc). This fixes the build on these platforms, based on some
ad hoc tinderbox runs I did a while ago
- Skip cast the arguments to powl as long double so powl properly interprets
those arugments at compile-time when picking the type

Sponsored by: EMC / Isilon Storage Division
2014-11-16 20:42:30 +00:00
Enji Cooper
84e369d8fc - Expect exp2_powers to fail on FreeBSD/i386
- Expect exp2_values to fail on FreeBSD due to the small epsilon

Sponsored by: EMC / Isilon Storage Division
2014-11-16 20:39:11 +00:00
Enji Cooper
12c91ea883 Alias isinff to isinf on FreeBSD
isinf on FreeBSD automatically picks the appropriate type per math.h

Sponsored by: EMC / Isilon Storage Division
2014-11-16 20:37:46 +00:00
Enji Cooper
790973021f Reset errno to 0 before running scalbn to be sure that the tested errno is
valid

Sponsored by: EMC / Isilon Storage Division
2014-11-16 20:35:32 +00:00
Enji Cooper
66152388f6 Skip the long-double epsilon checks on FreeBSD/i386
Sponsored by: EMC / Isilon Storage Division
2014-11-16 20:34:46 +00:00
Ian Lepore
a57275b601 Indent a couple lines properly and expand a comment. No functional changes. 2014-11-16 20:34:14 +00:00
Enji Cooper
53cecec82e Convert tools/regression/lib/libc/stdio/test-fpclassify into an ATF testcase and
Rename as lib/libc/stdio/fpclassify2_test

Sponsored by: EMC / Isilon Storage Division
2014-11-16 20:29:57 +00:00
Sean Bruno
e98c3c3f9d Flush out many more static binaries that can be used in a jail for building
pkgs via poudriere.  This removes a significant amount of emulation speeding
up run times.

Phabric:	D1172
Reviewed by:	imp
MFC after:	2 weeks
2014-11-16 20:10:37 +00:00
Enji Cooper
41a3b1244b Convert tools/regression/lib/libc/stdio/test-fmemopen into an ATF testcase and
rename as lib/libc/stdio/fmemopen2_test

Sponsored by: EMC / Isilon Storage Division
2014-11-16 19:57:47 +00:00
Enji Cooper
cf1f571271 Add freebsd-testing and myself to MAINTAINERS for contrib/netbsd-tests and
contrib/pjdfstest
2014-11-16 19:47:29 +00:00
Alexander V. Chernikov
ac2cf5d37e Revert r274585: rte lock is properly destroyed in uma dtor callback.
Pointed by:	glebius
2014-11-16 18:15:23 +00:00
Alexander V. Chernikov
86e10a0c6a Fix r273112: do not turn DROP_EN by default.
Due to adapter->hw.fc.requested_mode is filled with default value
after ixgbe_initialize_receive_units(), this leads to enabling
DROP_EN in most cases.

Tested by:	ae
MFC after:	1 week
2014-11-16 18:08:00 +00:00
Jean-Sébastien Pédron
d591845e63 drm/radeon: Lower priority of a message related to invalid EDID
Like in r259717, the prority goes from "error" to "debug" to avoid
spamming logs when the connectors are polled.

PR:		194770
Submitted by:	Larry Rosenman <ler@lerctr.org>
MFC after:	1 week
2014-11-16 17:53:48 +00:00
Alexander V. Chernikov
3cb04899de Make witness happy: destroy rte lock before free.
MFC after:	2 weeks
2014-11-16 14:56:31 +00:00
Xin LI
dad6df6124 Default to use 10 seconds as nap interval instead of 1.
Previously, we have a nap interval of 1 second while we have a timeout of
128 seconds by default, which could be an overkill, and for some hardware
the patting action may be expensive.

Note that the choice of nap interval is still arbitrary.  We preferred
a safe value where even when the system is very heavily loaded, the
watchdog should not shoot the system down if it's not really hung.
According to the manual page of Linux's watchdog daemon, the nap interval
time of theirs is 10 seconds, which seems to be a reasonable value --
according to Intel documentation AP-725 (Document Number: 292273-001),
ICH5's maximum timeout is about 37.5 seconds, which the ichwd(4) driver
would set when we requested 128 seconds (although it should probably
feed back this as an error and do not set the timeout).  Since that's
the shortest maximum value, 10 seconds seems to be a right choice for
us too.

Discussed with:	alfred
MFC after:	1 month
2014-11-16 09:44:30 +00:00
Enji Cooper
f1bcbd4aba Remove test-arc4random from this Makefile so others can continue to use
this as-is for the time being
2014-11-16 07:58:06 +00:00
Enji Cooper
37074d966d Convert tools/regression/lib/libc/gen/test-arc4random into an ATF testcase and
rename as lib/libc/gen/arc4random_test

Sponsored by: EMC / Isilon Storage Division
2014-11-16 07:55:28 +00:00
Enji Cooper
536b1b933e Add reachover Makefiles for contrib/netbsd-tests/lib/librt
A variant of this code has been tested on amd64/i386 for some time by
EMC/Isilon on 10-STABLE/11-CURRENT. It builds on other architectures, but the
code will remain off until it's proven it works on virtual hardware or real
hardware on other architectures

Sponsored by: EMC / Isilon Storage Division
2014-11-16 07:03:19 +00:00
Enji Cooper
e2b4fa14f9 Call sem_unlink on semaphores before attempting to create them
Due to the lack of uniqueness in the semaphore name, and the fact that the
tests don't have cleanup routines, an interrupted test can leave a semaphore
"laying around", causing all subsequent attempts to run the test to fail

I will file a NetBSD PR for this issue soon
2014-11-16 06:59:58 +00:00
Enji Cooper
3eee258dfb Add reachover Makefiles for contrib/netbsd-tests/lib/libpthread as
lib/libthr/tests

A variant of this code has been tested on amd64/i386 for some time by
EMC/Isilon on 10-STABLE/11-CURRENT. It builds on other architectures, but the
code will remain off until it's proven it works on virtual hardware or real
hardware on other architectures

Original work by: pho
Sponsored by: EMC / Isilon Storage Division
2014-11-16 06:35:20 +00:00
Enji Cooper
a20294deef Add missing sys/time.h #include for timespecsub macro in lib/libnetbsd/sys/time.h 2014-11-16 05:13:39 +00:00
Enji Cooper
f1c54c1af6 Port helper program to FreeBSD, similar to ../../lib/libc/stdlib/h_atexit.c
Submitted by: pho
In collaboration with: kib
2014-11-16 05:13:10 +00:00
Enji Cooper
1741e5991e #ifdef out a printf on !NetBSD that causes the testcase to fail when comparing
the output from the helper program

Submitted by: pho
2014-11-16 05:11:07 +00:00
Enji Cooper
ea74a0a240 Add pthread_np.h #include and initialize the pthread attribute on FreeBSD
Submitted by: pho
2014-11-16 05:09:23 +00:00
Enji Cooper
ff9d081d78 Expect :pthread_detach to fail with EINVAL instead of ESRCH on FreeBSD
PR: 191906
In collaboration with: pho
2014-11-16 05:08:19 +00:00
Enji Cooper
190e1b1c9b Only expect timeouts on powerpc with NetBSD
Submitted by: pho
2014-11-16 05:06:35 +00:00
Enji Cooper
a81c27fd8c Use _exit instead of exit so the file descriptors aren't flushed twice in the
child processes

Submitted by: pho
2014-11-16 05:05:18 +00:00