summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/machine/boot.c6
-rw-r--r--arch/x86/machine/cpu.c2
-rw-r--r--arch/x86/machine/cpu.h6
-rw-r--r--arch/x86/machine/pmap.c2
-rw-r--r--arch/x86/machine/pmap.h2
5 files changed, 12 insertions, 6 deletions
diff --git a/arch/x86/machine/boot.c b/arch/x86/machine/boot.c
index 98c3b9ce..b15b14ab 100644
--- a/arch/x86/machine/boot.c
+++ b/arch/x86/machine/boot.c
@@ -292,11 +292,7 @@ boot_ap_main(void)
{
cpu_ap_setup();
pmap_ap_bootstrap();
-
- cpu_intr_enable();
-
- for (;;)
- cpu_idle();
+ kernel_ap_main();
/* Never reached */
}
diff --git a/arch/x86/machine/cpu.c b/arch/x86/machine/cpu.c
index 2b98b58c..1ca690cb 100644
--- a/arch/x86/machine/cpu.c
+++ b/arch/x86/machine/cpu.c
@@ -435,6 +435,7 @@ cpu_mp_setup(void)
{
acpimp_setup();
cpu_mp_start_aps();
+ cpu_intr_enable();
pmap_mp_setup();
cpu_mp_info();
}
@@ -445,4 +446,5 @@ cpu_ap_setup(void)
cpu_init(&cpu_array[boot_ap_id]);
cpu_check(cpu_current());
lapic_ap_setup();
+ cpu_intr_enable();
}
diff --git a/arch/x86/machine/cpu.h b/arch/x86/machine/cpu.h
index f4202ee2..674892ad 100644
--- a/arch/x86/machine/cpu.h
+++ b/arch/x86/machine/cpu.h
@@ -436,11 +436,15 @@ void cpu_mp_register_lapic(unsigned int apic_id, int is_bsp);
/*
* Probe application processors and start them.
+ *
+ * This function enables interrupts.
*/
void cpu_mp_setup(void);
/*
- * AP-specific functions.
+ * CPU initialization on APs.
+ *
+ * This function enables interrupts.
*/
void cpu_ap_setup(void);
diff --git a/arch/x86/machine/pmap.c b/arch/x86/machine/pmap.c
index de29c016..4aa1e4de 100644
--- a/arch/x86/machine/pmap.c
+++ b/arch/x86/machine/pmap.c
@@ -546,6 +546,8 @@ pmap_kextract(unsigned long va)
void
pmap_mp_setup(void)
{
+ assert(cpu_intr_enabled());
+
pmap_mp_mode = 1;
}
diff --git a/arch/x86/machine/pmap.h b/arch/x86/machine/pmap.h
index cbaf6597..89b36b52 100644
--- a/arch/x86/machine/pmap.h
+++ b/arch/x86/machine/pmap.h
@@ -177,6 +177,8 @@ phys_addr_t pmap_kextract(unsigned long va);
/*
* Prepare the pmap module for a multiprocessor environment.
+ *
+ * Interrupts must be enabled when calling this function.
*/
void pmap_mp_setup(void);