]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoPull in r203311 from upstream llvm trunk (by Arnold Schwaighofer):
dim [Tue, 18 Mar 2014 19:35:26 +0000 (19:35 +0000)]
Pull in r203311 from upstream llvm trunk (by Arnold Schwaighofer):

  ISel: Make VSELECT selection terminate in cases where the condition type has to
  be split and the result type widened.

  When the condition of a vselect has to be split it makes no sense widening the
  vselect and thereby widening the condition. We end up in an endless loop of
  widening (vselect result type) and splitting (condition mask type) doing this.
  Instead, split both the condition and the vselect and widen the result.

  I ran this over the test suite with i686 and mattr=+sse and saw no regressions.

  Fixes PR18036.

With this fix the original problem case from the graphics/rawtherapee
port (posted in http://llvm.org/PR18036 ) now compiles within ~97MB RSS.

Reported by: mandree
MFC after: 1 week

10 years agoPull in r196939 from upstream llvm trunk (by Reid Kleckner):
dim [Tue, 18 Mar 2014 19:23:41 +0000 (19:23 +0000)]
Pull in r196939 from upstream llvm trunk (by Reid Kleckner):

  Reland "Fix miscompile of MS inline assembly with stack realignment"

  This re-lands commit r196876, which was reverted in r196879.

  The tests have been fixed to pass on platforms with a stack alignment
  larger than 4.

  Update to clang side tests will land shortly.

Pull in r196986 from upstream llvm trunk (by Reid Kleckner):

  Revert the backend fatal error from r196939

  The combination of inline asm, stack realignment, and dynamic allocas
  turns out to be too common to reject out of hand.

  ASan inserts empy inline asm fragments and uses aligned allocas.
  Compiling any trivial function containing a dynamic alloca with ASan is
  enough to trigger the check.

  XFAIL the test cases that would be miscompiled and add one that uses the
  relevant functionality.

Pull in r202930 from upstream llvm trunk (by Hans Wennborg):

  Check for dynamic allocas and inline asm that clobbers sp before building
  selection dag (PR19012)

  In X86SelectionDagInfo::EmitTargetCodeForMemcpy we check with MachineFrameInfo
  to make sure that ESI isn't used as a base pointer register before we choose to
  emit rep movs (which clobbers esi).

  The problem is that MachineFrameInfo wouldn't know about dynamic allocas or
  inline asm that clobbers the stack pointer until SelectionDAGBuilder has
  encountered them.

  This patch fixes the problem by checking for such things when building the
  FunctionLoweringInfo.

  Differential Revision: http://llvm-reviews.chandlerc.com/D2954

Together, these commits fix the problem encountered in the devel/emacs
port on the i386 architecture, where a combination of stack realignment,
alloca() and memcpy() could incidentally clobber the %esi register,
leading to segfaults in the temacs build-time utility.

See also: http://llvm.org/PR18171 and http://llvm.org/PR19012

Reported by: ashish
PR: ports/183064
MFC after: 1 week

10 years agonvme: Allocate all MSI resources up front so that we can fall back to
jimharris [Tue, 18 Mar 2014 18:10:35 +0000 (18:10 +0000)]
nvme: Allocate all MSI resources up front so that we can fall back to
INTx if necessary.

Sponsored by: Intel
MFC after: 3 days

10 years agonvme: Close hole where nvd(4) would not be notified of all nvme(4)
jimharris [Tue, 18 Mar 2014 18:09:08 +0000 (18:09 +0000)]
nvme: Close hole where nvd(4) would not be notified of all nvme(4)
instances if modules loaded during boot.

Sponsored by: Intel
MFC after: 3 days

10 years agoSwitch to standard 2-clause license
emaste [Tue, 18 Mar 2014 17:00:32 +0000 (17:00 +0000)]
Switch to standard 2-clause license

Approved by: hps@
Sponsored by: The FreeBSD Foundation

10 years agoAdd support for the PCI(e)-PCI bridges to the Intel VT-d driver. The
kib [Tue, 18 Mar 2014 16:41:32 +0000 (16:41 +0000)]
Add support for the PCI(e)-PCI bridges to the Intel VT-d driver.  The
bridge takes ownership of the transaction, so bsf of the requester is
the bridge and not a device behind it.  As result, code needs to walk
the hierarchy up to use correct context.

Note that PCIe->PCI-X bridges are not handled quite correctly since
such bridges are allowed to only take ownership of some transactions.
Also, weird but unrealistic cases of PCIe behind PCI bus are also not
handled.

Still, the patch provides significant step forward for the bridge
handling.

Submitted by: Jason Harmening <jason.harmening@gmail.com>
MFC after: 1 week

10 years agoIt is not uncommon for BIOSes to report wrong RMRR entries in DMAR
kib [Tue, 18 Mar 2014 16:20:33 +0000 (16:20 +0000)]
It is not uncommon for BIOSes to report wrong RMRR entries in DMAR
table.  Among them, some (old AMI ?) BIOSes report entries with range
like (bf7ec000bf7ebfff).  Attempts to ignore the bogus entries
result in faults, so the range must be covered somehow.

Provide a workaround by identity mapping the 32 pages after the bogus
entry start, which seems to be enough for the reported BIOS.

Reported and tested by: Jason Harmening <jason.harmening@gmail.com>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoTrim at EOL.
kib [Tue, 18 Mar 2014 15:59:06 +0000 (15:59 +0000)]
Trim at EOL.

MFC after: 3 days

10 years agoUpdate nvme(4) and nvd(4) man pages to clarify the differences between
jimharris [Tue, 18 Mar 2014 15:43:42 +0000 (15:43 +0000)]
Update nvme(4) and nvd(4) man pages to clarify the differences between
their respective device nodes.

Sponsored by: Intel
MFC after: 3 days

10 years agofix mbuf leak if it does not fit in software queue
gnn [Tue, 18 Mar 2014 15:01:32 +0000 (15:01 +0000)]
fix mbuf leak if it does not fit in software queue

mbuf should be owned by if_transmit function in any case.

Submitted-by: Andrew Rybchenko <Andrew.Rybchenko at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.

10 years agoIn kernel config files, it is supposed to be 'options<space><tab>' not
imp [Tue, 18 Mar 2014 14:41:18 +0000 (14:41 +0000)]
In kernel config files, it is supposed to be 'options<space><tab>' not
'options<tab><tab>', per long standing (but recently not so strictly
enforced) convention.

10 years agoUse standard FreeBSD license disclaimer
emaste [Tue, 18 Mar 2014 13:47:27 +0000 (13:47 +0000)]
Use standard FreeBSD license disclaimer

The original was accidentally copied from a NetBSD Foundation copyright
block.

Sponsored by: The FreeBSD Foundation

10 years agoReturn error when packet is dropped because of link down.
glebius [Tue, 18 Mar 2014 12:50:22 +0000 (12:50 +0000)]
Return error when packet is dropped because of link down.

Submitted-by: Boris Misenov <Boris.Misenov@oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.

10 years agoExtend the Atheros SoC support to include a method to enable/disable
adrian [Tue, 18 Mar 2014 12:19:39 +0000 (12:19 +0000)]
Extend the Atheros SoC support to include a method to enable/disable
the NAND flash controller.

Add the AR934x NAND flash controller reset routines.
(It's different on subsequent SoCs.)

Tested:

* AR9344, Atheros DB120 reference platform

Obtained from: OpenWRT

10 years agoAdd the AR934x NAND flash controller register definitions.
adrian [Tue, 18 Mar 2014 12:18:35 +0000 (12:18 +0000)]
Add the AR934x NAND flash controller register definitions.

Obtained from: OpenWRT

10 years agoAdd missing usfs manual page.
hselasky [Tue, 18 Mar 2014 07:06:31 +0000 (07:06 +0000)]
Add missing usfs manual page.

Suggested by: Sascha Wildner <swildner@gmail.com>
MFC after: 1 week

10 years agoAdd missing umoscom manual page.
hselasky [Tue, 18 Mar 2014 06:52:11 +0000 (06:52 +0000)]
Add missing umoscom manual page.

Suggested by: Sascha Wildner <swildner@gmail.com>
MFC after: 1 week

10 years agoCorrectly name USB template manual page and install it by default.
hselasky [Tue, 18 Mar 2014 06:43:21 +0000 (06:43 +0000)]
Correctly name USB template manual page and install it by default.

Suggested by: Sascha Wildner <swildner@gmail.com>
MFC after: 1 week

10 years agoUpdate USB template manual page.
hselasky [Tue, 18 Mar 2014 06:41:17 +0000 (06:41 +0000)]
Update USB template manual page.

MFC after: 1 week

10 years agoWhen a vcpu is deactivated it must also unblock any rendezvous that may be
neel [Tue, 18 Mar 2014 02:49:28 +0000 (02:49 +0000)]
When a vcpu is deactivated it must also unblock any rendezvous that may be
blocked on it.

This is done by issuing a wakeup after clearing the 'vcpuid' from 'active_cpus'.
Also, use CPU_CLR_ATOMIC() to guarantee visibility of the updated 'active_cpus'
across all host cpus.

10 years agoUpdate NetBSD Foundation copyrights to 2-clause BSD
emaste [Tue, 18 Mar 2014 01:40:25 +0000 (01:40 +0000)]
Update NetBSD Foundation copyrights to 2-clause BSD

The NetBSD Foundation states "Third parties are encouraged to change the
license on any files which have a 4-clause license contributed to the
NetBSD Foundation to a 2-clause license."

This change removes clauses 3 and 4 from copyright / license blocks that
list The NetBSD Foundation as the only copyright holder.

Sponsored by: The FreeBSD Foundation

10 years agoRemove comment meant for removal in r263287
bdrewery [Tue, 18 Mar 2014 01:17:08 +0000 (01:17 +0000)]
Remove comment meant for removal in r263287

X-MFC-with: 263287

10 years ago'pkg(8) add' has no internal restriction on number of packages.
bdrewery [Tue, 18 Mar 2014 01:14:49 +0000 (01:14 +0000)]
'pkg(8) add' has no internal restriction on number of packages.

Submitted by: tj
MFC after: 1 week

10 years agoNotify vcpus participating in the rendezvous of the pending event to ensure
neel [Mon, 17 Mar 2014 23:30:38 +0000 (23:30 +0000)]
Notify vcpus participating in the rendezvous of the pending event to ensure
that they execute the rendezvous function as soon as possible.

10 years agoImplement apb_print_child().
adrian [Mon, 17 Mar 2014 23:21:31 +0000 (23:21 +0000)]
Implement apb_print_child().

Tested:

* AR9344, Atheros DB120 Reference board

10 years agonvme: NVMe specification dictates 4-byte alignment for PRPs (not 8).
jimharris [Mon, 17 Mar 2014 22:37:17 +0000 (22:37 +0000)]
nvme:  NVMe specification dictates 4-byte alignment for PRPs (not 8).

Sponsored by: Intel
MFC after: 3 days

10 years agonvme: Remove the software progress marker SET_FEATURE command during
jimharris [Mon, 17 Mar 2014 22:36:04 +0000 (22:36 +0000)]
nvme: Remove the software progress marker SET_FEATURE command during
controller initialization.

The spec says OS drivers should send this command after controller
initialization completes successfully, but other NVMe OS drivers are
not sending this command.  This change will therefore reduce differences
between the FreeBSD and other OS drivers.

Sponsored by: Intel
MFC after: 3 days

10 years agoBase the max number of SG elements on MAXPHYS.
jimharris [Mon, 17 Mar 2014 22:32:54 +0000 (22:32 +0000)]
Base the max number of SG elements on MAXPHYS.

Sponsored by: Intel
Discussed with: scottl, emax
MFC after: 3 days

10 years agoisci: Ensure ATA passthrough commands with RETURN_RESPONSE bit set
jimharris [Mon, 17 Mar 2014 22:30:54 +0000 (22:30 +0000)]
isci: Ensure ATA passthrough commands with RETURN_RESPONSE bit set
translate their response.

Sponsored by: Intel
Discussed with: scottl
MFC after: 3 days

10 years agoshare/man/man9/counter.9
asomers [Mon, 17 Mar 2014 19:55:27 +0000 (19:55 +0000)]
share/man/man9/counter.9
Fix logic error in the description of counter_u64_alloc: the command
may fail only if M_NOWAIT is specified, not M_WAITOK.

Reviewed by: glebius
MFC after: 2 weeks
Sponsored by: Spectra Logic Corporation

10 years agoxen: fix usage of db_active in xen console
royger [Mon, 17 Mar 2014 16:45:28 +0000 (16:45 +0000)]
xen: fix usage of db_active in xen console

Replace usage of db_active in Xen console with kdb_active.

Reported by: Andrzej Tobola <ato@iem.pw.edu.pl>
Approved by: gibbs
Sponsored by: Citrix Systems R&D

10 years agoCosmetic changes to printed output, mostly related to probing devices...
ian [Mon, 17 Mar 2014 16:10:42 +0000 (16:10 +0000)]
Cosmetic changes to printed output, mostly related to probing devices...

 - Display slice and partition as <auto> instead of 0 or -1 when they're
   not set to specific values (the paritition=-1 was confusing folks).
 - When loaderdev isn't set in the u-boot environment, say so rather
   than displaying unknown device ''.
 - Print the loader(8) ident/version info earlier, so that all device-
   related info appears together afterwards.

The one change here that isn't purely cosmetic is to call setheap()
earlier.  The comment says "Initialise heap as early as possible", now
that's more accurate.  It shouldn't make any functional difference, but
may be safer if future changes lead to trying to allocate memory earlier.

10 years agoLine-wrapping tweak: make the sample jail command line fit in 80 characters.
rwatson [Mon, 17 Mar 2014 14:19:42 +0000 (14:19 +0000)]
Line-wrapping tweak: make the sample jail command line fit in 80 characters.

MFC after: 3 days

10 years agoFix the paren nesting so that the network device is probed if the load
ian [Mon, 17 Mar 2014 13:54:53 +0000 (13:54 +0000)]
Fix the paren nesting so that the network device is probed if the load
device type is either network or wildcard.

10 years agoMake talk(1) capable of displaying UTF-8 characters.
glebius [Mon, 17 Mar 2014 11:58:48 +0000 (11:58 +0000)]
Make talk(1) capable of displaying UTF-8 characters.

Sponsored by: Nginx, Inc.

10 years agoFix spelling.
hselasky [Mon, 17 Mar 2014 07:19:19 +0000 (07:19 +0000)]
Fix spelling.

Reported by: Kevin P. Neal <kpneal@pobox.com>

10 years agoAdd Tx/Rx multiqueue support to vmx(4)
bryanv [Mon, 17 Mar 2014 05:45:29 +0000 (05:45 +0000)]
Add Tx/Rx multiqueue support to vmx(4)

As a prerequisite for multiple queues, the guest must have MSIX enabled.
Unfortunately, to work around device passthrough bugs, FreeBSD disables
MSIX when running as a VMWare guest due to the hw.pci.honor_msi_blacklist
tunable; this tunable must be disabled for multiple queues.

Also included is various minor changes from the projects/vmxnet branch.

MFC after: 1 month

10 years agoIn intr_event_handle() we already save and set td_intr_frame, so
marcel [Mon, 17 Mar 2014 04:38:10 +0000 (04:38 +0000)]
In intr_event_handle() we already save and set td_intr_frame, so
don't do it also in ia64_handle_intr(). With ia64_handle_intr()
not saving and setting td_intr_frame, make sure to do it for
timer interrupts in ia64_ih_hardclock().

10 years agoMove the implementation of kdb_cpu_trap() from <machine/kdb.h> to
marcel [Sun, 16 Mar 2014 22:56:22 +0000 (22:56 +0000)]
Move the implementation of kdb_cpu_trap() from <machine/kdb.h> to
machdep.c. This makes it easier to add conditional code based on
options.

10 years agoDon't use the ITC as the faulting address for external interrupts.
marcel [Sun, 16 Mar 2014 21:57:05 +0000 (21:57 +0000)]
Don't use the ITC as the faulting address for external interrupts.
We only use it for tracing and the KTR infrastructure will use ITC
for the time-stamp.

10 years agoFix a comment in capability.h: it got renamed to capsicum.h, not
rwatson [Sun, 16 Mar 2014 21:05:00 +0000 (21:05 +0000)]
Fix a comment in capability.h: it got renamed to capsicum.h, not
capability.h.

MFC after: 3 weeks
Spotted by: alc, mcdouga9 at egr.msu.edu, thompsa

10 years agoUse armv7 TLB flush code, not arm11, for cortex-a processors.
ian [Sun, 16 Mar 2014 20:39:39 +0000 (20:39 +0000)]
Use armv7 TLB flush code, not arm11, for cortex-a processors.

The armv7 architecture uses a unified TLB model for maintenence ops even
if separate instruction and data TLBs are implemented in hardware.  That
means that there's no distinction between the 'I' and 'D' flavors of flush,
they all use the same 'ID' implementation.  On the other hand, there is a
difference between SMP and UP on armv7, but not on arm11, so use the armv7
routines for cortex-a processors.

10 years agoUse the same terminology as the ARM docs in comments. No functional changes.
ian [Sun, 16 Mar 2014 20:34:45 +0000 (20:34 +0000)]
Use the same terminology as the ARM docs in comments. No functional changes.

10 years agoAdd more obsolete files
antoine [Sun, 16 Mar 2014 20:31:05 +0000 (20:31 +0000)]
Add more obsolete files

10 years agoIn intr_event_handle() we already save and set td_intr_frame, so
marcel [Sun, 16 Mar 2014 20:21:40 +0000 (20:21 +0000)]
In intr_event_handle() we already save and set td_intr_frame, so
don't do it also in ia64_handle_intr(). With ia64_handle_intr()
not saving and setting td_intr_frame, make sure to do it for
clock interrupts in ia64_ih_clock().

10 years agoAlign all comments in config files on same column. This consistency
imp [Sun, 16 Mar 2014 15:22:52 +0000 (15:22 +0000)]
Align all comments in config files on same column. This consistency
helps when bits and pieces of GENERIC from i386 or amd64 are cut and
pasted into other architecture's config files (which in the case of
ARM had gotten rather akimbo).

10 years agoMake all the comments '# ' and align to same column. This fixes the
imp [Sun, 16 Mar 2014 15:22:46 +0000 (15:22 +0000)]
Make all the comments '# ' and align to same column. This fixes the
rampently incosnsitent usage which made cut and paste from one file
to another look ugly.

10 years agofind: When performing -quit, finish pending -exec ... + command lines.
jilles [Sun, 16 Mar 2014 14:42:58 +0000 (14:42 +0000)]
find: When performing -quit, finish pending -exec ... + command lines.

This avoids unexpected partial processing when a find command uses both
-quit and -exec ... +.

GNU find does the same.

MFC after: 1 week

10 years agoRemove an extra 1 in an #if line
andrew [Sun, 16 Mar 2014 14:21:09 +0000 (14:21 +0000)]
Remove an extra 1 in an #if line

Reported by: ian@

10 years agoFix the spelling of function.
andrew [Sun, 16 Mar 2014 14:19:46 +0000 (14:19 +0000)]
Fix the spelling of function.

Reported by: ian@

10 years agoFix statically-linked build (WITHOUT_DYNAMICROOT).
jilles [Sun, 16 Mar 2014 13:43:06 +0000 (13:43 +0000)]
Fix statically-linked build (WITHOUT_DYNAMICROOT).

10 years agoAdd an optimised version of the float and double helper functions. These
andrew [Sun, 16 Mar 2014 13:16:30 +0000 (13:16 +0000)]
Add an optimised version of the float and double helper functions. These
are only used on armv6 when the vfp unit is detected. They will also be
available for the upcoming armv6hf platform, however while not used by
default there will need to be defined for any software that calls them
directly.

10 years agoThough there currently isn't a way to insert new media into an ATAPI
tychon [Sun, 16 Mar 2014 12:33:40 +0000 (12:33 +0000)]
Though there currently isn't a way to insert new media into an ATAPI
drive, at least pretend to support Asynchronous Notification (AN) to
avoid a guest needlessly polling for it.

Approved by: grehan (co-mentor)

10 years ago* Provide information in error causes in ASCII instead of
tuexen [Sun, 16 Mar 2014 12:32:16 +0000 (12:32 +0000)]
* Provide information in error causes in ASCII instead of
  proprietary binary format.
* Add support for a diagnostic information error cause.
  The code is sysctlable and the default is 0, which
  means it is not sent.

This is joint work with rrs@.

MFC after: 1 week

10 years agoSupport the bootloader's single 16-bit 'outw' access to the Divisor
tychon [Sun, 16 Mar 2014 12:31:28 +0000 (12:31 +0000)]
Support the bootloader's single 16-bit 'outw' access to the Divisor
Latch MSB and LSB registers.

Approved by: neel (co-mentor)

10 years agoBump __FreeBSD_version to reflect capability.h -> capsicum.h change.
rwatson [Sun, 16 Mar 2014 11:06:05 +0000 (11:06 +0000)]
Bump __FreeBSD_version to reflect capability.h -> capsicum.h change.

MFC after: 3 weeks

10 years agoUpdate most userspace consumers of capability.h to use capsicum.h instead.
rwatson [Sun, 16 Mar 2014 11:04:44 +0000 (11:04 +0000)]
Update most userspace consumers of capability.h to use capsicum.h instead.

auditdistd is not updated as I will make the change upstream and then do a
vendor import sometime in the next week or two.

MFC after: 3 weeks

10 years agoUpdate kernel inclusions of capability.h to use capsicum.h instead; some
rwatson [Sun, 16 Mar 2014 10:55:57 +0000 (10:55 +0000)]
Update kernel inclusions of capability.h to use capsicum.h instead; some
further refinement is required as some device drivers intended to be
portable over FreeBSD versions rely on __FreeBSD_version to decide whether
to include capability.h.

MFC after: 3 weeks

10 years agoRename capability.h to capsicum.h: the original name conflicts with the
rwatson [Sun, 16 Mar 2014 10:49:16 +0000 (10:49 +0000)]
Rename capability.h to capsicum.h: the original name conflicts with the
draft POSIX.1e capability.h used on some systems (e.g., Linux).  On
FreeBSD, leave a wrapper header so that current code continues to compile.

We will eventually want to deprecate the old header as the presence of a
capability.h may be confusing some configure scripts.

Suggested by: David Drysdale <drysdale at google.com>
Discussed on: cl-capsicum-discuss
MFC after: 3 weeks

10 years agoOnly build the vfp/softfp switching code on armv6 as we don't support vfp
andrew [Sun, 16 Mar 2014 09:40:05 +0000 (09:40 +0000)]
Only build the vfp/softfp switching code on armv6 as we don't support vfp
on anything earlier than this. This should fix the armeb and arm builds
when using gcc.

10 years agoBuild fenv-vfp.c with the softfp float abi. Without this gcc generates an
andrew [Sun, 16 Mar 2014 09:38:43 +0000 (09:38 +0000)]
Build fenv-vfp.c with the softfp float abi. Without this gcc generates an
incorrect assembly file that doesn't allow for vfp instructions.

10 years agoThe AR71xx has APB interrupts in the MISC registers from 0-7, later
adrian [Sun, 16 Mar 2014 08:39:46 +0000 (08:39 +0000)]
The AR71xx has APB interrupts in the MISC registers from 0-7, later
chips have more.

So for now, let's allow more.  We should teach the apb code to just
reject interrupts that lie outside what the chip can do at runtime.

10 years ago* Handle the three other timer interrupts for now, from the AR724x
adrian [Sun, 16 Mar 2014 08:38:31 +0000 (08:38 +0000)]
* Handle the three other timer interrupts for now, from the AR724x
  later.  If the interrupts are ACKed even if they're not masked, we get
  the interrupts again later.  Grr.

* The AR724x and later chips want the interrupt bits cleared by writing the
  relevant bit to it, NOT by writing all but the current interrupt to it.

Tested:

* AR9344, DB120 reference board

TODO:

* Test ar724x and later chips to ensure no regressions have occured.

10 years agoMigrate most of tools/regression/usr.bin/ to the new tests layout.
jmmv [Sun, 16 Mar 2014 08:04:06 +0000 (08:04 +0000)]
Migrate most of tools/regression/usr.bin/ to the new tests layout.

I'm starting with the easy cases.  The leftovers need to be looked at a
bit more closely.

Note that this change _does_ modify the code of the old tests.  This is
required in order to allow the code to locate the data files in the
source directory instead of the current directory, because Kyua
automatically changes the latter to a temporary directory.

Also note that at least one test is known to be broken here.  Actually,
the test is not really broken: it's marked as a TODO but unfortunately
Kyua's TAP parser currently does not understand that.  Will have to be
fixed separately.

10 years agoMigrate tools/regression/{usr.bin/lastcomm,usr.sbin}/ to the new tests layout.
jmmv [Sun, 16 Mar 2014 04:09:22 +0000 (04:09 +0000)]
Migrate tools/regression/{usr.bin/lastcomm,usr.sbin}/ to the new tests layout.

This change was originally going to only migrate the usr.sbin tests but, as
it turns out, the usr.sbin/sa/ tests require files from usr.bin/lastcomm/
so it's better to just also migrate the latter at the same time.  The other
usr.bin tests will be moved separately.

To make these tests work within the test suite, some of them have required
changes to prevent modifying the source directory and instead just rely on
the current directory for file manipulation.

10 years agoHandle the case where both arge0 and arge1 MAC addresses are available via
adrian [Sun, 16 Mar 2014 02:41:47 +0000 (02:41 +0000)]
Handle the case where both arge0 and arge1 MAC addresses are available via
'eeprommac'.

The existing driver would just make arge units past 0 take the primary
MAC and increment it by the unit number, without correct address wrapping.
That has to be fixed at a later date.

Tested:

* Atheros DB120 reference obard

10 years ago* Add ethernet MAC configuration from the EEPROM for arge0/arge1
adrian [Sun, 16 Mar 2014 02:34:33 +0000 (02:34 +0000)]
* Add ethernet MAC configuration from the EEPROM for arge0/arge1
* The AR9344 switch has 5 ports in use, not four.

Tested:

* DB120 reference board

10 years agoAdd Makefile missed in r263220.
jmmv [Sun, 16 Mar 2014 02:32:44 +0000 (02:32 +0000)]
Add Makefile missed in r263220.

10 years agoChange etcupdate tests to return 1 on test failures.
jmmv [Sun, 16 Mar 2014 02:27:27 +0000 (02:27 +0000)]
Change etcupdate tests to return 1 on test failures.

This is a prerequisite for hooking these tests into the test suite.  And,
fortunately, all tests seem to pass!

10 years agoMigrate tools/regression/sbin/ to the new tests layout.
jmmv [Sun, 16 Mar 2014 02:07:08 +0000 (02:07 +0000)]
Migrate tools/regression/sbin/ to the new tests layout.

Pretty much all that this change does is shuffles the code around and hooks
it into the regular build.  The code of the old tests has not changed.

10 years agoI clearly didn't test the modules... add sha256c.c to the various
jmg [Sun, 16 Mar 2014 01:55:30 +0000 (01:55 +0000)]
I clearly didn't test the modules...  add sha256c.c to the various
modules that included sha2.c...

10 years agoreplace the kernel's version w/ cperciva's implementation... In all
jmg [Sun, 16 Mar 2014 01:43:23 +0000 (01:43 +0000)]
replace the kernel's version w/ cperciva's implementation...  In all
my tests, it is faster ~20%, even on an old IXP425 533MHz it is ~45%
faster...  This is partly due to loop unrolling, so the code size does
significantly increase...  I do plan on committing a version that
rolls up the loops again for smaller code size for embedded systems
where size is more important than absolute performance (it'll save ~6k
code)...

The kernel implementation is now shared w/ userland's libcrypt and
libmd...

We drop support for sha256 from sha2.c, so now sha2.c only contains
sha384 and sha512...

Reviewed by: secteam@

10 years agoDocument support for TAP-compliant Perl test programs.
jmmv [Sun, 16 Mar 2014 01:22:23 +0000 (01:22 +0000)]
Document support for TAP-compliant Perl test programs.

10 years agoXref pthread_cancel...
jmg [Sun, 16 Mar 2014 01:17:09 +0000 (01:17 +0000)]
Xref pthread_cancel...

bump Dd, _exit was still dated 1996!  yes, it has been modified a few
times since then...

MFC after: 1 week

10 years agocopy these files from lib/libmd in preperation for moving these files
jmg [Sun, 16 Mar 2014 00:57:26 +0000 (00:57 +0000)]
copy these files from lib/libmd in preperation for moving these files
into the kernel...

10 years agochange td_retval into a union w/ off_t, with defines to mask the
jmg [Sun, 16 Mar 2014 00:53:40 +0000 (00:53 +0000)]
change td_retval into a union w/ off_t, with defines to mask the
change...  This eliminates a cast, and also forces td_retval
(often 2 32-bit registers) to be aligned so that off_t's can be
stored there on arches with strict alignment requirements like
armeb (AVILA)...  On i386, this doesn't change alignment, and on
amd64 it doesn't either, as register_t is already 64bits...

This will also prevent future breakage due to people adding additional
fields to the struct...

This gets AVILA booting a bit farther...

Reviewed by: bde

10 years agoFix a race wherein the source of an interrupt vector is wrongly
tychon [Sat, 15 Mar 2014 23:09:34 +0000 (23:09 +0000)]
Fix a race wherein the source of an interrupt vector is wrongly
attributed if an ExtINT arrives during interrupt injection.

Also, fix a spurious interrupt if the PIC tries to raise an interrupt
before the outstanding one is accepted.

Finally, improve the PIC interrupt latency when another interrupt is
raised immediately after the outstanding one is accepted by creating a
vmexit rather than waiting for one to occur by happenstance.

Approved by: neel (co-mentor)

10 years agoOn armv6 access both the softfloat and, when available, the vfp to get and
andrew [Sat, 15 Mar 2014 21:58:07 +0000 (21:58 +0000)]
On armv6 access both the softfloat and, when available, the vfp to get and
set the floating-point environment.

10 years agoFix wandboard to include tmpfs, mbr and bsd labels.
imp [Sat, 15 Mar 2014 16:59:57 +0000 (16:59 +0000)]
Fix wandboard to include tmpfs, mbr and bsd labels.

PR: 187606
Submitted by: Takanori Sawada

10 years agosh: Allow kill %job on jobs started without job control.
jilles [Sat, 15 Mar 2014 14:58:48 +0000 (14:58 +0000)]
sh: Allow kill %job on jobs started without job control.

When killing a %job started without job control, kill all processes in it.
As with process groups and zombies, if any process in the job can be killed
or has already terminated, the command is successful.

This also fixes occasional failures of the builtins/kill1.0 test.

10 years agoAdd some documentation for bsd.test.mk.
jmmv [Sat, 15 Mar 2014 09:27:59 +0000 (09:27 +0000)]
Add some documentation for bsd.test.mk.

10 years agoGarbage collect long time obsoleted (or never used) stuff from routing API.
glebius [Sat, 15 Mar 2014 06:49:32 +0000 (06:49 +0000)]
Garbage collect long time obsoleted (or never used) stuff from routing API.

10 years agoBe a little more verbose in service's error message
eadler [Sat, 15 Mar 2014 02:26:46 +0000 (02:26 +0000)]
Be a little more verbose in service's error message

PR: bin/187118
Submitted by: culot

10 years agoUse the system queue.h instead of bundling its own.
eadler [Sat, 15 Mar 2014 01:20:42 +0000 (01:20 +0000)]
Use the system queue.h instead of bundling its own.

PR: bin/187067
Submitted by: lulf

10 years agoRevert a small portion of r263198 left over from local testing: don't
rwatson [Sat, 15 Mar 2014 00:59:23 +0000 (00:59 +0000)]
Revert a small portion of r263198 left over from local testing: don't
enable PCB groups and RSS by default [yet].

10 years agoFix cut-and-paste error message.
imp [Sat, 15 Mar 2014 00:58:08 +0000 (00:58 +0000)]
Fix cut-and-paste error message.

10 years agoSeveral years after initial development, merge prototype support for
rwatson [Sat, 15 Mar 2014 00:57:50 +0000 (00:57 +0000)]
Several years after initial development, merge prototype support for
linking NIC Receive Side Scaling (RSS) to the network stack's
connection-group implementation.  This prototype (and derived patches)
are in use at Juniper and several other FreeBSD-using companies, so
despite some reservations about its maturity, merge the patch to the
base tree so that it can be iteratively refined in collaboration rather
than maintained as a set of gradually diverging patch sets.

(1) Merge a software implementation of the Toeplitz hash specified in
    RSS implemented by David Malone.  This is used to allow suitable
    pcbgroup placement of connections before the first packet is
    received from the NIC.  Software hashing is generally avoided,
    however, due to high cost of the hash on general-purpose CPUs.

(2) In in_rss.c, maintain authoritative versions of RSS state intended
    to be pushed to each NIC, including keying material, hash
    algorithm/ configuration, and buckets.  Provide software-facing
    interfaces to hash 2- and 4-tuples for IPv4 and IPv6 using both
    the RSS standardised Toeplitz and a 'naive' variation with a hash
    efficient in software but with poor distribution properties.
    Implement rss_m2cpuid()to be used by netisr and other load
    balancing code to look up the CPU on which an mbuf should be
    processed.

(3) In the Ethernet link layer, allow netisr distribution using RSS as
    a source of policy as an alternative to source ordering; continue
    to default to direct dispatch (i.e., don't try and requeue packets
    for processing on the 'right' CPU if they arrive in a directly
    dispatchable context).

(4) Allow RSS to control tuning of connection groups in order to align
    groups with RSS buckets.  If a packet arrives on a protocol using
    connection groups, and contains a suitable hardware-generated
    hash, use that hash value to select the connection group for pcb
    lookup for both IPv4 and IPv6.  If no hardware-generated Toeplitz
    hash is available, we fall back on regular PCB lookup risking
    contention rather than pay the cost of Toeplitz in software --
    this is a less scalable but, at my last measurement, faster
    approach.  As core counts go up, we may want to revise this
    strategy despite CPU overhead.

Where device drivers suitably configure NICs, and connection groups /
RSS are enabled, this should avoid both lock and line contention during
connection lookup for TCP.  This commit does not modify any device
drivers to tune device RSS configuration to the global RSS
configuration; patches are in circulation to do this for at least
Chelsio T3 and Intel 1G/10G drivers.  Currently, the KPI for device
drivers is not particularly robust, nor aware of more advanced features
such as runtime reconfiguration/rebalancing.  This will hopefully prove
a useful starting point for refinement.

No MFC is scheduled as we will first want to nail down a more mature
and maintainable KPI/KBI for device drivers.

Sponsored by:   Juniper Networks (original work)
Sponsored by:   EMC/Isilon (patch update and merge)

10 years agoDon't dump entries that were modified during the time the KTR buffer was being
neel [Fri, 14 Mar 2014 22:07:08 +0000 (22:07 +0000)]
Don't dump entries that were modified during the time the KTR buffer was being
copied to userspace. Failing to do this would result in entries at the bottom
of the ktrdump output to be more recent than entries at the top.

With this change the timestamps are monotonically decreasing going from the
top to the bottom of the ktrdump output.

10 years agosh: Add some consts.
jilles [Fri, 14 Mar 2014 21:45:37 +0000 (21:45 +0000)]
sh: Add some consts.

10 years agoFix an issue with ktrdump(8) where it would not print all entries in the
neel [Fri, 14 Mar 2014 21:35:16 +0000 (21:35 +0000)]
Fix an issue with ktrdump(8) where it would not print all entries in the
KTR buffer.

This happens when 'i' tries to wrap around from 0 to 'entries - 1'. Since 'i'
is a signed integer the modulo operation actually returns a negative number.

Fix this by computing the next index to use "by hand" instead of relying
on the modulo operator.

10 years agoRemove TARGET_BIG_ENDIAN. It's no longer relevant.
imp [Fri, 14 Mar 2014 21:18:41 +0000 (21:18 +0000)]
Remove TARGET_BIG_ENDIAN. It's no longer relevant.

10 years agoRely on default UFS type (though this is unlikely to change).
imp [Fri, 14 Mar 2014 21:13:58 +0000 (21:13 +0000)]
Rely on default UFS type (though this is unlikely to change).

Submitted by: eadler

10 years agolibusb: add libusb_log_level enum
eadler [Fri, 14 Mar 2014 20:54:15 +0000 (20:54 +0000)]
libusb: add libusb_log_level enum

This is documented on http://libusb.sourceforge.net/api-1.0/group__lib.html

10 years agoBe more explicit about setting SRCCONF to /dev/null (plus allow it to
imp [Fri, 14 Mar 2014 20:20:36 +0000 (20:20 +0000)]
Be more explicit about setting SRCCONF to /dev/null (plus allow it to
be overridden).

PR: 160443
Submitted by: Garrett Cooper

10 years agoNanoBSD has a utility shell script called save_cfg which helps keep
imp [Fri, 14 Mar 2014 20:20:32 +0000 (20:20 +0000)]
NanoBSD has a utility shell script called save_cfg which helps keep
/cfg updated with the modified configuration files in /etc. I have
written an improved version with the following features:

* Recurses directories.
* Only requires file arguments the first time the file/directory is
* added to /cfg.
* Handles file deletions.

PR: 145962, 157533
Submitted by: Aragon Gouveia and Alex Bakhtin

10 years agoWhen NANO_IMAGE_MBRONLY is set, and we're backing via swap, only copy
imp [Fri, 14 Mar 2014 19:46:32 +0000 (19:46 +0000)]
When NANO_IMAGE_MBRONLY is set, and we're backing via swap, only copy
the MBR.

PR: 136889
Submitted by: Aragon Gouveia

10 years agoPrint an error message when we exit out early.
imp [Fri, 14 Mar 2014 19:46:18 +0000 (19:46 +0000)]
Print an error message when we exit out early.

PR: 136889
Submitted by: Aragon Gouveia

10 years agoWith the more generous footprints today, it makes little sense to use
imp [Fri, 14 Mar 2014 19:45:40 +0000 (19:45 +0000)]
With the more generous footprints today, it makes little sense to use
UFS1 by default any more. Switch to UFS2.

10 years agoMake pcengines config files compile again.
imp [Fri, 14 Mar 2014 19:45:32 +0000 (19:45 +0000)]
Make pcengines config files compile again.

10 years agoFix build with spaces in names.
imp [Fri, 14 Mar 2014 19:45:26 +0000 (19:45 +0000)]
Fix build with spaces in names.

PR: 162736