Commit Graph

47803 Commits

Author SHA1 Message Date
Pawel Jakub Dawidek
e943975c69 Properly free resources if g_access() fails. 2004-07-06 16:29:32 +00:00
Dag-Erling Smørgrav
de47739e71 Push WARNS back up to 6, but define NO_WERROR; I want the warts out in the
open where people can see them and hopefully fix them.
2004-07-06 12:15:24 +00:00
Dag-Erling Smørgrav
9fa0fd2682 Introduce inline {ip,udp,tcp}_next() functions which take a pointer to an
{ip,udp,tcp} header and return a void * pointing to the payload (i.e. the
first byte past the end of the header and any required padding).  Use them
consistently throughout libalias to a) reduce code duplication, b) improve
code legibility, c) get rid of a bunch of alignment warnings.
2004-07-06 12:13:28 +00:00
Peter Grehan
d0540ed535 - trailing white-space cleanup
- add call to thread_user_enter for P_SA processes before
  trap processing ala all other arches
2004-07-06 11:46:56 +00:00
Alfred Perlstein
14af415c34 use vfs_suser() to restrict access to the nfs mount's timeout. 2004-07-06 09:40:44 +00:00
Alfred Perlstein
1ea6061793 Use vfs_suser() where appropriate. 2004-07-06 09:39:32 +00:00
Alfred Perlstein
ea0104b032 Introduce vfs_suser(), used to test if a user should have special privs
for a mount.
2004-07-06 09:37:43 +00:00
Alfred Perlstein
67ac03405a NFS mobility Phase VI:
Export NFS mount state via sysctl.
Export timeout via sysctl.
2004-07-06 09:23:17 +00:00
Dag-Erling Smørgrav
e3e2c21639 Rewrite twowords() to access its argument through a char pointer and not
a short pointer.  The previous implementation seems to be in a gray zone
of the C standard, and GCC generates incorrect code for it at -O2 or
higher on some platforms.
2004-07-06 09:22:18 +00:00
Alfred Perlstein
c713aaaeca NFS mobility PHASE I, II & III (phase VI, and V pending):
Rebind the client socket when we experience a timeout.  This fixes
the case where our IP changes for some reason.

Signal a VFS event when NFS transitions from up to down and vice
versa.

Add a placeholder vfs_sysctl where we will put status reporting
shortly.

Also:
Make down NFS mounts return EIO instead of EINTR when there is a
soft timeout or force unmount in progress.
2004-07-06 09:12:03 +00:00
Dag-Erling Smørgrav
95347a8ee0 Temporarily lower WARNS to 3 while I figure out the alignment issues on
alpha.
2004-07-06 08:44:41 +00:00
David E. O'Brien
42f74b8ddf In the spirit of amd64/include/stdarg.h rev 1.6; add __va_copy
(but keep it conditional on __ISO_C_VISIBLE >= 1999.

Why?  Our out /usr/src/contrib assumes it, and more than a few ports have
an autoconf that looks for __va_copy because it is available on glibc.
It is critical that we use it on PowerPC.  It generally isn't a problem
for i386 and its ilk because those platforms can get away with cheating
the C standard, using a plain assignment.
2004-07-06 07:47:09 +00:00
Ruslan Ermilov
f29897b67d Catch up with the new world order of Netgraph metas.
(This one was the last, according to grep(1).)

Submitted by:	Gleb Smirnoff
2004-07-06 06:43:45 +00:00
Robert Watson
df623e3c2f Temporarily disable preemption in SCHED_ULE due to reported panics and
hangs due to recent preemption changes.  This change appears to remove
the panic that I was running into, but at the cost of increasing
ithread scheduling latency, and as such is a temporary band-aid until
jhb has a chance to resolve the ule<->preemption interaction that is
the source of the problem.  If it doesn't fix the problem for others--
sorry!
2004-07-06 05:57:29 +00:00
Nate Lawson
52702e98d2 Use the proper type and then cast on assignment. This fixes warning when
building with -O2.
2004-07-06 04:56:31 +00:00
Bruce M Simpson
ca28620f0d Use M_ZERO instead of bzero(). 2004-07-06 03:34:16 +00:00
Bruce M Simpson
9b3d77e7c9 Be consistent and use bzero() instead of memset(). 2004-07-06 03:29:41 +00:00
Bruce M Simpson
b3c9a01e5e Use M_ZERO instead of memset() (!). 2004-07-06 03:28:24 +00:00
Bruce M Simpson
e1a8c3dc33 Use M_ZERO instead of bzero(). 2004-07-06 03:26:26 +00:00
Peter Grehan
45329b8ee6 Add 32-bit framebuffer support. Tested on PearPC at lo-res, too painful
to watch at hi-res.
2004-07-06 03:22:05 +00:00
Bruce M Simpson
60323f48bd Replace a bzero() after malloc() with M_ZERO. 2004-07-06 03:16:55 +00:00
Bruce M Simpson
832cb4aef7 Style. 2004-07-06 03:07:50 +00:00
Bruce M Simpson
a11e2f18d9 Eliminate unneeded return keywords. 2004-07-06 02:48:29 +00:00
Bruce M Simpson
59b5d93482 Whitespace pass 2004-07-06 02:46:53 +00:00
Alan Cox
c9a217d2ed Style changes to pmap_extract(). 2004-07-06 02:33:11 +00:00
Bruce M Simpson
9bd86a9861 Properly brucify a string by outdenting it. 2004-07-06 02:27:30 +00:00
Alan Cox
8fe61389a7 - Correct pmap_extract()'s return type. It should be vm_paddr_t, not
vm_offset_t.
 - Convert pmap_extract() to the ANSI style of declaration.
2004-07-05 23:18:48 +00:00
Alan Cox
56b093883a Correct pmap_extract()'s return type. It should be vm_paddr_t, not
vm_offset_t.
2004-07-05 23:08:27 +00:00
Bruce M Simpson
b4e8c523d0 Whitespace nit 2004-07-05 22:52:01 +00:00
Bruce M Simpson
244f35108f Eliminate redundant return keywords. 2004-07-05 22:50:52 +00:00
Bruce M Simpson
140c64b1fc Whitespace pass. 2004-07-05 22:46:28 +00:00
Bruce M Simpson
03b37a461e style(9):
- Space before bracketized non-void function returns.
 - Space before condition for conditional blocks.
2004-07-05 22:42:07 +00:00
Bruce M Simpson
fb7411a6c9 Eliminate redundant return keywords. 2004-07-05 22:36:48 +00:00
Bruce M Simpson
fdafab8443 Whitespace nits 2004-07-05 22:35:18 +00:00
Bruce M Simpson
892b9d7758 style(9) pass on prototypes. 2004-07-05 22:27:26 +00:00
Don Lewis
27875d9c88 Unconditionally set last_work_seen while in the SYNCER_RUNNING state
so that last_work_seen has a reasonable value at the transition
to the SYNCER_SHUTTING_DOWN state, even if net_worklist_len happened
to be zero at the time.

Initialize last_work_seen to zero as a safety measure in case the
syncer never ran in the SYNCER_RUNNING state.

Tested by:	phk
2004-07-05 21:32:01 +00:00
Pawel Jakub Dawidek
a2e31b8b53 - Add 'stop' command, which works just like 'destroy' command, but sounds
less dangerous.
- Update manual pages and extend examples.
- Bump versions.
2004-07-05 21:16:37 +00:00
Poul-Henning Kamp
de0b7a6307 Allocate the DMA channel shareable and only aquire it while the
device is open.  This allows certain old and rather special dual
floppy controllers to work on both channels, as long as you only
have one open at a time.
2004-07-05 20:56:06 +00:00
Poul-Henning Kamp
91ea86d7e8 Something funny happened on the way to the floppy driver today...
When two drivers share an ISA DMA channel, they both call isa_dmainit()
and the second call fails if DIAGNOSTIC is on.

If isa_dmainit() was already called successfully, just return silently.

This only works if both drivers agree on the bounce buffer size,
but since sharing DMA is usually only possible on very special
hardware and then typically only for devices of the same type (which
would have multiple instances of the same device driver), this is
not a problem in practice.
2004-07-05 20:37:42 +00:00
Robert Watson
6a72b225b7 Drop the socket buffer lock around a call to m_copym() with M_TRYWAIT.
A subset of locking changes to soreceive() in the queue for merging.

Bumped into by:	Willem Jan Withagen <wjw@withagen.nl>
2004-07-05 19:29:33 +00:00
Warner Losh
c928d0b956 Remove now obsolete port assignments and sizes. These more properly
belong in the respective drivers.  I've not removed ALL of them, as a
few still haven't moved.  I've just removed the ones that aren't used.

# these can be removed from amd64, but I'm having issues getting to
# sledge at the moment for a build.
2004-07-05 18:39:30 +00:00
Warner Losh
436e887e9c Add another ifdef... 2004-07-05 17:58:03 +00:00
Warner Losh
969947cbe7 These option roms are defined in the ISA standard, and in the ISA
hole, so call them ISA Options rom(s).
2004-07-05 17:26:04 +00:00
Alan Cox
fa8c78c043 MFamd64/i386
Add partial pmap locking.

Tested by:	kensmith@
2004-07-05 16:59:56 +00:00
Robert Watson
28b8605232 In the BPF and ethernet bridging code, don't allow callouts to execute
without Giant if we're not debug.mpsafenet=1.
2004-07-05 16:28:31 +00:00
Pawel Jakub Dawidek
1b39b2f671 g_clone_bio() can fail, be ready for this.
Approved by:	le
2004-07-05 13:24:22 +00:00
Dag-Erling Smørgrav
ed01a58215 Make libalias WARNS?=6-clean. This mostly involves renaming variables
named link, foo_link or link_foo to lnk, foo_lnk or lnk_foo, fixing
signed / unsigned comparisons, and shoving unused function arguments
under the carpet.

I was hoping WARNS?=6 might reveal more serious problems, and perhaps
the source of the -O2 breakage, but found no smoking gun.
2004-07-05 11:10:57 +00:00
Dag-Erling Smørgrav
ffcb611a9d Parenthesize return values. 2004-07-05 10:55:23 +00:00
Dag-Erling Smørgrav
f311ebb4ec Mechanical whitespace cleanup. 2004-07-05 10:53:28 +00:00
Bruce M Simpson
8e798292c9 Locking cleanup for rl(4).
- Eliminate the use of a recursive mutex.
 - Mark the driver INTR_MPSAFE.

This work is incomplete and will be refined in a future commit.
 - Most notably, _locked() variants of entry points need to be introduced.
 - The mii upcall/downcall may still be racy.
 - Add a stubbed-out guard against racing rl_detach() for the time being.

Tested on:	UP, debug.mpsafenet && !debug.mpsafenet
Reviewed by:	silence on -net
2004-07-05 02:51:32 +00:00