Commit Graph

56167 Commits

Author SHA1 Message Date
jhb
6f98eef946 - Proc locking.
- Update userret() to take a struct trapframe * as a second argument.
- Axe have_giant and use mtx_owned(&Giant) where appropriate.
2001-01-24 10:38:13 +00:00
jhb
193b4aced8 - Proc locking.
- P_FOO -> PS_FOO.
2001-01-24 10:36:47 +00:00
jhb
2a0c88ae19 - Proc locking.
- Bring across forwarded_statclock() fixes from i386 and alpha.
2001-01-24 10:36:21 +00:00
jhb
9f31d96548 - Proc locking around the vinumdaemon dinking with its flags.
- P_INMEM -> PS_INMEM.
2001-01-24 10:28:19 +00:00
jhb
0828bc3bfe Make mp_machdep.c be an optional file conditional on SMP. 2001-01-24 10:27:37 +00:00
jhb
a2fcfc567a Proc locking. 2001-01-24 10:27:11 +00:00
jhb
9e3015a286 Use queue macros. 2001-01-24 10:26:51 +00:00
jhb
beceb8caee Add a prototype for isa_irq_mask() to quiet a warning. 2001-01-24 10:25:44 +00:00
jhb
6e6c76c7d0 Wrap the IPI definitions and function prototypes in #ifdef SMP. 2001-01-24 10:25:09 +00:00
jhb
d52c0c6ea1 - 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
df9c3cf98b - Proc locking.
- P_OWEUPC -> PS_OWEUPC.
2001-01-24 10:23:54 +00:00
jhb
23bb2d4bad - 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
c34c042a99 - Proc locking.
- P_INMEM -> PS_INMEM.
2001-01-24 10:16:23 +00:00
jhb
da946d8969 - 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
581f857bf7 - 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
f48160c48f - 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
a3fd111073 - 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
b2ab26c2b7 cpuno -> cpuid. 2001-01-24 10:04:32 +00:00
jhb
d506473705 Don't import the nonexistent astpending variable. 2001-01-24 10:03:05 +00:00
jhb
7b61119005 Wrap the startup code used by secondary processors in #ifdef SMP. 2001-01-24 10:01:53 +00:00
jhb
482ba83ff5 Remove the Xforward_irq IPI. 2001-01-24 10:01:13 +00:00
jhb
9945ab1a04 - 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
4888e39288 Remove unused locks: cpl, fast_intr, intr, mpintr. 2001-01-24 09:58:56 +00:00
jhb
f02fc13086 - Proc locking.
- P_OWEUPC -> PS_OWEUPC.
- Remove obsolete prototype for MD fork_return().
2001-01-24 09:56:49 +00:00
jhb
b1611f4267 - Remove Xforward_irq, cpl_lock, and fast_intr_lock.
- Add fork_exit.
2001-01-24 09:55:39 +00:00
jhb
07118968a1 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
54a1024949 - 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
e994d4f39f - Proc locking.
- P_INMEM -> PS_INMEM.
2001-01-24 09:49:49 +00:00
jhb
5cbe07ba8c - 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
7d8717edb0 - 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
ru
907d42d60d Mdoc(7)ify the previous revision. 2001-01-24 09:45:19 +00:00
jhb
f016f2f696 Call fork_exit() now instead of futzing around in assembly during a fork
return.
2001-01-24 09:43:26 +00:00
ru
1ceaf9ea8f mdoc(7) police: fixed some minor formatting/spelling errors. 2001-01-24 09:41:17 +00:00
jhb
c4aad774b6 - 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
sobomax
a72713d315 Protect against multiple inclusion. 2001-01-24 09:06:42 +00:00
sobomax
5475fbb523 Minor fixes:
- Use "OPOST | ONLCR" as a c_oflag in the raw mode instead of 0, which should
  make debug output mode readable;
- flush input buffer when switching to/from raw mode. This should prevent
  leaking raw scancodes into your shell prompt when program called
  VGLKeyboardEnd() w/o processing all scancodes in the buffer.
2001-01-24 09:05:35 +00:00
jhb
87a1f683c2 Fix a typo.
Reported by:	albert
2001-01-24 08:42:39 +00:00
hm
e09a1d15f7 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
ru
d848c04faf Mention the -F in the usage().
PR:		24586
Submitted by:	Cyrille Lefevre <clefevre@citeweb.net>
2001-01-24 08:27:59 +00:00
sobomax
a52ade02a1 Make `-y' option actually work.
Submitted by:	reg
2001-01-24 08:22:53 +00:00
jhb
a39fd0be31 Add missing include. 2001-01-24 06:54:24 +00:00
mckusick
2cf239a333 Never reuse AUTO_OID values.
Approved by:	Alfred Perlstein <bright@wintelcom.net>
2001-01-24 04:35:13 +00:00
jhb
24678cfc4c 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
bd55440dc2 #ifdef a local variable only used in debugging code.
Reviewed by:	-scsi
2001-01-24 01:46:57 +00:00
jhb
204e39abca Const'ify cam_sim.sim_name to quiet warnings.
Reviewed by:	-scsi
2001-01-24 01:46:18 +00:00
cg
ad9b75b8d8 don't grope around inside snd_dbuf structures as they will change in future 2001-01-24 01:36:15 +00:00
cg
63d51b135b fix certain cards failing to attach
Submitted by:	Russell Cattelan <cattelan@thebarn.com>
2001-01-24 01:27:31 +00:00
cg
3f9a54eb71 fix blocksizing for playback, implement blocksizing for record 2001-01-24 01:22:53 +00:00
cg
7d3f51788a some cosmetics, changed channel setup and revamped irq handling - ignore
repeated interrupts
2001-01-24 01:20:04 +00:00
cg
da008aa586 prevent excessively small buffer sizes resulting in hundreds of irqs per
second
2001-01-24 01:15:50 +00:00