]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoAdd the AR9300 HAL into the kernel and module builds.
adrian [Thu, 2 May 2013 07:05:34 +0000 (07:05 +0000)]
Add the AR9300 HAL into the kernel and module builds.

Tested:

* make universe (honest!)

11 years agoFix this code to compile without warnings - AH_DEBUG was pulling in
adrian [Thu, 2 May 2013 07:02:23 +0000 (07:02 +0000)]
Fix this code to compile without warnings - AH_DEBUG was pulling in
ichan, but OS_MARK was not using it.  It only uses it when
AH_DEBUG_ALQ is also defined.

11 years agoUpdate Intel email address.
eadler [Thu, 2 May 2013 01:36:52 +0000 (01:36 +0000)]
Update Intel email address.

PR: docs/175349
Submitted by: Lars Eggert <lars@netapp.com>
Discussed with: jfv

11 years agoAdd device identification and probe/attach support for the QCA9565.
adrian [Thu, 2 May 2013 00:59:39 +0000 (00:59 +0000)]
Add device identification and probe/attach support for the QCA9565.

The QCA9565 is a 1x1 2.4GHz 11n chip with integrated on-chip bluetooth.
The AR9300 HAL already has support for this chip; it just wasn't
included in the probe/attach path.

Tested:

* This commit brought to you over a QCA9565 wifi connection from
  FreeBSD.
* .. ie, basic STA, pings, no iperf or antenna diversity checking just yet.

11 years agoAdd the AR933x SoC GPIO pin count limitation.
adrian [Thu, 2 May 2013 00:40:45 +0000 (00:40 +0000)]
Add the AR933x SoC GPIO pin count limitation.

11 years agoLocal hack to allow smooth transition for ports.
sjg [Wed, 1 May 2013 23:58:39 +0000 (23:58 +0000)]
Local hack to allow smooth transition for ports.
bsd.port.mk can set .MAKE.FreeBSD_UL=yes
to cause :L and :U to have their old behavior.
This should be reverted when 8.3 is EOL.

PR: 173299
Reviewed by: obrien

11 years agoBump __FreeBSD_version for accept4() and pipe2().
jilles [Wed, 1 May 2013 23:04:29 +0000 (23:04 +0000)]
Bump __FreeBSD_version for accept4() and pipe2().

11 years agoDocument the fact that an NFSv4 mount against a volume on the same host
rmacklem [Wed, 1 May 2013 22:50:45 +0000 (22:50 +0000)]
Document the fact that an NFSv4 mount against a volume on the same host
can result in a hung NFS server and is not recommended.
This is a content change.

MFC after: 2 weeks

11 years agoaccept(2), pipe(2): Fix .Dd.
jilles [Wed, 1 May 2013 22:47:47 +0000 (22:47 +0000)]
accept(2), pipe(2): Fix .Dd.

11 years agoRegenerate files for pipe2().
jilles [Wed, 1 May 2013 22:45:04 +0000 (22:45 +0000)]
Regenerate files for pipe2().

11 years agoAdd pipe2() system call.
jilles [Wed, 1 May 2013 22:42:42 +0000 (22:42 +0000)]
Add pipe2() system call.

The pipe2() function is similar to pipe() but allows setting FD_CLOEXEC and
O_NONBLOCK (on both sides) as part of the function.

If p points to two writable ints, pipe2(p, 0) is equivalent to pipe(p).

If the pointer is not valid, behaviour differs: pipe2() writes into the
array from the kernel like socketpair() does, while pipe() writes into the
array from an architecture-specific assembler wrapper.

Reviewed by: kan, kib

11 years agoDocument that the NFSv4 server statistics are operation counts and
rmacklem [Wed, 1 May 2013 22:16:29 +0000 (22:16 +0000)]
Document that the NFSv4 server statistics are operation counts and
not RPC counts.
This is a content change.

MFC after: 2 weeks

11 years agoIsilon reported that sec=krb5p NFS mounts had a problem when m_len == 0
rmacklem [Wed, 1 May 2013 22:07:55 +0000 (22:07 +0000)]
Isilon reported that sec=krb5p NFS mounts had a problem when m_len == 0
for the last mbuf of the list with an encrypted message. This patch replaces
the KASSERT() with code that handles this case.

Reported by: john.gemignani@isilon.com
Reviewed by: jhb
MFC after: 2 weeks

11 years agoRegenerate files for accept4().
jilles [Wed, 1 May 2013 20:12:58 +0000 (20:12 +0000)]
Regenerate files for accept4().

11 years agoAdd accept4() system call.
jilles [Wed, 1 May 2013 20:10:21 +0000 (20:10 +0000)]
Add accept4() system call.

The accept4() function, compared to accept(), allows setting the new file
descriptor atomically close-on-exec and explicitly controlling the
non-blocking status on the new socket. (Note that the latter point means
that accept() is not equivalent to any form of accept4().)

The linuxulator's accept4 implementation leaves a race window where the new
file descriptor is not close-on-exec because it calls sys_accept(). This
implementation leaves no such race window (by using falloc() flags). The
linuxulator could be fixed and simplified by using the new code.

Like accept(), accept4() is async-signal-safe, a cancellation point and
permitted in capability mode.

11 years agoPartially saved extended state must be handled always, i.e. for both
kib [Wed, 1 May 2013 20:08:33 +0000 (20:08 +0000)]
Partially saved extended state must be handled always, i.e. for both
fpu-owned context, and for pcb-saved one.  More, the XSAVE could do
partial save, same as XSAVEOPT, so qualifier for the handler should be
use_xsave and not use_xsaveopt.

Since xsave_area_desc is now needed regardless of the XSAVEOPT use,
remove the write-only use_xsaveopt variable.

In collaboration with: jhb
MFC after: 1 week

11 years agoThe check to ensure that xstate_bv always has XFEATURE_ENABLED_X87 and
kib [Wed, 1 May 2013 20:03:50 +0000 (20:03 +0000)]
The check to ensure that xstate_bv always has XFEATURE_ENABLED_X87 and
XFEATURE_ENABLED_SSE bits set is not needed.  CPU correctly handles
any bitmask which is subset of the enabled bits in %XCR0.

More, CPU instructions XSAVE and XSAVEOPT could write the mask without
e.g. XFEATURE_ENABLED_SSE, after the VZEROALL.  The check prevents the
restoration of the otherwise valid FPU save area.

In collaboration with: jhb
MFC after: 1 week

11 years agoAdd DragonFly BSD 3.4.1, released April 29 2013.
zeising [Wed, 1 May 2013 17:59:41 +0000 (17:59 +0000)]
Add DragonFly BSD 3.4.1, released April 29 2013.

Submitted by: Nikolai Lifanov <lifanov@mail.lifanov.com>

11 years agoIn case ZFS doesn't use UMA for buffers there's no need to waste memory
davide [Wed, 1 May 2013 17:34:44 +0000 (17:34 +0000)]
In case ZFS doesn't use UMA for buffers there's no need to waste memory
creating zones that will remain empty.

Reviewed by: pjd

11 years agoAdd OpenBSD 5.3, released today, May 1 2013.
zeising [Wed, 1 May 2013 17:29:42 +0000 (17:29 +0000)]
Add OpenBSD 5.3, released today, May 1 2013.

11 years agoprocstat_getpathname: for kvm method, instead of returning the error
trociny [Wed, 1 May 2013 15:02:58 +0000 (15:02 +0000)]
procstat_getpathname: for kvm method, instead of returning the error
that the method is not supported, return an empty string.

This looks more handy for callers like procstat(1), which will not
abort after the failed call and still output some useful information.

MFC after: 3 weeks

11 years agoKVM method support for procstat_getgroups, procstat_getumask,
trociny [Wed, 1 May 2013 15:01:05 +0000 (15:01 +0000)]
KVM method support for procstat_getgroups, procstat_getumask,
procstat_getrlimit, and procstat_getosrel.

MFC after: 3 weeks

11 years agoIntroduce a constant, ELF_NOTE_ROUNDSIZE, which evidently declare our
trociny [Wed, 1 May 2013 14:59:16 +0000 (14:59 +0000)]
Introduce a constant, ELF_NOTE_ROUNDSIZE, which evidently declare our
intention to use 4-byte padding for elf notes.

MFC after: 3 weeks

11 years agoOptimize SUBDIR_OVERRIDE such that SUBDIR isn't automatically defined if
benno [Wed, 1 May 2013 09:56:09 +0000 (09:56 +0000)]
Optimize SUBDIR_OVERRIDE such that SUBDIR isn't automatically defined if
SUBDIR_OVERRIDE is defined.

PR: conf/174071
Submitted by: Garrett Cooper <yaneurabeya@gmail.com>
Sponsored by: EMC / Isilon Storage Division

11 years agoAdd a historic footnote.
imp [Wed, 1 May 2013 07:13:36 +0000 (07:13 +0000)]
Add a historic footnote.

11 years agoDon't include asm.h in non-asm files.
imp [Wed, 1 May 2013 06:57:46 +0000 (06:57 +0000)]
Don't include asm.h in non-asm files.
Remove #define to get kludges that asm.h used to define
Move clever macros to access assembler instructions to trap.c
Remove __ASSEMBLER__ ifdefs in regdef.h: they aren't needed anymore.

11 years agoRemove asm.h dependency in a hackish way.
imp [Wed, 1 May 2013 06:55:13 +0000 (06:55 +0000)]
Remove asm.h dependency in a hackish way.
Fixed comment.

11 years agoImport NetBSD's version, which is perfectly fine.
imp [Wed, 1 May 2013 06:22:50 +0000 (06:22 +0000)]
Import NetBSD's version, which is perfectly fine.

Submitted by: jmallet@

11 years agoAdd the standard #ifdef header protection.
imp [Wed, 1 May 2013 05:48:32 +0000 (05:48 +0000)]
Add the standard #ifdef header protection.

11 years agoImport virgin regdef.h from 4.4 Lite 2's sys/pmax/include/regdef.h,
imp [Wed, 1 May 2013 05:46:54 +0000 (05:46 +0000)]
Import virgin regdef.h from 4.4 Lite 2's sys/pmax/include/regdef.h,
expand the %sccs.include.redist.c% directive with the standard
3-clause license, and add $FreeBSD$ to keep the commit script happy.

# This may break some mips stuff, which will be fixed in the next commit.

11 years agoMake the internal assertion correct--only fail when '\0' is found in
wkoszek [Wed, 1 May 2013 05:14:59 +0000 (05:14 +0000)]
Make the internal assertion correct--only fail when '\0' is found in
places other than the end of the test section. Otherwise, with kernel
compiled with Clang which happens to be setting ELF section alignment
differently config(8) was throwing assert() failure unnecessarily

Reported by: Kimmo Paasiala <kpaasial (at) gmail.com>
Tested by: Kimmo Paasiala <kpaasial (at) gmail.com>
MFC after: 10 days

11 years agoFix incorrect sizeof() in bzero()
eadler [Wed, 1 May 2013 04:37:45 +0000 (04:37 +0000)]
Fix incorrect sizeof() in bzero()

Submitted by: swildner@DragonFlyBSD.org
Reviewed by: alfred, jmallett

11 years agoCorrect a few sizeof()s
eadler [Wed, 1 May 2013 04:37:34 +0000 (04:37 +0000)]
Correct a few sizeof()s

Submitted by: swildner@DragonFlyBSD.org
Reviewed by: alfred

11 years agoDisable TXCONT, it's not here in FreeBSD.
adrian [Wed, 1 May 2013 01:50:33 +0000 (01:50 +0000)]
Disable TXCONT, it's not here in FreeBSD.

11 years agoThere's no HAL_EEPROM in FreeBSD - use ar9300_eeprom_t instead.
adrian [Wed, 1 May 2013 01:49:00 +0000 (01:49 +0000)]
There's no HAL_EEPROM in FreeBSD - use ar9300_eeprom_t instead.

11 years agoRemove ancient compatibility cruft.
eadler [Tue, 30 Apr 2013 23:36:48 +0000 (23:36 +0000)]
Remove ancient compatibility cruft.

Reviewed by: delphij

11 years agoAdd missing braces
eadler [Tue, 30 Apr 2013 23:36:45 +0000 (23:36 +0000)]
Add missing braces

Reviewed by: swildner@dragonflybsd.org
Reviewed by: delphij

11 years agoAdd some advice to get past the hurdle of install -l for the common, but
brooks [Tue, 30 Apr 2013 20:53:28 +0000 (20:53 +0000)]
Add some advice to get past the hurdle of install -l for the common, but
non-default (and unsupportable) case of setting INSTALL="install -C" in
/etc/make.conf or /etc/src.conf.

11 years agoFix DDP breakage introduced in r248925. Bitwise OR has higher
np [Tue, 30 Apr 2013 19:57:21 +0000 (19:57 +0000)]
Fix DDP breakage introduced in r248925.  Bitwise OR has higher
precedence than ternary conditional.

MFC after: 1 week

11 years agoMake an attempt to detect missing MTREE files in distrib-dirs. Not
brooks [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 [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 [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 [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 [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 [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 [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 [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 [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 [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 [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.
des [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 [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 [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 [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 [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 [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 [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 [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 [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.
np [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
np [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.
np [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
pluknet [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 [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 [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 [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 [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:
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 [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
kib [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.
des [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,
des [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.
des [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 [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.
jhb [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 [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.
delphij [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 [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:
eadler [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 [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
glebius [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
eadler [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.
n_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.
eadler [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
n_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
smh [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:
sbruno [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.
sbruno [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
kib [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'
kib [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
kib [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
kib [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().
kib [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.
mav [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
eadler [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
rwatson [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.
sbruno [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. :-)
sbruno [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:
rwatson [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 [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