summaryrefslogtreecommitdiff
path: root/arch/x86/machine/pmap.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2012-12-12 23:04:26 +0100
committerRichard Braun <rbraun@sceen.net>2012-12-12 23:04:26 +0100
commit45acb625b17ca642fa968a7ca41e0a03e8e9ccfb (patch)
tree944e86a982b2576b10dcacffb1e9439823c09bb6 /arch/x86/machine/pmap.c
parent51bff7b18de9329d7bd77324cc597e72173fae74 (diff)
Simplify requirements on interrupts during initialization
Don't involve the pmap module directly, as there could be others. Make the cpu module completely responsible for synchronizing all processors on kernel entry so that interrupts can be explicitely enabled there.
Diffstat (limited to 'arch/x86/machine/pmap.c')
-rw-r--r--arch/x86/machine/pmap.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/arch/x86/machine/pmap.c b/arch/x86/machine/pmap.c
index cbd08b59..65f9708a 100644
--- a/arch/x86/machine/pmap.c
+++ b/arch/x86/machine/pmap.c
@@ -148,11 +148,6 @@ static unsigned long pmap_zero_va;
static struct spinlock pmap_zero_va_lock;
/*
- * True if running on multiple processors (TLB flushes must be propagated).
- */
-static volatile int pmap_mp_mode;
-
-/*
* Shared variables used by the inter-processor update functions.
*/
static unsigned long pmap_update_start;
@@ -364,6 +359,7 @@ pmap_bootstrap(void)
cpu_tlb_flush();
+ spinlock_init(&pmap_update_lock);
pmap_kernel_limit = VM_MIN_KERNEL_ADDRESS;
}
@@ -372,9 +368,6 @@ pmap_ap_bootstrap(void)
{
if (cpu_has_global_pages())
cpu_enable_global_pages();
-
- while (!pmap_mp_mode)
- cpu_pause();
}
unsigned long __init
@@ -507,10 +500,7 @@ pmap_kupdate(unsigned long start, unsigned long end)
{
unsigned int nr_cpus;
- if (pmap_mp_mode)
- nr_cpus = cpu_count();
- else
- nr_cpus = 1;
+ nr_cpus = cpu_count();
if (nr_cpus == 1) {
pmap_kupdate_local(start, end);
@@ -556,15 +546,6 @@ pmap_kextract(unsigned long va)
}
void
-pmap_mp_setup(void)
-{
- assert(cpu_intr_enabled());
-
- spinlock_init(&pmap_update_lock);
- pmap_mp_mode = 1;
-}
-
-void
pmap_update_intr(struct trap_frame *frame)
{
(void)frame;