diff options
author | Glauber Costa <gcosta@redhat.com> | 2008-05-28 12:38:28 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 06:48:22 -0400 |
commit | b5841765a2e735a38612c4e4a82170c33d701b3c (patch) | |
tree | ba37dfbe602349e507ce38723eb0ee679af878a7 /arch/x86 | |
parent | 3fde690011a84e19f98f77bfaa349b2119ddd2d2 (diff) |
x86: provide connect_bsp_APIC for x86_64
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>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/apic_64.c | 10 | ||||
-rw-r--r-- | 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 d9d663ffa641..5279dc924381 100644 --- a/arch/x86/kernel/apic_64.c +++ b/arch/x86/kernel/apic_64.c | |||
@@ -918,6 +918,8 @@ int __init APIC_init_uniprocessor(void) | |||
918 | 918 | ||
919 | verify_local_APIC(); | 919 | verify_local_APIC(); |
920 | 920 | ||
921 | connect_bsp_APIC(); | ||
922 | |||
921 | physid_set_mask_of_physid(boot_cpu_physical_apicid, &phys_cpu_present_map); | 923 | physid_set_mask_of_physid(boot_cpu_physical_apicid, &phys_cpu_present_map); |
922 | apic_write(APIC_ID, SET_APIC_ID(boot_cpu_physical_apicid)); | 924 | apic_write(APIC_ID, SET_APIC_ID(boot_cpu_physical_apicid)); |
923 | 925 | ||
@@ -999,6 +1001,14 @@ asmlinkage void smp_error_interrupt(void) | |||
999 | irq_exit(); | 1001 | irq_exit(); |
1000 | } | 1002 | } |
1001 | 1003 | ||
1004 | /** | ||
1005 | * * connect_bsp_APIC - attach the APIC to the interrupt system | ||
1006 | * */ | ||
1007 | void __init connect_bsp_APIC(void) | ||
1008 | { | ||
1009 | enable_apic_mode(); | ||
1010 | } | ||
1011 | |||
1002 | void disconnect_bsp_APIC(int virt_wire_setup) | 1012 | void disconnect_bsp_APIC(int virt_wire_setup) |
1003 | { | 1013 | { |
1004 | /* Go back to Virtual Wire compatibility mode */ | 1014 | /* Go back to Virtual Wire compatibility mode */ |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index e09f3124738a..a569f06d789e 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -1116,9 +1116,7 @@ static int __init smp_sanity_check(unsigned max_cpus) | |||
1116 | 1116 | ||
1117 | localise_nmi_watchdog(); | 1117 | localise_nmi_watchdog(); |
1118 | 1118 | ||
1119 | #ifdef CONFIG_X86_32 | ||
1120 | connect_bsp_APIC(); | 1119 | connect_bsp_APIC(); |
1121 | #endif | ||
1122 | setup_local_APIC(); | 1120 | setup_local_APIC(); |
1123 | end_local_APIC_setup(); | 1121 | end_local_APIC_setup(); |
1124 | return -1; | 1122 | return -1; |
@@ -1173,9 +1171,8 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus) | |||
1173 | } | 1171 | } |
1174 | preempt_enable(); | 1172 | preempt_enable(); |
1175 | 1173 | ||
1176 | #ifdef CONFIG_X86_32 | ||
1177 | connect_bsp_APIC(); | 1174 | connect_bsp_APIC(); |
1178 | #endif | 1175 | |
1179 | /* | 1176 | /* |
1180 | * Switch from PIC to APIC mode. | 1177 | * Switch from PIC to APIC mode. |
1181 | */ | 1178 | */ |