]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoAdd a driver for the GXemul test machine's disk controller and disk devices.
jmallett [Sun, 6 May 2012 08:28:08 +0000 (08:28 +0000)]
Add a driver for the GXemul test machine's disk controller and disk devices.
Prefer it to using an md device in the GXEMUL kernel configuration.

Requested by: rwatson, theraven

12 years agoFix the MACHINE_ARCH for big endian arm to be armeb.
imp [Sun, 6 May 2012 07:20:48 +0000 (07:20 +0000)]
Fix the MACHINE_ARCH for big endian arm to be armeb.

12 years agoAdd description for GEOM RAID tunables/sysctls.
mav [Sun, 6 May 2012 06:25:17 +0000 (06:25 +0000)]
Add description for GEOM RAID tunables/sysctls.

MFC after: 1 week

12 years agoGet the memory size from the gxemul mp device. Don't dump the environment if
jmallett [Sun, 6 May 2012 05:58:56 +0000 (05:58 +0000)]
Get the memory size from the gxemul mp device.  Don't dump the environment if
it is not present.

12 years agoFix `gmultipath configure` for big-endian machines.
mav [Sun, 6 May 2012 05:49:23 +0000 (05:49 +0000)]
Fix `gmultipath configure` for big-endian machines.

MFC after: 1 week

12 years agoFix mis-merged line, move SC_LOOKUP() call to
davidxu [Sat, 5 May 2012 23:51:24 +0000 (23:51 +0000)]
Fix mis-merged line, move SC_LOOKUP() call to
upper level.

12 years agoProvide the flags in the SCTP stream reconfig related notification
tuexen [Sat, 5 May 2012 21:41:16 +0000 (21:41 +0000)]
Provide the flags in the SCTP stream reconfig related notification
as specified in RFC 6525.

MFC after: 3 days

12 years agoHonor SCTP_ENABLE_STREAM_RESET socket option when processing incoming
tuexen [Sat, 5 May 2012 20:07:33 +0000 (20:07 +0000)]
Honor SCTP_ENABLE_STREAM_RESET socket option when processing incoming
requests. Fix also the provided result in the response and use names
as specified in RFC 6525.

MFC after: 3 days

12 years ago- >500 static DTrace probes for the linuxulator
netchild [Sat, 5 May 2012 19:42:38 +0000 (19:42 +0000)]
- >500 static DTrace probes for the linuxulator
- DTrace scripts to check for errors, performance, ...
  they serve mostly as examples of what you can do with the static probe;s
  with moderate load the scripts may be overwhelmed, excessive lock-tracing
  may influence program behavior (see the last design decission)

Design decissions:
 - use "linuxulator" as the provider for the native bitsize; add the
   bitsize for the non-native emulation (e.g. "linuxuator32" on amd64)
 - Add probes only for locks which are acquired in one function and released
   in another function. Locks which are aquired and released in the same
   function should be easy to pair in the code, inter-function
   locking is more easy to verify in DTrace.
 - Probes for locks should be fired after locking and before releasing to
   prevent races (to provide data/function stability in DTrace, see the
   man-page of "dtrace -v ..." and the corresponding DTrace docs).

12 years agoI need to change uname -p, not uname -m, so back this out.
imp [Sat, 5 May 2012 17:20:12 +0000 (17:20 +0000)]
I need to change uname -p, not uname -m, so back this out.
Also, fix a couple of style(9) issues while I'm here.

Submitted by: nathanw, bde

12 years ago- Add my mentor/mentee relationship to committers-doc.dot.
issyl0 [Sat, 5 May 2012 16:50:12 +0000 (16:50 +0000)]
- Add my mentor/mentee relationship to committers-doc.dot.
(where me = issyl0)

Approved by: gabor (mentor)

12 years agoopen the resolved path
bapt [Sat, 5 May 2012 16:37:14 +0000 (16:37 +0000)]
open the resolved path
fix debug message

Submitted by: John Marino <draco@marino.st>
Approved by: des (mentor)

12 years agoMake sure a few new internal clang headers get installed, I missed these
dim [Sat, 5 May 2012 15:35:22 +0000 (15:35 +0000)]
Make sure a few new internal clang headers get installed, I missed these
in the last import.  They are sometimes needed when you want to use
advanced instructions.

Also, add clang's internal stdalign.h header to ObsoleteFiles.inc, since
it is redundant: we already have a stdalign.h header in /usr/include.

Pointy hat to: dim
PR: kern/167574
Submitted by: jkim
Reported by: Oliver Hartmann <ohartman@zedat.fu-berlin.de>
MFC after: 2 weeks

12 years agoDo error checking for the SCTP_RESET_STREAMS, SCTP_RESET_ASSOC,
tuexen [Sat, 5 May 2012 14:06:15 +0000 (14:06 +0000)]
Do error checking for the SCTP_RESET_STREAMS, SCTP_RESET_ASSOC,
and SCTP_ADD_STREAMS socket options as specified by RFC 6525.

MFC after: 3 days

12 years agoWork around a situation where symlook_obj() could be called for the
kib [Sat, 5 May 2012 11:26:08 +0000 (11:26 +0000)]
Work around a situation where symlook_obj() could be called for the
object for which digest_dynamic1() was not done yet. Just return
EINVAL and do not try to dereference NULL buckets hash array.

This seems to happen on ia64 for rtld object itself, where the
R_IA_64_FPTR64LSB relocations require symbol lookup. The dynamic
linker itself does not rely on identity of the C-level function
pointers (i.e. function descriptors).

Reported and reviewed by: marcel
MFC after:   8 days

12 years agoFix mount mutex handling missed in r234386.
pluknet [Sat, 5 May 2012 09:34:35 +0000 (09:34 +0000)]
Fix mount mutex handling missed in r234386.

12 years agoBig endian arm boxes need to have a uname -m of armeb, not arm, so
imp [Sat, 5 May 2012 07:15:34 +0000 (07:15 +0000)]
Big endian arm boxes need to have a uname -m of armeb, not arm, so
that the bootstrap from source works correctly.

MFC after: 4 days

12 years agoFix off-by-one error in sati_inquiry_block_device_translate_data(). Bug would
jimharris [Fri, 4 May 2012 23:45:34 +0000 (23:45 +0000)]
Fix off-by-one error in sati_inquiry_block_device_translate_data().  Bug would
result in INQUIRY VPD 0x81 to SATA devices to return only 63 bytes of data
instead of 64 during SCSI/ATA translation.

Sponsored by: Intel
Approved by: scottl
MFC after: 1 week

12 years agoDon't assume we have legacy PICs (i.e. 8259A in cascade) at the legacy
marcel [Fri, 4 May 2012 23:16:29 +0000 (23:16 +0000)]
Don't assume we have legacy PICs (i.e. 8259A in cascade) at the legacy
I/O port addresses. Even if we do, this is hardly the place to mask
interrupts. It's not clear that this was at all needed. The code came
with CVS revision 1.2 of nexus.c when interrupt support was first added.
What is known is that ia64 has always been designed around the IOSAPIC,
and that doing I/O like this prevents Altix from booting.

12 years agoFix the returns in mfi_tbolt_sync_map_info. I forgot to change
ambrisko [Fri, 4 May 2012 22:54:54 +0000 (22:54 +0000)]
Fix the returns in mfi_tbolt_sync_map_info.  I forgot to change
them to cleanup and goto out when acknowledging the LD's.  Check
for failure on malloc.  Remove a couple of extra lines and remove
the spurious return.

Prompted by: Petr Lampa
MFC after: 3 days

12 years agoUpdate FREEBSD-vendor to reflect the current version.
delphij [Fri, 4 May 2012 21:06:53 +0000 (21:06 +0000)]
Update FREEBSD-vendor to reflect the current version.

12 years agoMerge from OpenBSD 5.1.
delphij [Fri, 4 May 2012 21:03:39 +0000 (21:03 +0000)]
Merge from OpenBSD 5.1.

MFC after: 3 weeks

12 years agoAdd ToS definitions for DiffServ Codepoints as per RFC2474.
delphij [Fri, 4 May 2012 21:00:32 +0000 (21:00 +0000)]
Add ToS definitions for DiffServ Codepoints as per RFC2474.

Obtained from: OpenBSD
MFC after: 2 weeks

12 years agoFix a couple of sc_ac2q[] mappings that were using the TID, not the AC.
adrian [Fri, 4 May 2012 20:31:27 +0000 (20:31 +0000)]
Fix a couple of sc_ac2q[] mappings that were using the TID, not the AC.

PR: kern/167588

12 years agoDon't ignore start offset value when user specifies it together
ae [Fri, 4 May 2012 19:49:24 +0000 (19:49 +0000)]
Don't ignore start offset value when user specifies it together
with alignment.

PR: bin/167567
Tested by: Warren Block
MFC after: 1 week

12 years agoComplete commit message for r235024:
jkim [Fri, 4 May 2012 18:54:51 +0000 (18:54 +0000)]
Complete commit message for r235024:

Use MADT to match ACPI Processor objects to CPUs.  MADT and DSDT/SSDTs may
list CPUs in different orders, especially for disabled logical cores.  Now
we match ACPI IDs from the MADT with Processor objects, strictly order CPUs
accordingly, and ignore disabled cores.  This prevents us from executing
methods for other CPUs, e. g., _PSS for disabled logical core, which may not
exist.  Unfortunately, it is known that there are a few systems with buggy
BIOSes that do not have unique ACPI IDs for MADT and Processor objects.  To
work around these problems, 'debug.acpi.cpu_unordered' tunable is added.
Set this to a non-zero value to restore the old behavior.
Many thanks to jhb for pointing me to the right direction and the manual
page change.

Reported by: Harris, James R (james dot r dot harris at intel dot com)
Tested by: Harris, James R (james dot r dot harris at intel dot com)
Reviewed by: jhb
MFC after: 1 month

12 years agoUse MADT to match ACPI Processor objects to CPUs. MADT and DSDT/SSDTs may
jkim [Fri, 4 May 2012 18:24:38 +0000 (18:24 +0000)]
Use MADT to match ACPI Processor objects to CPUs.  MADT and DSDT/SSDTs may
list CPUs in different orders, especially for disabled logical cores.  Now
we match ACPI IDs from the MADT with Processor objects, strictly order CPUs
accordingly, and ignore disabled cores.  This prevents us from executing
methods for other CPUs, e. g., _PSS for disabled logical core, which may not
exist.  Unfortunately, it is known that there are a few systems with buggy
BIOSes that do not have unique ACPI IDs for MADT and Processor objects.  To
work around these problems

12 years agoAdd support for the SCTP_ENABLE_STREAM_RESET socket option to
tuexen [Fri, 4 May 2012 17:18:02 +0000 (17:18 +0000)]
Add support for the SCTP_ENABLE_STREAM_RESET socket option to
getsockopt(). This improves the support of RFC 6525.

MFC after: 3 days

12 years agoSome style improvements.
ambrisko [Fri, 4 May 2012 16:22:13 +0000 (16:22 +0000)]
Some style improvements.

12 years agoFirst fix pr 167226:
ambrisko [Fri, 4 May 2012 16:00:39 +0000 (16:00 +0000)]
First fix pr 167226:
ThunderBolt cannot read sector >= 2^32 or 2^21
with supplied patch.

Second the bigger change, fix RAID operation on ThunderBolt base
card such as physically removing a disk from a RAID and replacing
it.  The current situation is the RAID firmware effectively hangs
waiting for an acknowledgement from the driver.  This is due to
the firmware support of the driver actually accessing the RAID
from under the firmware.  This is an interesting feature that
the FreeBSD driver does not use.  However, when the firmare
detects the driver has attached it then expects the driver will
synchronize LD's with the firmware.  If the driver does not sync.
then the management part of the firmware will hang waiting for
it so a pulled driver will listed as still there.

The fix for this problem isn't extremely difficult.  However,
figuring out why some of the code was the way it was and then
redoing it was involved.  Not have a spec. made it harder to
try to figure out.  The existing driver would send a
MFI_DCMD_LD_MAP_GET_INFO command in write mode to acknowledge
a LD state change.  In read mode it gets the RAID map from the
firmware.  The FreeBSD driver doesn't do that currently.  It
could be added in the future with the appropriate structures.
To simplify things, get the current LD state and then build
the MFI_DCMD_LD_MAP_GET_INFO/write command so that it sends
an acknowledgement for each LD.  The map would probably state
which LD's changed so then the driver could probably just
acknowledge the LD's that changed versus all.  This doesn't seem
to be a problem.  When a MFI_DCMD_LD_MAP_GET_INFO/write command
is sent to the firmware, it will complete later when a change
to the LD's happen.  So it is very much like an AEN command
returning when something happened.  When the
MFI_DCMD_LD_MAP_GET_INFO/write command completes, we refire the
sync'ing of the LD state.  This needs to be done in as an event
so that MFI_DCMD_LD_GET_LIST can wait for that command to
complete before issuing the MFI_DCMD_LD_MAP_GET_INFO/write.
The prior code didn't use the call-back function and tried
to intercept the MFI_DCMD_LD_MAP_GET_INFO/write command when
processing an interrupt.  This added a bunch of code complexity
to the interrupt handler.  Using the call-back that is done
for other commands got rid of this need.  So the interrupt
handler is greatly simplified.  It seems that even commands
that shouldn't be acknowledged end up in the interrupt handler.
To deal with this, code was added to check to see if a command
is in the busy queue or not.  This might have contributed to the
interrupt storm happening without MSI enabled on these cards.

Note that MFI_DCMD_LD_MAP_GET_INFO/read returns right away.

It would be interesting to see what other complexity could
be removed from the ThunderBolt driver that really isn't
needed in our mode of operation.  Letting the RAID firmware
do all of the I/O to disks is a lot faster since it can
use its caches.  It greatly simplifies what the driver has
to do and potential bugs if the driver and firmware are
not in sync.

Simplify the aen_abort/cm_map_abort and put it in the softc
versus in the command structure.

This should get merged to 9 before the driver is merged to
8.

PR: 167226
Submitted by: Petr Lampa
MFC after: 3 days

12 years agoFix final bugs in memory barriers on PowerPC:
nwhitehorn [Fri, 4 May 2012 16:00:22 +0000 (16:00 +0000)]
Fix final bugs in memory barriers on PowerPC:
- Use isync/lwsync unconditionally for acquire/release. Use of isync
  guarantees a complete memory barrier, which is important for serialization
  of bus space accesses with mutexes on multi-processor systems.
- Go back to using sync as the I/O memory barrier, which solves the same
  problem as above with respect to mutex release using lwsync, while not
  penalizing non-I/O operations like a return to sync on the atomic release
  operations would.
- Place an acquisition barrier around thread lock acquisition in
  cpu_switchin().

12 years agoAdd support for SCTP_STREAM_CHANGE_EVENT, SCTP_ASSOC_RESET_EVENT as
tuexen [Fri, 4 May 2012 15:49:08 +0000 (15:49 +0000)]
Add support for SCTP_STREAM_CHANGE_EVENT, SCTP_ASSOC_RESET_EVENT as
required by RFC 6525. This also fixes SCTP_STREAM_RESET_EVENT.

MFC after: 3 days

12 years agoAdd bootcamp bootloader stamp
jpaetzel [Fri, 4 May 2012 15:39:41 +0000 (15:39 +0000)]
Add bootcamp bootloader stamp

Submitted by: kmoore
Obtained from: PC-BSD
MFC after: 3 days
Sponsored by: iXsystems

12 years agoAdd powerpc / powerpc64 support to pc-sysinstall. This patch will
jpaetzel [Fri, 4 May 2012 15:36:51 +0000 (15:36 +0000)]
Add powerpc / powerpc64 support to pc-sysinstall. This patch will
autodetect if on powerpc and use the APM gpart GEOM class
automaticaly.  At this time support for full disk installation is
the only supported scheme.

Submitted by: kmoore
Obtained from: PC-BSD
MFC after: 3 days
Sponsored by: iXsystems

12 years agoUse a unique zpool name during install, in the case of having another
jpaetzel [Fri, 4 May 2012 15:31:35 +0000 (15:31 +0000)]
Use a unique zpool name during install, in the case of having another
PC-BSD / FreeBSD zpool on the system for another install.

Submitted by: kmoore
Obtained from: PC-BSD
MFC after: 3 days
Sponsored by: iXsystems

12 years agoRemove debug output.
tuexen [Fri, 4 May 2012 10:26:50 +0000 (10:26 +0000)]
Remove debug output.

MFC after: 3 days

12 years agoCall panic() only under INVARIANTS.
tuexen [Fri, 4 May 2012 10:06:08 +0000 (10:06 +0000)]
Call panic() only under INVARIANTS.

MFC after: 3 days

12 years agoUse SCTP_PRINTF() instead of printf() in all SCTP sources.
tuexen [Fri, 4 May 2012 09:27:00 +0000 (09:27 +0000)]
Use SCTP_PRINTF() instead of printf() in all SCTP sources.

MFC after: 3 days

12 years agoFix bug causing memory corruption and panics with big-endian metadata.
mav [Fri, 4 May 2012 08:59:19 +0000 (08:59 +0000)]
Fix bug causing memory corruption and panics with big-endian metadata.

12 years agoImplement read-only support for volumes in optimal state (without using
mav [Fri, 4 May 2012 07:32:57 +0000 (07:32 +0000)]
Implement read-only support for volumes in optimal state (without using
redundancy) for the following RAID levels: RAID4/5E/5EE/6/MDF.

12 years agoDisable setting the MII port speed.
adrian [Fri, 4 May 2012 02:26:15 +0000 (02:26 +0000)]
Disable setting the MII port speed.

This seems to break at least my test board here (AR71xx + AR8316 switch
PHY).  Since I do have a whole sleuth of "normal" PHY boards (with
an AR71xx on a normal PHY port), I'll do some further testing with those
to determine whether this is a general issue, or whether it's limited
to the behaviour of the "fake" dedicated PHY port mode on these atheros
switches.

12 years agoFix some issues creating zpool mirror / raidz1(2)(3) devices.
jpaetzel [Thu, 3 May 2012 21:53:25 +0000 (21:53 +0000)]
Fix some issues creating zpool mirror / raidz1(2)(3) devices.
Fix issues stamping boot on other ZFS drives, now you can boot after removing
mirror drive.

Submitted by: kmoore
Obtained from: PC-BSD
MFC after: 3 days
Sponsored by: iXsystems

12 years agoRevert part of r234723 by re-enabling the SMP protection for
attilio [Thu, 3 May 2012 21:44:01 +0000 (21:44 +0000)]
Revert part of r234723 by re-enabling the SMP protection for
intr_bind() on x86.
This has been requested by jhb and I strongly disagree with this,
but as long as he is the x86 and interrupt subsystem maintainer I will
follow his directives.

The disagreement cames from what we should really consider as a
public KPI. IMHO, if we really need a selection between the kernel
functions, we may need an explicit protection like _KERNEL_KPI, which
defines which subset of the kernel function might really be considered
as part of the KPI (for thirdy part modules) and which not.
As long as we don't have this mechanism I just consider any possible
function as usable by thirdy part code, thus intr_bind() included.

MFC after: 1 week

12 years agoAdd a meta-parameter IP__NULL to enum intparam, instead of mixing
jamie [Thu, 3 May 2012 21:39:23 +0000 (21:39 +0000)]
Add a meta-parameter IP__NULL to enum intparam, instead of mixing
enum values and zeroes.  This keeps clang happy (and is just good form).

Submitted by: dim

12 years agoAdd the ability to configure multiple interfaces.
jpaetzel [Thu, 3 May 2012 21:21:45 +0000 (21:21 +0000)]
Add the ability to configure multiple interfaces.

Submitted by: glarkin
Obtained from: PC-BSD
MFC after: 3 days

12 years agoprint 'netmap stack ring full' only in verbose mode.
luigi [Thu, 3 May 2012 21:16:53 +0000 (21:16 +0000)]
print 'netmap stack ring full' only in verbose mode.

12 years agoFix parsing values which contain multiple "=" signs.
jpaetzel [Thu, 3 May 2012 21:15:47 +0000 (21:15 +0000)]
Fix parsing values which contain multiple "=" signs.

Submitted by: glarkin
MFC after: 3 days
Sponsored by: iXsystems

12 years agoindicate the time per packet in nanoseconds.
luigi [Thu, 3 May 2012 21:03:21 +0000 (21:03 +0000)]
indicate the time per packet in nanoseconds.

12 years agoOmit clang when building picobsd, it takes way too long.
luigi [Thu, 3 May 2012 20:50:55 +0000 (20:50 +0000)]
Omit clang when building picobsd, it takes way too long.
Also note that loader.conf support is incomplete.

12 years agoUpgrade our copy of llvm/clang to r155985, from upstream's release_31
dim [Thu, 3 May 2012 20:41:21 +0000 (20:41 +0000)]
Upgrade our copy of llvm/clang to r155985, from upstream's release_31
branch.  This brings us very close to the 3.1 release, which is planned
for May 14th.

MFC after: 2 weeks

12 years agoMove the code to call the callout callback into the helper function
kib [Thu, 3 May 2012 20:00:30 +0000 (20:00 +0000)]
Move the code to call the callout callback into the helper function
softclock_call_cc(). While there, move some common code to callout_cc_del().

Requested by: avg, jhb
Reviewed by: jhb
MFC after:    1 week

12 years agoImport new version of libc++. Among other improvements, this comes with an
theraven [Thu, 3 May 2012 17:44:07 +0000 (17:44 +0000)]
Import new version of libc++.  Among other improvements, this comes with an
<atomic> header that works with clang 3.1 (and, importantly, the pre-3.1
snapshot currently in head)

12 years agoadd support for pcap receive statistics (used by net-mgmt/darkstat)
luigi [Thu, 3 May 2012 17:08:40 +0000 (17:08 +0000)]
add support for pcap receive statistics (used by net-mgmt/darkstat)

12 years agoVendor import of clang release_31 branch r155985:
dim [Thu, 3 May 2012 16:53:59 +0000 (16:53 +0000)]
Vendor import of clang release_31 branch r155985:
http://llvm.org/svn/llvm-project/cfe/branches/release_31@155985

12 years agoVendor import of llvm release_31 branch r155985:
dim [Thu, 3 May 2012 16:50:55 +0000 (16:50 +0000)]
Vendor import of llvm release_31 branch r155985:
http://llvm.org/svn/llvm-project/llvm/branches/release_31@155985

12 years agoadd some performance data
luigi [Thu, 3 May 2012 16:09:44 +0000 (16:09 +0000)]
add some performance data

12 years agoMake sure the EHCI bandwidth allocation algorithm
hselasky [Thu, 3 May 2012 16:06:22 +0000 (16:06 +0000)]
Make sure the EHCI bandwidth allocation algorithm
for FULL speed SPLIT transactions works fully.

MFC after: 1 week

12 years agoFix <stdatomic.h> after clang decided to rename all of its builtins to include
theraven [Thu, 3 May 2012 15:54:06 +0000 (15:54 +0000)]
Fix <stdatomic.h> after clang decided to rename all of its builtins to include
a c11 prefix to disambiguate them from the one provided by GCC.

Note: Clang 3.1 also supports the GCC builtins for libstdc++ 4.7 compatibility,
but I don't recommend using them because they are very poorly designed.

MFC after: 2 weeks

12 years agoCheck vplabel for NULL before dereferencing it. Fixes a panic
brueffer [Thu, 3 May 2012 15:51:34 +0000 (15:51 +0000)]
Check vplabel for NULL before dereferencing it.  Fixes a panic
when running atop with MAC_MLS enabled.

Submitted by: Richard Kojedzinszky <krichy@tvnetwork.hu>
Reviewed by: rwatson
MFC after: 1 week

12 years ago- add code to run pkt-gen on top of libpcap so we can see the
luigi [Thu, 3 May 2012 15:37:05 +0000 (15:37 +0000)]
- add code to run pkt-gen on top of libpcap so we can see the
  difference from a native API

- add some testing options, such as conditional prefetching and
  packet copy.

12 years ago- correct a bug in pcap_dispatch(): a count of 0 means infinity.
luigi [Thu, 3 May 2012 15:34:44 +0000 (15:34 +0000)]
- correct a bug in pcap_dispatch(): a count of 0 means infinity.

- in pcap_dispatch(), issue a prefetch on the buffer before the
  callback, this may save a little bit of time if the client
  is very fast.

- in pcap_inject(), use a fast copy routine, which also helps
  saving a few nanoseconds with fast clients.

12 years agoFix multiple OpenSSL vulnerabilities.
bz [Thu, 3 May 2012 15:25:11 +0000 (15:25 +0000)]
Fix multiple OpenSSL vulnerabilities.

Security: CVE-2011-4576, CVE-2011-4619, CVE-2011-4109
Security: CVE-2012-0884, CVE-2012-2110
Security: FreeBSD-SA-12:01.openssl
Approved by: so (bz,simon)

12 years agoGrammar and markup fixes.
bjk [Thu, 3 May 2012 13:08:11 +0000 (13:08 +0000)]
Grammar and markup fixes.

PR: docs/159854
Approved by: hrs (mentor)

12 years agoWhen callout_reset_on() cannot immediately migrate a callout since it
kib [Thu, 3 May 2012 10:38:02 +0000 (10:38 +0000)]
When callout_reset_on() cannot immediately migrate a callout since it
is running on other cpu, the CALLOUT_PENDING flag is temporarily
cleared. Then, callout_stop() on this, in fact active, callout fails
because CALLOUT_PENDING is not set, and callout_stop() returns 0.

Now, in sleepq_check_timeout(), the failed callout_stop() causes the
sleepq code to execute mi_switch() without even setting the wmesg,
since the switch-out is supposed to be transient. In fact, the thread
is put off the CPU for full timeout interval, instead of being put on
runq immediately.  Until timeout fires, the process is unkillable for
obvious reasons.

Fix this by marking the migrating callouts with CALLOUT_DFRMIGRATION
flag. The flag is cleared by callout_stop_safe() when the function
detects a migration, besides returning the success. The softclock()
rechecks the flag for migrating callout and cancels its execution if
the flag was cleared meantime.

PR:  misc/166340
Reported, debugging traces provided and tested by:
Christian Esken <christian.esken trivago com>
Reviewed by:  avg, jhb
MFC after:  1 week

12 years agoFix another RFC 6458 issue. Spotted by Irene Ruengeler.
tuexen [Thu, 3 May 2012 10:26:33 +0000 (10:26 +0000)]
Fix another RFC 6458 issue. Spotted by Irene Ruengeler.

MFC after: 3 days

12 years agoMFp4:
davidxu [Thu, 3 May 2012 09:17:31 +0000 (09:17 +0000)]
MFp4:
Enqueue thread in LIFO, this can cause starvation, but it gives better
performance. Use _thr_queuefifo to control the frequency of FIFO vs LIFO,
you can use environment string LIBPTHREAD_QUEUE_FIFO to configure the
variable.

12 years agoRevert r234834 per luigi@ request.
melifaro [Thu, 3 May 2012 08:56:43 +0000 (08:56 +0000)]
Revert r234834 per luigi@ request.

Cleaner solution (e.g. adding another header) should be done here.

Original log:
  Move several enums and structures required for L2 filtering from ip_fw_private.h to ip_fw.h.
  Remove ipfw/ip_fw_private.h header from non-ipfw code.

Requested by:      luigi
Approved by:       kib(mentor)

12 years agoIn the new world order, multiphy is now when the phymask is 0x0.
adrian [Thu, 3 May 2012 07:48:19 +0000 (07:48 +0000)]
In the new world order, multiphy is now when the phymask is 0x0.

This makes the TP-WN1043ND (ar913x based) work again.

12 years agofixed a unionfs_readdir math issue
daichi [Thu, 3 May 2012 07:22:29 +0000 (07:22 +0000)]
fixed a unionfs_readdir math issue

PR: 132987
Submitted by: Matthew Fleming <mfleming@isilon.com>

12 years agoFix a totally bone-headed, last minute bounds check snafu that somehow
adrian [Thu, 3 May 2012 05:52:39 +0000 (05:52 +0000)]
Fix a totally bone-headed, last minute bounds check snafu that somehow
I must've missed when booting a test kernel.

This has been validated on the AR7161.

12 years agoAdd optional -o argument to the `graid label ` to specify some metadata
mav [Thu, 3 May 2012 05:32:56 +0000 (05:32 +0000)]
Add optional -o argument to the `graid label ` to specify some metadata
format options. Use it for specifying byte order for the DDF metadata:
big-endian defined by specification and little-endian used by Adaptec.

12 years agoRelax restriction on direct tx to child ports
emaste [Thu, 3 May 2012 01:41:12 +0000 (01:41 +0000)]
Relax restriction on direct tx to child ports

Lagg(4) restricts the type of packet that may be sent directly to a child
port, to avoid undesired output from accidental misconfiguration.
Previously only ETHERTYPE_PAE was permitted.

BPF writes to a lagg(4) child port are presumably intentional, so just
allow them, while still blocking other packets that should take the
aggregation path.

PR: kern/138620
Approved by: thompsa@

12 years agoPrefer the use of csup to cvsup when talking about the binary.
eadler [Wed, 2 May 2012 21:50:13 +0000 (21:50 +0000)]
Prefer the use of csup to cvsup when talking about the binary.

PR: docs/167459
Submitted by: "Bryan Drewery" <bryan@shatow.net>
Approved by: bcr
MFC after: 1 week

12 years agoAdd YY_NO_INPUT so clang doesn't complain about "input" not being used.
jamie [Wed, 2 May 2012 21:24:08 +0000 (21:24 +0000)]
Add YY_NO_INPUT so clang doesn't complain about "input" not being used.

12 years agoUpdate man page date to the date of the last commit.
monthadar [Wed, 2 May 2012 20:01:28 +0000 (20:01 +0000)]
Update man page date to the date of the last commit.

Approved by: adrian

12 years agoAdded D_TRACKCLOSE to sndstat_cdevsw to fix the situation when
pho [Wed, 2 May 2012 19:32:11 +0000 (19:32 +0000)]
Added D_TRACKCLOSE to sndstat_cdevsw to fix the situation when
another process is in open() or stat() for the device node, then
close() from the owning process does not result in cdevsw close
method call. This fixes the pemanent "Device busy" seen.

Changed the sndstat_lock from mutex to sx.  This allows to extend
the region covered by the lock, to include the uiomove() call in
sndstat_read() and bufptr increment. This fixes the "panic:
sbuf_put_byte called with finished or corrupt sbuf" seen.

In collaboration with: kib
MFC after: 1 week

12 years agoFix comment about what board this is really for left over from early
imp [Wed, 2 May 2012 18:41:58 +0000 (18:41 +0000)]
Fix comment about what board this is really for left over from early
cut and paste.

12 years agoFix so that ,usr and ,os work correctly with fixed function (IAF)
gnn [Wed, 2 May 2012 16:23:36 +0000 (16:23 +0000)]
Fix so that ,usr and ,os work correctly with fixed function (IAF)
counters.

MFC after: 1 week

12 years agoCatch-up with r232853 and remove platform APIs which are not used by any
bz [Wed, 2 May 2012 14:38:43 +0000 (14:38 +0000)]
Catch-up with r232853 and remove platform APIs which are not used by any
code and which had only stub implementations or no implementation on all
platforms.  Makes gxemul compile.

Hinted by: rwatson
MFC after: 3 weeks
X-MFC by: rwatson:

12 years ago- Don't log messages saying that accounting is being disabled and enabled
jhb [Wed, 2 May 2012 14:25:39 +0000 (14:25 +0000)]
- Don't log messages saying that accounting is being disabled and enabled
  if the accounting log file is atomically replaced with a new file
  (such as during log rotation).
- Simplify accounting log rotation a bit.  There is no need to re-run
  accton(8) after renaming the new log file to it's real name.

PR: kern/167321
Tested by: Jeremy Chadwick

12 years agomips/mips64eb became mips/mips64 while I wasn't looking (whoops), so update
rwatson [Wed, 2 May 2012 12:15:34 +0000 (12:15 +0000)]
mips/mips64eb became mips/mips64 while I wasn't looking (whoops), so update
GXEMUL kernel config for the new world order.

Spotted by: bz
MFC after: 3 weeks

12 years agoBump __FreeBSD_version due to jemalloc import.
jasone [Wed, 2 May 2012 10:15:42 +0000 (10:15 +0000)]
Bump __FreeBSD_version due to jemalloc import.

12 years agoThe PIT is really 16 bytes long (0x10) not 10 bytes long. Doesn't
imp [Wed, 2 May 2012 09:19:42 +0000 (09:19 +0000)]
The PIT is really 16 bytes long (0x10) not 10 bytes long.  Doesn't
matter much, since these defines are unused...

Obtained from: AT91SAM9G20 datasheet

12 years agoClean up various aspects of the MIPS generic busspace implementation:
rwatson [Wed, 2 May 2012 08:23:53 +0000 (08:23 +0000)]
Clean up various aspects of the MIPS generic busspace implementation:

1) Always implement missing bus space methods using a panic() stub rather
   than a NULL pointer.  This appeared not to trip up any existing device
   drivers, but due to the nature of the devices I'm supporting locally,
   I'm making use of some of the more obscure busspace methods, and
   panic() is a preferred failure mode.  For example, do this for the
   setregion methods.

2) Hook up several existing busspace method implementations that were
   provided in the file, but not actually present in the methods
   structure.  Especially, single-byte bus I/O routines.  This should
   allow bugs to be fixed in the Atheros 802.11 driver.

There are still some remaining unimplemented methods that would be
desirable to implement -- especially, 64-bit I/O calls that would
observably accelerate device performance on FPGA-based soft CPU cores
that are typically clocked an order of magnitude slower than
conventional hard core CPUs, but that remains for another day.

MFC after: 3 weeks
Discussed with: jmallett, scottl
Sponsored by: DARPA, AFRL

12 years agoMerge a rudimentary gxemul "oldtestmips" port. This consists almost
rwatson [Wed, 2 May 2012 08:10:15 +0000 (08:10 +0000)]
Merge a rudimentary gxemul "oldtestmips" port.  This consists almost
entirely of one machdep file lifted from the MALTA port, as well as
a low-level console and tty driver for the gxemul debugging console
device (the emulators stdio).  As with many low-level embedded and
hypervisor console devices, it is polled only, so we drive TTY I/O
from a callout; we are perhaps a bit too aware of the MIPS physical
maps in order to attach the console before newbus comes to life.

The sample kernel configuration depends on an MD-based root file
system, which is not provided.  However, any 64-bit, big-endian
userspace image (such as one generated for MALTA) should work.

This will hopefully be supplemented by additional device drivers for
gxemul-specific hardware simulations from Juli Mallett.  We have
found oldtestmips quite useful for testing and improving aspects of
the MIPS port, so it's worth supporting better in FreeBSD.

Requested by: theraven, jmallett
Sponsored by: DARPA, AFRL
MFC after: 3 weeks

12 years agoImplement PLL configuration override support, similar to what openwrt
adrian [Wed, 2 May 2012 07:43:11 +0000 (07:43 +0000)]
Implement PLL configuration override support, similar to what openwrt
implements.

12 years agoDisable the pll_1000 hint for now, the upcoming work enables it and it
adrian [Wed, 2 May 2012 07:41:26 +0000 (07:41 +0000)]
Disable the pll_1000 hint for now, the upcoming work enables it and it
breaks without the switch PHY code.

12 years ago* Force the ethernet MII configuration to be RGMII
adrian [Wed, 2 May 2012 06:19:26 +0000 (06:19 +0000)]
* Force the ethernet MII configuration to be RGMII
* Populate the "pll_1000" field, which will soon be used to override the
  PLL configuration from the default value.

Obtained from: Linux OpenWRT

12 years agoAllow the MII mode to be overridden via 'hint.arge.X.miimode'.
adrian [Wed, 2 May 2012 06:18:12 +0000 (06:18 +0000)]
Allow the MII mode to be overridden via 'hint.arge.X.miimode'.

It takes a number at the moment, rather than a string.

Some of the Linux board configurations specify the MII mode explicitly.

12 years agoAdd a missing newline.
adrian [Wed, 2 May 2012 06:17:16 +0000 (06:17 +0000)]
Add a missing newline.

12 years agoRemove some redundant register loads.
kientzle [Wed, 2 May 2012 05:49:58 +0000 (05:49 +0000)]
Remove some redundant register loads.

Discussed on: arm@

12 years agoFurther ar71xx MII support improvements.
adrian [Wed, 2 May 2012 04:51:43 +0000 (04:51 +0000)]
Further ar71xx MII support improvements.

* Flesh out the PLL configuration fetch function, which will return the PLL
  configuration based on the unit number and speed.
* Remove the PLL speed config logic from the AR71xx/AR91xx chip PLL config
  function - pass in a 'pll' value instead.
* Modify arge_set_pll() to:
  + fetch the PLL configuration
  + write the PLL configuration
  + update the MII speed configuration.

This will allow if_arge to override the PLL configuration as required.

Obtained from: Linux/Atheros/OpenWRT

12 years agoMII related infrastructure changes.
adrian [Wed, 2 May 2012 01:21:57 +0000 (01:21 +0000)]
MII related infrastructure changes.

* Add a new method to set the MII mode - GMII, RGMII, RMII, MII.
  + arge0 supports all four (two for non-Gige interfaces.)
  + arge1 only supports two (one for non-gige interfaces.)
* Set the MII clock speed when changing the MAC PLL speed.
  + Needed for AR91xx and AR71xx; not needed for AR724x.

Tested:

* AR71xx only, I'll do AR913x testing tonight and fix whichever issues
  creep up.

TODO:

* Implement the missing AR7242 arge0 PLL configuration, but don't
  adjust the MII speed accordingly.
* .. the AR7240/AR7241 don't require this, so make sure it's not set
  accidentally.

Bugs (not fixed here):

* Statically configured arge speeds are still broken - investigate why
  that is on the AP96 board.  Autonegotiate is working fine, but there
  still seems to be an occasionally heavy packet loss issue.

Obtained from: Linux/Atheros/OpenWRT

12 years agoIntroduce an enum which encapsulates the PHY interface types that can be
adrian [Wed, 2 May 2012 01:14:15 +0000 (01:14 +0000)]
Introduce an enum which encapsulates the PHY interface types that can be
configured.

12 years ago- Add missing locking in at91_usart_getc().
marius [Tue, 1 May 2012 20:42:03 +0000 (20:42 +0000)]
- Add missing locking in at91_usart_getc().
- Align the RX buffers on the cache line size, otherwise the requirement
  of partial cache line flushes on every are pretty much guaranteed. [1]
- Make the code setting the RX timeout match its comment (apparently,
  start and stop bits were missed in the previous calculation). [1]
- Cover the busdma operations in at91_usart_bus_{ipend,transmit}() with
  the hardware mutex, too, so these don't race against each other.
- In at91_usart_bus_ipend(), reduce duplication in the code dealing with
  TX interrupts.
- In at91_usart_bus_ipend(), turn the code dealing with RX interrupts
  into an else-if cascade in order reduce its complexity and to improve
  its run-time behavior.
- In at91_usart_bus_ipend(), add missing BUS_DMASYNC_PREREAD calls on
  the RX buffer map before handing things over to the hardware again. [1]
- In at91_usart_bus_getsig(), used a variable of sufficient width for
  storing the contents of USART_CSR.
- Use KOBJMETHOD_END.
- Remove an unused header.

Submitted by: Ian Lepore [1]
Reviewed by: Ian Lepore
MFC after: 1 week

12 years agoAdd in the MII configuration parameters for the AR71xx.
adrian [Tue, 1 May 2012 20:32:38 +0000 (20:32 +0000)]
Add in the MII configuration parameters for the AR71xx.

Obtained from: Linux/OpenWRT

12 years agoImprove spare disks support. Unluckily, for some reason Adaptec 1430SA
mav [Tue, 1 May 2012 18:00:31 +0000 (18:00 +0000)]
Improve spare disks support. Unluckily, for some reason Adaptec 1430SA
RAID BIOS doesn't want to understand spare disks created by graid. But
at least spares created by BIOS are working fine now.

12 years agoAdd initial support for booting from ZFS on sparc64. At least on Sun Fire
marius [Tue, 1 May 2012 17:16:01 +0000 (17:16 +0000)]
Add initial support for booting from ZFS on sparc64. At least on Sun Fire
V100, the firmware is known to be broken and not allowing to simultaneously
open disk devices, causing attempts to boot from a mirror or RAIDZ to cause
a crash. This will be worked around later. The firmwares of newer sun4u models
don't seem to exhibit this problem though.

Steps for ZFS booting:

1. create VTOC8 label
# gpart create -s vtoc8 da0

2. add partitions, f.e.:
# gpart add -t freebsd-zfs -s 60g da0
# gpart add -t freebsd-swap da0
resulting in something like:
# gpart show
=>        0  143331930  da0  VTOC8  (68G)
          0  125821080    1  freebsd-zfs  (60G)
  125821080   17510850    2  freebsd-swap  (8.4G)

3. create zpool
# zpool create bunker da0a
or for mirror/RAIDZ (after preparing additional disks as in steps 1. + 2.):
# zpool create bunker mirror da0a da1a
# zpool create bunker raidz da0a da1a da2a ...

4. set bootfs
# zpool set bootfs=bunker bunker

5. install zfsboot
# zpool export bunker
# gpart bootcode -p /boot/zfsboot da0

6. write zfsloader to the ZFS Boot Block (so far, there's no dedicated tool
for this, so dd(1) has to be used for this purpose)
When using mirror/RAIDZ, step 4. and the dd(1) invocation should be repeated
for the additional disks in order to be able to boot from another disk in
case of failure.
# sysctl kern.geom.debugflags=0x10
# dd if=/boot/zfsloader of=/dev/da0a bs=512 oseek=1024 conv=notrunc
# zpool import bunker

7. install system on ZFS filesystem
Don't forget to set 'zfs_load="YES"' and vfs.root.mountfrom="zfs:bunker" in
loader.conf as well as 'zfs_enable="YES"'in rc.conf.

8. copy zpool.cache to the ZFS filesystem
cp -p /boot/zfs/zpool.cache /bunker/boot/zfs/zpool.cache

9. set mountpoint
# zfs set mountpoint=/ bunker

10. Now, given that aliases for all disks in the zpool exists (check with
the `devalias` command on the boot monitor prompt) and disk0 corresponds
to da0 (likewise for additional disks), the system can be booted from the
ZFS with:
{1} ok boot disk0

PR:             165025
Submitted by:   Gavin Mu

12 years agoAdd a command for showing the heap usage.
marius [Tue, 1 May 2012 16:38:33 +0000 (16:38 +0000)]
Add a command for showing the heap usage.

PR: 165025
Submitted by: Gavin Mu
MFC after: 1 week

12 years agoUpdate HWMP Proactive code and mesh route flags.
monthadar [Tue, 1 May 2012 16:18:38 +0000 (16:18 +0000)]
Update HWMP Proactive code and mesh route flags.

* Modified hwmp_recv_preq:
    o cleaned up code, removed rootmac variable because preq->origaddr
      is the root when we recevie a Proactive PREQ;
    o Modified so that a PREP in response of a Proactive PREQ is unicast,
      a PREP is ALWAYS unicast;
* Modified hwmp_recv_prep:
    o Before we mark a route to be valid we should remove the discovery
      flag and then mark it valid in such a way we wont lose the isgate flag;

Approved by: adrian