diff options
author | peter <peter@FreeBSD.org> | 2003-07-10 01:02:59 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2003-07-10 01:02:59 +0000 |
commit | fb79192cce2b536913cbaeba392acf00eb222e2c (patch) | |
tree | b9debf25fcea7d292e9b05c04b80477e99416e99 /sys | |
parent | 3879f4cf2e9370d23d95379a66f17b787ac3b307 (diff) | |
download | FreeBSD-src-fb79192cce2b536913cbaeba392acf00eb222e2c.zip FreeBSD-src-fb79192cce2b536913cbaeba392acf00eb222e2c.tar.gz |
unifdef -DLAZY_SWITCH and start to tidy up the associated glue.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/apic_vector.S | 4 | ||||
-rw-r--r-- | sys/amd64/amd64/mp_machdep.c | 3 | ||||
-rw-r--r-- | sys/amd64/amd64/mptable.c | 3 | ||||
-rw-r--r-- | sys/amd64/include/mptable.h | 3 | ||||
-rw-r--r-- | sys/conf/options.i386 | 1 | ||||
-rw-r--r-- | sys/conf/options.pc98 | 1 | ||||
-rw-r--r-- | sys/i386/i386/apic_vector.s | 4 | ||||
-rw-r--r-- | sys/i386/i386/mp_machdep.c | 3 | ||||
-rw-r--r-- | sys/i386/i386/mptable.c | 3 | ||||
-rw-r--r-- | sys/i386/i386/pmap.c | 9 | ||||
-rw-r--r-- | sys/i386/i386/swtch.s | 3 | ||||
-rw-r--r-- | sys/i386/include/mptable.h | 3 | ||||
-rw-r--r-- | sys/i386/isa/apic_vector.s | 4 | ||||
-rw-r--r-- | sys/kern/kern_synch.c | 3 | ||||
-rw-r--r-- | sys/kern/subr_witness.c | 5 |
15 files changed, 3 insertions, 49 deletions
diff --git a/sys/amd64/amd64/apic_vector.S b/sys/amd64/amd64/apic_vector.S index 9230caf..bb0055f 100644 --- a/sys/amd64/amd64/apic_vector.S +++ b/sys/amd64/amd64/apic_vector.S @@ -3,8 +3,6 @@ * $FreeBSD$ */ -#include "opt_swtch.h" - #include <machine/apic.h> #include <machine/smp.h> @@ -643,7 +641,6 @@ IDTVEC(rendezvous) POP_FRAME iret -#ifdef LAZY_SWITCH /* * Clean up when we lose out on the lazy context switch optimization. * ie: when we are about to release a PTD but a cpu is still borrowing it. @@ -662,7 +659,6 @@ IDTVEC(lazypmap) movl $0, lapic+LA_EOI /* End Of Interrupt to APIC */ POP_FRAME iret -#endif #endif /* SMP */ .data diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 9701476..c212ca7 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); #include "opt_cpu.h" #include "opt_kstack_pages.h" -#include "opt_swtch.h" #ifdef SMP #include <machine/smptests.h> @@ -644,11 +643,9 @@ mp_enable(u_int boot_addr) setidt(XSTATCLOCK_OFFSET, Xstatclock, SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); -#ifdef LAZY_SWITCH /* install an inter-CPU IPI for lazy pmap release */ setidt(XLAZYPMAP_OFFSET, Xlazypmap, SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); -#endif /* install an inter-CPU IPI for all-CPU rendezvous */ setidt(XRENDEZVOUS_OFFSET, Xrendezvous, diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c index 9701476..c212ca7 100644 --- a/sys/amd64/amd64/mptable.c +++ b/sys/amd64/amd64/mptable.c @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); #include "opt_cpu.h" #include "opt_kstack_pages.h" -#include "opt_swtch.h" #ifdef SMP #include <machine/smptests.h> @@ -644,11 +643,9 @@ mp_enable(u_int boot_addr) setidt(XSTATCLOCK_OFFSET, Xstatclock, SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); -#ifdef LAZY_SWITCH /* install an inter-CPU IPI for lazy pmap release */ setidt(XLAZYPMAP_OFFSET, Xlazypmap, SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); -#endif /* install an inter-CPU IPI for all-CPU rendezvous */ setidt(XRENDEZVOUS_OFFSET, Xrendezvous, diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h index 9701476..c212ca7 100644 --- a/sys/amd64/include/mptable.h +++ b/sys/amd64/include/mptable.h @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); #include "opt_cpu.h" #include "opt_kstack_pages.h" -#include "opt_swtch.h" #ifdef SMP #include <machine/smptests.h> @@ -644,11 +643,9 @@ mp_enable(u_int boot_addr) setidt(XSTATCLOCK_OFFSET, Xstatclock, SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); -#ifdef LAZY_SWITCH /* install an inter-CPU IPI for lazy pmap release */ setidt(XLAZYPMAP_OFFSET, Xlazypmap, SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); -#endif /* install an inter-CPU IPI for all-CPU rendezvous */ setidt(XRENDEZVOUS_OFFSET, Xrendezvous, diff --git a/sys/conf/options.i386 b/sys/conf/options.i386 index d5ef36d..e5e8cd5 100644 --- a/sys/conf/options.i386 +++ b/sys/conf/options.i386 @@ -6,7 +6,6 @@ GPL_MATH_EMULATE opt_math_emulate.h DISABLE_PSE opt_pmap.h PMAP_SHPGPERPROC opt_pmap.h DISABLE_PG_G opt_pmap.h -LAZY_SWITCH opt_swtch.h PPC_PROBE_CHIPSET opt_ppc.h PPC_DEBUG opt_ppc.h MAXMEM diff --git a/sys/conf/options.pc98 b/sys/conf/options.pc98 index 8106cbc..2a55086 100644 --- a/sys/conf/options.pc98 +++ b/sys/conf/options.pc98 @@ -6,7 +6,6 @@ GPL_MATH_EMULATE opt_math_emulate.h DISABLE_PSE opt_pmap.h PMAP_SHPGPERPROC opt_pmap.h DISABLE_PG_G opt_pmap.h -LAZY_SWITCH opt_swtch.h PPC_PROBE_CHIPSET opt_ppc.h PPC_DEBUG opt_ppc.h MAXMEM diff --git a/sys/i386/i386/apic_vector.s b/sys/i386/i386/apic_vector.s index 9230caf..bb0055f 100644 --- a/sys/i386/i386/apic_vector.s +++ b/sys/i386/i386/apic_vector.s @@ -3,8 +3,6 @@ * $FreeBSD$ */ -#include "opt_swtch.h" - #include <machine/apic.h> #include <machine/smp.h> @@ -643,7 +641,6 @@ IDTVEC(rendezvous) POP_FRAME iret -#ifdef LAZY_SWITCH /* * Clean up when we lose out on the lazy context switch optimization. * ie: when we are about to release a PTD but a cpu is still borrowing it. @@ -662,7 +659,6 @@ IDTVEC(lazypmap) movl $0, lapic+LA_EOI /* End Of Interrupt to APIC */ POP_FRAME iret -#endif #endif /* SMP */ .data diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c index 9701476..c212ca7 100644 --- a/sys/i386/i386/mp_machdep.c +++ b/sys/i386/i386/mp_machdep.c @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); #include "opt_cpu.h" #include "opt_kstack_pages.h" -#include "opt_swtch.h" #ifdef SMP #include <machine/smptests.h> @@ -644,11 +643,9 @@ mp_enable(u_int boot_addr) setidt(XSTATCLOCK_OFFSET, Xstatclock, SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); -#ifdef LAZY_SWITCH /* install an inter-CPU IPI for lazy pmap release */ setidt(XLAZYPMAP_OFFSET, Xlazypmap, SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); -#endif /* install an inter-CPU IPI for all-CPU rendezvous */ setidt(XRENDEZVOUS_OFFSET, Xrendezvous, diff --git a/sys/i386/i386/mptable.c b/sys/i386/i386/mptable.c index 9701476..c212ca7 100644 --- a/sys/i386/i386/mptable.c +++ b/sys/i386/i386/mptable.c @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); #include "opt_cpu.h" #include "opt_kstack_pages.h" -#include "opt_swtch.h" #ifdef SMP #include <machine/smptests.h> @@ -644,11 +643,9 @@ mp_enable(u_int boot_addr) setidt(XSTATCLOCK_OFFSET, Xstatclock, SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); -#ifdef LAZY_SWITCH /* install an inter-CPU IPI for lazy pmap release */ setidt(XLAZYPMAP_OFFSET, Xlazypmap, SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); -#endif /* install an inter-CPU IPI for all-CPU rendezvous */ setidt(XRENDEZVOUS_OFFSET, Xrendezvous, diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index a819da2..6edd0e0 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -104,7 +104,6 @@ __FBSDID("$FreeBSD$"); #include "opt_pmap.h" #include "opt_msgbuf.h" #include "opt_kstack_pages.h" -#include "opt_swtch.h" #include <sys/param.h> #include <sys/systm.h> @@ -187,7 +186,7 @@ struct pmap kernel_pmap_store; LIST_HEAD(pmaplist, pmap); static struct pmaplist allpmaps; static struct mtx allpmaps_lock; -#if defined(SMP) && defined(LAZY_SWITCH) +#ifdef SMP static struct mtx lazypmap_lock; #endif @@ -340,7 +339,7 @@ pmap_bootstrap(firstaddr, loadaddr) kernel_pmap->pm_active = -1; /* don't allow deactivation */ TAILQ_INIT(&kernel_pmap->pm_pvlist); LIST_INIT(&allpmaps); -#if defined(SMP) && defined(LAZY_SWITCH) +#ifdef SMP mtx_init(&lazypmap_lock, "lazypmap", NULL, MTX_SPIN); #endif mtx_init(&allpmaps_lock, "allpmaps", NULL, MTX_SPIN); @@ -1285,7 +1284,6 @@ pmap_allocpte(pmap_t pmap, vm_offset_t va) * Pmap allocation/deallocation routines. ***************************************************/ -#ifdef LAZY_SWITCH #ifdef SMP /* * Deal with a SMP shootdown of other users of the pmap that we are @@ -1374,7 +1372,6 @@ pmap_lazyfix(pmap_t pmap) } } #endif /* SMP */ -#endif /* LAZY_SWITCH */ /* * Release any resources held by the given physical map. @@ -1397,9 +1394,7 @@ pmap_release(pmap_t pmap) ("pmap_release: pmap resident count %ld != 0", pmap->pm_stats.resident_count)); -#ifdef LAZY_SWITCH pmap_lazyfix(pmap); -#endif mtx_lock_spin(&allpmaps_lock); LIST_REMOVE(pmap, pm_list); mtx_unlock_spin(&allpmaps_lock); diff --git a/sys/i386/i386/swtch.s b/sys/i386/i386/swtch.s index b0a0574..7cbe7a3 100644 --- a/sys/i386/i386/swtch.s +++ b/sys/i386/i386/swtch.s @@ -37,7 +37,6 @@ */ #include "opt_npx.h" -#include "opt_swtch.h" #include <machine/asmacros.h> @@ -162,14 +161,12 @@ ENTRY(cpu_switch) /* switch address space */ movl PCB_CR3(%edx),%eax -#ifdef LAZY_SWITCH #ifdef PAE cmpl %eax,IdlePDPT /* Kernel address space? */ #else cmpl %eax,IdlePTD /* Kernel address space? */ #endif je sw1 -#endif movl %cr3,%ebx /* The same address space? */ cmpl %ebx,%eax je sw1 diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h index 9701476..c212ca7 100644 --- a/sys/i386/include/mptable.h +++ b/sys/i386/include/mptable.h @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); #include "opt_cpu.h" #include "opt_kstack_pages.h" -#include "opt_swtch.h" #ifdef SMP #include <machine/smptests.h> @@ -644,11 +643,9 @@ mp_enable(u_int boot_addr) setidt(XSTATCLOCK_OFFSET, Xstatclock, SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); -#ifdef LAZY_SWITCH /* install an inter-CPU IPI for lazy pmap release */ setidt(XLAZYPMAP_OFFSET, Xlazypmap, SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); -#endif /* install an inter-CPU IPI for all-CPU rendezvous */ setidt(XRENDEZVOUS_OFFSET, Xrendezvous, diff --git a/sys/i386/isa/apic_vector.s b/sys/i386/isa/apic_vector.s index 9230caf..bb0055f 100644 --- a/sys/i386/isa/apic_vector.s +++ b/sys/i386/isa/apic_vector.s @@ -3,8 +3,6 @@ * $FreeBSD$ */ -#include "opt_swtch.h" - #include <machine/apic.h> #include <machine/smp.h> @@ -643,7 +641,6 @@ IDTVEC(rendezvous) POP_FRAME iret -#ifdef LAZY_SWITCH /* * Clean up when we lose out on the lazy context switch optimization. * ie: when we are about to release a PTD but a cpu is still borrowing it. @@ -662,7 +659,6 @@ IDTVEC(lazypmap) movl $0, lapic+LA_EOI /* End Of Interrupt to APIC */ POP_FRAME iret -#endif #endif /* SMP */ .data diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index 7b4784f..384feea 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -43,9 +43,6 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" #include "opt_ktrace.h" -#ifdef __i386__ -#include "opt_swtch.h" -#endif #include <sys/param.h> #include <sys/systm.h> diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index 48b6a13..c0d111f 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -86,9 +86,6 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" #include "opt_witness.h" -#ifdef __i386__ -#include "opt_swtch.h" -#endif #include <sys/param.h> #include <sys/bus.h> @@ -301,7 +298,7 @@ static struct witness_order_list_entry order_lists[] = { #if defined(__i386__) && defined(APIC_IO) { "tlb", &lock_class_mtx_spin }, #endif -#if defined(__i386__) && defined(LAZY_SWITCH) +#ifdef __i386__ { "lazypmap", &lock_class_mtx_spin }, #endif #ifdef __sparc64__ |