Commit Graph

45667 Commits

Author SHA1 Message Date
Alexander Kabaev
c355fd5a84 Avoid doing bawrite to initialize inode block while holding cylinder
group block locked. If filesystem has any active snapshots, bawrite
can come back trying to allocate new snapshot data block from the same
cylinder group and cause panic due to recursive lock attempt.

PR:		64206
Reviewed by:	mckusick
Tested by:	pjd
2004-03-16 22:06:32 +00:00
Dag-Erling Smørgrav
f0f93429cf Run through indent(1) so I can read the code without getting a headache.
The result isn't quite knf, but it's knfer than the original, and far
more consistent.
2004-03-16 21:30:41 +00:00
Maxime Henrion
45c7aff75a Add explicit dependency on "ether", since we use ether_ifattach(). 2004-03-16 19:25:55 +00:00
Alan Cox
90ecfebd82 Refactor the existing machine-dependent sf_buf_free() into a machine-
dependent function by the same name and a machine-independent function,
sf_buf_mext().  Aside from the virtue of making more of the code machine-
independent, this change also makes the interface more logical.  Before,
sf_buf_free() did more than simply undo an sf_buf_alloc(); it also
unwired and if necessary freed the page.  That is now the purpose of
sf_buf_mext().  Thus, sf_buf_alloc() and sf_buf_free() can now be used
as a general-purpose emphemeral map cache.
2004-03-16 19:04:28 +00:00
John Baldwin
27de234992 Remove a bogus assertion and readd it in a more correct location. A thread
might be enqueued on a sleep queue but not be asleep when the timeout fires
if it is blocked on a lock trying to check for pending signals before going
to sleep.  In the case of fixing up the TDF_TIMEOUT race, however, the
thread must be marked asleep.

Reported by:	kan (the bogus one)
2004-03-16 18:56:22 +00:00
Søren Schmidt
b47183d51a Update the SiS support to distinguish older southbridges better. 2004-03-16 16:23:28 +00:00
Peter Grehan
721b6196d5 Add powerpc to temporary fix. The new cpu device claims all
'generic' OpenFirmware nexus nodes, since it uses bus_generic_probe.
Maybe the cpu device probe should be MD.
2004-03-16 13:34:50 +00:00
Yoshihiro Takahashi
c069ddf147 Move the arl to i386 only. 2004-03-16 12:43:08 +00:00
Yoshihiro Takahashi
877cbbe8a8 Don't use the pcic polling. 2004-03-16 12:40:11 +00:00
Scott Long
36254177e0 Remove the module reference for RAIDframe 2004-03-16 12:27:34 +00:00
Scott Long
846ca5d04f Remove RAIDFrame. It hasn't worked since GEOM replaced the old disk
mini-layer.  I don't have time to bing it forward into the GEOM world, and
no one else has stepped forward to claim it.  It'll be in the Attic for safe
keeping for now.
2004-03-16 12:23:43 +00:00
David Malone
31c7e8b05b Nudge Giant as far as I can into kern_open(). Mark open() as MPSAFE.
Use kern_open() to implement creat() rather than taking the long route
through open(). Mark creat as MPSAFE.

While I'm at it, mark nosys() (syscall 0) as MPSAFE, for all the
difference it will make.
2004-03-16 10:46:42 +00:00
David Malone
1f325ae35e Get ready to mark open, creat and nosys as MPSAFE. 2004-03-16 10:41:23 +00:00
Tim J. Robbins
7b0d017245 Use vfs_nmount() to mount linprocfs filesystems in linux_mount();
linprocfs doesn't support the old mount interface.
2004-03-16 09:05:56 +00:00
Tim J. Robbins
537370d0a4 Make vfs_nmount() public. The Linux emulator needs this in order to mount
linprocfs filesystems.
2004-03-16 08:59:37 +00:00
Tim J. Robbins
2ba9b76668 Correct size argument passed to copyinstr() in linux_mount(): mntfromname
and mntonname are both MNAMELEN characters long, not MFSNAMELEN.
2004-03-16 08:37:19 +00:00
Don Lewis
a961520c13 Rename the wiredlen member of struct sysctl_req to validlen and always
set it to avoid the need for a bunch of code that tests whether or
not the lock member is set to REQ_WIRED in order to determine which
length member should be used.

Fix another bug in the oldlen return value code.

Fix a potential wired memory leak if a sysctl handler uses
sysctl_wire_old_buffer() and returns an EAGAIN error to trigger
a retry.
2004-03-16 06:53:03 +00:00
Don Lewis
8ac3e8e940 Don't bother calling vslock() and vsunlock() if oldlen is zero.
If vslock() returns ENOMEM, sysctl_wire_old_buffer() should set
wiredlen to zero and return zero (success) so that the handler will
operate according to sysctl(3):
     The size of the buffer is given by the location specified by
     oldlenp before the call, and that location gives the amount
     of data copied after a successful call and after a call that
     returns with the error code ENOMEM.
The handler will return an ENOMEM error because the zero length
buffer will overflow.
2004-03-16 01:28:45 +00:00
John Baldwin
e5592f4dd9 Regenerate. 2004-03-15 22:44:35 +00:00
John Baldwin
216db4ad00 - Mark ABI syscalls that call wait4() MP safe as recent changes to
the kernel wait4() made these all panic() implementations otherwise.
- The i386 linux_ptrace() syscall is MP safe.  Alpha was already marked
  MP safe.
2004-03-15 22:43:49 +00:00
Max Khon
798f0e1603 Add arl(4): driver for Aironet Arlan 655 wireless adapters.
MFC after:	2 weeks
2004-03-15 22:24:28 +00:00
Poul-Henning Kamp
f6c21c0641 The PPS code needs to be much more brutal to avoid synchronism on
hardware with non-sucky clocks.
2004-03-15 21:47:34 +00:00
John Baldwin
6b55d75c44 Regen for ptrace being safe again. 2004-03-15 18:50:06 +00:00
John Baldwin
8ac61436e6 Drop the proc lock around calls to the MD functions ptrace_single_step(),
ptrace_set_pc(), and cpu_ptrace() so that those functions are free to
acquire Giant, sleep, etc.  We already do a PHOLD/PRELE around them so
that it is safe to sleep inside of these routines if necessary.  This
allows ptrace() to be marked MP safe again as it no longer triggers lock
order reversals on Alpha.

Tested by:	wilko
2004-03-15 18:48:28 +00:00
Bill Paul
f79e9df73b Add vectors for _snprintf() and _vsnprintf() (redirected straight to
snprintf() and vsnprintf() in FreeBSD kernel land).

This is needed by the Intel Centrino 2200BG driver. Unfortunately, this
driver still doesn't work right with Project Evil even with this tweak,
but I'm unable to diagnose the problem since I don't have access to a
sample card.
2004-03-15 16:39:03 +00:00
Max Laier
657ea5eb2c Move GID/UID_MAX under __BSD_VISIBLE protection.
Requested by:	bde
Approved by:	bms(mentor)
2004-03-15 13:43:44 +00:00
Søren Schmidt
ad0e7ebfd2 Add SATA support fields 2004-03-15 13:17:24 +00:00
Pawel Jakub Dawidek
7f4704c01d Remove sysctl security.jail.list_allowed.
This functionality was a misfeature, sysctl was added and turned off by
default just to check if nobody complains.

Reviewed by:	rwatson
2004-03-15 12:10:34 +00:00
Søren Schmidt
498e55436a Add support for detaching PCI controllers.
This adds support for cardbus ATA/SATA controllers. I get roughly the
same transfer speeds as on true PCI controllers. Nice to be able to add
a couble of "real" disks to a laptop :)
2004-03-15 12:03:48 +00:00
Warner Losh
5c9d7c3a68 Kill bogus isa compat opt file. 2004-03-15 11:27:39 +00:00
Warner Losh
dc57f07049 Temporarily comment out cy.
Remove COMPAT_OLDISA
2004-03-15 10:39:37 +00:00
Warner Losh
91a5625be4 including isa_device.h was historical in this file, remove it 2004-03-15 10:39:01 +00:00
Don Lewis
bb734798af Make overflow/wraparound checking more robust and unbreak len=0 in
vslock(), mlock(), and munlock().

Reviewed by:	bde
2004-03-15 09:11:23 +00:00
Don Lewis
f0ea4612ef Style(9) changes.
Pointed out by:	bde
2004-03-15 06:43:51 +00:00
Don Lewis
ce8660e395 Revert to the original vslock() and vsunlock() API with the following
exceptions:
	Retain the recently added vslock() error return.

	The type of the len argument should be size_t, not u_int.

Suggested by:	bde
2004-03-15 06:42:40 +00:00
Don Lewis
be4c5ad025 Remove redundant suser() check. 2004-03-15 06:36:55 +00:00
Robert Watson
5e71a73b7b Lock down global variables in if_tap (primarily, the tap softc list);
add tapmtx, which protects globale variables.

Notes:

- The EBUSY check in MOD_UNLOAD may be subject to a race.  Moving the
  event handler unregister inside the mutex grab may prevent that race.

- Locking of global variables safely is now possible because tapclones
  is only modified when the module is loading or unloading, thanks to
  phk's recent chang to clone_setup().

- softc locking to follow.
2004-03-15 01:52:00 +00:00
David E. O'Brien
a5b0d49470 Shorten a long comment. 2004-03-15 00:49:40 +00:00
Robert Watson
0ff34b5e1c Don't reject FAT file systems with a number of "Heads" greater than
255; USB keychains exist that use 256 as the number of heads.  This
check has also been removed in Darwin (along with most of the other
head/sector sanity checks).
2004-03-14 23:28:12 +00:00
Warner Losh
69ef3621a2 Remove isa compat stuff.
Only cy, bs and wd in the tree still use it.  I have a replacement for
cy that I need to test on ISA and PCI cards.  bs and wd are pc98 only
drivers that appear to no longer be necessary.  I'll be removing them
when I hear back from the pc98 people.
2004-03-14 23:03:57 +00:00
Warner Losh
26b74a3cdb comment out bs and wd entries in the hints 2004-03-14 23:02:07 +00:00
Warner Losh
289e7650eb Comment out the cy driver until I can make sure that the new cy driver
I have for it works.
2004-03-14 22:50:49 +00:00
Warner Losh
e9dd5834c6 The gsc driver uses the old COMPAT_ISA api. Retire it so we can
retire the COMPAT_ISA shims.  If someone were to redo this driver with
the new APIs and test it, it can return.
2004-03-14 22:42:54 +00:00
Warner Losh
e96cc4a8a3 Hints for the le driver are no longer necessary here.
Noticed by: ru
2004-03-14 22:38:18 +00:00
Warner Losh
721745e356 The rdp driver uses the COMPAT_OLD api. This is being retired, so
this driver is being retired.  Remove it from the tree.  If someone
wants to update it to the latest APIs and can test the hardware, it
can return to the tree.
2004-03-14 22:35:29 +00:00
Warner Losh
1cf01aa3f4 The spigot driver uses the old COMPAT_ISA interface. Retire it since
that's going away soon.  Should someone reimplement it using modern
APIs and can test the driver, it can return.
2004-03-14 22:31:49 +00:00
Warner Losh
974f74fce4 The le driver uses ISA_COMPAT, which is going away soon. Retire it
and releated files.  If someone wants to fix it to use the new APIs
and test it, it can be brought back.
2004-03-14 22:25:19 +00:00
Josef Karthauser
6909422ddd Regen. 2004-03-14 21:57:35 +00:00
Josef Karthauser
295964d6a9 Add support for Handspring TREO 600.
Submitted by:	Tuc <tuc@ttsg.com>
MFC after:	1 week
2004-03-14 21:56:51 +00:00
Brian Feldman
6fedf94775 When taking event callbacks (like process_exit) out from under Giant, those
which do not lock Giant themselves will be exposed.  Unbreak pfs_exit().
2004-03-14 15:57:45 +00:00
Poul-Henning Kamp
bcfe6d8b26 Annual NTP kernel code spring-cleaning:
Use int64_t rather than long long for the fixpoint type.

Don't discard fractional nanosecond frequency correction.
2004-03-14 15:23:05 +00:00
Yoshihiro Takahashi
eba504ff39 MFi386: Remove the stl and stli drivers. 2004-03-14 09:46:36 +00:00
Yoshihiro Takahashi
f213e50a57 MFi386: revision 1.29. 2004-03-14 09:43:15 +00:00
Yoshihiro Takahashi
3136cf2d73 MFi386: revision 1.76. 2004-03-14 09:41:57 +00:00
Ruslan Ermilov
6df1b14fa1 Removed duplicate __FBSDID(). Keep the one that style(9) likes. 2004-03-14 08:43:55 +00:00
Matthew N. Dodd
e3bbbec2ca Announce ethernet MAC addresss in ether_ifattach(). 2004-03-14 07:12:25 +00:00
Warner Losh
a0988ce1a8 stl and stli use the old COMPAT_ISA api. slt also uses the really old
COMPAT_PCI api.  This API is going away, so this driver is going away
also.

If users are interested in updating this, please contact the author
since he has some preliminary work to move this to newer APIs.
2004-03-14 06:48:36 +00:00
Peter Wemm
6df0617286 Calculate NFS timeouts in units of 10ms, not 5ms. This matches the default
clock precision on i386.  This is a NOP change on i386.  But this stops
the mount_nfs units from suddenly changing to units of 1/20 of a second
(vs the normal 1/10 of a second) if HZ is increased.
2004-03-14 06:21:56 +00:00
Peter Wemm
8f650450c6 Set default HZ to 1024 for amd64. The comment in kern/tty.c doesn't
apply here because we have 64 bit longs and don't suffer the hz > 169
overflows.
2004-03-14 05:49:31 +00:00
Bruce Evans
e9f67e566b Fixed misspellings of 0 as NULL. 2004-03-14 05:48:04 +00:00
Warner Losh
27ecf90592 remove the ioctl files from the asc, ctx and wt drivers just removed 2004-03-14 05:40:50 +00:00
Warner Losh
901d6679bd Remove straggler from gp driver removal 2004-03-14 05:34:45 +00:00
Warner Losh
bbde09fb83 Remove gp driver. It uses the old COMPAT_ISA shims.
If this driver is rewritten using newer APIs it can return.
2004-03-14 05:31:41 +00:00
Warner Losh
8822b75696 Remove ctx driver. another scanner. This one uses COMPAT_ISA shims
which is going away soon.

If someone updates this to the latest APIs and tests it, it can return.
2004-03-14 05:27:30 +00:00
Matthew N. Dodd
43a6c75a7a Handle AF_ARP in *_output()
Obtained from:	NetBSD
2004-03-14 05:24:54 +00:00
Warner Losh
9ddf1ac910 Remove asc driver, support for GI1904 based hand scanners. This
driver uses COMPAT_ISA shims, and those shims are going away.

It can be brought back if someone updates it to the latest APIs, and
moves it to the appropriate place in the tree.
2004-03-14 04:57:28 +00:00
Warner Losh
00bafba53f Should have committed this with other wt driver removal commit.
Remove the wt driver from LINT.

If the wt driver is updated to the new apis, it can return.
2004-03-14 04:53:46 +00:00
Warner Losh
e08b187c65 Remove wt driver. It still uses COMPAT_ISA_DRIVER which is going away
very soon.

Users needing this driver should update it to a newer API.
2004-03-14 04:46:52 +00:00
Alan Cox
9a63fc0df0 Simplify sf_buf_alloc(). 2004-03-14 04:06:33 +00:00
Peter Wemm
a5bdcb2a2f Make the process_exit eventhandler run without Giant. Add Giant hooks
in the two consumers that need it.. processes using AIO and netncp.
Update docs.  Say that process_exec is called with Giant, but not to
depend on it.  All our consumers can handle it without Giant.
2004-03-14 02:06:28 +00:00
Peter Wemm
8a412f314e Move the process_fork event out from under Giant. This one is easy,
since there are no consumers in the tree.  Document this.
2004-03-14 01:48:32 +00:00
Robert Watson
57848b8f65 Compare spppq to NULL instead of using spppq as a boolean. 2004-03-14 01:32:44 +00:00
Tom Rhodes
5a19f6d9d4 Fix some style bugs in previous commit.
Fix 'broken' ifdefs.
icc does not support profiling yet so remove unfinished code which was
supposed to help.

Submitted by:	netchild (original version)
Reviewed by:	ru
2004-03-14 01:29:05 +00:00
Matthew N. Dodd
cc4ca9da19 Define AF_ARP/PF_ARP. 2004-03-14 00:49:09 +00:00
Matthew N. Dodd
e952fa39de De-register. 2004-03-14 00:44:11 +00:00
Alan Cox
33651381b7 Allow swap-backed devices to run without Giant. 2004-03-14 00:24:30 +00:00
Peter Wemm
78c45c5d66 Regen for mpsafe kse_create() 2004-03-13 22:32:17 +00:00
Peter Wemm
37814395c1 Push Giant down a little further:
- no longer serialize on Giant for thread_single*() and family in fork,
  exit and exec
- thread_wait() is mpsafe, assert no Giant
- reduce scope of Giant in exit to not cover thread_wait and just do
  vm_waitproc().
- assert that thread_single() family are not called with Giant
- remove the DROP/PICKUP_GIANT macros from thread_single() family
- assert that thread_suspend_check() s not called with Giant
- remove manual drop_giant hack in thread_suspend_check since we know it
  isn't held.
- remove the DROP/PICKUP_GIANT macros from thread_suspend_check() family
- mark kse_create() mpsafe
2004-03-13 22:31:39 +00:00
Peter Wemm
f8325b428c Re-kill ispcvt on amd64 - rc.d/syscons was fixed ages ago. 2004-03-13 22:18:34 +00:00
Peter Wemm
0fef69a2f9 MFp4: comment out options that don't exist so that they cannot be
accidently added to config files and be silently accepted.
Comment out one bogo-option that crept into NOTES.
2004-03-13 22:16:34 +00:00
Peter Wemm
75294710dd Diff reduction with current. Correct comment about ed etc. 2004-03-13 22:14:18 +00:00
Peter Wemm
73f3495386 Move the non-MD machine/dvcfg.h and machine/physio_proc.h to a common
MI area before they proliferate more.
2004-03-13 19:46:27 +00:00
Peter Wemm
f502c2725e Drastically clean up the legacy host-pci bridge table. We don't need
all the ancient Intel/VIA/SIS/etc chipsets on amd64 systems.  Even the
newer intel stuff won't need this since we use acpi by default and we
don't have all their magic programming information.  Just use a generic
"Host to PCI bridge" name if we ever hit this code.
2004-03-13 19:21:35 +00:00
Peter Wemm
10884719f8 MFi386: nuke pci_cfgintr 2004-03-13 19:19:13 +00:00
Peter Wemm
6e91f30b93 Reduce the scope of the Giant lock being held for non-mpsafe syscalls.
There was way too much code being covered.
2004-03-13 19:15:43 +00:00
Peter Edwards
ad50c14e4d Recognise the 82845G AGP bridge, and poke it appropriately at
attach/detach time.

Assigning the default behaviour to this particular device is
incorrect, corrupting the video BIOS aperture, and breaking
VESA support in the kernel and XFree86.

Reviewed By:	dfr
MFC after:	1 week
PR:		kern/62906
2004-03-13 16:06:32 +00:00
Scott Long
11d905ecd8 Now that contigfree() does not require Giant, don't grab it in busdma. 2004-03-13 15:42:59 +00:00
Tim J. Robbins
2a5bb2de6b Add support for the Epson Perfection 1670 scanner. 2004-03-13 08:45:16 +00:00
Tim J. Robbins
7e035f1e26 Regen 2004-03-13 08:25:51 +00:00
Tim J. Robbins
1df4c96417 Add EPSON Perfection 1670 scanner. 2004-03-13 08:21:22 +00:00
Alan Cox
0fcfb99247 Remove GIANT_REQUIRED from contigfree(). 2004-03-13 07:09:15 +00:00
Robert Watson
7ad4bd536a Constify interactive_ports, as its value is static, and therefore doesn't
require synchronization.
2004-03-13 06:16:59 +00:00
Robert Watson
5d8dd01da2 Add annotations to mtx_lock(&Giant) in kern_select() and poll() that
we always grab Giant, even if we're actually only polling objects that
don't require giant.  Once socket locking is merged, there will be
strong motivation to fix this.
2004-03-13 05:58:57 +00:00
Robert Watson
4a1be2f9f9 Remove stale (unused) unit variables from if_tun and if_tap softc's. 2004-03-13 05:51:06 +00:00
Robert Watson
5a78f313fb Constify iso88025_broadcastaddr to make it clear no explicit
synchronization is required.
2004-03-13 05:46:26 +00:00
Robert Watson
2d3b3d66b4 Const-poison atmulticastaddr, which should be read but not modified.
While there, remove (caddr_t) casting of ethernet addresses, which
among other things discards the qualifier.  This makes it clear that
atmulticastaddr does not require synchronization.
2004-03-13 05:27:17 +00:00
Bruce Evans
0249823ecb Align the offset in vn_rdwr_inchunks() so that at most the first and
the last chunk are misaligned relative to a MAXBSIZE byte boundary.
vn_rdwr_inchunks() is used mainly for elf core dumps, and elf sections
are usually perfectly misaligned relative to MAXBSIZE, and chunking
prevents the file system from doing much realigning.

This gives a surprisingly large speedup for core dumps -- from 50 to
13 seconds for a 512MB core dump here.  The pessimization was mostly
from an interaction of the misalignment with IO_DIRECT.  It increased
the number of i/o's for each chunk by a factor of 5 (3 writes and 2
read-before-writes instead of 1 write).
2004-03-13 02:56:27 +00:00
Brooks Davis
bc1470f1f1 Don't allow interfaces to be renamed to the empty string.
While I'm here, errors aren't bools.

Pointed out by:	hmp
2004-03-13 02:35:03 +00:00
Brooks Davis
196f7f54d2 Remove if_withname. It came in with the KAME import, but never got
used.  Should someone need its functionality, it's a really expensive
implementation of:
	ifnet_byindex(sdl->sdl_index)

Reviewed by:    bde, ume
2004-03-13 02:31:40 +00:00
Bruce Evans
ce5d505cc6 Fixed some English usage errors. 2004-03-13 00:56:11 +00:00