Commit Graph

48288 Commits

Author SHA1 Message Date
alc
039630c255 Remove dead or unused code, such as spl calls. 2004-07-16 21:38:48 +00:00
jhb
a16ed36af9 - Move TDF_OWEPREEMPT, TDF_OWEUPC, and TDF_USTATCLOCK over to td_pflags
since they are only accessed by curthread and thus do not need any
  locking.
- Move pr_addr and pr_ticks out of struct uprof (which is per-process)
  and directly into struct thread as td_profil_addr and td_profil_ticks
  as these variables are really per-thread.  (They are used to defer an
  addupc_intr() that was too "hard" until ast()).
2004-07-16 21:04:55 +00:00
jhb
4ac8793b21 Whitespace fix. 2004-07-16 21:01:52 +00:00
jhb
0b697e15db Improve readability a bit by changing some code at the end of a function
that did:

	if (foo)
		return
	else
		blah

to just do the simpler

	if (!foo)
		blah

instead.
2004-07-16 21:00:50 +00:00
obrien
21a4b88c44 /usr/libexec/ld-elf.so.1 -> /libexec/ld-elf32.so.1 2004-07-16 20:53:00 +00:00
njl
9c234756c2 Use ACPI_ALL_NOTIFY instead of registering handlers separately. 2004-07-16 19:05:40 +00:00
njl
6b1e76c6c9 Fix the alpha (and others) module build by only building fdc_acpi.c on
i386 and amd64.  The only other ACPI machine (ia64) doesn't support
floppy drives.  Tested by:  make MACHINE={pc98,i386,amd64,alpha,sparc64}
2004-07-16 18:37:00 +00:00
ume
bd44ac4197 when IN6P_AUTOFLOWLABEL is set, the flowlabel is not set on
outgoing tcp connections.

Reported by:	Orla McGann <orly@cnri.dit.ie>
Reviewed by:	Orla McGann <orly@cnri.dit.ie>
Obtained from:	KAME
2004-07-16 18:08:13 +00:00
harti
03c1f3ab46 According to POSIX sys/socket.h must define CMSG_NXTHDR but most not
define NULL. This means we cannot use NULL in the definition of CMSG_NXTHDR.
So replace NULL with 0.

PR:		kern/60309
Submitted by:	Jeff King <peff-freebsd@peff.net>
2004-07-16 17:42:48 +00:00
njl
2524448ea1 Fix acpi_video loading. When we started cleaning up the duplicate handles
left around after the PCI probe, acpi_video stopped attaching because while
it was an acpi child device, it really is a PCI device.  Fix this by making
it a PCI child.

* Remove non-handle ivars accesses since child busses only implement
acpi_get_handle().
* Access the acpi softc directly through the devclass instead of through
the implied parent.
* Clean up a potential panic on unload by freeing the sysctl context before
storing NULL in the OID.

Found by:	marks
2004-07-16 16:59:32 +00:00
cperciva
0104aa4550 Add a SUSER_RUID flag to suser_cred. This flag indicates that we want to
check if the *real* user is the superuser (vs. the normal behaviour, which
checks the effective user).

Reviewed by:	rwatson
2004-07-16 15:57:16 +00:00
tanimura
3cd0d94132 Sync the example of MODULES_OVERRIDE with the renamed sound drivers.
Pointed out by:	Christoph Mallon <christoph.mallon@gmx.de>
2004-07-16 08:12:14 +00:00
tanimura
ddf30cc303 Rename snd_pcm as sound. 2004-07-16 07:24:20 +00:00
tanimura
8b9e69258c Rename the sound device drivers:
- `sound'
  The generic sound driver, always required.

- `snd_*'
  Device-dependent drivers, named after the sound module names.
  Configure accordingly to your hardware.

In addition, rename the `snd_pcm' module to `sound' in order to sync
with the driver names.

Suggested by:	cg
2004-07-16 04:00:08 +00:00
alc
4ec86be98f Remove unused fields from the pmap. 2004-07-16 03:42:45 +00:00
rwatson
6a12a2400a Rename Biba and MLS _single label elements to _effective, which more
accurately represents the intention of the 'single' label element in
Biba and MLS labels.  It also approximates the use of 'effective' in
traditional UNIX credentials, and avoids confusion with 'singlelabel'
in the context of file systems.

Inspired by:	trhodes
2004-07-16 02:03:50 +00:00
rwatson
d512f5c72c When entering soclose(), assert that SS_NOFDREF is not already set. 2004-07-16 00:37:34 +00:00
glebius
f1f21dfd62 Use qsort_r() instead of qsort() when sorting links by latency
This helps us to remove a global variable and a mutex protecting it.

Reviewed by:	rwatson
Approved by:	julian (mentor)
2004-07-16 00:07:44 +00:00
glebius
45d57112fd Copy qsort_r(3) from libc to libkern.
Reviewed by:	phk
Approved by:	julian (mentor)
2004-07-15 23:58:23 +00:00
rees
9af11609ee fix array index out of bounds in rpc->rc_srtt[], rpc->rc_sdrtt[]
Noticed by: tedu
Approved by: alfred
2004-07-15 22:21:25 +00:00
phk
ebaeab4118 Preparation commit for the tty cleanups that will follow in the near
future:

rename ttyopen() -> tty_open() and ttyclose() -> tty_close().

We need the ttyopen() and ttyclose() for the new generic cdevsw
functions for tty devices in order to have consistent naming.
2004-07-15 20:47:41 +00:00
le
2093674d9a MFNetBSD.
rev. 1.67, author: mycroft
   Fix a byte order error.

rev. 1.68, author: mycroft
   Adjust some silliness that was causing us to do extra work for
   "frame list rollover" interrupts, which we pretty much ignore.

Obtained from:   NetBSD
2004-07-15 19:25:06 +00:00
alc
5938fa0191 Push down the acquisition and release of the page queues lock into
pmap_protect() and pmap_remove().  In general, they require the lock in
order to modify a page's pv list or flags.  In some cases, however,
pmap_protect() can avoid acquiring the lock.
2004-07-15 18:00:43 +00:00
njl
12f898b2ca Add fdc_acpi to module build, bump WARNS to 2. 2004-07-15 16:44:14 +00:00
njl
949f719df3 Hook up fdc_acpi for the kernel build. 2004-07-15 16:43:52 +00:00
njl
731562d007 Clean up resources properly if attach fails. Always reset ISA drives on
probe.
2004-07-15 16:41:07 +00:00
njl
5facd5b509 Re-work for fdc_acpi. Expose fdc_add_child() and move the static
hints-based probe to fdc_hints_probe().

Also:
* Fix some resource leaks when attach fails.
* Remove the FDC_ATTACHED flag.  It was supposed to prevent multiple
  unloads but this is not necessary.
2004-07-15 16:39:40 +00:00
njl
392a2af12f Add an ACPI floppy drive attachment that probes via the _FDE and _FDI
methods.  It also now handles ordinary floppy drive probing for drives
attached to ACPI.

Reviewed by:	imp
2004-07-15 16:38:07 +00:00
jhb
e334b5168b Fix a typo in a comment. 2004-07-15 16:37:48 +00:00
njl
7c3c611f34 Update the interface for child drivers. Add acpi_scan_children, which
allows a bus to re-enumerate its child handles and optionally replace
them with new children, arranged to the bus's liking.  (The current device
space is flat with all devices immediately under acpi0).  Add comments
for each interface.
2004-07-15 16:29:08 +00:00
nyan
0ecf033001 Move the fdc_alloc_resources function into the bus front end. 2004-07-15 15:00:02 +00:00
phk
803ccd11bd Do a pass over all modules in the kernel and make them return EOPNOTSUPP
for unknown events.

A number of modules return EINVAL in this instance, and I have left
those alone for now and instead taught MOD_QUIESCE to accept this
as "didn't do anything".
2004-07-15 08:26:07 +00:00
alfred
85b9b683c5 Cleanup shutdown output. 2004-07-15 08:01:00 +00:00
roam
e3585916c4 A couple of grammar fixes in the bktr options section.
PR:		66828 (mostly)
Submitted by:	Michel Lavondes <fox@vader.aacc.cc.md.us>
MFC after:	2 weeks
2004-07-15 07:52:27 +00:00
alfred
d40ef0b9da Tidy up system shutdown. 2004-07-15 04:29:48 +00:00
davidxu
3467127696 type prgregset_t really should be an array. this is odd, however, other
systems defined interfaces in thread_db.h use prgregset_t but not
prgregset_t * to be a output parameter, this is the only way to maintain
source code compatible with them.
2004-07-15 03:52:17 +00:00
alfred
083439cd74 Disable SIGIO for now, leave a comment as to why it's busted and hard
to fix.
2004-07-15 03:49:52 +00:00
njl
033cedfe2b Clean up the output on reboot by keeping completion messages on the same
line as the announcement.  Someone should probably update the "buffers
remaining" message since we now no longer should have any buffers remaining
at that point.
2004-07-15 03:20:08 +00:00
alc
dc267d738b A loop in pmap_remove() should use TAILQ_FOREACH_SAFE(), not
TAILQ_FOREACH(), because the loop deletes elements from the list.

Reviewed by:	marcel@
2004-07-15 03:20:00 +00:00
phk
e1ff6aefeb A module with no modevent function gets modevent_nop() as default.
Until now the function has just returned zero for any event, but
that is downright wrong for MOD_UNLOAD and not very useful for any
future events we add where it may be crucial to be able to tell
if the event was unhandled or successful.

Change the function to return as follows:

	MOD_LOAD -> 0
	MOD_UNLOAD -> EBUSY
	anything else -> EOPNOTSUPP
2004-07-14 22:37:36 +00:00
njl
8cd64d8476 Add a comment separator. 2004-07-14 22:09:32 +00:00
rwatson
444caa3e37 Add a note indicating that the eh_prototype field used to construct
ethernet headers is unsynchronized.
2004-07-14 20:31:37 +00:00
rwatson
d16eda5f5b Add a mutex ng_tty_mtx to protect the global variable ngt_unit. Note
that the locking of globals here isn't complete, and there's also a
locking issue relating to calling into and out of the tty code.
2004-07-14 20:31:05 +00:00
rwatson
dca3d30173 Add ng_ppp_latencies_mtx, a global mutex to protect the latency list.
Note that the table is a hack, and so is this mutex.

Reviewed by:	glebius
2004-07-14 20:29:54 +00:00
rwatson
cd6588d818 Introduce a new mutex, ng_fec_mtx, to protect the global unit list to
synchronization allocation of FEC unit numbers.

Reviewed by:	glebius
2004-07-14 20:27:33 +00:00
rwatson
c68bc3f8e1 Introduce a new mutex, ng_eiface_mtx, to protect the global unit list
lock used to synchronize allocation of unit numbers for new netgraph
ethernet interfaces.

Reviewed by:	glebius
2004-07-14 20:26:29 +00:00
rwatson
4ce66101d9 Introduce a new mutex, ng_iface_mtx, to protect the global unit list
lock used to synchronize allocation of unit numbers for new netgraph
interfaces.

Reviewed by:	glebius
Tested by:	glebius
2004-07-14 20:24:21 +00:00
marks
d6b2e11fd4 Some laptops report the "design-capacity" instead of the "real-capacity"
when the battery is fully charged. That breaks some of the arithmetic in
calculating the remaining capacity (ends up with more than 100%).
This commit makes sure the max is 100.

Approved by:	njl
2004-07-14 19:31:31 +00:00
csjp
32f92e8a71 In addition to the real user ID check, do an explicit jail
check to ensure that the caller is not prison root.

The intention is to fix file descriptor creation so that
prison root can not use the last remaining file descriptors.
This privilege should be reserved for non-jailed root users.

Approved by:	bmilekic (mentor)
2004-07-14 19:04:31 +00:00
jhb
546527a0dc Correct bounds check in lapic_create().
Submitted by:	"Ted Unangst" tedu at coverity.com
2004-07-14 18:12:15 +00:00
des
f9ba046e26 Unbreak LINT: device card no longer takes a count. 2004-07-14 17:50:08 +00:00
phk
bc32225ff3 Make sure to update the mnt_stats before UFS1 extattr tried to
do I/O on the device.  Otherwise the blocksize is undefined in the
buffer cache.
2004-07-14 14:19:32 +00:00
mlaier
98f2a4ce7d Fix a copy-and-paste-o in IFQ_DRV_PREPEND - all pointyhats to me.
While here also fix a (not less stupid) braino in IFQ_DRV_PURGE.

Reported-by:	clement
Tested-by:	clement (_PREPEND in sis(4))
2004-07-14 13:31:41 +00:00
peter
1d08e6d4f9 Like on i386, eliminate pv_ptem (which was suggested by alc). This
reduces the size of the pv_entry structure a small but significant amount.

This is implemented a little differently because it isn't so cheap to get
the physical address of the page tabke page on amd64.. instead of it
being directly accessible from the top level page directory, it is now
two additional tree levels down.  However.. In almost all cases, we
recently had the physical address if the page table page a short while
before we needed it, but it slipped through our fingers.  This patch
saves it for when we do need it.  Also, for the one case where we do not
have the ptp paddr, we are always running in curproc context and so we
can do a vtopte-like trick.  I've implemented vtopde() for this purpose.

There is still a CYA entry in pmap_unuse_pt() that needs to be removed.  I
think it can be removed now but I forgot to test with it gone.
2004-07-14 07:13:35 +00:00
imp
18c154cbad Remove fdc_alloc_resources, which should have happened in last commit. 2004-07-14 07:04:17 +00:00
alfred
967361838d Make FIOASYNC, FIOSETOWN and FIOGETOWN work on kqueues. 2004-07-14 07:02:03 +00:00
imp
16f4ff641d Fix the pccard attachment to have a chance of working.
Move the resource allocation into the bus front ends.
2004-07-14 06:59:58 +00:00
takawata
4e34d34c76 Follow PnP location string change in acpi.c. 2004-07-14 06:58:39 +00:00
alfred
aa9d520c77 do { } while(0) KNOTE macro, whitespace 2004-07-14 06:47:32 +00:00
alc
313f678f03 Additional pmap locking 2004-07-14 05:49:44 +00:00
rwatson
0fb25a7369 Switch snoop device to using C99 initialization for struct linesw. 2004-07-14 05:32:55 +00:00
rwatson
6fc858af9e Convert SLIP to using C99 structure initialization for its struct
linesw.
2004-07-14 05:01:40 +00:00
alc
d080f004eb In pmap_remove_pages(), when clearing a pte, update the corresponding
page's dirty mask.

Reviewed by:	gallatin@
2004-07-14 03:05:19 +00:00
peter
e4d21648cf Regen 2004-07-14 00:03:51 +00:00
peter
56d1702acb Unmapped syscalls should be NOPROTO so that we don't get a duplicate
prototype.  (kldunloadf in this case)
2004-07-14 00:03:30 +00:00
cognet
f19d3b5e2c In pmap_remove_pages(), when the pv_list is entry, we want to clean the
PG_WRITEABLE flag, not the PG_REFERENCED flag.

Submitted by:   alc
2004-07-13 22:40:59 +00:00
jhb
a1ef3c7d23 Set TDF_NEEDRESCHED when a higher priority thread is scheduled in
sched_add() rather than just doing it in sched_wakeup().  The old
ithread preemption code used to set NEEDRESCHED unconditionally if it
didn't preempt which masked this bug in SCHED_4BSD.

Noticed by:	jake
Reported by:	kensmith, marcel
2004-07-13 20:49:13 +00:00
phk
ae28a93e50 Give kldunload a -f(orce) argument.
Add a MOD_QUIESCE event for modules.  This should return error (EBUSY)
of the module is in use.

MOD_UNLOAD should now only fail if it is impossible (as opposed to
inconvenient) to unload the module.  Valid reasons are memory references
into the module which cannot be tracked down and eliminated.

When kldunloading, we abandon if MOD_UNLOAD fails, and if -force is
not given, MOD_QUIESCE failing will also prevent the unload.

For backwards compatibility, we treat EOPNOTSUPP from MOD_QUIESCE as
success.

Document that modules should return EOPNOTSUPP for unknown events.
2004-07-13 19:36:59 +00:00
phk
2d529d4976 Add kldunloadf() system call. Stay tuned for follwing commit messages. 2004-07-13 19:35:11 +00:00
njl
08378cde55 Clean up our pnpinfo and location strings. 2004-07-13 18:59:49 +00:00
njl
2331ad38dd Call device_identify routines after doing the namespace walk. This is
needed so that sysresource objects are created first to reserve all regions,
then other devices can allocate from them.  Otherwise, acpi_timer (the only
ACPI device with an identify routine), would allocate its resources from
the nexus, causing the later sysresource reserve to fail.

Debugging by:	Taku YAMAMOTO, Andrea Campi
2004-07-13 17:57:41 +00:00
phk
7c872951b1 Send the fla driver in the Attic 2004-07-13 17:44:17 +00:00
phk
ba3a5db863 Desupport M-Systems DiskOnChip driver "fla" 2004-07-13 17:43:03 +00:00
phk
c68e9176c9 fix compilation. 2004-07-13 16:33:38 +00:00
imp
7dd8d13c46 oldcard's card device no longer requires a count 2004-07-13 16:11:34 +00:00
kensmith
f94a99da32 Rev 1.24 of sys/ptrace.h adds ptrace_clear_single_step() prototype
definition so this one causes "redundant declaration" error and breaks
Alpha kernel build.

Reviewed by:	gallatin@ and test build on beast
2004-07-13 16:11:04 +00:00
stefanf
11c4adb693 Remove erroneous semicolons. 2004-07-13 16:06:19 +00:00
nyan
1829c75088 Merged from recent fdc driver changes.
Make a separate function to check FDD type.
2004-07-13 13:14:37 +00:00
cperciva
4d3aa77ad3 Replace "uid != 0" with "suser(td->td_ucred) != 0" when checking if we've
hit the maximum number of processes.  The last ten processes are reserved
for the *non-jailed* superuser.
2004-07-13 13:10:07 +00:00
nyan
37239270ff MFi386: revision 1.213.
Fix miss merging in previous change.
2004-07-13 12:58:36 +00:00
pjd
bfc278d0e1 Remove unused macro. 2004-07-13 12:01:29 +00:00
pjd
8029cca883 Decrease log level of one debug message, so there is no hole (level 2
wasn't used at all).
2004-07-13 12:01:11 +00:00
pjd
ab53ce80cd Minor sysctl description fixes.
Submitted by:	simon
2004-07-13 11:23:31 +00:00
phk
aaa1a971bb Another LINT compilation fix 2004-07-13 09:47:27 +00:00
phk
56d4004f2d Make LINT compile 2004-07-13 09:46:46 +00:00
simokawa
2561ffc477 Re-enable debugger port. 2004-07-13 09:41:45 +00:00
simokawa
9d7d8ffdc7 Replace DDB with KDB. 2004-07-13 09:37:49 +00:00
davidxu
4661a5f4ae Add code to support debugging threaded process.
1. Add tm_lwpid into kse_thr_mailbox to indicate which kernel
     thread current user thread is running on. Add tm_dflags into
     kse_thr_mailbox, the flags is written by debugger, it tells
     UTS and kernel what should be done when the process is being
     debugged, current, there two flags TMDF_SSTEP and TMDF_DONOTRUNUSER.

     TMDF_SSTEP is used to tell kernel to turn on single stepping,
     or turn off if it is not set.

     TMDF_DONOTRUNUSER is used to tell kernel to schedule upcall
     whenever possible, to UTS, it means do not run the user thread
     until debugger clears it, this behaviour is necessary because
     gdb wants to resume only one thread when the thread's pc is
     at a breakpoint, and thread needs to go forward, in order to
     avoid other threads sneak pass the breakpoints, it needs to remove
     breakpoint, only wants one thread to go. Also, add km_lwp to
     kse_mailbox, the lwp id is copied to kse_thr_mailbox at context
     switch time when process is not being debugged, so when process
     is attached, debugger can map kernel thread to user thread.

  2. Add p_xthread to proc strcuture and td_xsig to thread structure.
     p_xthread is used by a thread when it wants to report event
     to debugger, every thread can set the pointer, especially, when
     it is used in ptracestop, it is the last thread reporting event
     will win the race. Every thread has a td_xsig to exchange signal
     with debugger, thread uses TDF_XSIG flag to indicate it is reporting
     signal to debugger, if the flag is not cleared, thread will keep
     retrying until it is cleared by debugger, p_xthread may be
     used by debugger to indicate CURRENT thread. The p_xstat is still
     in proc structure to keep wait() to work, in future, we may
     just use td_xsig.

  3. Add TDF_DBSUSPEND flag, the flag is used by debugger to suspend
     a thread. When process stops, debugger can set the flag for
     thread, thread will check the flag in thread_suspend_check,
     enters a loop, unless it is cleared by debugger, process is
     detached or process is existing. The flag is also checked in
     ptracestop, so debugger can temporarily suspend a thread even
     if the thread wants to exchange signal.

  4. Current, in ptrace, we always resume all threads, but if a thread
     has already a TDF_DBSUSPEND flag set by debugger, it won't run.

Encouraged by: marcel, julian, deischen
2004-07-13 07:33:40 +00:00
davidxu
658bc8d43c Implement following commands: PT_CLEARSTEP, PT_SETSTEP, PT_SUSPEND
PT_RESUME, PT_GETNUMLWPS, PT_GETLWPLIST.
2004-07-13 07:25:24 +00:00
davidxu
ce5c7d8b62 Add ptrace_clear_single_step(), alpha already has it for years, the function
will be used by ptrace to clear a thread's single step state.
2004-07-13 07:22:56 +00:00
davidxu
f9f447ebf9 Add code to support debugging threaded process.
1. Add tm_lwpid into kse_thr_mailbox to indicate which kernel
   thread current user thread is running on. Add tm_dflags into
   kse_thr_mailbox, the flags is written by debugger, it tells
   UTS and kernel what should be done when the process is being
   debugged, current, there two flags TMDF_SSTEP and TMDF_DONOTRUNUSER.

   TMDF_SSTEP is used to tell kernel to turn on single stepping,
   or turn off if it is not set.

   TMDF_DONOTRUNUSER is used to tell kernel to schedule upcall
   whenever possible, to UTS, it means do not run the user thread
   until debugger clears it, this behaviour is necessary because
   gdb wants to resume only one thread when the thread's pc is
   at a breakpoint, and thread needs to go forward, in order to
   avoid other threads sneak pass the breakpoints, it needs to remove
   breakpoint, only wants one thread to go. Also, add km_lwp to
   kse_mailbox, the lwp id is copied to kse_thr_mailbox at context
   switch time when process is not being debugged, so when process
   is attached, debugger can map kernel thread to user thread.

2. Add p_xthread to proc strcuture and td_xsig to thread structure.
   p_xthread is used by a thread when it wants to report event
   to debugger, every thread can set the pointer, especially, when
   it is used in ptracestop, it is the last thread reporting event
   will win the race. Every thread has a td_xsig to exchange signal
   with debugger, thread uses TDF_XSIG flag to indicate it is reporting
   signal to debugger, if the flag is not cleared, thread will keep
   retrying until it is cleared by debugger, p_xthread may be
   used by debugger to indicate CURRENT thread. The p_xstat is still
   in proc structure to keep wait() to work, in future, we may
   just use td_xsig.

3. Add TDF_DBSUSPEND flag, the flag is used by debugger to suspend
   a thread. When process stops, debugger can set the flag for
   thread, thread will check the flag in thread_suspend_check,
   enters a loop, unless it is cleared by debugger, process is
   detached or process is existing. The flag is also checked in
   ptracestop, so debugger can temporarily suspend a thread even
   if the thread wants to exchange signal.

4. Current, in ptrace, we always resume all threads, but if a thread
   has already a TDF_DBSUSPEND flag set by debugger, it won't run.

Encouraged by: marcel, julian, deischen
2004-07-13 07:20:10 +00:00
alfred
00a8253aea Do not call sorecieve() in the context of a socket callback as it causes
lock order reversals so->inpcb since we're called with the socket lock
held.
2004-07-13 07:05:38 +00:00
alc
e833ade0b2 Simplify pmap_protect(). 2004-07-13 06:54:23 +00:00
alfred
3a18656149 Turn off SO_REUSEADDR and SO_REUSEPORT, they were causing EADDRINUSE
to be returned from the protocol stack.

Pointy hat to me for not groking what those options _really_ mean.
2004-07-13 05:42:59 +00:00
alc
99853e0ee4 Push down the acquisition and release of the page queues lock into
pmap_remove_pages().  (The implementation of pmap_remove_pages() is
optional.  If pmap_remove_pages() is unimplemented, the acquisition and
release of the page queues lock is unnecessary.)

Remove spl calls from the alpha, arm, and ia64 pmap_remove_pages().
2004-07-13 02:49:22 +00:00
imp
4622bf7492 Set fdc_dev in attach 2004-07-13 02:44:40 +00:00
imp
cee1297a7c Don't depend on implicit include of machine/bus.h in sys/rman.h, but instead
explicitly include it.
2004-07-13 02:42:23 +00:00
imp
a9f261e032 pccard no longer requires a count because the floppy driver that
nominally had a non-working reference to card.h has been removed.
2004-07-13 02:37:40 +00:00
imp
957f2f17bf Remove even more references to generating usbdevs_data.h, et al.
Noticed by: njl
2004-07-12 23:11:09 +00:00
imp
d4d4b6020c Remove the instructions for regenerating usbdevs.h: that's now no
longer necessary.
2004-07-12 22:57:06 +00:00
grehan
0c6818bae9 Rename low-level code ddb -> db. Use KDB instead of DDB.
Fix bug in setup of stack frame where 8 bytes wasn't being
saved for the callee's frame pointer and saved LR.
2004-07-12 22:32:08 +00:00
grehan
dd6362d5f0 Bring into KDB new order. 2004-07-12 22:26:20 +00:00
grehan
54c5086d99 - DDB -> KDB, with kdb routines
- ddb -> db for low-level trapcode
- implement makectx. I think it only matters that the stack is setup
  correctly.
- bring over ddb_trap_glue and rename to db_trap_glue
2004-07-12 22:25:09 +00:00
grehan
3a1173f6a4 No need for ddb option. Never a need for ipkdb option. 2004-07-12 22:22:53 +00:00
grehan
ef7d3f6057 Catch up with gratuitous ddb -> db renaming 2004-07-12 22:22:09 +00:00
grehan
77499ec178 Bring into line with KDB. Bring in NetBSD updates for backtrace routine,
although it really needs a decent re-work.
2004-07-12 22:21:34 +00:00
grehan
a562ddac71 Remove unused NetBSD code. Bring mem r/w routines into here in line
with sparc64, although keep the size deref checks: they are useful
when accessing PCI space where some devices may not implement byte
access.
2004-07-12 22:20:01 +00:00
grehan
50c323b06a Gratuitous namechange to avoid low-level association with ddb. 2004-07-12 22:18:02 +00:00
grehan
8afab504a7 Add prototype for KDB's makectx routine 2004-07-12 22:17:20 +00:00
grehan
7f412dbef9 Remove old NetBSD-derived unused code and stuff that is now obsolete
due to KDB.
2004-07-12 22:16:50 +00:00
grehan
b0e20e05c9 DDB -> KDB, and rename low-level trap handler to avoid name conflict. 2004-07-12 22:16:04 +00:00
grehan
b266c1de9d kdb.h for PowerPC. Stubs for now. 2004-07-12 22:15:03 +00:00
grehan
d7b66d5494 Add new KDB option, and also drop in long-held fxp/dc eth drivers. 2004-07-12 22:14:21 +00:00
grehan
e7ffb08113 db_memrw.c has been subsumed into db_interface.c ala sparc64 2004-07-12 22:13:27 +00:00
imp
321c2da905 Remove stray line with just a tab
Remove usbdevs_data.h, it isn't used by the module

Noticed by: Pawel Worach
2004-07-12 21:59:06 +00:00
dwmalone
897e5938cd Rename Alfred's kern_setsockopt to so_setsockopt, as this seems a
a better name. I have a kern_[sg]etsockopt which I plan to commit
shortly, but the arguments to these function will be quite different
from so_setsockopt.

Approved by:	alfred
2004-07-12 21:42:33 +00:00
cognet
23cfc17f76 Update to kdb. 2004-07-12 21:25:01 +00:00
cognet
66a741eb3e Remove the kbd_trap() declaration. 2004-07-12 21:24:21 +00:00
cognet
5ea4f30129 Protect setjmp.h with #ifndef _MACHINE_SETJMP_H_. 2004-07-12 21:23:58 +00:00
cognet
99dc0a90b9 Forward declare "struct pcb", so that one does not need to include
<machine/pcb.h> before including <machine/pmap.h>.
2004-07-12 21:22:40 +00:00
cognet
e02abf1e90 Implement a stub breakpoint(). 2004-07-12 21:20:38 +00:00
cognet
97707d2bcc Implement makectx(). 2004-07-12 21:19:43 +00:00
cognet
f6a281580c Prototype makectx(). 2004-07-12 21:19:22 +00:00
cognet
202a378b15 Import bus_memio.h and bus_pio.h for arm. 2004-07-12 21:18:30 +00:00
cognet
88d2353d0b Import a kdb.h for arm, which contains stubs right now. 2004-07-12 21:17:51 +00:00
njl
a52882e010 Remove unnecessary softc bzero calls. 2004-07-12 21:15:36 +00:00
njl
08ee4c087b 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
njl
cd5d88c17c 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
rwatson
bbd3224731 Constify 'rpcclnt_backoff'. 2004-07-12 19:37:08 +00:00
rwatson
d3c10109b8 Constify 'spx_backoff'. 2004-07-12 19:35:29 +00:00
rwatson
92ee83ce24 After each label in tcp_input(), assert the inpcbinfo and inpcb lock
state that we expect.
2004-07-12 19:28:07 +00:00
rwatson
a26f4e58e0 Procotol control block locking for netatalk DDP. 2004-07-12 18:39:59 +00:00
rwatson
041b8a4659 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
rwatson
a0349f012c Remove 'Not used' comment: at_org_code is used, just not in netatalk/. 2004-07-12 18:35:30 +00:00
alc
4d8929172c 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
mtm
c6bf917844 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
rwatson
ccf877ab15 Remove 'td = curthread' that shadows the arguments to coda_root().
Missed by:	alfred
2004-07-12 14:11:26 +00:00
dfr
d89edf2ab4 Add fwip module. 2004-07-12 13:13:17 +00:00
dfr
b5e500dafb Add fwip module.
Submitted by: simokawa
2004-07-12 13:12:56 +00:00
dfr
98ccf809b2 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
sos
b940828c56 Attempt to handle suspend/resume better. 2004-07-12 10:50:50 +00:00
alfred
e266674fb3 Bump __FreeBSD_version for VFS_ROOT, vflush and kinfo_proc changes. 2004-07-12 08:23:10 +00:00
alfred
8406a6eeed 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
davidxu
b1b6feb55a 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
9ca87da3c6 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
7e2c789ffc 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
fad88b27c9 Reserve a pointer "ki_udata" in kinfo_proc as a convenience for userland. 2004-07-12 04:53:33 +00:00
rwatson
76bc9aa5a7 Introduce a global mtx 'ngsocketlist_mtx' to protect the global
ng_socket list during insert/delete.
2004-07-12 04:45:46 +00:00
alc
e81b989004 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
rwatson
e6f3da3092 Mark 'makeup' in ng_frame_relay as const, as its values are immutable. 2004-07-12 04:35:42 +00:00