Commit Graph

113690 Commits

Author SHA1 Message Date
phk
5443e9818b Remove inode fields previously used for private inode hash tables. 2005-03-16 08:09:52 +00:00
harti
35b09a0244 Fix a comment. 2005-03-16 08:06:28 +00:00
harti
fe00d22104 Get rid of another bunch of Lst_ForEach in favour of LST_FOREACH and
simplify code accordingly.
2005-03-16 08:04:45 +00:00
jmg
15cfd58a9c MFp4: print a more useful error when we don't have a /dev to mount devfs
on..
2005-03-16 08:04:39 +00:00
jmg
0ef117a450 MFp4: add in making fiq's work by coping to the correct page incase we have
the vectors relocated high..
2005-03-16 07:56:21 +00:00
jmg
40dbd0165c fix up white space, I had a simple comment fix, but I might as well do the
rest while I'm here...
2005-03-16 07:53:02 +00:00
phk
e61634909a Add mnt_hashseed to struct mount and initialize it witn PRNG bits, use
it to get better hashing in vfs_hash.

In case of an insert collision in vfs_hash_insert(), put the loosing vnode
on a special list so that vfs_hash_remove() can just assume that it is on
a list.

Drop the VI_HASHED flag.
2005-03-16 07:35:06 +00:00
phk
eeb2c527c0 XXX: unnecessary pointer in inode. 2005-03-16 07:21:38 +00:00
phk
9189809602 Don't store the disk cdev in all inodes. 2005-03-16 07:17:39 +00:00
phk
2966b28e5f Don't hold a reference to the disk vnode for each inode.
Don't store the disk cdev in all inodes, it's only used for debugging
printfs.
2005-03-16 07:13:09 +00:00
sam
e123d63d3f plug resource leak
Noticed by:	Coverity Prevent analysis tool
2005-03-16 05:27:19 +00:00
sam
bf58395732 correct bounds check
Noticed by:	Coverity Prevent analysis tool
2005-03-16 05:11:11 +00:00
iedowse
d13bfa1af7 Enable ehci by default on i386 and amd64. It had got to the stage
where having this disabled was actually hurting us, since so many
BIOSes include legacy USB emulation that takes control of all usb
ports and only the ehci driver knows how to disable it.
2005-03-16 02:34:50 +00:00
brueffer
fa09d33f04 Chase location of scd.c and bump .Dd.
Submitted by:	markus
MFC after:	3 days
2005-03-16 02:03:15 +00:00
jmg
fdf23f69c0 make bus_dmamem_alloc always allocate a new map like we are suppose to..
This was found when I tried to run the usb code on my arm board...

Approved by:	cognet
2005-03-16 00:35:59 +00:00
imp
8f67ba140a Clarify that the end argument meaning for rman_reserve_resource_bound
is the highest acceptable value for the ending of the resource being
allocated.  One could also believe that it is the highest starting
value of the resource.  The code definitely expects the former, but I
could find no documentation of this apart from TFSC.
2005-03-15 23:58:55 +00:00
imp
aee111f2a1 If bus_generic_susped returns an error, devlist is not freed. Free it.
Submitted by: Ted Unangst (using the Coverity Prevent analysis tool)
2005-03-15 22:53:31 +00:00
phk
909be0f0c2 Don't hold a reference to the disk vnode for each inode.
Eliminate cdev and vnode pointer to the disk from the inodes,
the mount holds everything we need.
2005-03-15 21:09:52 +00:00
phk
c3c76f8185 Eliminate cdev pointer in inodes, they're not used or needed.
The cdev could have been pulled out of the mountpoint cheaper back
when it was used anyway.
2005-03-15 20:57:25 +00:00
phk
54d4b170ba Don't hold a reference on the disk vnode for each inode. 2005-03-15 20:50:58 +00:00
imp
2417261e25 Sometimes, when asked to return region A..C, we'd return A+N..C+N
instead of failing.

When looking for a region to allocate, we used to check to see if the
start address was < end.  In the case where A..B is allocated already,
and one wants to allocate A..C (B < C), then this test would
improperly fail (which means we'd examine that region as a possible
one), and we'd return the region B+1..C+(B-A+1) rather than NULL.
Since C+(B-A+1) is necessarily larger than C (end argument), this is
incorrect behavior for rman_reserve_resource_bound().

The fix is to exclude those regions where r->r_start + count - 1 > end
rather than r->r_start > end.  This bug has been in this code for a
very long time.  I believe that all other tests against end are
correctly done.

This is why sio0 generated a message about interrupts not being
enabled properly for the device.  When fdc had a bug that allocated
from 0x3f7 to 0x3fb, sio0 was then given 0x3fc-0x404 rather than the
0x3f8-0x3ff that it wanted.  Now when fdc has the same bug, sio0 fails
to allocate its ports, which is the proper behavior.  Since the probe
failed, we never saw the messed up resources reported.

I suspect that there are other places in the tree that have weird
looping or other odd work arounds to try to cope with the observed
weirdness this bug can introduce.  These workarounds should be located
and eliminated.

Minor debug write fix to match the above test done as well.

'nice' by: mdodd
Sponsored by: timing solutions (http://www.timing.com/)
2005-03-15 20:28:51 +00:00
imp
a5a3d20d00 Fix a debugging printf. The order of start/end was inconsistant with
all the other start/end debugs, causing momentary confusion when the
output was examined.
2005-03-15 20:15:15 +00:00
phk
d043926750 Improve the vfs_hash() API: vput() the unneeded vnode centrally to
avoid replicating the vput in all the filesystems.
2005-03-15 20:00:03 +00:00
obrien
9251389b0e Remove OBE comment about AMD64 memory model. 2005-03-15 18:44:51 +00:00
obrien
8785d9930a Ensure GCC does not use FP registers in integer code.
I think all we really need is -fno-sse2.
I really don't like cluttering up the compiler invocation,
but this bigger hammer will fix reported problems for now.
2005-03-15 18:43:36 +00:00
das
a84bfd6e04 Remove fpsetsticky(). This was added for SysV compatibility, but due
to mistakes from day 1, it has always had semantics inconsistent with
SVR4 and its successors.  In particular, given argument M:

- On Solaris and FreeBSD/{alpha,sparc64}, it clobbers the old flags
  and *sets* the new flag word to M.  (NetBSD, too?)
- On FreeBSD/{amd64,i386}, it *clears* the flags that are specified in M
  and leaves the remaining flags unchanged (modulo a small bug on amd64.)
- On FreeBSD/ia64, it is not implemented.

There is no way to fix fpsetsticky() to DTRT for both old FreeBSD apps
and apps ported from other operating systems, so the best approach
seems to be to kill the function and fix any apps that break.  I
couldn't find any ports that use it, and any such ports would already
be broken on FreeBSD/ia64 and Linux anyway.

By the way, the routine has always been undocumented in FreeBSD,
except for an MLINK to a manpage that doesn't describe it.  This
manpage has stated since 5.3-RELEASE that the functions it describes
are deprecated, so that must mean that functions that it is *supposed*
to describe but doesn't are even *more* deprecated.  ;-)

Note that fpresetsticky() has been retained on FreeBSD/i386.  As far
as I can tell, no other operating systems or ports of FreeBSD
implement it, so there's nothing for it to be inconsistent with.

PR:		75862
Suggested by:	bde
2005-03-15 15:53:39 +00:00
harti
0ce269a189 Ups. Revert the last commits. These have been committed by accident. 2005-03-15 15:10:51 +00:00
harti
6fc3b6df1c modifier_M: instead of going through the string twice to compute the
size of the buffer we need, just allocate the possible maximum.

Patch:		7.117

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-03-15 15:05:14 +00:00
jmg
c3d17f2e03 fix arm wrt to busdma...
also wrap the two macros that have bare if's w/ do {} while(0) so that
my epe driver doesn't get a warning about braces around confused else...
2005-03-15 14:57:30 +00:00
philip
5c298acd0a time_t is signed, so s/uintmax_t/intmax_t/g. Has anyone got an extra pointy
hat for me?  I'm running out of them.

Spotted by:	des
Pointy hat to:	philip
2005-03-15 14:52:11 +00:00
harti
7bd6f53de6 Style: Move a variable from a local scope up to the begin of the function.
Rename result variable so common code becomes more visible.
Rename freePtr to freeResult to make clear what pointer must be freed.

Patch:		7.116, 7.116a

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-03-15 14:52:10 +00:00
jeff
d289cc6b5d - Now that there are no external users of vfree() make it static.
- Move VSHOULDBUSY, VSHOULDFREE, and VTRYRECYCLE into vfs_subr.c so
   no one else attempts to grow a dependency on them.
 - Now that objects with pages hold the vnode we don't have to do unlocked
   checks for the page count in the vm object in VSHOULDFREE.  These three
   macros could simply check for holdcnt state transitions to determine
   whether the vnode is on the free list already, but the extra safety
   the flag affords us is probably worth the minimal cost.
 - The leafonly sysctl and code have been dead for several years now,
   remove the sysctl and the code that employed it from vtryrecycle().
 - vtryrecycle() also no longer has to check the object's page count as
   the object holds the vnode until it reaches 0.

Sponsored by:	Isilon Systems, Inc.
2005-03-15 14:38:16 +00:00
phk
2116975c84 Dike out unwarranted si_udev fondling. 2005-03-15 14:30:26 +00:00
harti
384241be9f Get rid of a number of Lst_ForEach calls in favour of LST_FOREACH
and simplify the printing functions.
2005-03-15 14:28:39 +00:00
harti
84812666f6 VarParseLong: move the detection of the modifier separator ':' into
the loop. Add a comment why the 'consumed' variable is updated.
Rename lengthPtr to consumed.

Patch:		7.115

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-03-15 14:27:29 +00:00
phk
9979dac9ca Dike out unwarranted reference to si_udev. 2005-03-15 14:26:14 +00:00
harti
db06c5de06 Yet another version of passing the last line to ParseFinishLine().
It turns out that some ports use the obscure feature of spreading
a dependency block across multiple include files. While this seems
bad style, allow it for now and call said function only at end of
all input to process the really last line of everything.
2005-03-15 14:25:24 +00:00
jeff
d1b34cc38c - In vm_page_insert() hold the backing vnode when the first page
is inserted.
 - In vm_page_remove() drop the backing vnode when the last page
   is removed.
 - Don't check the vnode to see if it must be reclaimed on every
   call to vm_page_free_toq() as we only check it now when it is
   actually required.  This saves us two lock operations per call.

Sponsored by:	Isilon Systems, Inc.
2005-03-15 14:14:09 +00:00
jeff
67bf6d96ea - Remove the now unused LK_THISLAYER. 2005-03-15 14:12:10 +00:00
phk
9e33e49ed5 Fix a debug message to print a usable device name rather than useless
major+minor tupple.
2005-03-15 14:08:10 +00:00
jeff
57fd917aad - Assume that all lower filesystems now support proper locking. Assert
that they set v->v_vnlock.  This is true for all filesystems in the
   tree.
 - Remove all uses of LK_THISLAYER.  If the lower layer is locked, the
   null layer is locked.  We only use vget() to get a reference now.
   null essentially does no locking.  This fixes LOOKUP_SHARED with
   nullfs.
 - Remove the special LK_DRAIN considerations, I do not believe this is
   needed now as LK_DRAIN doesn't destroy the lower vnode's lock, and
   it's hardly used anymore.
 - Add one well commented hack to prevent the lowervp from going away
   while we're in it's VOP_LOCK routine.  This can only happen if we're
   forcibly unmounted while some callers are waiting in the lock.  In
   this case the lowervp could be recycled after we drop our last ref
   in null_reclaim().  Prevent this with a vhold().
2005-03-15 13:49:33 +00:00
jeff
2115694bbc - Expose vholdl() so it may be used outside of vfs_subr.c 2005-03-15 13:43:10 +00:00
phk
7e1186083a Remove findcdev(). 2005-03-15 12:58:08 +00:00
phk
7200c222c7 Polish. 2005-03-15 12:47:59 +00:00
phk
651dd9f4d4 Disable two users of findcdev. They do the wrong thing now and will
need to be fixed.  In both cases the API should be reengineered to do
something (more) sensible.
2005-03-15 12:39:30 +00:00
maxim
aa4d5cb803 o Add missed language doc subdirectories, sort.
PR:		docs/78859
Submitted by:	skv
2005-03-15 12:21:44 +00:00
phk
9cea99e06b Neuter the duplicated disk-device magic code for now. Somebody with
serious linux-clue is necessary to fix this properly.
2005-03-15 11:58:40 +00:00
grehan
78468950e3 Prepend underscore to bus_dmamap_{unload|sync} in line with
recent busdma changes.
2005-03-15 11:43:05 +00:00
grehan
f7e419df97 Include <sys/signalvar.h> for trapsignal prototype. 2005-03-15 11:41:55 +00:00
grehan
5b55ad0716 Long overdue sync-up with ATA code 2005-03-15 11:41:05 +00:00