x86, apic: clean up ->setup_apic_routing()
- separate the namespace - remove macros - remove namespace clash on 64-bit Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
d190cb87c4
commit
72ce016583
@ -56,7 +56,7 @@ static inline void bigsmp_init_apic_ldr(void)
|
|||||||
apic_write(APIC_LDR, val);
|
apic_write(APIC_LDR, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void setup_apic_routing(void)
|
static inline void bigsmp_setup_apic_routing(void)
|
||||||
{
|
{
|
||||||
printk("Enabling APIC mode: %s. Using %d I/O APICs\n",
|
printk("Enabling APIC mode: %s. Using %d I/O APICs\n",
|
||||||
"Physflat", nr_ioapics);
|
"Physflat", nr_ioapics);
|
||||||
|
@ -73,7 +73,7 @@ static inline void es7000_init_apic_ldr(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
extern int apic_version [MAX_APICS];
|
extern int apic_version [MAX_APICS];
|
||||||
static inline void setup_apic_routing(void)
|
static inline void es7000_setup_apic_routing(void)
|
||||||
{
|
{
|
||||||
int apic = per_cpu(x86_bios_cpu_apicid, smp_processor_id());
|
int apic = per_cpu(x86_bios_cpu_apicid, smp_processor_id());
|
||||||
printk("Enabling APIC mode: %s. Using %d I/O APICs, target cpus %lx\n",
|
printk("Enabling APIC mode: %s. Using %d I/O APICs, target cpus %lx\n",
|
||||||
|
@ -107,7 +107,7 @@ extern void apic_send_IPI_self(int vector);
|
|||||||
extern struct genapic apic_x2apic_uv_x;
|
extern struct genapic apic_x2apic_uv_x;
|
||||||
DECLARE_PER_CPU(int, x2apic_extra_bits);
|
DECLARE_PER_CPU(int, x2apic_extra_bits);
|
||||||
|
|
||||||
extern void setup_apic_routing(void);
|
extern void default_setup_apic_routing(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* _ASM_X86_GENAPIC_64_H */
|
#endif /* _ASM_X86_GENAPIC_64_H */
|
||||||
|
@ -25,7 +25,7 @@ static inline const struct cpumask *default_target_cpus(void)
|
|||||||
#define read_apic_id() (GET_APIC_ID(apic_read(APIC_ID)))
|
#define read_apic_id() (GET_APIC_ID(apic_read(APIC_ID)))
|
||||||
#define send_IPI_self (apic->send_IPI_self)
|
#define send_IPI_self (apic->send_IPI_self)
|
||||||
#define wakeup_secondary_cpu (apic->wakeup_cpu)
|
#define wakeup_secondary_cpu (apic->wakeup_cpu)
|
||||||
extern void setup_apic_routing(void);
|
extern void default_setup_apic_routing(void);
|
||||||
#else
|
#else
|
||||||
#define wakeup_secondary_cpu wakeup_secondary_cpu_via_init
|
#define wakeup_secondary_cpu wakeup_secondary_cpu_via_init
|
||||||
/*
|
/*
|
||||||
@ -70,7 +70,7 @@ static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb)
|
|||||||
return cpuid_apic >> index_msb;
|
return cpuid_apic >> index_msb;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void setup_apic_routing(void)
|
static inline void default_setup_apic_routing(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_X86_IO_APIC
|
#ifdef CONFIG_X86_IO_APIC
|
||||||
printk("Enabling APIC mode: %s. Using %d I/O APICs\n",
|
printk("Enabling APIC mode: %s. Using %d I/O APICs\n",
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
#include <asm/genapic.h>
|
#include <asm/genapic.h>
|
||||||
|
|
||||||
#define setup_apic_routing (apic->setup_apic_routing)
|
|
||||||
#define multi_timer_check (apic->multi_timer_check)
|
#define multi_timer_check (apic->multi_timer_check)
|
||||||
#define apicid_to_node (apic->apicid_to_node)
|
#define apicid_to_node (apic->apicid_to_node)
|
||||||
#define cpu_to_logical_apicid (apic->cpu_to_logical_apicid)
|
#define cpu_to_logical_apicid (apic->cpu_to_logical_apicid)
|
||||||
|
@ -33,7 +33,7 @@ static inline void numaq_init_apic_ldr(void)
|
|||||||
/* Already done in NUMA-Q firmware */
|
/* Already done in NUMA-Q firmware */
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void setup_apic_routing(void)
|
static inline void numaq_setup_apic_routing(void)
|
||||||
{
|
{
|
||||||
printk("Enabling APIC mode: %s. Using %d I/O APICs\n",
|
printk("Enabling APIC mode: %s. Using %d I/O APICs\n",
|
||||||
"NUMA-Q", nr_ioapics);
|
"NUMA-Q", nr_ioapics);
|
||||||
|
@ -74,7 +74,7 @@ static inline int summit_apic_id_registered(void)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void setup_apic_routing(void)
|
static inline void summit_setup_apic_routing(void)
|
||||||
{
|
{
|
||||||
printk("Enabling APIC mode: Summit. Using %d I/O APICs\n",
|
printk("Enabling APIC mode: Summit. Using %d I/O APICs\n",
|
||||||
nr_ioapics);
|
nr_ioapics);
|
||||||
|
@ -1360,9 +1360,8 @@ static void __init acpi_process_madt(void)
|
|||||||
acpi_ioapic = 1;
|
acpi_ioapic = 1;
|
||||||
|
|
||||||
smp_found_config = 1;
|
smp_found_config = 1;
|
||||||
#ifdef CONFIG_X86_32
|
if (apic->setup_apic_routing)
|
||||||
setup_apic_routing();
|
apic->setup_apic_routing();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (error == -EINVAL) {
|
if (error == -EINVAL) {
|
||||||
|
@ -1625,7 +1625,7 @@ int __init APIC_init_uniprocessor(void)
|
|||||||
enable_IR_x2apic();
|
enable_IR_x2apic();
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_X86_64
|
#ifdef CONFIG_X86_64
|
||||||
setup_apic_routing();
|
default_setup_apic_routing();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
verify_local_APIC();
|
verify_local_APIC();
|
||||||
|
@ -44,7 +44,7 @@ static struct genapic *apic_probe[] __initdata = {
|
|||||||
/*
|
/*
|
||||||
* Check the APIC IDs in bios_cpu_apicid and choose the APIC mode.
|
* Check the APIC IDs in bios_cpu_apicid and choose the APIC mode.
|
||||||
*/
|
*/
|
||||||
void __init setup_apic_routing(void)
|
void __init default_setup_apic_routing(void)
|
||||||
{
|
{
|
||||||
if (apic == &apic_x2apic_phys || apic == &apic_x2apic_cluster) {
|
if (apic == &apic_x2apic_phys || apic == &apic_x2apic_cluster) {
|
||||||
if (!intr_remapping_enabled)
|
if (!intr_remapping_enabled)
|
||||||
|
@ -390,9 +390,9 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
|
|||||||
generic_bigsmp_probe();
|
generic_bigsmp_probe();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_X86_32
|
if (apic->setup_apic_routing)
|
||||||
setup_apic_routing();
|
apic->setup_apic_routing();
|
||||||
#endif
|
|
||||||
if (!num_processors)
|
if (!num_processors)
|
||||||
printk(KERN_ERR "MPTABLE: no processors registered!\n");
|
printk(KERN_ERR "MPTABLE: no processors registered!\n");
|
||||||
return num_processors;
|
return num_processors;
|
||||||
|
@ -1128,7 +1128,7 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
|
|||||||
|
|
||||||
#ifdef CONFIG_X86_64
|
#ifdef CONFIG_X86_64
|
||||||
enable_IR_x2apic();
|
enable_IR_x2apic();
|
||||||
setup_apic_routing();
|
default_setup_apic_routing();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (smp_sanity_check(max_cpus) < 0) {
|
if (smp_sanity_check(max_cpus) < 0) {
|
||||||
|
@ -78,7 +78,7 @@ struct genapic apic_bigsmp = {
|
|||||||
.init_apic_ldr = bigsmp_init_apic_ldr,
|
.init_apic_ldr = bigsmp_init_apic_ldr,
|
||||||
|
|
||||||
.ioapic_phys_id_map = bigsmp_ioapic_phys_id_map,
|
.ioapic_phys_id_map = bigsmp_ioapic_phys_id_map,
|
||||||
.setup_apic_routing = setup_apic_routing,
|
.setup_apic_routing = bigsmp_setup_apic_routing,
|
||||||
.multi_timer_check = multi_timer_check,
|
.multi_timer_check = multi_timer_check,
|
||||||
.apicid_to_node = apicid_to_node,
|
.apicid_to_node = apicid_to_node,
|
||||||
.cpu_to_logical_apicid = cpu_to_logical_apicid,
|
.cpu_to_logical_apicid = cpu_to_logical_apicid,
|
||||||
|
@ -59,7 +59,7 @@ struct genapic apic_default = {
|
|||||||
.init_apic_ldr = default_init_apic_ldr,
|
.init_apic_ldr = default_init_apic_ldr,
|
||||||
|
|
||||||
.ioapic_phys_id_map = default_ioapic_phys_id_map,
|
.ioapic_phys_id_map = default_ioapic_phys_id_map,
|
||||||
.setup_apic_routing = setup_apic_routing,
|
.setup_apic_routing = default_setup_apic_routing,
|
||||||
.multi_timer_check = multi_timer_check,
|
.multi_timer_check = multi_timer_check,
|
||||||
.apicid_to_node = apicid_to_node,
|
.apicid_to_node = apicid_to_node,
|
||||||
.cpu_to_logical_apicid = cpu_to_logical_apicid,
|
.cpu_to_logical_apicid = cpu_to_logical_apicid,
|
||||||
|
@ -120,7 +120,7 @@ struct genapic apic_es7000 = {
|
|||||||
.init_apic_ldr = es7000_init_apic_ldr,
|
.init_apic_ldr = es7000_init_apic_ldr,
|
||||||
|
|
||||||
.ioapic_phys_id_map = es7000_ioapic_phys_id_map,
|
.ioapic_phys_id_map = es7000_ioapic_phys_id_map,
|
||||||
.setup_apic_routing = setup_apic_routing,
|
.setup_apic_routing = es7000_setup_apic_routing,
|
||||||
.multi_timer_check = multi_timer_check,
|
.multi_timer_check = multi_timer_check,
|
||||||
.apicid_to_node = apicid_to_node,
|
.apicid_to_node = apicid_to_node,
|
||||||
.cpu_to_logical_apicid = cpu_to_logical_apicid,
|
.cpu_to_logical_apicid = cpu_to_logical_apicid,
|
||||||
|
@ -65,7 +65,7 @@ struct genapic apic_numaq = {
|
|||||||
.init_apic_ldr = numaq_init_apic_ldr,
|
.init_apic_ldr = numaq_init_apic_ldr,
|
||||||
|
|
||||||
.ioapic_phys_id_map = numaq_ioapic_phys_id_map,
|
.ioapic_phys_id_map = numaq_ioapic_phys_id_map,
|
||||||
.setup_apic_routing = setup_apic_routing,
|
.setup_apic_routing = numaq_setup_apic_routing,
|
||||||
.multi_timer_check = multi_timer_check,
|
.multi_timer_check = multi_timer_check,
|
||||||
.apicid_to_node = apicid_to_node,
|
.apicid_to_node = apicid_to_node,
|
||||||
.cpu_to_logical_apicid = cpu_to_logical_apicid,
|
.cpu_to_logical_apicid = cpu_to_logical_apicid,
|
||||||
|
@ -58,7 +58,7 @@ struct genapic apic_summit = {
|
|||||||
.init_apic_ldr = summit_init_apic_ldr,
|
.init_apic_ldr = summit_init_apic_ldr,
|
||||||
|
|
||||||
.ioapic_phys_id_map = summit_ioapic_phys_id_map,
|
.ioapic_phys_id_map = summit_ioapic_phys_id_map,
|
||||||
.setup_apic_routing = setup_apic_routing,
|
.setup_apic_routing = summit_setup_apic_routing,
|
||||||
.multi_timer_check = multi_timer_check,
|
.multi_timer_check = multi_timer_check,
|
||||||
.apicid_to_node = apicid_to_node,
|
.apicid_to_node = apicid_to_node,
|
||||||
.cpu_to_logical_apicid = cpu_to_logical_apicid,
|
.cpu_to_logical_apicid = cpu_to_logical_apicid,
|
||||||
|
Loading…
Reference in New Issue
Block a user