Commit Graph

44753 Commits

Author SHA1 Message Date
Søren Schmidt
f279a36c6e Cleanups/cosmetics. 2004-01-29 15:03:01 +00:00
Ken Smith
4a98f6820b Fix pathname so 'make tags' in a kernel build directory looks in
the right place for the $MACHINE/include directory.

Approved by:	rwatson (mentor)
2004-01-29 14:58:22 +00:00
Michael Reifenberger
a905454644 Add dependency to snd_via8233 2004-01-29 14:11:03 +00:00
Bruce Evans
9a44a82b61 Fixed breakage of scheduling in rev.1.29 of subr_4bsd.c. The
"scheduler" here has very little to do with scheduling.  It is actually
the swapper, and it really must be the last SYSINIT'ed item like its
comment says, since proc0 metamorphoses into swapper by calling
scheduler() last in mi_start(), and scheduler() never returns..  Rev.1.29
of subr_4bsd.c broke this by adding another SI_ORDER_FIRST item
(kproc_start() for schedcpu_thread() onto the SI_SUB_RUN_SCHEDULER_LIST.
The sorting of SYSINITs with identical orders (at all levels) is
apparently nondeterministic, so this resulted in schedule() sometimes
being called second last and schedcpu_thread() not being called at all.

This quick fix just changes the code to almost match the comment
(SI_ORDER_FIRST -> SI_ORDER_ANY).  "LAST" is misspelled "ANY", and
there is no way to ensure that there is only 1 very lst SYSINIT.
A more complete fix would remove the SYSINIT obfuscation.
2004-01-29 12:35:11 +00:00
Matt Jacob
eedb2dfec3 Fix a bug where we never managed to include the sense data we wanted to send. 2004-01-29 06:36:30 +00:00
Bill Paul
e2402a9b9b Go back to using AUTHMODE_AUTO if WEP is on. In some cases, the Centrino
won't associate in BSS mode if you use AUTHMODE_SHARED. I probably don't
understand enough to know when SHARED should be used vs. OPEN or WPA.
For now, go back to what works.
2004-01-29 03:16:58 +00:00
Matt Jacob
ac9d0a02cf Fix longstanding buglet- for centrally handled CTIO2s we were checking the wrong
bit for this being the  last CTIO2.  It didn't matter since it really was the
last CTIO2 and the resources recycled, but still....

Add in CTIO3 define for future DAC work.
2004-01-29 02:40:43 +00:00
Robert Watson
30a9f26db2 Assert process lock in ptracestop(), since we're going to rely
on it, and later unlock it.
2004-01-29 00:58:21 +00:00
Peter Grehan
0efd0097cb When UMA_MD_SMALL_ALLOC is defined, pmap_kextract will be called
for direct-mapped addresses. Assume that any address less than KVA
is one of these and return it. Also assert that an address is KVA
does have a valid mapping - callers of pmap_kextract don't check
the return value, since they assume that they have a valid virtual
address.
2004-01-29 00:45:41 +00:00
Peter Grehan
db55e39aa1 Implement UMA_MD_SMALL_ALLOC, since the BAT registers allow direct
addressing of memory. Makes a substantial improvement for apps that
stress the limited amount of KVM on PPC (e.g. untarring the ports tree).

uma_machdep.c stolen from amd64/ia64.
2004-01-29 00:32:22 +00:00
Peter Wemm
ac498460b2 Re-add debug register support.
Some other minor tweaks snuck in here, including supporting more
discontiguous memory segments and some cosmetic tweaks.
2004-01-29 00:07:29 +00:00
Peter Wemm
170a05510d Re-add user_dbreg_trap() for debug register support 2004-01-29 00:05:03 +00:00
Peter Wemm
db5272252f Take another shot at the invariants calls to __panic. They hadn't been
updated for the regparm ABI on amd64.
Context switch debug regs.
Update for fpu simplification
Don't needlessly reload %cr3, in case the cpu has the tlb flush filter
turned off.  Re-add LAZY_SWITCH stubs.
2004-01-29 00:02:54 +00:00
Peter Wemm
fdf00d6d6c deal with dbregs for fork etc
update for fpu.c simplification
Merge #include sort from i386
2004-01-28 23:58:55 +00:00
Peter Wemm
bb2fbc41af Un-stub the hardware debug register stuff. 2004-01-28 23:57:40 +00:00
Peter Wemm
eb18d248ee Export PCB_DR* symbols 2004-01-28 23:57:02 +00:00
Peter Wemm
1c89210c83 We can simplify a lot of things now that we don't have to worry about
hardware bugs on external 386 cpus and now that we can depend on SSE.
2004-01-28 23:55:58 +00:00
Peter Wemm
d957532a87 Add dbreg struct definitions for /proc/*/dbregs and a place to store the
registers in the pcb
2004-01-28 23:54:31 +00:00
Peter Wemm
1182b177ff Re-add debug register functions 2004-01-28 23:53:04 +00:00
Peter Wemm
b29fd7c4db MFi386: mp_topology(). 2004-01-28 23:51:16 +00:00
Peter Wemm
5e465ab919 MFi386: add THERMTRIP msr values 2004-01-28 23:47:22 +00:00
Peter Wemm
4612a96f08 Diff reduction with i386 2004-01-28 23:46:48 +00:00
Peter Wemm
996a568eda Regen 2004-01-28 23:45:48 +00:00
Peter Wemm
0e3a9619ad Add getitimer swab stub 2004-01-28 23:45:37 +00:00
Robert Watson
94ffb20d72 Add a reset sysctl for mutex profiling: zeros all of the mutex
profiling buffers and hash table.  This makes it a lot easier to
do multiple profiling runs without rebooting or performing
gratuitous arithmetic.  Sysctl is named debug.mutex.prof.reset.

Reviewed by:	jake
2004-01-28 22:11:53 +00:00
Søren Schmidt
175352f07c Fix for those lost interrupts on probe on lots of controller types.
Note to self, just because an idea is good, it doesn't apply everywhere.
2004-01-28 21:54:40 +00:00
Peter Wemm
d0f2d056fa MFi386: change an outb to a DELAY() 2004-01-28 20:46:31 +00:00
John Baldwin
d5b75694e7 Move the loadav() callout into its own kthread since it uses allproc_lock
which is a sleepable lock and thus is not safe to acquire from a callout
routine.
2004-01-28 20:44:41 +00:00
John Baldwin
5352136a25 Optimize the i386 interrupt entry code to not reload the segment registers
if they already contain the correct kernel selectors.

Reviewed by:	peter
Suggested by:	peter
2004-01-28 20:44:08 +00:00
John Baldwin
8d768e7676 Rework witness_lock() to make it slightly more useful and flexible.
- witness_lock() is split into two pieces: witness_checkorder() and
  witness_lock().  Witness_checkorder() determines if acquiring a specified
  lock at the time it is called would result in a lock order.  It
  optionally adds a new lock order relationship as well.  witness_lock()
  updates witness's data structures to assume that a lock has been acquired
  by stick a new lock instance in the appropriate lock instance list.
- The mutex and sx lock functions now call checkorder() prior to trying to
  acquire a lock and continue to call witness_lock() after the acquire is
  completed.  This will let witness catch a deadlock before it happens
  rather than trying to do so after the threads have deadlocked (i.e. never
  actually report it).
- A new function witness_defineorder() has been added that adds a lock
  order between two locks at runtime without having to acquire the locks.
  If the lock order cannot be added it will return an error.  This function
  is available to programmers via the WITNESS_DEFINEORDER() macro which
  accepts either two mutexes or two sx locks as its arguments.
- A few simple wrapper macros were added to allow developers to call
  witness_checkorder() anywhere as a way of enforcing locking assertions
  in code that might acquire a certain lock in some situations.  The
  macros are: witness_check_{mutex,shared_sx,exclusive_sx} and take an
  appropriate lock as the sole argument.
- The code to remove a lock instance from a lock list in witness_unlock()
  was unnested by using a goto to vastly improve the readability of this
  function.
2004-01-28 20:39:57 +00:00
Søren Schmidt
816994ccc8 Use the biotask functionality in GEOM to put finished requests on
instead of taskqueue_swi. This shaves from 1 to 10% of the overhead.

Overhaul the locking once more, there was a few possible races that
are now closed.
2004-01-28 20:38:51 +00:00
John Baldwin
62a0fd943c Use mtx_assert() rather than using a home-rolled version. 2004-01-28 20:26:39 +00:00
Hajimu UMEMOTO
328a040858 protect access to ifnet structure with mutex. 2004-01-28 15:01:39 +00:00
Poul-Henning Kamp
5fcf4e4398 Bring back the geom_bioqueues, they _are_ a good idea.
ATA will uses these RSN.
2004-01-28 08:39:18 +00:00
Don Lewis
12e524a290 Change KASSERT() in feed_vchan16() into an explicit test and call to
panic() so that the buffer overflow just beyond this point is always
caught, even when the code is not compiled with INVARIANTS.

Change chn_setblocksize() buffer reallocation code to attempt to avoid
the feed_vchan16() buffer overflow by attempting to always keep the
bufsoft buffer at least as large as the bufhard buffer.

Print a diagnositic message
	Danger! %s bufsoft size increasing from %d to %d after CHANNEL_SETBLOCKSIZE()
if our best attempts fail.  If feed_vchan16() were to be called by
the interrupt handler while locks are dropped in chn_setblocksize()
to increase the size bufsoft to match the size of bufhard, the panic()
code in feed_vchan16() will be triggered.  If the diagnostic message
is printed, it is a warning that a panic is possible if the system
were to see events in an "unlucky" order.

Change the locking code to avoid the need for MTX_RECURSIVE mutexes.

Add the MTX_DUPOK option to the channel mutexes and change the locking
sequence to always lock the parent channel before its children to avoid
the possibility of deadlock.

Actually implement locking assertions for the channel mutexes and fix
the problems found by the resulting assertion violations.

Clean up the locking code in dsp_ioctl().

Allocate the channel buffers using the malloc() M_WAITOK option instead
of M_NOWAIT so that buffer allocation won't fail.  Drop locks across
the malloc() calls.

Add/modify KASSERTS() in attempt to detect problems early.

Abuse layering by adding a pointer to the snd_dbuf structure that points
back to the pcm_channel that owns it.  This allows sndbuf_resize() to do
proper locking without having to change the its API, which is used by
the hardware drivers.

Don't dereference a NULL pointer when setting hw.snd.maxautovchans
if a hardware driver is not loaded.  Noticed by Ryan Sommers
<ryans at gamersimpact.com>.

Tested by:	Stefan Ehmann <shoesoft AT gmx.net>
Tested by:	matk (Mathew Kanner)
Tested by:	Gordon Bergling <gbergling AT 0xfce3.net>
2004-01-28 08:02:15 +00:00
Peter Pentchev
1b8c233de3 Add an ACPI_FUNCTION_TRACE() to the newly-added acpi_Startup() routine
to get the ACPI_DEBUG case (and LINT in particular) to build.

Reviewed by:	jhb, njl
Approved by:	jhb
2004-01-28 07:48:03 +00:00
Nate Lawson
5de6c5b5a5 If not in the debugger or if the user requests it with the
debug.ddb_use_printf sysctl, output kernel debugger data to both the
console and kernel message buffer via printf.  This fixes the case where
backtrace() went directly to the console and should help debugging greatly.
Thanks to Ian Dowse for the work, minor edits or any bugs are by myself.

Submitted by:	iedowse
2004-01-28 06:51:18 +00:00
Robert Watson
265ef81196 Remove process lock XXX's, fixed in src/sys/sys/proc.h:1.366. 2004-01-28 06:48:31 +00:00
Alexander Kabaev
975634280a Move the part of the comment which applies to osigsuspend where
it belongs. The current sigsuspend syscall does expect a pointer
to the mask as argument.

Submitted by:	Igor Sysoev <is at rambler-co dot ru>
2004-01-28 06:06:04 +00:00
David E. O'Brien
66c59e7562 Always build ext2fs module. There is no written policy preventing the
building of GPL'ed modules.
2004-01-28 04:16:13 +00:00
Yoshihiro Takahashi
6bef25432c MFi386: revision 1.33
PR:	kern/62005
2004-01-28 04:15:31 +00:00
David E. O'Brien
848b79deef Enable ndis for AMD64 (for the time that modules are supported)... 2004-01-28 04:15:10 +00:00
Maksim Yevmenkin
18d948adb1 Add NO_BLUETOOTH knob to the build process
Requested by:	phk
Reviewed by:	imp (mentor), ru
2004-01-28 00:42:51 +00:00
Ruslan Ermilov
0ca2861fc9 Correct the descriptions of the net.inet.{udp,raw}.recvspace sysctls. 2004-01-27 22:17:39 +00:00
Jens Schweikhardt
2b51e103f6 Sync with Oxford Dictionary. Style (add missing full stops) while I'm here. 2004-01-27 22:15:03 +00:00
Ruslan Ermilov
4296e6f8b8 Correct the description of the net.graph.recvspace sysctl. 2004-01-27 22:02:01 +00:00
Marcel Moolenaar
a753b14687 Sort PFIL_HOOKS. 2004-01-27 20:22:53 +00:00
Robert Watson
4158244cc0 Allow the use of a stale p_stops value in STOPEVENT(), grabbing
the proc lock only if we actually need to perform a stop.  This
avoids two locks and unlocks of the process lock each system call,
and wins me about 20% on a simply system call test (getuid(),
which would otherwise require no locking).  This also has a net
improvement of about 10MB/s on some of the SMP bandwidth tests
I'm running.

Reviewed by:	jhb
2004-01-27 20:21:07 +00:00
Brooks Davis
a8773564ca Cleanup malloc() use in if_attach():
- malloc() returns a void* and does not need a cast
 - when called with M_WAITOK, malloc() can not return NULL so don't
   check for that case.  The result of the check was bogus anyway since
   it would leave the interface broken.
2004-01-27 19:35:05 +00:00
Dag-Erling Smørgrav
2845024409 Fix a reentrancy issue in md5_calc(). 2004-01-27 18:57:21 +00:00