freebsd-dev/sys/amd64/include
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
..
pc Add PCI BIOS function codes for IRQ routing fetch and route. 2000-10-19 08:02:46 +00:00
apicreg.h Optimize two cases in the MP locking code. First, it is not necessary 1999-11-19 16:49:30 +00:00
asm.h Fixed the profiling version ALTENTRY(). Again. The previous version 2000-01-25 09:01:55 +00:00
asmacros.h Use %fs to access per-cpu variables in uni-processor kernels the same 2001-01-06 17:40:04 +00:00
atomic.h - Sort of lie and say that %eax is an output only and not an input for the 2001-01-17 02:15:11 +00:00
bus_amd64.h Axe the barrier_{read,write,rw}() helper functions as this method of 2000-10-20 06:45:48 +00:00
bus_at386.h Axe the barrier_{read,write,rw}() helper functions as this method of 2000-10-20 06:45:48 +00:00
bus_dma.h Axe the barrier_{read,write,rw}() helper functions as this method of 2000-10-20 06:45:48 +00:00
bus_memio.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
bus_pio.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
bus.h Added indirect pio into the bus space stuff for the NEC PC-98. bus.h 2000-03-29 03:15:22 +00:00
clock.h Move DELAY() from <machine/clock.h> to <sys/systm.h> 2000-10-15 09:51:49 +00:00
cpu.h Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
cpufunc.h Assembler fixes. 2000-11-21 20:16:49 +00:00
cputypes.h First shot at identifying the Pentum 4 acording to our reading of the 2000-09-29 04:38:35 +00:00
db_machdep.h Fix style bug: order includes 1999-10-04 13:55:35 +00:00
elf.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
exec.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
float.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
floatingpoint.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
fpu.h Declare or #define per-cpu globals in <machine/globals.h> in all cases. 2000-10-27 08:30:59 +00:00
frame.h Interrupt frames don't include the saved cpl anymore since cpl is dead. 2000-10-06 01:57:28 +00:00
ieeefp.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
in_cksum.h This is the first snapshot of the FreeBSD/ia64 kernel. This kernel will 2000-09-29 13:46:07 +00:00
legacyvar.h Get out the roto-rooter and clean up the abuse of nexus ivars by the 2000-09-28 00:37:32 +00:00
md_var.h Remove the last of the MD netisr code. It is now all MI. Remove 2000-12-05 00:36:00 +00:00
mptable.h Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
mutex.h Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
npx.h Declare or #define per-cpu globals in <machine/globals.h> in all cases. 2000-10-27 08:30:59 +00:00
pcb_ext.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
pcb.h Declare or #define per-cpu globals in <machine/globals.h> in all cases. 2000-10-27 08:30:59 +00:00
pci_cfgreg.h Add types and prototypes. 2000-10-16 19:49:30 +00:00
pcpu.h Remove some leftovers from the CMAP* stuff in globaldata and the 2001-01-30 04:02:28 +00:00
pmap.h Increase NKPT from 17 to 30. This fixes the 4GB ram boot panic on both 2000-11-30 01:53:02 +00:00
proc.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
profile.h Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
psl.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
ptrace.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
reg.h Add a couple of debug register helper functions to assist in setting 2000-09-21 17:07:27 +00:00
reloc.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
resource.h * Implement bus_set/get/delete_resource for pci. 1999-10-14 21:38:33 +00:00
segments.h Declare or #define per-cpu globals in <machine/globals.h> in all cases. 2000-10-27 08:30:59 +00:00
setjmp.h Work around a bug by adding struct tags. gcc-2.95 apparently gets the 2000-10-06 11:53:32 +00:00
sigframe.h Fix type of sf_addr. 1999-12-04 10:40:24 +00:00
signal.h Make MINSIGSTKSZ machine dependent, and have the sigaltstack 2000-11-09 08:25:48 +00:00
smp.h Defer assignment of low level interrupt handlers for PCI interrupts 2001-01-28 01:07:54 +00:00
specialreg.h Add the CR4 values for P3 SIMD enabling support. FXSR tells the cpu that 1999-09-10 15:51:44 +00:00
sysarch.h Add a couple of debug register helper functions to assist in setting 2000-09-21 17:07:27 +00:00
trap.h Exchange numerical values for FPE_INTDIV and FPE_INTOVF, so that they 2000-03-20 10:22:19 +00:00
tss.h Declare or #define per-cpu globals in <machine/globals.h> in all cases. 2000-10-27 08:30:59 +00:00
ucontext.h Add a per-signal flag to mark handlers registered with osigaction, so we 1999-10-11 20:33:17 +00:00
varargs.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
vmparam.h Make sysv-style shared memory tuneable params fully runtime adjustable 2000-03-30 07:17:05 +00:00