Commit Graph

84028 Commits

Author SHA1 Message Date
Jake Burkholder
9830739b64 Add page queue locking around functions that call vm_page_flag_set. This
fixes a failed assertion early in boot on sparc64.

Reported by:	Roderick van Domburg <r.s.a.vandomburg@student.utwente.nl>
2002-12-20 21:47:21 +00:00
Alan Cox
2952e1fb58 Extend the scope of the page queues lock in vm_pgmoveco(). 2002-12-20 21:18:29 +00:00
Alan Cox
671e427ce9 Increase the scope of the kmem_object locking in kmem_malloc(). 2002-12-20 18:59:23 +00:00
Matthew Dillon
cc7bab9032 Modify the fake cylinders calculation so it is >= the size of the device,
not < the size of the device.  This avoids geom complaints.

Fix a serious bug in the handling of the RS_NO_CLEAR_UA quirk.  When we
go and insert the test-unit-ready command the umass_cam_quirk_cb() function
sets the status as if the READ_CAPACITY command suceeded when, in fact, it
did not.  This leads to the CAM layer trying to use garbage in the return
buffer and panicing the system (or doing other bad things).

Add a quirk entry for MSYSTEMS DISK-ON-KEY, which is sold under the Sony
brand as a solid state disk-on-key usb device.  This device requires
several quirks to work properly.

Note that the disk-on-key device will not work properly until CAM also
gets a quirk entry for it, which has been submitted to the CAM maintainer,
and you may have to temporarily uncomment the DELAY() as well.  -current
does not properly wait for devices to power up so you may also have
to temporarily uncomment the DELAY(300000) to make your device work.
A solution must be found to that issue.

MFC after:	3 days
X-MFC note:	the quirk support must MFCd before this patch can be
2002-12-20 18:56:55 +00:00
Matthew Dillon
698df1f738 Fix two bugs in the DMA chaining code for OHCI. The first bug is that
the dataphysend calculation could only possibly work if the virtual buffer
is also physically contiguous.  Calculate dataphysend by calculating the
ending virtual address first, then converting to a physical address.

The second bug applies only to NetBSD and OpenBSD and involves the curlen
calculation in the two-contiguous-physical-pages case (which we don't support).

Also cleanup the use of the OHIC_PAGE() macro on dataphysend and add a panic
if len goes negative (meaning we lost the physical page translation
representing the end of the buffer).

IMHO the dataphysend is still bokered since it might be misrepresented
by shared userland page mappings.  The whole section needs to be rewritten
to use the virtual address range.

MFC after:	3 days
2002-12-20 18:47:39 +00:00
Maxime Henrion
894db7b01f Don't forget to destroy the mutex if an error occurs
in the jail() system call.

Submitted by:	Pawel Jakub Dawidek <nick@garage.freebsd.pl>
2002-12-20 14:32:20 +00:00
Ruslan Ermilov
b94a2c38ca mdoc(7) police: Fixed language. 2002-12-20 12:41:26 +00:00
Søren Schmidt
01ed335875 Fxi support for the Promise SuperTrak 100, the PCI id was wrong. 2002-12-20 12:15:38 +00:00
Jeffrey Hsu
9a39fc9d73 Eliminate a goto.
Fix some line breaks.
2002-12-20 11:24:02 +00:00
Jeffrey Hsu
12e552d69f Swap the order of a free and a use of an ifaddr structure. 2002-12-20 11:21:07 +00:00
Jeffrey Hsu
540e8b7e31 Unravel a nested conditional.
Remove an unneeded local variable.
2002-12-20 11:16:52 +00:00
Tim J. Robbins
4aca04ee5c Document the fact that the printf() family of functions return negative
values (EOF in our case) on error, and some of the possible errno values
in an Errors section.

PR:		39257
2002-12-20 08:28:10 +00:00
Tim J. Robbins
5a7405be50 C99 standardised the vscanf() family of functions, update Standards
section to reflect this.
2002-12-20 07:46:01 +00:00
Warner Losh
1e315c9022 Put back the casts to unsigned. While no strictly necessary for its
current uses, the name strcmp has strong connotations that shouldn't
lightly be discarded.  This doesn't cost us anything.

Submitted by: bde
2002-12-20 05:49:40 +00:00
Mike Barcroft
68cd9bedfb Stylistic changes:
o Fix an English error (comma splice) and poorly worded sentence.
o Fix KNF ordering of variables (pointers come before arithmetic types).
o Restore hand-optimization of sizeof()-1, instead of strlen().
o Remove unneeded local variables in strerror_r().

Test by:	strerror regression test
Requested by:	bde
Reviewed by:	bde
2002-12-20 05:26:10 +00:00
Alan Cox
4b420d501f Add a mutex to struct vm_object. Initialize and destroy that mutex
at appropriate times.  For the moment, the mutex is only used on
the kmem_object.
2002-12-20 05:10:32 +00:00
Tom Rhodes
3b15250c04 Remove obsolete information about 'conflicts' 2002-12-20 04:56:52 +00:00
Jake Burkholder
83110b06f8 Fix breakage from earlier inadvertant changes. 2002-12-20 04:32:10 +00:00
Tom Rhodes
9e655d620b Move the NOTES section to DESCRIPTION. And correct some documentation while
I'm here.

PR:		43756
Submitted by:	Gary W. Swearingen <swear@attbi.com>
2002-12-20 01:17:18 +00:00
Tom Rhodes
bd8dfc819e Document what really occurs when we obtain an error.
PR:		43357
Submitted by:	David Schultz <dschultz@uclink.Berkeley.EDU>
2002-12-20 01:01:24 +00:00
Jeffrey Hsu
f320a1bfd2 Expand scope of TCP protocol lock to cover syncache data structures. 2002-12-20 00:24:19 +00:00
Chris Costello
075b064f04 Include a cross-reference to maclabel(7) for policies that use MAC labels.
MFC Candidate.

Sponsored by:	DARPA, Network Associates Labs
2002-12-20 00:17:10 +00:00
Jordan K. Hubbard
d667ae9537 Correct path to /usr/sbin/sysinstall for HEAD since that's where it lives now. 2002-12-20 00:10:37 +00:00
Chris Costello
6f489bd9f6 o Change "accesses" to "access" (sounds better)
o Correct the range of compartments (1..256 instead of 0..255)
o Use the correct name for "Network Associates Laboratories"

MFC Candidate.

Sponsored by:	DARPA, Network Associates Laboratories
Reviewed by:	Adam Migus <adam@migus.org>
2002-12-19 23:47:59 +00:00
Matthew Dillon
914d31686b The zalloc pool's size calculation breaks if sbrk() does not return
contiguous chunks of memory.  It happens to do so in the bootstrap
code, but not necessarily in other places.
MFC after:	7 days
2002-12-19 23:23:20 +00:00
Bosko Milekic
86fea6be59 o Untangle the confusion with the malloc flags {M_WAITOK, M_NOWAIT} and
the mbuf allocator flags {M_TRYWAIT, M_DONTWAIT}.
o Fix a bpf_compat issue where malloc() was defined to just call
  bpf_alloc() and pass the 'canwait' flag(s) along.  It's been changed
  to call bpf_alloc() but pass the corresponding M_TRYWAIT or M_DONTWAIT
  flag (and only one of those two).

Submitted by: Hiten Pandya <hiten@unixdaemons.com> (hiten->commit_count++)
2002-12-19 22:58:27 +00:00
Tom Rhodes
9dbbb2829e Fix some grammar nits. Mainly the use of a' or an' where the opposite
is required.

PR:		33559
Submitted by:	Marc Olzheim <marcolz@ilse.nl>
2002-12-19 22:56:20 +00:00
Ceri Davies
9d99e59872 Grammatical fixup: s/be the -1/be -1/
MFC after: 1 day
2002-12-19 21:48:43 +00:00
Alan Cox
cf3e6e4837 Remove the hash_rand field from struct vm_object. As of revision 1.215 of
vm/vm_page.c, it is unused.
2002-12-19 20:01:22 +00:00
Jake Burkholder
7c6c018c0c Renamed the loader's zipfs to gzipfs. zipfs.c was repo-copied to gzipfs.c. 2002-12-19 19:34:59 +00:00
Tom Rhodes
6b9ba891c0 Remove reference to a non-existant manual page && add a cross-reference to
ulpt(4)
2002-12-19 19:00:51 +00:00
Tom Rhodes
2c5aad3607 Tweak the grammar in the device.hints(5) manual page.
PR:		45893
Submitted by:	Chris Pepper <pepper@rockefeller.edu> (Original Version)
2002-12-19 18:26:26 +00:00
Poul-Henning Kamp
cea573842c Don't forget our topology lock in the MBREXT case. 2002-12-19 12:01:19 +00:00
Ruslan Ermilov
8d436e783f Make accept(), connect(), recvfrom(), recvmsg(), sendmsg(),
and sendto() cancelation points, as required by POSIX.1-2001.

Reviewed by:	deischen
2002-12-19 11:39:20 +00:00
Tim J. Robbins
c0dd63a8a8 Add back the Standards section claiming conformance to 1003.1-2001 and
C99 now that all known standards-related bugs have been fixed.
2002-12-19 10:24:52 +00:00
Tim J. Robbins
37d2356335 Write the message to stderr, not file descriptor 2, so that perror()
writes to the correct stream if stderr has been redirected with freopen().
2002-12-19 09:53:26 +00:00
Tim J. Robbins
a207a8e3f1 Use strerror_r() to format the error message so that strerror()'s static
buffer does not get clobbered.

ISO/IEC 9899:1999 7.21.6.2 3:
"The implementation shall behave as if no library function calls the
strerror function."
2002-12-19 09:50:10 +00:00
Tim J. Robbins
a932a3f4b5 Add a test program for perror() that demonstrates two bugs in the
current implementation.
2002-12-19 09:46:10 +00:00
Ruslan Ermilov
2efeeba554 mdoc(7) police: "The .Fa argument.". 2002-12-19 09:40:28 +00:00
Ruslan Ermilov
3ca4c01eea mdoc(7) police: Fixed a few .Fa abuses. 2002-12-19 09:33:34 +00:00
Ruslan Ermilov
454e286809 mdoc(7) police: excessive quotes. 2002-12-19 08:13:27 +00:00
Marcel Moolenaar
00d3053746 o Use sysctl machdep.acpi_root to get the physical address of the
RSDP. Scan the first 1MB on i386 if the sysctl fails,
o  Extend struct ACPIrsdp with the ACPI 2.0 fields which involves
   changing a prior reserved field into the ACPI revision,
o  Only calculate the RSDP checksum on the first 20 bytes to remain
   compatible with ACPI 1.0 tables; we don't check the extended
   checksum covering the whole table,
o  Use the length field in the RSDP to map the RSDP into the address
   space so that we don't have to know about future extensions here.
2002-12-19 08:06:53 +00:00
Alan Cox
24c9ad6bed - Remove vm_page_sleep_busy(). The transition to vm_page_sleep_if_busy(),
which incorporates page queue and field locking, is complete.
 - Assert that the page queue lock rather than Giant is held in
   vm_page_flag_set().
2002-12-19 07:23:46 +00:00
Greg Lehey
b3c88ce1f2 Clarify dates and place of Konrad Zuse's birth and death. Despite
calculations reportedly made by Intel Pentium processors, he died
exactly one time.
2002-12-19 05:14:35 +00:00
David E. O'Brien
e449f33efb Embellish the manpage.
Obtained from:	NetBSD
2002-12-19 04:41:54 +00:00
David E. O'Brien
edc3fe2db6 Update for the 20021213 version. 2002-12-19 04:34:00 +00:00
David E. O'Brien
6825c07db3 This commit was generated by cvs2svn to compensate for changes in r108072,
which included commits to RCS files with non-trunk default branches.
2002-12-19 04:33:15 +00:00
David E. O'Brien
72969a2212 Vendor import of bwk's 13-Dec-2002 release. 2002-12-19 04:33:15 +00:00
Garrett Wollman
06d7d664b3 Spell `unsigned short' in a way which does not depend on namespace pollution.
Note that this is still the wrong type, but we are not ready to break the
ABI; this change simply allows programs which specify a strict SUSv3
namespace to compile.  (They may still have semantic errors, since SUSv3
specifies correct types.)
2002-12-19 02:52:23 +00:00
Tim J. Robbins
7d5a41c359 Test that if the buffer argument (`s') to wcrtomb() is NULL then
the value of the supplied wide character is ignored and L'\0' is used
instead. Remove incorrect comments about "internal buffer" since wcrtomb()
does not have one (wctomb() does).
2002-12-19 02:01:39 +00:00