]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoCorrectly check unsignedness of all BPF_LD|BPF_IND instructions.
jkim [Mon, 18 Aug 2008 19:14:26 +0000 (19:14 +0000)]
Correctly check unsignedness of all BPF_LD|BPF_IND instructions.
This is roughly from sys/net/bpf_filter.c r1.12 and r1.14.

15 years agoAdd simple bpf(9) regression tests and test cases.
jkim [Mon, 18 Aug 2008 19:01:58 +0000 (19:01 +0000)]
Add simple bpf(9) regression tests and test cases.

15 years ago- Make these files compilable on user land.
jkim [Mon, 18 Aug 2008 18:59:33 +0000 (18:59 +0000)]
- Make these files compilable on user land.
- Update copyrights and fix style(9).

15 years agoFix SVN r181821 by not using FNM_LEADING_DIR where
kientzle [Mon, 18 Aug 2008 18:13:40 +0000 (18:13 +0000)]
Fix SVN r181821 by not using FNM_LEADING_DIR where
it shouldn't be used.

15 years agosc->sc_ibuf should be malloc'ed after quirks applied, as
kaiw [Mon, 18 Aug 2008 17:13:23 +0000 (17:13 +0000)]
sc->sc_ibuf should be malloc'ed after quirks applied, as
sc->sc_isize might have changed.

MFC after:   3 days

15 years agoFix a typo: According to the hid spec, Global item #3
kaiw [Mon, 18 Aug 2008 17:05:59 +0000 (17:05 +0000)]
Fix a typo: According to the hid spec, Global item #3
is Physical Minimum.

MFC after: 3 days

15 years agoAdd a missing include which was erroneusly left out from the previous
attilio [Mon, 18 Aug 2008 16:51:44 +0000 (16:51 +0000)]
Add a missing include which was erroneusly left out from the previous
commit.

Sponsored by: Nokia

15 years agoIn the hid parser, if a INPUT/OUTPUT/FEATURE item is skipped, its
kaiw [Mon, 18 Aug 2008 16:48:53 +0000 (16:48 +0000)]
In the hid parser, if a INPUT/OUTPUT/FEATURE item is skipped, its
corresponding USAGE should be skipped as well.

For example, below is a report desc fragment of some mouse:

COLLECTION
...
USAGE TWHEEL
FEATURE ...
...
USAGE WHEEL
INPUT ...
...
END COLLECTION

"USAGE TWHEEL" should be consumed after the FEATURE item is skipped,
otherwise, the INPUT item will be assigned to "USAGE TWHEEL" later,
other than "USAGE WHEEL".

Tested by:    Grzegorz Blach
PR:       usb/125941

15 years agoBufferize the output for DDB printouts.
attilio [Mon, 18 Aug 2008 16:48:09 +0000 (16:48 +0000)]
Bufferize the output for DDB printouts.
In order to CATER this, DDB buffered output can be choosen at compile
time through the option DDB_BUFR_SIZE=nbytes where nbytes choose the size
of the buffer (suggested size is 128 bytes), which should be manually
specified in any interested config file.

Sponsored by: Nokia

15 years agoRe-add Microsoft Intellimouse 2.0 TWHEEL quirk.
kaiw [Mon, 18 Aug 2008 16:29:13 +0000 (16:29 +0000)]
Re-add Microsoft Intellimouse 2.0 TWHEEL quirk.

Tested by: Merritt Draney, Brian Cox
PR: kern/123224
PR: kern/123510
MFC after: 3 days

15 years agoMove FREEBSD-upgrade as well.
roberto [Mon, 18 Aug 2008 14:37:44 +0000 (14:37 +0000)]
Move FREEBSD-upgrade as well.

15 years agoMove FREEBSD-Xlist in a more proper location.
roberto [Mon, 18 Aug 2008 14:36:57 +0000 (14:36 +0000)]
Move FREEBSD-Xlist in a more proper location.

15 years agoAs part of step 1.5 of the vimage framework resolve conflicts with
bz [Mon, 18 Aug 2008 13:16:19 +0000 (13:16 +0000)]
As part of step 1.5 of the vimage framework resolve conflicts with
file local static globals which would be folded onto the same name
with the V_ macros.

Reviewed by: kris, brooks, simon

15 years agoRename the static M_RPC defined here to M_RPCCLNT, since a global M_RPC
kris [Mon, 18 Aug 2008 12:11:47 +0000 (12:11 +0000)]
Rename the static M_RPC defined here to M_RPCCLNT, since a global M_RPC
now optionally exists.

Reviewed by: dfr
MFC after: 3 days

15 years agoMake it easy to comment out the part that use current tty layer directly.
takawata [Mon, 18 Aug 2008 11:56:13 +0000 (11:56 +0000)]
Make it easy to comment out the part that use current tty layer directly.
(Handsfree interface)
I'll port the part to new tty layer after it has committed and
if I have spare time.

15 years agoFix compile
kris [Mon, 18 Aug 2008 10:39:59 +0000 (10:39 +0000)]
Fix compile

15 years agoExtend the message in UPDATING on the sio(4) -> uart(4) change.
ed [Mon, 18 Aug 2008 10:38:16 +0000 (10:38 +0000)]
Extend the message in UPDATING on the sio(4) -> uart(4) change.

It turns out I forgot to mention that people really need to make sure
their hints are up to date if they are updating a system through the
serial console.

Requested by: gavin
Reviewed by: gavin

15 years agoFix mdoc markup in r181825.
simon [Mon, 18 Aug 2008 09:45:26 +0000 (09:45 +0000)]
Fix mdoc markup in r181825.

15 years agoDocument the addition of the hw.ata.ata_dma_check_80pin tunable.
philip [Mon, 18 Aug 2008 09:17:16 +0000 (09:17 +0000)]
Document the addition of the hw.ata.ata_dma_check_80pin tunable.

Submitted by: Patrick Lamaizière <patfbsd -at- davenulle.org>
MFC after: 1 week

15 years agoFix ARP in bridging scenarios where the bridge shares its
philip [Mon, 18 Aug 2008 09:06:11 +0000 (09:06 +0000)]
Fix ARP in bridging scenarios where the bridge shares its
MAC address with one of its members (see my r180140).

Pointy hat to: philip
Submitted by: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
MFC after: 3 days

15 years agoThe doreti_iret_fault code is always called with gs base MSR containing
kib [Mon, 18 Aug 2008 08:47:27 +0000 (08:47 +0000)]
The doreti_iret_fault code is always called with gs base MSR containing
kernel gs base, because %rip is adjusted only on kernel-mode trap caused
by iretq execution. On the other hand, the stack contains (hardware
part of) trap frame from the usermode. As a consequence, checking for
frame mode and doing swapgs causes the kernel to enter trap() with
usermode gs base.

Remove the check for mode and conditional swapgs, we already have right
gs base in the MSR.

Submitted by: Nate Eldredge <neldredge math ucsd edu>
MFC after: 3 days

15 years agoStrip leading "./" or ".//" from patterns and filenames
kientzle [Mon, 18 Aug 2008 04:58:54 +0000 (04:58 +0000)]
Strip leading "./" or ".//" from patterns and filenames
so that "./foo" matches "foo" (and vice versa).

This is related to PR bin/119141.

PR: bin/119141
MFC after: 4 days

15 years agoAdd isochronous transfer support for USB 2.0
kevlo [Mon, 18 Aug 2008 04:49:58 +0000 (04:49 +0000)]
Add isochronous transfer support for USB 2.0

Obtained from: NetBSD

15 years agodisable "legacy" device on xen domU
kmacy [Sun, 17 Aug 2008 23:44:09 +0000 (23:44 +0000)]
disable "legacy" device on xen domU

MFC after: 1 month

15 years agoWork around differences in page allocation for initial page tables on xen
kmacy [Sun, 17 Aug 2008 23:40:29 +0000 (23:40 +0000)]
Work around differences in page allocation for initial page tables on xen

MFC after: 1 month

15 years agoEnsure that machine / physical addresses are treated as vm_paddr_t
kmacy [Sun, 17 Aug 2008 23:39:22 +0000 (23:39 +0000)]
Ensure that machine / physical addresses are treated as vm_paddr_t

MFC after: 1 month

15 years agoremove code in XEN version of init386 causing initialization failure
kmacy [Sun, 17 Aug 2008 23:38:14 +0000 (23:38 +0000)]
remove code in XEN version of init386 causing initialization failure

MFC after: 1 month

15 years agotranslate machine addresses to physical addresses in new code in pmap_init
kmacy [Sun, 17 Aug 2008 23:36:52 +0000 (23:36 +0000)]
translate machine addresses to physical addresses in new code in pmap_init

MFC after: 1 month

15 years agobypass call to trap when handling hypervisor_upcall
kmacy [Sun, 17 Aug 2008 23:35:36 +0000 (23:35 +0000)]
bypass call to trap when handling hypervisor_upcall

MFC after: 1 month

15 years agoclean up initvalues to work correctly on PAE
kmacy [Sun, 17 Aug 2008 23:34:44 +0000 (23:34 +0000)]
clean up initvalues to work correctly on PAE

MFC after: 1 month

15 years agoMake sure that machine addresses are vm_paddr_t
kmacy [Sun, 17 Aug 2008 23:33:33 +0000 (23:33 +0000)]
Make sure that machine addresses are vm_paddr_t

MFC after: 1 month

15 years agoMake sure we don't lose the most significant bits of the frame number on PAE or 64-bit
kmacy [Sun, 17 Aug 2008 23:32:34 +0000 (23:32 +0000)]
Make sure we don't lose the most significant bits of the frame number on PAE or 64-bit

MFC after: 1 month

15 years agoCommit step 1 of the vimage project, (network stack)
bz [Sun, 17 Aug 2008 23:27:27 +0000 (23:27 +0000)]
Commit step 1 of the vimage project, (network stack)
virtualization work done by Marko Zec (zec@).

This is the first in a series of commits over the course
of the next few weeks.

Mark all uses of global variables to be virtualized
with a V_ prefix.
Use macros to map them back to their global names for
now, so this is a NOP change only.

We hope to have caught at least 85-90% of what is needed
so we do not invalidate a lot of outstanding patches again.

Obtained from: //depot/projects/vimage-commit2/...
Reviewed by: brooks, des, ed, mav, julian,
jamie, kris, rwatson, zec, ...
(various people I forgot, different versions)
md5 (with a bit of help)
Sponsored by: NLnet Foundation, The FreeBSD Foundation
X-MFC after: never
V_Commit_Message_Reviewed_By: more people than the patch

15 years agoDon't strip a leading '/' from a pattern to be matched.
kientzle [Sun, 17 Aug 2008 19:43:45 +0000 (19:43 +0000)]
Don't strip a leading '/' from a pattern to be matched.
This aligns the pattern-matching behavior with GNU tar
and restores the behavior of bsdtar prior to FreeBSD 6.3.

PR: bin/117909
MFC after: 3 days

15 years agoUpdate a comment about not numbering pci busses. This may soon be
imp [Sun, 17 Aug 2008 17:34:07 +0000 (17:34 +0000)]
Update a comment about not numbering pci busses.  This may soon be
OBE, but was sitting around in one of my trees for a while...

15 years agoLRO combined packets can actually be bridged as long as all the interfaces also
thompsa [Sat, 16 Aug 2008 23:59:17 +0000 (23:59 +0000)]
LRO combined packets can actually be bridged as long as all the interfaces also
support TSO, this can always be disabled manually if undesirable.

Pointed out by: gallatin

15 years agoRemove useless #if 1.
imp [Sat, 16 Aug 2008 21:51:54 +0000 (21:51 +0000)]
Remove useless #if 1.

15 years agoPrevent crashes due to unlocked access to hash buckets in two sysctls.
alfred [Sat, 16 Aug 2008 21:48:10 +0000 (21:48 +0000)]
Prevent crashes due to unlocked access to hash buckets in two sysctls.
Use CACHE_LOCK to prevent crashes.

Sysctls fixed: debug.hashstat.nchash and debug.hashstat.rawnchash.

Obtained from: Juniper Networks
MFC After: 1 week

15 years agoCall in to xen for privileged aspects of context switching
kmacy [Sat, 16 Aug 2008 21:38:46 +0000 (21:38 +0000)]
Call in to xen for privileged aspects of context switching

MFC after: 1 month

15 years agoSCSI_DELAY is specified in milliseconds, not seconds.
ken [Sat, 16 Aug 2008 21:26:58 +0000 (21:26 +0000)]
SCSI_DELAY is specified in milliseconds, not seconds.

Submitted by: Andre Albsmeier <Andre.Albsmeier@siemens.com>
MFC after: 1 week

15 years agoAdd ECN sysctls and ECN RFC.
rpaulo [Sat, 16 Aug 2008 21:12:25 +0000 (21:12 +0000)]
Add ECN sysctls and ECN RFC.

15 years agoAdd some sysctl reporting for most pci_pci bridges. We now report
imp [Sat, 16 Aug 2008 20:18:40 +0000 (20:18 +0000)]
Add some sysctl reporting for most pci_pci bridges.  We now report
domain, pribus (the primary bus, eg the bus that this chip is on),
secbus (the secondary bus, eg the bus immediately behind this chip)
and subbus (the number of the highest bus behind this chip).
Normally, this information is reported via bootverbose parameters, but
that's hard to use for debugging in some cases.

This adds reading of pribus to make this happen.  In addition, change
the narrow types to u_int to allow for easier reporting via sysctl for
domain, secbus and subbus.  This should have no effect, but if it
does, please let me know.

15 years agoAdd limited support for units that are related by affine rather
dwmalone [Sat, 16 Aug 2008 16:27:41 +0000 (16:27 +0000)]
Add limited support for units that are related by affine rather
than linear relations. We can now convert degC to degF.

586 units, 56 prefixes
You have: 24 degC
You want: degF
75.2
You have: degC
You want: K
 (-> x*1 +273.15)
 (<- y*1 -273.15)

15 years agoUse arc4random_uniform() to avoid "modulo bias"
ache [Sat, 16 Aug 2008 15:41:03 +0000 (15:41 +0000)]
Use arc4random_uniform() to avoid "modulo bias"

Remove pw_getrand() unneded now: arc4random_uniform() is stronger then
pw_getrand()'s MD5 tricks (inactive) and its active version, mixing
arc4random() bytes in one, not make things better at all.

15 years agoFix a regression introduced in r179289 splitting up ip6_savecontrol()
bz [Sat, 16 Aug 2008 06:39:18 +0000 (06:39 +0000)]
Fix a regression introduced in r179289 splitting up ip6_savecontrol()
into v4-only vs. v6-only inp_flags processing.
When ip6_savecontrol_v4() is called from ip6_savecontrol() we
were not passing back the **mp thus the information will be missing
in userland.
Istead of going with a *** as suggested in the PR we are returning
**mp now and passing in the v4only flag as a pointer argument.

PR: kern/126349
Reviewed by: rwatson, dwmalone

15 years agodisable PREEMPTION pending bug fixes to i386/xen/pmap.c
kmacy [Fri, 15 Aug 2008 21:47:11 +0000 (21:47 +0000)]
disable PREEMPTION pending bug fixes to i386/xen/pmap.c

MFC after: 1 month

15 years agoCall in to xen for fpu handling when XEN is set
kmacy [Fri, 15 Aug 2008 21:43:38 +0000 (21:43 +0000)]
Call in to xen for fpu handling when XEN is set

MFC after: 1 month

15 years agoImport check for xen features.
kmacy [Fri, 15 Aug 2008 21:20:44 +0000 (21:20 +0000)]
Import check for xen features.

MFC after: 1 month

15 years agoatomic_fetchadd_int works on unsigned quantities - change
kmacy [Fri, 15 Aug 2008 21:08:48 +0000 (21:08 +0000)]
atomic_fetchadd_int works on unsigned quantities - change
sigev_generation to be unsigned

MFC after: 1 month

15 years agoAdd flag to indicate to xen support code that threads are running (and thus we can...
kmacy [Fri, 15 Aug 2008 21:03:13 +0000 (21:03 +0000)]
Add flag to indicate to xen support code that threads are running (and thus we can block).

MFC after: 1 month

15 years agoIntegrate configuration bits for compling xen.
kmacy [Fri, 15 Aug 2008 20:58:57 +0000 (20:58 +0000)]
Integrate configuration bits for compling xen.

MFC after: 1 month

15 years agoIntegrate support for xen in to i386 common code.
kmacy [Fri, 15 Aug 2008 20:51:31 +0000 (20:51 +0000)]
Integrate support for xen in to i386 common code.

MFC after: 1 month

15 years agoAllow the network addresses and interface names for the "client" and
jhb [Fri, 15 Aug 2008 19:20:59 +0000 (19:20 +0000)]
Allow the network addresses and interface names for the "client" and
"workstation" firewall types to be set from rc.conf so that rc.firewall
no longer needs local patching to be usable for those types.  For now
I've set the variables in /etc/defaults/rc.conf to the previous defaults
in /etc/rc.firewall.

PR: bin/65258
Submitted by: Valentin Nechayev  netch of netch.kiev.ua
Silence from: net
MFC after: 2 weeks

15 years agoFor the "client" and "simple" network types, collapse the separate "net"
jhb [Fri, 15 Aug 2008 19:14:25 +0000 (19:14 +0000)]
For the "client" and "simple" network types, collapse the separate "net"
and "mask" variables into a single "net" variable that contains a full
network address (including either a netmask or prefix length at the user's
choice).  Update the example settings to match.

MFC after: 2 weeks

15 years agoUse 'me' rather than explicit IP addresses for the "simple" and "client"
jhb [Fri, 15 Aug 2008 18:58:15 +0000 (18:58 +0000)]
Use 'me' rather than explicit IP addresses for the "simple" and "client"
firewall configurations.

PR: bin/65258
Silence on: net@
MFC after: 1 week

15 years agoFor the firewall_* variables that are specific to the "workstation"
jhb [Fri, 15 Aug 2008 18:48:29 +0000 (18:48 +0000)]
For the firewall_* variables that are specific to the "workstation"
firewall type, note that property in their description.

MFC after: 1 week

15 years agoImprove the glimpse target: don't index .svn and compile directories.
philip [Fri, 15 Aug 2008 14:11:30 +0000 (14:11 +0000)]
Improve the glimpse target: don't index .svn and compile directories.

Suggested by: brooks

15 years agoConvert the snp(4) driver to use cdevpriv.
ed [Fri, 15 Aug 2008 13:07:07 +0000 (13:07 +0000)]
Convert the snp(4) driver to use cdevpriv.

Now we have a single /dev/snp device node, which can be opened by
watch(8) multiple times. Even though snp(4) will be dead as of next
week, it's nice having this in SVN, because:

- We may want to MFC it to RELENG_7.
- By the time we fix snp(4) again, it's already there, existing watch(8)
  binaries should already work.

Just like bpf(4), I'm adding a symlink from snp0 to snp to remain binary
compatible.

15 years agoIntroduce a new loader tunable "hw.ata.ata_dma_check_80pin", defaulting to 1.
philip [Fri, 15 Aug 2008 10:55:11 +0000 (10:55 +0000)]
Introduce a new loader tunable "hw.ata.ata_dma_check_80pin", defaulting to 1.
This can be used to disable the 80pin cable check on systems which forget to
set the bit -- such as certain laptops and Soekris boards.

PR: kern/114605 (somewhat reworked)
Submitted by: marck
MFC after: 1 week

15 years agoAccept tty[ud]0 for console device
phk [Fri, 15 Aug 2008 08:28:15 +0000 (08:28 +0000)]
Accept tty[ud]0 for console device

15 years agoTest updates: Handling of patterns on command line, error messages.
kientzle [Fri, 15 Aug 2008 06:12:02 +0000 (06:12 +0000)]
Test updates:  Handling of patterns on command line, error messages.

15 years agoAdd strcspn to libkern for use by xenbus routines. Will add to build
kmacy [Fri, 15 Aug 2008 04:07:22 +0000 (04:07 +0000)]
Add strcspn to libkern for use by xenbus routines. Will add to build
in separate commit.

15 years agoCompile fixes for xen build.
kmacy [Fri, 15 Aug 2008 04:00:44 +0000 (04:00 +0000)]
Compile fixes for xen build.

MFC after: 1 month.

15 years agoImport the uuid_enc_le(), uuid_dec_le(), uuid_enc_be() and
emax [Thu, 14 Aug 2008 22:23:16 +0000 (22:23 +0000)]
Import the uuid_enc_le(), uuid_dec_le(), uuid_enc_be() and
uuid_dec_be() functions. These routines are not part of the
DCE RPC API. They are provided for convenience.

Reviewed by: marcel
Obtained from: NetBSD
MFC after: 1 week

15 years agoMove wb driver from sys/pci to sys/dev/wb.
imp [Thu, 14 Aug 2008 21:26:29 +0000 (21:26 +0000)]
Move wb driver from sys/pci to sys/dev/wb.

15 years agoMove pcn driver from sys/pci to sys/dev/pcn.
imp [Thu, 14 Aug 2008 20:34:46 +0000 (20:34 +0000)]
Move pcn driver from sys/pci to sys/dev/pcn.

15 years agoMove the ste driver from sys/pci to sys/dev/ste.
imp [Thu, 14 Aug 2008 20:09:58 +0000 (20:09 +0000)]
Move the ste driver from sys/pci to sys/dev/ste.

15 years agoMove the tl driver form sys/pci to sys/dev/tl.
imp [Thu, 14 Aug 2008 20:02:34 +0000 (20:02 +0000)]
Move the tl driver form sys/pci to sys/dev/tl.

15 years agoMove CPU_SPINWAIT into the innermost spin loop, in order to allow faster
jasone [Thu, 14 Aug 2008 17:31:42 +0000 (17:31 +0000)]
Move CPU_SPINWAIT into the innermost spin loop, in order to allow faster
preemption while busy-waiting.

Submitted by: Mike Schuster <schuster@adobe.com>

15 years agoRe-order the terms of an expression in arena_run_reg_dalloc() to correctly
jasone [Thu, 14 Aug 2008 17:03:29 +0000 (17:03 +0000)]
Re-order the terms of an expression in arena_run_reg_dalloc() to correctly
detect whether the integer division table is large enough to handle the
divisor.  Before this change, the last two table elements were never used,
thus causing the slow path to be used for those divisors.

15 years agoCatch up with the removal of /usr/src/compat.
kensmith [Thu, 14 Aug 2008 13:35:22 +0000 (13:35 +0000)]
Catch up with the removal of /usr/src/compat.

MFC after: 3 days

15 years agoFix channel parsing which was broken in r179958, the channel number may be
thompsa [Thu, 14 Aug 2008 03:49:14 +0000 (03:49 +0000)]
Fix channel parsing which was broken in r179958, the channel number may be
suffixed with :flag and /width.

15 years agoFix a typo: jme -> age
kevlo [Thu, 14 Aug 2008 02:43:18 +0000 (02:43 +0000)]
Fix a typo: jme -> age

15 years agocosmetic changes and style fixes
marius [Wed, 13 Aug 2008 20:30:28 +0000 (20:30 +0000)]
cosmetic changes and style fixes

15 years agoUse int32_t/int16_t instead of int/short as sys/net/bpf_filter.c does.
jkim [Wed, 13 Aug 2008 19:52:00 +0000 (19:52 +0000)]
Use int32_t/int16_t instead of int/short as sys/net/bpf_filter.c does.

15 years agoImport handy shorthand Bluetooth address (BD_ADDR) utility functions
emax [Wed, 13 Aug 2008 19:35:31 +0000 (19:35 +0000)]
Import handy shorthand Bluetooth address (BD_ADDR) utility functions
from NetBSD and document them.

Obtained from: NetBSD
MFC after: 1 week

15 years ago- Remove unnecessary jump instruction(s) when offset(s) is/are zero(s).
jkim [Wed, 13 Aug 2008 19:25:09 +0000 (19:25 +0000)]
- Remove unnecessary jump instruction(s) when offset(s) is/are zero(s).
- Constantly use conditional jumps for unsigned integers.

15 years agoIn the case of POWERFAIL_NMI, remove the Giant acquisitions because they
attilio [Wed, 13 Aug 2008 18:29:29 +0000 (18:29 +0000)]
In the case of POWERFAIL_NMI, remove the Giant acquisitions because they
can lead to a deadlock if the thread owning the Giant lock is interrupted
by the NMI.
Instead, tollerate a small race on the x86 architecture.

15 years agoIntroduce some WITNESS improvements:
attilio [Wed, 13 Aug 2008 18:24:22 +0000 (18:24 +0000)]
Introduce some WITNESS improvements:
- Speedup the lock orderings lookup modifying the witness graph from a
  linked tree to a matrix. A table lookup caches the lock orderings in
  order to make a O(1) access for them. Any witness object has an unique
  index withing this lookup cache table.
- Reduce the lock contention on w_mtx acquiring it only when the LOR
  actually happens and not in a sane case. In order to do this don't totally
  flush lock lists (per-CPU spinlocks list and per-thread sleeplocks list)
  but check for ll_count anytime we need to have to verify allocations sanity.
- Introduce the function witness_thread_exit() in the witness namespace which
  should verify a thread doesn't hold any witness occurrence why exiting.
- Rename the sysctl debug.witness.graphs into debug.witness.fullgraph and
  add debug.witness.badstacks which prints out stacks for LOR revealed.
  This is implemented using the stack(9) support, which makes WITNESS to be
  dependent by the STACK option or by the DDB (including STACK) option.
- Fix style(9) for src/sys/kern/subr_witness.c

The hash table approach has been developed by Ilya Maykov on the behalf of
Isilon Systems which kindly released the patch.
Jeff Roberson, ported the patch to -CURRENT and fixed w_mtx contention, on the
behalf of Nokia.

Submitted by: Ilya Maykov <ivmaykov at gmail dot com> (Isilon Systems), jeff
Sponsored by: Nokia

15 years agoBump __FreeBSD_version to 800043, because of the bpf(4) change.
ed [Wed, 13 Aug 2008 17:45:06 +0000 (17:45 +0000)]
Bump __FreeBSD_version to 800043, because of the bpf(4) change.

bpf(4) now uses cdevpriv to distinguish multiple file descriptors, where
it used to be implemented using device cloning. Ports like libpcap
properly detect the change in their configure scripts, but it doesn't
hurt to increase __FreeBSD_version.

While there, change the bpf(4) manual page to refer to /dev/bpf instead
of /dev/bpfN.

Requested by: mlaier

15 years agoFix REDZONE(9) on amd64 and perhaps other 64 bit targets -- ensure the space
emaste [Wed, 13 Aug 2008 17:32:48 +0000 (17:32 +0000)]
Fix REDZONE(9) on amd64 and perhaps other 64 bit targets -- ensure the space
that redzone adds to the allocation for storing its metadata is at least as
large as the metadata that it will store there.

Submitted by: Nima Misaghian

15 years agoAttach the cpufreq child devices with specific orders to enforce relative
jhb [Wed, 13 Aug 2008 16:09:40 +0000 (16:09 +0000)]
Attach the cpufreq child devices with specific orders to enforce relative
priority of some of the drivers that manage the same state (e.g. ichss0
vs est0).  Specifically, powernow, est, and p4tcc are added at order 10,
ichss at order 20, and smist at order 30.  Previously, some laptops were
seeing both ichss0 and est0 attaching and stomping on each other.

XXX: This isn't quite ideal, but works with the existing hacks, I think
what we really want instead is a single "speedstep0" device for CPUs
that the ichss, est, and smist drivers probe (but with differing
priorities).

MFC after: 1 week

15 years agoChange bpf(4) to use the cdevpriv API.
ed [Wed, 13 Aug 2008 15:41:21 +0000 (15:41 +0000)]
Change bpf(4) to use the cdevpriv API.

Right now the bpf(4) driver uses the cloning API to generate /dev/bpf%u.
When an application such as tcpdump needs a BPF, it opens /dev/bpf0,
/dev/bpf1, etc. until it opens the first available device node. We used
this approach, because our devfs implementation didn't allow
per-descriptor data.

Now that we can, make it use devfs_get_cdevpriv() to obtain the private
data. To remain compatible with the existing implementation, add a
symlink from /dev/bpf0 to /dev/bpf. I've already changed libpcap to
compile with HAVE_CLONING_BPF, which makes it use /dev/bpf. There may be
other applications in the base system (dhclient) that use the loop to
obtain a valid bpf.

Discussed on: src-committers
Approved by: csjp

15 years agoo Add a quirk for Sony Handycam DCR-HC32E.
maxim [Wed, 13 Aug 2008 12:40:20 +0000 (12:40 +0000)]
o Add a quirk for Sony Handycam DCR-HC32E.

PR: usb/96599
Submitted by: Eugene Grosbein
MFC after: 1 week

15 years agoAdd a missing call to mtx_destroy() in clnt_reconnect_destroy().
dfr [Wed, 13 Aug 2008 12:04:54 +0000 (12:04 +0000)]
Add a missing call to mtx_destroy() in clnt_reconnect_destroy().

Submitted by: zachary.loafman at isilon.com
MFC after: 2 weeks

15 years agoFix an interop issue with Linux: If you do nothing but TCP
dfr [Wed, 13 Aug 2008 12:03:31 +0000 (12:03 +0000)]
Fix an interop issue with Linux: If you do nothing but TCP
mounts, Linux won't even bother registering nlockmgr for UDP. This
causes nlm_get_rpc to fail, which means any attempts to deliver the
GRANTED callback fail. Add code to nlm_get_rpc to try to locate the
TCP version as well. If it finds it on TCP, it establishes
a clnt_reconnect to the host.

Submitted by: zachary.loafman at isilon.com
MFC after: 2 weeks

15 years agoFix compilation of arm's AVILA.
ed [Wed, 13 Aug 2008 09:20:52 +0000 (09:20 +0000)]
Fix compilation of arm's AVILA.

Compilation of the AVILA kernel failed because of two reasons:

- It needed curthread, which is defined through <sys/pcpu.h>.

- It still referred the softc's sc_mtx field, which has been replaced by
  sc_lock three weeks ago.

To solve the first problem, I decided to include <sys/pcpu.h> in
<sys/sx.h>, which also seems to be done by <sys/mutex.h> and
<sys/rwlock.h>. Those header files also require curthread.

Approved by: jhb

15 years agoFix VLAN hardware tag insertion/stripping on big-endian
yongari [Wed, 13 Aug 2008 03:40:08 +0000 (03:40 +0000)]
Fix VLAN hardware tag insertion/stripping on big-endian
architectures.

Reported by: naddy
Tested on: sparc64
MFC after: 1 week

15 years agoFix runt TSO packet issue.
kmacy [Wed, 13 Aug 2008 01:32:32 +0000 (01:32 +0000)]
Fix runt TSO packet issue.

Obtained from: Chelsio Inc.
MFC after: 1 week

15 years agoAdd LRO and MAC statistics to exported sysctls.
kmacy [Wed, 13 Aug 2008 01:30:41 +0000 (01:30 +0000)]
Add LRO and MAC statistics to exported sysctls.

Obtained from: Chelsio Inc.
MFC after: 1 week

15 years agoChange the type of ti_traceme from a char to an int as its
marcel [Wed, 13 Aug 2008 00:03:35 +0000 (00:03 +0000)]
Change the type of ti_traceme from a char to an int as its
address is passed to ps_pread for reading sizeof(int) bytes.

15 years agoMFamd64: Remove unused macros.
jkim [Tue, 12 Aug 2008 21:45:38 +0000 (21:45 +0000)]
MFamd64: Remove unused macros.

15 years agoUpdate copyrights and fix style(9).
jkim [Tue, 12 Aug 2008 21:31:31 +0000 (21:31 +0000)]
Update copyrights and fix style(9).

15 years agoReduce the scope of the vnode lock such that it does not cover
csjp [Tue, 12 Aug 2008 21:27:48 +0000 (21:27 +0000)]
Reduce the scope of the vnode lock such that it does not cover
the various copyouts associated with initializing the process's
argv/env data in userspace.  It is possible that these copyout
operations can fault under memory pressure, possibly resulting
in dead locks.  This is believed to be safe since none of the
copyout_strings() operations need to interact with the vnode here.

Submitted by: Zhouyi Zhou
PR: kern/111260
Discussed with: kib
MFC after: 3 weeks

15 years agoStyle(9).
pjd [Tue, 12 Aug 2008 20:19:08 +0000 (20:19 +0000)]
Style(9).

15 years agoReduce number of stack usages with unused %edi.
jkim [Tue, 12 Aug 2008 20:12:59 +0000 (20:12 +0000)]
Reduce number of stack usages with unused %edi.

15 years agoReplace all stack usages with registers and remove unused macros.
jkim [Tue, 12 Aug 2008 20:10:45 +0000 (20:10 +0000)]
Replace all stack usages with registers and remove unused macros.

15 years agoImport Xen paravirtual drivers.
kmacy [Tue, 12 Aug 2008 20:01:57 +0000 (20:01 +0000)]
Import Xen paravirtual drivers.

MFC after: 2 weeks

15 years agoAssume OpenSolaris knows better and use their value for VM_MAX_PROM_ADDRESS.
marius [Tue, 12 Aug 2008 20:00:28 +0000 (20:00 +0000)]
Assume OpenSolaris knows better and use their value for VM_MAX_PROM_ADDRESS.

15 years agoImport i386 xen sub-arch files.
kmacy [Tue, 12 Aug 2008 19:48:18 +0000 (19:48 +0000)]
Import i386 xen sub-arch files.

MFC after: 2 weeks