Commit Graph

44835 Commits

Author SHA1 Message Date
peter
34fc9d38ed GRR. MFi386: white space spam 2004-01-30 03:02:45 +00:00
peter
f73837ebdc Merge some more changes from i386. 2004-01-30 00:24:45 +00:00
schweikh
f2bf742197 Consistently capitalize acronyms like POSIX and NIC. Style. 2004-01-29 21:24:53 +00:00
schweikh
94077ddadd Fix typos and remove whitespace at EOL. 2004-01-29 21:07:54 +00:00
sos
7c9d80412c Cleanups/cosmetics. 2004-01-29 15:03:01 +00:00
kensmith
a947fc1521 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
mr
e0591dcd0f Add dependency to snd_via8233 2004-01-29 14:11:03 +00:00
bde
9a4bfd4468 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
mjacob
167c9ef386 Fix a bug where we never managed to include the sense data we wanted to send. 2004-01-29 06:36:30 +00:00
wpaul
817ebf02f9 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
mjacob
81b41e9e7d 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
rwatson
1a0f1d7ef9 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
grehan
59b60aa68b 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
grehan
1978eb7947 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
d3ce69c6e2 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
5408b5ae6a Re-add user_dbreg_trap() for debug register support 2004-01-29 00:05:03 +00:00
peter
e28e290194 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
1ad435de38 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
d21d093f70 Un-stub the hardware debug register stuff. 2004-01-28 23:57:40 +00:00
peter
9fb3a8dbe7 Export PCB_DR* symbols 2004-01-28 23:57:02 +00:00
peter
4de9936d83 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
d74fc002a7 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
438b15500f Re-add debug register functions 2004-01-28 23:53:04 +00:00
peter
61ce0b1d90 MFi386: mp_topology(). 2004-01-28 23:51:16 +00:00
peter
c98bdf5b6a MFi386: add THERMTRIP msr values 2004-01-28 23:47:22 +00:00
peter
57403af54c Diff reduction with i386 2004-01-28 23:46:48 +00:00
peter
c86c28ce96 Regen 2004-01-28 23:45:48 +00:00
peter
8b22ff55ca Add getitimer swab stub 2004-01-28 23:45:37 +00:00
rwatson
751378e616 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
sos
e989fa8692 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
3827ffeb6b MFi386: change an outb to a DELAY() 2004-01-28 20:46:31 +00:00
jhb
40204c6793 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
jhb
cb748c414e 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
jhb
2176f751c3 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
sos
9a5b5c9bf8 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
jhb
4212174151 Use mtx_assert() rather than using a home-rolled version. 2004-01-28 20:26:39 +00:00
ume
662b6c7484 protect access to ifnet structure with mutex. 2004-01-28 15:01:39 +00:00
phk
1784c726b2 Bring back the geom_bioqueues, they _are_ a good idea.
ATA will uses these RSN.
2004-01-28 08:39:18 +00:00
truckman
ee472ed53a 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
roam
0d46b9e940 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
njl
83361a0d70 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
rwatson
98750562f3 Remove process lock XXX's, fixed in src/sys/sys/proc.h:1.366. 2004-01-28 06:48:31 +00:00
kan
16c14cce63 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
obrien
a3f6125b31 Always build ext2fs module. There is no written policy preventing the
building of GPL'ed modules.
2004-01-28 04:16:13 +00:00
nyan
48e665a355 MFi386: revision 1.33
PR:	kern/62005
2004-01-28 04:15:31 +00:00
obrien
dabb23bae4 Enable ndis for AMD64 (for the time that modules are supported)... 2004-01-28 04:15:10 +00:00
emax
e67541b55a Add NO_BLUETOOTH knob to the build process
Requested by:	phk
Reviewed by:	imp (mentor), ru
2004-01-28 00:42:51 +00:00
ru
389b9f0940 Correct the descriptions of the net.inet.{udp,raw}.recvspace sysctls. 2004-01-27 22:17:39 +00:00
schweikh
623c323d6f Sync with Oxford Dictionary. Style (add missing full stops) while I'm here. 2004-01-27 22:15:03 +00:00
ru
a9f4c9e41b Correct the description of the net.graph.recvspace sysctl. 2004-01-27 22:02:01 +00:00