freebsd-dev/sys/powerpc/powerpc
John Baldwin c6a37e8413 Divorce critical sections from spinlocks. Critical sections as denoted by
critical_enter() and critical_exit() are now solely a mechanism for
deferring kernel preemptions.  They no longer have any affect on
interrupts.  This means that standalone critical sections are now very
cheap as they are simply unlocked integer increments and decrements for the
common case.

Spin mutexes now use a separate KPI implemented in MD code: spinlock_enter()
and spinlock_exit().  This KPI is responsible for providing whatever MD
guarantees are needed to ensure that a thread holding a spin lock won't
be preempted by any other code that will try to lock the same lock.  For
now all archs continue to block interrupts in a "spinlock section" as they
did formerly in all critical sections.  Note that I've also taken this
opportunity to push a few things into MD code rather than MI.  For example,
critical_fork_exit() no longer exists.  Instead, MD code ensures that new
threads have the correct state when they are created.  Also, we no longer
try to fixup the idlethreads for APs in MI code.  Instead, each arch sets
the initial curthread and adjusts the state of the idle thread it borrows
in order to perform the initial context switch.

This change is largely a big NOP, but the cleaner separation it provides
will allow for more efficient alternative locking schemes in other parts
of the kernel (bare critical sections rather than per-CPU spin mutexes
for per-CPU data for example).

Reviewed by:	grehan, cognet, arch@, others
Tested on:	i386, alpha, sparc64, powerpc, arm, possibly more
2005-04-04 21:53:56 +00:00
..
atomic.S /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
autoconf.c Split configure into 3 steps ala sparc64 2005-03-18 03:29:39 +00:00
bcopy.c
busdma_machdep.c Prepend underscore to bus_dmamap_{unload|sync} in line with 2005-03-15 11:43:05 +00:00
clock.c - add wall_cmos_clock and adjkerntz variables, required by msdosfs 2005-02-04 01:41:38 +00:00
copyinout.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
copystr.c
cpu.c - recognize 7447A/7448 CPUs (used in miniMacs) 2005-02-04 01:59:48 +00:00
db_disasm.c
db_hwwatch.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
db_interface.c Make sure icache is sync'd whenever memory is touched. It may 2004-07-27 07:04:58 +00:00
db_memrw.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
db_trace.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
elf_machdep.c Add __elfN(dump_thread). This function is called from __elfN(coredump) 2004-08-11 02:35:06 +00:00
extintr.c
fpu.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
fuswintr.c
genassym.c user.h is included only to get pcb.h, so use the latter directly instead. 2004-11-20 02:28:14 +00:00
in_cksum.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
interrupt.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
intr_machdep.c
locore.S /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
machdep.c Divorce critical sections from spinlocks. Critical sections as denoted by 2005-04-04 21:53:56 +00:00
mem.c Add /dev/mem and /dev/kmem to powerpc. 2004-08-16 13:07:40 +00:00
mmu_oea.c Replaced previous hw.physmem extraction with des's mods to 2005-03-07 07:31:20 +00:00
mp_machdep.c Don't include sys/user.h merely for its side-effect of recursively 2004-11-27 06:51:39 +00:00
nexus.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
ofw_machdep.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
ofwmagic.S Instead of "OpenFirmware", "openfirmware", etc. use the official spelling 2004-08-16 15:45:27 +00:00
openpic.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
pic_if.m /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
pmap.c Replaced previous hw.physmem extraction with des's mods to 2005-03-07 07:31:20 +00:00
sc_machdep.c
setjmp.S
sigcode.S /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
suswintr.c
swtch.S /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
syncicache.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
sys_machdep.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
trap_subr.S /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
trap.c Include <sys/signalvar.h> for trapsignal prototype. 2005-03-15 11:41:55 +00:00
uio_machdep.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
uma_machdep.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
vm_machdep.c Divorce critical sections from spinlocks. Critical sections as denoted by 2005-04-04 21:53:56 +00:00