Commit Graph

103179 Commits

Author SHA1 Message Date
Poul-Henning Kamp
f89485e2b1 Merge boot0 and boot0sio so they behave the same. 2004-06-11 09:45:18 +00:00
Søren Schmidt
68599b781f Back out the last change as that broke some SATA devices.
Now we are cleaing up remove a few lines of unused code.
2004-06-11 07:39:15 +00:00
Alan Cox
4e302a62f7 Reduce the number of preallocated pv entries and lpte entries in
pmap_init().

Tested by:	marcel@
2004-06-11 04:24:35 +00:00
Robert Watson
c1d587c848 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.
2004-06-11 04:06:51 +00:00
Robert Watson
935becd8dd Constify raw_sendspace and raw_recvspace, as they're not mutable. 2004-06-11 03:52:56 +00:00
Robert Watson
b8f9429d55 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.
2004-06-11 03:47:21 +00:00
Robert Watson
8240bf1e04 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.
2004-06-11 03:45:42 +00:00
Robert Watson
c14800e6ff 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).
2004-06-11 03:42:37 +00:00
Ken Smith
f64520dfb8 Change defualt time zone from GMT to UTC. This will not be MFC-ed, and
was done before 5-STABLE on purpose...
2004-06-11 03:34:02 +00:00
Eric Anholt
3ba181deb2 Merge from DRI CVS as of 2004-05-26. Most of the meat is new PCI IDs and a new
packet for Radeon.
2004-06-11 03:26:59 +00:00
David Schultz
a2ca83c04a Add some fenv.h regression tests. 2004-06-11 03:22:34 +00:00
David Schultz
16919a6cf7 Shift the FPSR contents by the correct amount so feupdateenv() raises
the correct exceptions from the old environment.
2004-06-11 02:35:30 +00:00
David Schultz
0d2354c6fd Insert a missing '~' in feholdexcept(), so that it correctly clears
the exception flags in the mxcsr as well as the x87 FPU.
2004-06-11 02:35:19 +00:00
Brian Feldman
b4adfcf2f4 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
2004-06-11 02:20:37 +00:00
Tim Kientzle
c066ba2f01 Oops: gtar's --dereference should be a synonym for bsdtar's -L, not -H.
Pointed out by: devel/nspr port
Thanks to: Kris Kennaway
2004-06-11 01:35:56 +00:00
Peter Wemm
20fe68acb9 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.
2004-06-11 00:35:29 +00:00
Peter Wemm
aabc36c5b8 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.
2004-06-10 22:18:33 +00:00
Marius Strobl
543912b386 Remove second <sys/cdefs.h> and __FBSDID. 2004-06-10 22:15:51 +00:00
Peter Wemm
a520047095 Argh. Add the mini-stack-frame back in for mcount's benefit for syscall
stubs.
2004-06-10 22:02:26 +00:00
Peter Wemm
6d05d7c75a 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.
2004-06-10 22:00:58 +00:00
Marius Strobl
397f6b1e7f 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
2004-06-10 21:56:52 +00:00
Marius Strobl
a9f012c75d - 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
2004-06-10 21:53:04 +00:00
Marius Strobl
cdd89aebf5 - 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
2004-06-10 21:51:39 +00:00
Marius Strobl
f2ce1eaef9 - #define\tFOO\tBAR
- Remove two tabs from an otherwise empty line.

OK'ed by:	nsouch
2004-06-10 21:48:51 +00:00
Robert Watson
0d9ce3a1ac 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
2004-06-10 21:34:38 +00:00
Peter Wemm
11b000253e Insta-MFi386: ignore disabled cpu apic id's entirely 2004-06-10 21:30:08 +00:00
Jens Schweikhardt
cad27670ff Correct assorted typos and grammos. 2004-06-10 21:03:34 +00:00
John Baldwin
bad4ce7d91 - 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.
2004-06-10 20:43:04 +00:00
John Baldwin
092a5c4530 Remove atdevbase and replace it's remaining uses with direct references to
KERNBASE instead.
2004-06-10 20:31:00 +00:00
Ruslan Ermilov
dd4d62c7d8 init_tables() must be run after sys/net/route.c:route_init(). 2004-06-10 20:20:37 +00:00
John Baldwin
a916fdf6ad Completely ignore disabled CPU entries as their APIC IDs tend to be
invalid.
2004-06-10 20:03:46 +00:00
Brian Somers
ab5e865567 Die if make buildworld fails -- don't wait 'till installworld can't find
what it needs.
2004-06-10 19:33:26 +00:00
Peter Wemm
82d583b4b9 Turn cvs back on after import; that was less painful than I expected. 2004-06-10 19:17:20 +00:00
Peter Wemm
c21444aae2 Merge 1.11.15+ -> 1.11.17 changes onto mainline. I've left cvs.1 alone
for now.
2004-06-10 19:12:50 +00:00
Peter Wemm
1df53a9a3f This commit was generated by cvs2svn to compensate for changes in r130303,
which included commits to RCS files with non-trunk default branches.
2004-06-10 19:05:38 +00:00
Peter Wemm
83c36f7f98 Import cvs-1.11.17 onto vendor branch. 2004-06-10 19:05:38 +00:00
Peter Wemm
5602449b69 Turn off cvs while import/merging. 2004-06-10 19:02:42 +00:00
Roman Kurakin
2a8436eae5 Free tty at detach().
Tested by:	`pstat -t`
Requested by:	phk
2004-06-10 13:50:28 +00:00
Marius Strobl
7ad8bf410d Fix typo that prevents esp_sbus.c and lsi64854.c from being built on sparc64. 2004-06-10 13:02:29 +00:00
Ruslan Ermilov
1a41a8e4ce Fixed a bug spotted by compiling with -Wall. 2004-06-10 07:51:11 +00:00
Scott Long
1b946e218d Add esp(4) to NOTES. 2004-06-10 05:43:36 +00:00
Scott Long
c08701fd03 Add esp to the sparc64 GENERIC 2004-06-10 05:24:34 +00:00
Scott Long
12c6be05d1 Add the esp(4) files. Two of them are sbus-specific and therefore only
apply to sparc64.
2004-06-10 05:21:44 +00:00
Scott Long
c31d0cf77b 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.
2004-06-10 05:11:39 +00:00
Alan Cox
b8fae4f3ef MFamd64
Significantly reduce the number of preallocated pv entries in pmap_init().

Tested by:	kensmith@
2004-06-10 04:30:59 +00:00
Ian Dowse
f2b2cfdac0 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
2004-06-10 01:13:26 +00:00
Marius Strobl
9d3be787c2 - 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.
2004-06-10 00:06:04 +00:00
Bosko Milekic
b5b2ea9a46 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
2004-06-10 00:04:27 +00:00
Marius Strobl
c240bd8cf8 - 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.
2004-06-10 00:04:16 +00:00
Warner Losh
f22c26808e Add eisa_if.h 2004-06-09 21:52:12 +00:00