]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
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

14 years ago- add the zfs scrub script
netchild [Thu, 17 Jun 2010 12:25:47 +0000 (12:25 +0000)]
- add the zfs scrub script
- move the zfs status script into the MK_ZFS conditional to respect
  WITHOUT_ZFS

Noticed by: Andrzej Tobola <ato@iem.pw.edu.pl>

14 years ago- Add c99(7) manual page
gabor [Thu, 17 Jun 2010 12:05:47 +0000 (12:05 +0000)]
- Add c99(7) manual page
- Add MLINKS to c.7, c79.7, c89.7, c90.7

14 years agoMerge COUNT_XINVLTLB_HITS and COUNT_IPIS kernel options from i386 to amd64.
mav [Thu, 17 Jun 2010 11:54:49 +0000 (11:54 +0000)]
Merge COUNT_XINVLTLB_HITS and COUNT_IPIS kernel options from i386 to amd64.
This information can be very valuable for CPU sleep-time (and respectively
idle power consumption) optimization.

Add counters for timer-related IPIs.

Reviewed by: jhb@ (previous version)

14 years agolock_profile_release_lock: do not compare unsigned with zero
avg [Thu, 17 Jun 2010 10:15:13 +0000 (10:15 +0000)]
lock_profile_release_lock: do not compare unsigned with zero

Found by: Coverity Prevent
CID: 3660
Reviewed by: jhb
MFC after: 2 weeks

14 years agoRemove the unit argument from the recently added make_dev_p().
ed [Thu, 17 Jun 2010 08:49:31 +0000 (08:49 +0000)]
Remove the unit argument from the recently added make_dev_p().

New code that creates character devices shouldn't use device unit
numbers, but only si_drv[12] to hold pointer to per-device data. Make
this function more future proof by removing the unit number argument.

Discussed with: kib

14 years agoMerge jmallett@'s n64 work into HEAD - changeset 4
jchandra [Thu, 17 Jun 2010 05:03:01 +0000 (05:03 +0000)]
Merge jmallett@'s n64 work into HEAD - changeset 4

Re-write tlb operations in C with a simpler API.
Update callers to use the new API.

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

Approved by: rrs(mentor), jmallett

14 years agoMove statistics into the sysctl tree making it easier to find
gnn [Wed, 16 Jun 2010 20:57:41 +0000 (20:57 +0000)]
Move statistics into the sysctl tree making it easier to find
and use them.
Add previously hidden statistics, some of which include interrupt
and host/card communication counters.

14 years agoMove statistics into the sysctl tree making it easier to find
gnn [Wed, 16 Jun 2010 17:36:53 +0000 (17:36 +0000)]
Move statistics into the sysctl tree making it easier to find
and use them.
Add previously hidden statistics, some of which include interrupt
and host/card communication counters.

14 years agoUse awk alone for extracting FDT_DTS_FILE instead of grep/cut, which is
raj [Wed, 16 Jun 2010 16:52:35 +0000 (16:52 +0000)]
Use awk alone for extracting FDT_DTS_FILE instead of grep/cut, which is
simpler and more robust.

Submitted by: Andrzej Tobola

14 years agoMerge jmallett@'s n64 work into HEAD - changeset 3
jchandra [Wed, 16 Jun 2010 16:39:01 +0000 (16:39 +0000)]
Merge jmallett@'s n64 work into HEAD - changeset 3

Update rtld MIPS code to use assembly macros that work on o32/n64.

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

Approved by: rrs(mentor), jmallett

14 years agoChanges from John Baldwin adding to last commit,
jfv [Wed, 16 Jun 2010 16:37:36 +0000 (16:37 +0000)]
Changes from John Baldwin adding to last commit,
change rxeof api for poll friendliness, and
eliminate unnecessary link tasklet use. Thanks John!

14 years agoCorrect the function name in a KASSERT.
jh [Wed, 16 Jun 2010 16:02:17 +0000 (16:02 +0000)]
Correct the function name in a KASSERT.

14 years agoCall free and freeaddrinfo before exiting.
brucec [Wed, 16 Jun 2010 15:49:17 +0000 (15:49 +0000)]
Call free and freeaddrinfo before exiting.

PR: bin/144730
PR: bin/144974
Submitted by: Earl R. Lapus <earl.lapus at gmail.com>
Approved by: rrs (mentor)
MFC after: 1 month

14 years ago* Allow partial MB/GB values to be entered in the slice and label editors.
brucec [Wed, 16 Jun 2010 15:40:13 +0000 (15:40 +0000)]
* Allow partial MB/GB values to be entered in the slice and label editors.
* Don't strdup the name when calling deviceRegister because the string is
copied within new_device.
* Use a subtype of 165, not 3, when creating a slice in noninteractive
mode.

PR: bin/135333
PR: bin/66350
Approved by: rrs (mentor)
MFC after: 1 month

14 years agoFreq sysctls are quite heavy due to set of malloc()/free() calls. Avoid
mav [Wed, 16 Jun 2010 15:09:45 +0000 (15:09 +0000)]
Freq sysctls are quite heavy due to set of malloc()/free() calls. Avoid
reading current frequency on every period. Instead do it only after
changing and periodically from time to time if somebody else change it.

Also dynamically decrease sampling frequency up to 4 times on inactivity,

14 years agoMerge jmallett@'s n64 work into HEAD - changeset 2
jchandra [Wed, 16 Jun 2010 14:13:36 +0000 (14:13 +0000)]
Merge jmallett@'s n64 work into HEAD - changeset 2

Update libc Makefiles.
Add makecontext implementation.

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

Approved by: rrs(mentor), jmallett

14 years agoMove ARM nexus rman initialization to attach routine.
raj [Wed, 16 Jun 2010 14:10:39 +0000 (14:10 +0000)]
Move ARM nexus rman initialization to attach routine.

This fixes a panic, which started to trigger after r209129 cleanup.

Submitted by: Andrew Turner

14 years agoMerge jmallett@'s n64 work into HEAD - changeset 1.
jchandra [Wed, 16 Jun 2010 12:55:14 +0000 (12:55 +0000)]
Merge jmallett@'s n64 work into HEAD - changeset 1.

Update libc assembly code to use macros that work on both o32 and n64.
Merge string functions from NetBSD.

The changes are from http://svn.freebsd.org/base/user/jmallett/octeon

Approved by: rrs (mentor), jmallett

14 years agoRemove redundant assignment.
pjd [Wed, 16 Jun 2010 12:42:20 +0000 (12:42 +0000)]
Remove redundant assignment.

MFC after: 3 days

14 years agodevice.hints: do not install when WITHOUT_BOOT is set
avg [Wed, 16 Jun 2010 08:20:01 +0000 (08:20 +0000)]
device.hints: do not install when WITHOUT_BOOT is set

Forced commit to fix commit message in r209228.

Discussed with: imp
MFC after: 2 weeks

14 years agodevice.hints: do install when WITHOUT_BOOT is set
avg [Wed, 16 Jun 2010 07:52:44 +0000 (07:52 +0000)]
device.hints: do install when WITHOUT_BOOT is set

Discussed with: imp
MFC after: 2 weeks

14 years agoEliminate unnecessary page queues locking.
alc [Wed, 16 Jun 2010 00:41:21 +0000 (00:41 +0000)]
Eliminate unnecessary page queues locking.

14 years agoAllow boot.config to have different values than just -h.
imp [Tue, 15 Jun 2010 23:55:42 +0000 (23:55 +0000)]
Allow boot.config to have different values than just -h.

Submitted by: bsdrp by way of freenas and olivier cochard-labbe
MFC after: 3 days

14 years agolibedit: Reduce surprising behaviour with filename completion some more:
jilles [Tue, 15 Jun 2010 22:23:21 +0000 (22:23 +0000)]
libedit: Reduce surprising behaviour with filename completion some more:
* Quote '*', '?' and '['. While it may be more useful to expand them to
  matching pathnames, this at least matches with the completion we do.
* '@' is a regular character for filenames. Some other shells do
  @<hostname> completion but we do not.
* Prefix names starting with '-' and '+' with './' so they are not seen as
  options.

14 years agoTurn off cache if there's more than one kernel mapping, and one is writable.
cognet [Tue, 15 Jun 2010 22:16:02 +0000 (22:16 +0000)]
Turn off cache if there's more than one kernel mapping, and one is writable.

Submitted by:   Mark Tinguely

14 years agoModify the console mouse pointer drawing routine to use single-byte writes
nwhitehorn [Tue, 15 Jun 2010 22:01:38 +0000 (22:01 +0000)]
Modify the console mouse pointer drawing routine to use single-byte writes
instead of 4-byte ones. Because the mouse pointer can start part way
through a character cell, 4-byte memory operations are not necessarily
aligned, triggering a fatal alignment exception when the console pointer
was moved on PowerPC G5 systems.

MFC after: 3 days

14 years agosh: Add filename completion.
jilles [Tue, 15 Jun 2010 21:58:40 +0000 (21:58 +0000)]
sh: Add filename completion.

This uses the new libedit completion function with quoting support.

Unlike NetBSD, there is no 'set +o tabcomplete' option to disable
completion. I do not see any reason for such a special treatment, as
completion is rather useful and it is possible to do
  bind ^I ed-insert
to disable completion and insert a tab character instead.

Submitted by: Guy Yur

14 years agolibedit: Allow simple quoting in filename completion.
jilles [Tue, 15 Jun 2010 21:34:57 +0000 (21:34 +0000)]
libedit: Allow simple quoting in filename completion.

The completer recognizes characters escaped with backslashes as being
literal parts of a word, and adds backslashes to avoid almost all
misinterpretation. In particular, filenames containing spaces can be
completed correctly.

For bug compatibility with the NetBSD version, the improved completion
function has a new name, _el_fn_sh_complete, and _el_fn_complete is
unchanged.

Submitted by: Guy Yur

14 years agoChange to have legacy interrupts use the same
jfv [Tue, 15 Jun 2010 21:11:51 +0000 (21:11 +0000)]
Change to have legacy interrupts use the same
handler had a flaw, thanks to John Baldwin for
finding it. Change which queue legacy tasks are
enqueued on.

MFC: soonest

14 years agolibedit: Fix a bug that could make completion listings incomplete.
jilles [Tue, 15 Jun 2010 21:00:53 +0000 (21:00 +0000)]
libedit: Fix a bug that could make completion listings incomplete.

The element matches[0] is the common prefix and is not counted in len, so
subtracting 1 is not needed. A counter for the number of matches per line
was incremented twice.

Submitted by: Guy Yur

14 years agoImplement flexible BPF timestamping framework.
jkim [Tue, 15 Jun 2010 19:28:44 +0000 (19:28 +0000)]
Implement flexible BPF timestamping framework.

- Allow setting format, resolution and accuracy of BPF time stamps per
listener.  Previously, we were only able to use microtime(9).  Now we can
set various resolutions and accuracies with ioctl(2) BIOCSTSTAMP command.
Similarly, we can get the current resolution and accuracy with BIOCGTSTAMP
command.  Document all supported options in bpf(4) and their uses.

- Introduce new time stamp 'struct bpf_ts' and header 'struct bpf_xhdr'.
The new time stamp has both 64-bit second and fractional parts.  bpf_xhdr
has this time stamp instead of 'struct timeval' for bh_tstamp.  The new
structures let us use bh_tstamp of same size on both 32-bit and 64-bit
platforms without adding additional shims for 32-bit binaries.  On 64-bit
platforms, size of BPF header does not change compared to bpf_hdr as its
members are already all 64-bit long.  On 32-bit platforms, the size may
increase by 8 bytes.  For backward compatibility, struct bpf_hdr with
struct timeval is still the default header unless new time stamp format is
explicitly requested.  However, the behaviour may change in the future and
all relevant code is wrapped around "#ifdef BURN_BRIDGES" for now.

- Add experimental support for tagging mbufs with time stamps from a lower
layer, e.g., device driver.  Currently, mbuf_tags(9) is used to tag mbufs.
The time stamps must be uptime in 'struct bintime' format as binuptime(9)
and getbinuptime(9) do.

Reviewed by: net@

14 years agoAdd a new column to the output of vmstat -z to indicate the number
sbruno [Tue, 15 Jun 2010 19:28:37 +0000 (19:28 +0000)]
Add a new column to the output of vmstat -z to indicate the number
of times the system was forced to sleep when requesting a new allocation.

Expand the debugger hook, db_show_uma, to display these results as well.

This has proven to be very useful in out of memory situations when
it is not known why systems have become sluggish or fail in odd ways.

Reviewed by: rwatson alc
Approved by: scottl (mentor) peter
Obtained from: Yahoo Inc.

14 years agoWhen Emulate3Button is active, do not set select() timeout in states when
mav [Tue, 15 Jun 2010 19:19:04 +0000 (19:19 +0000)]
When Emulate3Button is active, do not set select() timeout in states when
it is not needed. No need to kick CPU every 20ms without a purpose.

Reviewed by: philip@

14 years agoWhen updating individual CPU's lowest Cx state to use, never set it to a
jhb [Tue, 15 Jun 2010 19:14:39 +0000 (19:14 +0000)]
When updating individual CPU's lowest Cx state to use, never set it to a
state lower than the lowest one supported by the current CPU.  This closes
some races with changes to the hw.acpi.cpu_cx_lowest sysctl while Cx
states for individual CPUs were changing (e.g. unplugging the AC adapter
of a laptop) that could result in panics.

Submitted by: Giovanni Trematerra
Tested by: David Demelier  demelier dot david of gmail
MFC after: 3 days

14 years agoRestore the machine check register banks on resume. For banks being
jhb [Tue, 15 Jun 2010 18:51:41 +0000 (18:51 +0000)]
Restore the machine check register banks on resume.  For banks being
monitored via CMCI, reset the interrupt threshold to 1 on resume.

Reviewed by: jkim
MFC after: 2 weeks

14 years agoEliminate unnecessary page queues locking.
alc [Tue, 15 Jun 2010 18:37:31 +0000 (18:37 +0000)]
Eliminate unnecessary page queues locking.

14 years agoAllow population of /cfg and /data. Begin the move to making all
imp [Tue, 15 Jun 2010 18:18:31 +0000 (18:18 +0000)]
Allow population of /cfg and /data.  Begin the move to making all
slice creation overrideable too, but there's a few problems doing that
for the duplicated partitions (s1 and s2), so just comment that it
needs work.

MFC after: 3 days

14 years agoCreate a make.conf. not needed for runtime, but some ports want to spam it
imp [Tue, 15 Jun 2010 18:16:45 +0000 (18:16 +0000)]
Create a make.conf.  not needed for runtime, but some ports want to spam it
at compile or install time.

MFC after: 3 days

14 years agoRemove two obsoleted comments, add a note about 32bit compatibility.
kib [Tue, 15 Jun 2010 18:16:04 +0000 (18:16 +0000)]
Remove two obsoleted comments, add a note about 32bit compatibility.

MFC after: 1 month

14 years agomake these convenience functions more convenient by accepting all
imp [Tue, 15 Jun 2010 18:11:37 +0000 (18:11 +0000)]
make these convenience functions more convenient by accepting all
args, not just the first.  makes mechanical conversion of old style
more forgiving.

MFC after: 3 days

14 years agoRemove even two more unneeded files from libllvmsupport.
ed [Tue, 15 Jun 2010 17:28:16 +0000 (17:28 +0000)]
Remove even two more unneeded files from libllvmsupport.

14 years agoRemove unneeded files from the build.
ed [Tue, 15 Jun 2010 17:08:03 +0000 (17:08 +0000)]
Remove unneeded files from the build.

I used the following command to determine which source files were
unneeded:

| for i in `find lib/clang -name '*.o'`
| do
|  MATCHES="`(nm -g --defined-only $i; nm -g --defined-only \
|  usr.bin/clang/clang/clang) | sed -e 's/.* //' | \
|  sort | uniq -d | wc -l`"
|  [ $MATCHES -eq 0 ] && echo "$i: unneeded"
| done

This should slightly improve the build times.

14 years agoRename CRITSECT_ASSERT to CRITICAL_ASSERT.
kib [Tue, 15 Jun 2010 14:59:35 +0000 (14:59 +0000)]
Rename CRITSECT_ASSERT to CRITICAL_ASSERT.

Suggested by: jhb
MFC after: 1 month

14 years agoMake mandoc/mdocml happy.
edwin [Tue, 15 Jun 2010 11:37:33 +0000 (11:37 +0000)]
Make mandoc/mdocml happy.

Submitted by: Uli(?) via gmane.comp.time.tz

14 years agoMake all tests in libdialog compilable.
ae [Tue, 15 Jun 2010 10:01:49 +0000 (10:01 +0000)]
Make all tests in libdialog compilable.
Fix coredump in menu3.c.

Approved by: kib (mentor)

14 years agoFix the syscall module name after r205320.
kib [Tue, 15 Jun 2010 09:30:36 +0000 (09:30 +0000)]
Fix the syscall module name after r205320.

Submitted by: Vladislav Movchan <vladislav.movchan gmail com>
MFC after: 1 week

14 years agoUse critical sections instead of disabling local interrupts to ensure
kib [Tue, 15 Jun 2010 09:19:33 +0000 (09:19 +0000)]
Use critical sections instead of disabling local interrupts to ensure
the consistency between PCPU fpcurthread and the state of the FPU.

Explicitely assert that the calling conventions for fpudrop() are
adhered too. In cpu_thread_exit(), add missed critical section entrance.

Reviewed by: bde
Tested by: pho
MFC after: 1 month

14 years agoAdd assert to check that the (current) thread is in critical section.
kib [Tue, 15 Jun 2010 09:18:27 +0000 (09:18 +0000)]
Add assert to check that the (current) thread is in critical section.

MFC after: 1 month

14 years agoSet the comment at the right place for PMC uncore classes.
fabient [Tue, 15 Jun 2010 09:12:31 +0000 (09:12 +0000)]
Set the comment at the right place for PMC uncore classes.

Submitted by: rstone
MFC after: 1 month

14 years agoAdd a periodic zfs scrub script.
netchild [Tue, 15 Jun 2010 08:58:16 +0000 (08:58 +0000)]
Add a periodic zfs scrub script.

Features:
 - configurable amount of days between scrubs (default value or per pool)
 - do not scrub directly after pool creation (respects the configured
   number of days between scrubs)
 - do not scrub if a scrub is in progress
 - tells how to see the status of the scrub
 - tells how many days since the last scrub if it skips the scrubbing
 - warns if a non-existent pool is specified explicitely
   (default: no pools specified -> all currently imported pools are
   handled)
 - runs late in the periodic run to not slow down the other periodic daily
   scripts

Discussed on: fs@

14 years ago* Include sys/systm.h for KASSERT()
ae [Tue, 15 Jun 2010 08:53:13 +0000 (08:53 +0000)]
* Include sys/systm.h for KASSERT()
* Remove unneeded includes and comment
* Replace home made OFFSETOF() macro with standard offsetof()

Pointed out by: bde
Approved by: kib (mentor)

14 years agosound/pcm: use non-const string as a value with SYSCTL_STRING
avg [Tue, 15 Jun 2010 07:06:54 +0000 (07:06 +0000)]
sound/pcm: use non-const string as a value with SYSCTL_STRING

Although the sysctls are marked with CTLFLAG_RD and the values will stay
immutable, current sysctl implementation stores value pointer in
void* type, which means that const qualifier is discarded anyway
and some newer compilers complaint about that.
We can't use de-const trick in sysctl implementation, because in that
case we could miss an opposite situation where a const value is used
with CTLFLAG_RW sysctl.

Complaint from: gcc 4.4, clang
MFC after: 2 weeks

14 years agoerr() takes a printf format.
ed [Tue, 15 Jun 2010 04:47:16 +0000 (04:47 +0000)]
err() takes a printf format.

Submitted by: Pawel Worach
Spotted by: clang

14 years agoAdd MODULE_DEPEND() macros to the experimental NFS client and
rmacklem [Tue, 15 Jun 2010 00:25:04 +0000 (00:25 +0000)]
Add MODULE_DEPEND() macros to the experimental NFS client and
server so that the modules will load when kernels are built with
none of the NFS* configuration options specified. I believe this
resolves the problems reported by PR kern/144458 and the email on
freebsd-stable@ posted by Dmitry Pryanishnikov on June 13.

Tested by: kib
PR: kern/144458
Reviewed by: kib
MFC after: 1 week

14 years agoUse literal format strings. Found by clang.
emaste [Mon, 14 Jun 2010 23:51:35 +0000 (23:51 +0000)]
Use literal format strings.  Found by clang.

14 years agoFix typos that broke duration calculations on protection frames. A similar
jkim [Mon, 14 Jun 2010 23:01:50 +0000 (23:01 +0000)]
Fix typos that broke duration calculations on protection frames.  A similar
fix was done for ral(4) long ago and it must be copy-and-paste bugs.

Found by: clang

14 years agoFor the target port groups structures, don't allocate the initial element.
ken [Mon, 14 Jun 2010 22:02:18 +0000 (22:02 +0000)]
For the target port groups structures, don't allocate the initial element.
This makes things easier for target implementations to calculate how many
elements they need to allocate.

Discussed with: mjacob, gibbs
MFC after: 1 week

14 years ago'unit' can be negative, so use signed type for it.
pjd [Mon, 14 Jun 2010 21:58:55 +0000 (21:58 +0000)]
'unit' can be negative, so use signed type for it.

Found by: Coverity Prevent
CID: 3731
MFC after: 3 days

14 years agoBIO_DELETE contains range we want to delete and doesn't provide any useful
pjd [Mon, 14 Jun 2010 21:56:24 +0000 (21:56 +0000)]
BIO_DELETE contains range we want to delete and doesn't provide any useful
data, so there is no need to copy it to userland.

MFC after: 3 days