[PATCH 10/15] x86: provide connect_bsp_APIC for x86_64

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Glauber Costa
Date: Monday, June 9, 2008 - 7:16 am

Although it is not really needed, we provide it to get
closer to i386. ifdefs around it are removed in smpboot.c

Signed-off-by: Glauber Costa <gcosta@redhat.com>
---
 arch/x86/kernel/apic_64.c |   10 ++++++++++
 arch/x86/kernel/smpboot.c |    5 +----
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index 310bec1..8d62387 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -942,6 +942,8 @@ int __init APIC_init_uniprocessor(void)
 
 	verify_local_APIC();
 
+	connect_bsp_APIC();
+
 	phys_cpu_present_map = physid_mask_of_physid(boot_cpu_physical_apicid);
 	apic_write(APIC_ID, SET_APIC_ID(boot_cpu_physical_apicid));
 
@@ -1023,6 +1025,14 @@ asmlinkage void smp_error_interrupt(void)
 	irq_exit();
 }
 
+/**
+ *  * connect_bsp_APIC - attach the APIC to the interrupt system
+ *   */
+void __init connect_bsp_APIC(void)
+{
+	enable_apic_mode();
+}
+
 void disconnect_bsp_APIC(int virt_wire_setup)
 {
 	/* Go back to Virtual Wire compatibility mode */
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 9d8dfec..c4bb997 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1117,9 +1117,7 @@ static int __init smp_sanity_check(unsigned max_cpus)
 
 		localise_nmi_watchdog();
 
-#ifdef CONFIG_X86_32
 		connect_bsp_APIC();
-#endif
 		setup_local_APIC();
 		end_local_APIC_setup();
 		return -1;
@@ -1174,9 +1172,8 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
 	}
 	preempt_enable();
 
-#ifdef CONFIG_X86_32
 	connect_bsp_APIC();
-#endif
+
 	/*
 	 * Switch from PIC to APIC mode.
 	 */
-- 
1.5.4.5

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/15] Improve x86 smpboot integration, Glauber Costa, (Mon Jun 9, 7:16 am)
[PATCH 01/15] x86: use stack_start in x86_64, Glauber Costa, (Mon Jun 9, 7:16 am)
[PATCH 02/15] x86: don't use gdt_page openly., Glauber Costa, (Mon Jun 9, 7:16 am)
[PATCH 03/15] x86: remove early_gdt_descr reference, Glauber Costa, (Mon Jun 9, 7:16 am)
[PATCH 04/15] x86: move x86_64 gdt closer to i386, Glauber Costa, (Mon Jun 9, 7:16 am)
[PATCH 05/15] x86: use initial_code for i386, Glauber Costa, (Mon Jun 9, 7:16 am)
[PATCH 07/15] x86: clearing io_apic harmless for x86_64, Glauber Costa, (Mon Jun 9, 7:16 am)
[PATCH 08/15] x86: remove ifdef from stepping, Glauber Costa, (Mon Jun 9, 7:16 am)
[PATCH 10/15] x86: provide connect_bsp_APIC for x86_64, Glauber Costa, (Mon Jun 9, 7:16 am)
Re: [PATCH 03/15] x86: remove early_gdt_descr reference, James Bottomley, (Mon Jun 9, 8:23 am)
Re: [PATCH 03/15] x86: remove early_gdt_descr reference, Glauber Costa, (Mon Jun 9, 8:49 am)
Re: [PATCH 03/15] x86: remove early_gdt_descr reference, James Bottomley, (Mon Jun 9, 10:20 am)
Re: [PATCH 03/15] x86: remove early_gdt_descr reference, Glauber Costa, (Mon Jun 9, 10:23 am)
Re: [PATCH 03/15] x86: remove early_gdt_descr reference, James Bottomley, (Mon Jun 9, 10:40 am)