]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoUpdate ahci(4), respecting recent driver changes.
mav [Tue, 22 Oct 2013 11:56:46 +0000 (11:56 +0000)]
Update ahci(4), respecting recent driver changes.

10 years agoRemove global device lock acquisition from dev_relthread(), replacing it
mav [Tue, 22 Oct 2013 10:40:26 +0000 (10:40 +0000)]
Remove global device lock acquisition from dev_relthread(), replacing it
with atomics on per-device data.

10 years agoRemove Giant-locked drivers support (DISKFLAG_NEEDSGIANT flag) from disk(9).
mav [Tue, 22 Oct 2013 10:21:20 +0000 (10:21 +0000)]
Remove Giant-locked drivers support (DISKFLAG_NEEDSGIANT flag) from disk(9).

Since at least FreeBSD 7 we had only four of them in the base tree, and
in head branch, thanks to jhb@, we have no any for more then a year.

10 years agoMerge GEOM direct dispatch changes from the projects/camlock branch.
mav [Tue, 22 Oct 2013 08:22:19 +0000 (08:22 +0000)]
Merge GEOM direct dispatch changes from the projects/camlock branch.

When safety requirements are met, it allows to avoid passing I/O requests
to GEOM g_up/g_down thread, executing them directly in the caller context.
That allows to avoid CPU bottlenecks in g_up/g_down threads, plus avoid
several context switches per I/O.

The defined now safety requirements are:
 - caller should not hold any locks and should be reenterable;
 - callee should not depend on GEOM dual-threaded concurency semantics;
 - on the way down, if request is unmapped while callee doesn't support it,
   the context should be sleepable;
 - kernel thread stack usage should be below 50%.

To keep compatibility with GEOM classes not meeting above requirements
new provider and consumer flags added:
 - G_CF_DIRECT_SEND -- consumer code meets caller requirements (request);
 - G_CF_DIRECT_RECEIVE -- consumer code meets callee requirements (done);
 - G_PF_DIRECT_SEND -- provider code meets caller requirements (done);
 - G_PF_DIRECT_RECEIVE -- provider code meets callee requirements (request).
Capable GEOM class can set them, allowing direct dispatch in cases where
it is safe.  If any of requirements are not met, request is queued to
g_up or g_down thread same as before.

Such GEOM classes were reviewed and updated to support direct dispatch:
CONCAT, DEV, DISK, GATE, MD, MIRROR, MULTIPATH, NOP, PART, RAID, STRIPE,
VFS, ZERO, ZFS::VDEV, ZFS::ZVOL, all classes based on g_slice KPI (LABEL,
MAP, FLASHMAP, etc).

To declare direct completion capability disk(9) KPI got new flag equivalent
to G_PF_DIRECT_SEND -- DISKFLAG_DIRECT_COMPLETION.  da(4) and ada(4) disk
drivers got it set now thanks to earlier CAM locking work.

This change more then twice increases peak block storage performance on
systems with manu CPUs, together with earlier CAM locking changes reaching
more then 1 million IOPS (512 byte raw reads from 16 SATA SSDs on 4 HBAs to
256 user-level threads).

Sponsored by: iXsystems, Inc.
MFC after: 2 months

10 years agoAdd a reload command.
des [Tue, 22 Oct 2013 07:44:26 +0000 (07:44 +0000)]
Add a reload command.

Reviewed by: hrs
MFC after: 3 days

10 years agoStart rtsold if necessary.
des [Tue, 22 Oct 2013 06:53:01 +0000 (06:53 +0000)]
Start rtsold if necessary.

Reviewed by: hrs
MFC after: 3 days

10 years agoMake watchdog function conform watchdog(9):
gonzo [Tue, 22 Oct 2013 05:22:46 +0000 (05:22 +0000)]
Make watchdog function conform watchdog(9):
Set error to 0 when watchdog is armed and disable it when timeout
is too large to be set.

10 years ago- Implement watchdog function and register it with watchdog list
gonzo [Tue, 22 Oct 2013 05:19:42 +0000 (05:19 +0000)]
- Implement watchdog function and register it with watchdog list

10 years agoReturn standards-compliant code from OF_nextprop() with FDT when no
nwhitehorn [Tue, 22 Oct 2013 02:39:56 +0000 (02:39 +0000)]
Return standards-compliant code from OF_nextprop() with FDT when no
properties remain on this node.

10 years agoMake netback compile without INET support in the kernel.
bz [Tue, 22 Oct 2013 00:50:53 +0000 (00:50 +0000)]
Make netback compile without INET support in the kernel.

This shuld have been a problem since r230587.  Not exactly sure why it
was not detected the last weeks with the tinderbox.  I would assume
r255744 is what started to cause it.

MFC after: 1 week

10 years agoResolve clang warning about a use of syslog. By using a proper enforcement
sbruno [Mon, 21 Oct 2013 22:55:56 +0000 (22:55 +0000)]
Resolve clang warning about a use of syslog. By using a proper enforcement
of string format in a call so syslog

/usr/src/gnu/lib/libssp/../../../contrib/gcclibs/libssp/ssp.c:137:23:
warning: format string is not a string literal (potentially insecure)
      [-Wformat-security]
    syslog (LOG_CRIT, msg1);
                      ^~~~

Reviewed by: dim@

10 years agoRemove the isf(4) driver. It was created by accident and is subset of
brooks [Mon, 21 Oct 2013 22:43:38 +0000 (22:43 +0000)]
Remove the isf(4) driver.  It was created by accident and is subset of
the cfi(4) driver.  It remained in the tree longer than would be ideal
due to the time required to bring cfi(4) to feature parity.

Sponsored by: DARPA/AFRL
MFC after: 3 days

10 years agoMake hard-wired TLB allocations be at minimum one page. This is required by
nwhitehorn [Mon, 21 Oct 2013 22:25:54 +0000 (22:25 +0000)]
Make hard-wired TLB allocations be at minimum one page. This is required by
some implementations, most notably (in my case) QEMU's e500 emulation.

10 years agoAdd comments that taskqueue_enqueue_locked() returns without the lock.
mav [Mon, 21 Oct 2013 21:16:50 +0000 (21:16 +0000)]
Add comments that taskqueue_enqueue_locked() returns without the lock.

10 years agoMFP4: 223121 (FDT infrastructure portion)
brooks [Mon, 21 Oct 2013 21:13:01 +0000 (21:13 +0000)]
MFP4: 223121 (FDT infrastructure portion)

Implement support for interrupt-parent nodes in simplebus.  The current
implementation requires that device declarations have an interrupt-parent
node and that it point to a device that has registered itself as a
interrupt controller in fdt_ic_list_head and implements the fdt_ic
interface.

Sponsored by:   DARPA/AFRL

10 years agoAllow kernels without options SOFTUPDATES to build. This should fix the
brooks [Mon, 21 Oct 2013 20:51:08 +0000 (20:51 +0000)]
Allow kernels without options SOFTUPDATES to build.  This should fix the
embedded tinderboxes.

Reviewed by: emaste

10 years agoDon't force 64-bit DWARF2 on MIPS
emaste [Mon, 21 Oct 2013 20:38:02 +0000 (20:38 +0000)]
Don't force 64-bit DWARF2 on MIPS

64-bit debug data is only necessary for objects with greater than 4GB of
debug data, and is not used on other 64-bit FreeBSD targets.

Sponsored by: DARPA, AFRL

10 years agoUse standard ofw_bus helpers instead of reinventing the wheel.
nwhitehorn [Mon, 21 Oct 2013 18:47:02 +0000 (18:47 +0000)]
Use standard ofw_bus helpers instead of reinventing the wheel.

10 years agoAdd a resource limit for the total number of kqueues available to the
kib [Mon, 21 Oct 2013 16:46:12 +0000 (16:46 +0000)]
Add a resource limit for the total number of kqueues available to the
user.  Kqueue now saves the ucred of the allocating thread, to
correctly decrement the counter on close.

Under some specific and not real-world use scenario for kqueue, it is
possible for the kqueues to consume memory proportional to the square
of the number of the filedescriptors available to the process.  Limit
allows administrator to prevent the abuse.

This is kernel-mode side of the change, with the user-mode enabling
commit following.

Reported and tested by: pho
Discussed with: jmg
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

10 years agoAdd a resource limit for the total number of kqueues available to the
kib [Mon, 21 Oct 2013 16:44:53 +0000 (16:44 +0000)]
Add a resource limit for the total number of kqueues available to the
user.  Kqueue now saves the ucred of the allocating thread, to
correctly decrement the counter on close.

Under some specific and not real-world use scenario for kqueue, it is
possible for the kqueues to consume memory proportional to the square
of the number of the filedescriptors available to the process.  Limit
allows administrator to prevent the abuse.

This is kernel-mode side of the change, with the user-mode enabling
commit following.

Reported and tested by: pho
Discussed with: jmg
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

10 years agoReset function on SandyBridge holds the gt_lock for the whole duration
kib [Mon, 21 Oct 2013 16:22:51 +0000 (16:22 +0000)]
Reset function on SandyBridge holds the gt_lock for the whole duration
already.  Also, according to the specs, GDRST register is not in the
power well, so the forcewake for reset status read is excessive for
this reason.

Use plain register read for waiting of the reset completion
notification, to avoid gt_lock recursion.  Linux upstream did the
similar change, but their code was already restructured.

Reported by: ray
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoPrint more useful information about the transfer that trigger the assertion.
kib [Mon, 21 Oct 2013 16:17:46 +0000 (16:17 +0000)]
Print more useful information about the transfer that trigger the assertion.
Other data is available with ddb command 'show pginfo'.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoProvide an interface for PCI bus drivers that need some of ofw_pci's
nwhitehorn [Mon, 21 Oct 2013 13:57:34 +0000 (13:57 +0000)]
Provide an interface for PCI bus drivers that need some of ofw_pci's
metadata during attach.

10 years agoFix build problem on ARM (which defaults to building without soft updates).
mckusick [Mon, 21 Oct 2013 13:09:09 +0000 (13:09 +0000)]
Fix build problem on ARM (which defaults to building without soft updates).

Reported by:  Tinderbox
Sponsored by: Netflix

10 years agoMerge CAM locking changes from the projects/camlock branch to radically
mav [Mon, 21 Oct 2013 12:00:26 +0000 (12:00 +0000)]
Merge CAM locking changes from the projects/camlock branch to radically
reduce lock congestion and improve SMP scalability of the SCSI/ATA stack,
preparing the ground for the coming next GEOM direct dispatch support.

Replace big per-SIM locks with bunch of smaller ones:
 - per-LUN locks to protect device and peripheral drivers state;
 - per-target locks to protect list of LUNs on target;
 - per-bus locks to protect reference counting;
 - per-send queue locks to protect queue of CCBs to be sent;
 - per-done queue locks to protect queue of completed CCBs;
 - remaining per-SIM locks now protect only HBA driver internals.

While holding LUN lock it is allowed (while not recommended for performance
reasons) to take SIM lock.  The opposite acquisition order is forbidden.
All the other locks are leaf locks, that can be taken anywhere, but should
not be cascaded.  Many functions, such as: xpt_action(), xpt_done(),
xpt_async(), xpt_create_path(), etc. are no longer require (but allow) SIM
lock to be held.

To keep compatibility and solve cases where SIM lock can't be dropped, all
xpt_async() calls in addition to xpt_done() calls are queued to completion
threads for async processing in clean environment without SIM lock held.

Instead of single CAM SWI thread, used for commands completion processing
before, use multiple (depending on number of CPUs) threads.  Load balanced
between them using "hash" of the device B:T:L address.

HBA drivers that can drop SIM lock during completion processing and have
sufficient number of completion threads to efficiently scale to multiple
CPUs can use new function xpt_done_direct() to avoid extra context switch.
Make ahci(4) driver to use this mechanism depending on hardware setup.

Sponsored by: iXsystems, Inc.
MFC after: 2 months

10 years agoFix 'make delete-old-libs' and 'make check-libs' to delete .debug
bdrewery [Mon, 21 Oct 2013 10:09:48 +0000 (10:09 +0000)]
Fix 'make delete-old-libs' and 'make check-libs' to delete .debug
files created by WITH_DEBUG_FILES. Also cleanup .symbols files from
the period between r244236 when .symbols were supported and r251512
when they were renamed to .debug.

Only propose to delete a .debug file if the corresponding library
itself was deleted already.

Reported by: des
Reviewed by: emaste (earlier version)
Approved by: bapt
MFC after: 3 days

10 years agoMove and rename dwc otg driver to more
ganbold [Mon, 21 Oct 2013 09:34:04 +0000 (09:34 +0000)]
Move and rename dwc otg driver to more
generic one as it appears to work
for rk3188 SoC based board too.

No objections from: hselasky@
Reviewed by: ray@

10 years agoDon't test arrays for being NULL.
trasz [Mon, 21 Oct 2013 09:12:04 +0000 (09:12 +0000)]
Don't test arrays for being NULL.

MFC after: 1 month

10 years agoMFprojects/camlock:
mav [Mon, 21 Oct 2013 08:57:27 +0000 (08:57 +0000)]
MFprojects/camlock:
Remove hard limit on number of BIOs handled with one ATA TRIM request.

10 years ago- Fix jail_parallel_start="YES".
hrs [Mon, 21 Oct 2013 08:49:46 +0000 (08:49 +0000)]
- Fix jail_parallel_start="YES".
- Fix ip[46].addr when interface parameter is not defined.

Spotted by: rpaulo

10 years agoDrop cm_lock before calling mapper_close, which in turn could call
delphij [Mon, 21 Oct 2013 07:58:37 +0000 (07:58 +0000)]
Drop cm_lock before calling mapper_close, which in turn could call
_citrus_mapper_close again and result in a deadlock otherwise.

This is similar to NetBSD PR/24023 (fixed in their r1.5 of this file).

PR: bin/182994
Submitted by: Fabian Keil <fk fabiankeil de>
MFC after: 3 days

10 years agoAdd a note that lacp_compose_key() should be updated, when new media
ae [Mon, 21 Oct 2013 07:49:36 +0000 (07:49 +0000)]
Add a note that lacp_compose_key() should be updated, when new media
types will be added.

Submitted by: melifaro
X-MFC after: r256689

10 years agoMFprojects/camlock r256619:
mav [Mon, 21 Oct 2013 06:44:55 +0000 (06:44 +0000)]
MFprojects/camlock r256619:
Restore BIO_UNMAPPED and BIO_TRANSIENT_MAPPING in biodonne() when unmapping
temporary mapped buffer.  That fixes double unmap if biodone() called twice
for the same BIO (but with different done methods).

Move mapping removal before calling bio_done() method.  I believe that it is
very wrong to do anything to BIO after reporting completion.  kib@ thinks
it was done for some forgotten now case when bio_done() method needed mapped
buffer. But 1) if BIO was sent as unmapped, then IMO done() should be called
in the same way; 2) IMO there is no guatantee that buffer will be mapped at
this point at all, for example, if all underlying stack supports unmapped
I/O, so bio_done() handler can not expect that.

10 years agoAdd preliminary support for RTL8106E PCIe FastEthernet.
yongari [Mon, 21 Oct 2013 06:27:20 +0000 (06:27 +0000)]
Add preliminary support for RTL8106E PCIe FastEthernet.

H/W donated by: RealTek Semiconductor Corp.

10 years agoCorrect MAC revision bits. Previously it always cleared bit 20 and
yongari [Mon, 21 Oct 2013 06:22:20 +0000 (06:22 +0000)]
Correct MAC revision bits. Previously it always cleared bit 20 and
bit 21.

10 years agoPartial MFproject/camlock r256671:
mav [Mon, 21 Oct 2013 06:04:39 +0000 (06:04 +0000)]
Partial MFproject/camlock r256671:
Fix several target mode SIMs to not blindly clear ccb_h.flags field of
ATIO CCBs.  Not all CCB flags there belong to them.

10 years agoProvide a working example line for an interface with 1 address running
glebius [Mon, 21 Oct 2013 05:14:00 +0000 (05:14 +0000)]
Provide a working example line for an interface with 1 address running
with CARP.

Currently, we've got a problem that interface isn't IFF_UP at the time
we assign it a redundant address, and the latter gets stuck in INIT state.
Additional SIOCSIFFLAGS from ifconfig(8) kicks it to a working state.

A proper fix is kernel side and appeared to be non-trivial, not to be
checked in before 10.0-RELEASE.

Submitted by: Ole Myhre <ole.myhre dataoppdrag.no>

10 years agoUpdate jemalloc to version 3.4.1.
jasone [Mon, 21 Oct 2013 05:10:46 +0000 (05:10 +0000)]
Update jemalloc to version 3.4.1.

10 years agoWhen fetching function arguments out of a frame on amd64, explicitly select
markj [Mon, 21 Oct 2013 04:15:55 +0000 (04:15 +0000)]
When fetching function arguments out of a frame on amd64, explicitly select
the register based on the argument index rather than relying on the fields
in struct reg to be in the right order. This assumption is incorrect on
FreeBSD and generally led to bogus argument values for the sixth argument
of PID and USDT probes; the first five are passed directly to dtrace_probe()
via the fasttrap trap handler and so were correctly handled.

MFC after: 2 weeks

10 years agoFix 80-column line wrapping in a comment.
nwhitehorn [Mon, 21 Oct 2013 00:58:35 +0000 (00:58 +0000)]
Fix 80-column line wrapping in a comment.

10 years agoRestructuring of the soft updates code to set it up so that the
mckusick [Mon, 21 Oct 2013 00:28:02 +0000 (00:28 +0000)]
Restructuring of the soft updates code to set it up so that the
single kernel-wide soft update lock can be replaced with a
per-filesystem soft-updates lock. This per-filesystem lock will
allow each filesystem to have its own soft-updates flushing thread
rather than being limited to a single soft-updates flushing thread
for the entire kernel.

Move soft update variables out of the ufsmount structure and into
their own mount_softdeps structure referenced by ufsmount field
um_softdep.  Eventually the per-filesystem lock will be in this
structure. For now there is simply a pointer to the kernel-wide
soft updates lock.

Change all instances of ACQUIRE_LOCK and FREE_LOCK to pass the lock
pointer in the mount_softdeps structure instead of a pointer to the
kernel-wide soft-updates lock.

Replace the five hash tables used by soft updates with per-filesystem
copies of these tables allocated in the mount_softdeps structure.

Several functions that flush dependencies when too many are allocated
in the kernel used to operate across all filesystems. They are now
parameterized to flush dependencies from a specified filesystem.
For now, we stick with the round-robin flushing strategy when the
kernel as a whole has too many dependencies allocated.

While there are many lines of changes, there should be no functional
change in the operation of soft updates.

Tested by:    Peter Holm and Scott Long
Sponsored by: Netflix

10 years agoAllow the OFW interrupt mapping code to work with PCI devices not enumerated
nwhitehorn [Mon, 21 Oct 2013 00:04:26 +0000 (00:04 +0000)]
Allow the OFW interrupt mapping code to work with PCI devices not enumerated
by Open Firmware, as in the case of FDT.

10 years agoCalculate the baud rate divisor rather than using a hard-coded value.
ian [Sun, 20 Oct 2013 23:40:16 +0000 (23:40 +0000)]
Calculate the baud rate divisor rather than using a hard-coded value.

Submitted by: Steven Lawrance <stl@koffein.net>

10 years agoAvoid sign overflow if there are more than 2 GB of RAM.
nwhitehorn [Sun, 20 Oct 2013 23:02:16 +0000 (23:02 +0000)]
Avoid sign overflow if there are more than 2 GB of RAM.

10 years agoThe Xen userland event channel driver isn't complete. Disabled it
gibbs [Sun, 20 Oct 2013 22:50:57 +0000 (22:50 +0000)]
The Xen userland event channel driver isn't complete.  Disabled it
from the kernel build until it is ready.

sys/conf/files:
Remove the entry for xen/evtchn/evtchn_dev.c so it is not included
in any kernel builds.

Noticed by: smh

10 years agoFourth of several cleanups to soft dependency implementation.
mckusick [Sun, 20 Oct 2013 22:21:01 +0000 (22:21 +0000)]
Fourth of several cleanups to soft dependency implementation.
Add KASSERTS that soft dependency functions only get called
for filesystems running with soft dependencies. Calling these
functions when soft updates are not compiled into the system
become panic's.

No functional change.

Tested by:    Peter Holm and Scott Long
Sponsored by: Netflix

10 years agoAdd configuration for the Freescale i.MX53 Quick Start Board.
ian [Sun, 20 Oct 2013 21:21:07 +0000 (21:21 +0000)]
Add configuration for the Freescale i.MX53 Quick Start Board.

10 years agoThird of several cleanups to soft dependency implementation.
mckusick [Sun, 20 Oct 2013 21:11:40 +0000 (21:11 +0000)]
Third of several cleanups to soft dependency implementation.
Ensure that softdep_unmount() and softdep_setup_sbupdate()
only get called for filesystems running with soft dependencies.

No functional change.

Tested by:    Peter Holm and Scott Long
Sponsored by: Netflix

10 years agoAdd a driver for the Freescale Fast Ethernet Controller found on various
ian [Sun, 20 Oct 2013 21:07:38 +0000 (21:07 +0000)]
Add a driver for the Freescale Fast Ethernet Controller found on various
Freescale SoCs including the i.MX series.  This also works for the newer
SoCs with the ENET gigabit controller, but doesn't use any of the new
hardware features other than enabling gigabit speed.

10 years agosyslog: Use SOCK_CLOEXEC instead of separate fcntl() call.
jilles [Sun, 20 Oct 2013 21:04:44 +0000 (21:04 +0000)]
syslog: Use SOCK_CLOEXEC instead of separate fcntl() call.

10 years agoSwitch to using the standard uart console driver instead of the special
ian [Sun, 20 Oct 2013 21:03:15 +0000 (21:03 +0000)]
Switch to using the standard uart console driver instead of the special
driver for early boot debugging.

10 years agoSecond of several cleanups to soft dependency implementation.
mckusick [Sun, 20 Oct 2013 20:52:07 +0000 (20:52 +0000)]
Second of several cleanups to soft dependency implementation.
Delete two unused functions in ffs_sofdep.c.

No functional change.

Tested by:    Peter Holm and Scott Long
Sponsored by: Netflix

10 years agopopen(): Try to prevent inappropriate fd passing even if 'e' is not used.
jilles [Sun, 20 Oct 2013 20:50:17 +0000 (20:50 +0000)]
popen(): Try to prevent inappropriate fd passing even if 'e' is not used.

Even though not all race conditions can be fixed if the 'e' option is not
used, still fix some race conditions using pipe2():

* Prevent both ends of the pipe from leaking to a concurrent popen().

* Prevent the child process's end of the pipe from leaking to any concurrent
  fork and exec.

This change also simplifies the code.

10 years agoFirst of several cleanups to soft dependency implementation.
mckusick [Sun, 20 Oct 2013 20:41:38 +0000 (20:41 +0000)]
First of several cleanups to soft dependency implementation.
Convert three functions exported from ffs_softdep.c to static
functions as they are not used outside of ffs_softdep.c.

No functional change.

Tested by:    Peter Holm and Scott Long
Sponsored by: Netflix

10 years agopathchk: Ensure bytes >= 128 are considered non-portable characters.
jilles [Sun, 20 Oct 2013 20:10:31 +0000 (20:10 +0000)]
pathchk: Ensure bytes >= 128 are considered non-portable characters.

This was not broken on architectures such as ARM where char is unsigned.

Also, remove the first non-portable character from the output. POSIX does
not require this, and printing the first byte may yield an invalid byte
sequence with UTF-8.

PR: bin/165988
Reported by: Nicolas Rachinsky

10 years agoSince the PS3 port was committed, the AIM nexus device works perfectly fine
nwhitehorn [Sun, 20 Oct 2013 18:40:55 +0000 (18:40 +0000)]
Since the PS3 port was committed, the AIM nexus device works perfectly fine
on all PowerPC platforms, whether or not they have Open Firmware. Remove
some more duplication and have there be only one nexus driver.

10 years agoSome nexus devices add wildcard children. Since fdtbus_probe returned
nwhitehorn [Sun, 20 Oct 2013 18:38:19 +0000 (18:38 +0000)]
Some nexus devices add wildcard children. Since fdtbus_probe returned
BUS_PROBE_DEFAULT, it would attach to them all, producing both many
fdtbus instances and preventing other devices from attaching. Instead
return BUS_PROBE_NOWILDCARD, which exists for exactly this purpose.

10 years agoReplace the two almost-exactly-identical AIM and Book-E clock.c
nwhitehorn [Sun, 20 Oct 2013 16:37:03 +0000 (16:37 +0000)]
Replace the two almost-exactly-identical AIM and Book-E clock.c
implementations with a single one after the application of a very small
amount of #ifdef.

10 years agoUnify the AIM and Book-E vm_machdep.c implementations, which previously
nwhitehorn [Sun, 20 Oct 2013 16:14:03 +0000 (16:14 +0000)]
Unify the AIM and Book-E vm_machdep.c implementations, which previously
differed only with respect to the AIM version not following style(9) and
some additional features for 64-bit systems and machines with direct maps
in the AIM implementation that are no-ops on Book-E (at least for now).

10 years agoMerge from projects/arm_eabi_vfp r255380:
andrew [Sun, 20 Oct 2013 15:13:32 +0000 (15:13 +0000)]
Merge from projects/arm_eabi_vfp r255380:

Fix the VCVT instruction. It must round towards zero when converting from
a floating-point to an integer value. This was not the case causing issues
when printing certain values.

There is a VCVTR instruction that will round depending on the current
rounding mode. We don't yet support this instruction, or setting the
rounding mode.

10 years agoAdd multicast filter control.
nwhitehorn [Sun, 20 Oct 2013 14:01:09 +0000 (14:01 +0000)]
Add multicast filter control.

10 years agoAdd more obsolete files
antoine [Sun, 20 Oct 2013 13:41:42 +0000 (13:41 +0000)]
Add more obsolete files

10 years agoAdd 26 new device IDs to uslcom(4). This brings us in sync with Linux
gavin [Sun, 20 Oct 2013 11:19:37 +0000 (11:19 +0000)]
Add 26 new device IDs to uslcom(4).  This brings us in sync with Linux
v3.12 rc5.

MFC after: 3 days

10 years agoClean up some debug code that snuck in. Add a block comment on future work.
nwhitehorn [Sun, 20 Oct 2013 01:40:59 +0000 (01:40 +0000)]
Clean up some debug code that snuck in. Add a block comment on future work.

10 years agoAdd initial driver for POWER hypervisor interpartition ethernet. This is
nwhitehorn [Sun, 20 Oct 2013 01:31:09 +0000 (01:31 +0000)]
Add initial driver for POWER hypervisor interpartition ethernet. This is
sufficient to pass traffic but needs some more work before merging to
STABLE.

10 years agoAllow hypervisor calls with more than 7 arguments.
nwhitehorn [Sun, 20 Oct 2013 01:28:39 +0000 (01:28 +0000)]
Allow hypervisor calls with more than 7 arguments.

10 years agoBump __FreeBSD_version to 1100001 for addition of support for "first boot"
cperciva [Sat, 19 Oct 2013 21:55:42 +0000 (21:55 +0000)]
Bump __FreeBSD_version to 1100001 for addition of support for "first boot"
rc.d scripts, so that ports can make use of this.

10 years agoAdd support for "first boot" rc.d scripts. [1]
cperciva [Sat, 19 Oct 2013 21:37:06 +0000 (21:37 +0000)]
Add support for "first boot" rc.d scripts. [1]

These scripts, containing
# KEYWORD: firstboot
will only be run if a sentinel file (default: /firstboot, configurable
via the rc.conf ${firstboot_sentinel} variable) exists; this sentinel
file will be deleted at the end of the boot process.

Scripts can request that the system reboot after the first boot by
creating the file ${firstboot_sentinel}-reboot.

This functionality is expected to be useful for embedded systems and
virtual machine images, where it may be desirable to
(a) download and install updates which became available between when
the image was created and when it was "turned on";
(b) download and install packages which may be newer than those
which were available when the image was created;
(c) install packages which run binaries during their install process,
bypassing the problem of cross-architecture installs;
(d) resize filesystems to match the disk onto which a VM image was
installed;
(e) perform initialization tasks relevant to cloud systems (e.g.,
Amazon's Elastic Compute Cloud);
and likely to perform many other one-time initialization functions.

Document this new functionality in rc.conf(5) and rc(8). [2]

Reviewed by: freebsd-current, freebsd-rc [1]
Reviewed by: Warren Block [2]
MFC after: 3 days

10 years agoClock divisors 0-3 correspond to dividing by 1-4, so add 1 before dividing.
ian [Sat, 19 Oct 2013 21:33:06 +0000 (21:33 +0000)]
Clock divisors 0-3 correspond to dividing by 1-4, so add 1 before dividing.

10 years agoEnable the automatic creation of a certificate (if one does not exists)
jmg [Sat, 19 Oct 2013 18:51:06 +0000 (18:51 +0000)]
Enable the automatic creation of a certificate (if one does not exists)
and enable the usage by sendmail if sendmail is enabled.  Include and
document knobs to disable this feature and also set the Common Name of
the certificate created.

As the certificate is signed w/ a discarded key, it only helps prevent
Eve, but not Malory from knowing the contents of the emails.

This means that new installs (and people that use the updated freebsd.mc
file) will automaticly have STARTTLS enabled allowing incoming email to
be encrypted in most cases.

Reviewed by: gshapiro
MFC after: 3 days
Security: Yes, please.

10 years ago- Add parentheses to all internet addresses
kevlo [Sat, 19 Oct 2013 18:13:32 +0000 (18:13 +0000)]
- Add parentheses to all internet addresses
- All the casts to uint32_t should be to in_addr_t

Suggested by: bde
Reviewed by: bde

10 years agodrm/radeon: radeonkms depends on firmware(9)
dumbbell [Sat, 19 Oct 2013 17:11:58 +0000 (17:11 +0000)]
drm/radeon: radeonkms depends on firmware(9)

Submitted by: tijl@

10 years agoImprove bootstrapping message
gavin [Sat, 19 Oct 2013 15:36:21 +0000 (15:36 +0000)]
Improve bootstrapping message

MFC after: 3 days

10 years agoLast few remnants of BIND (hopefully...)
des [Sat, 19 Oct 2013 10:00:51 +0000 (10:00 +0000)]
Last few remnants of BIND (hopefully...)

MFC after: 3 days

10 years agoDo not error out when adding an interface to a group to which it
des [Sat, 19 Oct 2013 09:59:11 +0000 (09:59 +0000)]
Do not error out when adding an interface to a group to which it
already belongs or removing it from a group to which it does not
belong.  This makes it possible to include group memberships in
ifconfig_foo0 in rc.conf without fear of breaking "service netif
restart foo0".

MFC after: 3 days

10 years agoAllow ~ in file names so libtool droppings in contrib don't break updates.
des [Sat, 19 Oct 2013 09:40:29 +0000 (09:40 +0000)]
Allow ~ in file names so libtool droppings in contrib don't break updates.
It has happened twice now, and is likely to happen again.

Errata notice candidate.

10 years agoFix build with gcc by spelling unused format string as "unused" instead of NULL.
trasz [Sat, 19 Oct 2013 08:20:00 +0000 (08:20 +0000)]
Fix build with gcc by spelling unused format string as "unused" instead of NULL.

MFC after: 29 days

10 years agoPlug kyua into the 'test' target.
rpaulo [Sat, 19 Oct 2013 06:52:06 +0000 (06:52 +0000)]
Plug kyua into the 'test' target.

If kyua exists in KYUA_PREFIX, the test target is automatically
defined to use it for the execution of test programs.

Submitted by: Julio Merino jmmv google.com
MFC after: 2 weeks

10 years agoPlug atf-run into the 'test' target.
rpaulo [Sat, 19 Oct 2013 06:51:34 +0000 (06:51 +0000)]
Plug atf-run into the 'test' target.

If atf-run exists in ATF_PREFIX and if ALLOW_DEPRECATED_ATF_TOOLS has
been set to yes, the test target is automatically defined to use it
for the execution of test programs.

Submitted by: Julio Merino jmmv google.com
MFC after: 2 weeks

10 years agoAdd the automatic generation of Kyuafile files.
rpaulo [Sat, 19 Oct 2013 06:50:56 +0000 (06:50 +0000)]
Add the automatic generation of Kyuafile files.

These files are generated from bsd.test.mk because kyua is able to run
test programs implemented using different libraries/frameworks.  In
order to make this possible, this change also extends the various
*.test.mk file to explicitly indicate the interface of every test
program.

Submitted by: Julio Merino jmmv google.com
MFC after: 2 weeks

10 years agoAdd the automatic generation of Atffile files.
rpaulo [Sat, 19 Oct 2013 06:50:17 +0000 (06:50 +0000)]
Add the automatic generation of Atffile files.

These are only used by the deprecated atf-run and atf-report tools.
Generating them is easy and provides a mechanism for people to
experiment with these tools if they wish.

But, because these tools and files are deprecated, doing this only
happens if the user has explicitly set ALLOW_DEPRECATED_ATF_TOOLS
to yes.

Submitted by: Julio Merino jmmv google.com
MFC after: 2 weeks

10 years agoClearly split the logic to build ATF and plain tests apart.
rpaulo [Sat, 19 Oct 2013 06:48:49 +0000 (06:48 +0000)]
Clearly split the logic to build ATF and plain tests apart.

This change introduces a new plain.test.mk file that provides the build
infrastructure to build test programs that don't use any framework.
Most of the code previously in bsd.test.mk moves to plain.test.mk and
atf.test.mk is extended with the missing pieces.

In doing so, this change pushes all test program building logic to the
various *.test.mk files instead of trying to reuse some tiny bits.
In fact, this attempt to reuse some definitions makes the code harder
to read and harder to extend.

The clear benefit of this is that the interface of bsd.test.mk is now
clearly delimited.

Submitted by: Julio Merino jmmv google.com
MFC after: 2 weeks

10 years agoCorrects the Kirkwood dreamplug to use
rrs [Sat, 19 Oct 2013 06:47:02 +0000 (06:47 +0000)]
Corrects the Kirkwood dreamplug to use
the right register for power managment. It
was incorrectly using the clock register
which also caused the status to be the
opposite of what it is supposed to be.
1 - its disabled
0 - its enabled

Per kirkwood spec FSS_88F6180_9x_6281_OpenSource.pdf

10 years agoThere's no need to guard pmap_extract(), it won't be called until well after
cognet [Fri, 18 Oct 2013 22:47:10 +0000 (22:47 +0000)]
There's no need to guard pmap_extract(), it won't be called until well after
the VM has been properly initialized.

Spotted out by: alc

10 years agoMFP4: 1136252
brooks [Fri, 18 Oct 2013 20:52:42 +0000 (20:52 +0000)]
MFP4: 1136252

Add an option ATSE_CFI_HACK to allow memory mapped CFI devices to have
their address range allocated sharable so that atse(4) can find it's
Ethernet address in the expected location.

We intend to remove this hack once the BERI platform has a loader.

10 years agoMFP4: 221483, 221567, 221568, 221670, 221677, 221678, 221800, 221801,
brooks [Fri, 18 Oct 2013 20:44:19 +0000 (20:44 +0000)]
MFP4: 221483, 221567, 221568, 221670, 221677, 221678, 221800, 221801,
221804, 221805, 222004, 222006, 222055, 222820, 113507711351181136259

Add atse(4), a driver for the Altera Triple Speed Ethernet MegaCore.

The current driver support gigabit Ethernet speeds only and works with
the MegaCore only in the internal FIFO configuration in the soon to be
open sourced BERI CPU configuration.

Submitted by: bz
MFC after: 3 days
Sponsored by: DARPA/AFRL

10 years agoImprove XHCI stability. When a command timeout happens, the command
hselasky [Fri, 18 Oct 2013 17:38:57 +0000 (17:38 +0000)]
Improve XHCI stability. When a command timeout happens, the command
should be aborted else the command queue can stop. Refer to section
"4.6.1.2" of the XHCI specification.

MFC after: 1 week

10 years agoKERNBASE is unsigned, so we'd better use hs instead of ge.
cognet [Fri, 18 Oct 2013 17:21:47 +0000 (17:21 +0000)]
KERNBASE is unsigned, so we'd better use hs instead of ge.

Pointy hat to: cognet
Suggested by: ian

10 years agoRemove redundant redeclaration of gdtset in sys/xen/xen-os.h, to silence
dim [Fri, 18 Oct 2013 17:06:13 +0000 (17:06 +0000)]
Remove redundant redeclaration of gdtset in sys/xen/xen-os.h, to silence
a gcc warning.

Approved by: re (glebius)

10 years agoMFP4:
brooks [Fri, 18 Oct 2013 15:40:37 +0000 (15:40 +0000)]
MFP4:
Change 227630 by bz@bz_zenith on 2013/04/12 08:50:27

Implement soft reset setting sr in sr and just in case loop
endlessly afterwards.

MFC after: 3 days
Sponsored by: DARPA/AFRL

10 years agoMFP4 (driver change only):
brooks [Fri, 18 Oct 2013 15:27:11 +0000 (15:27 +0000)]
MFP4 (driver change only):
Change 231100 by brooks@brooks_zenith on 2013/07/12 21:01:31

Add a new option ALTERA_SDCARD_FAST_SIM which checks immediatly
for success of I/O operations rather than queuing a task.

MFC after: 3 days
Sponsored by: DARPA/AFRL

10 years agoMFP4:
brooks [Fri, 18 Oct 2013 15:24:18 +0000 (15:24 +0000)]
MFP4:
Change 227594 by brooks@brooks_zenith on 2013/04/11 17:10:14

When we fail, print the error that occured if we are giving
up or if bootverbose is set.

MFC after: 3 days
Sponsored by: DARPA/AFRL

10 years agosh: Remove one syscall when waiting for a foreground job.
jilles [Fri, 18 Oct 2013 12:35:12 +0000 (12:35 +0000)]
sh: Remove one syscall when waiting for a foreground job.

The getpgrp() call is unnecessary: if there is no job control then the
result was not used at all and if there is job control then we are not a
subshell and our process group ID is equal to our process ID (rootpid).

10 years agoRevert r256587.
glebius [Fri, 18 Oct 2013 11:26:40 +0000 (11:26 +0000)]
Revert r256587.

Requested by: zec

10 years agoRevert r256587.
glebius [Fri, 18 Oct 2013 11:25:08 +0000 (11:25 +0000)]
Revert r256587.

Requested by: zec

10 years agoDon't build krping.ko, iw_cxgb.ko, and iw_cxgbe.ko, if MK_OFED=no
trasz [Fri, 18 Oct 2013 09:17:35 +0000 (09:17 +0000)]
Don't build krping.ko, iw_cxgb.ko, and iw_cxgbe.ko, if MK_OFED=no
(the default).  They build, but are unloadable, due to missing ibcore.ko.

Sponsored by: FreeBSD Foundation

10 years agoMake geom_label(4) resize-aware. This fixes a situation when "gpart resize"
trasz [Fri, 18 Oct 2013 09:14:19 +0000 (09:14 +0000)]
Make geom_label(4) resize-aware.  This fixes a situation when "gpart resize"
would resize a partition, but label providers - e.g. /dev/gptid/XXX - would
stay the same size.

Reviewed by: mav
MFC after: 1 month
Sponsored by: FreeBSD Foundation

10 years agoCorrect tx mixer gain value for RT3070 and RT3071.
kevlo [Fri, 18 Oct 2013 07:48:20 +0000 (07:48 +0000)]
Correct tx mixer gain value for RT3070 and RT3071.

Correctly value in EEPROM/EFUSE is one or more for RT3070 and
two or more for other RT3071 chips.

10 years agoSince the DAC issue has been fixed in RT3070(F), the voltage raising fix
kevlo [Fri, 18 Oct 2013 07:46:28 +0000 (07:46 +0000)]
Since the DAC issue has been fixed in RT3070(F), the voltage raising fix
is no longer needed.

10 years agoFix lower bits of RF_R3 for RT3370 and newer. This change doesn't affect
kevlo [Fri, 18 Oct 2013 07:43:49 +0000 (07:43 +0000)]
Fix lower bits of RF_R3 for RT3370 and newer.  This change doesn't affect
older chipsets.