]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoDelete all GPT partitions at once. (Suggested by Andrey V. Elsukov <bu7cher@yandex...
mr [Mon, 21 Mar 2011 13:23:25 +0000 (13:23 +0000)]
Delete all GPT partitions at once. (Suggested by Andrey V. Elsukov <bu7cher@yandex.ru>)
Fix amd64 merge script.

13 years agoFix static ucastrate for ath_rate_sample.
adrian [Mon, 21 Mar 2011 12:51:13 +0000 (12:51 +0000)]
Fix static ucastrate for ath_rate_sample.

* Pull out the static rix stuff into a different function
* I know this may slightly drop performance, but check if a static
  rix is needed before each packet TX.

* Whilst I'm at it, add a little extra debugging to the rate
  control stuff to make it easier to follow what's going on.

13 years agoForgot to commit this as a part of r219818.
pjd [Mon, 21 Mar 2011 11:52:00 +0000 (11:52 +0000)]
Forgot to commit this as a part of r219818.

MFC after: 1 week

13 years ago - Merge in OFED 1.5.3 from projects/ofed/head
jeff [Mon, 21 Mar 2011 09:58:24 +0000 (09:58 +0000)]
 - Merge in OFED 1.5.3 from projects/ofed/head

13 years ago - Merge changes to the base system to support OFED. These include
jeff [Mon, 21 Mar 2011 09:40:01 +0000 (09:40 +0000)]
 - Merge changes to the base system to support OFED.  These include
   a wider arg2 for sysctl, updates to vlan code, IFT_INFINIBAND,
   and other miscellaneous small features.

13 years agoIn hast.conf we define the other node's address in 'remote' variable.
pjd [Mon, 21 Mar 2011 08:54:59 +0000 (08:54 +0000)]
In hast.conf we define the other node's address in 'remote' variable.
This way we know how to connect to secondary node when we are primary.
The same variable is used by the secondary node - it only accepts
connections from the address stored in 'remote' variable.
In cluster configurations it is common that each node has its individual
IP address and there is one addtional shared IP address which is assigned
to primary node. It seems it is possible that if the shared IP address is
from the same network as the individual IP address it might be choosen by
the kernel as a source address for connection with the secondary node.
Such connection will be rejected by secondary, as it doesn't come from
primary node individual IP.

Add 'source' variable that allows to specify source IP address we want to
bind to before connecting to the secondary node.

MFC after: 1 week

13 years agoLog when we start hooks checking and when we execute a hook.
pjd [Mon, 21 Mar 2011 08:38:24 +0000 (08:38 +0000)]
Log when we start hooks checking and when we execute a hook.

MFC after: 1 week

13 years agoUse snprlcat() instead of two strlcat(3)s.
pjd [Mon, 21 Mar 2011 08:37:50 +0000 (08:37 +0000)]
Use snprlcat() instead of two strlcat(3)s.

MFC after: 1 week

13 years agoAdd snprlcat() and vsnprlcat() - the functions I'm always missing.
pjd [Mon, 21 Mar 2011 08:36:50 +0000 (08:36 +0000)]
Add snprlcat() and vsnprlcat() - the functions I'm always missing.
They work as a combination of snprintf(3) and strlcat(3) - the caller
can append a string build based on the given format.

MFC after: 1 week

13 years agoWhen creating connection on behalf of primary worker, set pjdlog prefix
pjd [Mon, 21 Mar 2011 08:33:58 +0000 (08:33 +0000)]
When creating connection on behalf of primary worker, set pjdlog prefix
to resource name and role, so that any logs related to that can be identified
properly.

MFC after: 1 week

13 years agoIf there is any traffic on one of out descriptors, we were not checking for
pjd [Mon, 21 Mar 2011 08:31:35 +0000 (08:31 +0000)]
If there is any traffic on one of out descriptors, we were not checking for
long running hooks. Fix it by not using select(2) timeout to decide if we want
to check hooks or not.

MFC after: 1 week

13 years agoFix typo: s/LIBSERACHPATH/LIBSEARCHPATH/g
marcel [Mon, 21 Mar 2011 04:03:55 +0000 (04:03 +0000)]
Fix typo: s/LIBSERACHPATH/LIBSEARCHPATH/g

13 years agoChange region 4 to be part of the kernel. This serves 2 purposes:
marcel [Mon, 21 Mar 2011 01:09:50 +0000 (01:09 +0000)]
Change region 4 to be part of the kernel. This serves 2 purposes:
1.  The PBVM is in region 4, so if we want to make use of it, we
    need region 4 freed up.
2.  Region 4 and above cannot be represented by an off_t by virtue
    of that type being signed. This is problematic for truss(1),
    ktrace(1) and other such programs.

13 years agosh(1): Describe subshell environment, command substitution more correctly.
jilles [Sun, 20 Mar 2011 23:52:45 +0000 (23:52 +0000)]
sh(1): Describe subshell environment, command substitution more correctly.

POSIX does not require the shell to fork for a subshell environment, and we
use that possibility in various ways (command substitutions with a single
command and most subshells that are the final command of a shell process).
Therefore do not tie subshells to forking in the man page.

Command substitutions with expansions are a bit strange, causing a fork for
$(...$(($x))...) because $x might expand to y=2; they will probably be
changed later but this is how they work now.

13 years agoUse 'list scan' in favor of 'scan', as 'scan' has a different purpose.
gjb [Sun, 20 Mar 2011 22:47:41 +0000 (22:47 +0000)]
Use 'list scan' in favor of 'scan', as 'scan' has a different purpose.

Pointed out by: bschmidt
MFC after: 1 day

13 years agoRetire opt_ffs_broken_fixme.h.
kib [Sun, 20 Mar 2011 21:05:09 +0000 (21:05 +0000)]
Retire opt_ffs_broken_fixme.h.
Instead of directly calling ffs_snapgone(), use UFS_SNAPGONE() with
usual layering.

Requested by: bde
MFC after: 1 week

13 years agoindex(3): Mention that index/rindex are deprecated and not specified by
jilles [Sun, 20 Mar 2011 20:53:55 +0000 (20:53 +0000)]
index(3): Mention that index/rindex are deprecated and not specified by
POSIX.1-2008.

MFC after: 1 week

13 years agoDisable a check I added a while ago to ensure the initial NF cal completed.
adrian [Sun, 20 Mar 2011 15:46:05 +0000 (15:46 +0000)]
Disable a check I added a while ago to ensure the initial NF cal completed.

Give it a good go (32 attempts) and then print out a warning that's
going to occur whether HAL debugging is enabled or not. Then don't
abort the radio setup; just continue merrily along.

This should fix the issue that users were having where scanning would
occasionally fail on the active channel, causing traffic to cease
until the radio scanned again.

13 years agoUpdate a comment. The sending process has not mapped the buffer pages
alc [Sun, 20 Mar 2011 15:04:43 +0000 (15:04 +0000)]
Update a comment.  The sending process has not mapped the buffer pages
since before r127501.  Strictly speaking, the buffer pages are not
"wired".  They remain in the paging queues.  However, they are pinned in
memory using vm_page_hold().

13 years agoAdd a file with some remarks for setting up a zfs boot environment
mr [Sun, 20 Mar 2011 13:01:57 +0000 (13:01 +0000)]
Add a file with some remarks for setting up a zfs boot environment

13 years ago- Add script for preparing disks in GPT/ZFS boot environment
mr [Sun, 20 Mar 2011 12:40:17 +0000 (12:40 +0000)]
- Add script for preparing disks in GPT/ZFS boot environment
- Add merge script for integrating amd64 slice into i386 disk image

13 years agoCave in and disable the ADC DC gain/offset calibrations if they're
adrian [Sun, 20 Mar 2011 09:08:45 +0000 (09:08 +0000)]
Cave in and disable the ADC DC gain/offset calibrations if they're
not needed.

These calibrations are only applicable if the chip operating mode
engages both interleaved RX ADCs (ie, it's compensating for the
differences in DC gain and DC offset -between- the two ADCs.)
Otherwise the chip reads values of 0x0 for the secondary ADC
(as I guess it's not enabled here) and thus writes potentially
bogus info into the chip.

I've tested this on the AR9160 and AR9280; both behave themselves
in 11g mode with these calibrations disabled.

13 years ago* Remove a not-needed check in the AR5416+ case
adrian [Sun, 20 Mar 2011 08:47:59 +0000 (08:47 +0000)]
* Remove a not-needed check in the AR5416+ case
* Restore the chip default of the DCU backoff threshold to 0x2,
  mirroring what ath9k does.

13 years agoBring over a copy of the AR5212 TX queue reset and setup routines, in preparation
adrian [Sun, 20 Mar 2011 08:42:56 +0000 (08:42 +0000)]
Bring over a copy of the AR5212 TX queue reset and setup routines, in preparation
for fixing them based on the ath9k related TXQ fixes.

I've done this so people can go over the history of the diffs to the original
AR5212 routines (which AR5416 and later chips use) to see what's changed.

13 years agoRemove dead code.
dchagin [Sun, 20 Mar 2011 08:35:00 +0000 (08:35 +0000)]
Remove dead code.

MFC after: 1 Week

13 years agoAdd a PSPOLL queue type, in preparation for (eventually) porting
adrian [Sun, 20 Mar 2011 08:27:06 +0000 (08:27 +0000)]
Add a PSPOLL queue type, in preparation for (eventually) porting
over the TX queue setup code from ath9k for the AR5416 and later
chips.

13 years agoAdd support for checking out ports and doc trees from a CVS repository,
nwhitehorn [Sat, 19 Mar 2011 23:06:17 +0000 (23:06 +0000)]
Add support for checking out ports and doc trees from a CVS repository,
in addition to CVSUP, and add support for alternate SVN roots for src.

Requested by: jhb

13 years agoCorrect broadcast frame handling. Setting bit6 of MCR0 register
yongari [Sat, 19 Mar 2011 22:36:59 +0000 (22:36 +0000)]
Correct broadcast frame handling. Setting bit6 of MCR0 register
enables broadcast filtering. Make sure to clear the bit to receive
broadcast frames. While I'm here rename the bit definition to
reflect reality.

Reported by: brad@OpenBSD
MFC after: 1 week

13 years agoouch, newrt is used on the return path, my fault.
dchagin [Sat, 19 Mar 2011 21:10:57 +0000 (21:10 +0000)]
ouch, newrt is used on the return path, my fault.
Partialy revert the previous change.

MFC after: 1 Week.

13 years ago- Make a panic message better reflect the actual problem.
marius [Sat, 19 Mar 2011 20:36:05 +0000 (20:36 +0000)]
- Make a panic message better reflect the actual problem.
- A closer inspection of the OpenSolaris code indicates the block store
  workaround is only necessary in case of BUS_DMASYNC_POSTREAD.
- Mark some unused parameters as such.

13 years agoA bit rearranged rtalloc1_fib() code.
dchagin [Sat, 19 Mar 2011 19:50:36 +0000 (19:50 +0000)]
A bit rearranged rtalloc1_fib() code.
Initialize a variable when it is really needed.
To avoid code duplication move the miss label to line up and jump on it.

MFC after: 1 Week

13 years agoOn Serengeti-class machines the OFW root isn't the parent of the CPU
marius [Sat, 19 Mar 2011 19:39:05 +0000 (19:39 +0000)]
On Serengeti-class machines the OFW root isn't the parent of the CPU
nodes.

13 years agoRemove spl(9) remnants.
glebius [Sat, 19 Mar 2011 19:37:53 +0000 (19:37 +0000)]
Remove spl(9) remnants.

13 years agoIn case reading PCIR_MINGNT fails don't use it for calculating the
marius [Sat, 19 Mar 2011 19:30:49 +0000 (19:30 +0000)]
In case reading PCIR_MINGNT fails don't use it for calculating the
latency. This is more or less a theoretical problem though as it
typically indicates way bigger problems.

13 years agoProperly check for an IPv4 socket after r219579.
bz [Sat, 19 Mar 2011 19:08:54 +0000 (19:08 +0000)]
Properly check for an IPv4 socket after r219579.

In some cases as udp6_connect() without an earlier bind(2) to an
address, v4-mapped scokets allowed and a non mapped destination
address, we can end up here with both v4 and v6 indicated:
inp_vflag = (INP_IPV4|INP_IPV6|INP_IPV6PROTO)

In that case however laddrp is NULL as the IPv6 path does not
pass in a copy currently.

Reported by: Pawel Worach (pawel.worach gmail.com)
Tested by: Pawel Worach (pawel.worach gmail.com)
MFC after: 6 days
X-MFC with: r219579

13 years agoRemove a now unused variable.
dchagin [Sat, 19 Mar 2011 16:52:06 +0000 (16:52 +0000)]
Remove a now unused variable.

MFC after: 1 Week

13 years agoFor now remove options FLOWTABLE from the remaining GENERIC kernel
bz [Sat, 19 Mar 2011 15:50:34 +0000 (15:50 +0000)]
For now remove options FLOWTABLE from the remaining GENERIC kernel
configurations and make it opt-in for those who want it.  LINT will
still build it.

While it may be a perfect win in some scenarios, it still troubles users
(see PRs) in general cases.  In addition we are still allocating resources
even if disabled by sysctl and still leak arp/nd6 entries in case of
interface destruction.

Discussed with: qingli (2010-11-24, just never executed)
Discussed with: juli (OCTEON1)
PR: kern/148018, kern/155604, kern/144917, kern/146792
MFC after: 2 weeks

13 years agoAdd in the channel survey data structures. These will be filled out
adrian [Sat, 19 Mar 2011 14:38:28 +0000 (14:38 +0000)]
Add in the channel survey data structures. These will be filled out
by the HAL at some point in the future.

13 years agoReserve a new diagnostic code for the channel survey code I'll add soon.
adrian [Sat, 19 Mar 2011 14:37:13 +0000 (14:37 +0000)]
Reserve a new diagnostic code for the channel survey code I'll add soon.

13 years agoMake sure that the AR_MISC_MODE value from the initvals are properly respected.
adrian [Sat, 19 Mar 2011 03:15:28 +0000 (03:15 +0000)]
Make sure that the AR_MISC_MODE value from the initvals are properly respected.

This commit really is "fix the OFDM duration calculation to match reality when
running in 802.11g mode."

The AR5212 init vals set AR_MISC_MODE to 0x0 and all the bits that can be set are
set through code.

The AR5416 and later initvals set AR_MISC_MODE to various other values (with
the AR5212 AR_MISC_MODE options cleared), which include AR_PCU_CCK_SIFS_MODE .
This adds 6uS to SIFS on non-CCK frames when transmitting.

This fixes the issue where _DATA_ 802.11g OFDM frames were being TX'ed with
the ACK duration set to 38uS, not 44uS as on the AR5212 (and other devices.)

The AR5212 TX pathway obeys the software-programmed duration field in the packet,
but the 11n TX pathway overrides that with a hardware-calculated duration. This
was getting it wrong because of the above AR_MISC_MODE setting. I've verified
that 11g data OFDM frames are now being TXed with the correct ACK+SIFS duration
programmed in.

13 years agoUse the HAL method rather than directly calling ar5212ResetTxQueue().
adrian [Sat, 19 Mar 2011 03:09:21 +0000 (03:09 +0000)]
Use the HAL method rather than directly calling ar5212ResetTxQueue().

Since ath9k does some slightly different bit fiddling when setting up
the TX queues, it may that the TX queue setup/reset functions will need
overriding later on.

13 years agoAdd debugging messages to the AR5416 ANI code that's found in the AR5212 ANI code.
adrian [Sat, 19 Mar 2011 00:46:10 +0000 (00:46 +0000)]
Add debugging messages to the AR5416 ANI code that's found in the AR5212 ANI code.

13 years agoA cut and paste here was wrong also.
jfv [Sat, 19 Mar 2011 00:31:35 +0000 (00:31 +0000)]
A cut and paste here was wrong also.

13 years agoCorrect broken define
jfv [Sat, 19 Mar 2011 00:19:18 +0000 (00:19 +0000)]
Correct broken define

13 years ago- Build disk image (for USB sticks) and iso image
mr [Fri, 18 Mar 2011 22:56:53 +0000 (22:56 +0000)]
- Build disk image (for USB sticks) and iso image
- Change name to reflect this
- Install all kernel modules
- Choose image size that i386 and amd64 can be combined into one image
- Mount tmpfs over /boot/zfs for zpool imports

13 years agoo Move the IVT and supporting functions to the front of the text
marcel [Fri, 18 Mar 2011 22:45:43 +0000 (22:45 +0000)]
o   Move the IVT and supporting functions to the front of the text
    segment so that it's always mapped by the loader.
o   Change the alternate fault handlers to account for PBVM. Since
    currently the region is handled by the VHPT, no alternate faults
    will be generated for it.

13 years agoRemove inclusion of unneeded bootinfo.h header.
marcel [Fri, 18 Mar 2011 22:33:19 +0000 (22:33 +0000)]
Remove inclusion of unneeded bootinfo.h header.

13 years agoThis delta updates the em driver to version 7.2.2 which has
jfv [Fri, 18 Mar 2011 18:54:00 +0000 (18:54 +0000)]
This delta updates the em driver to version 7.2.2 which has
been undergoing test for some weeks. This improves the RX
mbuf handling to avoid system hang due to depletion. Thanks
to all those who have been testing the code, and to Beezar
Liu for the design changes.

Next the igb driver is updated for similar RX changes, but
also to add new features support for our upcoming i350 family
of adapters.

MFC after a week

13 years agoUse VM_MAXUSER_ADDRESS rather than VM_MAX_ADDRESS when we talk about
marcel [Fri, 18 Mar 2011 15:36:28 +0000 (15:36 +0000)]
Use VM_MAXUSER_ADDRESS rather than VM_MAX_ADDRESS when we talk about
the bounds of user space. Redefine VM_MAX_ADDRESS as ~0UL, even though
it's not used anywhere in the source tree.

13 years agoPartially revert previous change. Drop the quirk to disable MSI for HT
jhb [Fri, 18 Mar 2011 14:06:12 +0000 (14:06 +0000)]
Partially revert previous change.  Drop the quirk to disable MSI for HT
chipsets that do not have an HT slave at 0:0:0:0.  The Linux quirk is
actually specific to Nvidia chipsets and the check I had added was in
the wrong place.

Prodded by: nathanw

13 years agoUse resolvconf(8) to update /etc/resolv.conf.
ume [Fri, 18 Mar 2011 12:23:20 +0000 (12:23 +0000)]
Use resolvconf(8) to update /etc/resolv.conf.
If you don't want to use resolvconf(8) to update /etc/resolv.conf,
you can put resolvconf_enable="NO" into /etc/dhclient-enter-hooks.

13 years agoAdd resolvconf(8) which manages resolv.conf.
ume [Fri, 18 Mar 2011 12:18:52 +0000 (12:18 +0000)]
Add resolvconf(8) which manages resolv.conf.

13 years agoFix a few issues with HyperTransport devices and MSI interrupts:
jhb [Fri, 18 Mar 2011 12:13:04 +0000 (12:13 +0000)]
Fix a few issues with HyperTransport devices and MSI interrupts:
- Always enable the HyperTransport MSI mapping window for HyperTransport
  to PCI bridges (these show up as HyperTransport slave devices).
  The mapping windows in PCI-PCI bridges are enabled by existing code
  in the PCI-PCI bridge driver as MSI requests propagate up the device
  tree, but Host-PCI bridges don't really show up in that tree.
- If the PCI device at domain 0 bus 0 slot 0 function 0 is not a
  HyperTransport device, then blacklist MSI on any other HT devices in
  the system.  Linux has a similar quirk.

PR: kern/155442
Tested by: Zack Dannar  zdannar of gmail
MFC after: 1 week

13 years agoImport openresolv from vendor branch, actually.
ume [Fri, 18 Mar 2011 12:09:27 +0000 (12:09 +0000)]
Import openresolv from vendor branch, actually.

Helped by: jhb

13 years agoRemove contrib/openresolv.
ume [Fri, 18 Mar 2011 12:07:53 +0000 (12:07 +0000)]
Remove contrib/openresolv.

Helped by: jhb

13 years agoImport openresolv-3.4.1.
ume [Fri, 18 Mar 2011 10:35:54 +0000 (10:35 +0000)]
Import openresolv-3.4.1.

13 years agoAdd myself to calendar.freebsd.
sbz [Fri, 18 Mar 2011 09:06:06 +0000 (09:06 +0000)]
Add myself to calendar.freebsd.

Approved by: miwi@ (mentor)

13 years agoAdd an entry for myself to committers-ports.dot.
sbz [Fri, 18 Mar 2011 09:03:14 +0000 (09:03 +0000)]
Add an entry for myself to committers-ports.dot.

Approved by: miwi@ (mentor)

13 years agoIn vm_daemon(), when iterating over all processes in the system, skip those
trasz [Fri, 18 Mar 2011 06:47:23 +0000 (06:47 +0000)]
In vm_daemon(), when iterating over all processes in the system, skip those
which are not yet fully initialized (i.e. ones with p_state == PRS_NEW).
Without it, we could panic in _thread_lock_flags().

Note that there may be other instances of FOREACH_PROC_IN_SYSTEM() that
require similar fix.

Reported by: pho, keramida
Discussed with: kib

13 years agoFormatting fix.
gjb [Thu, 17 Mar 2011 22:17:56 +0000 (22:17 +0000)]
Formatting fix.

Submitted by: arundel (via doc@)
MFC after: 3 days

13 years agoPreserve errno in an error case.
jhb [Thu, 17 Mar 2011 21:24:32 +0000 (21:24 +0000)]
Preserve errno in an error case.

Submitted by: gcooper

13 years agoFor secondary, set 2 * HAST_KEEPALIVE seconds timeout for incoming
trociny [Thu, 17 Mar 2011 21:02:14 +0000 (21:02 +0000)]
For secondary, set 2 * HAST_KEEPALIVE seconds timeout for incoming
connection so the worker will exit if it does not receive packets from
the primary during this interval.

Reported by: Christian Vogt <Christian.Vogt@haw-hamburg.de>
Tested by: Christian Vogt <Christian.Vogt@haw-hamburg.de>
Approved by: pjd (mentor)
MFC after: 1 week

13 years agoRemove duplicate definition of FIRSTARG.
andreast [Thu, 17 Mar 2011 19:44:00 +0000 (19:44 +0000)]
Remove duplicate definition of FIRSTARG.

Approved by: nwhitehorn (mentor)

13 years agoAdd more details to the 'show battery' command including more raw
jhb [Thu, 17 Mar 2011 17:29:46 +0000 (17:29 +0000)]
Add more details to the 'show battery' command including more raw
capacity values, charge cycle count, temperature, and more detailed
status.

Reviewed by: bz, emaste (older version)
MFC after: 1 week

13 years agoImplement the usertime and systime keywords for ps, printing the
kib [Thu, 17 Mar 2011 11:25:32 +0000 (11:25 +0000)]
Implement the usertime and systime keywords for ps, printing the
corresponding times reported by getrusage().

Submitted by: Dan Nelson <dnelson allantgroup com>
MFC after: 1 week

13 years agoRemove the #if defined(FFS) || defined(IFS) braces around the calls to
kib [Thu, 17 Mar 2011 11:23:12 +0000 (11:23 +0000)]
Remove the #if defined(FFS) || defined(IFS) braces around the calls to
ffs_snapgone(). ufs.ko module is not build with FFS define, causing
snapshot inode number slots in superblock never be freed, as well as a
reference on the snapshot vnode.

IFS was removed several years ago, and UFS/FFS separation was not
maintained for real.

Reported, analyzed and tested by: Yamagi Burmeister <lists yamagi org>
MFC after: 3 days

13 years agoBackport missing tunings for -march=core2:
mm [Thu, 17 Mar 2011 09:44:33 +0000 (09:44 +0000)]
Backport missing tunings for -march=core2:
- enable extra 80387 mathematical constants (ext_80387_constants) [1]
- enable compare and exchange 16 bytes (cmpxchg16b) [2]

Verified against llvm-gcc (and apple gcc)

Obtained from: gcc-4.3 (ref. svn revs. 119260 [1], 121140 [2]; GPLv2)
MFC after: 2 weeks

13 years agoWhen building libc with the syscall compatibility, don't also generate the
marcel [Thu, 17 Mar 2011 04:40:37 +0000 (04:40 +0000)]
When building libc with the syscall compatibility, don't also generate the
syscall assembly files. This results in conflicting dependencies and can
cause unexpected results for parallel builds. This is because the .c file
and the .S file both generate the same .o file.

Submitted by: Simon Gerraty <sjg@juniper.net>
Sponsored by: Juniper Networks

13 years agoDon't add sigwait.c to MISRCS here when sigwait.c lives under ../sys and
marcel [Thu, 17 Mar 2011 04:30:43 +0000 (04:30 +0000)]
Don't add sigwait.c to MISRCS here when sigwait.c lives under ../sys and
it's already added to SRCS there.

13 years agoRemove uptime validity check that hasn't been necessary since r151417
emaste [Thu, 17 Mar 2011 01:05:54 +0000 (01:05 +0000)]
Remove uptime validity check that hasn't been necessary since r151417
switched to clock_gettime.  vmstat will now not exit with an error
if run on a system with 10 years of uptime.

13 years agoMerge ACPICA 20110316.
jkim [Thu, 17 Mar 2011 00:29:53 +0000 (00:29 +0000)]
Merge ACPICA 20110316.

13 years agoo) Set MAC addresses starting at the MAC base for all management ports, not
jmallett [Wed, 16 Mar 2011 22:51:34 +0000 (22:51 +0000)]
o) Set MAC addresses starting at the MAC base for all management ports, not
   just the MR-730.
o) Start MAC addresses for the non-management ports after the management ports.

Submitted by: Bhanu Prakash (with modifications)

13 years agoThe size of zfsboot2 grown up to 64 Kbytes in r219089.
ae [Wed, 16 Mar 2011 20:19:48 +0000 (20:19 +0000)]
The size of zfsboot2 grown up to 64 Kbytes in r219089.
Increase NSECT up to 128 sectors too.

Reviewed by: jhb, pjd

13 years agoSet control flags in putc(). This should fix zfsboot hangs in drvread().
ae [Wed, 16 Mar 2011 20:04:56 +0000 (20:04 +0000)]
Set control flags in putc(). This should fix zfsboot hangs in drvread().

PR: kern/153552
Reviewed by: jhb
MFC after: 1 week

13 years agoRemove too expensive bus_dmamap_sync(9) call in dc_rx_resync().
yongari [Wed, 16 Mar 2011 17:09:51 +0000 (17:09 +0000)]
Remove too expensive bus_dmamap_sync(9) call in dc_rx_resync().
With this change, driver may not notice updated descriptor status
change when bounce buffers are active. However, rxeof() in next run
will handle the synchronization.

Change dc_rxeof() a bit to return the number of processed frames in
RX descriptor ring. Previously it returned the number of frames
that were successfully passed to upper stack which in turn means it
ignored frames that were discarded due to errors. The number of
processed frames in RX descriptor ring is used to detect whether
driver is out of sync with controller's current descriptor pointer.
Returning number of processed frames reduces unnecessary (probably
wrong) re-synchronization.

Reviewed by: marius

13 years agoRevert r219676.
jkim [Wed, 16 Mar 2011 16:44:08 +0000 (16:44 +0000)]
Revert r219676.

Requested by: jhb, bde

13 years agoThe hardware has caught up; improvements are now observed even at 128,
ivoras [Wed, 16 Mar 2011 16:22:59 +0000 (16:22 +0000)]
The hardware has caught up; improvements are now observed even at 128,
but stay conservative and bump read_max to "only" 64 (it will probably be
a good idea to increase this to 128 after the next major release).

13 years agoRework r219679. Always check CPU class at run-time to make it predictable.
jkim [Wed, 16 Mar 2011 16:09:08 +0000 (16:09 +0000)]
Rework r219679.  Always check CPU class at run-time to make it predictable.
Unfortunately, it pulls in <machine/cputypes.h> but it is small enough and
namespace pollution is minimal, I hope.

Pointed out by: bde
Pointy hat: jkim

13 years agoFix -march/-mtune=native autodetection for Intel Core 2 CPUs
mm [Wed, 16 Mar 2011 12:40:58 +0000 (12:40 +0000)]
Fix -march/-mtune=native autodetection for Intel Core 2 CPUs

Obtained from: gcc 4.3 (partial rev. 119454; GPLv2)
MFC after: 2 weeks

13 years agoFrom fts.c comment:
pjd [Wed, 16 Mar 2011 08:58:09 +0000 (08:58 +0000)]
From fts.c comment:

The "FTS_NOSTAT" option can avoid a lot of calls to stat(2) if it knows that a
directory could not possibly have subdirectories. This is decided by looking at
the link count: a subdirectory would increment its parent's link count by
virtue of its own ".." entry.  This assumption only holds for UFS-like
filesystems that implement links and directories this way, so we must punt for
others.

It looks like ZFS is a UFS-like file system, as the above also holds for ZFS.
Add ZFS to the list of file systems that allow for such optimization.

MFC after: 1 month

13 years agoo) Tear down receive interrupt on detach.
jmallett [Wed, 16 Mar 2011 08:56:22 +0000 (08:56 +0000)]
o) Tear down receive interrupt on detach.

Submitted by: Bhanu Prakash

13 years agoo) Clean up FPA pools on module unload.
jmallett [Wed, 16 Mar 2011 08:51:36 +0000 (08:51 +0000)]
o) Clean up FPA pools on module unload.
o) Allocate output buffer pool based on available output queues.

Submitted by: Bhanu Prakash (with modifications)

13 years agoo) Properly size caches and TLB on Octeon.
jmallett [Wed, 16 Mar 2011 08:22:29 +0000 (08:22 +0000)]
o) Properly size caches and TLB on Octeon.
o) Make COP0_SYNC do nothing on Octeon, which is fully interlocked.

Submitted by: Bhanu Prakash (with modifications)

13 years agoMFaltix:
marcel [Wed, 16 Mar 2011 03:53:18 +0000 (03:53 +0000)]
MFaltix:
Add support for Pre-Boot Virtual Memory (PBVM) to the loader.

PBVM allows us to link the kernel at a fixed virtual address without
having to make any assumptions about the physical memory layout. On
the SGI Altix 350 for example, there's no usuable physical memory
below 192GB. Also, the PBVM allows us to control better where we're
going to physically load the kernel and its modules so that we can
make sure we load the kernel in memory that's close to the BSP.

The PBVM is managed by a simple page table. The minimum size of the
page table is 4KB (EFI page size) and the maximum is currently set
to 1MB. A page in the PBVM is 64KB, as that's the maximum alignment
one can specify in a linker script. The bottom line is that PBVM is
between 64KB and 8GB in size.

The loader maps the PBVM page table at a fixed virtual address and
using a single translations. The PBVM itself is also mapped using a
single translation for a maximum of 32MB.

While here, increase the heap in the EFI loader from 512KB to 2MB
and set the stage for supporting relocatable modules.

13 years agoMFV of r219685, tzdata2011d
edwin [Wed, 16 Mar 2011 03:28:42 +0000 (03:28 +0000)]
MFV of r219685, tzdata2011d

- Pacific/Apia will have DST on 2 April instead of 3 April in 2011.
- Turkye will go to DST on 28 April instead of 27 April in 2011.
- Cuba will go to DST on 20 April in 2011.

Obtained from:  ftp://elsie.nci.nih.gov/pub/

13 years agoFix mv_gpio_in() for pin numbers that occupy bits 8-31 in GPIO registers.
marcel [Wed, 16 Mar 2011 00:42:15 +0000 (00:42 +0000)]
Fix mv_gpio_in() for pin numbers that occupy bits 8-31 in GPIO registers.
The compiler will truncate the 32-bit return value of mv_gpio_value_get()
to match the 8-bit return value of mv_gpio_in(). A conditional expression
is used to have mv_gpio_in() always return 0 or 1 instead.

13 years agoRevert previous commit: EFI_STATUS is a 64-bit integral on ia64. Fix the
marcel [Wed, 16 Mar 2011 00:08:10 +0000 (00:08 +0000)]
Revert previous commit: EFI_STATUS is a 64-bit integral on ia64. Fix the
compile warning on i386 (where EFI_STATUS is a 32-bit integral) by casting
the status argument to u_long instead.

Pointy hat: brucec
MFC after: 3 days

13 years agorfork(2): Discourage rfork_thread-like approaches.
jilles [Tue, 15 Mar 2011 23:51:47 +0000 (23:51 +0000)]
rfork(2): Discourage rfork_thread-like approaches.

Calling rfork_thread(3) does not interoperate with pthreads and global state
is not properly protected.

Remove the BUGS section suggesting LinuxThreads entirely. With the current
pthread library libthr, all threads are kernel-level entities so there seems
little reason to use LinuxThreads.

13 years agobin: Prefer strrchr() to rindex().
jilles [Tue, 15 Mar 2011 22:22:11 +0000 (22:22 +0000)]
bin: Prefer strrchr() to rindex().

This removes the last index/rindex usage from /bin.

13 years agoPartially revert r219672. After r198295, kernel need to seed randomness as
jkim [Tue, 15 Mar 2011 21:45:10 +0000 (21:45 +0000)]
Partially revert r219672.  After r198295, kernel need to seed randomness as
soon as possible for stack protector.  However, dummy timecounter does not
have enough entropy and we don't need to sacrifice Pentium class and later.

Pointed out by: Maxim Dounin (mdounin at mdounin dot ru)

13 years agoDo not let machdep.tsc_freq modify tsc_freq itself. It is bad for i386 as
jkim [Tue, 15 Mar 2011 19:47:20 +0000 (19:47 +0000)]
Do not let machdep.tsc_freq modify tsc_freq itself.  It is bad for i386 as
it does not operate atomically.  Actually, it serves no purpose.

Noticed by: bde

13 years agoRemove tsc_present from this file, really.
jkim [Tue, 15 Mar 2011 18:09:29 +0000 (18:09 +0000)]
Remove tsc_present from this file, really.

13 years agoFix a typo in the previous commit. AMD64 and Intel 64 are two brand names.
jkim [Tue, 15 Mar 2011 17:59:30 +0000 (17:59 +0000)]
Fix a typo in the previous commit.  AMD64 and Intel 64 are two brand names.

13 years agoDeprecate tsc_present as the last of its real consumers finally disappeared.
jkim [Tue, 15 Mar 2011 17:19:52 +0000 (17:19 +0000)]
Deprecate tsc_present as the last of its real consumers finally disappeared.

13 years agoUnconditionally use binuptime(9) for get_cyclecount(9) on i386. Since this
jkim [Tue, 15 Mar 2011 17:14:26 +0000 (17:14 +0000)]
Unconditionally use binuptime(9) for get_cyclecount(9) on i386.  Since this
function is almost exclusively used for random harvesting, there is no need
for micro-optimization.  Adjust the manual page accordingly.

13 years agoRemove #include needed for debugging.
pjd [Tue, 15 Mar 2011 13:53:39 +0000 (13:53 +0000)]
Remove #include needed for debugging.

MFC after: 1 week

13 years agoStaticize functions which are not used somewhere else, move the
netchild [Tue, 15 Mar 2011 13:40:47 +0000 (13:40 +0000)]
Staticize functions which are not used somewhere else, move the
corresponding prototypes from the header to the code file.

13 years agoTurn on softupdates by default. We need a UI to set filesystem parameters.
nwhitehorn [Tue, 15 Mar 2011 13:27:34 +0000 (13:27 +0000)]
Turn on softupdates by default. We need a UI to set filesystem parameters.

13 years agoForgot to commit this change along with r219563: pam_group(8) now issues
des [Tue, 15 Mar 2011 10:13:35 +0000 (10:13 +0000)]
Forgot to commit this change along with r219563: pam_group(8) now issues
a warning if neither luser nor ruser is specified.  The correct option
for su(1) is ruser.

MFC after: 1 month

13 years ago- Inadvertently committed files with +x attribute, fixed.
davidch [Tue, 15 Mar 2011 01:06:27 +0000 (01:06 +0000)]
- Inadvertently committed files with +x attribute, fixed.
- Minor change to info output string.