]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
19 years agoRemove unused variable.
Colin Percival [Wed, 10 Aug 2005 13:45:00 +0000 (13:45 +0000)]
Remove unused variable.

Reported by: stefanf

19 years agoMove <sys/cdefs.h> up to reduce diff to NetBSD.
Stefan Farfeleder [Wed, 10 Aug 2005 13:41:31 +0000 (13:41 +0000)]
Move <sys/cdefs.h> up to reduce diff to NetBSD.

19 years agoSubmitted to and merged from NetBSD (rev. 1.23 and 1.24):
Stefan Farfeleder [Wed, 10 Aug 2005 13:38:01 +0000 (13:38 +0000)]
Submitted to and merged from NetBSD (rev. 1.23 and 1.24):
- Don't delete the current line when typing `yy'.
- Don't use a possibly stale pointer in cv_paste().
-

19 years agoDo not drop the vnode interlock if vdropl is called on already doomed vnode.
Alexander Kabaev [Wed, 10 Aug 2005 11:46:03 +0000 (11:46 +0000)]
Do not drop the vnode interlock if vdropl is called on already doomed vnode.
vdropl callers expect it to return with interlock still being held.

MFC after: 2 days

19 years agosupports stealth forwarding in IPv6, as well as in IPv4
SUZUKI Shinsuke [Wed, 10 Aug 2005 09:13:35 +0000 (09:13 +0000)]
supports stealth forwarding in IPv6, as well as in IPv4

PR: kern/54625
MFC after: 1 week

19 years agoRemove public declarations of variables that were forgotten when they were
David E. O'Brien [Wed, 10 Aug 2005 07:10:02 +0000 (07:10 +0000)]
Remove public declarations of variables that were forgotten when they were
made static.

19 years agoRemove the need to forward declare statics by moving them around.
David E. O'Brien [Wed, 10 Aug 2005 07:08:14 +0000 (07:08 +0000)]
Remove the need to forward declare statics by moving them around.

19 years agoMatch IPv6 and use a static struct pr_usrreqs nousrreqs.
David E. O'Brien [Wed, 10 Aug 2005 06:41:04 +0000 (06:41 +0000)]
Match IPv6 and use a static struct pr_usrreqs nousrreqs.

19 years agoStyle nit.
David E. O'Brien [Wed, 10 Aug 2005 06:38:46 +0000 (06:38 +0000)]
Style nit.

19 years agoAdd an option to tell what version of config(8) this is.
David E. O'Brien [Wed, 10 Aug 2005 06:36:44 +0000 (06:36 +0000)]
Add an option to tell what version of config(8) this is.

19 years agoUse the ISO standard function variable vs. a GCC'ism.
David E. O'Brien [Wed, 10 Aug 2005 06:25:41 +0000 (06:25 +0000)]
Use the ISO standard function variable vs. a GCC'ism.

19 years agofixed a kernel crash at the start-up time of an IPv6 multicast daemons o
SUZUKI Shinsuke [Wed, 10 Aug 2005 05:28:11 +0000 (05:28 +0000)]
fixed a kernel crash at the start-up time of an IPv6 multicast daemons o
(e.g. pim6dd, pim6sd)

MFC after: 3 days

19 years agoStyle cleanup.
David E. O'Brien [Wed, 10 Aug 2005 04:01:21 +0000 (04:01 +0000)]
Style cleanup.

19 years agoFix FBSDid style nit.
David E. O'Brien [Wed, 10 Aug 2005 03:56:31 +0000 (03:56 +0000)]
Fix FBSDid style nit.

19 years agoAdd proper copyright attribution.
David E. O'Brien [Wed, 10 Aug 2005 03:54:37 +0000 (03:54 +0000)]
Add proper copyright attribution.

19 years agoRemove a reference to compute_stats(), since it is no longer documented at
Kenneth D. Merry [Wed, 10 Aug 2005 00:51:36 +0000 (00:51 +0000)]
Remove a reference to compute_stats(), since it is no longer documented at
least.

Submitted by: osa
MFC after: 1 week

19 years agoDon't allow pagedaemon to skip pages while scanning PQ_ACTIVE or PQ_INACTIVE
Tor Egge [Wed, 10 Aug 2005 00:17:36 +0000 (00:17 +0000)]
Don't allow pagedaemon to skip pages while scanning PQ_ACTIVE or PQ_INACTIVE
due to the vm object being locked.

When a process writes large amounts of data to a file, the vm object associated
with that file can contain most of the physical pages on the machine.  If the
process is preempted while holding the lock on the vm object, pagedaemon would
be able to move very few pages from PQ_INACTIVE to PQ_CACHE or from PQ_ACTIVE
to PQ_INACTIVE, resulting in unlimited cleaning of dirty pages belonging to
other vm objects.

Temporarily unlock the page queues lock while locking vm objects to avoid lock
order violation.  Detect and handle relevant page queue changes.

This change depends on both the lock portion of struct vm_object and normal
struct vm_page being type stable.

Reviewed by: alc

19 years agoDocument kvm(3)-related error constants, and correct minor formatting
Robert Watson [Tue, 9 Aug 2005 22:19:30 +0000 (22:19 +0000)]
Document kvm(3)-related error constants, and correct minor formatting
nits.

19 years agoCall tulip_start() rather than tulip_ifstart() from the interrupt handler
John Baldwin [Tue, 9 Aug 2005 21:53:26 +0000 (21:53 +0000)]
Call tulip_start() rather than tulip_ifstart() from the interrupt handler
to avoid recursing on the driver lock.  Not sure why my test box didn't
catch this earlier.

MFC after: 3 days

19 years agoThere's no reason to check the valence. This allows ciss to work
Paul Saab [Tue, 9 Aug 2005 20:53:51 +0000 (20:53 +0000)]
There's no reason to check the valence.  This allows ciss to work
on the P600.

19 years agoAdd helper function ip_findmoptions(), which accepts an inpcb, and attempts
Robert Watson [Tue, 9 Aug 2005 17:19:21 +0000 (17:19 +0000)]
Add helper function ip_findmoptions(), which accepts an inpcb, and attempts
to atomically return either an existing set of IP multicast options for the
PCB, or a newlly allocated set with default values.  The inpcb is returned
locked.  This function may sleep.

Call ip_moptions() to acquire a reference to a PCB's socket options, and
perform the update of the options while holding the PCB lock.  Release the
lock before returning.

Remove garbage collection of multicast options when values return to the
default, as this complicates locking substantially.  Most applications
allocate a socket either to be multicast, or not, and don't tend to keep
around sockets that have previously been used for multicast, then used for
unicast.

This closes a number of race conditions involving multiple threads or
processes modifying the IP multicast state of a socket simultaenously.

MFC after: 7 days

19 years agoGrammar improvements.
Murray Stokely [Tue, 9 Aug 2005 14:11:57 +0000 (14:11 +0000)]
Grammar improvements.

PR: docs/84619
Submitted by: Gary W. Swearingen <garys@opusnet.com>
MFC after: 3 days

19 years agoFix typo.
Murray Stokely [Tue, 9 Aug 2005 13:55:21 +0000 (13:55 +0000)]
Fix typo.

PR: docs/84660
Submitted by: Dirk Gouders <gouders@et.bocholt.fh-ge.de>
MFC after: 3 days

19 years agoNetBSD merged our typo fixes, update $NetBSD$.
Stefan Farfeleder [Tue, 9 Aug 2005 13:37:59 +0000 (13:37 +0000)]
NetBSD merged our typo fixes, update $NetBSD$.

19 years agoMerge a change I missed in the last commit.
Stefan Farfeleder [Tue, 9 Aug 2005 13:35:48 +0000 (13:35 +0000)]
Merge a change I missed in the last commit.

19 years agonForce3 and nForce4 are supported as well.
Christian Brueffer [Tue, 9 Aug 2005 13:32:45 +0000 (13:32 +0000)]
nForce3 and nForce4 are supported as well.

MFC after: 3 days

19 years agoMerge NetBSD's 1.25 which fixes a small bug introduced in 1.24.
Stefan Farfeleder [Tue, 9 Aug 2005 13:31:59 +0000 (13:31 +0000)]
Merge NetBSD's 1.25 which fixes a small bug introduced in 1.24.

19 years agoAdd an order between UDP inpcb locks and the IPv4 multicast address
Robert Watson [Tue, 9 Aug 2005 13:27:50 +0000 (13:27 +0000)]
Add an order between UDP inpcb locks and the IPv4 multicast address
list lock, as there has been a report that an alternative lock order
is getting introduced.  This should help ferret it out.

Reported by: Ed Maste <emaste at phaedrus dot sandvine dot ca>

19 years agoSort the list of supported hardware.
Christian Brueffer [Tue, 9 Aug 2005 13:25:34 +0000 (13:25 +0000)]
Sort the list of supported hardware.

MFC after: 3 days

19 years agoFor each interface flag, indicate whether or not it is owned by the
Robert Watson [Tue, 9 Aug 2005 12:56:20 +0000 (12:56 +0000)]
For each interface flag, indicate whether or not it is owned by the
device driver, owned by the network stack, or initialized by the device
driver before attach and read-only from then on.

Not all device drivers and network stack components currently follow
these rules, especially with respect to IFF_UP, and a few exceptions
with IFF_ALLMULTI.

MFC after: 7 days

19 years agocorrected the fourth argument to ni6_addrs().
Hajimu UMEMOTO [Tue, 9 Aug 2005 12:24:11 +0000 (12:24 +0000)]
corrected the fourth argument to ni6_addrs().

19 years agoWrap the new world order in __FreeBSD__ to ease future imports.
Max Laier [Tue, 9 Aug 2005 11:59:02 +0000 (11:59 +0000)]
Wrap the new world order in __FreeBSD__ to ease future imports.

19 years agoFix a typo
Brian Somers [Tue, 9 Aug 2005 11:55:18 +0000 (11:55 +0000)]
Fix a typo

19 years agoMention how to ensure that a device hasn't already been identified
Brian Somers [Tue, 9 Aug 2005 11:14:21 +0000 (11:14 +0000)]
Mention how to ensure that a device hasn't already been identified

19 years agoFix a couple of typos
Brian Somers [Tue, 9 Aug 2005 10:30:25 +0000 (10:30 +0000)]
Fix a couple of typos

19 years agoPropagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and
Robert Watson [Tue, 9 Aug 2005 10:20:02 +0000 (10:20 +0000)]
Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and
IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to
ifnet.if_drv_flags.  Device drivers are now responsible for
synchronizing access to these flags, as they are in if_drv_flags.  This
helps prevent races between the network stack and device driver in
maintaining the interface flags field.

Many __FreeBSD__ and __FreeBSD_version checks maintained and continued;
some less so.

Reviewed by: pjd, bz
MFC after: 7 days

19 years agoRename IFF_RUNNING to IFF_DRV_RUNNING, IFF_OACTIVE to IFF_DRV_OACTIVE,
Robert Watson [Tue, 9 Aug 2005 10:16:17 +0000 (10:16 +0000)]
Rename IFF_RUNNING to IFF_DRV_RUNNING, IFF_OACTIVE to IFF_DRV_OACTIVE,
and move both flags from ifnet.if_flags to ifnet.if_drv_flags, making
and documenting the locking of these flags the responsibility of the
device driver, not the network stack.  The flags for these two fields
will be mutually exclusive so that they can be exposed to user space as
though they were stored in the same variable.

Provide #defines to provide the old names #ifndef _KERNEL, so that user
applications (such as ifconfig) can use the old flag names.  Using the
old names in a device driver will result in a compile error in order to
help device driver writers adopt the new model.

When exposing the interface flags to user space, via interface ioctls
or routing sockets, or the two fields together.  Since the driver flags
cannot currently be set for user space, no new logic is currently
required to handle this case.

Add some assertions that general purpose network stack routines, such
as if_setflags(), are not improperly used on driver-owned flags.

With this change, a large number of very minor network stack races are
closed, subject to correct device driver locking.  Most were likely
never triggered.

Driver sweep to follow; many thanks to pjd and bz for the line-by-line
review they gave this patch.

Reviewed by: pjd, bz
MFC after: 7 days

19 years agoCheck that malloc() succeeds in makelist.
Colin Percival [Tue, 9 Aug 2005 09:49:01 +0000 (09:49 +0000)]
Check that malloc() succeeds in makelist.

Submitted by: Roman Divacky (who did a very complete review of both
make_index.c and phttpget.c)

19 years agoUpdate to latest version of this tool.
Poul-Henning Kamp [Tue, 9 Aug 2005 09:27:11 +0000 (09:27 +0000)]
Update to latest version of this tool.

Takes about a week for a full run.

19 years agoIn preparation for fixing races in ARP (and probably in other
Gleb Smirnoff [Tue, 9 Aug 2005 08:39:56 +0000 (08:39 +0000)]
In preparation for fixing races in ARP (and probably in other
L2/L3 mappings) make rt_check() return a locked rtentry.

19 years ago- Use 'error' variable to store error value, instead of 'i'.
Gleb Smirnoff [Tue, 9 Aug 2005 08:37:28 +0000 (08:37 +0000)]
- Use 'error' variable to store error value, instead of 'i'.
- Push 'i' into the only block where it is used.
- Remove redundant check for rt being NULL. If rt_check() hasn't
  returned an error, then rt is valid.

Reviewed by: gnn

19 years agoReplace INT_MAX with OFF_MAX. I used INT_MAX originally (in ports)
Colin Percival [Tue, 9 Aug 2005 08:33:27 +0000 (08:33 +0000)]
Replace INT_MAX with OFF_MAX.  I used INT_MAX originally (in ports)
because OFF_MAX wasn't defined on FreeBSD 4.x.

19 years agoWhen parsing the HTTP_PROXY environment variable, strip a trailing /
Colin Percival [Tue, 9 Aug 2005 03:32:29 +0000 (03:32 +0000)]
When parsing the HTTP_PROXY environment variable, strip a trailing /
from the port number (if any exists).  This unbreaks
env HTTP_PROXY="http://localhost:3128/" portsnap fetch

While I'm here, list both the host and the port in the error message
output if getaddrinfo() fails, since either of them could be responsible
for the failure.

19 years agoAdd a missing EOL when printing "Latest snapshot on server is older
Colin Percival [Tue, 9 Aug 2005 02:50:14 +0000 (02:50 +0000)]
Add a missing EOL when printing "Latest snapshot on server is older
than what we already have" message. [1]

When operating with the undocumented --debug option, replace "xargs
phttpget" with "xargs -t phttpget", since that might conceivably help
debugging.

Noticed by: simon [1]

19 years agoUse atomic operations on runningbufspace.
Suleiman Souhlal [Mon, 8 Aug 2005 22:44:10 +0000 (22:44 +0000)]
Use atomic operations on runningbufspace.

PR: kern/84318
Submitted by: ade
MFC after: 3 days

19 years agoUse m_copypacket() which is an optimization of the common case
Andrew Thompson [Mon, 8 Aug 2005 22:21:55 +0000 (22:21 +0000)]
Use m_copypacket() which is an optimization of the common case
m_copym(m, 0, M_COPYALL, how).

This is required for strict alignment architectures where we align the IP
header in the input path but m_copym() will create an unaligned copy in
bridge_broadcast(). m_copypacket() preserves alignment of the first mbuf.

Noticed by: Petri Simolin
Approved by: mlaier (mentor)
MFC after: 3 days

19 years agoDrop in a WITNESS_WARN into SYSCTL_IN to make sure that we are
Christian S.J. Peron [Mon, 8 Aug 2005 21:06:42 +0000 (21:06 +0000)]
Drop in a WITNESS_WARN into SYSCTL_IN to make sure that we are
not holding any non-sleep-able-locks locks when copyin is called.
This gets executed un-conditionally since we have no function
to wire the buffer in this direction.

Pointed out by: truckman
MFC after: 1 week

19 years ago- Use callout_init_mtx() to close a small race between callout_stop() and
John Baldwin [Mon, 8 Aug 2005 21:03:54 +0000 (21:03 +0000)]
- Use callout_init_mtx() to close a small race between callout_stop() and
  the timeout routine.
- Fix locking in detach.
- Add locking in shutdown.
- Don't mess with the PCI command register in resume, the PCI bus driver
  already does this for us.
- Add locking to the non-serial ifmedia routines.
- Fix locking in ioctl.
- Remove spls and support for 4.x.

MFC after: 1 week

19 years agoAdd portsnap to the base system. This is a secure, easy to use,
Colin Percival [Mon, 8 Aug 2005 20:10:06 +0000 (20:10 +0000)]
Add portsnap to the base system.  This is a secure, easy to use,
fast, lightweight, and generally good way for users to keep their
ports trees up to date.

This is version 0.9.4 from the ports tree (sysutils/portsnap) with
the following changes:
1. The experimental pipelined http code is enabled.  No seatbelts
in -CURRENT. (^_^)
2. The working directory has moved from /usr/local/portsnap to
/var/db/portsnap (as discussed on -arch two days ago).
3. Portsnap now fetches a list of mirrors (distributed as DNS SRV
records) and selects one randomly.  This should help to avoid the
uneven loading which plagues the cvsup mirror network.
4. The license is now 2-clause BSD instead of 3-clause BSD.
5. Various incidental changes to make portsnap fit into the base
system's build mechanics.

X-MFC-After:    6.0-RELEASE
X-MFC-Before:   5.5-RELEASE
X-MFC-To: RELENG_6, RELENG_5, ports
discussed on:   -arch and several other places
"yes please" from:      simon, remko, flz, Diane Bruce
thinks this is a great idea:    bsdimp
Hopes he didn't forget any files:       cperciva

19 years agoreorder a couple of cases of void __inline to __inline void
Julian Elischer [Mon, 8 Aug 2005 20:08:44 +0000 (20:08 +0000)]
reorder a couple of cases of void __inline to  __inline void
to silence warnings from compilig with -W

Submitted by: sandvine inc
MFC after: 1 week

19 years agoMove the Hitler quotes and some references to him to the "offensive" file.
Jens Schweikhardt [Mon, 8 Aug 2005 19:58:26 +0000 (19:58 +0000)]
Move the Hitler quotes and some references to him to the "offensive" file.
I did not bother to sort them all. If you have a script, feel free.

19 years agoMerge the dev_clone and dev_clone_cred event handlers into a single
Robert Watson [Mon, 8 Aug 2005 19:55:32 +0000 (19:55 +0000)]
Merge the dev_clone and dev_clone_cred event handlers into a single
event handler, dev_clone, which accepts a credential argument.
Implementors of the event can ignore it if they're not interested,
and most do.  This avoids having multiple event handler types and
fall-back/precedence logic in devfs.

This changes the kernel API for /dev cloning, and may affect third
party packages containg cloning kernel modules.

Requested by: phk
MFC after: 3 days

19 years agoBe case-insensitive when dealing with algorithm names.
Pawel Jakub Dawidek [Mon, 8 Aug 2005 19:40:38 +0000 (19:40 +0000)]
Be case-insensitive when dealing with algorithm names.

PR: kern/84659
Submitted by: Benjamin Lutz <benlutz@datacomm.ch>

19 years agoAdd support for HP branded 2610SA
Paul Saab [Mon, 8 Aug 2005 19:39:58 +0000 (19:39 +0000)]
Add support for HP branded 2610SA

MFC after: 3 days
Approved by: scottl

19 years agoHa! This is a very interesting bug.
Pawel Jakub Dawidek [Mon, 8 Aug 2005 19:38:00 +0000 (19:38 +0000)]
Ha! This is a very interesting bug.
I copied strcasecmp() from userland to the kernel and it didn't worked!
I started to debug the problem and I find out that this line:

while (tolower(*us1) == tolower(*us2++)) {

was adding _3_ bytes to 'us2' pointer. Am I loosing my minds here?!...
No, in-kernel tolower() is a macro which uses its argument three times.
Bad tolower(9), no cookie.

19 years agoCheck to see if we wired the user-supplied buffers in SYSCTL_OUT, if
Christian S.J. Peron [Mon, 8 Aug 2005 18:54:35 +0000 (18:54 +0000)]
Check to see if we wired the user-supplied buffers in SYSCTL_OUT, if
the buffer has not been wired and we are holding any non-sleep-able locks,
drop a witness warning. If the buffer has not been wired, it is possible
that the writing of the data can sleep, especially if the page is not in
memory. This can result in a number of different locking issues, including
dead locks.

MFC after: 1 week
Discussed with: rwatson
Reviewed by: jhb

19 years agoSplit crypto tx+rx key indices and add a key index -> node mapping table:
Sam Leffler [Mon, 8 Aug 2005 18:46:36 +0000 (18:46 +0000)]
Split crypto tx+rx key indices and add a key index -> node mapping table:

Crypto changes:
o change driver/net80211 key_alloc api to return tx+rx key indices; a
  driver can leave the rx key index set to IEEE80211_KEYIX_NONE or set
  it to be the same as the tx key index (the former disables use of
  the key index in building the keyix->node mapping table and is the
  default setup for naive drivers by null_key_alloc)
o add cs_max_keyid to crypto state to specify the max h/w key index a
  driver will return; this is used to allocate the key index mapping
  table and to bounds check table loookups
o while here introduce ieee80211_keyix (finally) for the type of a h/w
  key index
o change crypto notifiers for rx failures to pass the rx key index up
  as appropriate (michael failure, replay, etc.)

Node table changes:
o optionally allocate a h/w key index to node mapping table for the
  station table using the max key index setting supplied by drivers
  (note the scan table does not get a map)
o defer node table allocation to lateattach so the driver has a chance
  to set the max key id to size the key index map
o while here also defer the aid bitmap allocation
o add new ieee80211_find_rxnode_withkey api to find a sta/node entry
  on frame receive with an optional h/w key index to use in checking
  mapping table; also updates the map if it does a hash lookup and the
  found node has a rx key index set in the unicast key; note this work
  is separated from the old ieee80211_find_rxnode call so drivers do
  not need to be aware of the new mechanism
o move some node table manipulation under the node table lock to close
  a race on node delete
o add ieee80211_node_delucastkey to do the dirty work of deleting
  unicast key state for a node (deletes any key and handles key map
  references)

Ath driver:
o nuke private sc_keyixmap mechansim in favor of net80211 support
o update key alloc api

These changes close several race conditions for the ath driver operating
in ap mode.  Other drivers should see no change.  Station mode operation
for ath no longer uses the key index map but performance tests show no
noticeable change and this will be fixed when the scan table is eliminated
with the new scanning support.

Tested by: Michal Mertl, avatar, others
Reviewed by: avatar, others
MFC after: 2 weeks

19 years agoWhile I find the Hitler quotes extremely questionable, I'm enough
Jens Schweikhardt [Mon, 8 Aug 2005 18:38:30 +0000 (18:38 +0000)]
While I find the Hitler quotes extremely questionable, I'm enough
of a pedant to properly spell the monster's first name.

19 years agoAdd strcasecmp() and strncasecmp() to libkern and connect to the build.
Pawel Jakub Dawidek [Mon, 8 Aug 2005 18:31:13 +0000 (18:31 +0000)]
Add strcasecmp() and strncasecmp() to libkern and connect to the build.

19 years agoRemove stray comma
Christian Brueffer [Mon, 8 Aug 2005 18:24:04 +0000 (18:24 +0000)]
Remove stray comma

19 years agoInclude <term.h> before #undef'ing key_clear.
Stefan Farfeleder [Mon, 8 Aug 2005 17:17:56 +0000 (17:17 +0000)]
Include <term.h> before #undef'ing key_clear.

19 years agoInsert a series of place-holder function pointers in mac_policy.h for
Robert Watson [Mon, 8 Aug 2005 16:09:33 +0000 (16:09 +0000)]
Insert a series of place-holder function pointers in mac_policy.h for
entry points that will be inserted over the life-time of the 6.x branch,
including for:

- New struct file labeling (void * already added to struct file), events,
  access control checks.
- Additional struct mount access control checks, internalization/
  externalization.
- mac_check_cap()
- System call enter/exit check and event.
- Socket and vnode ioctl entry points.

MFC after: 3 days

19 years agoTry best to keep a preempted thread at front of run queue, this seems
David Xu [Mon, 8 Aug 2005 14:20:10 +0000 (14:20 +0000)]
Try best to keep a preempted thread at front of run queue, this seems
improved performance a bit for some workloads, but still seeing interactive
lagging unless cpu idling race is fixed.

19 years agoRetire the last of the FreeBSD 4.x compat code from the mly driver.
Scott Long [Mon, 8 Aug 2005 12:23:27 +0000 (12:23 +0000)]
Retire the last of the FreeBSD 4.x compat code from the mly driver.

19 years agoRetire the FreeBSD 4.x compat code and __FreeBSD_version checks from the aac
Scott Long [Mon, 8 Aug 2005 12:19:19 +0000 (12:19 +0000)]
Retire the FreeBSD 4.x compat code and __FreeBSD_version checks from the aac
driver.

19 years agoRemove a bogus word
Brian Somers [Mon, 8 Aug 2005 12:16:53 +0000 (12:16 +0000)]
Remove a bogus word

19 years agoComplete the removal of __FreeBSD_version checks from the amr driver. The
Scott Long [Mon, 8 Aug 2005 12:16:21 +0000 (12:16 +0000)]
Complete the removal of __FreeBSD_version checks from the amr driver.  The
driver had advanced enough over the years that direct sharing of code with
FreeBSD 4.x was in no way possible anymore.

19 years agoBack-out previous commit - we need to skip logging socket when we start a
Pawel Jakub Dawidek [Mon, 8 Aug 2005 09:46:09 +0000 (09:46 +0000)]
Back-out previous commit - we need to skip logging socket when we start a
jail and external syslogd is listening in jail's chroot.

Pointed out by: csjp

While here, skip also "logpriv" socket.

19 years agoFix a few typos.
Stefan Farfeleder [Mon, 8 Aug 2005 07:08:35 +0000 (07:08 +0000)]
Fix a few typos.

19 years agoDon't forget to copy the sentinel into the `help' array. It's expected to
Stefan Farfeleder [Mon, 8 Aug 2005 07:03:50 +0000 (07:03 +0000)]
Don't forget to copy the sentinel into the `help' array.  It's expected to
be there.

Submitted by: Björn König
PR: 82381

19 years agouse ieee80211_iterate_nodes to retrieve station data; the previous
Sam Leffler [Mon, 8 Aug 2005 05:49:29 +0000 (05:49 +0000)]
use ieee80211_iterate_nodes to retrieve station data; the previous
code walked the list w/o locking

MFC after: 1 week

19 years agoFix typo so QUEUE_MACRO_DEBUG works again.
Poul-Henning Kamp [Mon, 8 Aug 2005 05:43:57 +0000 (05:43 +0000)]
Fix typo so QUEUE_MACRO_DEBUG works again.

PR: 84654
Submitted by: Antoine.Pelisse@xloling.org (apelisse@gmail.com)

19 years agoCleanup beacon/listen interval handling:
Sam Leffler [Mon, 8 Aug 2005 03:30:57 +0000 (03:30 +0000)]
Cleanup beacon/listen interval handling:
o separate configured beacon interval from listen interval; this
  avoids potential use of one value for the other (e.g. setting
  powersavesleep to 0 clobbers the beacon interval used in hostap
  or ibss mode)
o bounds check the beacon interval received in probe response and
  beacon frames and drop frames with bogus settings; not clear
  if we should instead clamp the value as any alteration would
  result in mismatched sta+ap configuration and probably be more
  confusing (don't want to log to the console but perhaps ok with
  rate limiting)
o while here up max beacon interval to reflect WiFi standard

Noticed by: Martin <nakal@nurfuerspam.de>
MFC after: 1 week

19 years agodescribe m_align
Sam Leffler [Mon, 8 Aug 2005 00:50:25 +0000 (00:50 +0000)]
describe m_align

19 years agoRemove a stale __FreeBSD_version check.
Scott Long [Sun, 7 Aug 2005 23:53:00 +0000 (23:53 +0000)]
Remove a stale __FreeBSD_version check.

19 years agoThe presence of a on __FreeBSD_version flagged some code that hasn't been in
Scott Long [Sun, 7 Aug 2005 23:51:53 +0000 (23:51 +0000)]
The presence of a on __FreeBSD_version flagged some code that hasn't been in
the right spot since the FreeBSD 3.x days, if not earlier.

19 years agoSkip jails which are already running and inform why.
Pawel Jakub Dawidek [Sun, 7 Aug 2005 23:19:02 +0000 (23:19 +0000)]
Skip jails which are already running and inform why.
We're checking for /var/run/jail_<name>.id file and if it exists, we don't
start the jail. It should be also safe in case of reboot(8), because
rc.d/cleanvar script is going to remove /var/run/jail_* files.

It helps to avoid potential mess when the same jail is started twice,
because of an administrator mistake (been there, done that).

MFC after: 1 week

19 years agoOther changes to this driver preclude its use on 4.x, so remove 4.x compat
Warner Losh [Sun, 7 Aug 2005 23:16:22 +0000 (23:16 +0000)]
Other changes to this driver preclude its use on 4.x, so remove 4.x compat
code elsewhere in the driver.

19 years agoWe don't need to skip /var/run/log socket, as syslogd is always started
Pawel Jakub Dawidek [Sun, 7 Aug 2005 23:10:32 +0000 (23:10 +0000)]
We don't need to skip /var/run/log socket, as syslogd is always started
after rc.d/cleanvar. And if we wanted to skip /var/run/log we still needed
to skip /var/run/logpriv, which wasn't implemented.

19 years agoAllow to give more than one jail's name, eg.:
Pawel Jakub Dawidek [Sun, 7 Aug 2005 22:38:41 +0000 (22:38 +0000)]
Allow to give more than one jail's name, eg.:

# /etc/rc.d/jail start www mail

MFC after: 3 days

19 years agoWhen support for 2MB/4MB pages was added in revision 1.148 an error was
Alan Cox [Sun, 7 Aug 2005 22:00:47 +0000 (22:00 +0000)]
When support for 2MB/4MB pages was added in revision 1.148 an error was
made in pmap_protect(): The pmap's resident count should not be reduced
unless mappings are removed.

The errant change to the pmap's resident count could result in a later
pmap_remove() failing to remove any mappings if the errant change has set
the pmap's resident count to zero.

19 years agoSync libedit with recent NetBSD developments. Including improvements to the
Stefan Farfeleder [Sun, 7 Aug 2005 20:55:59 +0000 (20:55 +0000)]
Sync libedit with recent NetBSD developments.  Including improvements to the
vi-mode, removal of clause 3, cleanups and the export of the tokenization
functions.

Not included: config.h, filecomplete.{c,h}

19 years agoThe libedit update made a const cast necessary.
Stefan Farfeleder [Sun, 7 Aug 2005 20:53:33 +0000 (20:53 +0000)]
The libedit update made a const cast necessary.

19 years agoAdd some more info about jail startup and shutdown.
Christian Brueffer [Sun, 7 Aug 2005 20:53:29 +0000 (20:53 +0000)]
Add some more info about jail startup and shutdown.

Submitted by: Jeremie Le Hen <jeremie@le-hen.org>
MFC after: 3 days

19 years agoRemove cat-pages without corresponding man-pages.
Alexander Leidinger [Sun, 7 Aug 2005 13:47:25 +0000 (13:47 +0000)]
Remove cat-pages without corresponding man-pages.

19 years agoAdd the recently removed old paper about pascal.
Alexander Leidinger [Sun, 7 Aug 2005 13:46:28 +0000 (13:46 +0000)]
Add the recently removed old paper about pascal.

19 years agoRecognize the SAB82532 in USIII machines.
Marius Strobl [Sun, 7 Aug 2005 13:37:25 +0000 (13:37 +0000)]
Recognize the SAB82532 in USIII machines.

19 years agoThe system tick _compare_ register of USIII CPUs and up is ASR25, not
Marius Strobl [Sun, 7 Aug 2005 13:21:00 +0000 (13:21 +0000)]
The system tick _compare_ register of USIII CPUs and up is ASR25, not
ASR24 (which is the system tick register).

19 years agoIt's actually 11 minutes when the machine is assumed to be down and removed
Suleiman Souhlal [Sun, 7 Aug 2005 11:48:44 +0000 (11:48 +0000)]
It's actually 11 minutes when the machine is assumed to be down and removed
from the output.

Obtained from: DragonFlyBSD

19 years agoAdd if_arl_load, if_axe_load, if_aue_load, if_cs_load, if_cue_load,
Kirill Ponomarev [Sun, 7 Aug 2005 09:41:53 +0000 (09:41 +0000)]
Add if_arl_load, if_axe_load, if_aue_load, if_cs_load, if_cue_load,
if_hme_load, if_nve_load, if_rue_load, if_udav_load to Networking
Drivers section.

Submitted by: matteo

19 years agoFix a comment.
Stefan Farfeleder [Sun, 7 Aug 2005 09:11:38 +0000 (09:11 +0000)]
Fix a comment.

Submitted by: Liam J. Foy

19 years agoTell nls_setlocale() the very locale name from command line option,
R. Imura [Sun, 7 Aug 2005 08:46:56 +0000 (08:46 +0000)]
Tell nls_setlocale() the very locale name from command line option,
rather than using optarg variable which would be allways NULL.

19 years agoRevert the replacement of realloc() with reallocf() (el.h:1.2, map.c:1.5 and
Stefan Farfeleder [Sun, 7 Aug 2005 08:35:39 +0000 (08:35 +0000)]
Revert the replacement of realloc() with reallocf() (el.h:1.2, map.c:1.5 and
tokenizer.c:1.3).  Contrary to the commit log there were no memory leaks,
but the change introduced a bug because the free'd pointer was not zeroed
and calling the appropriate _end() function would call free() a second time.

19 years agoExport a routine, kobj_machdep_init(), that allows platforms
Peter Grehan [Sun, 7 Aug 2005 02:20:35 +0000 (02:20 +0000)]
Export a routine, kobj_machdep_init(), that allows platforms
to use the kobj subsystem as soon at mutex_init() has been called
instead of having to wait for the SI_SUB_LOCK sysinit.

Reviewed by: dfr

19 years agoRevert last change, I will turn ULE on as default after 6.0-R.
David Xu [Sat, 6 Aug 2005 23:05:48 +0000 (23:05 +0000)]
Revert last change, I will turn ULE on as default after 6.0-R.

Noticed by: scottl

19 years agoFresh dust.
Ruslan Ermilov [Sat, 6 Aug 2005 21:11:57 +0000 (21:11 +0000)]
Fresh dust.

19 years agoImprove SMP support:
Marcel Moolenaar [Sat, 6 Aug 2005 20:28:19 +0000 (20:28 +0000)]
Improve SMP support:
o  Allocate a VHPT per CPU. The VHPT is a hash table that the CPU
   uses to look up translations it can't find in the TLB. As such,
   the VHPT serves as a level 1 cache (the TLB being a level 0 cache)
   and best results are obtained when it's not shared between CPUs.
   The collision chain (i.e. the hash bucket) is shared between CPUs,
   as all buckets together constitute our collection of PTEs. To
   achieve this, the collision chain does not point to the first PTE
   in the list anymore, but to a hash bucket head structure. The
   head structure contains the pointer to the first PTE in the list,
   as well as a mutex to lock the bucket. Thus, each bucket is locked
   independently of each other. With at least 1024 buckets in the VHPT,
   this provides for sufficiently finei-grained locking to make the
   ssolution scalable to large SMP machines.
o  Add synchronisation to the lazy FP context switching. We do this
   with a seperate per-thread lock. On SMP machines the lazy high FP
   context switching without synchronisation caused inconsistent
   state, which resulted in a panic. Since the use of the high FP
   registers is not common, it's possible that races exist. The ia64
   package build has proven to be a good stress test, so this will
   get plenty of exercise in the near future.
o  Don't use the local ID of the processor we want to send the IPI to
   as the argument to ipi_send(). use the struct pcpu pointer instead.
   The reason for this is that IPI delivery is unreliable. It has been
   observed that sending an IPI to a CPU causes it to receive a stray
   external interrupt. As such, we need a way to make the delivery
   reliable. The intended solution is to queue requests in the target
   CPU's per-CPU structure and use a single IPI to inform the CPU that
   there's a new entry in the queue. If that IPI gets lost, the CPU
   can check it's queue at any convenient time (such as for each
   clock interrupt). This also allows us to send requests to a CPU
   without interrupting it, if such would be beneficial.

With these changes SMP is almost working. There are still some random
process crashes and the machine can hang due to having the IPI lost
that deals with the high FP context switch.

The overhead of introducing the hash bucket head structure results
in a performance degradation of about 1% for UP (extra pointer
indirection). This is surprisingly small and is offset by gaining
reasonably/good scalable SMP support.

19 years agoControl rcs inclusion with NO_RCS insted of NO_TOOLCHAIN
Poul-Henning Kamp [Sat, 6 Aug 2005 20:23:13 +0000 (20:23 +0000)]
Control rcs inclusion with NO_RCS insted of NO_TOOLCHAIN

19 years agoReduce the default MAXCPU from 16 to 4. This is in preparation of
Marcel Moolenaar [Sat, 6 Aug 2005 19:59:23 +0000 (19:59 +0000)]
Reduce the default MAXCPU from 16 to 4. This is in preparation of
allocating a VHPT per CPU. Since we don't yet know how many CPUs
are actually in the system at the time we need to allocate the
VHPTs, we allocate for MAXCPU processors. This can result in a
lot of wasted space for 2-way machines. So, for now, limit MAXCPU
to something smaller until we have something more dynamic.

19 years agoFor ia64_ptc_{e,g,ga,l}(), use instruction serialization. We
Marcel Moolenaar [Sat, 6 Aug 2005 19:54:31 +0000 (19:54 +0000)]
For ia64_ptc_{e,g,ga,l}(), use instruction serialization. We
typically don't know what the TLB described and need to assume
that it affects the fetching of instructions.