]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoMake an attempt to detect missing MTREE files in distrib-dirs. Not
Brooks Davis [Tue, 30 Apr 2013 19:26:44 +0000 (19:26 +0000)]
Make an attempt to detect missing MTREE files in distrib-dirs.  Not
perfect, but this is just a developer seatbelt.

PR: conf/176897
Submitted by: Garrett Cooper <yaneurabeya@gmail.com>
MFC after: 1 week

11 years agoMFP4 change 222060:
Brooks Davis [Tue, 30 Apr 2013 18:48:11 +0000 (18:48 +0000)]
MFP4 change 222060:

On Intel devices, put the Factory PPR in kenv.  On some FPGA boards it may
be the only software accessable unique ID.

Sponsored by: DARPA, AFRL

11 years agoMFP4 changes 222065 and 222068:
Brooks Davis [Tue, 30 Apr 2013 18:33:29 +0000 (18:33 +0000)]
MFP4 changes 222065 and 222068:

Add a simplebus attachment for cfi(4)'s FDT support and move
cfi_bus_fdt.c to sys/conf/files so non-ppc architectures are supported.

Sponsored by: DARPA, AFRL

11 years agoPartial MFC of change 228122:
Brooks Davis [Tue, 30 Apr 2013 18:29:05 +0000 (18:29 +0000)]
Partial MFC of change 228122:

Due to the requirement that tty prefixes be unique per driver, rename
the Altera JTAG UART devices to ttyj#.

Sponsored by: DARPA, AFRL

11 years agoWrap the creation of the ../include link in /usr/lib in
Brooks Davis [Tue, 30 Apr 2013 18:14:22 +0000 (18:14 +0000)]
Wrap the creation of the ../include link in /usr/lib in
!defined(LIBRARIES_ONLY) so it is only created once on architectures
with 32-bit compat support.

Replace ln -fhs with ${INSTALL_SYMLINK} to the link is logged in the
METALOG.

11 years agoFix the man page installation broken in r250079. Pointy hat to me.
Carl Delsey [Tue, 30 Apr 2013 16:59:25 +0000 (16:59 +0000)]
Fix the man page installation broken in r250079. Pointy hat to me.

Thanks to Florian Smeets for pointing this out and providing a patch.

Submitted by: Florian Smeets <flo@smeets.im>
Approved by: jimharris (mentor)

11 years agouse netmap_rx_irq() and netmap_tx_irq() instead of replicating the
Luigi Rizzo [Tue, 30 Apr 2013 16:51:58 +0000 (16:51 +0000)]
use netmap_rx_irq() and netmap_tx_irq() instead of replicating the
logic in the individual driver.

11 years agouse netmap_rx_irq() / netmap_tx_irq() to handle interrupts in
Luigi Rizzo [Tue, 30 Apr 2013 16:18:29 +0000 (16:18 +0000)]
use netmap_rx_irq() / netmap_tx_irq() to handle interrupts in
netmap mode, removing the logic from individual drivers.

(note: if_lem.c not updated yet due to some other pending modifications)

11 years agoPartial cleanup in preparation for upcoming changes:
Luigi Rizzo [Tue, 30 Apr 2013 16:08:34 +0000 (16:08 +0000)]
Partial cleanup in preparation for upcoming changes:

- netmap_rx_irq()/netmap_tx_irq() can now be called by FreeBSD drivers
  hiding the logic for handling NIC interrupts in netmap mode.
  This also simplifies the case of NICs attached to VALE switches.
     Individual drivers will be updated with separate commits.

- use the same refcount() API for FreeBSD and linux

- plus some comments, typos and formatting fixes

Portions contributed by Michio Honda

11 years agoremove $Id$ (whitespace change)
Luigi Rizzo [Tue, 30 Apr 2013 16:00:21 +0000 (16:00 +0000)]
remove $Id$ (whitespace change)

11 years agomalloc(9) cannot return NULL if M_WAITOK flag is specified.
Davide Italiano [Tue, 30 Apr 2013 15:59:22 +0000 (15:59 +0000)]
malloc(9) cannot return NULL if M_WAITOK flag is specified.

11 years agoForgot to update UPDATING in head last night.
Dag-Erling Smørgrav [Tue, 30 Apr 2013 15:38:31 +0000 (15:38 +0000)]
Forgot to update UPDATING in head last night.

11 years agoThe Intel PMC architectural events have encodings which are identical to
Davide Italiano [Tue, 30 Apr 2013 15:31:45 +0000 (15:31 +0000)]
The Intel PMC architectural events have encodings which are identical to
those of some non-architectural core events. This is not a problem in the
general case as long as there's an 1:1 mapping between the two, but there
are few exceptions. For example, 3CH_01H on Nehalem/Westmere represents
both unhalted-reference-cycles and CPU_CLK_UNHALTED.REF_P.
CPU_CLK_UNHALTED.REF_P on the aforementioned architectures does not measure
reference (i.e. bus) but TSC, so there's the need to disambiguate.
In order to avoid the namespace collision rename all the architectural
events in a way they cannot be ambigous and refactor the architectural
events handling function to reflect this change.
While here, per Jim Harris request, rename
iap_architectural_event_is_unsupported() to iap_event_is_architectural().

Discussed with: jimharris
Reviewed by: jimharris, gnn

11 years agosocket: Make shutdown() wake up a blocked accept().
Jilles Tjoelker [Tue, 30 Apr 2013 15:06:30 +0000 (15:06 +0000)]
socket: Make shutdown() wake up a blocked accept().

A blocking accept (and some other operations) waits on &so->so_timeo. Once
it wakes up, it will detect the SBS_CANTRCVMORE bit.

The error from accept() is [ECONNABORTED] which is not the nicest one -- the
thread calling accept() needs to know out-of-band what is happening.

A spurious wakeup on so->so_timeo appears harmless (sleep retried) except
when lingering on close (SO_LINGER, and in that case there is no descriptor
to call shutdown() on) so this should be fairly safe.

A shutdown() already woke up a blocked accept() for TCP sockets, but not for
Unix domain sockets. This fix is generic for all domains.

This patch was sent to -hackers@ and -net@ on April 5.

MFC after: 2 weeks

11 years agoComplete r250097:
Davide Italiano [Tue, 30 Apr 2013 14:56:41 +0000 (14:56 +0000)]
Complete r250097:
Do not change the initialization order in pmc_intel_initialize().

11 years agosupport for sshd (newer config file location)
Luigi Rizzo [Tue, 30 Apr 2013 13:20:11 +0000 (13:20 +0000)]
support for sshd (newer config file location)

11 years agosync with my local copy (this file may go away, eventually)
Luigi Rizzo [Tue, 30 Apr 2013 13:13:32 +0000 (13:13 +0000)]
sync with my local copy (this file may go away, eventually)

11 years agoWhen hwpmc(4) module is unloaded it reports a double leakage. This happens
Davide Italiano [Tue, 30 Apr 2013 08:33:38 +0000 (08:33 +0000)]
When hwpmc(4) module is unloaded it reports a double leakage. This happens
at least if FreeBSD is ran under VirtualBox. In order to avoid the leakage,
properly deallocate structures in case CPU claims that hw performance
monitoring counters are not supported.

Reported by: hiren

11 years agoFixup Westmere hwpmc(4) support: add missing CPU flag so that
Davide Italiano [Tue, 30 Apr 2013 08:18:08 +0000 (08:18 +0000)]
Fixup Westmere hwpmc(4) support: add missing CPU flag so that
intrucion-retired, llc-misses and llc-reference events can now be
allocated.

Reviewed by: jimharris, gnn

11 years agoAdapt to the fact that minidumps are now on by default.
Joel Dahl [Tue, 30 Apr 2013 07:22:03 +0000 (07:22 +0000)]
Adapt to the fact that minidumps are now on by default.

PR: 177188

11 years agoAttach to the T580 (2 x 40G) card.
Navdeep Parhar [Tue, 30 Apr 2013 06:30:21 +0000 (06:30 +0000)]
Attach to the T580 (2 x 40G) card.

MFC after: 1 week.

11 years ago- Provide accurate ifmedia information so that 40G ports/transceivers are
Navdeep Parhar [Tue, 30 Apr 2013 05:51:52 +0000 (05:51 +0000)]
- Provide accurate ifmedia information so that 40G ports/transceivers are
  displayed properly in ifconfig, etc.

- Use the same number of tx and rx queues for a 40G port as for a 10G port.

MFC after: 1 week

11 years agocxgbe(4): Some updates to shared code.
Navdeep Parhar [Tue, 30 Apr 2013 05:32:07 +0000 (05:32 +0000)]
cxgbe(4): Some updates to shared code.

Obtained from: Chelsio
MFC after: 1 week

11 years agoPass a format string to kproc_create() [1] and thus fix the build with
Sergey Kandaurov [Tue, 30 Apr 2013 05:08:17 +0000 (05:08 +0000)]
Pass a format string to kproc_create() [1] and thus fix the build with
-DBKTR_NEW_MSP34XX_DRIVER and -Wformat-security.
This also allows to eliminates a superfluous malloc/snprintf/free on
intermediate buffer.

PR: kern/175546
MFC after: 1 week

11 years agoOh wow.. disassociate/disown any connection with cvs.
Peter Wemm [Tue, 30 Apr 2013 01:15:10 +0000 (01:15 +0000)]
Oh wow.. disassociate/disown any connection with cvs.

11 years agoReset some more softc state when the guest resets the virtio network device.
Neel Natu [Tue, 30 Apr 2013 01:14:54 +0000 (01:14 +0000)]
Reset some more softc state when the guest resets the virtio network device.

Obtained from: NetApp

11 years agoUse a separate mutex for the receive path instead of overloading the softc
Neel Natu [Tue, 30 Apr 2013 00:36:16 +0000 (00:36 +0000)]
Use a separate mutex for the receive path instead of overloading the softc
mutex for this purpose.

Reviewed by: grehan

11 years agoSync from git - ah_config is in 'ath_hal', not 'ath_hal_private' on
Adrian Chadd [Mon, 29 Apr 2013 23:57:41 +0000 (23:57 +0000)]
Sync from git - ah_config is in 'ath_hal', not 'ath_hal_private' on
FreeBSD.

11 years agoxenstore/xenstore.c:
Justin T. Gibbs [Mon, 29 Apr 2013 23:08:13 +0000 (23:08 +0000)]
xenstore/xenstore.c:
Prevent access to invalid memory region when listing an empty
directory in the XenStore.

Reported by: Bei Guan
MFC after: 1 week

11 years agoAdd a new driver to support the Intel Non-Transparent Bridge(NTB).
Carl Delsey [Mon, 29 Apr 2013 22:48:53 +0000 (22:48 +0000)]
Add a new driver to support the Intel Non-Transparent Bridge(NTB).

The NTB allows you to connect two systems with this device using a PCI-e
link. The driver is made of two modules:
 - ntb_hw which is a basic hardware abstraction layer for the device.
 - if_ntb which implements the ntb network device and the communication
   protocol.

The driver is limited at the moment to CPU memcpy instead of using DMA, and
only Back-to-Back mode is supported. Also the network device isn't full
featured yet. These changes will be coming soon. The DMA change will also
bring in the ioat driver from the project branch it is on now.

This is an initial port of the GPL/BSD Linux driver contributed by Jon Mason
from Intel. Any bugs are my contributions.

Sponsored by: Intel
Reviewed by: jimharris, joel (man page only)
Approved by: jimharris (mentor)

11 years agoProperly terminate the result string for intermediate results, to
Konstantin Belousov [Mon, 29 Apr 2013 21:12:25 +0000 (21:12 +0000)]
Properly terminate the result string for intermediate results, to
allow the final strcpy() to start at the intended place.

Reported and tested by: pgj
Pointy hat to: kib
MFC after: 3 days

11 years agoStyle nit.
Dag-Erling Smørgrav [Mon, 29 Apr 2013 20:14:11 +0000 (20:14 +0000)]
Style nit.

11 years agoAdd a -Z option which zeroes unused blocks. It can be combined with -E,
Dag-Erling Smørgrav [Mon, 29 Apr 2013 20:13:09 +0000 (20:13 +0000)]
Add a -Z option which zeroes unused blocks.  It can be combined with -E,
in which case unused blocks are first zeroed and then erased.

Reviewed by: mckusick
MFC after: 3 weeks

11 years agoFix a bug that allows NFS clients to issue READDIR on files.
Dag-Erling Smørgrav [Mon, 29 Apr 2013 20:09:44 +0000 (20:09 +0000)]
Fix a bug that allows NFS clients to issue READDIR on files.

PR: kern/178016
Security: CVE-2013-3266
Security: FreeBSD-SA-13:05.nfsserver

11 years agowhitespace - document alternative locking under linux
Luigi Rizzo [Mon, 29 Apr 2013 19:30:35 +0000 (19:30 +0000)]
whitespace - document alternative locking under linux

11 years agoOnly cleanup CMI-related state on detach if the system supports CMI.
John Baldwin [Mon, 29 Apr 2013 18:54:31 +0000 (18:54 +0000)]
Only cleanup CMI-related state on detach if the system supports CMI.

PR: kern/163268
MFC after: 1 week

11 years agowhitespace changes:
Luigi Rizzo [Mon, 29 Apr 2013 18:00:53 +0000 (18:00 +0000)]
whitespace changes:
remove $Id$ lines, and add blank lines around some #if / #elif /#endif

11 years agoAdd missing braces.
Xin LI [Mon, 29 Apr 2013 17:00:26 +0000 (17:00 +0000)]
Add missing braces.

Submitted by: Sascha Wildner <saw online de>
Obtained from: DragonFly
MFC after: 1 week

11 years agoexplicitly mark some variables as const
Luigi Rizzo [Mon, 29 Apr 2013 16:58:21 +0000 (16:58 +0000)]
explicitly mark some variables as const

11 years agoA transition period of more than two years is more than enough:
Eitan Adler [Mon, 29 Apr 2013 15:58:04 +0000 (15:58 +0000)]
A transition period of more than two years is more than enough:
Remove the compatibility code added in 2011-02-10.

This change is not intended for MFC

Reviewed by: imp

11 years agoDebugging changes!
Adrian Chadd [Mon, 29 Apr 2013 07:28:29 +0000 (07:28 +0000)]
Debugging changes!

* That lock isn't actually held during reset - just the whole TX/RX path
  is paused.  So, remove the assertion.

* Log the TX queue status - how many hardware frames are active in the
  MAC and whether the queue is active.

11 years agoRemove useless ifdef KLD_MODULE from dummynet module unload path. This
Gleb Smirnoff [Mon, 29 Apr 2013 06:11:19 +0000 (06:11 +0000)]
Remove useless ifdef KLD_MODULE from dummynet module unload path. This
fixes panic on unload.

Reported by: pho

11 years agoMark usage() __dead2
Eitan Adler [Sun, 28 Apr 2013 22:52:43 +0000 (22:52 +0000)]
Mark usage() __dead2

11 years agoReplace a silly command sequence with a proper if-then-else.
Nick Hibma [Sun, 28 Apr 2013 22:12:40 +0000 (22:12 +0000)]
Replace a silly command sequence with a proper if-then-else.
Generate images sparsely. This saves space and time, especially when
generating images inside a VM (PR 173482).
Add a 'true' statement to last_orders to prevent some version of sh from
tripping over an empty function.

11 years agoRemove cast that was only required for K&R C.
Eitan Adler [Sun, 28 Apr 2013 22:05:01 +0000 (22:05 +0000)]
Remove cast that was only required for K&R C.

Reviewed by: jilles

11 years agoDoing a cpio from /var/empty if dir was not specified or non-existent
Nick Hibma [Sun, 28 Apr 2013 21:44:44 +0000 (21:44 +0000)]
Doing a cpio from /var/empty if dir was not specified or non-existent
copies its mode to the destination. This is not desirable.
Rephrase this code to be more sensible.

PR: 173483
MFC after: 1 week

11 years agoCorrect comment typo's
Steven Hartland [Sun, 28 Apr 2013 21:14:23 +0000 (21:14 +0000)]
Correct comment typo's
Add missing comment

Reviewed by: pjd (mentor)
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoSilence warning from clang:
Sean Bruno [Sun, 28 Apr 2013 20:55:45 +0000 (20:55 +0000)]
Silence warning from clang:

/home/sbruno/bsd/head/sys/dev/hptrr/hptrr_osm_bsd.c:178:66: warning: for loop has empty body [-Wempty-body]
                for (order=0, size=PAGE_SIZE; size<f->size; order++, size<<=1) ;
                                                                               ^
/home/sbruno/bsd/head/sys/dev/hptrr/hptrr_osm_bsd.c:178:66: note: put the semicolon on a separate line to silence this warning

Obtained from: Yahoo! Inc.
MFC after: 2 weeks

11 years agoThe controller does not zero this data structure, ever.
Sean Bruno [Sun, 28 Apr 2013 20:46:32 +0000 (20:46 +0000)]
The controller does not zero this data structure, ever.

Zero it out here so we do not misinterpret the data error.

Obtained from: Yahoo! Inc.
MFC after: 2 weeks

11 years agoRework the handling of the tmpfs node backing swap object and tmpfs
Konstantin Belousov [Sun, 28 Apr 2013 19:38:59 +0000 (19:38 +0000)]
Rework the handling of the tmpfs node backing swap object and tmpfs
vnode v_object to avoid double-buffering.  Use the same object both as
the backing store for tmpfs node and as the v_object.

Besides reducing memory use up to 2x times for situation of mapping
files from tmpfs, it also makes tmpfs read and write operations copy
twice bytes less.

VM subsystem was already slightly adapted to tolerate OBJT_SWAP object
as v_object. Now the vm_object_deallocate() is modified to not
reinstantiate OBJ_ONEMAPPING flag and help the VFS to correctly handle
VV_TEXT flag on the last dereference of the tmpfs backing object.

Reviewed by: alc
Tested by: pho, bf
MFC after: 1 month

11 years agoMake vm_object_page_clean() and vm_mmap_vnode() tolerate the vnode'
Konstantin Belousov [Sun, 28 Apr 2013 19:25:09 +0000 (19:25 +0000)]
Make vm_object_page_clean() and vm_mmap_vnode() tolerate the vnode'
v_object of non OBJT_VNODE type.

For vm_object_page_clean(), simply do not assert that object type must
be OBJT_VNODE, and add a comment explaining how the check for
OBJ_MIGHTBEDIRTY prevents the rest of function from operating on such
objects.

For vm_mmap_vnode(), if the object type is not OBJT_VNODE, require it
to be for swap pager (or default), handle the bypass filesystems, and
correctly acquire the object reference in this case.

Reviewed by: alc
Tested by: pho, bf
MFC after: 1 week

11 years agoAssert that the object type for the vnode' non-NULL v_object, passed
Konstantin Belousov [Sun, 28 Apr 2013 19:19:26 +0000 (19:19 +0000)]
Assert that the object type for the vnode' non-NULL v_object, passed
to vnode_pager_setsize(), is either OBJT_VNODE, or, if vnode was
already reclaimed, OBJT_DEAD.  Note that the later is only possible
due to some filesystems, in particular, nfsiods from nfs clients, call
vnode_pager_setsize() with unlocked vnode.

More, if the object is terminated, do not perform the resizing
operation.

Reviewed by: alc
Tested by: pho, bf
MFC after: 1 week

11 years agoEliminate the layering violation in the kern_sendfile(). When quering
Konstantin Belousov [Sun, 28 Apr 2013 19:12:09 +0000 (19:12 +0000)]
Eliminate the layering violation in the kern_sendfile().  When quering
the file size, use VOP_GETATTR() instead of accessing vnode vm_object
un_pager.vnp.vnp_size.

Take the shared vnode lock earlier to cover the added VOP_GETATTR()
call and, as consequence, the whole internal sendfile loop.  Reduce vm
object lock scope to not protect the local calculations.

Note that this is the last misuse of the vnp_size in the tree, the
others were removed from the ELF image activator by r230246.

Reviewed by: alc
Tested by: pho, bf (previous version)
MFC after: 1 week

11 years agoConvert panic() into KASSERT().
Konstantin Belousov [Sun, 28 Apr 2013 18:40:55 +0000 (18:40 +0000)]
Convert panic() into KASSERT().

Reviewed by: alc
MFC after: 1 week

11 years agoAdd some cam_freeze_devq()'s missed at r249466.
Alexander Motin [Sun, 28 Apr 2013 18:12:43 +0000 (18:12 +0000)]
Add some cam_freeze_devq()'s missed at r249466.
This makes number of freezes match the number of releases.

Reported by: dim

11 years agoWhen the world is built WITHOUT_OPENSSH also don't
Eitan Adler [Sun, 28 Apr 2013 17:58:11 +0000 (17:58 +0000)]
When the world is built WITHOUT_OPENSSH also don't
install ssh-copy-id.

PR: misc/177590
Submitted by: Oleg Ginzburg <olevole@olevole.ru>
Reviewed by: imp

11 years agoEnable building string functions as part of libstand on mips; the Makefile
Robert Watson [Sun, 28 Apr 2013 16:35:24 +0000 (16:35 +0000)]
Enable building string functions as part of libstand on mips; the Makefile
is a bit obfuscated here, as ia64 adds string source files elsewhere, so
simply exclude it here.

Reviewed by: imp
MFC after: 3 days
Sponsored by: DARPA, AFRL

11 years agoLet's align correctly by setting to 17.
Sean Bruno [Sun, 28 Apr 2013 16:35:23 +0000 (16:35 +0000)]
Let's align correctly by setting to 17.

OpenCISS states that if the value is 0, then the driver should try a value
of 31.  That's just silly.  Set to 17 so that the subtraction for maxio
becomes 16 and aligns nicely.

Reviewed by: scottl
Obtained from: Yahoo! Inc.
MFC after: 2 weeks

11 years agoIts time to retire COMPAQ. I don't think that its coming back. :-)
Sean Bruno [Sun, 28 Apr 2013 16:20:09 +0000 (16:20 +0000)]
Its time to retire COMPAQ.  I don't think that its coming back.  :-)

Obtained from: Yahoo! Inc.
MFC after: 2 weeks

11 years agoMerge @228176 from Perforce to fix a bug introduced in r249553:
Robert Watson [Sun, 28 Apr 2013 14:40:29 +0000 (14:40 +0000)]
Merge @228176 from Perforce to fix a bug introduced in r249553:

  Trim two now-unneeded (and likely harmful) lines from the libstand
  setjmp/longjmp for MIPS.

  Spotted by:   jmallett

MFC after:      3 days
Sponsored by: DARPA, AFRL

11 years agoFix EXIT STATUS. biff reports its status when it was invoked.
Joel Dahl [Sun, 28 Apr 2013 09:29:44 +0000 (09:29 +0000)]
Fix EXIT STATUS. biff reports its status when it was invoked.

Submitted by: Ryan Kavanagh,
Jason McIntyre <jmc@kerhand.co.uk>
Obtained from: OpenBSD

11 years agoEliminate an unneeded call to vm_radix_trimkey() from vm_radix_lookup_le().
Alan Cox [Sun, 28 Apr 2013 08:29:00 +0000 (08:29 +0000)]
Eliminate an unneeded call to vm_radix_trimkey() from vm_radix_lookup_le().
This call is clearing bits from the key that will be set again by the next
line.

Sponsored by: EMC / Isilon Storage Division

11 years agoBring copyright changes with the agreement of Thomas Skibo.
Wojciech A. Koszek [Sun, 28 Apr 2013 07:00:36 +0000 (07:00 +0000)]
Bring copyright changes with the agreement of Thomas Skibo.

Communication on src-commiters, Sat, 27 Apr 2013 22:09:06 -0700,
Subject was: "Re: svn commit: r249997"

As I'm here, fix the style main block comments in files' headers.

11 years agomdoc improvements
Joel Dahl [Sun, 28 Apr 2013 06:15:56 +0000 (06:15 +0000)]
mdoc improvements

11 years agoRemove extra code for SA_RESETHAND, it is not needed because kernel has
David Xu [Sun, 28 Apr 2013 03:13:45 +0000 (03:13 +0000)]
Remove extra code for SA_RESETHAND, it is not needed because kernel has
already done this.

11 years agoAdd an alternate version of beastie to the examples directory.
Eitan Adler [Sun, 28 Apr 2013 02:23:39 +0000 (02:23 +0000)]
Add an alternate version of beastie to the examples directory.

PR: docs/38556
Submitted by: Rahul Siddharthan <rsidd@online.fr>
Submitted on: 25 May 2002 22:49:56 -0000
MFC After: 2 weeks

11 years agoGet rid of the 'vsc_rxpend' state - it doesn't serve any purpose because we
Neel Natu [Sun, 28 Apr 2013 01:02:59 +0000 (01:02 +0000)]
Get rid of the 'vsc_rxpend' state - it doesn't serve any purpose because we
drop any frames that arrive while the device is starved for receive buffers.

This makes the receive path to only execute in context of the receive thread
and allows for further simplification.

Reviewed by: grehan

11 years agoBring over my FreeBSD modifications for the AR9300 HAL to make it
Adrian Chadd [Sun, 28 Apr 2013 00:57:47 +0000 (00:57 +0000)]
Bring over my FreeBSD modifications for the AR9300 HAL to make it
work in FreeBSD.

This is still heavily a work in progress but I'd rather it start
shipping in -HEAD sooner rather than later.

This doesn't (yet) link it into the build system either for a static
kernel or as a module; that will come later (after many, many make universe
tests.)

11 years agoCopy the vendor branch ar9300 code from qcamain_open_hal into this
Adrian Chadd [Sun, 28 Apr 2013 00:53:31 +0000 (00:53 +0000)]
Copy the vendor branch ar9300 code from qcamain_open_hal into this
directory.

Only copy the ar9300 HAL, we don't want to grab everything.

11 years agoInitial import of the QCA qcamain_open_hal repository.
Adrian Chadd [Sun, 28 Apr 2013 00:45:58 +0000 (00:45 +0000)]
Initial import of the QCA qcamain_open_hal repository.

Source: https://github.com/qca/qcamain_open_hal_public
Revision: 60390a9f9ac6a20db168fbbc01a4ad4e01c395ce

Thankyou to QCA for this release.

11 years agoPolish devcfg(4) slightly: add \n after the end of every sentence.
Wojciech A. Koszek [Sat, 27 Apr 2013 23:59:15 +0000 (23:59 +0000)]
Polish devcfg(4) slightly: add \n after the end of every sentence.

11 years agoMove IPPROTO_IPV6 from #ifdef __BSD_VISIBLE to #if __POSIX_VISIBLE >= 201112
Colin Percival [Sat, 27 Apr 2013 23:36:01 +0000 (23:36 +0000)]
Move IPPROTO_IPV6 from #ifdef __BSD_VISIBLE to #if __POSIX_VISIBLE >= 201112
since POSIX 2001 states that it shall be defined.

Reported by: sbruno
Reviewed by: jilles
MFC after: 1 week

11 years agoAdd Xilinx Zynq ARM/FPGA SoC support to FreeBSD/arm port.
Wojciech A. Koszek [Sat, 27 Apr 2013 23:07:49 +0000 (23:07 +0000)]
Add Xilinx Zynq ARM/FPGA SoC support to FreeBSD/arm port.

Submitted by: Thomas Skibo <ThomasSkibo (at) sbcglobal.net>
Tested by: wkoszek (ZedBoard)
Reviewed by: wkoszek, freebsd-arm@ (no objections raised)

11 years agoMerge libc++ trunk r180598. Contains several minor cleanups and bug
Dimitry Andric [Sat, 27 Apr 2013 22:47:52 +0000 (22:47 +0000)]
Merge libc++ trunk r180598.  Contains several minor cleanups and bug
fixes, no major changes.

MFC after: 2 weeks

11 years agoAdd Xilinx Zynq ARM/FPGA SoC support to FreeBSD/arm port.
Wojciech A. Koszek [Sat, 27 Apr 2013 22:38:29 +0000 (22:38 +0000)]
Add Xilinx Zynq ARM/FPGA SoC support to FreeBSD/arm port.

Submitted by: Thomas Skibo <ThomasSkibo (at) sbcglobal.net>
Reviewed by: wkoszek, freebsd-arm@ (no objections raised)

11 years agoAdd missing static qualifiers
Eitan Adler [Sat, 27 Apr 2013 21:59:43 +0000 (21:59 +0000)]
Add missing static qualifiers

Reviewed by: ed, jilles
MFC After: 3 days

11 years agoEnable improved <tgmath.h> for Clang even when not using C11.
Ed Schouten [Sat, 27 Apr 2013 21:18:34 +0000 (21:18 +0000)]
Enable improved <tgmath.h> for Clang even when not using C11.

By using __has_extension(c_generic_selections), we can explicitly test
whether we're dealing with a version of Clang that supports _Generic().
That way we can use the improved <tgmath.h> code, even when not using
-std=c11. This massively reduces the compilation time when invoking
these functions.

11 years agoMerge libcxxrt c812a07cd2f95c1403baf0bbe0366e7618d1d6d3:
Dimitry Andric [Sat, 27 Apr 2013 19:26:56 +0000 (19:26 +0000)]
Merge libcxxrt c812a07cd2f95c1403baf0bbe0366e7618d1d6d3:

* Don't call the _fast version of the TLS accessor in terminate() or
  unexpected().
  1) TLS may not have been set up yet.
  2) When we're in one of these functions, Really Bad Stuff has
     happened and potentially saving a few cycles really isn't
     important.
* Merge in fixes from FreeBSD trunk to make atomics work with recent
  clang.

MFC after: 1 week

11 years agoVendor import of libc++ trunk r180598.
Dimitry Andric [Sat, 27 Apr 2013 17:27:12 +0000 (17:27 +0000)]
Vendor import of libc++ trunk r180598.

11 years agoImport c812a07cd2f95c1403baf0bbe0366e7618d1d6d3 of libcxxrt:
Dimitry Andric [Sat, 27 Apr 2013 17:19:07 +0000 (17:19 +0000)]
Import c812a07cd2f95c1403baf0bbe0366e7618d1d6d3 of libcxxrt:

*   Fix a copy-and-paste error when setting the unexpected exception handler
    (actually set the terminate handler by mistake).

*   Fix some warnings.

    Patch by Joerg Sonnenberger!

*   Don't call the _fast version of the TLS accessor in terminate() or unexpected().

    1) TLS may not have been set up yet.
    2) When we're in one of these functions, Really Bad Stuff has happened and potentially saving a few cycles really isn't important.

*   Merge in fixes from FreeBSD trunk to make atomics work with recent clang.

11 years agoAvoid some lookup restarts in vm_radix_lookup_{ge,le}().
Alan Cox [Sat, 27 Apr 2013 16:44:59 +0000 (16:44 +0000)]
Avoid some lookup restarts in vm_radix_lookup_{ge,le}().

Sponsored by: EMC / Isilon Storage Division

11 years agolibthr: Fix a parameter name in an internal header file.
Jilles Tjoelker [Sat, 27 Apr 2013 14:21:36 +0000 (14:21 +0000)]
libthr: Fix a parameter name in an internal header file.

11 years agosh: Don't consider jobs -s/-p as reporting the status of jobs.
Jilles Tjoelker [Sat, 27 Apr 2013 14:07:25 +0000 (14:07 +0000)]
sh: Don't consider jobs -s/-p as reporting the status of jobs.

This ensures that something like j=$(jobs -p) does not prevent any
status from being written to the terminal.

11 years agosyslogd: Use closefrom() instead of getdtablesize()/close() loop.
Jilles Tjoelker [Sat, 27 Apr 2013 13:26:35 +0000 (13:26 +0000)]
syslogd: Use closefrom() instead of getdtablesize()/close() loop.

When syslogd forks a process for '|' destinations, it closes all file
descriptors greater than 2.

Use closefrom() for this instead of a getdtablesize()/close() loop because
it is both faster and avoids leaving file descriptors open because the limit
was lowered after they were opened.

MFC after: 1 week

11 years agoMFprojects/camlock r249542:
Alexander Motin [Sat, 27 Apr 2013 12:46:04 +0000 (12:46 +0000)]
MFprojects/camlock r249542:
Remove ADA_FLAG_PACK_INVALID flag. Since ATA disks have no concept of media
change it only duplicates CAM_PERIPH_INVALID flag, so we can use last one.

Slightly cleanup DA_FLAG_PACK_INVALID use.

11 years agoMFprojects/camlock r249541:
Alexander Motin [Sat, 27 Apr 2013 12:39:28 +0000 (12:39 +0000)]
MFprojects/camlock r249541:
Give periph validity flag own periph reference.  That slightly simplifies
the release logic and covers hypothetical case if lock is dropped inside
the periph_oninval() method.

11 years agointro(2): Fix some errors in ENFILE and EMFILE descriptions.
Jilles Tjoelker [Sat, 27 Apr 2013 11:55:23 +0000 (11:55 +0000)]
intro(2): Fix some errors in ENFILE and EMFILE descriptions.

MFC after: 1 week

11 years agoChange maxio to reflect variable hardware configurations.
Sean Bruno [Sat, 27 Apr 2013 08:40:37 +0000 (08:40 +0000)]
Change maxio to reflect variable hardware configurations.

If max_sg_length is 0, then we default to 16

If max_sg_length is less than CISS_MAX_SG_ELEMENTS, then
we will set round the value of max_sg_length to the nearest
power of 2 and use it to align maxio.

Else, we will use CISS_MAX_SG_ELEMENTS for our calculations.

Thanks to scottl for working me through the history and providing
the basis for this patch.

Submitted by: scott
Obtained from: Yahoo! Inc.
MFC after: 2 weeks

11 years agoAdd const qualifier to the dst parameter of the ifnet if_output method.
Gleb Smirnoff [Sat, 27 Apr 2013 08:11:48 +0000 (08:11 +0000)]
Add const qualifier to the dst parameter of the ifnet if_output method.

11 years agoReturn "descr" field alike to "Intel RAID1 volume" for GEOM RAID to make
Alexander Motin [Sat, 27 Apr 2013 06:57:39 +0000 (06:57 +0000)]
Return "descr" field alike to "Intel RAID1 volume" for GEOM RAID to make
it look better in bsdinstall.

11 years agoAdd reset support to the Wii.
Rui Paulo [Sat, 27 Apr 2013 06:54:49 +0000 (06:54 +0000)]
Add reset support to the Wii.

11 years agoRemove references to MK_IDEA.
Ed Schouten [Sat, 27 Apr 2013 05:44:39 +0000 (05:44 +0000)]
Remove references to MK_IDEA.

As of r249959, we want to build with IDEA support enabled
unconditionally. As this change removed the MK_IDEA flag, update these
Makefiles accordingly.

11 years agoPartially revert my last change.
Ed Schouten [Sat, 27 Apr 2013 05:06:25 +0000 (05:06 +0000)]
Partially revert my last change.

I forgot that I still had a locally applied patch to my copy of Clang
that needs to be pushed in before we should use C11 atomics.

11 years agoUse C11 <stdatomic.h> instead of our non-standard <machine/atomic.h>.
Ed Schouten [Sat, 27 Apr 2013 05:01:29 +0000 (05:01 +0000)]
Use C11 <stdatomic.h> instead of our non-standard <machine/atomic.h>.

Reviewed by: pjd

11 years agoUnbreak <stdatomic.h> on ARM + Clang.
Ed Schouten [Sat, 27 Apr 2013 04:56:02 +0000 (04:56 +0000)]
Unbreak <stdatomic.h> on ARM + Clang.

Clang only supports atomic operations for ARMv6. For non-ARMv6, we still
need to emit these functions.

Clang's prototype for these functions slightly differs, as it is truly
based on GCC's documentation. It requires the use of signed types, but
also requires varargs. Still, we are not allowed to simply implement
this function directly. Cleverly work around this by implementing it
under a different name and using __strong_reference().

11 years agoAdd a comma to satisfy Igor.
Eitan Adler [Sat, 27 Apr 2013 04:09:09 +0000 (04:09 +0000)]
Add a comma to satisfy Igor.

11 years agoFix the frambuffer issues by calling pmap_mapdev() in the attach routine. This
Rui Paulo [Sat, 27 Apr 2013 01:57:45 +0000 (01:57 +0000)]
Fix the frambuffer issues by calling pmap_mapdev() in the attach routine. This
will make the framebuffer region uncacheable and it will create a proper
KVA -> RAM mapping.

11 years agoRemove IDEA from OptionalObsoleteFiles.inc
Eitan Adler [Sat, 27 Apr 2013 00:03:07 +0000 (00:03 +0000)]
Remove IDEA from OptionalObsoleteFiles.inc

Also add an UPDATING entry (requsted by gjb)

11 years agoRemove the WITH_IDEA option and build it unconditionally.
Eitan Adler [Fri, 26 Apr 2013 23:24:41 +0000 (23:24 +0000)]
Remove the WITH_IDEA option and build it unconditionally.
The European version of the patent expired in 2011.
The US version of the patent expired in 2012 or prior.

Reviewed by: des
No objection from: cperciva, ehaupt

11 years agoConditionally compile this only if ATH_DEBUG is defined.
Adrian Chadd [Fri, 26 Apr 2013 22:22:38 +0000 (22:22 +0000)]
Conditionally compile this only if ATH_DEBUG is defined.