Commit graph

34737 commits

Author SHA1 Message Date
Bruce Evans e9a6d3b44c Removed unused includes. Sorted includes. This is part of removing
includes of <sys/user.h> for its pollution only.  <sys/user.h> wasn't
even used for its pollution here.
2002-09-15 17:45:10 +00:00
Bruce Evans bb5603ae9e Garbage-collected splmem.
Moved the declaration of malloc_mtx to be with the other extern declarations
and not exposed to userland.

Fixed some minor style bugs.
2002-09-15 17:10:18 +00:00
Bruce Evans 99d1c26b7d Removed most namespace pollution in this header: don't include <vm/uma.h>;
include <sys/_mutex.h> and its prerequisites instead of <sys/mutex.h> and
its prerequisite.
2002-09-15 16:48:25 +00:00
David Malone 93f39ea88a Some BIOSs are using MTRR values that are only documented under NDA
to control the mapping of things like the ACPI and APM into memory.

The problem is that starting X changes these values, so if something
was using the bits of BIOS mapped into memory (say ACPI or APM),
then next time they access this memory the machine would hang.

This patch refuse to change MTRR values it doesn't understand,
unless a new "force" option is given. This means X doesn't change
them by accident but someone can override that if they really want
to.

PR:		28418
Tested by:	Christopher Masto <chris@netmonger.net>,
		David Bushong <david@bushong.net>,
		Santos <casd@myrealbox.com>
MFC after:	1 week
2002-09-15 15:07:55 +00:00
Bruce Evans 8556ba2b73 Define __LONG_LONG_SUPPORTED if the compiler claims to support C99.
Don't set __LONG_LONG_SUPPORTED for gcc-1.  I didn't check exactly
when gcc started to support long long, but it was in the version
of gcc in FreeBSD-1.0 (gcc-2.4.5).

Other C99 features should be ifdefed similarly, but the ifdefs for
old versions of gcc will be more complicated since the features
weren't in all versions of gcc-2.
2002-09-15 14:17:29 +00:00
Bruce Evans 1b861caae0 Include <sys/systm.h> instead of depending on namespace pollution 2
layers deep in <sys/malloc.h> or 1 layer deep in <net/if_var.h>.
2002-09-15 13:54:12 +00:00
Poul-Henning Kamp 06f50eb1ad Remove the unused _bio_buf field. I can't even remember if this ever got
to be used in the first place.

Spotted by:	bde
2002-09-15 12:50:37 +00:00
Eric Anholt 81ac2d2606 Fix i810 after i830 commit.
Submitted by:	David Dawes <dawes@XFree86.Org>
2002-09-15 08:43:23 +00:00
Bruce Evans ab85003bf5 Fixed breakage from removing the used include of <sys/buf.h> in the
previous commit:
Include <sys/mutex.h> and its prerequisite <sys/lock.h> instead of
depending on namespace pollution in <sys/buf.h>.  Only do this in the
__FreeBSD_version > 500000 case although the __FreeBSD_version < 500000
case has already rotted.
2002-09-15 08:21:14 +00:00
Juli Mallett 59c25132c2 Make a comment reflect less of a lie, NOCPU is used to generally mean that we
are not on a specific CPU in a distributed system, certainly not just for
<struct proc>.p_oncpu, which is of course now <struct kse>.ke_oncpu.
2002-09-15 04:45:56 +00:00
Poul-Henning Kamp 028e9e5902 Un-inline the non-trivial "trivial" bio* functions.
Untangle devstat_end_transaction_bio()
2002-09-14 19:34:11 +00:00
Warner Losh bed807193b Add additional information returned to userland by the device querying
functions.  We add pnpinfo, locationinfo, devflags (the newbus flags
on the device), flags (the flags that device_get_flags returns) and
state to the list of things we return.

pnpinfo and locationinfo are place holders at the moment that will be
filled in by the device's parent (optionally).  Userland programs will
likely use this information from time to time and take appropriate
actions.

Improvements to devinfo to follow.
2002-09-14 19:15:12 +00:00
Poul-Henning Kamp 2f11d560cc remove #includes of <sys/bio.h> where not needed. 2002-09-14 18:59:32 +00:00
Poul-Henning Kamp 296bbb4cfb FreeBSD -current doesn't need <sys/buf.h> or <sys/bio.h>. 2002-09-14 18:58:36 +00:00
Nate Lawson c1e2d3866f Move setugidsafety() call outside of process lock. This prevents a lock
recursion when closef() calls pfind() which also wants the proc lock.
This case only occurred when setugidsafety() needed to close unsafe files.

Reviewed by:	truckman
2002-09-14 18:55:11 +00:00
Thomas Moestl ac9e4b5aea Use the definitions in machine/fsr.h instead of duplicating these magic
numbers here (the values need to correspond to the %fsr ones for some
libc functions to work right).
2002-09-14 18:00:44 +00:00
Thomas Moestl 351c67842f Clean up a bit, and add some more macros to access %fsr fields. 2002-09-14 17:58:54 +00:00
Scott Long d594cee0e0 kthread.h is not needed 2002-09-14 16:54:46 +00:00
Maxime Henrion 8179ab99d6 Remove a conditional #include <sys/kernel.h>, it is already
included unconditionally before.

Submitted by:	Olivier Houchard <cognet@ci0.org>
2002-09-14 14:44:41 +00:00
Nate Lawson 06be2aaa83 Remove all use of vnode->v_tag, replacing with appropriate substitutes.
v_tag is now const char * and should only be used for debugging.

Additionally:
1. All users of VT_NTS now check vfsconf->vf_type VFCF_NETWORK
2. The user of VT_PROCFS now checks for the new flag VV_PROCDEP, which
is propagated by pseudofs to all child vnodes if the fs sets PFS_PROCDEP.

Suggested by:   phk
Reviewed by:    bde, rwatson (earlier version)
2002-09-14 09:02:28 +00:00
Benno Rice fcfa0b48b3 Reference the socket we're accepting. 2002-09-14 08:56:10 +00:00
Julian Elischer e6e24ff9cd Apparently something down in the guts of vm/uvm still needs giant
Obtained from:	 mini via P4 KSE tree.
2002-09-14 06:23:43 +00:00
Matt Jacob 9fb117143b Put firewire under architectures it actually might conceivably
build on, let alone actually do some useful work on real hardware.

Namely, put it in i386/pc98. There is no bus_dma.h on the other architecures,
tra la.
2002-09-14 02:05:33 +00:00
Archie Cobbs cc78c48a68 Relax checking of incoming PPTP GRE packets a bit: ignore a bogus payload
length field when there's no payload indicated by the header 'S' bit.
This works around semi-brokenness in the Mac OS X PPTP client.
2002-09-14 00:00:49 +00:00
Peter Wemm 8b10ca9ba9 The nfsroot code should be conditional on NFSCLIENT, not NFS (which no
longer exists as an option)
2002-09-13 20:29:42 +00:00
Mike Barcroft 6b2a2e4ee9 mlockall() and munlockall() are unimplemented; remove their prototypes. 2002-09-13 18:29:15 +00:00
Warner Losh af656bf76b For boot verbose, print resources assigned in a more asthetically pleasing
way.

PR: 42745 (although done in a different way)
2002-09-13 16:23:41 +00:00
Thomas Moestl 4e115a85ab Fix fcntl(..., F_GETOWN, ...) and fcntl(..., F_SETOWN, ...) on sparc64
by not passing a pointer to a register_t or intptr_t when the code in
the lower layers expects one to an int.
2002-09-13 15:15:16 +00:00
Katsushi Kobayashi f3a49419c0 Add firewire module 2002-09-13 12:42:57 +00:00
Katsushi Kobayashi 3c60ba66c4 Initial import for IEEE1394 OHCI chipdet device driver and SBP-2 (Serial
Bus Protocol 2:SCSI over IEEE1394) support for CAM.
2002-09-13 12:31:56 +00:00
Poul-Henning Kamp c51f3753df "Fix" printf format issues by using %j
Sponsored by:	DARPA & NAI Labs.
2002-09-13 11:41:25 +00:00
Poul-Henning Kamp 53706245bb Use biowait() rather than DIY.
Sponsored by:	DARPA & NAI Labs
2002-09-13 11:39:11 +00:00
Poul-Henning Kamp 02aad38c79 Fix a bug were a struct bio was freed and certain members subsequently
examined.  Use biowait() instead of DIY.
2002-09-13 11:37:38 +00:00
Poul-Henning Kamp c7143e7150 Oops, broke the build there. Uninline biodone() now that it is non-trivial.
Introduce biowait() function.  Currently there is a race condition and the
mitigation is a timeout/retry.  It is not obvious what kind of locking (if any)
is suitable for BIO_DONE, since the majority of users take are of this
themselves, and only a few places actually rely on the wakeup.

Sponsored by: DARPA & NAI Labs.
2002-09-13 11:28:31 +00:00
Poul-Henning Kamp 9f6f6b7c2b Make biodone() default to wakeup() on the struct bio if no bio_done
method was specified.
2002-09-13 11:00:48 +00:00
Poul-Henning Kamp 85b62edb84 Add a couple more of the big/little-endian conversion routines and make
them visible from userland, if need be.

I wish that the C language contained this as part of struct definintions,
but failing that, I would settle for an agreed upon set of functions for
packing/unpacking integers in various sizes from byte-streams which may
have unfriendly alignment.

This really belongs in <sys/endian.h> I guess.
2002-09-13 10:33:10 +00:00
Maxime Henrion 2dfbcdd46d Fix another two printf() format errors which weren't warned
about because the bio_blknos were bogusly casted to long long.
2002-09-13 09:37:44 +00:00
Don Lewis 28b325aa60 Drop the proc lock while calling fdcheckstd() which may block to allocate
memory.

Reviewed by:	jhb
2002-09-13 09:31:56 +00:00
Maxime Henrion 92faa7b50f Fix another printf() format error which wasn't warned about
because the bio_blkno was bogusly casted to an int.
2002-09-13 09:19:55 +00:00
Maxime Henrion f368af933d Fix a printf() format error on 64 bits architectures.
Also fix some style bugs on the same line.
2002-09-13 09:16:06 +00:00
Maxim Sobolev f013345497 Restore original behaviour of recursion preventer.
Submitted by:   sumikawa
2002-09-13 06:24:27 +00:00
Eric Anholt ea3796796a Fix an i830/i845 test that shouldn't get hit in normal use and remove a printf.
Submitted by:	David Dawes <dawes@XFree86.Org>
2002-09-13 04:17:28 +00:00
John Baldwin 653de878fc Add a blank line to make this more consistent with the rest of the file. 2002-09-12 21:07:06 +00:00
Joerg Wunsch 9a5e3ddb2d Pass the physical instead of the logical block number in
bp->bio_pblkno.  Otherwise, all formats not using 512 byte
physical sectors got screwed.
2002-09-12 20:53:50 +00:00
David E. O'Brien 5908354455 Fix the GENERIC build. Don't refer to the non-existant fw_one_pass. 2002-09-12 15:36:13 +00:00
Søren Schmidt a7089c2c4c Add preliminary mostly untested support for the Silicon Image Sil680 chip. 2002-09-12 15:25:59 +00:00
Thomas Quinot 9bdb4a0a3f Change a couple of splcam() calls that do not make sense in atapi-cam
(what we want to mask is the ATA interrupts, which run at level splbio),
and add interrupt masking around the statement that modifies the
request queue for a SIM.

This resolves problems reported by users under heavy ATAPI load.

Reviewed by:	roberto
2002-09-12 15:15:33 +00:00
Søren Schmidt 35ca7a483a Rearrange where to get the ATAPI magic sequence.
Submitted by: Benjamin Close <cisbjc@cs.unisa.edu.au>
2002-09-12 14:32:33 +00:00
Søren Schmidt 175f0ce5a4 Wait for drive to become ready if its in progress of loading..
Based on patch in PR-42659, but done somewhat differently.

PR: 42659
2002-09-12 13:55:24 +00:00
Søren Schmidt 9d54441f7f Dont hang in atprq on poll_dsc command.
This is a temporary fix until I get proper locking done.

Submitted by: iedowse@maths.tcd.ie
2002-09-12 13:53:33 +00:00