]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoClear DF bit in eflags/rflags on the kernel entry. The i386 and amd64
kib [Wed, 23 Jun 2010 20:44:07 +0000 (20:44 +0000)]
Clear DF bit in eflags/rflags on the kernel entry. The i386 and amd64
ABI specifies the DF should be zero, and newer compilers do not clear
DF before using DF-sensitive instructions.

The DF clearing for signal handlers was done some time ago.

MFC after: 1 week

14 years agoMerge jmallett@'s n64 work into HEAD - changeset 6
jchandra [Wed, 23 Jun 2010 19:42:01 +0000 (19:42 +0000)]
Merge jmallett@'s n64 work into HEAD - changeset 6

PTE flag cleanup from http://svn.freebsd.org/base/user/jmallett/octeon
- Rename PTE_xx flags to match their MIPS names
- Use the new pte_set/test/clear macros uniformly, instead of a mixture
  of mips_pg_xxx(), pmap_pte_x() macros and direct access.
- Remove unused macros and defines from pte.h and pmap.c

Discussed on freebsd-mips@

Approved by: rrs(mentor), jmallett

14 years agoUpdate the man page to reflect the changes to the netDev configuration
randi [Wed, 23 Jun 2010 19:29:17 +0000 (19:29 +0000)]
Update the man page to reflect the changes to the netDev configuration
variable.

Approved by: cperciva (mentor)
MFC after: 3 days

14 years agoLet x86bios_alloc() pass contigmalloc(9) flags. Use it to set M_WAITOK
jkim [Wed, 23 Jun 2010 17:20:51 +0000 (17:20 +0000)]
Let x86bios_alloc() pass contigmalloc(9) flags.  Use it to set M_WAITOK
from VESA BIOS initialization.  All other malloc(9) uses in the function is
blocking any way.

14 years ago* Implement sctp_does_stcb_own_this_addr() correclty. It was taking the
tuexen [Wed, 23 Jun 2010 15:19:07 +0000 (15:19 +0000)]
* Implement sctp_does_stcb_own_this_addr() correclty. It was taking the
  wrong side into account.
* sctp_findassociation_ep_addr() must check the local address if available.
This fixes a bug where ABORT chunks were accepted even in the case where
the local was not owned by the endpoint.
Thanks to brucec for pointing out a bug in my first version of the fix.
MFC after: 3 days

14 years agoIf a device can't be opened, don't keep going but display the error
brucec [Wed, 23 Jun 2010 14:28:08 +0000 (14:28 +0000)]
If a device can't be opened, don't keep going but display the error
returned from open() and quit.

PR: bin/81035
Submitted by: Peter Schuller <peter.schuller at infidyne.com>
Approved by: rrs (mentor)

14 years agoMake it easier to cancel a failing installation by only attempting to
brucec [Wed, 23 Jun 2010 14:19:19 +0000 (14:19 +0000)]
Make it easier to cancel a failing installation by only attempting to
extract distributions once. If a distribution fails to fetch/extract
and the user doesn't want to retry, abort the installation.

Reviewed by: randi
Approved by: rrs (mentor)
MFC after: 1 month

14 years agoWhen installing on a machine which doesn't have a VGA card installed, enable
brucec [Wed, 23 Jun 2010 14:11:34 +0000 (14:11 +0000)]
When installing on a machine which doesn't have a VGA card installed, enable
a getty on the serial port so that it's possible to login when the system is
rebooted.

PR: bin/23098
Submitted by: Doug Ambrisko <ambrisko at whistle.com>
Reviewed by: randi
Approved by: rrs (mentor)
MFC after: 1 month

14 years agoAdd some more modules to loader.conf. Remove if_awi since support for it
brucec [Wed, 23 Jun 2010 14:06:05 +0000 (14:06 +0000)]
Add some more modules to loader.conf. Remove if_awi since support for it
was removed 2 years ago.

PR: conf/147126
PR: conf/116071
Approved by: rrs (mentor)

14 years agoFix bugs on pc98, use npxgetuserregs() instead of npxgetregs() for
kib [Wed, 23 Jun 2010 12:17:13 +0000 (12:17 +0000)]
Fix bugs on pc98, use npxgetuserregs() instead of npxgetregs() for
get_fpcontext(), and npxsetuserregs() for set_fpcontext). Also,
note that usercontext is not initialized anymore in fpstate_drop().

Systematically replace references to npxgetregs() and npxsetregs()
by npxgetuserregs() and npxsetuserregs() in comments.

Noted by: bde

14 years agoAfter the FPU use requires #MF working due to INT13 FPU exception handling
kib [Wed, 23 Jun 2010 11:21:19 +0000 (11:21 +0000)]
After the FPU use requires #MF working due to INT13 FPU exception handling
removal, MFi386 r209198:
    Use critical sections instead of disabling local interrupts to ensure
    the consistency between PCPU fpcurthread and the state of FPU.

Reviewed by: bde
Tested by: pho

14 years agoRemove the support for int13 FPU exception reporting on i386. It is
kib [Wed, 23 Jun 2010 11:12:58 +0000 (11:12 +0000)]
Remove the support for int13 FPU exception reporting on i386. It is
believed that all 486-class CPUs FreeBSD is capable to run on, either
have no FPU and cannot use external coprocessor, or have FPU on the
package and can use #MF.

Reviewed by: bde
Tested by: pho (previous version)

14 years agoRemove unused i586 optimized bcopy/bzero/etc implementations that utilize
kib [Wed, 23 Jun 2010 10:40:28 +0000 (10:40 +0000)]
Remove unused i586 optimized bcopy/bzero/etc implementations that utilize
FPU registers for copying. Remove the switch table and jumps from
bcopy/bzero/... to the actual implementation.
As a side-effect, i486-optimized bzero is removed.

Reviewed by: bde
Tested by: pho (previous version)

14 years agoDo not trust IRQ reported by ACPI. There are cases when it is wrong.
mav [Wed, 23 Jun 2010 05:43:21 +0000 (05:43 +0000)]
Do not trust IRQ reported by ACPI. There are cases when it is wrong.

14 years agoFix missing argument for errx().
kevlo [Wed, 23 Jun 2010 04:42:47 +0000 (04:42 +0000)]
Fix missing argument for errx().
While here, clean up the code a bit.

14 years agoAR71XX GPIO register definitions.
adrian [Wed, 23 Jun 2010 03:59:26 +0000 (03:59 +0000)]
AR71XX GPIO register definitions.

Reviewed by: gonzo@

14 years ago- fix for USB audio devices which use the 7-byte endpoint descriptor instead of
thompsa [Tue, 22 Jun 2010 21:16:18 +0000 (21:16 +0000)]
- fix for USB audio devices which use the 7-byte endpoint descriptor instead of
  the 9-byte one.
- remove sync-endpoint code, which is currently unused.

Reported by: Antun Matanovi
Submitted by: Hans Petter Selasky

14 years agoReduce MIDI input buffer size to one USB packet, hence some USB devices don't
thompsa [Tue, 22 Jun 2010 21:13:36 +0000 (21:13 +0000)]
Reduce MIDI input buffer size to one USB packet, hence some USB devices don't
properly short terminate their transfers. This fixes a problem where input
appears several seconds late.

Reported by: Alexander Yerenkow
Submitted by: Hans Petter Selasky

14 years agoAdd new device id.
thompsa [Tue, 22 Jun 2010 21:08:45 +0000 (21:08 +0000)]
Add new device id.

PR: usb/147190

14 years agoRemove unnecessarily inflammatory commentary.
randi [Tue, 22 Jun 2010 21:06:33 +0000 (21:06 +0000)]
Remove unnecessarily inflammatory commentary.

Approved by: cperciva (mentor)

14 years agoAdd a mass storage quirk.
thompsa [Tue, 22 Jun 2010 21:03:13 +0000 (21:03 +0000)]
Add a mass storage quirk.

PR: usb/147196

14 years agoAdd new device id.
thompsa [Tue, 22 Jun 2010 21:01:40 +0000 (21:01 +0000)]
Add new device id.

PR: usb/146907

14 years agoAdd support for LOW speed BULK transfers. This mode is not recommended by the
thompsa [Tue, 22 Jun 2010 20:57:48 +0000 (20:57 +0000)]
Add support for LOW speed BULK transfers.  This mode is not recommended by the
USB 2.0 standard, though some USB devices use it anyway.

Submitted by: Hans Petter Selasky

14 years agoAdd missing opt_compat.h dependency.
thompsa [Tue, 22 Jun 2010 20:52:35 +0000 (20:52 +0000)]
Add missing opt_compat.h dependency.

Found by: Garrett Cooper

14 years agoAdd "legacy route" support to HPET driver. When enabled, this mode makes
mav [Tue, 22 Jun 2010 19:42:27 +0000 (19:42 +0000)]
Add "legacy route" support to HPET driver. When enabled, this mode makes
HPET to steal IRQ0 from i8254 and IRQ8 from RTC timers. It can be suitable
for HPETs without FSB interrupts support, as it gives them two unshared
IRQs. It allows them to provide one per-CPU event timer on dual-CPU system,
that should be suitable for further tickless kernels.

To enable it, such lines may be added to /boot/loader.conf:
hint.atrtc.0.clock=0
hint.attimer.0.clock=0
hint.hpet.0.legacy_route=1

14 years agoSome style fixes for r209371.
mav [Tue, 22 Jun 2010 16:20:10 +0000 (16:20 +0000)]
Some style fixes for r209371.

Submitted by: jhb@

14 years agoDo not set level-triggered interrupt mode if we are not going to use it.
mav [Tue, 22 Jun 2010 16:10:48 +0000 (16:10 +0000)]
Do not set level-triggered interrupt mode if we are not going to use it.
This fixes QEMU crash due to unsupported level-triggered HPET interrupts.

Reported by: kib@

14 years agoAdd TCP scalability testing wrapper scripts for tcpp.
rwatson [Tue, 22 Jun 2010 10:46:57 +0000 (10:46 +0000)]
Add TCP scalability testing wrapper scripts for tcpp.

Sponsored by: Juniper Networks
MFC after: 1 week

14 years agoRevised tuning advice for tcpp benchmarking: do it in loader.conf, and
rwatson [Tue, 22 Jun 2010 10:45:35 +0000 (10:45 +0000)]
Revised tuning advice for tcpp benchmarking: do it in loader.conf, and
tweak more TCP/stack parameters.

Sponsored by: Juniper Networks
MFC after: 1 week

14 years agoudf_vnops: cosmetic followup to r208671 - better looking code
avg [Tue, 22 Jun 2010 08:22:25 +0000 (08:22 +0000)]
udf_vnops: cosmetic followup to r208671 - better looking code

Suggested by: jhb
MFC after: 3 days

14 years agoreadelf.1: remove duplicate -u/--unwind option description
avg [Tue, 22 Jun 2010 07:31:05 +0000 (07:31 +0000)]
readelf.1: remove duplicate -u/--unwind option description

MFC after: 2 weeks

14 years agoImprove fsck robustness for SU+J cases:
delphij [Tue, 22 Jun 2010 00:26:07 +0000 (00:26 +0000)]
Improve fsck robustness for SU+J cases:

 - Use err/errx only when the case is really fatal.  For other
   cases, fall back to full fsck instead of quiting fsck.
 - Plug a memory leak.
 - Avoid divide by zero when printing summary.
 - Output "FILE SYSTEM IS MARKED CLEAN" when a successful
   journal recovering is done.
 - When -f is specified, do full fsck instead of journal recovery.

14 years agoIntroduce vm_page_next() and vm_page_prev(), and use them in
alc [Mon, 21 Jun 2010 23:27:24 +0000 (23:27 +0000)]
Introduce vm_page_next() and vm_page_prev(), and use them in
vm_pageout_clean().  When iterating over a range of pages, these functions
can be cheaper than vm_page_lookup() because their implementation takes
advantage of the vm_object's memq being ordered.

Reviewed by: kib@
MFC after: 3 weeks

14 years ago"time lock" is no longer a spin-lock since r209371.
mav [Mon, 21 Jun 2010 21:15:51 +0000 (21:15 +0000)]
"time lock" is no longer a spin-lock since r209371.

Reported by: kib@

14 years agoFix ia64 build broken by r209371.
mav [Mon, 21 Jun 2010 20:27:32 +0000 (20:27 +0000)]
Fix ia64 build broken by r209371.
ia64, same as amd64 has ACPI and always has APIC.

Submitted by: jhb@

14 years agoFix i386 LINT build broken by r209371.
mav [Mon, 21 Jun 2010 19:53:47 +0000 (19:53 +0000)]
Fix i386 LINT build broken by r209371.
There appeared such legacy thing as APM, that somehow breaking RTC.

14 years agoDon't build Clang libs during lib32 build.
ed [Mon, 21 Jun 2010 19:44:29 +0000 (19:44 +0000)]
Don't build Clang libs during lib32 build.

This should massively reduce the buildworld time on amd64.

Pointy hat to: me

14 years agoSyntax, commas and stuff. Comments from jhb.
sbruno [Mon, 21 Jun 2010 18:01:57 +0000 (18:01 +0000)]
Syntax, commas and stuff.  Comments from jhb.

PR: bin/147572
MFC after: 2 weeks

14 years agoCheck for overflow before it occurs. Also add check for
ae [Mon, 21 Jun 2010 12:50:54 +0000 (12:50 +0000)]
Check for overflow before it occurs. Also add check for
negative numbers.

Suggested by: ache
Approved by: kib (mentor)

14 years agoUse ISO C99 integer types in sys/kern where possible.
ed [Mon, 21 Jun 2010 09:55:56 +0000 (09:55 +0000)]
Use ISO C99 integer types in sys/kern where possible.

There are only about 100 occurences of the BSD-specific u_int*_t
datatypes in sys/kern. The ISO C99 integer types are used here more
often.

14 years agoDo not report a stack garbage as the old value for debug.ncores sysctl.
kib [Mon, 21 Jun 2010 09:51:25 +0000 (09:51 +0000)]
Do not report a stack garbage as the old value for debug.ncores sysctl.

Reported by: brucec

14 years agoRemove G_TYPE_ASCLBA type and replace it with G_TYPE_STRING in gpart.
ae [Mon, 21 Jun 2010 08:24:50 +0000 (08:24 +0000)]
Remove G_TYPE_ASCLBA type and replace it with G_TYPE_STRING in gpart.
Move code that converts params from humanized numbers to sectors count
to subr.c and adjust comment.
Add post-processing for "size" and "start offset" params in gpart,
now they are properly converted to sectors count with known sector size
that can be greater that 512 bytes.
Also replace "unsigned long long" type to "off_t" for unify code since
it used for medium size in libgeom(3) and DIOCGMEDIASIZE ioctl.

PR: bin/146277
Reviewed by: marcel (previous version)
Approved by: kib (mentor)
MFC after: 1 month

14 years agoImplement new event timers infrastructure. It provides unified APIs for
mav [Sun, 20 Jun 2010 21:33:29 +0000 (21:33 +0000)]
Implement new event timers infrastructure. It provides unified APIs for
writing event timer drivers, for choosing best possible drivers by machine
independent code and for operating them to supply kernel with hardclock(),
statclock() and profclock() events in unified fashion on various hardware.

Infrastructure provides support for both per-CPU (independent for every CPU
core) and global timers in periodic and one-shot modes. MI management code
at this moment uses only periodic mode, but one-shot mode use planned for
later, as part of tickless kernel project.

For this moment infrastructure used on i386 and amd64 architectures. Other
archs are welcome to follow, while their current operation should not be
affected.

This patch updates existing drivers (i8254, RTC and LAPIC) for the new
order, and adds event timers support into the HPET driver. These drivers
have different capabilities:
 LAPIC - per-CPU timer, supports periodic and one-shot operation, may
freeze in C3 state, calibrated on first use, so may be not exactly precise.
 HPET - depending on hardware can work as per-CPU or global, supports
periodic and one-shot operation, usually provides several event timers.
 i8254 - global, limited to periodic mode, because same hardware used also
as time counter.
 RTC - global, supports only periodic mode, set of frequencies in Hz
limited by powers of 2.

Depending on hardware capabilities, drivers preferred in following orders,
either LAPIC, HPETs, i8254, RTC or HPETs, LAPIC, i8254, RTC.
User may explicitly specify wanted timers via loader tunables or sysctls:
kern.eventtimer.timer1 and kern.eventtimer.timer2.
If requested driver is unavailable or unoperational, system will try to
replace it. If no more timers available or "NONE" specified for second,
system will operate using only one timer, multiplying it's frequency by few
times and uing respective dividers to honor hz, stathz and profhz values,
set during initial setup.

14 years agoTemporarily disable instruction relocation while setting up the kernel's
nwhitehorn [Sun, 20 Jun 2010 16:56:48 +0000 (16:56 +0000)]
Temporarily disable instruction relocation while setting up the kernel's
IBAT entry in early boot in order to prevent possible faults from races
between the instruction cache and the MMU.

PR: powerpc/148003
MFC after: 3 days

14 years agoEnsure that VOP_ACCESSX is called with exclusively locked vnode for
kib [Sun, 20 Jun 2010 13:35:16 +0000 (13:35 +0000)]
Ensure that VOP_ACCESSX is called with exclusively locked vnode for
the kernel compiled with QUOTA option. ufs_accessx() upgrades the vdp
vnode lock from shared to exclusive to assign the dquot structure to
the vnode, and ufs_delete_denied() is called when tvp is locked. Since
upgrade drops shared lock when non-blocked upgrade failed, LOR is there.

Reported and tested by: Dmitry Pryanishnikov <lynx.ripe gmail com>
Tested by: pho
PR: kern/147890
MFC after: 1 week

14 years agoSmall style fixes:
ed [Sun, 20 Jun 2010 12:52:33 +0000 (12:52 +0000)]
Small style fixes:

- ANSIfy prototypes.
- Remove unneeded whitespace.
- Add const keyword to function where it can be used.

14 years agoFix some style(9), although there's a lot more issues here.
brian [Sun, 20 Jun 2010 09:40:54 +0000 (09:40 +0000)]
Fix some style(9), although there's a lot more issues here.
Fix some casting errors.

PR: 142384
Submitted by: giffunip at tutopia dot com
Obtained from: NetBSD
MFC after: 3 weeks

14 years agoRecognise the -l switch with pkill - list kill command(s) used.
brian [Sun, 20 Jun 2010 08:48:30 +0000 (08:48 +0000)]
Recognise the -l switch with pkill - list kill command(s) used.

PR: 143558
Submitted by: eitanadlerlist at gmail dot com
MFC after: 3 weeks

14 years agoAdd a -t switch for masking output that's above or below certain thresholds.
brian [Sun, 20 Jun 2010 08:27:03 +0000 (08:27 +0000)]
Add a -t switch for masking output that's above or below certain thresholds.
This switch makes it a lot easier to locate problem areas when a process
is threatening to consume all of your disk space.

PR: 144192
Submitted by: gk
MFC after: 3 weeks

14 years agoAdd a missing prototype
brian [Sun, 20 Jun 2010 08:03:06 +0000 (08:03 +0000)]
Add a missing prototype

PR: 145232
Submitted by: gcooper
MFC after: 1 week

14 years agoMerge from English r198040: add C message catalogue entries for newer
maxim [Sun, 20 Jun 2010 06:52:10 +0000 (06:52 +0000)]
Merge from English r198040: add C message catalogue entries for newer
errnos: EBADMSG, EMULTIHOP, ENOLINK, EPROTO, ENOTCAPABLE.

PR: docs/147983
Submitted by: pluknet
MFC after: 1 week

14 years agoClean up item_add and remove -fno-strict-aliasing from CFLAGS. Note that
randi [Sun, 20 Jun 2010 04:14:49 +0000 (04:14 +0000)]
Clean up item_add and remove -fno-strict-aliasing from CFLAGS.  Note that
the "aux" value in libdialog is really an opaque pointer, but libdialog
stores it as a long for historical reasons.

Approved by: cperciva (mentor)

14 years agoUnbreak platforms with char unsigned by default. Oddly enough, GCC isn't
marcel [Sun, 20 Jun 2010 00:34:06 +0000 (00:34 +0000)]
Unbreak platforms with char unsigned by default. Oddly enough, GCC isn't
satisfied with a simple cast to int in the check against EOF, so the fix
is a bit involved by actually having to go through a temporary variable.

14 years agomdoc nitpicking for gsched.8
uqs [Sat, 19 Jun 2010 18:52:37 +0000 (18:52 +0000)]
mdoc nitpicking for gsched.8
- remove stray argument [1]
- remove stray whitespace
- use canonical wording for the HISTORY section

PR: docs/147119 [1]
Submitted by: Alexander Best <alexbestms@wwu.de> [1]
MFC after: 1 week

14 years agoInitialise the "trials" variable to zero earlier in case we unexpectedly
gavin [Sat, 19 Jun 2010 17:04:01 +0000 (17:04 +0000)]
Initialise the "trials" variable to zero earlier in case we unexpectedly
error out early.

Found by: clang static analyzer

14 years agoRemove dead assignments, we overwrite the variable almost immediately.
gavin [Sat, 19 Jun 2010 16:29:23 +0000 (16:29 +0000)]
Remove dead assignments, we overwrite the variable almost immediately.

Found by: clang static analyzer

14 years agoVariable 'getmap' is unused.
gavin [Sat, 19 Jun 2010 16:24:55 +0000 (16:24 +0000)]
Variable 'getmap' is unused.

Found by: clang static analyzer

14 years agoReport transport type in XPT_PATH_INQ.
mav [Sat, 19 Jun 2010 13:42:14 +0000 (13:42 +0000)]
Report transport type in XPT_PATH_INQ.

MFC after: 3 days

14 years agoReport transport type in XPT_PATH_INQ.
mav [Sat, 19 Jun 2010 13:41:17 +0000 (13:41 +0000)]
Report transport type in XPT_PATH_INQ.

PR: i386/147929
MFC after: 3 days

14 years agoCore i5, same as previously Core2Duo, found to not set P-state for single
mav [Sat, 19 Jun 2010 13:09:42 +0000 (13:09 +0000)]
Core i5, same as previously Core2Duo, found to not set P-state for single
core lower then set on other cores. Do not try to test P-states on attach
on SMP systems. It is hopeless now and will just pollute verbose logs.
If needed, check still can be forced via loader tunable.

14 years agoExtend the AR71XX watchdog debugging and data.
adrian [Sat, 19 Jun 2010 12:12:39 +0000 (12:12 +0000)]
Extend the AR71XX watchdog debugging and data.

* Add some per-device sysctl entries which record the watchdog state -
  whether it is armed; whether the last reboot was due to the watchdog.
* Add a per-device sysctl debug flag to enable logging watchdog arming/
  disarming.

Reviewed by: gonzo@

14 years agosh: Fix compilation with -DNO_HISTORY.
jilles [Sat, 19 Jun 2010 10:33:04 +0000 (10:33 +0000)]
sh: Fix compilation with -DNO_HISTORY.

The LINENO code uses snprintf() and relied on "myhistedit.h" to pull in the
necessary <stdio.h>.

Compiling with -DNO_HISTORY disables all editing and history support and
allows linking without -ledit -ltermcap. This may be useful for embedded
systems.

MFC after: 2 weeks

14 years agoRemove an unnecessary cat.
brian [Sat, 19 Jun 2010 09:33:11 +0000 (09:33 +0000)]
Remove an unnecessary cat.

PR: 145447
Submitted by: u at netbeisser dot de
MFC after: 1 week

14 years agoRemove vestiges of 'slip'.
brian [Sat, 19 Jun 2010 09:21:34 +0000 (09:21 +0000)]
Remove vestiges of 'slip'.

PR: 145648
Submitted by: alexbestms at wwu dot de and spam at rm-rf dot kiev dot ua
MFC after: 1 week

14 years agoOops! Add " / hz" missed in r209328. Assume interrupt rate hz/2, not 1/2.
mav [Sat, 19 Jun 2010 08:46:17 +0000 (08:46 +0000)]
Oops! Add " / hz" missed in r209328. Assume interrupt rate hz/2, not 1/2.

14 years agoAdd a missing linefeed
brian [Sat, 19 Jun 2010 08:42:29 +0000 (08:42 +0000)]
Add a missing linefeed

PR: 147337
Submitted by: cyberleo at cyberleo dot net
MFC after: 1 week

14 years agoWhile we indeed can't precisely measure time spent in C1, we can consider
mav [Sat, 19 Jun 2010 08:36:12 +0000 (08:36 +0000)]
While we indeed can't precisely measure time spent in C1, we can consider
measured interval as upper bound. It should be more precise then just
assuming hz/2. For idle CPU it should be quite precise, for busy - not
worse then before.

14 years ago- Rename the internal for loop iterator to "_i" to avoid potential shadowing of
lstewart [Sat, 19 Jun 2010 02:30:10 +0000 (02:30 +0000)]
- Rename the internal for loop iterator to "_i" to avoid potential shadowing of
  external variables named "i". The "_" prefix is reserved for infrastructure
  type code and is therefore not expected to be used by normal code likely to
  call DPCPU_SUM(). [1]

- Change DPCPU_SUM to return the sum rather than calculate and assign it
  internally. Usage is now: "sum = DPCPU_SUM(dpcpu_var, member_to_sum);" [2]

- Fix some style nits. [3]

Sponsored by: FreeBSD Foundation
Suggested by: bde [3], mdf [1], kib [1,2], pjd [1,3]
Reviewed by: kib
MFC after: 1 week (instead of r209119)

14 years agoCatch up with the page and page queues locking changes.
alc [Fri, 18 Jun 2010 23:14:16 +0000 (23:14 +0000)]
Catch up with the page and page queues locking changes.

14 years agoEliminate unnecessary page queues locking.
alc [Fri, 18 Jun 2010 22:12:12 +0000 (22:12 +0000)]
Eliminate unnecessary page queues locking.

14 years agoAdd support for newer XLS chips/boards in the GMAC driver.
jchandra [Fri, 18 Jun 2010 21:40:32 +0000 (21:40 +0000)]
Add support for newer XLS chips/boards in the GMAC driver.
Improved processor id code in board.h, remove unnecessary macros.

Approved by: rrs(mentor)

14 years agoMissed commit in r209310: the IRQ number in INTR_VEC() should have
nwhitehorn [Fri, 18 Jun 2010 21:24:17 +0000 (21:24 +0000)]
Missed commit in r209310: the IRQ number in INTR_VEC() should have
parantheses around it to allow arithmetic expressions to be passed.

Submitted by: Andreas Tobler

14 years agoMerge jmallett@'s n64 work into HEAD - changeset 5
jchandra [Fri, 18 Jun 2010 20:07:30 +0000 (20:07 +0000)]
Merge jmallett@'s n64 work into HEAD - changeset 5

Remove unnecessary locking and sched_pin() call while creating a temporary
mapping.

Changes from http://svn.freebsd.org/base/user/jmallett/octeon

Approved by: rrs (mentor), jmallett

14 years agoOnly enable kdtrace hook in the LINT on the architectures that implement it.
kib [Fri, 18 Jun 2010 18:51:09 +0000 (18:51 +0000)]
Only enable kdtrace hook in the LINT on the architectures that implement it.

14 years agoDo not print first digits of IRQ number if whole number doesn't fit.
mav [Fri, 18 Jun 2010 18:18:03 +0000 (18:18 +0000)]
Do not print first digits of IRQ number if whole number doesn't fit.

14 years agoAdd MSI support for PCI devices attached to the CPC925 and CPC945 bridges
nwhitehorn [Fri, 18 Jun 2010 17:39:56 +0000 (17:39 +0000)]
Add MSI support for PCI devices attached to the CPC925 and CPC945 bridges
found in Apple and IBM G5 systems.

14 years agoMissed change to sun4v while adding iparent lookup to the OFW interrupt
nwhitehorn [Fri, 18 Jun 2010 16:29:03 +0000 (16:29 +0000)]
Missed change to sun4v while adding iparent lookup to the OFW interrupt
map interface.

14 years agoDo not allow EOF token to be put back into input buffer.
kan [Fri, 18 Jun 2010 16:07:24 +0000 (16:07 +0000)]
Do not allow EOF token to be put back into input buffer.

This reimplements previous change from r20930 in more generic way.

MFC after: 1 week

14 years agoAdd support for the Keywest I2C controller in Apple uninorth northbridges.
nwhitehorn [Fri, 18 Jun 2010 14:28:57 +0000 (14:28 +0000)]
Add support for the Keywest I2C controller in Apple uninorth northbridges.
Although the Keywest registers have only 1 byte of content, they are
secretly 4-byte registers, which became apparent from them moving on the
big-endian Uninorth version of the controller.

14 years agoRevert changes accidentally committed as part of r209298.
nwhitehorn [Fri, 18 Jun 2010 14:20:54 +0000 (14:20 +0000)]
Revert changes accidentally committed as part of r209298.

14 years agoFollowing r209299, level interrupts are low by default on PPC, so remove
nwhitehorn [Fri, 18 Jun 2010 14:17:45 +0000 (14:17 +0000)]
Following r209299, level interrupts are low by default on PPC, so remove
the hack here to reprogram the interrupt for K2 SATA devices.

14 years agoChange the default interrupt polarity on PowerPC systems from high to low.
nwhitehorn [Fri, 18 Jun 2010 14:16:24 +0000 (14:16 +0000)]
Change the default interrupt polarity on PowerPC systems from high to low.
On Apple systems at least, all the level interrupts are wired active low.
Before this change, our PIC programming only worked because Apple hardware
ignores the interrupt polarity bit on all interrupts except IRQ 0.

14 years agoProvide for multiple, cascaded PICs on PowerPC systems, and extend the
nwhitehorn [Fri, 18 Jun 2010 14:06:27 +0000 (14:06 +0000)]
Provide for multiple, cascaded PICs on PowerPC systems, and extend the
OFW interrupt map interface to also return the device's interrupt parent.

MFC after: 8.1-RELEASE

14 years agoAdd unwind annotations to the asm part of crt1 on i386. Terminate the
kib [Fri, 18 Jun 2010 11:10:39 +0000 (11:10 +0000)]
Add unwind annotations to the asm part of crt1 on i386. Terminate the
process with SIGTRAP if _start1() unexpectedly returns.

Reviewed by: kan
MFC after: 2 weeks

14 years agoOften reported issue with newer ld is:
kib [Fri, 18 Jun 2010 11:09:51 +0000 (11:09 +0000)]
Often reported issue with newer ld is:
error in /usr/lib/crtendS.o(.eh_frame); no .eh_frame_hdr table will be created.

The issue is that crtend is compiled with unwind table, and also it
places the special CIE into the .eh_frame indicating the end of section,
that is located before generated unwind table. New ld has assertion that
verifies that closing CIE is indeed the last CIE, causing the crypting
message to be issued, and refusing to generate dwarf unwind.

Add -fno-asynchronous-unwind-tables to disable unwind table generation
for crtbegin/crtend. While there, disable omitting the frame pointer [1].

Requested by: kan [1]
Reviewed by: kan
MFC after: 2 weeks

14 years agoFix a rece condition in the shutdown handling.
tuexen [Fri, 18 Jun 2010 09:01:44 +0000 (09:01 +0000)]
Fix a rece condition in the shutdown handling.
The race condition resulted in a panic.

MFC after: 3 days

14 years agoAdd the AAAA address for i.root-servers.net
dougb [Fri, 18 Jun 2010 08:11:52 +0000 (08:11 +0000)]
Add the AAAA address for i.root-servers.net

14 years agoMuch closer approximation of the kernel's calculation of this value.
sbruno [Fri, 18 Jun 2010 01:17:16 +0000 (01:17 +0000)]
Much closer approximation of the kernel's calculation of this value.

Reviewed by: alc
Obtained from: Yahoo Inc.

14 years agoImport latest ARC change from OpenSolaris:
mm [Thu, 17 Jun 2010 22:47:44 +0000 (22:47 +0000)]
Import latest ARC change from OpenSolaris:
- large ghost eviction causes high write latency
- arc_adjust might adjust MRU unnecessarily
- arc_adapt can lead to wild arc_p adjustment

OpenSolaris onnv-revision: 12636:13b5d698941e

Submitted by: avg
Approved by: pjd, delphij (mentor)
Obtained from: OpenSolaris (Bug ID 695021969534036951024)
MFC after: 1 month

14 years agoRemove an unused comment.
delphij [Thu, 17 Jun 2010 19:48:03 +0000 (19:48 +0000)]
Remove an unused comment.

14 years agoExpand man page to document the fact that mptutil/mpt doesn't support RAID volumes...
sbruno [Thu, 17 Jun 2010 19:28:56 +0000 (19:28 +0000)]
Expand man page to document the fact that mptutil/mpt doesn't support RAID volumes in excess of 2TB.  Document workaround via geom or zfs

Modified submitter's original patch to reference why this is broken and what to do to work around the issue.

Submitted by: hubert@tournier.org
PR: bin/147572
Reviewed by: jhb
MFC after: 2 weeks

14 years agoTurn off UMA allocations on all archs by default. It isn't stable even on
pjd [Thu, 17 Jun 2010 17:41:42 +0000 (17:41 +0000)]
Turn off UMA allocations on all archs by default. It isn't stable even on
amd64.

Reported by: many
MFC after: 3 days

14 years agoBackout r207970 for now, it can lead to deadlocks.
pjd [Thu, 17 Jun 2010 17:39:51 +0000 (17:39 +0000)]
Backout r207970 for now, it can lead to deadlocks.

Reported by: kan
MFC after: 3 days

14 years agoTwo stats were duplicated, thanks to Andrew Boyer
jfv [Thu, 17 Jun 2010 17:38:39 +0000 (17:38 +0000)]
Two stats were duplicated, thanks to Andrew Boyer
for pointing this out.

14 years agoMake DTrace syscall provider work again by including opt_kdtrace.h here.
rpaulo [Thu, 17 Jun 2010 17:34:45 +0000 (17:34 +0000)]
Make DTrace syscall provider work again by including opt_kdtrace.h here.

14 years ago- Fix compilation of the subr_unit.c user space test program.
jh [Thu, 17 Jun 2010 16:12:06 +0000 (16:12 +0000)]
- Fix compilation of the subr_unit.c user space test program.
- Use %zu for size_t in a few format strings.

14 years ago- Update GCC reference from 3.3 to 4.2 [1]
gabor [Thu, 17 Jun 2010 14:37:47 +0000 (14:37 +0000)]
- Update GCC reference from 3.3 to 4.2 [1]
- Add reference to c99(7)

Submitted by: stefanf

14 years ago- Fix typo, it should have been c78.7
gabor [Thu, 17 Jun 2010 13:59:41 +0000 (13:59 +0000)]
- Fix typo, it should have been c78.7

Submitted by: pluknet <pluknet@gmail.com>

14 years agoAdd the ZFS periodic daily scripts to the ZFS part.
netchild [Thu, 17 Jun 2010 12:37:50 +0000 (12:37 +0000)]
Add the ZFS periodic daily scripts to the ZFS part.

14 years agoIn the ia32_{get,set}_fpcontext(), use fpu{get,set}userregs instead
kib [Thu, 17 Jun 2010 12:35:17 +0000 (12:35 +0000)]
In the ia32_{get,set}_fpcontext(), use fpu{get,set}userregs instead
of fpu{get,set}regs.

Noted by: bde
MFC after: 1 month