Commit Graph

1693 Commits

Author SHA1 Message Date
mjacob
d416f5d3a7 move wx to be part of miibus requiring chipsets 2001-05-30 03:20:52 +00:00
phk
01935ccf65 Remove MFS options from all example kernel configs. 2001-05-29 18:49:06 +00:00
nyan
604547c262 Update pc98 memory probe functions.
- pc98_getmemsize() function returns available memory size under 16MB.
 - getmemsize() function is merged from PC-AT's one.

Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata) and
		NOKUBI Hirotaka <nokubi@ff.iij4u.or.jp>
2001-05-21 12:51:44 +00:00
nyan
8c2afcf9bc Merged from sys/i386/isa/npx.c revisions 1.99 and 1.100. 2001-05-21 12:20:22 +00:00
nyan
0c9f83be0e Merged from sys/i386/i386/machdep.c revisions 1.452 and 1.453. 2001-05-21 11:57:54 +00:00
jhb
cb5aff89bf Remove unneeded includes of sys/ipl.h and machine/ipl.h. 2001-05-15 23:22:29 +00:00
kato
a4dc3b58c8 Merged from sys/isa/fd.c revision 1.197. 2001-05-15 08:55:30 +00:00
kato
0877e37ec1 Merged from sys/i386/i386/machdep.c revision 1.450. 2001-05-15 08:32:01 +00:00
phk
8393668916 Convert DEVFS from an "opt-in" to an "opt-out" option.
If for some reason DEVFS is undesired, the "NODEVFS" option is
needed now.

Pending any significant issues, DEVFS will be made mandatory in
-current on july 1st so that we can start reaping the full
benefits of having it.
2001-05-13 20:52:40 +00:00
jhb
b9aa30a9da - Split out the support for per-CPU data from the SMP code. UP kernels
have per-CPU data and gdb on the i386 at least needs access to it.
- Clean up includes in kern_idle.c and subr_smp.c.

Reviewed by:	jake
2001-05-10 17:45:49 +00:00
phk
c9c6ba8bb3 Actually biofinish(struct bio *, struct devstat *, int error) is more general
than the bioerror().

Most of this patch is generated by scripts.
2001-05-06 20:00:03 +00:00
kato
46bae6e9c1 Merged from sys/i386/i386/machdep.c revision 1.448. 2001-05-06 09:18:32 +00:00
nyan
2d9c06401a Merged from sys/i386/conf/GENERIC revision 1.304. 2001-05-06 05:57:46 +00:00
nyan
a9788c8846 Merged from sys/isa/fd.c revision 1.193. 2001-05-06 05:49:11 +00:00
kato
6920aa30b0 Merged from sys/isa/sio.c revision 1.330. 2001-05-02 14:02:16 +00:00
kato
ae73a1dbc1 Merged from sys/isa/fd.c revision 1.195. 2001-05-02 13:59:03 +00:00
kato
d557e9fb79 Merged from sys/i386/isa/npx.c revisions 1.96 and 1.97. 2001-05-02 13:56:50 +00:00
kato
0c3aa232d6 Merged from sys/i386/isa/clock.c revisions 1.172 and 1.173. 2001-05-02 13:51:49 +00:00
kato
b4213ece2a Merged the rest of changes in sys/i386/i386/machdep.c revision 1.447. 2001-05-02 13:48:39 +00:00
markm
6ec52cf8be Undo part of the tangle of having sys/lock.h and sys/mutex.h included in
other "system" header files.

Also help the deprecation of lockmgr.h by making it a sub-include of
sys/lock.h and removing sys/lockmgr.h form kernel .c files.

Sort sys/*.h includes where possible in affected files.

OK'ed by:	bde (with reservations)
2001-05-01 08:13:21 +00:00
jhb
556d6d4bc9 Overhaul of the SMP code. Several portions of the SMP kernel support have
been made machine independent and various other adjustments have been made
to support Alpha SMP.

- It splits the per-process portions of hardclock() and statclock() off
  into hardclock_process() and statclock_process() respectively.  hardclock()
  and statclock() call the *_process() functions for the current process so
  that UP systems will run as before.  For SMP systems, it is simply necessary
  to ensure that all other processors execute the *_process() functions when the
  main clock functions are triggered on one CPU by an interrupt.  For the alpha
  4100, clock interrupts are delievered in a staggered broadcast fashion, so
  we simply call hardclock/statclock on the boot CPU and call the *_process()
  functions on the secondaries.  For x86, we call statclock and hardclock as
  usual and then call forward_hardclock/statclock in the MD code to send an IPI
  to cause the AP's to execute forwared_hardclock/statclock which then call the
  *_process() functions.
- forward_signal() and forward_roundrobin() have been reworked to be MI and to
  involve less hackery.  Now the cpu doing the forward sets any flags, etc. and
  sends a very simple IPI_AST to the other cpu(s).  AST IPIs now just basically
  return so that they can execute ast() and don't bother with setting the
  astpending or needresched flags themselves.  This also removes the loop in
  forward_signal() as sched_lock closes the race condition that the loop worked
  around.
- need_resched(), resched_wanted() and clear_resched() have been changed to take
  a process to act on rather than assuming curproc so that they can be used to
  implement forward_roundrobin() as described above.
- Various other SMP variables have been moved to a MI subr_smp.c and a new
  header sys/smp.h declares MI SMP variables and API's.   The IPI API's from
  machine/ipl.h have moved to machine/smp.h which is included by sys/smp.h.
- The globaldata_register() and globaldata_find() functions as well as the
  SLIST of globaldata structures has become MI and moved into subr_smp.c.
  Also, the globaldata list is only available if SMP support is compiled in.

Reviewed by:	jake, peter
Looked over by:	eivind
2001-04-27 19:28:25 +00:00
jhb
d6137cf672 Change the pfind() and zpfind() functions to lock the process that they
find before releasing the allproc lock and returning.

Reviewed by:	-smp, dfr, jake
2001-04-24 00:51:53 +00:00
kato
41625425e4 Merged from sys/i386/isa/npx.c revision 1.95. 2001-04-16 09:15:40 +00:00
obrien
22833ef00e Turn on kernel debugging support (DDB, INVARIANTS, INVARIANT_SUPPORT, WITNESS)
by default while SMPng is still being developed.

Submitted by:	jhb
2001-04-15 19:37:28 +00:00
nyan
d0eb498ced Correct typo. 2001-04-01 07:15:16 +00:00
nyan
b9882a13b6 Merged from sys/i386/i386/bioscall.s revision 1.9 and 1.10. 2001-04-01 07:08:13 +00:00
nyan
895dc8e6b9 Merged from sys/i386/isa/clock.c revision 1.171. 2001-04-01 06:41:47 +00:00
nyan
beb288a7e4 Merged from sys/i386/i386/machdep.c revision 1.446. 2001-04-01 06:40:45 +00:00
nyan
ee79d3d5b5 Merged from sys/i386/apm/apm.c revision 1.121. 2001-04-01 06:34:12 +00:00
jhb
28de7e9aec Switch from save/disable/restore_intr() to critical_enter/exit(). 2001-03-28 03:06:10 +00:00
phk
116669cfdd Send the remains (such as I have located) of "block major numbers" to
the bit-bucket.
2001-03-26 12:41:29 +00:00
kato
48f75fac27 Merged from sys/i386/isa/npx.c revision 1.93. 2001-03-23 08:58:36 +00:00
kato
da7d0f3f2d Merged from sys/i386/i386/machdep.c revision 1.445. 2001-03-23 08:57:22 +00:00
kato
32d33222f8 Merged from sys/i386/conf/GENERIC revision 1.305 (moved the fxp driver
into the miibus section.)
2001-03-17 14:04:24 +00:00
kato
4f7092532b Replaced p (undeclared) with curproc (after i386/isa/npx.c). 2001-03-08 14:25:51 +00:00
jhb
44b0453b59 Grab the process lock while calling psignal and before calling psignal. 2001-03-07 03:37:06 +00:00
nyan
27fdfa3412 Added another wd33c93 based SCSI card driver which replaces the bs driver.
Now, default is still bs.

Submitted by:	nyan and non.
Obtained from:	NetBSD/pc98
2001-02-27 12:34:01 +00:00
nyan
f50caff371 Supported pcmcia modem card.
Submitted by:	MURAMATSU Atsushi <amura@ma3.seikyou.ne.jp>
2001-02-25 08:55:07 +00:00
kato
59df0bde49 Merged from sys/i386/i386/machdep.c revision 1.443. 2001-02-25 08:00:35 +00:00
peter
2242ed4c70 Activate USER_LDT by default. The new thread libraries are going to
depend on this.  The linux ABI emulator tries to use it for some linux
binaries too.  VM86 had a bigger cost than this and it was made default
a while ago.

Reviewed by:	jhb, imp
2001-02-23 01:25:02 +00:00
kato
1b5cee6aa7 Merged from sys/isa/sio.c revision 1.326. 2001-02-21 10:24:21 +00:00
kato
fb91e7570d Merged from sys/i386/isa/clock.c revision 1.170. 2001-02-21 10:22:22 +00:00
kato
31e25ebf60 Merged from sys/i386/i386/machdep.c revision 1.441. 2001-02-21 10:20:11 +00:00
asmodai
d8144cf92b Preceed/preceeding are not english words. Use precede and preceding. 2001-02-18 10:43:53 +00:00
kato
9e47cdfcdb Merged from sys/i386/isa/clock.c revision 1.169. 2001-02-13 10:35:15 +00:00
kato
b01cceed6d Merged from sys/i386/isa/npx.c revision 1.90. 2001-02-13 10:04:32 +00:00
kato
b9083111b2 Merged from sys/isa/sio.c revision 1.324 (sched_swi -> swi_sched). 2001-02-13 09:55:20 +00:00
markm
4251e00dad RIP <machine/lock.h>.
Some things needed bits of <i386/include/lock.h> - cy.c now has its
own (only) copy of the COM_(UN)LOCK() macros, and IMASK_(UN)LOCK()
has been moved to <i386/include/apic.h> (AKA <machine/apic.h>).
Reviewed by:	jhb
2001-02-11 10:44:09 +00:00
jhb
28a4a5944c Move the initailization of the proc lock for proc0 very early into the MD
startup code.
2001-02-09 16:25:16 +00:00
bmilekic
e67bcfcaf3 Change and clean the mutex lock interface.
mtx_enter(lock, type) becomes:

mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks)
mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized)

similarily, for releasing a lock, we now have:

mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN.
We change the caller interface for the two different types of locks
because the semantics are entirely different for each case, and this
makes it explicitly clear and, at the same time, it rids us of the
extra `type' argument.

The enter->lock and exit->unlock change has been made with the idea
that we're "locking data" and not "entering locked code" in mind.

Further, remove all additional "flags" previously passed to the
lock acquire/release routines with the exception of two:

MTX_QUIET and MTX_NOSWITCH

The functionality of these flags is preserved and they can be passed
to the lock/unlock routines by calling the corresponding wrappers:

mtx_{lock, unlock}_flags(lock, flag(s)) and
mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN
locks, respectively.

Re-inline some lock acq/rel code; in the sleep lock case, we only
inline the _obtain_lock()s in order to ensure that the inlined code
fits into a cache line. In the spin lock case, we inline recursion and
actually only perform a function call if we need to spin. This change
has been made with the idea that we generally tend to avoid spin locks
and that also the spin locks that we do have and are heavily used
(i.e. sched_lock) do recurse, and therefore in an effort to reduce
function call overhead for some architectures (such as alpha), we
inline recursion for this case.

Create a new malloc type for the witness code and retire from using
the M_DEV type. The new type is called M_WITNESS and is only declared
if WITNESS is enabled.

Begin cleaning up some machdep/mutex.h code - specifically updated the
"optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN
and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently
need those.

Finally, caught up to the interface changes in all sys code.

Contributors: jake, jhb, jasone (in no particular order)
2001-02-09 06:11:45 +00:00