Commit Graph

24225 Commits

Author SHA1 Message Date
jhb
264b1fe22a - Rename the gd_cpuno member of struct globaldata to gd_cpuid.
- Add a globaldata_register() prototype in the SMP case.
2001-01-24 10:24:49 +00:00
jhb
77583447a9 - Proc locking.
- P_OWEUPC -> PS_OWEUPC.
2001-01-24 10:23:54 +00:00
jhb
eabcf31b82 - Change userret() to take a struct trapframe * as its second argument and
to extract the PC from that to send to addupc_task() so that it can be
  called from MI code.
- Remove all traces of have_giant with extreme prejudice and use
  mtx_owned(&Giant) instead where appropriate.
- Proc locking.
- P_FOO -> PS_FOO.
- Don't grab Giant just to look in curproc's p_addr during a trap since we
  may choose to immediately exit.  Instead, delay grabbing Giant a bit
  until we actually need it.
- Don't reset 'p' to 'curproc' in syscall() to handle the case of a child
  returning from fork1() since children don't return via syscall().
- Remove an XXX comment in ast() that questions the correctness of the
  userland check.  The code is correct.
2001-01-24 10:23:21 +00:00
jhb
451c942dba - Proc locking.
- P_INMEM -> PS_INMEM.
2001-01-24 10:16:23 +00:00
jhb
8e27ac396a - Proc locking.
- Don't send IPIs for pmap_invalidate_page() or pmap_invalidate_all()
  in the UP case.
- Catch up to cpuno -> cpuid.
- Convert some sanity checks that were #ifdef DIAGNOSTIC to KASSERT()'s.
2001-01-24 10:16:01 +00:00
jhb
277ef6eaf3 - Adjust some whitespace to reduce diffs with the i386 version.
- Rename the per-CPU variable 'cpuno' to 'cpuid'.  This was done so that
  there is one consistent name across all architectures for a logical
  CPU id.
- Remove all traces of IRQ forwarding.
- Add globaldata_register() hook called by globaldata_init() to register
  globaldata structures in the cpuid_to_globaldata array.
- Catch up to P_FOO -> PS_FOO.
- Bring across some fixes for forwarded_statclock() from the i386 version
  to handle ithreads and idleproc properly.
- Rename addugd_intr_forwarded() to addupc_intr_forwarded() so that it is
  the same name on all architectures.
- Set flags in p_sflag instead of calling psignal() from
  forward_hardclock().
- Proc locking.
- When we handle an IPI, turn off its bit in the mask of IPI's we are
  currently handling so that an IPI doesn't send a CPU into an infinite
  loop.
2001-01-24 10:13:13 +00:00
jhb
a1ce5e9db8 - Initialize curproc, proc0.p_heldmtx, and proc0.p_contested earlier so
that mutex operations work.
- Enter Giant earlier so we hold it during boot.
- Proc locking.
- Move globaldata_init() into here from mp_machdep.c so that UP kernels
  don't depend on mp_machdep.c.  Use a callout in the SMP case to register
  the boot processor's globaldata in the cpuid_to_globaldata array.
2001-01-24 10:07:42 +00:00
jhb
8168399f03 - Wrap the IPI interrupt handler in #ifdef SMP.
- Catch up to cpuno -> cpuid change.
- Add parens around a subexpression to quiet a warning.
2001-01-24 10:05:24 +00:00
jhb
8c0af7d84b cpuno -> cpuid. 2001-01-24 10:04:32 +00:00
jhb
73a3d8450d Don't import the nonexistent astpending variable. 2001-01-24 10:03:05 +00:00
jhb
87deba6ead Wrap the startup code used by secondary processors in #ifdef SMP. 2001-01-24 10:01:53 +00:00
jhb
df7b91e66f Remove the Xforward_irq IPI. 2001-01-24 10:01:13 +00:00
jhb
0bd8027e4a - Remove all the #if 0'd code that used to implement IRQ forwarding.
- Remove #if 0'd lazy interrupt mask.
2001-01-24 10:00:07 +00:00
jhb
d04125226c Remove unused locks: cpl, fast_intr, intr, mpintr. 2001-01-24 09:58:56 +00:00
jhb
409b74b609 - Proc locking.
- P_OWEUPC -> PS_OWEUPC.
- Remove obsolete prototype for MD fork_return().
2001-01-24 09:56:49 +00:00
jhb
39d78f3196 - Remove Xforward_irq, cpl_lock, and fast_intr_lock.
- Add fork_exit.
2001-01-24 09:55:39 +00:00
jhb
30a150609e Setup the return values for a child process in the trapframe when we setup
the rest of the trapframe instead of doing it in fork_return().
2001-01-24 09:54:44 +00:00
jhb
a539ffb3e7 - Kill the have_giant parameter to userret() along with all instances of
that name as a variable.  Use mtx_owned(&Giant) where appropriate
  instead.
- Proc locking.
- P_FOO -> PS_FOO.
- Update comments about enable interrupts during trap and why this may be
  bad if we trap while holding a spin mutex.
- Don't bother resetting p to curproc in syscall() in case we are the child
  returning from fork.  The child hasn't returned from fork through syscall
  in a while.
- Remove fork_return() as it has been superseded by the MI version.
2001-01-24 09:53:49 +00:00
jhb
1b7c29442e - Proc locking.
- P_INMEM -> PS_INMEM.
2001-01-24 09:49:49 +00:00
jhb
8e161d3269 - Relocate portions of this file to get it into an order closer to that of
the alpha mp_machdep.c.
- Proc locking.
- Catch up to the P_FOO -> PS_FOO proc flags changes.
- Stick ap_init()'s prototype with the other prototypes.
- Remove the Xforwardirq IPI.
- Remove unused simplelocks.
- Don't try to psignal() from forward_statclock(), but set the appropriate
  signal pending flag in p_sflag instead.
- Add in KTR_SMP tracepoints for various SMP functions.   (Brought over
  from the alpha port)
2001-01-24 09:48:52 +00:00
jhb
3a1caa00c3 - Proc locking.
- Setup proc0.p_heldmtx, proc0.contested, and curproc earlier so that we
  can use mutexes.
- Initialize sched_lock and Giant earlier and enter Giant during init386.
- Use suser(9) instead of checking cr_uid directly.
2001-01-24 09:45:20 +00:00
jhb
3b95ed413d Call fork_exit() now instead of futzing around in assembly during a fork
return.
2001-01-24 09:43:26 +00:00
jhb
e5adbdcf1b - Split p_flag up into two fields. p_flag keeps most of the previous flags
and is protected by the proc lock.  p_sflag is protected by sched_lock
  and holds the following flags: PS_INMEM, PS_OWEUPC, PS_PROFIL, PS_SINTR,
  PS_TIMEOUT, PS_ALRMPEND, PS_PROFPEND, PS_CVWAITQ, PS_SWAPINREQ, and
  PS_SWAPPING.
- p_klist is definitely locked now by the proc lock.
- p_runtime, p_[usi]u are locked by sched_lock.
- Add a new P_KTHREAD flag set for kernel threads created via
  kthread_create(9).
- STOPEVENT() only needs the proc lock, it does not need Giant.
- faultin() already checks PS_INMEM, so simplify the check in PHOLD() so
  that we only need to grab the proc lock and let faultin() perform the
  PS_INMEM check.
- Add a prototype for zpfind().
- Add prototypes for the new fork_exit() and fork_return() MI functions
  that manage the fork return path.
- Add a prototype for the MD function userret() so that it can be called
  from fork_return().
- Add needed include of <machine/frame.h> in the kernel.
2001-01-24 09:41:03 +00:00
jhb
558ee819ee Fix a typo.
Reported by:	albert
2001-01-24 08:42:39 +00:00
hm
70aff88d6b remove redundant definitions of card types:
- remove all occurances of FLAG_XXX values and replace with CARD_TYPEP_XXX
 - remove sc_flag from isic softc and replace it with sc_cardtyp
remove some left over redundant definitions from isic and i4b_l1.h
remove left over cvs id from i4b cvs repository
2001-01-24 08:41:52 +00:00
jhb
85f26795ce Add missing include. 2001-01-24 06:54:24 +00:00
mckusick
28dc76bebe Never reuse AUTO_OID values.
Approved by:	Alfred Perlstein <bright@wintelcom.net>
2001-01-24 04:35:13 +00:00
jhb
810630fa41 The lock being destroyed was misnamed, not unused. Add the lockdestroy()
back in but with the proper name so that this compiles.

Submitted by:	jasone
2001-01-24 02:18:54 +00:00
jhb
4fe63e40a8 #ifdef a local variable only used in debugging code.
Reviewed by:	-scsi
2001-01-24 01:46:57 +00:00
jhb
c7124acea7 Const'ify cam_sim.sim_name to quiet warnings.
Reviewed by:	-scsi
2001-01-24 01:46:18 +00:00
cg
2565bf6979 don't grope around inside snd_dbuf structures as they will change in future 2001-01-24 01:36:15 +00:00
cg
99127615ba fix certain cards failing to attach
Submitted by:	Russell Cattelan <cattelan@thebarn.com>
2001-01-24 01:27:31 +00:00
cg
456c0fc978 fix blocksizing for playback, implement blocksizing for record 2001-01-24 01:22:53 +00:00
cg
9de50bdcce some cosmetics, changed channel setup and revamped irq handling - ignore
repeated interrupts
2001-01-24 01:20:04 +00:00
cg
2cc907a0c7 prevent excessively small buffer sizes resulting in hundreds of irqs per
second
2001-01-24 01:15:50 +00:00
jhb
fa0d2b97b0 Don't grab Giant when calling kmem_alloc/kmem_free as this is just
encouraging other people to follow the same practice.  If this is going
to be done, then it should be done inside of those two functions instead.
2001-01-24 00:36:03 +00:00
jhb
7c01c0a2c2 Proc locking. 2001-01-24 00:35:12 +00:00
jhb
1046fa2a8d - Proc locking.
- Protect calcru() with sched_lock.
2001-01-24 00:33:44 +00:00
jhb
065a35fbb6 - Proc locking.
- Protect calcru() with sched_lock.
2001-01-24 00:28:07 +00:00
jhb
a294d4e362 Proc locking. 2001-01-24 00:27:28 +00:00
jhb
f540aca984 Proc locking to protect p_ucred while we obtain additional references. 2001-01-24 00:26:19 +00:00
jhb
733f2050f9 - Proc locking.
- Use FreeBSD stackgap_init() semantics.
- Adjust some #ifdef's to hide unused variables.
2001-01-24 00:24:57 +00:00
jhb
370523c244 - Proc locking.
- Use NULL instead of 0.
2001-01-24 00:23:30 +00:00
mjacob
3403eb045d "Rejected with status" is better than "Rejected for status". 2001-01-24 00:14:37 +00:00
jhb
0717c33b64 Use selrecord() instead of doing the work ourselves. 2001-01-24 00:06:26 +00:00
jhb
b5d0418fc1 Make the device name in an isa_device a const char * instead of a char *
to silence cast-qual warnings.
2001-01-24 00:05:13 +00:00
jhb
a98f3e67f7 Use queue macros. 2001-01-24 00:01:42 +00:00
jhb
80649f2bc1 Proc locking. 2001-01-23 23:59:38 +00:00
jhb
f5fbc62142 - Use 'p' instead of 'curproc' for the namei lookup as this is what
other image activators use.
- Proc locking.
2001-01-23 23:59:30 +00:00
jhb
08fe94fb94 Proc locking. 2001-01-23 23:51:56 +00:00
mjacob
6811103a87 Allow fxp to configure in I/O space if the user wants it and specifies
an override as a loader settable variable (fxp_iomap). fxp_iomap is
a bitmap of fxp units that should be configured to use PCI I/O space
in stead of PCI Memory space.

Reviewed by:	Kees Jan Koster <dutchman@tccn.cs.kun.nl>, dg@freebsd.org
2001-01-23 23:22:17 +00:00
jhb
45daa2e3ce Proc locking, mostly protecting p_ucred while obtaining additional
references.
2001-01-23 22:41:15 +00:00
jhb
24fda4f13e - Remove unused header include.
- Use queue macros.
2001-01-23 22:38:38 +00:00
jhb
e7cd4ee729 Proc locking to protect p_ucred while we obtain an additional reference. 2001-01-23 22:38:15 +00:00
jhb
c55210afc5 - FreeBSD doesn't have an abortop vnop as far as I can tell, so #ifdef
references to the hpf op out.
- Remove a lockdestroy() on a non-existent variable.
2001-01-23 22:37:30 +00:00
jhb
fe7d8cee8f Tag unused functions with __unused. 2001-01-23 22:24:26 +00:00
jhb
b4eb86c28d Proc locking to protect p_ucred while we obtain another reference to it. 2001-01-23 22:23:25 +00:00
jhb
600bbce055 Use suser(9) instead of checking p->p_ucred->cr_uid directly. 2001-01-23 22:22:25 +00:00
jhb
dede119c77 Remove a prototype for an unused and undefined debugging function. 2001-01-23 22:21:14 +00:00
jhb
4799f0d266 Tag unused functions with __unused. 2001-01-23 22:18:41 +00:00
jhb
e01b490c7e - Move stg_card_intr()'s prototype and definition inside appropriate
#ifdef's as it is is only used on older versions of FreeBSD.
- #ifdef a local variable only used on older versions of FreeBSD.
2001-01-23 22:18:07 +00:00
gibbs
f2a4379534 When flipping the first entry in the qinfifo with the "next queued SCB",
we must also inform the card of this change.  Otherwise the sequencer
will traverse a corrupt list of SCBS.  The side effects of this problem
were unknown SCBs completing in the qoutfifo or worse yet, panics due
to sequencer interrupts that referenced what, to the kernel, were invalid
SCB ids.
2001-01-23 22:17:03 +00:00
jhb
2207837a49 Relocate the 'hwfuncs' functions below the inlined functions they attempt
to call so that the other functions can actually be inlined.
2001-01-23 22:16:18 +00:00
jhb
ce468ee38d - Proc locking.
- Use queue macros.
- Use NULL instead of 0 for pointers.

Reviewed by:	des
2001-01-23 22:13:07 +00:00
jhb
1442e82d08 Move nsp_card_intr()'s prototype and definition inside the appropriate
#ifdef's as it is only used in older versions of FreeBSD.
2001-01-23 22:09:04 +00:00
jhb
3ed8c05491 Move the definition of nsp_start_timer() earlier in the file before it is
called so that it can be inlined.
2001-01-23 22:08:21 +00:00
jhb
d56ddb5579 The ncv_card_intr function is only used in older versions of FreeBSD, so
move its prototype and definition inside the appropriate #ifdef's.
2001-01-23 22:06:10 +00:00
jhb
a24eb2156c Use the 'slp' local variable that was otherwise unused instead of casting
the driver softc under the assumption that the first part of it was a
struct scsi_low_softc.
2001-01-23 22:05:07 +00:00
jhb
42f3c7594b #if 0 out local variables only used in #if 0'd code and remove unused
local variables.
2001-01-23 22:02:08 +00:00
jhb
74ab965b0d Add curly braces ({}) around each struct speedtab to quiet warnings. 2001-01-23 22:00:05 +00:00
jhb
191c7b388b Proc locking in the form of using the proc lock to protect p_ucred while
we obtain another reference to it for vnode operations.
2001-01-23 21:58:44 +00:00
jhb
9f36704413 Axe unused local variable. 2001-01-23 21:53:44 +00:00
jhb
3ab09403ef - Mark an unused function with __unused.
- Temporarily #if 0 some unused local variables.
2001-01-23 21:52:34 +00:00
jhb
82bd6820a6 Axe an unused static softc. 2001-01-23 21:51:26 +00:00
jhb
fd3d6d8dd8 Move a temporary #ifdef of code (just the #ifdef part) up so that it is
above the local variable declaration to quiet warnings about unused
variables.
2001-01-23 21:45:05 +00:00
jhb
8c3bdd92ce Kill a warning by marking an unused function with __unused. 2001-01-23 21:43:47 +00:00
jhb
ce6fea2dce Argh, atomic_store_rel -> atomic_store_rel_int. 2001-01-23 21:40:07 +00:00
jhb
a5a5f8a9d6 Woops, add in missing headers. 2001-01-23 21:39:15 +00:00
jhb
2baf61c869 Proc locking. 2001-01-23 21:33:55 +00:00
jhb
9a868ba306 Use queue macros. 2001-01-23 21:32:02 +00:00
jhb
0742fd6c67 - Add proc locking.
- Fix several bugs in the wait syscall, including freeing the actual
  proc start, freeing the args, freeing the prison, and other minor
  nits.
- Use appropriate queue(3) macros.
- Use zpfind() instead of walking zombproc ourselves.
2001-01-23 21:30:25 +00:00
kris
1a36de8090 Fix the vulnerability with TCP ECE packets recently fixed in ipfw.
This is untested, but believed to work.
2001-01-23 21:11:28 +00:00
jhb
6ebef802b2 - Use proper atomic operations to make the run time initialization
controlled by svr_str_initialized be MP safe.
2001-01-23 21:07:16 +00:00
jhb
c318d32494 - Add necessary proc locking.
- Use proper atomic operations to make the run time initialization
  controlled by svr_str_initialized be MP safe.
- Use appropriate queue(3) macros where needed.
2001-01-23 21:06:30 +00:00
jhb
9d20e25a89 FreeBSD doesn't have p_emuldata, and our stackgap_init() doesn't take an
argument.
2001-01-23 21:02:44 +00:00
jhb
59ea97bfac Use proc lock to safely obtain references to p_ucred before vnode
operations.
2001-01-23 20:52:50 +00:00
jhb
6db3488060 Protect calcru() with sched_lock. 2001-01-23 20:50:40 +00:00
mjacob
b4e8c12b24 Do not do the commenting out the way that saves bytes and looks cleaner
to you. Do it the way Vox Populi wants it.
2001-01-23 16:35:33 +00:00
takawata
f849232391 Map BSS section in PECOFF executable.
Submitted by:	 KUROSAWA Takahiro <fwkg7679@mb.infoweb.ne.jp>
2001-01-23 16:19:37 +00:00
ume
1ae749987d Add mibs to hold the number of forks since boot. New mibs are:
vm.stats.vm.v_forks
	vm.stats.vm.v_vforks
	vm.stats.vm.v_rforks
	vm.stats.vm.v_kthreads
	vm.stats.vm.v_forkpages
	vm.stats.vm.v_vforkpages
	vm.stats.vm.v_rforkpages
	vm.stats.vm.v_kthreadpages

Submitted by:	Paul Herman <pherman@frenchfries.net>
Reviewed by:	alfred
2001-01-23 14:32:01 +00:00
nyan
52c12909eb Added pc98 apm driver.
Submitted by:	MURAMATSU Atsushi <amura@ma3.seikyou.ne.jp>
2001-01-23 12:37:15 +00:00
joerg
3bdade41c9 Mark the (ancient) MaxOptix Tahiti 1 drive as a known rogue that would
respond to all LUNs.

Reviewed by:	ken
2001-01-23 10:49:30 +00:00
hm
ec62944a0b Remove useless variable vjlen.
Submitted by:	Sergio de Souza Prallon <prallon@tmp.com.br>
2001-01-23 10:01:55 +00:00
peter
ac8d71e326 In answer to the comment: /* XXX is it OK to block here? */, the answer
is definately NO! as we are in interrupt context and malloc() does a
KASSERT() to be sure.
2001-01-23 09:43:23 +00:00
wes
eeda0df2a3 When attempting to bind to an ephemeral port, if no such port is
available, the error return should be EADDRNOTAVAIL rather than
EAGAIN.

PR:		14181
Submitted by:	Dima Dorfman <dima@unixfreak.org>
Reviewed by:	Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
2001-01-23 07:27:56 +00:00
wollman
7885956de1 This file declares `struct timespec' so that we can have a single,
centralized declaration (this will become useful later when we declare
struct timespec in all the places it is supposed to be).
2001-01-23 04:44:04 +00:00
wollman
ff0b0943e1 Synchronize with some of my local changes. To quote:
* This file must be kept synchronized with <sys/timespec.h>.
 * It defines a structure which must be a type pun for
 * `struct timespec'; this structure is used in header files where
 * the ABI uses a `struct timespec' but standards prohibit its
 * definition.  (Currently only <sys/stat.h>.)
2001-01-23 04:40:54 +00:00
rwatson
a7fc696a51 o The move to using VADMIN under vaccess() resulted in some system
calls returning EACCES instead of EPERM.  This patch modifies vaccess()
  to return EPERM instead of EACCES if VADMIN is among the requested
  rights.  This affects functions normally limited to the owners of
  a file, such as chmod(), as EPERM is the error indicating that
  privilege would allow the operation, rather than a chance in mandatory
  or discretionary rights.

Reported by:	bde
2001-01-23 04:15:19 +00:00
mckusick
09f032c118 Add function prototype for libc function sysctlnametomib() 2001-01-23 03:42:20 +00:00
jake
13afa1fa68 Sigh. atomic_add_int takes a pointer, not an integer.
Pointy-hat-to:	des
2001-01-23 03:40:27 +00:00
des
7e93e90119 Use atomic operations to update the stat counters. 2001-01-23 01:11:11 +00:00
luigi
2d9565a950 Change critical section protection for dummynet from splnet() to
splimp() -- we need it because dummynet can be invoked by the
bridging code at splimp().

This should cure the pipe "stalls" that several people have been
reporting on -stable while using bridging+dummynet (the problem
would not affect routers using dummynet).
2001-01-22 23:04:13 +00:00
dwmalone
50ecd5a27c Free the kbd pointer when it isn't NULL, as opposed to when it is.
This was a typo in the M_ZERO patches.

Submitted by:	Mike Silbersack <silby@silby.com>
2001-01-22 22:54:02 +00:00
luigi
a7363a0fe8 Assorted bugfixes:
+ configuration: make sure that the NUL at the end of the config
   string is properly detected and handled, and the stats passed
   up via sysctl properly reflect which interfaces do bridging.
   (The whole config support might make good use of some cleanup
   in the future).

 + fixed some bugs related to the corruption of multicast and
   broadcast packets: make sure that for those packets the entire
   IP + ethernet header is in the mbuf, not in a cluster, so
   that writes performed in that area by the upper layers do
   not affect us.

 + performance: when calling m_pullup, make room for the ethernet header
   as well, we are going to add it in right after. Also, change an m_dup
   back to m_copypacket. The former is not necessary anymore now, and
   it did not help, anyways.

I will do a fast MFC because 95% of this patch is fixing bad bugs
and i doubt anyone would test the fix in CURRENT. Plus the last
two items mostly bring back some code which was already there in 4.0
times.
2001-01-22 22:34:53 +00:00
mjacob
6c5381dc64 Move (now) unused variable declaration inside the block (now commented out). 2001-01-22 22:22:38 +00:00
gibbs
4d9966a39e ahc_eisa.c:
Initialize rid to 0.  This doesn't seem to make any difference
	(the driver doesn't care what rid it gets and no-one seems to
	check rid's value), but follows standard conventions.

	Pass in our device_t to ahc_alloc().  We now use device_T
	softc storage, so passing NULL results in a panic.

	Set the unit number in our softc so that the driver core
	can retrieve it.

ahc_pci.c:
	Set the unit number in our softc so that the driver core
	can retrieve it.

aic7770.c:
	Insert our softc into the list of softcs when initialization
	is successful.

aic7xxx.c:
	Remove a workaround for an aic7895 bug we will never trigger.

	Add additional diagnostic info to ahc_dump_card_state().

	Always panic the system if a sequencer assertion fails.

	AHC_SCB_BTT is a "flag" not a "feature".  Check the right
	field in the softc.

	Replace a hard coded number with a constant.

	Guard against looping forever in ahc_pause_and_flushwork().
	A hot eject or card failure may make the intstat register
	return 0xFF, so limit the number of interrupts we'll process.

	Correct the code in ahc_search_qinfifo() that guarantees that
	the sequencer will see an abort collision if the qinfifo is
	modified when a DMA is in progress.  We now do this fixup
	after modifying the queue.  This guarantees that the HSCB
	we place at the head of the queue is not the same as the
	old head.  Using "next hscb" (guaranteed not to be the
	same as the first SCB) before clearing the queue could free
	up the original head hscb to be used during a remove operation
	placing it again at the head of the qinfifo.

aic7xxx.h:
	Reduce the maximum number of outstanding commands to 253 from
	254.  To handle our output queue correctly on machines that only
	support 32bit stores, we must clear the array 4 bytes at a
	time.  To avoid colliding with a DMA write from the sequencer,
	we must be sure that 4 slots are empty when we write to clear
	the queue.  This reduces us to 253 SCBs: 1 that just completed
	and the known three additional empty slots in the queue that
	preceed it.  Yahoo was able to force this race on one of their
	systems.  Interrupts were disabled for such a time that the
	entire output queue was filled (254 entries complete without
	any processing), and our 32bit write to clear the status clobbered
	one entry.

	Add a feature tag for devices that are removable.

aic7xxx.reg:
	Never use the sequencer interrupt value of 0xF0.  We need
	to guanrantee that an INTSTAT value of 0xFF can only occur
	during card failure or a hot-eject.

	Align the busy targets table with the begining of scratch
	space.  This seems to appease a chip bug in the aic7895.

aic7xxx.seq:
	Be sure to disable select-out after a bus free event that occurs
	early in a selection.  If we don't disable select-out, we will
	believe that it is enabled even though a new selection will never
	occur.

	Move the clearing of SELDI to just before a jump.  This appeases
	another chip bug of the aic7895.

	Make the target mode command loop a bit more efficient.

	AHC_SCB_BTT is a "flag" not a "feature".  Check the right
	field in the softc.

	Properly cleanup the last SCB we tested against should we
	fail to properly find an SCB for a reselection.

	Add some additional sequencer debugging code.

aic7xxx_freebsd.c:
	Limit the driver to 253 outstanding commands per adapter.

	Guard against overflow in timeout handling.

aic7xxx_inline.h:
	AHC_SCB_BTT is a "flag" not a "feature".  Check the right
	field in the softc.

aic7xxx_pci.c:
	Set the removable feature for the apa1480 cardbus and the 29160C
	Compact PCI card.

	Don't report high byte termination information for narrow cards.

	Use a PCI read rather than a questionable delay when fetching/setting
	termination settings.
2001-01-22 21:03:48 +00:00
ume
301ceeb33d avoid conflicting #define symbol (s/FW_IFNLEN/IP6&/).
Obtained from:	KAME
2001-01-22 19:20:06 +00:00
julian
a91cde79fe Add MTX_SPIN to an mtx_init( 2001-01-22 17:51:48 +00:00
ume
c678f46a19 on in6_ifdetach(), do not remove default route mistakenly
Obtained from:	KAME
2001-01-22 13:02:10 +00:00
nyan
591d99c108 Added PC-98 apm support.
Submitted by:	MURAMATSU Atsushi <amura@ma3.seikyou.ne.jp>
2001-01-22 11:27:25 +00:00
des
30bc358ebb Call vm_zone_init() at the appropriate time.
Reviewed by:	jasone, jhb
2001-01-22 07:02:42 +00:00
des
6929628df0 Give this code a major facelift:
- replace the simplelock in struct vm_zone with a mutex.

 - use a proper SLIST rather than a hand-rolled job for the zone list.

 - add a subsystem lock that protects the zone list and the statistics
   counters.

 - merge _zalloc() into zalloc() and _zfree() into zfree(), and
   move them below _zget() so there's no need for a prototype.

 - add two initialization functions: one which initializes the
   subsystem mutex and the zone list, and one that currently doesn't
   do anything.

 - zap zerror(); use KASSERTs instead.

 - dike out half of sysctl_vm_zone(), which was mostly trying to do
   manually what the snprintf() call could do better.

Reviewed by:	jhb, jasone
2001-01-22 07:01:50 +00:00
jasone
cf0a6d372c Print correct file name and line number in mtx_assert().
Noticed by:	jake
2001-01-22 05:56:55 +00:00
msmith
71aff7f1c7 Plug a memory leak in AcpiOsDeleteSemaphore where the mutex is not properly
destroyed.

Submitted by:	bmilekic
2001-01-22 05:33:36 +00:00
julian
506e7f0e18 remove stupid braino (recursive mutex)
tripped over by: PHK
2001-01-21 23:32:00 +00:00
phk
744bd48fc5 General cleanup. 2001-01-21 22:57:56 +00:00
jasone
ec55088093 Move most of sys/mutex.h into kern/kern_mutex.c, thereby making the mutex
inline functions non-inlined.  Hide parts of the mutex implementation that
should not be exposed.

Make sure that WITNESS code is not executed during boot until the mutexes
are fully initialized by SI_SUB_MUTEX (the original motivation for this
commit).

Submitted by:	peter
2001-01-21 22:34:43 +00:00
des
b3c27aaaf7 First step towards an MP-safe zone allocator:
- have zalloc() and zfree() always lock the vm_zone.
 - remove zalloci() and zfreei(), which are now redundant.

Reviewed by:	bmilekic, jasone
2001-01-21 22:23:11 +00:00
phk
f1e9c33a34 Update these netgraph drivers in current so that these changes can be
MFC'ed i due time.  I can't test it under current right now because
netgraph seems to do unethical things with mutexes.

musycc:
	Add status per channel.
	Reduce printf chattyness
	Keep error counters line if_mn does.
	Increase descriptor count.

if_mn:
	Support experimental unframed E1 lines.

These two drivers should share more code relating to framed channelized
TDM media in general (T1/E1/E3/T3, Sonet).  Anyone interested email me.
2001-01-21 22:16:20 +00:00
phk
ea80761e20 Convert a Debugger(3) to a panic(9) and a EINVAL.
Reminded by:	bde
2001-01-21 21:19:49 +00:00
jake
937122ae6d Make intr_nesting_level per-process, rather than per-cpu. Setup
interrupt threads to run with it always >= 1, so that malloc can
detect M_WAITOK from "interrupt" context.  This is also necessary
in order to context switch from sched_ithd() directly.

Reviewed By:	peter
2001-01-21 19:25:07 +00:00
imp
d326c51b74 wi has been converted to NEWCARD, so included it when pccard is
included.

Also, I forgot to update this to the new cis[] structure last night,
mainly due to the above omission.
2001-01-21 18:10:38 +00:00
sos
4df68a4783 Correct botchup in last commit that made older VIA chips fail... 2001-01-21 16:13:03 +00:00
ume
d8c3e3afc2 permit icmp6 type <= 256 (was 32).
Obtained from:	KAME
2001-01-21 16:07:08 +00:00
jasone
c3fd76623a Make the order of the static initializer for all_mtx match the order of
fields in struct mtx.

Found by:	jake
2001-01-21 11:05:02 +00:00
hm
9c4d942508 Update the iwic driver: fix error handling for rx errors on the D-channel
which prevents erroneous packets from being put onto the protocol stack;
enhance error detection for B-channel HDLC errors; remove old cvs id´s.
2001-01-21 10:12:50 +00:00
imp
dd1ea82faf Add a bunch of entries from NetBSD's if_ne_pcmcia.c v1.67. We still
need to verify that all the entries in pccard.conf are present in this
table.
2001-01-21 08:20:23 +00:00
imp
4e0af4d009 Use PCCARD_CIS_xxx #defines for the table of oem ids. These usually
translate to all NULLs (as for all the ones in this commit).
2001-01-21 08:15:37 +00:00
imp
83ca21a660 Convert the vendor/product cis strings to an array of CIS entries. This
allows us to use the PCCARD_CIS #defines generated to distinguish cards
that don't have a Manufacturer and OEM.
2001-01-21 08:09:00 +00:00
peter
0f92919216 Remove APIC_INTR_DIAGNOSTIC - this has been disabled for some time now.
Remove some leftovers of removed SMP options.
2001-01-21 07:54:10 +00:00
jasone
24d53563ed Remove MUTEX_DECLARE() and MTX_COLD. Instead, postpone full mutex
initialization until after malloc() is safe to call, then iterate through
all mutexes and complete their initialization.

This change is necessary in order to avoid some circular bootstrapping
dependencies.
2001-01-21 07:52:20 +00:00
peter
db586afb8b Remove the MAYBE_PANIC and GUARD_CPU macros - unused. 2001-01-21 07:26:31 +00:00
jake
c45422f874 Remove the per-cpu pages used for copy and zero-ing pages of memory
for SMP; just use the same ones as UP.  These weren't used without
holding Giant anyway, and the routines that use them would have to
be protected from pre-emption to avoid migrating cpus.
2001-01-21 06:50:03 +00:00
imp
137b76e846 Break the isa attachment of the Crystal Semiconductor 89x0 into two
parts: isa and pccard.  The isa one is known to work with an IBM
EtherJet ISA card.  The pccard one isn't known to work because the
EtherJet pccard I purchased recently arrived DOA :-(.  I'll commit the
pccard.conf entry when the replacement card arrives.

I plan on MFC this in a week or two.
2001-01-21 04:56:12 +00:00
imp
9dfe17139a remove duplicate entry that snuck in during the merge. 2001-01-21 04:33:12 +00:00
jake
b2dd5fbcb8 Implement optimized PCPU accessors. These are necessary to support a
pre-emptable kernel.  For variables of size 4 bytes or less they compile
to a single instruction, which does not allow a process to migrate cpus
in the middle, and get the value for the "wrong" cpu.
2001-01-21 03:11:03 +00:00
mjacob
440ea309e2 Make residuals signed.
PR:		24221
2001-01-21 01:34:14 +00:00
jhb
bf9da1eab7 - All of proc_compare needs sched_lock, so hold it for the for loop that
calls it rather than obtaining and releasing it a lot in proc_compare.
- Collect all of the data gathering and stick it just after the
  proc_compare loop.  This way, we only have to grab sched_lock once now
  when handling SIGINFO.  All the printf's are done after the values are
  calculated.

Submitted mostly by:	bde
2001-01-20 23:03:20 +00:00
ume
9f0480156d When ip6_fw_ctl() or soopt_mcopyout() return without success,
don't free mbuf.  It is already freed by these routins.

PR:		kern/24248
2001-01-20 22:37:24 +00:00
bmilekic
adf34d0448 When short of mbufs or mbuf clusters, we sleep on appropriate "counters."
The counters are incremented when a thread goes to sleep and decremented
either when a thread is woken up by another thread or when the sleep
times out. There existed a race where the sleep count could be decremented
twice resulting in an eventual underflow.
Move the decrementing of the "counters" to the thread initiating the sleep
and thus remedy the problem.
2001-01-20 21:29:10 +00:00
asmodai
91ea9f4b4a Document some more options.
Apologies to Bruce for not yet cleaning it up in sections.  Coming
soon.
2001-01-20 12:34:53 +00:00
jake
19d6e5bb42 Rename the ASSYM MTX_RECURSE to MTX_RECURSECNT in order to not conflict
with the flag of the same name.
2001-01-20 06:07:36 +00:00
jake
cf5b2e3c3b Simplify the i386 asm MTX_{ENTER,EXIT} macros to just call the
appropriate function, rather than doing a horse-and-buggy
acquire.  They now take the mutex type as an arg and can be
used with sleep as well as spin mutexes.
2001-01-20 04:14:25 +00:00
grog
18831b1520 Correct check for partition c. Previously the check was for drive 2,
which did not exactly have the desired result.

Submitted by:	Akira Watanabe <akira@myaw.ei.meisei-u.ac.jp>
2001-01-20 03:46:19 +00:00
wollman
3923d4a12b Do not recursively include <sys/selinfo.h> from <sys/select.h>; all in-tree
clients have been fixed.  (So far as I can tell, all of the user-land
clients of <sys/select.h> do so vacuously, in the expectation that select()
might be declared there.)
2001-01-20 03:11:47 +00:00
jhb
5e8c3954d5 Temporarily disable the printf() for micruptime() going backwards, the
SIGXCPU signal, and killing of processes that exceed their allowed run
time until they can play nice with sched_lock.  Right now they are just
potentital panics waiting to happen.  The printf() has bitten several
people.
2001-01-20 02:57:59 +00:00
jake
ea36052df5 - Make npx_intr INTR_MPSAFE and move acquiring Giant into the
function itself.
- Remove a hack to allow acquiring Giant from the npx asm trap
  vector.
2001-01-20 02:30:58 +00:00
wollman
0fbfe85a3c Finish deprecating <sys/select.h> in favor of <sys/selinfo.h> in kernel code. 2001-01-20 02:24:07 +00:00
jhb
a11e21597d Be more careful with sched_lock in the SIGINFO handler. Specifically, do
not hold sched_lock while calling ttyprintf().  If we are on a serial
console, then ttyprintf() will end up getting the sio lock, resulting in
a lock order violation.

Noticed by:	des
2001-01-20 02:04:44 +00:00
imp
3427c48eab Sync to pccarddevs 1.9 2001-01-20 02:04:26 +00:00