]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoFix the i2c bus speed divisors for TI OMAP4 and AM335x.
ian [Tue, 18 Nov 2014 03:26:52 +0000 (03:26 +0000)]
Fix the i2c bus speed divisors for TI OMAP4 and AM335x.

For OMAP4, the old values for 1MHz gave a bus frequency of about 890KHz.
The new numbers hit 1MHz exactly.

For AM335x the prescaler values are adjusted to give a 24MHz clock for
all 3 standard speeds, as the manual recommends (as near as we can tell,
there are errors and typos apparent in the document).  Also, 1MHz speed
is added, and has been tested successfully on a BeagleboneWhite board.

PR: 195009

9 years agoFix gpiobus_child_location_str() to return a real string with the mapped
loos [Tue, 18 Nov 2014 02:41:35 +0000 (02:41 +0000)]
Fix gpiobus_child_location_str() to return a real string with the mapped
pins.

Make gpiobus_print_pins() static again.

9 years agoRemove unnecessary code.
loos [Tue, 18 Nov 2014 02:11:07 +0000 (02:11 +0000)]
Remove unnecessary code.

After r273566, the gpiobus version of bus_print_child() also works on FDT
systems.

9 years agoAllow i2c bus speed to be configured via hints, FDT data, and sysctl.
ian [Tue, 18 Nov 2014 01:54:31 +0000 (01:54 +0000)]
Allow i2c bus speed to be configured via hints, FDT data, and sysctl.

The current support for controlling i2c bus speed is an inconsistant mess.
There are 4 symbolic speed values defined, UNKNOWN, SLOW, FAST, FASTEST.
It seems to be universally assumed that SLOW means the standard 100KHz
rate from the original spec.  Nothing ever calls iicbus_reset() with a
speed of FAST, although some drivers would treat it as the 400KHz standard
speed.  Mostly iicbus_reset() is called with the speed set to UNKNOWN or
FASTEST, and there's really no telling what any individual driver will do
with those.

The speed of an i2c bus is limited by the speed of the slowest device on
the bus.  This means that generally the bus speed needs to be configured
based on the board/system and the components within it.  Historically for
i2c we've configured with device hints.  Newer systems use FDT data and it
documents a clock-frequency property for i2c busses.  Hobbyists and
developers are likely to want on the fly changes.  These changes provide
all 3 methods, but do not require any existing drivers to change to use
the new facilities.

This adds an iicbus method, iicbus_get_frequency(dev, speed) that gets the
frequency for the requested symbolic speed.  If the symbolic speed is SLOW
or if there is no speed configured for the bus, the returned value is
100KHz, always.  Otherwise, if bus speed is configured by hints, fdt,
tunable, or sysctl, that speed is returned.  It also adds a helper
function, iicbus_init_frequency() that any bus driver subclassed from
iicbus can initialize the frequency from some other source of info.

Initial driver implementations are provided for Freescale and TI.

Differential Revision:        https://reviews.freebsd.org/D1174
PR: 195009

9 years agoUse automated MK_INET*_SUPPORT code here as well.
imp [Tue, 18 Nov 2014 01:39:23 +0000 (01:39 +0000)]
Use automated MK_INET*_SUPPORT code here as well.

9 years agoModernize comments about BIOSes being lame since in this detail they
imp [Tue, 18 Nov 2014 01:39:21 +0000 (01:39 +0000)]
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.

9 years agoAdd basic interrupt management code to gpiobus and ofw_gpiobus.
loos [Tue, 18 Nov 2014 01:38:39 +0000 (01:38 +0000)]
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

9 years agoDTrace imposes a 128-byte limit on the length of the function component of
markj [Mon, 17 Nov 2014 22:22:16 +0000 (22:22 +0000)]
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

9 years agoSync with userland variant.
delphij [Mon, 17 Nov 2014 21:01:35 +0000 (21:01 +0000)]
Sync with userland variant.

MFC after: 2 weeks

9 years agoUse the correct device as the power_for_sleep() method
dchagin [Mon, 17 Nov 2014 20:25:21 +0000 (20:25 +0000)]
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

9 years agoRemove stray empty comment. The code is adequately explained in the
imp [Mon, 17 Nov 2014 16:30:51 +0000 (16:30 +0000)]
Remove stray empty comment. The code is adequately explained in the
block comment above, so there's nothing to add here.

9 years agoClean up some language
brd [Mon, 17 Nov 2014 15:44:00 +0000 (15:44 +0000)]
Clean up some language

Reviewed by: will

9 years agoFix geom's "usage" generation to not fabricate usage/help output for any
feld [Mon, 17 Nov 2014 15:19:57 +0000 (15:19 +0000)]
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

9 years agoAdd logic for detecting non-persistent filesystems being utilized by
feld [Mon, 17 Nov 2014 15:12:46 +0000 (15:12 +0000)]
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

9 years agoRe-introduce padding fields removed with r264321 to keep
jch [Mon, 17 Nov 2014 14:56:02 +0000 (14:56 +0000)]
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

9 years agol2arc: restore correct rounding up of asize of compressed data
avg [Mon, 17 Nov 2014 14:45:42 +0000 (14:45 +0000)]
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

9 years agoRevert r269093 which introduced physical zio alignment transform
avg [Mon, 17 Nov 2014 14:16:02 +0000 (14:16 +0000)]
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

9 years agoMechanically replace #if defined(__FreeBSD__) and #if defined(__NetBSD__) with
ngie [Mon, 17 Nov 2014 13:39:00 +0000 (13:39 +0000)]
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

9 years agoThe "intr" option is NFS-specific; fix examples in auto_master(5).
trasz [Mon, 17 Nov 2014 12:36:01 +0000 (12:36 +0000)]
The "intr" option is NFS-specific; fix examples in auto_master(5).

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoRevert r273630 as the panic was fixed by r274619
smh [Mon, 17 Nov 2014 11:35:30 +0000 (11:35 +0000)]
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

9 years agoDisable TRIM on file backed ZFS vdevs and fix TRIM on init
smh [Mon, 17 Nov 2014 11:32:10 +0000 (11:32 +0000)]
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

9 years agoAdd reachover Makefiles for contrib/netbsd-tests/lib/librt
ngie [Mon, 17 Nov 2014 09:19:09 +0000 (09:19 +0000)]
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

9 years agoFinish r274175: do control plane MTU tracking.
melifaro [Mon, 17 Nov 2014 01:05:29 +0000 (01:05 +0000)]
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

9 years agoAdd mv, echo and hostname to the native-xtools target. Missed these
sbruno [Sun, 16 Nov 2014 23:31:23 +0000 (23:31 +0000)]
Add mv, echo and hostname to the native-xtools target.  Missed these
when profiling.

MFC after: 2 weeks

9 years agoNo functional changes. Remove a couple outdated or inane comments and
ian [Sun, 16 Nov 2014 21:39:56 +0000 (21:39 +0000)]
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.

9 years agoCorrect the sequence of busdma sync ops involved with PRE/POSTREAD syncs.
ian [Sun, 16 Nov 2014 21:22:42 +0000 (21:22 +0000)]
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>

9 years agoDo the cache invalidate sequence from the outermost to innermost, required
ian [Sun, 16 Nov 2014 20:59:27 +0000 (20:59 +0000)]
Do the cache invalidate sequence from the outermost to innermost, required
for correct operation.

Submitted by: Michal Meloun <meloun@miracle.cz>

9 years agoDo not do a cache invalidate on a PREREAD sync that is also a PREWRITE sync.
ian [Sun, 16 Nov 2014 20:55:51 +0000 (20:55 +0000)]
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.

9 years ago- Skip over the testcases that call cbrtl on platforms where LDBL_PREC == 53
ngie [Sun, 16 Nov 2014 20:42:30 +0000 (20:42 +0000)]
- 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

9 years ago- Expect exp2_powers to fail on FreeBSD/i386
ngie [Sun, 16 Nov 2014 20:39:11 +0000 (20:39 +0000)]
- 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

9 years agoAlias isinff to isinf on FreeBSD
ngie [Sun, 16 Nov 2014 20:37:46 +0000 (20:37 +0000)]
Alias isinff to isinf on FreeBSD

isinf on FreeBSD automatically picks the appropriate type per math.h

Sponsored by: EMC / Isilon Storage Division

9 years agoReset errno to 0 before running scalbn to be sure that the tested errno is
ngie [Sun, 16 Nov 2014 20:35:32 +0000 (20:35 +0000)]
Reset errno to 0 before running scalbn to be sure that the tested errno is
valid

Sponsored by: EMC / Isilon Storage Division

9 years agoSkip the long-double epsilon checks on FreeBSD/i386
ngie [Sun, 16 Nov 2014 20:34:46 +0000 (20:34 +0000)]
Skip the long-double epsilon checks on FreeBSD/i386

Sponsored by: EMC / Isilon Storage Division

9 years agoIndent a couple lines properly and expand a comment. No functional changes.
ian [Sun, 16 Nov 2014 20:34:14 +0000 (20:34 +0000)]
Indent a couple lines properly and expand a comment.  No functional changes.

9 years agoConvert tools/regression/lib/libc/stdio/test-fpclassify into an ATF testcase and
ngie [Sun, 16 Nov 2014 20:29:57 +0000 (20:29 +0000)]
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

9 years agoFlush out many more static binaries that can be used in a jail for building
sbruno [Sun, 16 Nov 2014 20:10:37 +0000 (20:10 +0000)]
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

9 years agoConvert tools/regression/lib/libc/stdio/test-fmemopen into an ATF testcase and
ngie [Sun, 16 Nov 2014 19:57:47 +0000 (19:57 +0000)]
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

9 years agoAdd freebsd-testing and myself to MAINTAINERS for contrib/netbsd-tests and
ngie [Sun, 16 Nov 2014 19:47:29 +0000 (19:47 +0000)]
Add freebsd-testing and myself to MAINTAINERS for contrib/netbsd-tests and
contrib/pjdfstest

9 years agoRevert r274585: rte lock is properly destroyed in uma dtor callback.
melifaro [Sun, 16 Nov 2014 18:15:23 +0000 (18:15 +0000)]
Revert r274585: rte lock is properly destroyed in uma dtor callback.

Pointed by: glebius

9 years agoFix r273112: do not turn DROP_EN by default.
melifaro [Sun, 16 Nov 2014 18:08:00 +0000 (18:08 +0000)]
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

9 years agodrm/radeon: Lower priority of a message related to invalid EDID
dumbbell [Sun, 16 Nov 2014 17:53:48 +0000 (17:53 +0000)]
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

9 years agoMake witness happy: destroy rte lock before free.
melifaro [Sun, 16 Nov 2014 14:56:31 +0000 (14:56 +0000)]
Make witness happy: destroy rte lock before free.

MFC after: 2 weeks

9 years agoDefault to use 10 seconds as nap interval instead of 1.
delphij [Sun, 16 Nov 2014 09:44:30 +0000 (09:44 +0000)]
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

9 years agoRemove test-arc4random from this Makefile so others can continue to use
ngie [Sun, 16 Nov 2014 07:58:06 +0000 (07:58 +0000)]
Remove test-arc4random from this Makefile so others can continue to use
this as-is for the time being

9 years agoConvert tools/regression/lib/libc/gen/test-arc4random into an ATF testcase and
ngie [Sun, 16 Nov 2014 07:55:28 +0000 (07:55 +0000)]
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

9 years agoAdd reachover Makefiles for contrib/netbsd-tests/lib/librt
ngie [Sun, 16 Nov 2014 07:03:19 +0000 (07:03 +0000)]
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

9 years agoCall sem_unlink on semaphores before attempting to create them
ngie [Sun, 16 Nov 2014 06:59:58 +0000 (06:59 +0000)]
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

9 years agoAdd reachover Makefiles for contrib/netbsd-tests/lib/libpthread as
ngie [Sun, 16 Nov 2014 06:35:20 +0000 (06:35 +0000)]
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

9 years agoAdd missing sys/time.h #include for timespecsub macro in lib/libnetbsd/sys/time.h
ngie [Sun, 16 Nov 2014 05:13:39 +0000 (05:13 +0000)]
Add missing sys/time.h #include for timespecsub macro in lib/libnetbsd/sys/time.h

9 years agoPort helper program to FreeBSD, similar to ../../lib/libc/stdlib/h_atexit.c
ngie [Sun, 16 Nov 2014 05:13:10 +0000 (05:13 +0000)]
Port helper program to FreeBSD, similar to ../../lib/libc/stdlib/h_atexit.c

Submitted by: pho
In collaboration with: kib

9 years ago#ifdef out a printf on !NetBSD that causes the testcase to fail when comparing
ngie [Sun, 16 Nov 2014 05:11:07 +0000 (05:11 +0000)]
#ifdef out a printf on !NetBSD that causes the testcase to fail when comparing
the output from the helper program

Submitted by: pho

9 years agoAdd pthread_np.h #include and initialize the pthread attribute on FreeBSD
ngie [Sun, 16 Nov 2014 05:09:23 +0000 (05:09 +0000)]
Add pthread_np.h #include and initialize the pthread attribute on FreeBSD

Submitted by: pho

9 years agoExpect :pthread_detach to fail with EINVAL instead of ESRCH on FreeBSD
ngie [Sun, 16 Nov 2014 05:08:19 +0000 (05:08 +0000)]
Expect :pthread_detach to fail with EINVAL instead of ESRCH on FreeBSD

PR: 191906
In collaboration with: pho

9 years agoOnly expect timeouts on powerpc with NetBSD
ngie [Sun, 16 Nov 2014 05:06:35 +0000 (05:06 +0000)]
Only expect timeouts on powerpc with NetBSD

Submitted by: pho

9 years agoUse _exit instead of exit so the file descriptors aren't flushed twice in the
ngie [Sun, 16 Nov 2014 05:05:18 +0000 (05:05 +0000)]
Use _exit instead of exit so the file descriptors aren't flushed twice in the
child processes

Submitted by: pho

9 years agoOnly compare visitation counters if they've both been set for the current
markj [Sun, 16 Nov 2014 04:13:42 +0000 (04:13 +0000)]
Only compare visitation counters if they've both been set for the current
type graph walk.

Reviewed by: Robert Mustacchi <rm@joyent.com>
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoRemove an incorrect optimization. The type IDs of each member of a struct or
markj [Sun, 16 Nov 2014 04:10:23 +0000 (04:10 +0000)]
Remove an incorrect optimization. The type IDs of each member of a struct or
union must be checked when determine whether two types are equivalent. This
bug could cause ctfmerge(1) to incorrectly merge distinct types.

Reviewed by: Robert Mustacchi <rm@joyent.com>
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoFix a couple of bugs around the handling of structs and unions of size zero.
markj [Sun, 16 Nov 2014 04:07:53 +0000 (04:07 +0000)]
Fix a couple of bugs around the handling of structs and unions of size zero.
These would cause ctfconvert(1) to return an error when attempting to
resolve valid C types.

Reviewed by: Robert Mustacchi <rm@joyent.com>
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoprevent doing filter ops locking for staticly compiled filter ops...
jmg [Sun, 16 Nov 2014 01:18:41 +0000 (01:18 +0000)]
prevent doing filter ops locking for staticly compiled filter ops...
This significantly reduces lock contention when adding/removing knotes
on busy multi-kq system...  Next step is to cache these references per
kq.. i.e. kq refs it once and keeps a local ref count so that the same
refs don't get accessed by many cpus...

only allocate a knote when we might use it...

Add a new flag, _FORCEONESHOT..  This allows a thread to force the
delivery of another event in a safe manner, say waking up an idle http
connection to force it to be reaped...

If we are _DISABLE'ing a knote, don't bother to call f_event on it, it's
disabled, so won't be delivered anyways..

Tested by: adrian

9 years agoMFV of 274557,tzdata{2014j}
edwin [Sun, 16 Nov 2014 01:00:39 +0000 (01:00 +0000)]
MFV of 274557,tzdata{2014j}

Release 2014j - 2014-11-10 17:37:11 -0800

  Changes affecting current and future time stamps

    Turks & Caicos' switch from US eastern time to UTC-4 year-round
    did not occur on 2014-11-02 at 02:00.  It's currently scheduled
    for 2015-11-01 at 02:00.  (Thanks to Chris Walton.)

  Changes affecting past time stamps

    Many pre-1989 time stamps have been corrected for Asia/Seoul and
    Asia/Pyongyang, based on sources for the Korean-language Wikipedia
    entry for time in Korea.  (Thanks to Sanghyuk Jung.)  Also, no
    longer guess that Pyongyang mimicked Seoul time after World War II,
    as this is politically implausible.

    Some more zones have been turned into links, when they differed
    from existing zones only for older time stamps.  As usual,
    these changes affect UTC offsets in pre-1970 time stamps only.
    Their old contents have been moved to the 'backzone' file.
    The affected zones are: Africa/Addis_Ababa, Africa/Asmara,
    Africa/Dar_es_Salaam, Africa/Djibouti, Africa/Kampala,
    Africa/Mogadishu, Indian/Antananarivo, Indian/Comoro, and
    Indian/Mayotte.

  Changes affecting commentary

    The commentary is less enthusiastic about Shanks as a source,
    and is more careful to distinguish UT from UTC.

9 years agoEnable the use of VM_PHYSSEG_SPARSE on amd64 and i386, making it the default
alc [Sat, 15 Nov 2014 23:40:44 +0000 (23:40 +0000)]
Enable the use of VM_PHYSSEG_SPARSE on amd64 and i386, making it the default
on i386 PAE.  Previously, VM_PHYSSEG_SPARSE could not be used on amd64 and
i386 because vm_page_startup() would not create vm_page structures for the
kernel page table pages allocated during pmap_bootstrap() but those vm_page
structures are needed when the kernel attempts to promote the corresponding
kernel virtual addresses to superpage mappings.  To address this problem, a
new public function, vm_phys_add_seg(), is introduced and vm_phys_init() is
updated to reflect the creation of vm_phys_seg structures by calls to
vm_phys_add_seg().

Discussed with: Svatopluk Kraus
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoFix END()s for fueword and fueword64, match the name in END() with
kib [Sat, 15 Nov 2014 21:25:17 +0000 (21:25 +0000)]
Fix END()s for fueword and fueword64, match the name in END() with
entry.

Submitted by: Jeroen Hofstee <jeroen@myspectrum.nl>
MFC after: 1 week

9 years agoChange LDFLAGS to LDADD in order to allow static builds. This is more
sbruno [Sat, 15 Nov 2014 18:03:38 +0000 (18:03 +0000)]
Change LDFLAGS to LDADD in order to allow static builds.  This is more
proper way to ensure that the command line compile works the way we intend.

Add explicity DPADD statemens on LIBMD and LIBPTHREAD depending on which
options are used in the build.

Reviewed by: andrew
MFC after: 2 weeks

9 years agowpa_cli does not use libedit anymore since version 1.0
bapt [Sat, 15 Nov 2014 14:55:05 +0000 (14:55 +0000)]
wpa_cli does not use libedit anymore since version 1.0

9 years agoMake it possible to do "iscsictl -Rt xxx -p yyy", to remove a session
trasz [Sat, 15 Nov 2014 06:14:38 +0000 (06:14 +0000)]
Make it possible to do "iscsictl -Rt xxx -p yyy", to remove a session
that matches both -t and -p.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoWhitespace and comment tweaks, no functional changes.
ian [Sat, 15 Nov 2014 05:40:20 +0000 (05:40 +0000)]
Whitespace and comment tweaks, no functional changes.

9 years agoAdd a test for locking and unlocking user accounts
brd [Sat, 15 Nov 2014 05:12:30 +0000 (05:12 +0000)]
Add a test for locking and unlocking user accounts

Submitted by: Robert O'Neil <oneil.rs@gmail.com>
Reviewed by: will

9 years agoWhen doing busdma sync ops for BUSDMA_COHERENT memory, there is no need
ian [Sat, 15 Nov 2014 03:39:58 +0000 (03:39 +0000)]
When doing busdma sync ops for BUSDMA_COHERENT memory, there is no need
for cache maintenance operations, but ensure that all prior writes have
reached memory when doing a PREWRITE sync.

Submitted by: Michal Meloun <meloun@miracle.cz>

9 years agoMFi386: r274398
nyan [Sat, 15 Nov 2014 03:34:34 +0000 (03:34 +0000)]
MFi386: r274398

  Move NFS and TFTP filesystems before the synthetic filesystems (bzip,
  gzip, and split).

9 years agoUse the standard powerof2() macro from param.h instead of a local one.
ian [Sat, 15 Nov 2014 02:58:17 +0000 (02:58 +0000)]
Use the standard powerof2() macro from param.h instead of a local one.

Pointed out by:  jhb@

9 years agoConvert the callouts back to using mutexes.
adrian [Sat, 15 Nov 2014 01:18:49 +0000 (01:18 +0000)]
Convert the callouts back to using mutexes.

I did this wrong - I should've included a state flag for each callout
to see if it was supposed to run or not.  I didn't do that.
Instead, just use mutexes anyway.

Suggested by: jhb

9 years agoRemove mostly obsolete hint to disable LAPIC timers.
mav [Fri, 14 Nov 2014 22:01:14 +0000 (22:01 +0000)]
Remove mostly obsolete hint to disable LAPIC timers.

It is partially covered by new code and partially by new CPUs.

PR: 195016
Submitted by: tobias.rehbein@web.de
MFC after: 1 week

9 years agoAutomate options INET/INET6 turning into MK_$opt_SUPPORT
imp [Fri, 14 Nov 2014 21:10:45 +0000 (21:10 +0000)]
Automate options INET/INET6 turning into MK_$opt_SUPPORT
correctly. Fixes if_gfe when building without INET6 and
simplifies if_gif's Makefile.

Sponsored by: Netflix, Inc

9 years agoCleanup trailing newlines noticed while looking for other issues.
imp [Fri, 14 Nov 2014 21:08:51 +0000 (21:08 +0000)]
Cleanup trailing newlines noticed while looking for other issues.

9 years agoReference uefi(8) from i386 boot(8)
emaste [Fri, 14 Nov 2014 20:12:33 +0000 (20:12 +0000)]
Reference uefi(8) from i386 boot(8)

Suggested by trasz.

Differential Revision: https://reviews.freebsd.org/D1162

9 years agoUse ${SYSDIR} as the reference pointer instead of specifying relative path directly.
delphij [Fri, 14 Nov 2014 18:44:13 +0000 (18:44 +0000)]
Use ${SYSDIR} as the reference pointer instead of specifying relative path directly.

Reported by: jenkins via Olivér Pintér (on github)

9 years agoEven better indent struct pagerops.
glebius [Fri, 14 Nov 2014 18:15:35 +0000 (18:15 +0000)]
Even better indent struct pagerops.

9 years agoConstantly indent struct pagerops.
glebius [Fri, 14 Nov 2014 18:00:00 +0000 (18:00 +0000)]
Constantly indent struct pagerops.

9 years agosh(1): Add/improve information about exit status of commands.
jilles [Fri, 14 Nov 2014 17:11:28 +0000 (17:11 +0000)]
sh(1): Add/improve information about exit status of commands.

9 years ago- Use NULL to compare a pointer.
glebius [Fri, 14 Nov 2014 15:44:19 +0000 (15:44 +0000)]
- Use NULL to compare a pointer.
- Use KASSERT() instead of panic.
- Remove useless 'continue', no need to restart cycle here.

Sponsored by: Nginx, Inc.

9 years agoMerge from projects/sendfile:
glebius [Fri, 14 Nov 2014 15:33:40 +0000 (15:33 +0000)]
Merge from projects/sendfile:
  Use sbcut_locked() instead of manually editing a sockbuf.

Sponsored by: Nginx, Inc.

9 years agoAdd OBJDUMP to sys.mk. The EFI loader uses it however without this it can
andrew [Fri, 14 Nov 2014 14:45:36 +0000 (14:45 +0000)]
Add OBJDUMP to sys.mk. The EFI loader uses it however without this it can
be set but empty.

Obtained from: ABT Systems
Sponsored by: The FreeBSD Foundation

9 years agoFix mdoc warning.
trasz [Fri, 14 Nov 2014 11:47:27 +0000 (11:47 +0000)]
Fix mdoc warning.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoIn vfs_write_suspend_umnt(), if suspension cannot be established, do
kib [Fri, 14 Nov 2014 11:31:10 +0000 (11:31 +0000)]
In vfs_write_suspend_umnt(), if suspension cannot be established, do
not forget to restore write ops count when returning the error.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoFix mdoc warning by removing empty lines.
trasz [Fri, 14 Nov 2014 08:58:55 +0000 (08:58 +0000)]
Fix mdoc warning by removing empty lines.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoAdd missing commas to .Xr.
trasz [Fri, 14 Nov 2014 08:58:06 +0000 (08:58 +0000)]
Add missing commas to .Xr.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoThere should not be zero length mbufs in socket buffers. The code comes
glebius [Fri, 14 Nov 2014 06:02:29 +0000 (06:02 +0000)]
There should not be zero length mbufs in socket buffers.  The code comes
from r1451, and thus can't be explained.  A patch with explicit panic()
here survived all tests.

Tested by: pho
Sponsored by: Nginx, Inc.

9 years agoMigrate the callouts from using mutex locks to being mpsafe with
adrian [Fri, 14 Nov 2014 04:26:26 +0000 (04:26 +0000)]
Migrate the callouts from using mutex locks to being mpsafe with
the locks being held by the callers.

Kill callout_drain() and use callout_stop().

9 years agoCorrect a typo to fix chown(2). It was broken since r274476.
jkim [Thu, 13 Nov 2014 23:51:13 +0000 (23:51 +0000)]
Correct a typo to fix chown(2).  It was broken since r274476.

Pointy hat to: kib
X-MFC-With: r274476

9 years agoAdd more static binaries to the native-xtools target. These help speed
sbruno [Thu, 13 Nov 2014 22:25:22 +0000 (22:25 +0000)]
Add more static binaries to the native-xtools target.  These help speed
up the cross builds significantly.

adding:
bin/sh
bin/csh
sbin/md5
usr.bin/bzip2
usr.bin/fetch
usr.bin/gzip
usr.bin/tar
usr.bin/unzip
usr.bin/xz

Phabric: D1146
Reviewed by: imp bdrewery
MFC after: 2 weeks

9 years agoExtend earlier addition of stack frames to most of support.S. This makes
scottl [Thu, 13 Nov 2014 22:11:44 +0000 (22:11 +0000)]
Extend earlier addition of stack frames to most of support.S.  This makes
stack traces in KDB, HWPMC, and DTrace much more reliable and useful.

Reviewed by: kan, kib
Obtained from: Netflix, Inc.
MFC after: 5 days

9 years ago- Use the existing driver lock in cdevsw methods and remove D_NEEDGIANT.
jhb [Thu, 13 Nov 2014 22:06:57 +0000 (22:06 +0000)]
- Use the existing driver lock in cdevsw methods and remove D_NEEDGIANT.
- Use callout(9) instead of timeout(9).
- Use bus_*() instead of bus_space_*().
- Don't check for a NULL softc in attach.

Tested by: no one

9 years agoLock iir(4) and mark it MPSAFE.
jhb [Thu, 13 Nov 2014 22:00:18 +0000 (22:00 +0000)]
Lock iir(4) and mark it MPSAFE.
- Add a per-device mutex to the softc and use it for bus_dma tags,
  CAM SIMs, callouts, and interrupt handler.
- Switch from timeout(9) to callout(9).
- Add a separate global mutex to protect the global event buffer ring.
- Return completed index from iir_intr_locked() and remove the global
  gdt_wait_* variables.
- Remove global list of gdt softcs and replace its use with
  devclass_get_device().
- Use si_drv1 to store softc pointer in the SDEV_PER_HBA case instead
  of minor numbers.
- Do math on osreldate instead of dubious char math on osrelease[]
  that didn't work on 10.0+.
- Use bus_*() instead of bus_space_*().
- Use device_printf() instead of printf() with a unit number.

Tested by: no one

9 years agofiledesc: oops.. commit missing change to filedesc.h
mjg [Thu, 13 Nov 2014 21:47:43 +0000 (21:47 +0000)]
filedesc: oops.. commit missing change to filedesc.h

9 years agoFix typo in ARM GIC device_printf()
zbb [Thu, 13 Nov 2014 21:37:53 +0000 (21:37 +0000)]
Fix typo in ARM GIC device_printf()

Obtained from:   Semihalf
Sponsored by:    The FreeBSD Foundation

9 years agoThe fix imported into llvm in r274442 contains some C++11 constructs,
dim [Thu, 13 Nov 2014 21:16:01 +0000 (21:16 +0000)]
The fix imported into llvm in r274442 contains some C++11 constructs,
which gcc in base cannot handle.  Replace these with C++98 equivalents.

While here, add the patch for the adapted fix.

Reported by: bz, kib
Pointy hat to: dim
MFC after: 1 week
X-MFC-With: r274442

9 years agofiledesc: fixup fdinit to lock fdp and preapare files conditinally
mjg [Thu, 13 Nov 2014 21:15:09 +0000 (21:15 +0000)]
filedesc: fixup fdinit to lock fdp and preapare files conditinally

Not all consumers providing fdp to copy from want files.

Perhaps these functions should be reorganized to better express the outcome.

This fixes up panics after r273895 .

Reported by: markj

9 years agoDrop mention of ISA cards. Note that I have no idea what to cull from the
jhb [Thu, 13 Nov 2014 20:09:47 +0000 (20:09 +0000)]
Drop mention of ISA cards.  Note that I have no idea what to cull from the
supported hardware list.  Judging by the PCI driver attachment, dpt_pci.c
only supports a single adapter rather than the various PCI adapters listed.
The list of EISA adapters listed somewhat overlaps with the device IDs in
dpt_eisa.c.  It's not clear which devices are ISA-only devices.

9 years agoRemove dpt_isa.c and commented out references to it. It was never connected
jhb [Thu, 13 Nov 2014 20:00:54 +0000 (20:00 +0000)]
Remove dpt_isa.c and commented out references to it.  It was never connected
to the build in either sys/conf/files* or sys/modules/dpt/Makefile.  Also,
it was denoted as "doesn't quite work yet" when the file was initially added
(which may account for it never having been hooked up to the build).

9 years agoRemove reference to sys/dev/dpt/dpt_control.c. It was removed back in 2001 after...
jhb [Thu, 13 Nov 2014 19:56:02 +0000 (19:56 +0000)]
Remove reference to sys/dev/dpt/dpt_control.c.  It was removed back in 2001 after having
never been updated for CAM changes in 1998.