]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoRevert to using bus_size_t for the bounce_zone's alignment member.
mdf [Thu, 13 Jan 2011 00:52:57 +0000 (00:52 +0000)]
Revert to using bus_size_t for the bounce_zone's alignment member.

Reuqested by: jhb

13 years agoIn the experimental NFS server, when converting an open-owner to a lock-owner,
zack [Wed, 12 Jan 2011 23:46:12 +0000 (23:46 +0000)]
In the experimental NFS server, when converting an open-owner to a lock-owner,
start at sequence id 1 instead of 0, to match up with both Solaris and Linux.

Reviewed by:    rmacklem
Approved by:    zml (mentor)

13 years agoClean up the experimental NFS server replay cache when the module is unloaded.
zack [Wed, 12 Jan 2011 23:34:09 +0000 (23:34 +0000)]
Clean up the experimental NFS server replay cache when the module is unloaded.

Reviewed by:    rmacklem
Approved by:    zml (mentor)

13 years agoFix formatting of cross-references.
brucec [Wed, 12 Jan 2011 23:31:28 +0000 (23:31 +0000)]
Fix formatting of cross-references.

13 years agoUn-break the build: use the correct format specifier for sizeof()
csjp [Wed, 12 Jan 2011 23:07:51 +0000 (23:07 +0000)]
Un-break the build: use the correct format specifier for sizeof()

13 years agoRevert cddl changes for sysctl(9) until I understand why this isn't
mdf [Wed, 12 Jan 2011 23:06:38 +0000 (23:06 +0000)]
Revert cddl changes for sysctl(9) until I understand why this isn't
building on universe.

13 years agoMake sure to invoke unlocked foo_start since the taskqueue does not
yongari [Wed, 12 Jan 2011 22:24:07 +0000 (22:24 +0000)]
Make sure to invoke unlocked foo_start since the taskqueue does not
hold a driver lock. This should fix a regression introduced in
r216925.

PR: kern/153769

13 years agoFix a brain fart. Since this file is shared between i386 and amd64, a
mdf [Wed, 12 Jan 2011 21:08:49 +0000 (21:08 +0000)]
Fix a brain fart.  Since this file is shared between i386 and amd64, a
bus_size_t may be 32 or 64 bits.  Change the bounce_zone alignment field
to explicitly be 32 bits, as I can't really imagine a DMA device that
needs anything close to 2GB alignment of data.

13 years agoFix a typo. XLONG should allow pointers to unsigned and signed long.
mdf [Wed, 12 Jan 2011 20:38:55 +0000 (20:38 +0000)]
Fix a typo.  XLONG should allow pointers to unsigned and signed long.

Submitted by: <bf1783 AT gmail DOT com>

13 years agoFix sorting of cross-references.
brucec [Wed, 12 Jan 2011 20:27:14 +0000 (20:27 +0000)]
Fix sorting of cross-references.

13 years agosysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.
mdf [Wed, 12 Jan 2011 19:54:19 +0000 (19:54 +0000)]
sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.

Commit the kernel changes.

13 years agosysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.
mdf [Wed, 12 Jan 2011 19:54:14 +0000 (19:54 +0000)]
sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.

Commit the security directory.

13 years agosysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.
mdf [Wed, 12 Jan 2011 19:54:07 +0000 (19:54 +0000)]
sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.

Commit the geom piece.

13 years agosysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.
mdf [Wed, 12 Jan 2011 19:53:56 +0000 (19:53 +0000)]
sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.

Commit the rest of the devices.

13 years agosysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.
mdf [Wed, 12 Jan 2011 19:53:50 +0000 (19:53 +0000)]
sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.

Commit the net* piece.

13 years agosysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.
mdf [Wed, 12 Jan 2011 19:53:44 +0000 (19:53 +0000)]
sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.

Commit the cxgb driver piece.

13 years agosysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.
mdf [Wed, 12 Jan 2011 19:53:39 +0000 (19:53 +0000)]
sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.

Commit the netgraph piece.

13 years agosysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.
mdf [Wed, 12 Jan 2011 19:53:30 +0000 (19:53 +0000)]
sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.

Commit the zfs piece.

13 years agosysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.
mdf [Wed, 12 Jan 2011 19:53:23 +0000 (19:53 +0000)]
sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.

Commit the Intel drivers.

13 years agoFix wrapping of 20110103 entry.
brucec [Wed, 12 Jan 2011 19:28:52 +0000 (19:28 +0000)]
Fix wrapping of 20110103 entry.

13 years agoFix cross-reference to gvinum(8).
brucec [Wed, 12 Jan 2011 19:20:30 +0000 (19:20 +0000)]
Fix cross-reference to gvinum(8).

13 years agoFix several bugs in the ARP code related to improperly formatted
gnn [Wed, 12 Jan 2011 19:11:17 +0000 (19:11 +0000)]
Fix several bugs in the ARP code related to improperly formatted
packets.

*) Reject requests with a protocol length not equal to 4.  This is IPv4
and there is no reason to accept anything else.

*) Reject packets that have a multicast source hardware address.

*) Drop requests where the hardware address length is not equal
to the hardware address length of the interface.

Pointed out by: Rozhuk Ivan
MFC after: 1 week

13 years agoFix up the grammar.
ae [Wed, 12 Jan 2011 19:06:59 +0000 (19:06 +0000)]
Fix up the grammar.

PR: docs/153933
MFC after: 3 days

13 years agoAdd type checking for static and dynamic sysctls using scalar types.
mdf [Wed, 12 Jan 2011 17:52:48 +0000 (17:52 +0000)]
Add type checking for static and dynamic sysctls using scalar types.
The code is turned off until the tree is fixed up so it compiles.
__FreeBSD_version was already bumped once today, so skip the bump, but
add an entry to UPDATING.

Note that __DESCR() is used in the SYSCTL_OID() macro and so is not
needed in macros that invoke it.  This use was inconsistent in the
file and I have made it consistent any lines already being changed.

Reviewed by: bde (previous version), -arch (previous version)

13 years agoexecve(2), not fork(2) resets signal handler to the default value (if it isn't
pjd [Wed, 12 Jan 2011 16:16:54 +0000 (16:16 +0000)]
execve(2), not fork(2) resets signal handler to the default value (if it isn't
ignored). Correct comment talking about that.

Pointed out by: kib
MFC after: 3 days

13 years agoUpdate dialog to version 20100428. This changes the license under which
nwhitehorn [Wed, 12 Jan 2011 14:55:02 +0000 (14:55 +0000)]
Update dialog to version 20100428. This changes the license under which
dialog is distributed from GPLv2 to LGPLv2 and introduces a number of new
features and a new and better libdialog API. The existing libdialog will
be kept temporarily as libodialog for compatibility purposes until sade,
sysinstall and tzsetup have been either updated or replaced.

__FreeBSD_version is now 900030.

Discussed on: -current
Approved by: core
Obtained from: http://invisible-island.net/dialog

13 years agoAdd a note that when custom signal handler is installed for a signal,
pjd [Wed, 12 Jan 2011 14:38:17 +0000 (14:38 +0000)]
Add a note that when custom signal handler is installed for a signal,
signal action is restored to default in child after fork(2).
In this case there is no need to do anything with dummy SIGCHLD handler,
because after fork(2) it will be automatically reverted to SIG_IGN.

Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com
MFC after: 3 days

13 years agoInstall default signal handlers before masking signals we want to handle.
pjd [Wed, 12 Jan 2011 14:35:29 +0000 (14:35 +0000)]
Install default signal handlers before masking signals we want to handle.
It is possible that the parent process ignores some of them and sigtimedwait()
will never see them, eventhough they are masked.

The most common situation for this to happen is boot process where init(8)
ignores SIGHUP before starting to execute /etc/rc. This in turn caused
hastd(8) to ignore SIGHUP.

Reported by: trasz
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com
MFC after: 3 days

13 years agoSector size can not be greater than MAXPHYS. Since GRAID3 calculates
ae [Wed, 12 Jan 2011 13:55:01 +0000 (13:55 +0000)]
Sector size can not be greater than MAXPHYS. Since GRAID3 calculates
sector size from user-specified block size, report to user about
big blocksize.

PR: kern/147851
MFC after: 1 week

13 years agoThe message ring interrupt needs to be enabled for all cpus, not just
jchandra [Wed, 12 Jan 2011 13:16:35 +0000 (13:16 +0000)]
The message ring interrupt needs to be enabled for all cpus, not just
the ones which run the message ring handler.

Some bits of the interrupt mask are part of the status register which is
saved with the process context, and these bits are initialized from the
cpu on which the process is created. This means that all the processes
should have the same value for these interrupt mask bits, so that the
interrupt mask remains the same regardless of what thread is scheduled
on the cpu.

Submitted by: Sriram Gorti (srgorti at netlogicmicro dot com)

13 years agoSector size can not be greater than MAXPHYS.
ae [Wed, 12 Jan 2011 12:26:10 +0000 (12:26 +0000)]
Sector size can not be greater than MAXPHYS.

MFC after: 1 week

13 years agoProvide up-to-date estimates that are pessimal today...
imp [Wed, 12 Jan 2011 04:59:29 +0000 (04:59 +0000)]
Provide up-to-date estimates that are pessimal today...

13 years agoFor re(4) controllers that uses new jumbo frame scheme(RTL8168C/D/E),
yongari [Wed, 12 Jan 2011 03:43:47 +0000 (03:43 +0000)]
For re(4) controllers that uses new jumbo frame scheme(RTL8168C/D/E),
limit maximum RX buffer size to RE_RX_DESC_BUFLEN instead of
blindly configuring it to 16KB. Due to lack of documentation, re(4)
didn't allow jumbo frame on these controllers. However it seems
controller is confused with jumbo frame such that it can DMA the
received frame to wrong address instead of splitting it into
multiple RX buffers. Of course, this caused panic.

Since re(4) does not support jumbo frames on these controllers,
make controller drop frame that is longer than RE_RX_DESC_BUFLEN
sized frame. Fortunately RTL810x controllers, which do not support
jumbo frame, have no such issues but this change also limited
maximum RX buffer size allowed to RTL810x controllers. Allowing
16KB RX buffer for controllers that have no such capability is
meaningless.

MFC after: 3 days

13 years agoA couple problems discovered by Andrew Boyer:
jfv [Wed, 12 Jan 2011 00:23:47 +0000 (00:23 +0000)]
A couple problems discovered by Andrew Boyer:
   - failure code in em_xmit got mangled along the way
     and was not properly handling errors.
   - local timer code had a leftover UNLOCK call that
     should be removed.

MFC after 3 days

13 years agoProving once again, I can't typo: fix a type.
imp [Tue, 11 Jan 2011 22:57:41 +0000 (22:57 +0000)]
Proving once again, I can't typo: fix a type.

13 years ago- Retire some unused ithread priorities: PI_TTYHIGH, PI_TAPE, and
jhb [Tue, 11 Jan 2011 22:15:30 +0000 (22:15 +0000)]
- Retire some unused ithread priorities: PI_TTYHIGH, PI_TAPE, and
  PI_DISKLOW.  While here, rename PI_TTYLOW to PI_TTY.
- Add a macro PI_SWI() that takes a SWI_* constant as an argument and
  returns the suitable thread priority.

13 years agoAlways use PRI_BASE() when checking the base type of a thread's priority
jhb [Tue, 11 Jan 2011 22:13:19 +0000 (22:13 +0000)]
Always use PRI_BASE() when checking the base type of a thread's priority
class.

MFC after: 2 weeks

13 years agoDon't re-use MODINFOMD_BOOTINFO as MODINFOMD_DTBP. It breaks
marcel [Tue, 11 Jan 2011 22:07:39 +0000 (22:07 +0000)]
Don't re-use MODINFOMD_BOOTINFO as MODINFOMD_DTBP. It breaks
compatibility without any means for the kernel to work with
an older loader.

13 years agoAdd manpage for runfw, the Ralink RT2700U, RT2800U and RT3000U firmware
thompsa [Tue, 11 Jan 2011 21:51:46 +0000 (21:51 +0000)]
Add manpage for runfw, the Ralink RT2700U, RT2800U and RT3000U firmware
module. Also fix a few nits in run.4.

Submitted by: Akinori Furukoshi

13 years agoAllow runfw(4) to be compiled in to the kernel.
thompsa [Tue, 11 Jan 2011 21:46:29 +0000 (21:46 +0000)]
Allow runfw(4) to be compiled in to the kernel.

Submitted by: Akinori Furukoshi

13 years agoAdd new functions, fcu_fan_set_pwm and fcu_fan_get_pwm, to set and get
andreast [Tue, 11 Jan 2011 21:18:29 +0000 (21:18 +0000)]
Add new functions, fcu_fan_set_pwm and fcu_fan_get_pwm, to set and get
the pwm values. We can now set the fan's speed of a PWM controlled fan
with % numbers between 30 and 100 % instead of trying to model a
% number based on rpm.
The fcu chip offers both, the dutycycle and the rpm value of the PWM
controlled fans. I added the rpm value to the list of information
available via sysctl(8).

Tested by: Paul Mather <paul at gromit dlib vt edu>

Approved by: nwhitehorn (mentor)

13 years agoWork around a witness(4) panic introduced in r217238.
jkim [Tue, 11 Jan 2011 19:26:39 +0000 (19:26 +0000)]
Work around a witness(4) panic introduced in r217238.

Reported by: jh

13 years agoFix a witness(4) warning introduced in r217238.
jkim [Tue, 11 Jan 2011 19:20:01 +0000 (19:20 +0000)]
Fix a witness(4) warning introduced in r217238.

13 years agoUpdate the uplcom(4) man page to reflect the devices currently supported by
gavin [Tue, 11 Jan 2011 19:07:34 +0000 (19:07 +0000)]
Update the uplcom(4) man page to reflect the devices currently supported by
uplcom(4).

MFC after: 1 week

13 years agoImprove or fix some comments. No functional change.
gavin [Tue, 11 Jan 2011 19:05:55 +0000 (19:05 +0000)]
Improve or fix some comments.  No functional change.

MFC after: 1 week

13 years agoMinor improvements in the wording of a comment. Document tinderbox target.
imp [Tue, 11 Jan 2011 18:32:05 +0000 (18:32 +0000)]
Minor improvements in the wording of a comment.  Document tinderbox target.

13 years agoRemove unneeded includes of <sys/linker_set.h>. Other headers that use
jhb [Tue, 11 Jan 2011 13:59:06 +0000 (13:59 +0000)]
Remove unneeded includes of <sys/linker_set.h>.  Other headers that use
it internally contain nested includes.

Reviewed by: bde

13 years agoRemove a bullet point that appears to have been accidentally inserted twice.
gavin [Tue, 11 Jan 2011 13:33:42 +0000 (13:33 +0000)]
Remove a bullet point that appears to have been accidentally inserted twice.
It has also been included within the feature lists to which it is relevant.

Submitted by: tobez
MFC after: 1 week

13 years agoRemove redundant check.
ae [Tue, 11 Jan 2011 13:22:20 +0000 (13:22 +0000)]
Remove redundant check.

MFC after: 1 week

13 years agoRound GNOP provider's mediasize to its sectorsize. This prevents KASSERT
ae [Tue, 11 Jan 2011 11:42:22 +0000 (11:42 +0000)]
Round GNOP provider's mediasize to its sectorsize. This prevents KASSERT
in g_io_request when geom classes doing tasting.

PR: kern/147852
MFC after: 1 week

13 years agoInitialize PCIe buses and add preliminary support for 64-bit BARs.
jmallett [Tue, 11 Jan 2011 02:37:58 +0000 (02:37 +0000)]
Initialize PCIe buses and add preliminary support for 64-bit BARs.

13 years agoFix a typo.
davidxu [Tue, 11 Jan 2011 01:57:02 +0000 (01:57 +0000)]
Fix a typo.

Submitted by: avg

13 years agoFixe some whitespace nits that were introduced in r216758.
lstewart [Tue, 11 Jan 2011 01:32:08 +0000 (01:32 +0000)]
Fixe some whitespace nits that were introduced in r216758.

Sponsored by: FreeBSD Foundation
Submitted by: pjd
MFC after: 10 weeks
X-MFC with: r216758

13 years agoFix hhook_head_is_virtualised() so that "ret" can't be used uninitialised.
lstewart [Tue, 11 Jan 2011 01:11:07 +0000 (01:11 +0000)]
Fix hhook_head_is_virtualised() so that "ret" can't be used uninitialised.

Sponsored by: FreeBSD Foundation
Submitted by: pjd
MFC after: 9 weeks
X-MFC with: r216615

13 years agoFix some minor style/readability nits in hhook.
lstewart [Tue, 11 Jan 2011 00:29:17 +0000 (00:29 +0000)]
Fix some minor style/readability nits in hhook.

Sponsored by: FreeBSD Foundation
Submitted by: pjd
MFC after: 9 weeks
X-MFC with: r216615

13 years agoWhen driver is not running, do not send DUMP command to controller
yongari [Mon, 10 Jan 2011 23:47:11 +0000 (23:47 +0000)]
When driver is not running, do not send DUMP command to controller
and just show old (cached) values. Controller will not respond to
the command unless MAC is enabled so DUMP request for down
interface caused request timeout.

13 years agoImplement TSO on RealTek RTL8168/8111 C or later controllers.
yongari [Mon, 10 Jan 2011 23:28:46 +0000 (23:28 +0000)]
Implement TSO on RealTek RTL8168/8111 C or later controllers.
RealTek changed TX descriptor format for later controllers so these
controllers require MSS configuration in different location of TX
descriptor. TSO is enabled by default for controllers that use new
descriptor format.
For old controllers, TSO is still disabled by default due to broken
frames under certain conditions but users can enable it.
Special thanks to Hayes Wang at RealTek.

MFC after: 2 weeks

13 years agoAdd IDs for HighPoint RocketRAID 64x controllers.
mav [Mon, 10 Jan 2011 22:27:52 +0000 (22:27 +0000)]
Add IDs for HighPoint RocketRAID 64x controllers.

These controllers consist of two Marvell 88SE9128 6Gbps SATA chips and
PLX PCIe bridge. As result, they seem to be agree to work with ahci(4)
as usual HBAs. The only noticed issue is that RAID BIOS disables all
drive caches during boot, though `camcontrol cmd ...` is able to fix that.

Those who wants RAID functionality can still use closed proprietary driver
from HighPoint site.

MFC after: 1 week

13 years agoCount output bytes and packets.
jmallett [Mon, 10 Jan 2011 22:14:30 +0000 (22:14 +0000)]
Count output bytes and packets.

13 years agoShorten device name so it fits into vmstat -i.
jmallett [Mon, 10 Jan 2011 22:14:08 +0000 (22:14 +0000)]
Shorten device name so it fits into vmstat -i.

13 years agoFix a bug in the client side krpc where it was, sometimes
rmacklem [Mon, 10 Jan 2011 21:35:10 +0000 (21:35 +0000)]
Fix a bug in the client side krpc where it was, sometimes
erroneously, assumed that 4 bytes of data were in the first
mbuf of a list by replacing the bcopy() with m_copydata().
Also, replace the uses of m_pullup(), which can fail for
reasons other than not enough data, with m_copydata().
For the cases where it isn't known that there is enough
data in the mbuf list, check first via m_len and m_length().
This is believed to fix a problem reported by dpd at dpdtech.com
and george+freebsd at m5p.com.

Reviewed by: jhb
MFC after: 8 days

13 years agoRemove impossible error conditions.
jkim [Mon, 10 Jan 2011 21:09:38 +0000 (21:09 +0000)]
Remove impossible error conditions.

13 years agoAdd forgotten free(9) in the previous commit for an error case.
jkim [Mon, 10 Jan 2011 21:01:41 +0000 (21:01 +0000)]
Add forgotten free(9) in the previous commit for an error case.

13 years agoAdd a nested include of <sys/linker_set.h> to make the sysctl(9) manpage
jhb [Mon, 10 Jan 2011 20:59:19 +0000 (20:59 +0000)]
Add a nested include of <sys/linker_set.h> to make the sysctl(9) manpage
accurate.  <sys/linker_set.h> is one of the very few headers similar to
<sys/queue.h> for which nested includes is allowed.

PR: docs/153654
Reviewed by: bde
MFC after: 1 month

13 years agoAllow AcpiOsInstallInterruptHandler() and AcpiOsRemoveInterruptHandler() to
jkim [Mon, 10 Jan 2011 20:56:59 +0000 (20:56 +0000)]
Allow AcpiOsInstallInterruptHandler() and AcpiOsRemoveInterruptHandler() to
install or remove non-SCI interrupt handlers per ACPI Component Architecture
User Guide and Programmer Reference.  ACPICA may install such interrupt
handler when a GPE block device is found, for example.  Add a wrapper for
ACPI_OSD_HANDLER, convert its return values to ours, and make it a filter.
Prefer KASSERT(9) over panic(9) as we have never seen those in reality.
Clean up some style(9) nits and add my copyright.

13 years agoFix two harmless off-by-one errors.
jhb [Mon, 10 Jan 2011 20:48:10 +0000 (20:48 +0000)]
Fix two harmless off-by-one errors.

Reviewed by: jeff
MFC after: 2 weeks

13 years agoPrefer KASSERT(9) over panic(9) as it was never seen in reality.
jkim [Mon, 10 Jan 2011 20:26:36 +0000 (20:26 +0000)]
Prefer KASSERT(9) over panic(9) as it was never seen in reality.

13 years agoAdd support for using encrypted password strings when setting
jpaetzel [Mon, 10 Jan 2011 19:57:18 +0000 (19:57 +0000)]
Add support for using encrypted password strings when setting
the root / user passwords

PR: bin/152868
Submitted by: kmoore
Approved by: imp

13 years agoPatch pc-sysinstall to deal with 4k sector size drives
jpaetzel [Mon, 10 Jan 2011 19:11:25 +0000 (19:11 +0000)]
Patch pc-sysinstall to deal with 4k sector size drives

PR: bin/151967
Submitted by: kmoore
Approved by: imp

13 years agoApply DMA address space restriction to controllers that have 4GB
yongari [Mon, 10 Jan 2011 17:45:09 +0000 (17:45 +0000)]
Apply DMA address space restriction to controllers that have 4GB
DMA boundary bug and runs with PCI-X mode.  watchdog timeout was
observed on BCM5704 which lives behind certain PCI-X bridge(e.g.
AMD 8131 PCI-X bridge).  It's still not clear whether the root
cause came from that PCI-X bridge or not. The watchdog timeout
indicates the issue is in TX path. If the bridge reorders TX
mailbox write accesses it would generate all kinds of problems but
I'm not sure.  This should be revisited.

Tested by: Michael L. Squires (mikes <> siralan dot org)

13 years agoBackout r216973 and r216970. r216973 didn't solve watchdog timeout
yongari [Mon, 10 Jan 2011 17:37:49 +0000 (17:37 +0000)]
Backout r216973 and r216970. r216973 didn't solve watchdog timeout
issue seen on PCIX BCM5704 controller. r216970 fixed the issue but
the DMA address space restriction was applied to all bge(4)
controllers such that it caused unnecessary performance degradation
for controllers that have no such issues.

13 years agoFor the process that already loaded libthr but still not initialized
kib [Mon, 10 Jan 2011 16:10:25 +0000 (16:10 +0000)]
For the process that already loaded libthr but still not initialized
threading, fall back to libc method of performing
__pthread_map_stacks_exec() job.

Reported and tested by: Mykola Dzham <i levsha me>

13 years agoget_program_var_addr() must prefer the strong symbol to the weak
kib [Mon, 10 Jan 2011 16:09:35 +0000 (16:09 +0000)]
get_program_var_addr() must prefer the strong symbol to the weak
one. Search global objects, together with main object and
dependencies, for the requested symbol.

Move the common code from symlook_default() into new helper
symlook_global(), and use it both in symlook_global() and
get_program_var_addr().

Supply lock state to get_program_var_addr().

Reviewed by: kan
Tested by: Mykola Dzham <i levsha me>

13 years agoo) Free mbufs in error cases.
jmallett [Mon, 10 Jan 2011 06:46:18 +0000 (06:46 +0000)]
o) Free mbufs in error cases.
o) Clear/acknowledge receive interrupt at end of thread.  This gives the
   management interfaces performance on the order of 100Mbps rather than
   the previous level of 10Mbps on my MR-730.

13 years agoReset the last_sack_ack SACK hint for TCP input processing to ensure that the
lstewart [Mon, 10 Jan 2011 06:12:01 +0000 (06:12 +0000)]
Reset the last_sack_ack SACK hint for TCP input processing to ensure that the
hint is 0 when no SACK data is received to update the hint with. This was
accidentally omitted from r216753.

Sponsored by: FreeBSD Foundation
MFC after: 10 weeks
X-MFC with: 216753

13 years agoRemove unnecessary 'cat'.
jchandra [Mon, 10 Jan 2011 05:13:06 +0000 (05:13 +0000)]
Remove unnecessary 'cat'.

13 years agoo) Expand the CIU driver to be aware of newly-allocated parts of the IRQ range.
jmallett [Mon, 10 Jan 2011 03:48:41 +0000 (03:48 +0000)]
o) Expand the CIU driver to be aware of newly-allocated parts of the IRQ range.
o) Add 'octm', a trivial driver for the 10/100 management ports found on some
   Octeon systems.
o) Make the Simple Executive's management port helper routines compile on
   FreeBSD (namely by not doing math on void pointers.)
o) Add a cvmx_mgmt_port_sendm routine to the Simple Executive to send an mbuf
   so there is only one copy in the transmit path, rather than having to first
   copy the mbuf to an intermediate buffer and then copy that to the Simple
   Executive's transmit ring.
o) Properly work out MII addresses of management ports on the Lanner MR-730.
   XXX The MR-730 also needs some patches to the MII read/write routines, but
       this is sufficient for now.  Media detection will be fixed in the future
       when I can spend more time reading the vendor-supplied patches.

13 years agoRevert part of r217071 so that us mere mortals can clearly see
dougb [Sun, 9 Jan 2011 23:47:11 +0000 (23:47 +0000)]
Revert part of r217071 so that us mere mortals can clearly see
what this bit of code is intended to do. :)

Approved by: imp

13 years agoNow that we correctly enable rx interrupts on all cores, performance has gotten
jmallett [Sun, 9 Jan 2011 23:46:24 +0000 (23:46 +0000)]
Now that we correctly enable rx interrupts on all cores, performance has gotten
quite awful, because e.g. 4 packets will come in and get processed on 4
different cores at the same time, really battling with the TCP stack quite
painfully.  For now, just run one task at a time.

This gets performance up in most cases to where it was before the correctness
fixes that got interrupts to run on all cores (except in high-load TCP transmit
cases where all we're handling receive for is ACKs) and in some cases it's
better now.  What would be ideal would be to use a more advanced interrupt
mitigation strategy and possibly to use different workqueue groups per port for
multi-port systems, and so on, but this is a fine stopgap.

13 years agoo) Remove some unused local definitions of IP protocol numbers.
jmallett [Sun, 9 Jan 2011 23:05:46 +0000 (23:05 +0000)]
o) Remove some unused local definitions of IP protocol numbers.
o) Use CPU_FOREACH rather than a miscrafted for loop with an off-by-one to
   enable workq interrupts on all cores.

13 years agosh: Follow-up to r216743, grabstackblock() can be replaced with stalloc().
jilles [Sun, 9 Jan 2011 22:47:58 +0000 (22:47 +0000)]
sh: Follow-up to r216743, grabstackblock() can be replaced with stalloc().

grabstackblock() was used only once (but it is a very often executed piece
of code).

13 years agoregression/date: unset all LC_xxx vars and set LANG/LC_ALL
keramida [Sun, 9 Jan 2011 22:05:09 +0000 (22:05 +0000)]
regression/date: unset all LC_xxx vars and set LANG/LC_ALL

When running with a custom locale setup, it's easy to confuse the
date regression tests and cause them to fail, e.g. when LANG='C'
but LC_ALL='el_GR.UTF-8'.  Set LC_ALL to 'C', which overrides all
other LC_xxx options, to avoid this sort of problem.

Reviewed by: uqs, edwin

13 years agoAdd missing __dead2 to __assert().
ed [Sun, 9 Jan 2011 21:39:46 +0000 (21:39 +0000)]
Add missing __dead2 to __assert().

__assert() is called when an assertion fails. After printing an error
message, it will call abort(). abort() never returns, hence it has the
__dead2 attribute. Also add this attribute to __assert().

MFC after: 3 weeks

13 years agosh: Remove special %builtin PATH entry.
jilles [Sun, 9 Jan 2011 21:07:30 +0000 (21:07 +0000)]
sh: Remove special %builtin PATH entry.
All builtins are now always found before a PATH search.

Most ash derivatives have an undocumented feature where the presence of an
entry "%builtin" in $PATH will cause builtins to be checked at that point of
the PATH search, rather than before looking at any directories as documented
in the man page (very old versions do document this feature).

I am removing this feature from sh, as it complicates the code, may violate
expectations (for example, /usr/bin/alias is very close to a forkbomb with
PATH=/usr/bin:%builtin, only /usr/bin/builtin not being another link saves
it) and appears to be unused (all the %builtin google code search finds is
in some sort of ash source code).

Note that aliases and functions took and take precedence above builtins.
Because aliases work on a lexical level they can only ever be overridden on
a lexical level (quoting or preceding 'builtin' or 'command'). Allowing
override of functions via PATH does not really fit in the model of sh and it
would work differently from %builtin if implemented.

Note: POSIX says special builtins are found before functions. We comply to
this because we do not allow functions with the same name as a special
builtin.

Silence from: freebsd-hackers@ (message sent 20101225)
Discussed with: dougb

13 years agoMfP4 CH=185246 [1]:
bz [Sun, 9 Jan 2011 20:40:21 +0000 (20:40 +0000)]
MfP4 CH=185246 [1]:

  Add FEATURE() to announce optional VIMAGE.

MFC after: 3 days
[1] for the moment put it in vnet.c.

13 years agoAdd support for the Zeagle N2iTion3 Dive Computer to uplcom(4). This brings
gavin [Sun, 9 Jan 2011 17:40:04 +0000 (17:40 +0000)]
Add support for the Zeagle N2iTion3 Dive Computer to uplcom(4).  This brings
the list of supported devices in sync with kernel.org git revision
f36ecd5de93e4c85a9e3d25100c6e233155b12e5, and OpenBSD uplcom.c r1.54

13 years agoSync the list of devices supported by uslcom(4) with Linux, bringing in
gavin [Sun, 9 Jan 2011 17:10:06 +0000 (17:10 +0000)]
Sync the list of devices supported by uslcom(4) with Linux, bringing in
all new devices added between our r211022 and their git revision
93ad03d60b5b18897030038234aa2ebae8234748

Also correct a Foxconn entry.

MFC after: 1 week

13 years agoImprove style and wording of comments and sysctl descriptions [1].
bz [Sun, 9 Jan 2011 14:34:56 +0000 (14:34 +0000)]
Improve style and wording of comments and sysctl descriptions [1].

Move machdep.ct_debug to debug.clocktime as there was no reason to
actually put it under machdep in r216340.

Submitted by: bde [1]
MFC after: 3 days

13 years agoMove repeated MAXSLP definition from machine/vmparam.h to sys/vmmeter.h.
kib [Sun, 9 Jan 2011 12:50:44 +0000 (12:50 +0000)]
Move repeated MAXSLP definition from machine/vmparam.h to sys/vmmeter.h.
Update the outdated comments describing MAXSLP and the process
selection algorithm for swap out.

Comments wording and reviewed by: alc

13 years agoImplement the __pthread_map_stacks_exec() for libthr.
kib [Sun, 9 Jan 2011 12:38:40 +0000 (12:38 +0000)]
Implement the __pthread_map_stacks_exec() for libthr.

Stack creation code is changed to call _rtld_get_stack_prot() to get
the stack protection right. There is a race where thread is created
during dlopen() of dso that requires executable stacks. Then,
_rtld_get_stack_prot() may return PROT_READ | PROT_WRITE, but thread
is still not linked into the thread list. In this case, the callback
misses the thread stack, and rechecks the required protection
afterward.

Reviewed by: davidxu

13 years agoReplace nfs4 with newnfs in netfs_types. nfs4 was removed in r192578 and
jh [Sun, 9 Jan 2011 09:21:11 +0000 (09:21 +0000)]
Replace nfs4 with newnfs in netfs_types. nfs4 was removed in r192578 and
mount(8) has supported newnfs since r192930.

PR: conf/153655
Submitted by: Anonymous <swell.k@gmail.com>
MFC after: 3 weeks

13 years agoAdd missing ar91xx definition for the WMAC reset control.
adrian [Sun, 9 Jan 2011 06:17:46 +0000 (06:17 +0000)]
Add missing ar91xx definition for the WMAC reset control.

13 years agoFix the value for DECIMAL_DIG on UltraSparcs. The previous value of
das [Sun, 9 Jan 2011 06:05:48 +0000 (06:05 +0000)]
Fix the value for DECIMAL_DIG on UltraSparcs.  The previous value of
35 wasn't quite big enough to ensure correct rounding for very-close-
to-halfway cases.

13 years agoWe don't support any floating point types larger than double on
das [Sun, 9 Jan 2011 06:05:22 +0000 (06:05 +0000)]
We don't support any floating point types larger than double on
powerpc, so DECIMAL_DIG should be 17.

13 years agoThe highest-precision floating point type on ia64 has 64 bits of
das [Sun, 9 Jan 2011 06:05:02 +0000 (06:05 +0000)]
The highest-precision floating point type on ia64 has 64 bits of
precision, so DECIMAL_DIG should be 21, as on i386/amd64.

13 years agoEliminate a redundant alignment directive on the page locks array.
alc [Sun, 9 Jan 2011 04:34:02 +0000 (04:34 +0000)]
Eliminate a redundant alignment directive on the page locks array.

13 years agoModify readdirplus in the experimental NFS server in a
rmacklem [Sun, 9 Jan 2011 02:10:54 +0000 (02:10 +0000)]
Modify readdirplus in the experimental NFS server in a
manner analogous to r216633 for the regular server. This
change busies the file system so that VFS_VGET() is
guaranteed to be using the correct mount point even
during a forced dismount attempt. Since nfsd_fhtovp() is
not called immediately before readdirplus, the patch is
actually a clone of pjd@'s nfs_serv.c.4.patch instead of
the one committed in r216633.

Reviewed by: kib
MFC after: 10 days

13 years agosh: Make exit without parameters from EXIT trap POSIX-compliant.
jilles [Sat, 8 Jan 2011 23:08:13 +0000 (23:08 +0000)]
sh: Make exit without parameters from EXIT trap POSIX-compliant.

It should use the original exit status, just like falling off the
end of the trap handler.

Outside an EXIT trap, 'exit' is still equivalent to 'exit $?'.

13 years agoChange some variables from int to size_t. This is more accurate since
csjp [Sat, 8 Jan 2011 23:06:54 +0000 (23:06 +0000)]
Change some variables from int to size_t.  This is more accurate since
these variables represent sizes in one capacity or another.  There is
no reason to allow negative numbers.  Change userspace shared structure
elements that get used for the modified functions from int to uint32_t,
since it's not clear what userspace programs use these fields, and we
do not want to break binary compatibility.  This fixes a panic when
corrupt or bogus data is passed into the kernel.

Obtained from: NetBSD
MFC after: 3 weeks

13 years agoTake passwords out of debug log.
jpaetzel [Sat, 8 Jan 2011 23:03:24 +0000 (23:03 +0000)]
Take passwords out of debug log.
Fix path problem that was preventing disk info from being in the log.

PR: bin/151968
Submitted by: Kris Moore <kmoore@FreeBSD.org>
Approved by: imp