x86: move up & smp variables to setup.c
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
350bae1d3f
commit
2fe6014757
7 changed files with 10 additions and 35 deletions
|
@ -52,9 +52,6 @@
|
||||||
|
|
||||||
unsigned long mp_lapic_addr;
|
unsigned long mp_lapic_addr;
|
||||||
|
|
||||||
/* Processor that is doing the boot up */
|
|
||||||
unsigned int boot_cpu_physical_apicid = -1U;
|
|
||||||
|
|
||||||
DEFINE_PER_CPU(u16, x86_bios_cpu_apicid) = BAD_APICID;
|
DEFINE_PER_CPU(u16, x86_bios_cpu_apicid) = BAD_APICID;
|
||||||
EXPORT_PER_CPU_SYMBOL(x86_bios_cpu_apicid);
|
EXPORT_PER_CPU_SYMBOL(x86_bios_cpu_apicid);
|
||||||
|
|
||||||
|
|
|
@ -87,10 +87,6 @@ static unsigned long apic_phys;
|
||||||
|
|
||||||
unsigned long mp_lapic_addr;
|
unsigned long mp_lapic_addr;
|
||||||
|
|
||||||
/* Processor that is doing the boot up */
|
|
||||||
unsigned int boot_cpu_physical_apicid = -1U;
|
|
||||||
EXPORT_SYMBOL(boot_cpu_physical_apicid);
|
|
||||||
|
|
||||||
DEFINE_PER_CPU(u16, x86_bios_cpu_apicid) = BAD_APICID;
|
DEFINE_PER_CPU(u16, x86_bios_cpu_apicid) = BAD_APICID;
|
||||||
EXPORT_PER_CPU_SYMBOL(x86_bios_cpu_apicid);
|
EXPORT_PER_CPU_SYMBOL(x86_bios_cpu_apicid);
|
||||||
|
|
||||||
|
|
|
@ -49,15 +49,6 @@ static int mp_current_pci_id;
|
||||||
|
|
||||||
int pic_mode;
|
int pic_mode;
|
||||||
|
|
||||||
/* Make it easy to share the UP and SMP code: */
|
|
||||||
#ifndef CONFIG_X86_SMP
|
|
||||||
unsigned int num_processors;
|
|
||||||
unsigned disabled_cpus __cpuinitdata;
|
|
||||||
#ifndef CONFIG_X86_LOCAL_APIC
|
|
||||||
unsigned int boot_cpu_physical_apicid = -1U;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Intel MP BIOS table parsing routines:
|
* Intel MP BIOS table parsing routines:
|
||||||
*/
|
*/
|
||||||
|
@ -93,9 +84,7 @@ static void __cpuinit MP_processor_info(struct mpc_config_processor *m)
|
||||||
int apicid;
|
int apicid;
|
||||||
|
|
||||||
if (!(m->mpc_cpuflag & CPU_ENABLED)) {
|
if (!(m->mpc_cpuflag & CPU_ENABLED)) {
|
||||||
#ifdef CONFIG_X86_SMP
|
|
||||||
disabled_cpus++;
|
disabled_cpus++;
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -817,9 +806,7 @@ void __cpuinit mp_register_lapic (int id, u8 enabled)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
#ifdef CONFIG_X86_SMP
|
|
||||||
++disabled_cpus;
|
++disabled_cpus;
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,15 +45,6 @@ int mp_bus_id_to_pci_bus[MAX_MP_BUSSES] = {[0 ... MAX_MP_BUSSES - 1] = -1 };
|
||||||
|
|
||||||
static int mp_current_pci_id = 0;
|
static int mp_current_pci_id = 0;
|
||||||
|
|
||||||
/* Make it easy to share the UP and SMP code: */
|
|
||||||
#ifndef CONFIG_X86_SMP
|
|
||||||
unsigned int num_processors;
|
|
||||||
unsigned disabled_cpus __cpuinitdata;
|
|
||||||
#ifndef CONFIG_X86_LOCAL_APIC
|
|
||||||
unsigned int boot_cpu_physical_apicid = -1U;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Intel MP BIOS table parsing routines:
|
* Intel MP BIOS table parsing routines:
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -12,6 +12,14 @@
|
||||||
#include <asm/mpspec.h>
|
#include <asm/mpspec.h>
|
||||||
#include <asm/apicdef.h>
|
#include <asm/apicdef.h>
|
||||||
|
|
||||||
|
unsigned int num_processors;
|
||||||
|
unsigned disabled_cpus __cpuinitdata;
|
||||||
|
/* Processor that is doing the boot up */
|
||||||
|
unsigned int boot_cpu_physical_apicid = -1U;
|
||||||
|
EXPORT_SYMBOL(boot_cpu_physical_apicid);
|
||||||
|
|
||||||
|
physid_mask_t phys_cpu_present_map;
|
||||||
|
|
||||||
DEFINE_PER_CPU(u16, x86_cpu_to_apicid) = BAD_APICID;
|
DEFINE_PER_CPU(u16, x86_cpu_to_apicid) = BAD_APICID;
|
||||||
EXPORT_PER_CPU_SYMBOL(x86_cpu_to_apicid);
|
EXPORT_PER_CPU_SYMBOL(x86_cpu_to_apicid);
|
||||||
|
|
||||||
|
|
|
@ -86,14 +86,9 @@ void *x86_bios_cpu_apicid_early_ptr;
|
||||||
u8 apicid_2_node[MAX_APICID];
|
u8 apicid_2_node[MAX_APICID];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Internal processor count */
|
|
||||||
unsigned int num_processors;
|
|
||||||
|
|
||||||
/* State of each CPU */
|
/* State of each CPU */
|
||||||
DEFINE_PER_CPU(int, cpu_state) = { 0 };
|
DEFINE_PER_CPU(int, cpu_state) = { 0 };
|
||||||
|
|
||||||
unsigned disabled_cpus __cpuinitdata;
|
|
||||||
|
|
||||||
/* Store all idle threads, this can be reused instead of creating
|
/* Store all idle threads, this can be reused instead of creating
|
||||||
* a new thread. Also avoids complicated thread destroy functionality
|
* a new thread. Also avoids complicated thread destroy functionality
|
||||||
* for idle threads.
|
* for idle threads.
|
||||||
|
|
|
@ -128,7 +128,6 @@ int native_cpu_up(unsigned int cpunum);
|
||||||
extern int __cpu_disable(void);
|
extern int __cpu_disable(void);
|
||||||
extern void __cpu_die(unsigned int cpu);
|
extern void __cpu_die(unsigned int cpu);
|
||||||
|
|
||||||
extern unsigned disabled_cpus;
|
|
||||||
extern void prefill_possible_map(void);
|
extern void prefill_possible_map(void);
|
||||||
|
|
||||||
#define SMP_TRAMPOLINE_BASE 0x6000
|
#define SMP_TRAMPOLINE_BASE 0x6000
|
||||||
|
@ -144,6 +143,8 @@ static inline int num_booting_cpus(void)
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_SMP */
|
#endif /* CONFIG_SMP */
|
||||||
|
|
||||||
|
extern unsigned disabled_cpus __cpuinitdata;
|
||||||
|
|
||||||
#ifdef CONFIG_X86_32_SMP
|
#ifdef CONFIG_X86_32_SMP
|
||||||
/*
|
/*
|
||||||
* This function is needed by all SMP systems. It must _always_ be valid
|
* This function is needed by all SMP systems. It must _always_ be valid
|
||||||
|
|
Loading…
Reference in a new issue