]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoCorrect ARP update handling when the routes for network interfaces are
asomers [Wed, 26 Mar 2014 22:46:03 +0000 (22:46 +0000)]
Correct ARP update handling when the routes for network interfaces are
restricted to a single FIB in a multifib system.

Restricting an interface's routes to the FIB to which it is assigned (by
setting net.add_addr_allfibs=0) causes ARP updates to fail with "arpresolve:
can't allocate llinfo for x.x.x.x".  This is due to the ARP update code hard
coding it's lookup for existing routing entries to FIB 0.

sys/netinet/in.c:
When dealing with RTM_ADD (add route) requests for an interface, use
the interface's assigned FIB instead of the default (FIB 0).

sys/netinet/if_ether.c:
In arpresolve(), enhance error message generated when an
lla_lookup() fails so that the interface causing the error is
visible in logs.

tests/sys/netinet/fibs_test.sh
Clear ATF expected error.

PR: kern/167947
Submitted by: Nikolay Denev <ndenev@gmail.com> (previous version)
Reviewed by: melifaro
MFC after: 3 weeks
Sponsored by: Spectra Logic Corporation

10 years agoAdd a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process
dim [Wed, 26 Mar 2014 22:30:38 +0000 (22:30 +0000)]
Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process
all the SUBDIR entries in parallel, instead of serially.  Apply this
option to a selected number of Makefiles, which can greatly speed up the
build on multi-core machines, when using make -j.

This can be extended to more Makefiles later on, whenever they are
verified to work correctly with parallel building.

I tested this on a 24-core machine, with make -j48 buildworld (N = 6):

                before    stddev       after    stddev
                =======   ======       =======  ======
real time        1741.1     16.5         959.8     2.7
user time       12468.7     16.4       14393.0    16.8
sys  time        1825.0     54.8        2110.6    22.8

(user+sys)/real     8.2                   17.1

E.g. the build was approximately 45% faster in real time.  On machines
with less cores, or with lower -j settings, the speedup will not be as
impressive.  But at least you can now almost max out a machine with
buildworld!

Submitted by: jilles
MFC after: 2 weeks

10 years agosh: Fix possible memory leaks and double frees with unexpected SIGINT.
jilles [Wed, 26 Mar 2014 20:43:40 +0000 (20:43 +0000)]
sh: Fix possible memory leaks and double frees with unexpected SIGINT.

10 years agoAvoid "cc1: warning: is shorter than expected" when using GNU cpp in
dim [Wed, 26 Mar 2014 19:57:50 +0000 (19:57 +0000)]
Avoid "cc1: warning: is shorter than expected" when using GNU cpp in
combination with dtrace scripts, which have "#!/usr/sbin/dtrace -Cs"
shebang lines.  This is because dtrace positions the file pointer after
the shebang line, before passing the file to GNU cpp.

To fix the warning, adjust the size downwards by the current position,
after a bit of sanity checking.

Suggested by: avg
MFC after: 1 week

10 years agoRevert r263694, and apply a better fix to squelch unnecessary warnings
dim [Wed, 26 Mar 2014 19:31:33 +0000 (19:31 +0000)]
Revert r263694, and apply a better fix to squelch unnecessary warnings
from clang about possible keywords being treated as identifiers for the
remainder of the translation unit (a.k.a. -Wkeyword-compat), when using
libstdc++ in combination with -Wsystem-headers.  This will not only fix
devd, but any C++ program using libstdc++.

MFC after: 3 days
X-MFC-With: r263694

10 years agoFix build without SMP.
jhb [Wed, 26 Mar 2014 17:40:13 +0000 (17:40 +0000)]
Fix build without SMP.

PR: kern/187854
MFC after: 1 week

10 years agoRevert r263638 (create /root dataset) for now as it breaks install and needs
bdrewery [Wed, 26 Mar 2014 13:41:30 +0000 (13:41 +0000)]
Revert r263638 (create /root dataset) for now as it breaks install and needs
more work in cases such as single-user mode.

10 years agofix up an old email address and drop clause 3 of my copyright...
jmg [Wed, 26 Mar 2014 05:49:09 +0000 (05:49 +0000)]
fix up an old email address and drop clause 3 of my copyright...

bump date..

MFC after: 1 week

10 years agoudpate VERY old email address.. I haven't had this email address for
jmg [Wed, 26 Mar 2014 03:18:27 +0000 (03:18 +0000)]
udpate VERY old email address.. I haven't had this email address for
well over 8 years...

roll the clock forward 16 years since there have been other changes
deserving of a bump, but never happened..

Submitted by: feld
Obtained from: 1 week

10 years agoUpdate userspace users of hw.bus.devctl_disable.
mjg [Wed, 26 Mar 2014 02:25:40 +0000 (02:25 +0000)]
Update userspace users of hw.bus.devctl_disable.

This fixes breakage resulting from r263754.

Reported by: AN <andy@neu.net>
Reviewed by: imp
Pointy hat to: me

10 years agoDocument r263754
gjb [Wed, 26 Mar 2014 01:36:00 +0000 (01:36 +0000)]
Document r263754

Sponsored by: The FreeBSD Foundation

10 years agoMake `-R', `-T' and `-E' options mutially non-exclusive. It is often
sobomax [Tue, 25 Mar 2014 23:37:57 +0000 (23:37 +0000)]
Make `-R', `-T' and `-E' options mutially non-exclusive. It is often
useful to see two or three types at the same time when inspecting the
dump.

MFC after: 1 month
Sponsored by: Sippy Software, Inc.

10 years agoDocument a known problem with handling the process intended to receive
mjg [Tue, 25 Mar 2014 23:30:35 +0000 (23:30 +0000)]
Document a known problem with handling the process intended to receive
SIGIO in /dev/devctl.

Suggested by: adrian
MFC after: 6 days

10 years agoRemove long obsolete sysctl hw.bus.devctl_disable.
mjg [Tue, 25 Mar 2014 23:19:45 +0000 (23:19 +0000)]
Remove long obsolete sysctl hw.bus.devctl_disable.

Suggested by: imp
Relnotes: yes

10 years agoRemove lockless check in devopen, while correct it does not make much sense.
mjg [Tue, 25 Mar 2014 23:13:46 +0000 (23:13 +0000)]
Remove lockless check in devopen, while correct it does not make much sense.

Suggested by: imp
MFC after: 6 days

10 years agoDefine PSL_SRR1_MASK for BOOK-E too so MPC85XX compiles again.
imp [Tue, 25 Mar 2014 22:49:33 +0000 (22:49 +0000)]
Define PSL_SRR1_MASK for BOOK-E too so MPC85XX compiles again.

10 years agoAdd a '*' to the M modifier string so we match any -gdwarf string (even
imp [Tue, 25 Mar 2014 22:32:13 +0000 (22:32 +0000)]
Add a '*' to the M modifier string so we match any -gdwarf string (even
though it works w/o it for some reason, contrary to our reading of
make(1)). Also add a comment explaining things a bit better so there's
one less mystery that must be answered with svn blame.

Submitted by: ian@

10 years agoRather than require a makeoptions DEBUG to get debug correct,
imp [Tue, 25 Mar 2014 22:08:31 +0000 (22:08 +0000)]
Rather than require a makeoptions DEBUG to get debug correct,
add it in kern.mk, but only if we're using clang. While this
option is supported by both clang and gcc, in the future there
may be changes to clang which change the defaults that require
a tweak to build our kernel such that other tools in our tree
will work. Set a good example by forcing -gdwarf-2 only for
clang builds, and only if the user hasn't specified another
dwarf level already. Update UPDATING to reflect the changed
state of affairs. This also keeps us from having to update
all the ARM kernels to add this, and also keeps us from
in the future having to update all the MIPS kernels and is
one less place the user will have to know to do something
special for clang and one less thing developers will need
to do when moving an architecture to clang.

Reviewed by: ian@
MFC after: 1 week

10 years agoCorrect the comments as support for RFC 1644 has been removed for a long time.
hiren [Tue, 25 Mar 2014 21:57:50 +0000 (21:57 +0000)]
Correct the comments as support for RFC 1644 has been removed for a long time.

10 years agoTarget Transfer Tag is opaque; no need to htonl(3) it.
trasz [Tue, 25 Mar 2014 19:28:40 +0000 (19:28 +0000)]
Target Transfer Tag is opaque; no need to htonl(3) it.

Sponsored by: The FreeBSD Foundation

10 years agoMove the atpit device model from userspace into vmm.ko for better
tychon [Tue, 25 Mar 2014 19:20:34 +0000 (19:20 +0000)]
Move the atpit device model from userspace into vmm.ko for better
precision and lower latency.

Approved by: grehan (co-mentor)

10 years agoMove the ic_outstanding_count under #ifdef DIAGNOSTIC.
trasz [Tue, 25 Mar 2014 19:17:22 +0000 (19:17 +0000)]
Move the ic_outstanding_count under #ifdef DIAGNOSTIC.

Sponsored by: The FreeBSD Foundation

10 years agoFix harmless warning after reconnecting a session and not doing anything
trasz [Tue, 25 Mar 2014 19:09:52 +0000 (19:09 +0000)]
Fix harmless warning after reconnecting a session and not doing anything
with it.

Sponsored by: The FreeBSD Foundation

10 years agoUse newly added extended LUN support in CAM.
trasz [Tue, 25 Mar 2014 19:05:05 +0000 (19:05 +0000)]
Use newly added extended LUN support in CAM.

Sponsored by: The FreeBSD Foundation

10 years agoUse a less unusual syntax in debug printfs.
trasz [Tue, 25 Mar 2014 18:30:57 +0000 (18:30 +0000)]
Use a less unusual syntax in debug printfs.

Sponsored by: The FreeBSD Foundation

10 years agotests/sys/netinet/Makefile
asomers [Tue, 25 Mar 2014 15:03:08 +0000 (15:03 +0000)]
tests/sys/netinet/Makefile
tests/sys/netinet/fibs.sh
Replace fibs:udp_dontroute with fibs:src_addr_selection_by_subnet.
The original test was poorly written; it was actually testing
kern/167947 instead of the desired kern/187553.  The root cause of the
bug is that ifa_ifwithnet did not have a fib argument.  The new test
more directly targets that behavior.

tests/sys/netinet/udp_dontroute.c
Delete the auxilliary binary used by the old test

PR: kern/187553
MFC after: 3 weeks
Sponsored by: Spectra Logic Corporation

10 years agoUpgrade to OpenSSH 6.6p1.
des [Tue, 25 Mar 2014 11:05:34 +0000 (11:05 +0000)]
Upgrade to OpenSSH 6.6p1.

10 years agoSwitch to my freebsd.org emal address in copyright.
ganbold [Tue, 25 Mar 2014 08:31:47 +0000 (08:31 +0000)]
Switch to my freebsd.org emal address in copyright.

Approved by: stas (mentor)

10 years agoMerge from projects/pf r251993 (glebius@):
mm [Tue, 25 Mar 2014 06:55:53 +0000 (06:55 +0000)]
Merge from projects/pf r251993 (glebius@):

De-vnet hash sizes and hash masks.

Submitted by: Nikos Vassiliadis <nvass gmx.com>
Reviewed by: trociny

MFC after: 1 month

10 years agoMake /dev/devctl mpsafe.
mjg [Tue, 25 Mar 2014 03:28:58 +0000 (03:28 +0000)]
Make /dev/devctl mpsafe.

MFC after: 1 week

10 years agoAdd code for enabling second CPU core for A20 SoC.
ganbold [Tue, 25 Mar 2014 01:34:39 +0000 (01:34 +0000)]
Add code for enabling second CPU core for A20 SoC.
Enable SMP on Cubieboard2.

Approved by: stas (mentor)

10 years agoApply a temporary band-aid for building devd with clang 3.4, libstdc++
dim [Mon, 24 Mar 2014 20:30:39 +0000 (20:30 +0000)]
Apply a temporary band-aid for building devd with clang 3.4, libstdc++
and -Wsystem-headers enabled (which is the default for any non-zero
WARNS level, crazily enough!).  This is primarily meant to be MFC'd as
soon as possible.

MFC after: 3 days

10 years agoAdds the ADC driver for TI AM3xxx SoC family.
loos [Mon, 24 Mar 2014 20:06:27 +0000 (20:06 +0000)]
Adds the ADC driver for TI AM3xxx SoC family.

The ADC has a 12bit resolution and its raw output can be read via sysctl(8)
interface.

The driver allows the setup of ADC clock, samples average and open delay
(the number of clock cycles to wait before start the conversion).

The TSC_ADC module is set in the general purpose mode (no touchscreen
support).

Tested on Beaglebone-black.

Written based on AM335x TRM.

Reviewed by: rpaulo
Approved by: adrian (mentor)
Tested by: me, Brian J. McGovern, Sulev-Madis Silber (ketas)

10 years agoAdd a note to UPDATING about customized kernel configuration files now
dim [Mon, 24 Mar 2014 19:21:14 +0000 (19:21 +0000)]
Add a note to UPDATING about customized kernel configuration files now
requiring -gdwarf-2 for debug info, when using clang 3.4.

Suggested by: adrian
MFC after: 3 days

10 years agoAdd a pre-merge script which reverts mechanical changes such as added
des [Mon, 24 Mar 2014 19:15:13 +0000 (19:15 +0000)]
Add a pre-merge script which reverts mechanical changes such as added
$FreeBSD$ tags and man page dates.

Add a post-merge script which reapplies these changes.

Run both scripts to normalize the existing code base.  As a result, many
files which should have had $FreeBSD$ tags but didn't now have them.

Partly rewrite the upgrade instructions and remove the now outdated
list of tricks.

10 years agochange defaule permissions on /dev/devstat. while i'm here remove
emax [Mon, 24 Mar 2014 18:13:41 +0000 (18:13 +0000)]
change defaule permissions on /dev/devstat. while i'm here remove
D_NEEDGIANT flag

Submitted by: jhb
Reviewed by: jhb, scottl, rwatson, delphij, phk
MFC after: 1 week

10 years agoAdd missing LIBM to DPADD from r263650
bdrewery [Mon, 24 Mar 2014 13:13:52 +0000 (13:13 +0000)]
Add missing LIBM to DPADD from r263650

Reported by: jilles

10 years agoMove an else case that was missed in r263676
andrew [Mon, 24 Mar 2014 08:24:32 +0000 (08:24 +0000)]
Move an else case that was missed in r263676

10 years agolldb: Invoke PT_KILL from ProcessPosix::DoDestroy
emaste [Mon, 24 Mar 2014 01:21:37 +0000 (01:21 +0000)]
lldb: Invoke PT_KILL from ProcessPosix::DoDestroy

We previously sent SIGKILL to the debuggee in DoDestroy, but did not
actually detach or kill via ptrace.  It seems that this somehow didn't
matter on Linux, but did on FreeBSD.

This would happen when quitting LLDB while stopped at a breakpoint, for
example.  The debuggee remained stopped in ptrace (with the signal
either pending or lost).  After a timeout of a second or two LLDB exits,
which caused the debuggee to resume and dump core from an unhandled
SIGTRAP.

BringProcessIntoLimbo is a poorly named wrapper for ptrace(PT_KILL)
which is the desired behaviour from DoDestroy.

http://llvm.org/pr18894

Sponsored by: DARPA, AFRL

10 years agoReorder the pmap macros so "ARM_MMU_V6 + ARM_MMU_V7" is first. As they are
andrew [Sun, 23 Mar 2014 21:08:18 +0000 (21:08 +0000)]
Reorder the pmap macros so "ARM_MMU_V6 + ARM_MMU_V7" is first. As they are
identical this allows us to build for both v6 and v7 together.

10 years agoFor the moment also disable interrupts on the altera-jtag-uart imitation
bz [Sun, 23 Mar 2014 20:35:58 +0000 (20:35 +0000)]
For the moment also disable interrupts on the altera-jtag-uart imitation
and force polling mode.

10 years agoAdd the llvm/clang patch for r263619.
andrew [Sun, 23 Mar 2014 14:06:09 +0000 (14:06 +0000)]
Add the llvm/clang patch for r263619.

10 years agoAdd a new ARM TARGET_ARCH, armv6hf. This is considered experimental.
andrew [Sun, 23 Mar 2014 12:49:25 +0000 (12:49 +0000)]
Add a new ARM TARGET_ARCH, armv6hf. This is considered experimental.

This targets the existing ARMv6 and ARMv7 SoCs that contain a VFP unit.
This is an optional coprocessors may not be present in all devices, however
it appears to be in all current SoCs we support.

armv6hf targets the VFP variant of the ARM EABI and our copy of gcc is too
old to support this. Because of this there are a number of WITH/WITHOUT
options that are unsupported and must be left as the default value. The
options and their required value are:
 * WITH_ARM_EABI
 * WITHOUT_GCC
 * WITHOUT_GNUCXX

In addition, without an external toolchain, the following need to be left
as their default:
 * WITH_CLANG
 * WITH_CLANG_IS_CC

As there is a different method of passing float and double values to
functions the ABI is incompatible with existing armv6 binaries. To use
this a full rebuild of world is required. Because no floating point values
are passed into the kernel an armv6 kernel with VFP enabled will work with
an armv6hf userland and vice versa.

10 years agoRemove unneeded fake _KERNEL definition.
glebius [Sun, 23 Mar 2014 09:15:14 +0000 (09:15 +0000)]
Remove unneeded fake _KERNEL definition.

10 years agoDon't lose track of the KTR entries copied from 'ktr_buf_init[]' to the
neel [Sat, 22 Mar 2014 22:35:57 +0000 (22:35 +0000)]
Don't lose track of the KTR entries copied from 'ktr_buf_init[]' to the
dynamically allocated 'ktr_buf[]'.

The memcpy arranges 'ktr_buf[]' such that the latest KTR entry is at
'KTR_BOOT_ENTRIES - 1'.

10 years agoFix build with libucl 20140321
bdrewery [Sat, 22 Mar 2014 22:20:43 +0000 (22:20 +0000)]
Fix build with libucl 20140321

10 years agosfxge: limit software Tx queue size.
glebius [Sat, 22 Mar 2014 18:24:44 +0000 (18:24 +0000)]
sfxge: limit software Tx queue size.

Previous implementation limits put queue size only (when Tx lock can't
be acquired), but get queue may grow unboundedly which results in mbuf
pools exhaustion and latency growth.

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

10 years agoUpdate to 20140321
bapt [Sat, 22 Mar 2014 17:28:14 +0000 (17:28 +0000)]
Update to 20140321
This brings schema validation

MFC after: 1 week

10 years agoUpdate 20140302
bapt [Sat, 22 Mar 2014 17:22:29 +0000 (17:22 +0000)]
Update 20140302
In particular this brings schema validation support.

10 years agoCreate a root dataset so that /root is outside of the boot environment.
bdrewery [Sat, 22 Mar 2014 15:59:26 +0000 (15:59 +0000)]
Create a root dataset so that /root is outside of the boot environment.

Discussed with: dteske on sysinstall@
MFC after: 1 month

10 years agoSimplify how we build MACHINE_ARCH. There are 3 options that may be set
andrew [Sat, 22 Mar 2014 15:59:18 +0000 (15:59 +0000)]
Simplify how we build MACHINE_ARCH. There are 3 options that may be set
however only arm, armeb, armv6, and soon armv6hf will be used.

10 years agoVendor import of OpenSSH 6.6p1.
des [Sat, 22 Mar 2014 15:23:38 +0000 (15:23 +0000)]
Vendor import of OpenSSH 6.6p1.

10 years agoFor BERI on NetFPGA assume HZ=100 by default.
bz [Sat, 22 Mar 2014 13:06:32 +0000 (13:06 +0000)]
For BERI on NetFPGA assume HZ=100 by default.

Remove the uart support in favour of a "jtag-uart" interface imitation
providing a much simpler interface, directly exported to the host,
allowing the toolchain to be shared with BERI on Altera. [1]

Submitted by: Jong Hun HAN (jong.han cl.cam.ac.uk) [1]
MFC after: 2 weeks

10 years agoImplement __flt_rounds for ARMv6 hard-float. The fpscr register stores the
andrew [Sat, 22 Mar 2014 12:28:21 +0000 (12:28 +0000)]
Implement __flt_rounds for ARMv6 hard-float. The fpscr register stores the
current rounding mode used by the VFP unit.

10 years agoUpdate comment to explain search order reverted to historical order
mckusick [Sat, 22 Mar 2014 11:26:39 +0000 (11:26 +0000)]
Update comment to explain search order reverted to historical order
in -r254996.

Suggested by: Pedro Giffuni <pfg@FreeBSD.org>
MFC:          3 days

10 years agoRename global cnt to vm_cnt to avoid shadowing.
bdrewery [Sat, 22 Mar 2014 10:26:09 +0000 (10:26 +0000)]
Rename global cnt to vm_cnt to avoid shadowing.

To reduce the diff struct pcu.cnt field was not renamed, so
PCPU_OP(cnt.field) is still used. pc_cnt and pcpu are also used in
kvm(3) and vmstat(8). The goal was to not affect externally used KPI.

Bump __FreeBSD_version_ in case some out-of-tree module/code relies on the
the global cnt variable.

Exp-run revealed no ports using it directly.

No objection from: arch@
Sponsored by: EMC / Isilon Storage Division

10 years agoPull in r201662 from upstream clang trunk:
andrew [Sat, 22 Mar 2014 09:23:13 +0000 (09:23 +0000)]
Pull in r201662 from upstream clang trunk:

  Add FreeBSD ARM EABI hard-float support

  Patch by Andrew Turner.

10 years agoAlso set the AR5212 HAL power mode tracking in the right spot.
adrian [Sat, 22 Mar 2014 03:36:07 +0000 (03:36 +0000)]
Also set the AR5212 HAL power mode tracking in the right spot.

Tested:

* D-Link DWL-G650 NIC (AR2413), STA mode

10 years agoMark the following sysctls as MPSAFE:
mjg [Fri, 21 Mar 2014 19:12:05 +0000 (19:12 +0000)]
Mark the following sysctls as MPSAFE:
kern.file
kern.proc.filedesc
kern.proc.ofiledesc

MFC after: 7 days

10 years agoAdd change forgotten in r263475. Make dmaplimit accessible outside
kib [Fri, 21 Mar 2014 17:17:19 +0000 (17:17 +0000)]
Add change forgotten in r263475.  Make dmaplimit accessible outside
amd64/pmap.c.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoFix breakage in ipfw+VIMAGE after r261590.
glebius [Fri, 21 Mar 2014 17:07:18 +0000 (17:07 +0000)]
Fix breakage in ipfw+VIMAGE after r261590.

PR: kern/187665
Sponsored by: Nginx, Inc.

10 years agonv(3) was not in 10.0.
bdrewery [Fri, 21 Mar 2014 15:30:31 +0000 (15:30 +0000)]
nv(3) was not in 10.0.

It might be MFC'd to stable/10 for 10.1, but for now update the manual to
avoid confusion on its availability.

Discussed with: pjd

10 years agoFix two issues with /dev/mem access on amd64, both causing kernel page
kib [Fri, 21 Mar 2014 14:25:09 +0000 (14:25 +0000)]
Fix two issues with /dev/mem access on amd64, both causing kernel page
faults.

First, for accesses to direct map region should check for the limit by
which direct map is instantiated.

Second, for accesses to the kernel map, success returned from the
kernacc(9) does not guarantee that consequent attempt to read or write
to the checked address succeed, since other thread might invalidate
the address meantime.  Add a new thread private flag TDP_DEVMEMIO,
which instructs vm_fault() to return error when fault happens on the
MAP_ENTRY_NOFAULT entry, instead of panicing.  The trap handler would
then see a page fault from access, and recover in normal way, making
/dev/mem access safer.

Remove GIANT_REQUIRED from the amd64 memrw(), since it is not needed
and having Giant locked does not solve issues for amd64.

Note that at least the second issue exists on other architectures, and
requires similar patching for md code.

Reported and tested by: clusteradm (gjb, sbruno)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoInitialize vm_map_entry member wiring_thread on the map entry creation.
kib [Fri, 21 Mar 2014 13:55:57 +0000 (13:55 +0000)]
Initialize vm_map_entry member wiring_thread on the map entry creation.
This was missed in r253190.

Reported by: hps, peter
Tested by: hps
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

10 years agoWhen loader(8) inspects MBR, it chooses GPT as main partition table,
ae [Fri, 21 Mar 2014 09:29:01 +0000 (09:29 +0000)]
When loader(8) inspects MBR, it chooses GPT as main partition table,
when MBR contains only PMBR entry or it is bootcamp-compatible.
If MBR has PMBR entry and some other, the loader rejects it.

Make these checks to be less strict. If loader decided that PMBR
isn't suitable for GPT, it will use MBR.

Reported by: Paul Thornton
Tested by: Paul Thornton
MFC after: 1 week

10 years agoMask out SRR1 bits that aren't exported to the MSR.
jhibbits [Fri, 21 Mar 2014 04:45:57 +0000 (04:45 +0000)]
Mask out SRR1 bits that aren't exported to the MSR.

This appears to fix a strange condition with X on 32-bit PowerBooks I observed,
caused by one of these bits getting set in the mcontext, but not set in the
thread, which may be a symptom of another problem, more difficult to diagnose.
Since these bits aren't exported anyway, this change makes it more explicit that
the bits aren't MSR-related in SRR1.

MFC after: 3 weeks

10 years agoRevert r263449;
pfg [Fri, 21 Mar 2014 04:33:38 +0000 (04:33 +0000)]
Revert r263449;

ext2fs: minor update to the dirpref policy.

The change in UFS r254996, reverted the change as the
older code seems to work better. This was not visible
in local testing but we can trust UFS is vastly more
exercised in diferent environments.

10 years agoTake filedesc lock only for reading when allocating new fdtable.
mjg [Fri, 21 Mar 2014 01:34:19 +0000 (01:34 +0000)]
Take filedesc lock only for reading when allocating new fdtable.

Code populating the table does this already.

MFC after: 1 week

10 years agoMFV 263436-263438:
delphij [Fri, 21 Mar 2014 01:32:25 +0000 (01:32 +0000)]
MFV 263436-263438:

  3947 zpool(1M) references nonexistent zfs-features(5)
  4540 zpool(1M) man page doesn't describe "readonly" property
  3948 zfs sync=default is not accepted
  4611 zfs(1M) still mentions 'send -r' in synopsis
  4415 zpool(1M) man page missing "import -m" description
  4570 Document dedupditto pool property
  4572 Dedup-related documentation additions for zpool and zdb.
  1371 Add -D option description to zpool(1M) manpage
  4571 Add documentation for -T and interval to "zpool list"

MFC after: 2 weeks

10 years agoaudit: plug FILEDESC_LOCK leak in audit_canon_path.
mjg [Fri, 21 Mar 2014 01:30:33 +0000 (01:30 +0000)]
audit: plug FILEDESC_LOCK leak in audit_canon_path.

MFC after: 3 days

10 years agocxgbe(4): Recognize the "spider" configuration where a T5 card's 40G
np [Fri, 21 Mar 2014 00:56:56 +0000 (00:56 +0000)]
cxgbe(4):  Recognize the "spider" configuration where a T5 card's 40G
QSFP port is presented as 4 distinct 10G SFP+ ports to the driver.

MFC after: 2 weeks

10 years agoThrow the flush messages behind ATH_DEBUG_RESET as well.
adrian [Thu, 20 Mar 2014 23:16:58 +0000 (23:16 +0000)]
Throw the flush messages behind ATH_DEBUG_RESET as well.

These are needed to diagnose TX hangs that I and hiren are seeing.
Without it, the only way we'll see debugging is by having ATH_DEBUG_SW_TX
enabled and that is going to be very, very spammy.

ATH_DEBUG_RESET is fine; it's only going to be done during stuck beacon
situations in AP mode.

Whilst I'm here, and now that it's behind debugging, let's just disable
the "print only one" conditional.  I'll eventually make it more tunable.

Tested:

* AR9220, hostap mode.

10 years agosh: Don't overwrite old exit status if a PID is reused.
jilles [Thu, 20 Mar 2014 22:38:13 +0000 (22:38 +0000)]
sh: Don't overwrite old exit status if a PID is reused.

Only store exit status for a process if that process has not terminated yet.

Test (slow):
  exit 7 & p1=$!; until exit 8 & p2=$!; [ "$p1" = "$p2" ]; do wait "$p2";
  done; sleep 0.1; wait %1; echo $?
should write "7".

10 years agocxgbe(4): man page updates.
np [Thu, 20 Mar 2014 21:57:10 +0000 (21:57 +0000)]
cxgbe(4): man page updates.

10 years agoext2fs: minor update to the dirpref policy.
pfg [Thu, 20 Mar 2014 21:19:13 +0000 (21:19 +0000)]
ext2fs: minor update to the dirpref policy.

Bring in a minor change to the dirpref policy based on r248623.

This is pretty minimal change to keep the implementation in
sync with UFS but other parts from the original change are not
directly applicable so don't expect improvements in fsck times.

MFC after: 2 weeks

10 years agoUpdate hwpmc to support core events for Atom Silvermont microarchitecture.
hiren [Thu, 20 Mar 2014 20:51:08 +0000 (20:51 +0000)]
Update hwpmc to support core events for Atom Silvermont microarchitecture.
(Model 0x4D as per Intel document 330061-001 01/2014)

Tested by: Olivier Cochard-Labbe <olivier@cochatrd.me>
MFC after: 4 weeks

10 years agoAdd several ATF tests that deal with multiple fibs. They're described in
asomers [Thu, 20 Mar 2014 20:39:41 +0000 (20:39 +0000)]
Add several ATF tests that deal with multiple fibs.  They're described in
several different PRs, but the tests share some common code, so I'm
committing them together.

sbin/ifconfig/tests
sbin/ifconfig/tests/fibs_test.sh
sbin/ifconfig/tests/Makefile
sbin/ifconfig/Makefile
Add fibs_test.sh, which regresses bin/187551

tests/sys/netinet
tests/sys/netinet/fibs_test.sh
tests/sys/netinet/udp_dontroute.c
tests/sys/netinet/Makefile
tests/sys/Makefile
Add fibs_test.sh, which regresses kern/167947, kern/187552
kern/187549, kern/187550, and kern/187553

etc/mtree/BSD.tests.dist
Add newly created directories

PR: bin/187551
PR: kern/167947
PR: kern/187552
PR: kern/187549
PR: kern/187550
PR: kern/187553
Discussed with: melifaro
MFC after: 3 weeks
Sponsored by: Spectra Logic Corporation

10 years agomsdosfs: minor format fix - spaces vs tab
pfg [Thu, 20 Mar 2014 20:14:04 +0000 (20:14 +0000)]
msdosfs: minor format fix - spaces vs tab

MFC after: 3 days

10 years agoAdd new CPUTYPEs supported by Clang 3.4, i.e., AMD Steamroller (bdver3) and
jkim [Thu, 20 Mar 2014 19:17:46 +0000 (19:17 +0000)]
Add new CPUTYPEs supported by Clang 3.4, i.e., AMD Steamroller (bdver3) and
Intel Silvermont (slm) processors.

10 years ago- Update commit template to include 'Relnotes:' tag, to
gjb [Thu, 20 Mar 2014 18:44:37 +0000 (18:44 +0000)]
- Update commit template to include 'Relnotes:' tag, to
  help re@ track release notes candidates.

Discussed with: re
Reviewed by: peter
MFC after: 3 days
X-MFC-To: stable/10 only
Sponsored by: The FreeBSD Foundation

10 years agoUse 'cpuset_t' to represent the vcpus active in a virtual machine.
neel [Thu, 20 Mar 2014 18:15:37 +0000 (18:15 +0000)]
Use 'cpuset_t' to represent the vcpus active in a virtual machine.

10 years agoRename mct and ehci drivers files to match common naming.
br [Thu, 20 Mar 2014 17:53:56 +0000 (17:53 +0000)]
Rename mct and ehci drivers files to match common naming.

10 years agoRemove printf's.
br [Thu, 20 Mar 2014 17:33:01 +0000 (17:33 +0000)]
Remove printf's.

10 years agoFix kern/187712: config(8) does not respect KERNCONFDIR.
asomers [Thu, 20 Mar 2014 17:30:09 +0000 (17:30 +0000)]
Fix kern/187712: config(8) does not respect KERNCONFDIR.
The impact of this bug is that you cannot build a kernel if both of the
following are true:
1) The kernel config file is in a non-default location
2) The kernel config file uses the "include" statement from config(5).

usr.sbin/config/main.c
usr.sbin/config/config.8
usr.sbin/config/config.h
usr.sbin/config/lang.l
Added a "-I path" option to config(8).  By analogy to cc(1), it adds
an extra path in which the "include" statement will search for
files.

Makefile.inc1
Pass "-I ${KERNCONFDIR}" to config(8).

PR: kern/187712
Reviewed by: will, imp (previous version)
MFC after: 3 weeks
Sponsored by: Spectra Logic Corporation

10 years agoshare/man/man7/tests.7
asomers [Thu, 20 Mar 2014 17:13:07 +0000 (17:13 +0000)]
share/man/man7/tests.7
Added a section on test suite configuration, and cleaned up up
grammar errors and awkward prose.  The config variables were
discussed on freebsd-testing.

Discussed with: Garrett Cooper, jmmv
MFC after: 2 weeks
Sponsored by: Spectra Logic Corporation

10 years agoAdd support for Samsung Chromebook (ARM Cortex A15 machine).
br [Thu, 20 Mar 2014 17:10:01 +0000 (17:10 +0000)]
Add support for Samsung Chromebook (ARM Cortex A15 machine).

10 years agoAdd driver for Display Controller.
br [Thu, 20 Mar 2014 17:07:14 +0000 (17:07 +0000)]
Add driver for Display Controller.

10 years ago- Add display-related and clk devices to the tree
br [Thu, 20 Mar 2014 17:03:44 +0000 (17:03 +0000)]
- Add display-related and clk devices to the tree
- Prevent resources intersection with EHCI driver

10 years agoDisable debugging by default.
br [Thu, 20 Mar 2014 17:01:21 +0000 (17:01 +0000)]
Disable debugging by default.

10 years agoTry to resolve a possible deadlock when detaching USB devices which
hselasky [Thu, 20 Mar 2014 13:53:24 +0000 (13:53 +0000)]
Try to resolve a possible deadlock when detaching USB devices which
create character devices. The deadlock can happen if an application is
issuing IOCTLs which require USB refcounting, at the same time the USB
device is detaching.

There is already a counter in place in the USB device structure to
detect this situation, but it was not always checked ahead of invoking
functions that might destroy character devices, like detach, set
configuration, set alternate interface or detach active kernel driver.

Reported by: Daniel O'Connor <doconnor@gsoft.com.au>
MFC after: 1 week

10 years agoSince mlaier has been inactive for a long time, grab maintainership on pf.
glebius [Thu, 20 Mar 2014 06:22:39 +0000 (06:22 +0000)]
Since mlaier has been inactive for a long time, grab maintainership on pf.

10 years agoAdd some debugging code to print out if registers are touched whilst the
adrian [Thu, 20 Mar 2014 05:10:17 +0000 (05:10 +0000)]
Add some debugging code to print out if registers are touched whilst the
device is asleep.

This doesn't avoid logging errors for things that are actually OK to
access whilst the chip is asleep (eg, the RTC registers (0x7000->0x70ff
on the AR5416 and later.)

But, this is a pretty good indicator if things are accessed incorrectly.

Tested:

* AR5416, STA

10 years agoShuffle ah_powerMode to be in a sane spot for the given power operation.
adrian [Thu, 20 Mar 2014 05:08:31 +0000 (05:08 +0000)]
Shuffle ah_powerMode to be in a sane spot for the given power operation.

This way the state changes from sleep->awake before the registers are poked
and from awake->sleep after the registers are poked.

This way spurious warnings aren't printed by my (to be committed)
debugging code.

Tested:

* AR5416, STA

10 years agoDon't call ath_init() inside the lock.
adrian [Thu, 20 Mar 2014 04:47:34 +0000 (04:47 +0000)]
Don't call ath_init() inside the lock.

Yes, this means that sc_invalid is slightly racy, but there are other
issues here which need fixing.

This fixes a source of eventual LORs - ath_init() grabs ATH_LOCK to do
work and releases it before it calls ieee80211_start_all().
ieee80211_start_all() will grab the net80211 comlock to iterate over
the VAPs.

TODO:

* .. I should just migrate the ieee80211_start_all() work to a
  deferred task so it can be done later; it doesn't have to be
  immediately done.

Tested:

* AR5416, STA mode

10 years agocxgbe(4): Use ifi_oqdrops in if_data to count drops in the tx path.
np [Thu, 20 Mar 2014 02:28:05 +0000 (02:28 +0000)]
cxgbe(4): Use ifi_oqdrops in if_data to count drops in the tx path.

10 years agoAdd a shorter alias for if_data.ifi_oqdrops.
np [Thu, 20 Mar 2014 02:23:52 +0000 (02:23 +0000)]
Add a shorter alias for if_data.ifi_oqdrops.

10 years agocxgbe(4): if_iqdrops statistic should include tunnel congestion drops.
np [Thu, 20 Mar 2014 01:58:04 +0000 (01:58 +0000)]
cxgbe(4): if_iqdrops statistic should include tunnel congestion drops.

MFC after: 1 week

10 years agoMark multi_test as requiring /usr/share/dict/words.
jmmv [Wed, 19 Mar 2014 23:29:00 +0000 (23:29 +0000)]
Mark multi_test as requiring /usr/share/dict/words.

The file may not be present if MK_DICT=no.  Pointed out by Casey Peel.

10 years agoRemove unused option -r from zpool.
delphij [Wed, 19 Mar 2014 23:04:52 +0000 (23:04 +0000)]
Remove unused option -r from zpool.

Submitted by: Richard Yao <ryao gentoo org>
MFC after: 2 weeks

10 years agoAdd KTR events for the PMAP interface functions
marcel [Wed, 19 Mar 2014 21:30:10 +0000 (21:30 +0000)]
Add KTR events for the PMAP interface functions
1.  move unmapped_buf_allowed to machdep.c.
2.  map both pmap_mapbios() and pmap_mapdev() to pmap_mapdev_attr()
    and have the actual work done by pmap_mapdev_priv() (renamed from
    pmap_mapdev()). Use pmap_mapdev_priv() to map the I/O port space
    because we can't use CTR() that early.
3.  add pmap_pinit_common() that's used by both pmap_pinit0() and
    pmap_pinit(). Previously pmap_pinit0() would call pmap_pinit(),
    but that would create 2 KTR events. While here, use pmap_t instead
    of "struct pmap *".
4.  fix pmap_kenter() to use vm_paddr_t as the type for the physical.
5.  various white-space adjustments for consistency.
6.  use C99 and KNF for function definitions where appropriate.
7.  slightly re-order prototypes and defines in <machine/pmap.h>

No functional change (other than the creation of KTR_PMAP events).