Commit Graph

102 Commits

Author SHA1 Message Date
Yoshihiro Takahashi
43c35a2e4f Merged from sys/i386/isa/clock.c revision 1.171. 2001-04-01 06:41:47 +00:00
KATO Takenori
d9cb9fe14c Merged from sys/i386/isa/clock.c revision 1.170. 2001-02-21 10:22:22 +00:00
KATO Takenori
9e2930bdb1 Merged from sys/i386/isa/clock.c revision 1.169. 2001-02-13 10:35:15 +00:00
Bosko Milekic
9ed346bab0 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
Peter Wemm
f444a0efe9 Convert mca (microchannel bus support) from something that we count
(bogus) to something that we test for the presence of.
2001-01-29 11:57:27 +00:00
Jason Evans
d1c1b8413e 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 Wemm
1467a651ab Convert apm from a bogus 'count' into a plain option. Clean out some
other cruft from the files.alpha and files.ia64 that were related to this.
2001-01-19 14:09:54 +00:00
KATO Takenori
84af0d0cd2 Merged from sys/i386/isa/clock.c revision 1.164. 2000-12-05 09:35:54 +00:00
John Baldwin
cba5b33d1a Catch up to the new swi code.
Noticed by:	phk
2000-10-25 20:21:42 +00:00
John Baldwin
8088699f79 - Overhaul the software interrupt code to use interrupt threads for each
type of software interrupt.  Roughly, what used to be a bit in spending
  now maps to a swi thread.  Each thread can have multiple handlers, just
  like a hardware interrupt thread.
- Instead of using a bitmask of pending interrupts, we schedule the specific
  software interrupt thread to run, so spending, NSWI, and the shandlers
  array are no longer needed.  We can now have an arbitrary number of
  software interrupt threads.  When you register a software interrupt
  thread via sinthand_add(), you get back a struct intrhand that you pass
  to sched_swi() when you wish to schedule your swi thread to run.
- Convert the name of 'struct intrec' to 'struct intrhand' as it is a bit
  more intuitive.  Also, prefix all the members of struct intrhand with
  'ih_'.
- Make swi_net() a MI function since there is now no point in it being
  MD.

Submitted by:	cp
2000-10-25 05:19:40 +00:00
KATO Takenori
618028ff9f Merged from sys/i386/isa/clock.c revision 1.160. 2000-10-20 10:19:40 +00:00
Yoshihiro Takahashi
6bf6c91f5d Fixed warnings. 2000-10-15 04:54:17 +00:00
KATO Takenori
11f46ebd84 Merged from sys/i386/isa/clock.c revisions 1.158 and 1.159. 2000-10-06 11:50:19 +00:00
KATO Takenori
fd6c4e11e0 Merged from sys/i386/isa/clock.c revision 1.157. 2000-09-15 05:42:42 +00:00
KATO Takenori
841d7a731e Merged from sys/i386/isa/clock.c revision 1.156. 2000-09-07 13:32:59 +00:00
KATO Takenori
c1e8fc20ac Merged from sys/i386/isa/clock.c revision 1.155. 2000-08-04 08:15:45 +00:00
Poul-Henning Kamp
77978ab8bc Previous commit changing SYSCTL_HANDLER_ARGS violated KNF.
Pointed out by:	bde
2000-07-04 11:25:35 +00:00
Poul-Henning Kamp
82d9ae4e32 Style police catches up with rev 1.26 of src/sys/sys/sysctl.h:
Sanitize SYSCTL_HANDLER_ARGS so that simplistic tools can grog our
sources:

        -sysctl_vm_zone SYSCTL_HANDLER_ARGS
        +sysctl_vm_zone (SYSCTL_HANDLER_ARGS)
2000-07-03 09:35:31 +00:00
KATO Takenori
3606d88937 Merged from sys/i386/isa/clock.c revision 1.152. 2000-06-28 03:17:51 +00:00
KATO Takenori
dc41b25cb0 Merged from sys/i386/isa/{clock.c,npx.c} revisions 1.151 and 1.82,
respectively.
2000-06-06 08:20:22 +00:00
KATO Takenori
6eeafd696c Merged from sys/i386/isa/clock.c and sys/isa/sio.c revisions 1.150 and
1.292, respectively.
2000-03-23 08:55:45 +00:00
KATO Takenori
f64ac1e326 Synced with sys/i386/isa/clock.c rev 1.149. 2000-01-05 12:35:03 +00:00
KATO Takenori
b8559e5e3f Synced with sys/i386/isa/clock.c rev 1.148. This is a cosmetic change
because PC-98 doesn't have RTC and RTC related code is included by
`#ifndef PC98' and `#endif'.
1999-12-27 13:56:54 +00:00
Peter Wemm
c24792feab merge i386/isa/clock.c 1.147: don't talk about register_intr in comments. 1999-12-20 15:24:56 +00:00
Yoshihiro Takahashi
064fc58a7c Sync with sys/i386/isa/clock.c revision 1.146. 1999-11-03 08:36:17 +00:00
KATO Takenori
acd0dd6ce1 Merge from sys/i386/isa/clock.c revision 1.145. 1999-09-04 01:39:52 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Poul-Henning Kamp
ce9edcf5b5 Merge the cons.c and cons.h to the best of my ability. alpha may or
may not compile, I can't test it.
1999-08-09 10:35:05 +00:00
KATO Takenori
6ae1d5b1aa Sync with sys/i386/isa/clock.c revision up to 1.142. 1999-07-30 11:43:10 +00:00
KATO Takenori
3311081bea Sync with sys/i386/isa/clock.c revision up to 1.140.
This commit may break 8MHz system clock mode.
1999-07-26 12:21:09 +00:00
KATO Takenori
bd2a72fdc9 Sync with sys/i386/isa/clock.c revision 1.138. 1999-06-28 13:11:16 +00:00
KATO Takenori
22001fd033 Sync with sys/i386/isa/clock.c revision 1.137. 1999-06-24 08:32:52 +00:00
KATO Takenori
f0828bf1b0 Sync with sys/i386/isa/clock.c revision 1.136. 1999-06-01 12:32:54 +00:00
KATO Takenori
cd6e9ed786 Sync with sys/i386/isa/clock.c revision 1.133. 1999-05-10 09:05:01 +00:00
KATO Takenori
482f0be026 Sync with sys/i386/isa/clock.c revision 1.132. 1999-04-28 08:06:00 +00:00
KATO Takenori
8e6e1dfb88 Sync with sys/i386/isa/clock.c revision 1.131. 1999-04-21 12:14:37 +00:00
KATO Takenori
22cd7960a2 The "easy" fixe for compiling the kernel -Wunused: remove unreferenced
local variable.
1999-01-28 11:36:22 +00:00
KATO Takenori
57276bc0d3 Sync with sys/i386/isa/clock.c revision 1.129. 1998-12-17 08:54:47 +00:00
KATO Takenori
7f9848cd68 Sync with sys/i386/isa/clock.c revision 1.128. 1998-10-23 13:13:43 +00:00
KATO Takenori
854de3d138 Fix for wrap arround. 1998-10-13 03:24:01 +00:00
KATO Takenori
f1132a191e Implement TSC clock calibration for PC-98. 1998-10-13 02:33:21 +00:00
KATO Takenori
42d36a9a0b Sync with sys/i386/isa/clock.c revision 1.127. 1998-09-22 16:12:00 +00:00
KATO Takenori
e0029f2568 Sync with sys/i386/isa/clock.c revision 1.126. 1998-09-20 10:51:57 +00:00
KATO Takenori
9df3bd9208 Sync with sys/i386/isa/clock.c revision 1.125. 1998-09-08 09:47:46 +00:00
KATO Takenori
a06a8629ce Sync with sys/i386/isa/clock.c revision 1.124. 1998-06-10 08:25:23 +00:00
KATO Takenori
4dd125707d Sync with sys/i386/isa/clock.c revision 1.123. 1998-06-08 08:56:43 +00:00
KATO Takenori
4b71df3705 Sync with sys/i386/isa/clock.c revision 1.122. 1998-06-07 09:51:08 +00:00
KATO Takenori
35800bf56f Sync with sys/i386/isa/clock.c revision 1.121. 1998-05-28 13:51:39 +00:00
KATO Takenori
499579a474 Sync with sys/i386/isa/clock.c revision 1.120. 1998-05-20 13:38:42 +00:00
KATO Takenori
b30dab363b System clock speed is always detected automatically. 1998-05-04 07:47:33 +00:00