x86: Fix section mismatch in LAPIC initialization
Additionally doing things conditionally upon smp_processor_id() being zero is generally a bad idea, as this means CPU 0 cannot be offlined and brought back online later again. While there may be other places where this is done, I think adding more of those should be avoided so that some day SMP can really become "symmetrical". Signed-off-by: Jan Beulich <jbeulich@novell.com> Cc: Cyrill Gorcunov <gorcunov@gmail.com> LKML-Reference: <4D525C7E0200007800030EE1@vpn.id2.novell.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
100b33c8bd
commit
2fb270f321
|
@ -233,6 +233,7 @@ extern void sync_Arb_IDs(void);
|
||||||
extern void init_bsp_APIC(void);
|
extern void init_bsp_APIC(void);
|
||||||
extern void setup_local_APIC(void);
|
extern void setup_local_APIC(void);
|
||||||
extern void end_local_APIC_setup(void);
|
extern void end_local_APIC_setup(void);
|
||||||
|
extern void bsp_end_local_APIC_setup(void);
|
||||||
extern void init_apic_mappings(void);
|
extern void init_apic_mappings(void);
|
||||||
void register_lapic_address(unsigned long address);
|
void register_lapic_address(unsigned long address);
|
||||||
extern void setup_boot_APIC_clock(void);
|
extern void setup_boot_APIC_clock(void);
|
||||||
|
|
|
@ -1381,12 +1381,17 @@ void __cpuinit end_local_APIC_setup(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
apic_pm_activate();
|
apic_pm_activate();
|
||||||
|
}
|
||||||
|
|
||||||
|
void __init bsp_end_local_APIC_setup(void)
|
||||||
|
{
|
||||||
|
end_local_APIC_setup();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Now that local APIC setup is completed for BP, configure the fault
|
* Now that local APIC setup is completed for BP, configure the fault
|
||||||
* handling for interrupt remapping.
|
* handling for interrupt remapping.
|
||||||
*/
|
*/
|
||||||
if (!smp_processor_id() && intr_remapping_enabled)
|
if (intr_remapping_enabled)
|
||||||
enable_drhd_fault_handling();
|
enable_drhd_fault_handling();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1756,7 +1761,7 @@ int __init APIC_init_uniprocessor(void)
|
||||||
enable_IO_APIC();
|
enable_IO_APIC();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
end_local_APIC_setup();
|
bsp_end_local_APIC_setup();
|
||||||
|
|
||||||
#ifdef CONFIG_X86_IO_APIC
|
#ifdef CONFIG_X86_IO_APIC
|
||||||
if (smp_found_config && !skip_ioapic_setup && nr_ioapics)
|
if (smp_found_config && !skip_ioapic_setup && nr_ioapics)
|
||||||
|
|
|
@ -1060,7 +1060,7 @@ static int __init smp_sanity_check(unsigned max_cpus)
|
||||||
|
|
||||||
connect_bsp_APIC();
|
connect_bsp_APIC();
|
||||||
setup_local_APIC();
|
setup_local_APIC();
|
||||||
end_local_APIC_setup();
|
bsp_end_local_APIC_setup();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1137,7 +1137,7 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
|
||||||
if (!skip_ioapic_setup && nr_ioapics)
|
if (!skip_ioapic_setup && nr_ioapics)
|
||||||
enable_IO_APIC();
|
enable_IO_APIC();
|
||||||
|
|
||||||
end_local_APIC_setup();
|
bsp_end_local_APIC_setup();
|
||||||
|
|
||||||
map_cpu_to_logical_apicid();
|
map_cpu_to_logical_apicid();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue