Commit Graph

47986 Commits

Author SHA1 Message Date
Olivier Houchard
55b81ba244 Import a kdb.h for arm, which contains stubs right now. 2004-07-12 21:17:51 +00:00
Nate Lawson
bd0416f2d2 Remove unnecessary softc bzero calls. 2004-07-12 21:15:36 +00:00
Nate Lawson
7a5230b8ad Add the ability to detach a battery. Now batteries that are detached are
also removed from the battery list.
2004-07-12 20:53:04 +00:00
Nate Lawson
752d473505 Update in preparation for adding the ACPI attachment.
* Add an fdtype ivar.  This will be the equivalent of fd->type.
* Move enabling the FIFO to the end of attach.
* Unify reset code into fdc_initial_reset().
* Add fdc_write_ivar().
* Update isa and pccard attachments accordingly.
* Set the flags unconditionally in probe since they may be overridden by
  other probe routines.  Both before and now, we're depending on probe
  being called a final time on the winning driver so the flags we get are
  the ones we intended.
* Use the bus accessor macros instead of defining our own.
* Remove duplicate assigns of fd->type.
2004-07-12 20:49:26 +00:00
Robert Watson
f3ce707a18 Constify 'rpcclnt_backoff'. 2004-07-12 19:37:08 +00:00
Robert Watson
ab89ee6253 Constify 'spx_backoff'. 2004-07-12 19:35:29 +00:00
Robert Watson
7cfc690440 After each label in tcp_input(), assert the inpcbinfo and inpcb lock
state that we expect.
2004-07-12 19:28:07 +00:00
Robert Watson
8375a14422 Procotol control block locking for netatalk DDP. 2004-07-12 18:39:59 +00:00
Robert Watson
dedfa2fb68 Imperfect synchronization solution to imperfect code: use a static 256
byte buffer in the stack for temporary printf results rather than a
global buffer without synchronization.
2004-07-12 18:37:31 +00:00
Robert Watson
598a1cadf1 Remove 'Not used' comment: at_org_code is used, just not in netatalk/. 2004-07-12 18:35:30 +00:00
Alan Cox
26354d4c08 Remove an unused and unimplemented sysctl. (For the record, it was marked
as unimplemented in revision 1.129 nearly six years ago.)
2004-07-12 17:45:37 +00:00
Mike Makonnen
c21e3b38bd writers must hold both sched_lock and the process lock; therefore, readers
need only obtain the process lock.
2004-07-12 15:28:31 +00:00
Robert Watson
ee3c585ae5 Remove 'td = curthread' that shadows the arguments to coda_root().
Missed by:	alfred
2004-07-12 14:11:26 +00:00
Doug Rabson
363eade1f1 Add fwip module. 2004-07-12 13:13:17 +00:00
Doug Rabson
1b2d87d900 Add fwip module.
Submitted by: simokawa
2004-07-12 13:12:56 +00:00
Doug Rabson
d07c9778d0 Make if_fwsubr.c dependant on fwip instead of firewire - there is not
much point including it if you aren't using IP over firewire.
2004-07-12 11:52:14 +00:00
Søren Schmidt
cc97de873c Attempt to handle suspend/resume better. 2004-07-12 10:50:50 +00:00
Alfred Perlstein
993f3fc432 Bump __FreeBSD_version for VFS_ROOT, vflush and kinfo_proc changes. 2004-07-12 08:23:10 +00:00
Alfred Perlstein
f257b7a54b Make VFS_ROOT() and vflush() take a thread argument.
This is to allow filesystems to decide based on the passed thread
which vnode to return.
Several filesystems used curthread, they now use the passed thread.
2004-07-12 08:14:09 +00:00
David Xu
507b03186a Change kse_switchin to accept kse_thr_mailbox pointer, the syscall
will be used heavily in debugging KSE threads. This breaks libpthread
on IA64, but because libpthread was not in 5.2.1 release, I would like
to change it so we needn't to introduce another syscall.
2004-07-12 07:39:20 +00:00
Alfred Perlstein
d58d3648dd Use SO_REUSEADDR and SO_REUSEPORT when reconnecting NFS mounts.
Tune the timeout from 5 seconds to 12 seconds.
Provide a sysctl to show how many reconnects the NFS client has done.

Seems to fix IPv6 from: kuriyama
2004-07-12 06:22:42 +00:00
Marcel Moolenaar
fbc3247d81 Implement the PT_LWPINFO request. This request can be used by the
tracing process to obtain information about the LWP that caused the
traced process to stop. Debuggers can use this information to select
the thread currently running on the LWP as the current thread.

The request has been made compatible with NetBSD for as much as
possible. This implementation differs from NetBSD in the following
ways:
1.  The data argument is allowed to be smaller than the size of the
    ptrace_lwpinfo structure known to the kernel, but not 0. This
    is opposite to what NetBSD allows. The reason for this is that
    we can extend the structure without affecting older binaries.
2.  On NetBSD the tracing process is to set the pl_lwpid field to
    the Id of the LWP it wants information of. We don't do that.
    Our ptrace interface allows passing the LWP Id instead of the
    PID. The tracing process is to set the PID to the LWP Id it
    wants information of.
3.  When the PID is actually the PID of the tracing process, this
    request returns the information about the LWP that caused the
    process to stop. This was the whole purpose of the request in
    the first place.

When the traced process has exited, this request will return the
LWP Id 0, indicating that the process state is not the result of
an event specific to a LWP.
2004-07-12 05:07:50 +00:00
Alfred Perlstein
8a3f1adf3b Reserve a pointer "ki_udata" in kinfo_proc as a convenience for userland. 2004-07-12 04:53:33 +00:00
Robert Watson
943bb929af Introduce a global mtx 'ngsocketlist_mtx' to protect the global
ng_socket list during insert/delete.
2004-07-12 04:45:46 +00:00
Alan Cox
eba90ac75f pmap_remove_pages() must not remove wired mappings. Since
pmap_remove_pages() is an optimization, its implementation is optional.

Discussed with:	grehan
2004-07-12 04:40:26 +00:00
Robert Watson
f011f4041a Mark 'makeup' in ng_frame_relay as const, as its values are immutable. 2004-07-12 04:35:42 +00:00
Robert Watson
effb15c0c5 Remove spl's from netatalk in preparation to merge locking. 2004-07-12 04:33:58 +00:00
Alfred Perlstein
7ae8ce5df1 Dump the actual bad values when this assertion is tripped. 2004-07-12 04:13:38 +00:00
Marcel Moolenaar
f3be7cb3e9 Re-add the gdb command. It was removed to be replaced by something
more generic, but that didn't actually happen. Since the feature to
switch backends (and historically this means from DDB to GDB) is
important, make sure people can do just that until such the generic
mechanism actually sees the light of day.

Suggested by: rwatson@
2004-07-12 01:38:07 +00:00
Marcel Moolenaar
3bcd2440db Make kdb_dbbe_select() available as an interface function. This allows
changing the backend from outside the KDB frontend. For example from
within a backend. Rewrite kdb_sysctl_current to make use of this
function as well.
2004-07-12 01:15:55 +00:00
Robert Watson
a294c3664f Use sockbuf_pushsync() to synchronize stack and socket buffer state
in soreceive() after removing an MT_SONAME mbuf from the head of the
socket buffer.

When processing MT_CONTROL mbufs in soreceive(), first remove all of
the MT_CONTROL mbufs from the head of the socket buffer to a local
mbuf chain, then feed them into dom_externalize() as a set, which
both avoids thrashing the socket buffer lock when handling multiple
control mbufs, and also avoids races with other threads acting on
the socket buffer when the socket buffer mutex is released to enter
the externalize code.  Existing races that might occur if the protocol
externalize method blocked during processing have also been closed.

Now that we synchronize socket buffer and stack state following
modifications to the socket buffer, turn the manual synchronization
that previously followed control mbuf processing with a set of
assertions.  This can eventually be removed.

The soreceive() code is now substantially more MPSAFE.
2004-07-11 23:13:14 +00:00
Poul-Henning Kamp
2e30562054 Remove the last bits of SPECHASH. 2004-07-11 23:03:37 +00:00
Robert Watson
b7562e178c Add sockbuf_pushsync(), an inline function that, following a change to
the head of the mbuf chains in a socket buffer, re-synchronizes the
cache pointers used to optimize socket buffer appends.  This will be
used by soreceive() before dropping socket buffer mutexes to make sure
a consistent version of the socket buffer is visible to other threads.

While here, update copyright to account for substantial rewrite of much
socket code required for fine-grained locking.
2004-07-11 22:59:32 +00:00
Poul-Henning Kamp
9ef295b7e0 Better descriptions of the cdev malloc class and mutex. 2004-07-11 19:26:43 +00:00
Robert Watson
d861372b14 Add additional annotations to soreceive(), documenting the effects of
locking on 'nextrecord' and concerns regarding potentially inconsistent
or stale use of socket buffer or stack fields if they aren't carefully
synchronized whenever the socket buffer mutex is released.  Document
that the high-level sblock() prevents races against other readers on
the socket.

Also document the 'type' logic as to how soreceive() guarantees that
it will only return one of normal data or inline out-of-band data.
2004-07-11 18:29:47 +00:00
Marcel Moolenaar
35e454b36c MFi386: rev 1.213 -- fix DELAY while the debugger is active.
This also fixes the (runtime) breakage introduced in the previous
commit that was the result of a botched merge. This hasn't even
been compile-tested...
2004-07-11 18:07:55 +00:00
Marcel Moolenaar
45cfc0a914 Partially revert previous commit. Calling getit() unconditionally fixed
a problem that could also be fixed differently without reverting previous
attempts to fix DELAY while the debugger is active (rev 1.204). The bug
was that the i8254 implements a countdown timer, while for (k)db_active
a countup timer was implemented. This resulted in premature termination
and consequently the breakage of DELAY. The fix (relative to rev 1.211)
is to implement a countdown timer for the kdb_active case. As such the
ability to step clock initialization is preserved and DELAY does what is
expected of it.

Blushed: bde :-)
Submitted by: bde
2004-07-11 17:50:59 +00:00
Doug Rabson
67f8f14a6e Expand and rewrite documentation using doxygen markup so that we can
generate funky web pages from it.
2004-07-11 16:17:42 +00:00
Doug Rabson
8ff7da8ce8 Pass doxygen doc comments through to the output. 2004-07-11 16:14:24 +00:00
Doug Rabson
a52b6f787c Experimental support for using doxygen to generate kernel documentation. 2004-07-11 16:13:57 +00:00
Darren Reed
99e89d6725 Add sx_unlock() macro as a frontend to both sx_sunlock() and sx_xunlock(),
using sx_cnt to determine what state the lock is in and call the respective
function appropriately.
2004-07-11 16:07:07 +00:00
Warner Losh
fa5afa1df0 Until I'm ready to commit the better pccard probe/attach routines, effectively
comment them out.
2004-07-11 16:01:25 +00:00
Marcel Moolenaar
a8bfba1a27 Fix braino: Make sure there is a current backend before we return its
name in the debug.kdb.current sysctl. All other dereferences are
properly guarded, but this one was overlooked.

Reported by: Morten Rodal (morten at rodal dot no)
2004-07-11 15:22:43 +00:00
Poul-Henning Kamp
911dbd84c7 Introduce ttygone() which indicates that the hardware is detached.
Move dtrwait logic to the generic TTY level.
2004-07-11 15:18:39 +00:00
Yoshihiro Takahashi
167b6b11dd MFi386: revision 1.212. 2004-07-11 13:46:10 +00:00
Yoshihiro Takahashi
fac5bedd49 MFi386: revision 1.406 2004-07-11 13:45:39 +00:00
Darren Reed
781950a42f Clean up a bunch of white-space difference with IPFilter source as well as
remove some superfluous assignments for .d_version/.d_flags in a cdevsw
structure initialisation that never sees the light of day in FreeBSD.
2004-07-11 10:13:05 +00:00
Marcel Moolenaar
bd9e523bb3 Bump __FreeBSD_version for the following (weak) reasons:
o  Sources that are shared between kernel and userland and that may
   contain references to DDB or any of its functions may need to
   know this.
o  Userland tools may include <machine/gdb_machdep.h> from now on.
   Think kernel debugger...
o  The kernel core file now contains the TID of the kernel thread
   that made the dump.
2004-07-11 04:05:44 +00:00
Marcel Moolenaar
e8d5eed9c1 The SC_DISABLE_DDBKEY options has been renamed to SC_DISABLE_KDBKEY. 2004-07-11 03:21:24 +00:00
Marcel Moolenaar
8bcb1e9e84 Add options KDB and GDB. KDB takes on the function of what DDB used
to be. Both DDB and GDB specify which KDB backends to include.
2004-07-11 03:20:09 +00:00