]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
20 years agoMove #ifdef _KERNEL higher in socketvar.h to cover various socket
rwatson [Sat, 12 Jun 2004 22:09:34 +0000 (22:09 +0000)]
Move #ifdef _KERNEL higher in socketvar.h to cover various socket
buffer related macros.

20 years agos/mbps/Mbps/
cperciva [Sat, 12 Jun 2004 21:41:41 +0000 (21:41 +0000)]
s/mbps/Mbps/
We don't support any 10 millibit-per-second network cards.

PR: docs/67719
Submitted by: Linh Pham
MFC after: 1 week

20 years agoAdd gvinum, the geom_vinum userland tool.
le [Sat, 12 Jun 2004 21:22:47 +0000 (21:22 +0000)]
Add gvinum, the geom_vinum userland tool.

20 years agoAdd a module directory for geom_vinum.
le [Sat, 12 Jun 2004 21:18:40 +0000 (21:18 +0000)]
Add a module directory for geom_vinum.

20 years agoAdd a first version of a GEOMified vinum.
le [Sat, 12 Jun 2004 21:16:10 +0000 (21:16 +0000)]
Add a first version of a GEOMified vinum.

20 years agoMissed directory in previous commit; need to hold SOCK_LOCK(so)
rwatson [Sat, 12 Jun 2004 20:59:48 +0000 (20:59 +0000)]
Missed directory in previous commit; need to hold SOCK_LOCK(so)
before calling sotryfree().

-- Body of earlier bulk commit this belonged with --

  Log:
  Extend coverage of SOCK_LOCK(so) to include so_count, the socket
  reference count:

  - Assert SOCK_LOCK(so) macros that directly manipulate so_count:
    soref(), sorele().

  - Assert SOCK_LOCK(so) in macros/functions that rely on the state of
    so_count: sofree(), sotryfree().

  - Acquire SOCK_LOCK(so) before calling these functions or macros in
    various contexts in the stack, both at the socket and protocol
    layers.

  - In some cases, perform soisdisconnected() before sotryfree(), as
    this could result in frobbing of a non-present socket if
    sotryfree() actually frees the socket.

  - Note that sofree()/sotryfree() will release the socket lock even if
    they don't free the socket.

  Submitted by:   sam
  Sponsored by:   FreeBSD Foundation
  Obtained from:  BSD/OS

20 years agoExtend coverage of SOCK_LOCK(so) to include so_count, the socket
rwatson [Sat, 12 Jun 2004 20:47:32 +0000 (20:47 +0000)]
Extend coverage of SOCK_LOCK(so) to include so_count, the socket
reference count:

- Assert SOCK_LOCK(so) macros that directly manipulate so_count:
  soref(), sorele().

- Assert SOCK_LOCK(so) in macros/functions that rely on the state of
  so_count: sofree(), sotryfree().

- Acquire SOCK_LOCK(so) before calling these functions or macros in
  various contexts in the stack, both at the socket and protocol
  layers.

- In some cases, perform soisdisconnected() before sotryfree(), as
  this could result in frobbing of a non-present socket if
  sotryfree() actually frees the socket.

- Note that sofree()/sotryfree() will release the socket lock even if
  they don't free the socket.

Submitted by: sam
Sponsored by: FreeBSD Foundation
Obtained from: BSD/OS

20 years agoIn a multiprocessor, the PG_W bit in the pte must be changed atomically.
alc [Sat, 12 Jun 2004 20:01:48 +0000 (20:01 +0000)]
In a multiprocessor, the PG_W bit in the pte must be changed atomically.
Otherwise, the setting of the PG_M bit by one processor could be lost if
another processor is simultaneously changing the PG_W bit.

Reviewed by: tegge@

20 years agoSwitch to using the "neworder" for rotating log files, by default. The
gad [Sat, 12 Jun 2004 19:53:08 +0000 (19:53 +0000)]
Switch to using the "neworder" for rotating log files, by default.  The
main advantage of this is that daemon's are only signalled once per run,
instead of once for each file that is rotated.

MFC after: 2 weeks

20 years agoAdd an additional queue which will be "owned by the driver". This allows to
mlaier [Sat, 12 Jun 2004 18:47:24 +0000 (18:47 +0000)]
Add an additional queue which will be "owned by the driver". This allows to
rig a PREPEND macro for ALTQ as the POLL/DEQUEUE semantic is very bad in
terms of locking. We make this a full functional queue to allow "bulk
dequeue" which will further reduce the locking overhead (for non-altq
enabled devices). Drivers will access this via the following macros, which
will show up in <net/if_var.h> once we expose ALTQ to the build:

IFQ_DRV_DEQUEUE(ifq, m) - takes a mbuf off the queue (driver queue first)
IFQ_DRV_PREPEND(ifq, m) - pushes a mbuf back to the driver queue
IFQ_DRV_PURGE(ifq) - drops all packets in both queues
IFQ_DRV_IS_EMPTY(ifq) - checks for pending mbufs in either queue

One has to make sure that the first three are protected by a driver mutex.
At the moment most network drivers still require Giant, so this is not an
issue. Even those that have thier own mutex usually hold it in if_start and
the like, so this requirement is almost always satisfied.

This evolved from a discussion with Andrew Gallatin.

20 years agoWhitespace-only restyling of socket reference count macros.
rwatson [Sat, 12 Jun 2004 18:37:29 +0000 (18:37 +0000)]
Whitespace-only restyling of socket reference count macros.

20 years agoIntroduce a mutex into struct sockbuf, sb_mtx, which will be used to
rwatson [Sat, 12 Jun 2004 16:08:41 +0000 (16:08 +0000)]
Introduce a mutex into struct sockbuf, sb_mtx, which will be used to
protect fields in the socket buffer.  Add accessor macros to use the
mutex (SOCKBUF_*()).  Initialize the mutex in soalloc(), and destroy
it in sodealloc().  Add addition, add SOCK_*() access macros which
will protect most remaining fields in the socket; for the time being,
use the receive socket buffer mutex to implement socket level locking
to reduce memory overhead.

Submitted by: sam
Sponosored by: FreeBSD Foundation
Obtained from: BSD/OS

20 years agoFix registration of loadable line disciplines.
phk [Sat, 12 Jun 2004 12:31:42 +0000 (12:31 +0000)]
Fix registration of loadable line disciplines.

This should make watch(8)/snp(4) work again.

20 years agoGroup tinderbox results by config name. Skip configs whose names start
des [Sat, 12 Jun 2004 11:23:04 +0000 (11:23 +0000)]
Group tinderbox results by config name.  Skip configs whose names start
with "update_".

20 years agoInclude the config name in the log file name.
des [Sat, 12 Jun 2004 11:22:21 +0000 (11:22 +0000)]
Include the config name in the log file name.

20 years agoCheck pending signals, if there is signal will be unblocked by
davidxu [Sat, 12 Jun 2004 07:40:01 +0000 (07:40 +0000)]
Check pending signals, if there is signal will be unblocked by
sigsuspend, thread shouldn't wait, in old code, it may be
ignored.
When a signal handler is invoked in sigsuspend, thread gets
two different signal masks, one is in thread structure,
sigprocmask() can retrieve it, another is in ucontext
which is a third parameter of signal handler, the former is
the result of sigsuspend mask ORed with sigaction's sa_mask
and current signal, the later is the mask in thread structure
before sigsuspend is called. After signal handler is called,
the mask in ucontext should be copied into thread structure,
and becomes CURRENT signal mask, then sigsuspend returns to
user code.

Reviewed by: deischen
Tested by: Sean McNeil <sean@mcneil.com>

20 years agoRemove an unused #include.
alc [Sat, 12 Jun 2004 06:03:27 +0000 (06:03 +0000)]
Remove an unused #include.

20 years agoWhen autosense is retrieved, tell CAM about it instead of juust pretending
scottl [Sat, 12 Jun 2004 05:19:17 +0000 (05:19 +0000)]
When autosense is retrieved, tell CAM about it instead of juust pretending
that the command succeeded.  Sheesh!  This makes CDROMs no longer cause an
instant panic at boot.  Thanks to Jake Burkholder for providing a remote
test setup.
Also make device resets work, thanks to another typo.

20 years agoThe references to scalbn and scalbnf should be scalb and scalbf.
das [Sat, 12 Jun 2004 04:40:47 +0000 (04:40 +0000)]
The references to scalbn and scalbnf should be scalb and scalbf.
(The former are actually useful, and ieee_test(3) only documents
functions that aren't.)  Add a sentence describing the domain of
scalb() and scalbf().

20 years agoCorrect typo from previous commit.
scottl [Sat, 12 Jun 2004 03:23:37 +0000 (03:23 +0000)]
Correct typo from previous commit.

20 years agoBack out 1.23 until I figure out why it causes Netra t1 100 to no longer
marius [Sat, 12 Jun 2004 02:23:06 +0000 (02:23 +0000)]
Back out 1.23 until I figure out why it causes Netra t1 100 to no longer
pass any traffic. Unfortunately this means no full-duplex link with auto-
negotiation on hme(4) using DP83840A PHYs again.
I really thought I had tested this also on a Netra t1 100...

20 years agoFreeBSD-ify ALTQ:
mlaier [Sat, 12 Jun 2004 00:57:20 +0000 (00:57 +0000)]
FreeBSD-ify ALTQ:
 - add locking
 - disable ALTQ3_COMPAT by default (do not remove the code to keep the diff
   towards KAME small)
 - put some more code under ALTQ3 conditional compilation as it should be
 - account for if_xname
 - some more minor compile fixes

As people started wondering:
The strange path layout "altq/altq" is there to avoid "-Isys/contrib" and
make it "-Isys/contrib/altq" instead, as we will need at least <altq/altq.h>
and <altq/if_altq.h> for kernel compilation.

The "freebsd4_..." in the privious commit is just the best tag name in the
KAME tree I could find to classify this in order to track its history. It
does *not* mean that this will go to 4-STABLE or anything of that kind.

20 years agoThis commit was generated by cvs2svn to compensate for changes in r130365,
mlaier [Sat, 12 Jun 2004 00:10:21 +0000 (00:10 +0000)]
This commit was generated by cvs2svn to compensate for changes in r130365,
which included commits to RCS files with non-trunk default branches.

20 years agoImport parts of the ALTQ framework from latest KAME snapshot (which is up to
mlaier [Sat, 12 Jun 2004 00:10:21 +0000 (00:10 +0000)]
Import parts of the ALTQ framework from latest KAME snapshot (which is up to
HEAD at this point). This will not exactly live in a vendor branch, but have
the vendor backing to make it easier to exchange diffs.

This will be followed by a diff which takes most of the .c files off the
vendor branch in order to:
 - add locking
 - disable ALTQ3_COMPAT code (which is outdated and "un-lockable")

There is work in progress to refine the configuration API. Import this "as
is" now to have more exposure time before 5-STABLE.

This is only the import, it will be some more days until you will actually
be able to compile ALTQ support into your kernel so don't hold your breath.
HEADUPs will be posted on current@ and net@ before this is actually enabled.

No-objection: re(scottl), core(rwatson)

20 years agoUse tabs instead of spaces between #define and macro name; a merge
rwatson [Fri, 11 Jun 2004 22:39:42 +0000 (22:39 +0000)]
Use tabs instead of spaces between #define and macro name; a merge
mistake as they are in rwatson_netperf.

20 years agoModify ip fw so that whenever UID or GID constraints exist in a
csjp [Fri, 11 Jun 2004 22:17:14 +0000 (22:17 +0000)]
Modify ip fw so that whenever UID or GID constraints exist in a
ruleset, the pcb is looked up once per ipfw_chk() activation.

This is done by extracting the required information out of the PCB
and caching it to the ipfw_chk() stack. This should greatly reduce
PCB looking contention and speed up the processing of UID/GID based
firewall rules (especially with large UID/GID rulesets).

Some very basic benchmarks were taken which compares the number
of in_pcblookup_hash(9) activations to the number of firewall
rules containing UID/GID based contraints before and after this patch.

The results can be viewed here:
o http://people.freebsd.org/~csjp/ip_fw_pcb.png

Reviewed by: andre, luigi, rwatson
Approved by: bmilekic (mentor)

20 years agoNeither pmap_enter() nor pmap_enter_quick() should create pv entries for
alc [Fri, 11 Jun 2004 20:11:41 +0000 (20:11 +0000)]
Neither pmap_enter() nor pmap_enter_quick() should create pv entries for
unmanaged pages.

Tested by: marcel@

20 years agoMove uma_small_alloc() and uma_small_free() out of the pmap and into their
alc [Fri, 11 Jun 2004 19:55:56 +0000 (19:55 +0000)]
Move uma_small_alloc() and uma_small_free() out of the pmap and into their
own machine-dependent file.  This makes alpha consistent with amd64, ia64,
and powerpc.

20 years agoStyle cleanup.
schweikh [Fri, 11 Jun 2004 18:47:44 +0000 (18:47 +0000)]
Style cleanup.

20 years agoFix for a problem seen only on 6xxx series controllers, where-in the
vkashyap [Fri, 11 Jun 2004 18:42:44 +0000 (18:42 +0000)]
Fix for a problem seen only on 6xxx series controllers, where-in the
driver tries to submit the same request repeatedly, on finding the
controller cmd queue to be full.

Submitted by:ps, vkashyap
Reviewed by:re
Approved by:re

20 years agoGah! Plug a mbuf leak I introduced in the last commit.
bmilekic [Fri, 11 Jun 2004 18:17:25 +0000 (18:17 +0000)]
Gah! Plug a mbuf leak I introduced in the last commit.

I don the pointy-hat.

Problem reported by: Peter Holm <pho@>

20 years ago* Fix typo in comment.
schweikh [Fri, 11 Jun 2004 17:51:37 +0000 (17:51 +0000)]
* Fix typo in comment.
* remove extraneous semicolon between function definitions.
* vm_offset_t is not a pointer, so return 0, not NULL. This
  fixes two warnings.

20 years agoShuffle some code around.
julian [Fri, 11 Jun 2004 17:48:20 +0000 (17:48 +0000)]
Shuffle some code around.

20 years agoDocument the STRIPBIN environment variable. This includes adding a
marcel [Fri, 11 Jun 2004 17:25:37 +0000 (17:25 +0000)]
Document the STRIPBIN environment variable. This includes adding a
forward reference from where strip(1) is being mention (-s option).

PR: bin/28620

20 years agoSperate out the MD parts of kvm-fbsd to get rid of the #ifdef maze.
obrien [Fri, 11 Jun 2004 16:09:38 +0000 (16:09 +0000)]
Sperate out the MD parts of kvm-fbsd to get rid of the #ifdef maze.
Also quiet some warnings by tweaking the included headers.

20 years agoAdd sha1 and rmd160 checksum tools.
eik [Fri, 11 Jun 2004 16:07:02 +0000 (16:07 +0000)]
Add sha1 and rmd160 checksum tools.

Since the algorithms are already supported in libmd,
the size increase is small when a dynamic root is used.

Approved by: joerg, ru
MFC after: 2 weeks

20 years agoImport the ttys file for arm.
cognet [Fri, 11 Jun 2004 15:37:49 +0000 (15:37 +0000)]
Import the ttys file for arm.
make TARGET_ARCH=arm world now works (but still with external patches for
the toolchain bits).

20 years agoMake the XPT_CALC_GEOMETRY op dependent on the sc_extended_geometry flag
scottl [Fri, 11 Jun 2004 15:33:20 +0000 (15:33 +0000)]
Make the XPT_CALC_GEOMETRY op dependent on the sc_extended_geometry flag
that is set in the bus front-end.

20 years agoCOMPAT_SUNOS is gone.
phk [Fri, 11 Jun 2004 11:58:07 +0000 (11:58 +0000)]
COMPAT_SUNOS is gone.

20 years agoMake this look less dubious :-)
phk [Fri, 11 Jun 2004 11:43:46 +0000 (11:43 +0000)]
Make this look less dubious :-)

Spotted by: ru

20 years agoCast the arguments to make_h_number() to uintmax_t before multiplying
joerg [Fri, 11 Jun 2004 11:41:33 +0000 (11:41 +0000)]
Cast the arguments to make_h_number() to uintmax_t before multiplying
them...  Otherwise the result will be truncated anyway.

20 years agoDeorbit COMPAT_SUNOS.
phk [Fri, 11 Jun 2004 11:16:26 +0000 (11:16 +0000)]
Deorbit COMPAT_SUNOS.

We inherited this from the sparc32 port of BSD4.4-Lite1.  We have neither
a sparc32 port nor a SunOS4.x compatibility desire these days.

20 years agoMerge boot0 and boot0sio so they behave the same.
phk [Fri, 11 Jun 2004 09:45:18 +0000 (09:45 +0000)]
Merge boot0 and boot0sio so they behave the same.

20 years agoBack out the last change as that broke some SATA devices.
sos [Fri, 11 Jun 2004 07:39:15 +0000 (07:39 +0000)]
Back out the last change as that broke some SATA devices.
Now we are cleaing up remove a few lines of unused code.

20 years agoReduce the number of preallocated pv entries and lpte entries in
alc [Fri, 11 Jun 2004 04:24:35 +0000 (04:24 +0000)]
Reduce the number of preallocated pv entries and lpte entries in
pmap_init().

Tested by: marcel@

20 years agoRemove unneeded Giant acquisition in divert_packet(), which is
rwatson [Fri, 11 Jun 2004 04:06:51 +0000 (04:06 +0000)]
Remove unneeded Giant acquisition in divert_packet(), which is
left over from debug.mpsafenet affecting only the forwarding
plane.  Giant is now acquired in the ithread/netisr or in the
system call code.

20 years agoConstify raw_sendspace and raw_recvspace, as they're not mutable.
rwatson [Fri, 11 Jun 2004 03:52:56 +0000 (03:52 +0000)]
Constify raw_sendspace and raw_recvspace, as they're not mutable.

20 years agoSwitch to conditionally acquiring and dropping Giant around calls into
rwatson [Fri, 11 Jun 2004 03:47:21 +0000 (03:47 +0000)]
Switch to conditionally acquiring and dropping Giant around calls into
ifp->if_output() basedd on debug.mpsafenet.  That way once bpfwrite()
can be called without Giant, it will acquire Giant (if desired) before
entering the network stack.

20 years agoUn-staticize 'dst' sockaddr in the stack of bpfwrite() to prevent
rwatson [Fri, 11 Jun 2004 03:45:42 +0000 (03:45 +0000)]
Un-staticize 'dst' sockaddr in the stack of bpfwrite() to prevent
the need to synchronize access to the structure.  I believe this
should fit into the stack under the necessary circumstances, but
if not we can either add synchronization or use a thread-local
malloc for the duration.

20 years agoLock down parallel router_info list for tracking multicast IGMP
rwatson [Fri, 11 Jun 2004 03:42:37 +0000 (03:42 +0000)]
Lock down parallel router_info list for tracking multicast IGMP
versions of various routers seen:

- Introduce igmp_mtx.
- Protect global variable 'router_info_head' and list fields
  in struct router_info with this mutex, as well as
  igmp_timers_are_running.
- find_rti() asserts that the caller acquires igmp_mtx.
- Annotate a failure to check the return value of
  MALLOC(..., M_NOWAIT).

20 years agoChange defualt time zone from GMT to UTC. This will not be MFC-ed, and
kensmith [Fri, 11 Jun 2004 03:34:02 +0000 (03:34 +0000)]
Change defualt time zone from GMT to UTC.  This will not be MFC-ed, and
was done before 5-STABLE on purpose...

20 years agoMerge from DRI CVS as of 2004-05-26. Most of the meat is new PCI IDs and a new
anholt [Fri, 11 Jun 2004 03:26:59 +0000 (03:26 +0000)]
Merge from DRI CVS as of 2004-05-26.  Most of the meat is new PCI IDs and a new
packet for Radeon.

20 years agoAdd some fenv.h regression tests.
das [Fri, 11 Jun 2004 03:22:34 +0000 (03:22 +0000)]
Add some fenv.h regression tests.

20 years agoShift the FPSR contents by the correct amount so feupdateenv() raises
das [Fri, 11 Jun 2004 02:35:30 +0000 (02:35 +0000)]
Shift the FPSR contents by the correct amount so feupdateenv() raises
the correct exceptions from the old environment.

20 years agoInsert a missing '~' in feholdexcept(), so that it correctly clears
das [Fri, 11 Jun 2004 02:35:19 +0000 (02:35 +0000)]
Insert a missing '~' in feholdexcept(), so that it correctly clears
the exception flags in the mxcsr as well as the x87 FPU.

20 years agoMake sysctl_wire_old_buffer() respect ENOMEM from vslock() by marking
green [Fri, 11 Jun 2004 02:20:37 +0000 (02:20 +0000)]
Make sysctl_wire_old_buffer() respect ENOMEM from vslock() by marking
the valid length as 0.  This prevents vsunlock() from removing a system
wire from memory that was not successfully wired (by us).

Submitted by: tegge

20 years agoOops: gtar's --dereference should be a synonym for bsdtar's -L, not -H.
kientzle [Fri, 11 Jun 2004 01:35:56 +0000 (01:35 +0000)]
Oops: gtar's --dereference should be a synonym for bsdtar's -L, not -H.

Pointed out by: devel/nspr port
Thanks to: Kris Kennaway

20 years agoRevise previous commit - I managed to mess up a 1-line change and broke
peter [Fri, 11 Jun 2004 00:35:29 +0000 (00:35 +0000)]
Revise previous commit - I managed to mess up a 1-line change and broke
amd64 world.  The csu code evalues this Makefile with a different origin.

20 years agoThe gcc/config/i386/freebsd64.h file neglects to override the default
peter [Thu, 10 Jun 2004 22:18:33 +0000 (22:18 +0000)]
The gcc/config/i386/freebsd64.h file neglects to override the default
(bogus, application name space) mcount function name on amd64.  Override
it here instead.

I've done it this way to avoid touching gcc source while 3.4 is in
progress, and this is the smallest, lowest impact I could come up with.
Adding a patch touches about 10-14 lines of Makefile, this touches only 1.
This will likely go away with the 3.4 import.

I spoke with Alexander about this a few days ago, but waited until after
sorting out some of the other bugs in the userland profiling.

20 years agoRemove second <sys/cdefs.h> and __FBSDID.
marius [Thu, 10 Jun 2004 22:15:51 +0000 (22:15 +0000)]
Remove second <sys/cdefs.h> and __FBSDID.

20 years agoArgh. Add the mini-stack-frame back in for mcount's benefit for syscall
peter [Thu, 10 Jun 2004 22:02:26 +0000 (22:02 +0000)]
Argh. Add the mini-stack-frame back in for mcount's benefit for syscall
stubs.

20 years agoMake profiling work for varargs functions.. %al is an additional argument
peter [Thu, 10 Jun 2004 22:00:58 +0000 (22:00 +0000)]
Make profiling work for varargs functions.. %al is an additional argument
which indicates the number of xmm registers used in the varargs.  This
stops the explosion that happened when profiling printf() etc.

20 years agoAdd a first version of a pcf(4) front-end for the Sun i2c devices ("i2c"
marius [Thu, 10 Jun 2004 21:56:52 +0000 (21:56 +0000)]
Add a first version of a pcf(4) front-end for the Sun i2c devices ("i2c"
is the actual name here) on EBus and which are PCF8584 (on systems having
a boot-bus controller the i2c are said to not be a PCF8584). Similar to the
SUNW,envctrl devices, onboard slaves for monitoring fans, temperatures and
such hang off of these i2c devices. But there's also stuff like EEPROMs
housing the hostid of the system and the boards usally have a connector to
add custom slave devices (on CP1500 there's actually a second PCF8584 with
its own I2C bus for these).
This driver already works fine but I'm not yet sure if access to the slave
devices on CP1400/CP1500 marked as "reserved for factory use" in the docs
should be blocked (most likely these are the voltage controllers wich aren't
meant to be controller by software and even not by the firmware). Once the
issues with polled mode are fixed in the common pcf(4) part in pcf.c, this
front-end should probably honour the poll-mode property of the i2c devices.
Tested on Ultra AXe and CP1500 (Netra t1 100).

OK'ed by: joerg, nsouch

20 years ago- Add missing <sys/module.h>.
marius [Thu, 10 Jun 2004 21:53:04 +0000 (21:53 +0000)]
- Add missing <sys/module.h>.
- Use "envctrl" as the name when registering this module rather than "pcf";
  we can't have "pcf" as the name for all pcf(4) front-ends or we would get
  conflicts.

OK'ed by: joerg

20 years ago- Add missing <sys/module.h>.
marius [Thu, 10 Jun 2004 21:51:39 +0000 (21:51 +0000)]
- Add missing <sys/module.h>.
- s,pcf_,pcf_isa, to better reflect the purpose of this front-end and to
  avoid conflicts.
- Don't use this front-end for attaching to EBus, declaring it as an EBus
  driver was a cut&paste accident according to joerg.

OK'ed by: joerg, nsouch

20 years ago- #define\tFOO\tBAR
marius [Thu, 10 Jun 2004 21:48:51 +0000 (21:48 +0000)]
- #define\tFOO\tBAR
- Remove two tabs from an otherwise empty line.

OK'ed by: nsouch

20 years agoIntroduce a subsystem lock around UNIX domain sockets in order to protect
rwatson [Thu, 10 Jun 2004 21:34:38 +0000 (21:34 +0000)]
Introduce a subsystem lock around UNIX domain sockets in order to protect
global and allocated variables.  This strategy is derived from work
originally developed by BSDi for BSD/OS, and applied to FreeBSD by Sam
Leffler:

- Add unp_mtx, a global mutex which will protect all UNIX domain socket
  related variables, structures, etc.

- Add UNP_LOCK(), UNP_UNLOCK(), UNP_LOCK_ASSERT() macros.

- Acquire unp_mtx on entering most UNIX domain socket code,
  drop/re-acquire around calls into VFS, and release it on return.

- Avoid performing sodupsockaddr() while holding the mutex, so in general
  move to allocating storage before acquiring the mutex to copy the data.

- Make a stack copy of the xucred rather than copying out while holding
  unp_mtx.  Copy the peer credential out after releasing the mutex.

- Add additional assertions of vnode locks following VOP_CREATE().

A few notes:

- Use of an sx lock for the file list mutex may cause problems with regard
  to unp_mtx when garbage collection passed file descriptors.

- The locking in unp_pcblist() for sysctl monitoring is correct subject to
  the unpcb zone not returning memory for reuse by other subsystems
  (consistent with similar existing concerns).

- Sam's version of this change, as with the BSD/OS version, made use of
  both a global lock and per-unpcb locks.  However, in practice, the
  global lock covered all accesses, so I have simplified out the unpcb
  locks in the interest of getting this merged faster (reducing the
  overhead but not sacrificing granularity in most cases).  We will want
  to explore possibilities for improving lock granularity in this code in
  the future.

Submitted by: sam
Sponsored by: FreeBSD Foundatiuon
Obtained from: BSD/OS 5 snapshot provided by BSDi

20 years agoInsta-MFi386: ignore disabled cpu apic id's entirely
peter [Thu, 10 Jun 2004 21:30:08 +0000 (21:30 +0000)]
Insta-MFi386: ignore disabled cpu apic id's entirely

20 years agoCorrect assorted typos and grammos.
schweikh [Thu, 10 Jun 2004 21:03:34 +0000 (21:03 +0000)]
Correct assorted typos and grammos.

20 years ago- Use the correct devclass name ("acpi" vs "ACPI") to detect if acpi0 is
jhb [Thu, 10 Jun 2004 20:43:04 +0000 (20:43 +0000)]
- Use the correct devclass name ("acpi" vs "ACPI") to detect if acpi0 is
  present and thus that the PnPBIOS probe should be skipped instead of
  having ACPI zero out the PnPBIOStable pointer.
- Make the PnPBIOStable pointer static to i386/i386/bios.c now that that is
  the only place it is used.

20 years agoRemove atdevbase and replace it's remaining uses with direct references to
jhb [Thu, 10 Jun 2004 20:31:00 +0000 (20:31 +0000)]
Remove atdevbase and replace it's remaining uses with direct references to
KERNBASE instead.

20 years agoinit_tables() must be run after sys/net/route.c:route_init().
ru [Thu, 10 Jun 2004 20:20:37 +0000 (20:20 +0000)]
init_tables() must be run after sys/net/route.c:route_init().

20 years agoCompletely ignore disabled CPU entries as their APIC IDs tend to be
jhb [Thu, 10 Jun 2004 20:03:46 +0000 (20:03 +0000)]
Completely ignore disabled CPU entries as their APIC IDs tend to be
invalid.

20 years agoDie if make buildworld fails -- don't wait 'till installworld can't find
brian [Thu, 10 Jun 2004 19:33:26 +0000 (19:33 +0000)]
Die if make buildworld fails -- don't wait 'till installworld can't find
what it needs.

20 years agoTurn cvs back on after import; that was less painful than I expected.
peter [Thu, 10 Jun 2004 19:17:20 +0000 (19:17 +0000)]
Turn cvs back on after import; that was less painful than I expected.

20 years agoMerge 1.11.15+ -> 1.11.17 changes onto mainline. I've left cvs.1 alone
peter [Thu, 10 Jun 2004 19:12:50 +0000 (19:12 +0000)]
Merge 1.11.15+ -> 1.11.17 changes onto mainline.  I've left cvs.1 alone
for now.

20 years agoThis commit was generated by cvs2svn to compensate for changes in r130303,
peter [Thu, 10 Jun 2004 19:05:38 +0000 (19:05 +0000)]
This commit was generated by cvs2svn to compensate for changes in r130303,
which included commits to RCS files with non-trunk default branches.

20 years agoImport cvs-1.11.17 onto vendor branch.
peter [Thu, 10 Jun 2004 19:05:38 +0000 (19:05 +0000)]
Import cvs-1.11.17 onto vendor branch.

20 years agoTurn off cvs while import/merging.
peter [Thu, 10 Jun 2004 19:02:42 +0000 (19:02 +0000)]
Turn off cvs while import/merging.

20 years agoFree tty at detach().
rik [Thu, 10 Jun 2004 13:50:28 +0000 (13:50 +0000)]
Free tty at detach().

Tested by: `pstat -t`
Requested by: phk

20 years agoFix typo that prevents esp_sbus.c and lsi64854.c from being built on sparc64.
marius [Thu, 10 Jun 2004 13:02:29 +0000 (13:02 +0000)]
Fix typo that prevents esp_sbus.c and lsi64854.c from being built on sparc64.

20 years agoFixed a bug spotted by compiling with -Wall.
ru [Thu, 10 Jun 2004 07:51:11 +0000 (07:51 +0000)]
Fixed a bug spotted by compiling with -Wall.

20 years agoAdd esp(4) to NOTES.
scottl [Thu, 10 Jun 2004 05:43:36 +0000 (05:43 +0000)]
Add esp(4) to NOTES.

20 years agoAdd esp to the sparc64 GENERIC
scottl [Thu, 10 Jun 2004 05:24:34 +0000 (05:24 +0000)]
Add esp to the sparc64 GENERIC

20 years agoAdd the esp(4) files. Two of them are sbus-specific and therefore only
scottl [Thu, 10 Jun 2004 05:21:44 +0000 (05:21 +0000)]
Add the esp(4) files.  Two of them are sbus-specific and therefore only
apply to sparc64.

20 years agoPort the NetBSD esp(4) driver. This only includes the sbus front-end, so
scottl [Thu, 10 Jun 2004 05:11:39 +0000 (05:11 +0000)]
Port the NetBSD esp(4) driver.  This only includes the sbus front-end, so
its primary use is for the FEPS/FAS366 SCSI found in Sun Ultra 1e and 2
machines.  Once the pci front-end is ported, this driver can replace the
amd(4) driver.

The code as-is is fairly stable.  I've disabled tagged-queueing until I can
figure out a corruption bug related to it.  I'm importing it now so that
people with these machines can (finally) stop netbooting and report bugs
before 5.3.

20 years agoMFamd64
alc [Thu, 10 Jun 2004 04:30:59 +0000 (04:30 +0000)]
MFamd64
 Significantly reduce the number of preallocated pv entries in pmap_init().

Tested by: kensmith@

20 years agoInitialise `restartcnt' in the newly malloc'd usbd_port structure,
iedowse [Thu, 10 Jun 2004 01:13:26 +0000 (01:13 +0000)]
Initialise `restartcnt' in the newly malloc'd usbd_port structure,
as otherwise the junk it contains may cause uhub_explore to give
up without ever trying to restart the port. This fixes the following
errors I was seeing with a VIA UHCI controller:

uhub0: port error, restarting port 1
uhub0: port error, giving up port 1

20 years ago- Add a LLADDR() forgotten in the conversion to ether_crc32_le().
marius [Thu, 10 Jun 2004 00:06:04 +0000 (00:06 +0000)]
- Add a LLADDR() forgotten in the conversion to ether_crc32_le().
- Remove a variable no longer used after the conversion.
- While here, save on another one no longer really necessary after the
  conversion.

20 years agoPlug a race where upon free this scenario could occur:
bmilekic [Thu, 10 Jun 2004 00:04:27 +0000 (00:04 +0000)]
Plug a race where upon free this scenario could occur:

(time grows downward)
thread 1         thread 2
------------|------------
dec ref_cnt |
            | dec ref_cnt  <-- ref_cnt now zero
cmpset      |
free all    |
return      |
            |
alloc again,|
reuse prev  |
ref_cnt     |
            | cmpset, read
            | already freed
            | ref_cnt
------------|------------

This should fix that by performing only a single
atomic test-and-set that will serve to decrement
the ref_cnt, only if it hasn't changed since the
earlier read, otherwise it'll loop and re-read.
This forces ordering of decrements so that truly
the thread which did the LAST decrement is the
one that frees.

This is how atomic-instruction-based refcnting
should probably be handled.

Submitted by: Julian Elischer

20 years ago- Remove a variable no longer used after the conversion to ether_crc32_le().
marius [Thu, 10 Jun 2004 00:04:16 +0000 (00:04 +0000)]
- Remove a variable no longer used after the conversion to ether_crc32_le().
- While here, save on another one no longer really necessary after the
  conversion.

20 years agoAdd eisa_if.h
imp [Wed, 9 Jun 2004 21:52:12 +0000 (21:52 +0000)]
Add eisa_if.h

20 years agoAdd eisa_if.h to the list of things to build for new eisa_if.m for the
imp [Wed, 9 Jun 2004 21:51:02 +0000 (21:51 +0000)]
Add eisa_if.h to the list of things to build for new eisa_if.m for the
case where we build modules with world.

20 years agoFix a bug where rintf() rounded the wrong way in round-to-nearest mode
das [Wed, 9 Jun 2004 21:24:52 +0000 (21:24 +0000)]
Fix a bug where rintf() rounded the wrong way in round-to-nearest mode
on all inputs of the form x.75, where x is an even integer and
log2(x) = 21.  A similar problem occurred when rounding upward.
The bug involves the following snippet copied from rint():

i>>=1;
if((i0&i)!=0) i0 = (i0&(~i))|((0x100000)>>j0);

The constant 0x100000 should be 0x200000.  Apparently this case was
never tested.

It turns out that the bit manipulation is completely superfluous
anyway, so remove it.  (It tries to simulate 90% of the rounding
process that the FPU does anyway.)  Also, the special case of +-0 is
handled twice (in different ways), so remove the second instance.

Throw in some related simplifications from bde:

- Work around a bug where gcc fails to clip to float precision by
  declaring two float variables as volatile.  Previously, we
  tricked gcc into generating correct code by declaring some
  float constants as doubles.

- Remove additional superfluous bit manipulation.

- Minor reorganization.

- Include <sys/types.h> explicitly.

Note that some of the equivalent lines in rint() also appear to be
unnecessary, but I'll defer to the numerical analysts who wrote it,
since I can't test all 2^64 cases.

Discussed with: bde

20 years agoThe list of files / directories to remove has moved to FREEBSD-Xlist.
des [Wed, 9 Jun 2004 20:51:26 +0000 (20:51 +0000)]
The list of files / directories to remove has moved to FREEBSD-Xlist.

20 years agoBackout previous change, I think Julian has a better solution which
bmilekic [Wed, 9 Jun 2004 20:50:08 +0000 (20:50 +0000)]
Backout previous change, I think Julian has a better solution which
does not require type-stable refcnts here.

20 years agoList of files and directories to delete before importing a new release.
des [Wed, 9 Jun 2004 20:14:53 +0000 (20:14 +0000)]
List of files and directories to delete before importing a new release.

20 years agoIntroduce a new feature to IPFW2: lookup tables. These are useful
ru [Wed, 9 Jun 2004 20:10:38 +0000 (20:10 +0000)]
Introduce a new feature to IPFW2: lookup tables.  These are useful
for handling large sparse address sets.  Initial implementation by
Vsevolod Lobko <seva@ip.net.ua>, refined by me.

MFC after: 1 week

20 years agoMake the sysctl kern.geom.collectstats more granular.
phk [Wed, 9 Jun 2004 19:44:44 +0000 (19:44 +0000)]
Make the sysctl kern.geom.collectstats more granular.

Bit 0 controls statistics collection on GEOM providers.
Bit 1 controls statistics collection on GEOM consumers.

Default value is 1.

Prodded by: scottl

20 years agoMake the slabrefzone, the zone from which we allocated slabs with
bmilekic [Wed, 9 Jun 2004 19:18:50 +0000 (19:18 +0000)]
Make the slabrefzone, the zone from which we allocated slabs with
internal reference counters, UMA_ZONE_NOFREE.  This way, those slabs
(with their ref counts) will be effectively type-stable, then using
a trick like this on the refcount is no longer dangerous:

        MEXT_REM_REF(m);
        if (atomic_cmpset_int(m->m_ext.ref_cnt, 0, 1)) {
                if (m->m_ext.ext_type == EXT_PACKET) {
                        uma_zfree(zone_pack, m);
                        return;
                } else if (m->m_ext.ext_type == EXT_CLUSTER) {
                        uma_zfree(zone_clust, m->m_ext.ext_buf);
                        m->m_ext.ext_buf = NULL;
                } else {
                        (*(m->m_ext.ext_free))(m->m_ext.ext_buf,
                            m->m_ext.ext_args);
                        if (m->m_ext.ext_type != EXT_EXTREF)
                                free(m->m_ext.ref_cnt, M_MBUF);
                }
        }
        uma_zfree(zone_mbuf, m);

Previously, a second thread hitting the above cmpset might
actually read the refcnt AFTER it has already been freed.  A very
rare occurance.  Now we'll know that it won't be freed, though.

Spotted by: julian, pjd