]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
19 years agoRemove CPU_ENABLE_TCC and hook the cpufreq p4tcc up to the build.
njl [Wed, 23 Feb 2005 16:43:44 +0000 (16:43 +0000)]
Remove CPU_ENABLE_TCC and hook the cpufreq p4tcc up to the build.

19 years agoImport a rewrite of p4tcc for the cpufreq(4) framework. This includes
njl [Wed, 23 Feb 2005 16:42:56 +0000 (16:42 +0000)]
Import a rewrite of p4tcc for the cpufreq(4) framework.  This includes
a bugfix of clearing the On-Demand flag when going back to 100%.  It
has been tested and works on an IBM R32.  Note original work done by
Ted Unangst and sobomax@.

19 years agoUpdate release notes:
hrs [Wed, 23 Feb 2005 16:37:22 +0000 (16:37 +0000)]
Update release notes:
SMP VFS enabled by default.

19 years agoForced commit to note a repocopy of this file from sys/i386/i386/p4tcc.c
njl [Wed, 23 Feb 2005 16:36:31 +0000 (16:36 +0000)]
Forced commit to note a repocopy of this file from sys/i386/i386/p4tcc.c

Thanks to: markm

19 years agoUpdate release notes:
hrs [Wed, 23 Feb 2005 16:17:15 +0000 (16:17 +0000)]
Update release notes:
add reference to carp(4) manual page.

19 years agoReplace "ipfw l", which is now deprecated, with "ipfw list".
ssouhlal [Wed, 23 Feb 2005 15:07:36 +0000 (15:07 +0000)]
Replace "ipfw l", which is now deprecated, with "ipfw list".

Approved by: grehan (mentor)

19 years agoCorrectly calculate what to do and how to retry a request to a plex when
le [Wed, 23 Feb 2005 14:59:14 +0000 (14:59 +0000)]
Correctly calculate what to do and how to retry a request to a plex when
the previous one failed and there are more than one plex in the volume.

This could have led to a flood of error messages on the console and
probably a deadlock in certain situations.

19 years agoUse the LST_FOREACH macro instead of the Lst_ForEach function
harti [Wed, 23 Feb 2005 14:03:18 +0000 (14:03 +0000)]
Use the LST_FOREACH macro instead of the Lst_ForEach function
and so get rid of the ForExec helper function by inlining it
into For_Run.

19 years agoStyle: fix indent, use tabs instead of space+tab for aligning things.
harti [Wed, 23 Feb 2005 13:58:56 +0000 (13:58 +0000)]
Style: fix indent, use tabs instead of space+tab for aligning things.
Add a couple of comments.

19 years agoFix the indendation of some multi-line comments.
harti [Wed, 23 Feb 2005 10:20:58 +0000 (10:20 +0000)]
Fix the indendation of some multi-line comments.

Noted by: Max Okumoto <okumoto@ucsd.edu>

19 years ago - Enable SMP VFS by default on current. More users are needed to turn up
jeff [Wed, 23 Feb 2005 10:05:43 +0000 (10:05 +0000)]
 - Enable SMP VFS by default on current.  More users are needed to turn up
   any remaining bugs.  Anyone inconvenienced by this can still disable it
   in the loader.

Sponsored by: Isilon Systems, Inc.

19 years agoManpage for CARP from .Ox, with minor modifications.
glebius [Wed, 23 Feb 2005 08:29:50 +0000 (08:29 +0000)]
Manpage for CARP from .Ox, with minor modifications.

Obtained from: OpenBSD

19 years agoNote that debug.acpi.disabled can also disable the video.
trhodes [Wed, 23 Feb 2005 07:23:35 +0000 (07:23 +0000)]
Note that debug.acpi.disabled can also disable the video.

PR: 77693
Tested/submitted by: John Prather <jprather@axon.cdc.uci.edu>
MFC: 1 day

19 years agoFix a misplaced .El
kientzle [Wed, 23 Feb 2005 06:58:09 +0000 (06:58 +0000)]
Fix a misplaced .El

19 years agoDon't return NULL if there's no error message;
kientzle [Wed, 23 Feb 2005 06:57:04 +0000 (06:57 +0000)]
Don't return NULL if there's no error message;
return a generic text message instead.
(Someday, I'll track down all the places that
are generating errors but not recording messages. ;-/

Thanks to: Jaakko Heinonen

19 years agomark timestamp for pending fragments
sam [Wed, 23 Feb 2005 04:52:30 +0000 (04:52 +0000)]
mark timestamp for pending fragments

Noticed by: Jeffrey D. Chung

19 years agoThey key combinations for Left window and Right window seem reversed, fix.
trhodes [Wed, 23 Feb 2005 04:22:17 +0000 (04:22 +0000)]
They key combinations for Left window and Right window seem reversed, fix.

PR: 48767

19 years agoAccording to kern_poll.c, you cannot use DEVICE_POLLING with SMP. Add a
trhodes [Wed, 23 Feb 2005 04:13:11 +0000 (04:13 +0000)]
According to kern_poll.c, you cannot use DEVICE_POLLING with SMP.  Add a
commen about this in every NOTES file which lists DEVICE_POLLING.

PR: 46793
MFC: 1 day

19 years agoFix up previous commit by adding prescott and itanium2 CPUs.
trhodes [Wed, 23 Feb 2005 03:28:14 +0000 (03:28 +0000)]
Fix up previous commit by adding prescott and itanium2 CPUs.

Submitted by: marcel

19 years agoIf a register width is less than 8, assume the BIOS author thought it was
njl [Wed, 23 Feb 2005 03:20:00 +0000 (03:20 +0000)]
If a register width is less than 8, assume the BIOS author thought it was
in units of bytes and adjust accordingly.  This is found at least on the
Sony PCG-505BX.

19 years agoAdd an EXAMPLES section[1], quote Nd, and bump doc date.
trhodes [Wed, 23 Feb 2005 02:02:38 +0000 (02:02 +0000)]
Add an EXAMPLES section[1], quote Nd, and bump doc date.

PR: 53621 [1]
Submitted by: Faried Nawaz <fn@hungry.com> [1]

19 years agoAdd 'nocona' to the list of Intel ia64 CPUs and k8 to the AMD CPUs.
trhodes [Wed, 23 Feb 2005 01:10:28 +0000 (01:10 +0000)]
Add 'nocona' to the list of Intel ia64 CPUs and k8 to the AMD CPUs.

Replace -fmemoize-lookups -fsave-memoized with a working example,
-fconserve-space.  To quote part of the GCC docs on this option:

"Put uninitialized or runtime-initialized global variables into the
common segment, as C does."

MFC after: 2 days
Submitted by: Daniel Gerzo <danger@rulez.sk> (original version)

19 years ago - A test in sched_switch() is no longer necessary and it is incorrect
jeff [Wed, 23 Feb 2005 00:50:26 +0000 (00:50 +0000)]
 - A test in sched_switch() is no longer necessary and it is incorrect
   when td0 is preempted before it voluntarily switches.

Discovered by: Arjan Van Leeuwen <avleeuwen@gmail.com>

19 years agokill dead code
sam [Wed, 23 Feb 2005 00:43:00 +0000 (00:43 +0000)]
kill dead code

Noticed by: Coverity Prevent analysis tool

19 years agofix potential invalid index into ip_protox array
sam [Wed, 23 Feb 2005 00:38:12 +0000 (00:38 +0000)]
fix potential invalid index into ip_protox array

Noticed by: Coverity Prevent analysis tool

19 years agoUnbreak CARP build on 64-bit architectures.
mux [Wed, 23 Feb 2005 00:20:33 +0000 (00:20 +0000)]
Unbreak CARP build on 64-bit architectures.

Tested on: sparc64

19 years ago - Only the xlock holder should be calling VOP_LOCK on a vp once VI_XLOCK
jeff [Wed, 23 Feb 2005 00:11:14 +0000 (00:11 +0000)]
 - Only the xlock holder should be calling VOP_LOCK on a vp once VI_XLOCK
   has been set.  Assert that this is the case so that we catch filesystems
   who are using naked VOP_LOCKs in illegal cases.

Sponsored by: Isilon Systems, Inc.

19 years ago - Add a check for xlock in vop_lock_assert. Presently the xlock is
jeff [Tue, 22 Feb 2005 23:59:11 +0000 (23:59 +0000)]
 - Add a check for xlock in vop_lock_assert.  Presently the xlock is
   considered to be as good as an exclusive lock, although there is still a
   possibility of someone acquiring a VOP LOCK while xlock is held.

Sponsored by: Isilon Systems, Inc.

19 years ago - Add VOP locking asserts in several functions that have been implicated in
jeff [Tue, 22 Feb 2005 23:56:42 +0000 (23:56 +0000)]
 - Add VOP locking asserts in several functions that have been implicated in
   recent deadlocks.

19 years agoAdd endianness support to cap_mkdb(1), useful for cross builds.
ru [Tue, 22 Feb 2005 23:29:54 +0000 (23:29 +0000)]
Add endianness support to cap_mkdb(1), useful for cross builds.

19 years agoMFi386: r1.17: Treat pin 0 as IRQ 0 rather than ExtINT if mixed mode is not
jhb [Tue, 22 Feb 2005 22:17:03 +0000 (22:17 +0000)]
MFi386: r1.17: Treat pin 0 as IRQ 0 rather than ExtINT if mixed mode is not
enabled by the enumerator.

19 years agoBelkin F5D5020 is an OEM'd card from RACORE based on the AX88190
imp [Tue, 22 Feb 2005 22:07:18 +0000 (22:07 +0000)]
Belkin F5D5020 is an OEM'd card from RACORE based on the AX88190
chipset.  Add support for this card.  Office Max has them on sale and
I was surprised that we didn't have it in our supported list when I
plugged it in...

19 years agoAdd a stratigic newline
imp [Tue, 22 Feb 2005 22:03:52 +0000 (22:03 +0000)]
Add a stratigic newline

19 years agoAdd a entry for the Compaq R3000Z to indicate that it has the weird MADT
jhb [Tue, 22 Feb 2005 21:54:20 +0000 (21:54 +0000)]
Add a entry for the Compaq R3000Z to indicate that it has the weird MADT
IRQ 0 quirk.

19 years ago- Add a new quirk to indicate that pin 0 of the first I/O APIC is really
jhb [Tue, 22 Feb 2005 21:52:52 +0000 (21:52 +0000)]
- Add a new quirk to indicate that pin 0 of the first I/O APIC is really
  IRQ 0 and not an ExtINT pin.  The MADT enumerators ignore the PC-AT flag
  and ignore overrides that map IRQ 0 to pin 2 when this quirk is present.
- Add a block comment above the quirks to document each quirk so that we
  can use more verbose descriptions quirks.

MFC after: 2 weeks

19 years agoIf mixed mode is not enabled by the APIC enumerator (MPTable always does,
jhb [Tue, 22 Feb 2005 21:50:41 +0000 (21:50 +0000)]
If mixed mode is not enabled by the APIC enumerator (MPTable always does,
ACPI MADT only does if the PC-AT flag is set), then don't assume that pin 0
on the first I/O APIC is an ExtINT pin.  Instead, assume that it is ISA
IRQ 0.

19 years agoremove dead code
sam [Tue, 22 Feb 2005 19:02:24 +0000 (19:02 +0000)]
remove dead code

Submitted by: Coverity Prevent analysis tool

19 years agoMinor style nits missed in earlier passes
imp [Tue, 22 Feb 2005 18:58:34 +0000 (18:58 +0000)]
Minor style nits missed in earlier passes

19 years agoremove dead code (inside a DEBUG ifdef)
sam [Tue, 22 Feb 2005 18:57:18 +0000 (18:57 +0000)]
remove dead code (inside a DEBUG ifdef)

Submitted by: Coverity Prevent analysis tool

19 years agoZero the v_un container field to make sure everything is gone.
phk [Tue, 22 Feb 2005 18:56:18 +0000 (18:56 +0000)]
Zero the v_un container field to make sure everything is gone.

19 years agoGroup the fields in struct vnode by their function and stick comments
phk [Tue, 22 Feb 2005 18:49:03 +0000 (18:49 +0000)]
Group the fields in struct vnode by their function and stick comments
there to tell what the function is.

19 years agoWe may not have an actual cdev at this point.
phk [Tue, 22 Feb 2005 18:17:31 +0000 (18:17 +0000)]
We may not have an actual cdev at this point.

19 years agoConnect memguard(9) to the build.
brueffer [Tue, 22 Feb 2005 17:42:12 +0000 (17:42 +0000)]
Connect memguard(9) to the build.

19 years agoBring back the full packet destination manipulation for 'ipfw fwd'
andre [Tue, 22 Feb 2005 17:40:40 +0000 (17:40 +0000)]
Bring back the full packet destination manipulation for 'ipfw fwd'
with the kernel compile time option:

 options IPFIREWALL_FORWARD_EXTENDED

This option has to be specified in addition to IPFIRWALL_FORWARD.

With this option even packets targeted for an IP address local
to the host can be redirected.  All restrictions to ensure proper
behaviour for locally generated packets are turned off.  Firewall
rules have to be carefully crafted to make sure that things like
PMTU discovery do not break.

Document the two kernel options.

PR: kern/71910
PR: kern/73129
MFC after: 1 week

19 years agoUse &man.memguard.9; entity.
hrs [Tue, 22 Feb 2005 17:24:33 +0000 (17:24 +0000)]
Use &man.memguard.9; entity.

19 years agoXref memguard(9)
brueffer [Tue, 22 Feb 2005 17:20:20 +0000 (17:20 +0000)]
Xref memguard(9)

19 years agoFirst cut at a manpage for the MemGuard debugging allocator.
brueffer [Tue, 22 Feb 2005 17:18:27 +0000 (17:18 +0000)]
First cut at a manpage for the MemGuard debugging allocator.

most content from: bmilekic
mdoc lessons by: ru

19 years agoRemove promisc counter from parent interface in carp_clone_destroy(),
glebius [Tue, 22 Feb 2005 16:24:55 +0000 (16:24 +0000)]
Remove promisc counter from parent interface in carp_clone_destroy(),
so that parent interface is not left in promiscous mode after carp
interface is destroyed.

This is not perfect, since promisc counter is added when carp
interface is assigned an IP address. However, when address is removed
parent interface is still in promiscuous mode. Only removal of
carp interface removes promisc from parent. Same way in OpenBSD.

Sponsored by: Rambler

19 years agoReap more benefits from DEVFS:
phk [Tue, 22 Feb 2005 15:51:07 +0000 (15:51 +0000)]
Reap more benefits from DEVFS:

List devfs_dirents rather than vnodes off their shared struct cdev, this
saves a pointer field in the vnode at the expense of a field in the
devfs_dirent.  There are often 100 times more vnodes so this is bargain.
In addition it makes it harder for people to try to do stypid things like
"finding the vnode from cdev".

Since DEVFS handles all VCHR nodes now, we can do the vnode related
cleanup in devfs_reclaim() instead of in dev_rel() and vgonel().
Similarly, we can do the struct cdev related cleanup in dev_rel()
instead of devfs_reclaim().

rename idestroy_dev() to destroy_devl() for consistency.

Add LIST_ENTRY de_alias to struct devfs_dirent.
Remove v_specnext from struct vnode.
Change si_hlist to si_alist in struct cdev.
String new devfs vnodes' devfs_dirent on si_alist when
we create them and take them off in devfs_reclaim().

Fix devfs_revoke() accordingly.  Also don't clear fields
devfs_reclaim() will clear when called from vgone();

Let devfs_reclaim() call dev_rel() instead of vgonel().

Move the usecount tracking from dev_rel() to devfs_reclaim(),
and let dev_rel() take a struct cdev argument instead of vnode.

Destroy SI_CHEAPCLONE devices in dev_rel() (instead of
devfs_reclaim()) when they are no longer used.   (This
should maybe happen in devfs_close() instead.)

19 years agoTypo in comment.
glebius [Tue, 22 Feb 2005 15:29:29 +0000 (15:29 +0000)]
Typo in comment.

19 years agoFollow v_id changes in NFSv[23]
phk [Tue, 22 Feb 2005 15:15:28 +0000 (15:15 +0000)]
Follow v_id changes in NFSv[23]

19 years agovp->v_id is a private field for the vfs namecache and it is a big mistake
phk [Tue, 22 Feb 2005 15:06:30 +0000 (15:06 +0000)]
vp->v_id is a private field for the vfs namecache and it is a big mistake
that NFS ever started using it and an even bigger that it got copied&pasted
to nwfs and smbfs.

Replace with use of vhold()/vdrop().

19 years agoWhen prepending an LCC SNAP header to an atalk outgoing ethernet packet,
rwatson [Tue, 22 Feb 2005 15:03:25 +0000 (15:03 +0000)]
When prepending an LCC SNAP header to an atalk outgoing ethernet packet,
allocate the additional mbuf (if needed) using a non-sleeping memory
allocation.

MFC after: 7 days

19 years agoFix wrong wording.
hrs [Tue, 22 Feb 2005 15:03:04 +0000 (15:03 +0000)]
Fix wrong wording.

Submitted by: ceri

19 years agoUse vn_printf() instead of home-rolling.
phk [Tue, 22 Feb 2005 14:58:59 +0000 (14:58 +0000)]
Use vn_printf() instead of home-rolling.

19 years agovp->v_id is a private field for the vfs namecache and it is a big mistake
phk [Tue, 22 Feb 2005 14:52:00 +0000 (14:52 +0000)]
vp->v_id is a private field for the vfs namecache and it is a big mistake
that NFS ever started using it.  Long time ago I added the necessary
vhold()/vdrop() calls to replace it, but forgot to remove the v_id code.

Do it now.

19 years agoMake dev_ref() require the dev_lock() to be held and use it from
phk [Tue, 22 Feb 2005 14:41:04 +0000 (14:41 +0000)]
Make dev_ref() require the dev_lock() to be held and use it from
devfs instead of directly frobbing the si_refcount.

19 years agoWhen generating a phase II ARP lookup from aarpwhohas(), use a
rwatson [Tue, 22 Feb 2005 14:37:22 +0000 (14:37 +0000)]
When generating a phase II ARP lookup from aarpwhohas(), use a
non-sleeping mbuf allocation.

MFC after: 1 week

19 years agoIn the ddp_output() path, which can be called in a variety of threading
rwatson [Tue, 22 Feb 2005 14:22:09 +0000 (14:22 +0000)]
In the ddp_output() path, which can be called in a variety of threading
and locking contexts, use a non-sleeping allocation for mbufs.

MFC after: 1 week

19 years ago- In if_link_state_change() extract function body from if-block, to improve
glebius [Tue, 22 Feb 2005 14:21:59 +0000 (14:21 +0000)]
- In if_link_state_change() extract function body from if-block, to improve
  readability.
- Call carp_carpdev_state() from if_link_state_change() if interface has
  associated CARP interface.

Sponsored by: Rambler

19 years agoConvert the aa_ifaddr timeout to a callout, and run the aarprobe callout
rwatson [Tue, 22 Feb 2005 14:20:29 +0000 (14:20 +0000)]
Convert the aa_ifaddr timeout to a callout, and run the aarprobe callout
MPSAFE.  Acquire the aarptab_mtx to make sure that the callout and msleep
in the ioctl thread don't race.

MFC after: 1 week

19 years agoRemove vfinddev(), it is generally bogus when faced with jails and
phk [Tue, 22 Feb 2005 14:11:47 +0000 (14:11 +0000)]
Remove vfinddev(), it is generally bogus when faced with jails and
chroot and has no legitimate use(r)s in the tree.

19 years agoUse afswch->af_other_status for carp_status() and pfsync_status().
glebius [Tue, 22 Feb 2005 14:07:47 +0000 (14:07 +0000)]
Use afswch->af_other_status for carp_status() and pfsync_status().

Sponsored by: Rambler

19 years agoNeuter DRM(mapbufs) until somebody finds time to try to fix it.
phk [Tue, 22 Feb 2005 13:56:15 +0000 (13:56 +0000)]
Neuter DRM(mapbufs) until somebody finds time to try to fix it.

It is _never_ OK to find a vnode from a struct cdev because you have
no way of telling if you get the right one.  You might be in jail or
chroot for instance.

19 years agoAdd CARP to kernel build.
glebius [Tue, 22 Feb 2005 13:50:02 +0000 (13:50 +0000)]
Add CARP to kernel build.

19 years agoNeuter linux_ustat() until somebody finds time to try to fix it.
phk [Tue, 22 Feb 2005 13:39:46 +0000 (13:39 +0000)]
Neuter linux_ustat() until somebody finds time to try to fix it.

The fundamental problem is that we get only the lower 8 bits of the
minor device number so there is no guarantee that we can actually
find the disk device in question at all.

This was probably a bigger issue pre-GEOM where the upper bits
signaled which slice were in use.

The secondary problem is how we get from (partial) dev_t to vnode.

The correct implementation will involve traversing the mount list
looking for a perfect match or a possible match (for truncated
minor).

19 years agoNew release notes:
hrs [Tue, 22 Feb 2005 13:33:04 +0000 (13:33 +0000)]
New release notes:
CARP from OpenBSD.

19 years agoWhen invoking callout_init(), spell '1' as "CALLOUT_MPSAFE".
rwatson [Tue, 22 Feb 2005 13:11:33 +0000 (13:11 +0000)]
When invoking callout_init(), spell '1' as "CALLOUT_MPSAFE".

MFC after: 3 days

19 years agoAdd CARP (Common Address Redundancy Protocol), which allows multiple
glebius [Tue, 22 Feb 2005 13:04:05 +0000 (13:04 +0000)]
Add CARP (Common Address Redundancy Protocol), which allows multiple
hosts to share an IP address, providing high availability and load
balancing.

Original work on CARP done by Michael Shalayeff, with many
additions by Marco Pfatschbacher and Ryan McBride.

FreeBSD port done solely by Max Laier.

Patch by: mlaier
Obtained from: OpenBSD (mickey, mcbride)

19 years agoNew release notes:
hrs [Tue, 22 Feb 2005 10:34:40 +0000 (10:34 +0000)]
New release notes:
32MB memory allocation for legacy PCI bridges,
pbio(4), and
vge(4) polling support.

MFC:
IPv6 MTU feedback disabled.

19 years agoWe can make code simplier after last change.
glebius [Tue, 22 Feb 2005 08:35:24 +0000 (08:35 +0000)]
We can make code simplier after last change.

Noticed by: Andrew Thompson

19 years agoFix the prototypes by addings some constness. This should have been
harti [Tue, 22 Feb 2005 08:17:05 +0000 (08:17 +0000)]
Fix the prototypes by addings some constness. This should have been
committed together with the commit to dir.c:1.48.

19 years agoDo not print kernel debugging on console. In case of serial console
glebius [Tue, 22 Feb 2005 08:03:09 +0000 (08:03 +0000)]
Do not print kernel debugging on console. In case of serial console
this can cause a really heavy load on system. Several kernel debugging
messages can be triggered even remotely (e.g. bad ARP replies).

Use kern.warning instead, so that really significant messages still
will be printed on console.

Reviewed by: current@
MFC after: 1 week
Security: this change fixes a DoS condition, when default system
console is serial, and box is flooded with bogus ARP
packets

19 years agoUse the new LST_FOREACH macro throughout the file and replace calls to
harti [Tue, 22 Feb 2005 08:00:06 +0000 (08:00 +0000)]
Use the new LST_FOREACH macro throughout the file and replace calls to
Lst_ForEach and Lst_Find.

19 years agoInvent the LST_FOREACH macro for looping through a list. In contrast
harti [Tue, 22 Feb 2005 07:58:53 +0000 (07:58 +0000)]
Invent the LST_FOREACH macro for looping through a list. In contrast
to the Lst_ForEach function this macro reduces the number of function
calls per invocation by N + 1 (where N is the number of list elements)
and increases code locality thereby increasing readability and
(maybe) performance.

19 years agoIn in_pcbconnect_setup() jailed sockets are treated specially: if local
glebius [Tue, 22 Feb 2005 07:50:02 +0000 (07:50 +0000)]
In in_pcbconnect_setup() jailed sockets are treated specially: if local
address is not supplied, then jail IP is choosed and in_pcbbind() is called.
Since udp_output() does not save local addr after call to in_pcbconnect_setup(),
in_pcbbind() is called for each packet, and this is incorrect.

So, we shall treat jailed sockets specially in udp_output(), we will save
their local address.

This fixes a long standing bug with broken sendto() system call in jails.

PR: kern/26506
Reviewed by: rwatson
MFC after: 2 weeks

19 years agoIn in_pcbconnect_setup() remove a check that route points at
glebius [Tue, 22 Feb 2005 07:39:15 +0000 (07:39 +0000)]
In in_pcbconnect_setup() remove a check that route points at
loopback interface. Nobody have explained me sense of this check.
It breaks connect() system call to a destination address which is
loopback routed (e.g. blackholed).

Reviewed by: silence on net@
MFC after: 2 weeks

19 years agoIncrease the maximum to wait for a transition from 1 to 10 ms. In some
njl [Tue, 22 Feb 2005 06:34:53 +0000 (06:34 +0000)]
Increase the maximum to wait for a transition from 1 to 10 ms.  In some
modes, systems may take longer.  If the status values don't match, try
matching just the lowest 8 bits if no bits above 8 are set in the desired
value.  The IBM R32 has other bits set in the status register that are
irrelevant to the expected value.

19 years agoSupport disabling individual cpufreq drivers with hints, e.g.,
njl [Tue, 22 Feb 2005 06:31:45 +0000 (06:31 +0000)]
Support disabling individual cpufreq drivers with hints, e.g.,
hint.ichss.0.disabled="1"

19 years agoMFp4: Optimize in/out macros. Cache the handle and tag in softc and
imp [Tue, 22 Feb 2005 05:12:25 +0000 (05:12 +0000)]
MFp4: Optimize in/out macros.  Cache the handle and tag in softc and
use them in the macros.  Since the rman_get_bus{tag,handle} transitioned
from macros to function calls, this unpessimizes that conversion.

19 years agoDo not fail to initialize callouts (on SMP only) -- it leads to crashing.
green [Tue, 22 Feb 2005 04:27:05 +0000 (04:27 +0000)]
Do not fail to initialize callouts (on SMP only) -- it leads to crashing.

19 years agoMinor optimization of calling enable_16bit. We always have to call it
imp [Tue, 22 Feb 2005 03:37:04 +0000 (03:37 +0000)]
Minor optimization of calling enable_16bit.  We always have to call it
and error is going to be right for both forks of the if, so just
return that.

19 years agoMFS5: Minor style(9) tweak.
delphij [Tue, 22 Feb 2005 02:56:42 +0000 (02:56 +0000)]
MFS5: Minor style(9) tweak.

19 years agoremove dead code
sam [Tue, 22 Feb 2005 01:26:48 +0000 (01:26 +0000)]
remove dead code

Submitted by: Coverity Prevent analysis tool

19 years agoSet the start of the cooling time later on, when we're actually performing
njl [Tue, 22 Feb 2005 00:40:13 +0000 (00:40 +0000)]
Set the start of the cooling time later on, when we're actually performing
the switch.  Other interim tests (i.e., for minimum runtime) could
invalidate the start time.  This fixes transitions to cooler states in that
now they go to the next active state (_AC0 -> _AC1) instead of going
straight to off (_AC0 -> off).

Submitted by: Alexandre "Sunny" Kovalenko (Alex.Kovalenko / verizon.net)

19 years agoNew release notes: SysV IPC objects with MAC support, auxio(4), pcii,
bmah [Tue, 22 Feb 2005 00:29:22 +0000 (00:29 +0000)]
New release notes: SysV IPC objects with MAC support, auxio(4), pcii,
rtc (+MFC), uart(4) default tty driver for sparc64 (+MFC),
snd_audiocs(4) (+MFC), cp(4)/ctau(4)/cx(4) MPSAFE (+MFC), em(4)
hardware VLAN support disabled by default (+MFC), fxp(4) flow control
disabled by default (+MFC), sppp(4) FR support (+MFC), libgpib.

19 years agoSince the GPE handler is directly called by ACPI-CA and it may have unknown
njl [Mon, 21 Feb 2005 23:38:41 +0000 (23:38 +0000)]
Since the GPE handler is directly called by ACPI-CA and it may have unknown
locks held, specify the ACPI_ISR flag to keep it from acquiring any more
mutexes (which could potentially sleep.)  This should fix "could sleep"
warning messages on the following path:

    msleep()
    AcpiOsWaitSemaphore()
    AcpiUtAcquireMutex()
    AcpiDisableGpe()
    EcGpeHandler()
    AcpiEvGpeDispatch()
    AcpiEvGpeDetect()
    AcpiEvGpeDetect()
    AcpiEvSciXruptHandler()

19 years agoIn the current world order, solisten() implements the state transition of
rwatson [Mon, 21 Feb 2005 21:58:17 +0000 (21:58 +0000)]
In the current world order, solisten() implements the state transition of
a socket from a regular socket to a listening socket able to accept new
connections.  As part of this state transition, solisten() calls into the
protocol to update protocol-layer state.  There were several bugs in this
implementation that could result in a race wherein a TCP SYN received
in the interval between the protocol state transition and the shortly
following socket layer transition would result in a panic in the TCP code,
as the socket would be in the TCPS_LISTEN state, but the socket would not
have the SO_ACCEPTCONN flag set.

This change does the following:

- Pushes the socket state transition from the socket layer solisten() to
  to socket "library" routines called from the protocol.  This permits
  the socket routines to be called while holding the protocol mutexes,
  preventing a race exposing the incomplete socket state transition to TCP
  after the TCP state transition has completed.  The check for a socket
  layer state transition is performed by solisten_proto_check(), and the
  actual transition is performed by solisten_proto().

- Holds the socket lock for the duration of the socket state test and set,
  and over the protocol layer state transition, which is now possible as
  the socket lock is acquired by the protocol layer, rather than vice
  versa.  This prevents additional state related races in the socket
  layer.

This permits the dual transition of socket layer and protocol layer state
to occur while holding locks for both layers, making the two changes
atomic with respect to one another.  Similar changes are likely require
elsewhere in the socket/protocol code.

Reported by: Peter Holm <peter@holm.cc>
Review and fixes from: emax, Antoine Brodin <antoine.brodin@laposte.net>
Philosophical head nod: gnn

19 years agoFixed compilation warnings.
ru [Mon, 21 Feb 2005 21:02:25 +0000 (21:02 +0000)]
Fixed compilation warnings.

19 years agoMFR4_11: SA-04:16.fetch (+MFC), SA-04:17.procfs (+MFC).
bmah [Mon, 21 Feb 2005 20:53:57 +0000 (20:53 +0000)]
MFR4_11:  SA-04:16.fetch (+MFC), SA-04:17.procfs (+MFC).

New release notes:  EN-05:01.nfs (+MFC), EN-05:02.sk (+MFC),
EN-05:03.ipi (+MFC).

To be consistent with other documentation, the release documentation
will henceforth include the one-word keyword (e.g. "fetch", "procfs"
above) in the names of advisories and errata.

19 years agoNew release notes: MemGuard, psm(4) improved Synaptics Touchpad
bmah [Mon, 21 Feb 2005 20:19:03 +0000 (20:19 +0000)]
New release notes:  MemGuard, psm(4) improved Synaptics Touchpad
support, hme(4) MPSAFE (+MFC), random port number allocation fix,
IPX/SPX locking, gshsec(8), dump(8) -n, some ipfw(8) abbreviated
options deprecated, libarchive ISO and ZIP support, rpmatch(3),
telnet(1)/telnetd(8) -S, manpage cleanup.

MFCs noted:  cd9660 less chatty,

Modified release notes: Fix typo (s/icss/ichss/) [1], add missing
"driver" in a couple of notes.

Submitted by: njl [1]

19 years agoBump __FreeBSD_version for vswprintf(3) fix. Some ports depend on it.
fjoe [Mon, 21 Feb 2005 19:43:18 +0000 (19:43 +0000)]
Bump __FreeBSD_version for vswprintf(3) fix. Some ports depend on it.

19 years agoFix EOVERFLOW detection in vswprintf(3)
fjoe [Mon, 21 Feb 2005 19:41:44 +0000 (19:41 +0000)]
Fix EOVERFLOW detection in vswprintf(3)

Reviewed by: tjr
MFC after: 2 weeks

19 years agoUse hardware instructions for sqrt() and sqrtf().
das [Mon, 21 Feb 2005 18:27:57 +0000 (18:27 +0000)]
Use hardware instructions for sqrt() and sqrtf().

19 years agoUse double arithmetic instead of simulating it with two floats. This
das [Mon, 21 Feb 2005 17:44:57 +0000 (17:44 +0000)]
Use double arithmetic instead of simulating it with two floats.  This
results in a performance gain on the order of 10% for amd64 (sledge),
ia64 (pluto1), i386+SSE (Pentium 4), and sparc64 (panther), and a
negligible improvement for i386 without SSE.  (The i386 port still
uses the hardware instruction, though.)

19 years agoOnly send packet to bpf if we are committed to send it. Previously it was
mlaier [Mon, 21 Feb 2005 17:30:10 +0000 (17:30 +0000)]
Only send packet to bpf if we are committed to send it.  Previously it was
possible that the same packet would show up multiple times.  This poses some
constraints on the TBD locking for snc(4) (see comment).

Obtained from: DragonFlyBSD
Submitted by: Joerg Sonnenberger
Reviewed by: rwatson

19 years agoFix a terrible braino in pfi_maybe_destroy() and unbreak "$pfctl -Fall" with
mlaier [Mon, 21 Feb 2005 17:20:00 +0000 (17:20 +0000)]
Fix a terrible braino in pfi_maybe_destroy() and unbreak "$pfctl -Fall" with
renamed interfaces.

PR: kern/77645
Reported by: Harald Schmalzbauer <harryNOschmalzbauerSPAMde>
Reviewed by: yongari
MFC after: 3 days

19 years agoDon't use the static CALLOUT_INITIALIZER for __FreeBSD_version >= 600000. It
mlaier [Mon, 21 Feb 2005 17:11:09 +0000 (17:11 +0000)]
Don't use the static CALLOUT_INITIALIZER for __FreeBSD_version >= 600000. It
was a bad idea, but since it is done like this in the vendor source we keep
it around for older versions. As a safe guard against future misuse we don't
even define CALLOUT_INITIALIZER anymore.

This fixes ALTQ after callout_init_mtx() and takes altq_var.h off the vendor
branch.

Submitted by: Divacky Roman <xdivac02NOstud.fit.vutbrSPAMcz> (w/ changes)

19 years agoNew release notes:
hrs [Mon, 21 Feb 2005 16:45:49 +0000 (16:45 +0000)]
New release notes:
prompt parameter support in autoboot loader command,
uplcom(4) CTS support,
dc(4) ALTQ support,
IPv6 MTU feedback disabled,
ipfw(8) ALTQ classification and tagging, and
newsyslog -d option.

Update release notes:
F/pc98 still uses OLDCARD[1], and
fix some typos:
s/compatability/compatibility
s/behaviour/behavior/.

Spotted by: nyan[1]

19 years agoRemove the i387 versions of atan(), atan2(), and atan2f().
das [Mon, 21 Feb 2005 16:04:23 +0000 (16:04 +0000)]
Remove the i387 versions of atan(), atan2(), and atan2f().
They are slower than the MI routines on modern hardware,
except for degenerate cases such as the Pentium 4.

PR: 67469