freebsd-skq/sys/i386/i386
jhb 41cadaa11e 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
..
apic_vector.s Use the local APIC timer to drive the various kernel clocks on SMP machines 2005-02-08 20:25:07 +00:00
atomic.c
autoconf.c cosmetic changes. 2004-11-10 12:28:06 +00:00
bios.c handle malloc failure and don't proceed when the bios call to 2005-03-29 01:48:21 +00:00
bioscall.s
busdma_machdep.c Guard against an integer underflow that could cause busdma to eat up all 2005-03-12 07:01:53 +00:00
db_disasm.c Start all license/copyright notice comments with /*-, per tradition 2005-01-05 19:10:48 +00:00
db_interface.c Start all license/copyright notice comments with /*-, per tradition 2005-01-05 19:10:48 +00:00
db_trace.c Unbreak stack traces across double faults. In a particular edge case 2005-01-18 03:48:02 +00:00
dump_machdep.c
elan-mmcr.c Add zero flags argument to sysctl calls. 2004-10-12 07:59:02 +00:00
elf_machdep.c Add __elfN(dump_thread). This function is called from __elfN(coredump) 2004-08-11 02:35:06 +00:00
exception.s Small whitespace fixes. 2004-12-30 19:14:48 +00:00
gdb_machdep.c Start all license/copyright notice comments with /*-, per tradition 2005-01-05 19:10:48 +00:00
genassym.c Remove references to U area and garbage collect includes. 2004-11-20 02:30:59 +00:00
geode.c Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
i686_mem.c Trim a few things from the dmesg output and stick them under bootverbose to 2004-07-01 07:46:29 +00:00
identcpu.c netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
in_cksum.c netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
initcpu.c Update a comment. 2003-11-10 15:48:30 +00:00
intr_machdep.c Add a simple 'intrcnt_add' function that other MD code can use to add a 2004-12-23 20:34:18 +00:00
io_apic.c If mixed mode is not enabled by the APIC enumerator (MPTable always does, 2005-02-22 21:50:41 +00:00
io.c Break out the MI part of the /dev/[k]mem and /dev/io drivers into 2004-08-01 11:40:54 +00:00
k6_mem.c
legacy.c Correct a few bugs in the legacy cpu attachment. Get the unit from the 2005-02-15 07:21:20 +00:00
local_apic.c Tweak the lapic timer code to get the performance closer to the pre-lapic 2005-03-02 14:17:43 +00:00
locore.s U areas are going away, so don't allocate one for process 0. 2004-11-20 02:29:25 +00:00
longrun.c Move the author's copyright notice to match the initial LongRun import 2004-12-12 05:53:57 +00:00
machdep.c Divorce critical sections from spinlocks. Critical sections as denoted by 2005-04-04 21:53:56 +00:00
mem.c Fix module builds for i386 and amd64. 2004-08-04 18:30:31 +00:00
mp_clock.c Add missing #include <sys/module.h> 2004-05-30 20:34:58 +00:00
mp_machdep.c Divorce critical sections from spinlocks. Critical sections as denoted by 2005-04-04 21:53:56 +00:00
mp_watchdog.c Fix typo. 2005-02-27 22:34:07 +00:00
mpboot.s Start all license/copyright notice comments with /*-, per tradition 2005-01-05 19:10:48 +00:00
mptable_pci.c Use a private attach method for the MP Table host-PCI bridge driver rather 2004-05-03 14:49:10 +00:00
mptable.c Make a bunch of malloc types static. 2005-02-10 12:02:37 +00:00
nexus.c Use STAILQ in preference to SLIST for the resources. Insert new resources 2005-03-18 05:19:50 +00:00
perfmon.c Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
pmap.c Implement proper handling of PG_G mappings in pmap_protect(). (I don't 2005-02-05 19:21:54 +00:00
support.s Initiate deorbit burn sequence for 80386 support in FreeBSD: Remove 2004-11-16 20:42:32 +00:00
swtch.s Fix a typo in a comment. 2004-07-15 16:37:48 +00:00
symbols.raw Remove atdevbase and replace it's remaining uses with direct references to 2004-06-10 20:31:00 +00:00
sys_machdep.c Bounds check the length parameter to i386_set_ldt() before passing it 2005-03-23 08:28:03 +00:00
trap.c Initiate deorbit burn sequence for 80386 support in FreeBSD: Remove 2004-11-16 20:42:32 +00:00
tsc.c Change all SYSCTLS which are readonly and have a related TUNABLE 2003-10-21 18:28:36 +00:00
uio_machdep.c Request a CPU private mapping from sf_buf_alloc(). 2005-02-13 23:09:36 +00:00
vm86.c Don't include sys/user.h merely for its side-effect of recursively 2004-11-27 06:51:39 +00:00
vm86bios.s
vm_machdep.c Divorce critical sections from spinlocks. Critical sections as denoted by 2005-04-04 21:53:56 +00:00