Patches contributed by Eötvös Lorand University
commit 72ce016583916fb7ffcbaa6a3e1f8f731b79a865
Author: Ingo Molnar <mingo@elte.hu>
Date: Wed Jan 28 06:50:47 2009 +0100
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>
diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h
index 05116d5487d2..321ea47b5dd1 100644
--- a/arch/x86/include/asm/bigsmp/apic.h
+++ b/arch/x86/include/asm/bigsmp/apic.h
@@ -56,7 +56,7 @@ static inline void bigsmp_init_apic_ldr(void)
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",
"Physflat", nr_ioapics);
diff --git a/arch/x86/include/asm/es7000/apic.h b/arch/x86/include/asm/es7000/apic.h
index db3e652f0f7d..f1183000a940 100644
--- a/arch/x86/include/asm/es7000/apic.h
+++ b/arch/x86/include/asm/es7000/apic.h
@@ -73,7 +73,7 @@ static inline void es7000_init_apic_ldr(void)
}
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());
printk("Enabling APIC mode: %s. Using %d I/O APICs, target cpus %lx\n",
diff --git a/arch/x86/include/asm/genapic.h b/arch/x86/include/asm/genapic.h
index 661898c2229c..38b1202316f5 100644
--- a/arch/x86/include/asm/genapic.h
+++ b/arch/x86/include/asm/genapic.h
@@ -107,7 +107,7 @@ extern void apic_send_IPI_self(int vector);
extern struct genapic apic_x2apic_uv_x;
DECLARE_PER_CPU(int, x2apic_extra_bits);
-extern void setup_apic_routing(void);
+extern void default_setup_apic_routing(void);
#endif
#endif /* _ASM_X86_GENAPIC_64_H */
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h
index 7abdaae06f24..d44677463046 100644
--- a/arch/x86/include/asm/mach-default/mach_apic.h
+++ b/arch/x86/include/asm/mach-default/mach_apic.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 send_IPI_self (apic->send_IPI_self)
#define wakeup_secondary_cpu (apic->wakeup_cpu)
-extern void setup_apic_routing(void);
+extern void default_setup_apic_routing(void);
#else
#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;
}
-static inline void setup_apic_routing(void)
+static inline void default_setup_apic_routing(void)
{
#ifdef CONFIG_X86_IO_APIC
printk("Enabling APIC mode: %s. Using %d I/O APICs\n",
diff --git a/arch/x86/include/asm/mach-generic/mach_apic.h b/arch/x86/include/asm/mach-generic/mach_apic.h
index c1c96e6bb185..ddf369248ab7 100644
--- a/arch/x86/include/asm/mach-generic/mach_apic.h
+++ b/arch/x86/include/asm/mach-generic/mach_apic.h
@@ -3,7 +3,6 @@
#include <asm/genapic.h>
-#define setup_apic_routing (apic->setup_apic_routing)
#define multi_timer_check (apic->multi_timer_check)
#define apicid_to_node (apic->apicid_to_node)
#define cpu_to_logical_apicid (apic->cpu_to_logical_apicid)
diff --git a/arch/x86/include/asm/numaq/apic.h b/arch/x86/include/asm/numaq/apic.h
index dc7499b92629..2feb7e72e9ea 100644
--- a/arch/x86/include/asm/numaq/apic.h
+++ b/arch/x86/include/asm/numaq/apic.h
@@ -33,7 +33,7 @@ static inline void numaq_init_apic_ldr(void)
/* 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",
"NUMA-Q", nr_ioapics);
diff --git a/arch/x86/include/asm/summit/apic.h b/arch/x86/include/asm/summit/apic.h
index 4dafb58f9307..7ec2696bc9a0 100644
--- a/arch/x86/include/asm/summit/apic.h
+++ b/arch/x86/include/asm/summit/apic.h
@@ -74,7 +74,7 @@ static inline int summit_apic_id_registered(void)
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",
nr_ioapics);
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 314fe0dddef4..539163161a4c 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -1360,9 +1360,8 @@ static void __init acpi_process_madt(void)
acpi_ioapic = 1;
smp_found_config = 1;
-#ifdef CONFIG_X86_32
- setup_apic_routing();
-#endif
+ if (apic->setup_apic_routing)
+ apic->setup_apic_routing();
}
}
if (error == -EINVAL) {
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c
index b7077936ac09..fcbcc03cd4bd 100644
--- a/arch/x86/kernel/apic.c
+++ b/arch/x86/kernel/apic.c
@@ -1625,7 +1625,7 @@ int __init APIC_init_uniprocessor(void)
enable_IR_x2apic();
#endif
#ifdef CONFIG_X86_64
- setup_apic_routing();
+ default_setup_apic_routing();
#endif
verify_local_APIC();
diff --git a/arch/x86/kernel/genapic_64.c b/arch/x86/kernel/genapic_64.c
index 060945b8eec4..d57d2138f078 100644
--- a/arch/x86/kernel/genapic_64.c
+++ b/arch/x86/kernel/genapic_64.c
@@ -44,7 +44,7 @@ static struct genapic *apic_probe[] __initdata = {
/*
* 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 (!intr_remapping_enabled)
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index fa6bb263892e..c8a534a16d98 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -390,9 +390,9 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
generic_bigsmp_probe();
#endif
-#ifdef CONFIG_X86_32
- setup_apic_routing();
-#endif
+ if (apic->setup_apic_routing)
+ apic->setup_apic_routing();
+
if (!num_processors)
printk(KERN_ERR "MPTABLE: no processors registered!\n");
return num_processors;
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 45c096f605fe..3791b4ae567f 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1128,7 +1128,7 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
#ifdef CONFIG_X86_64
enable_IR_x2apic();
- setup_apic_routing();
+ default_setup_apic_routing();
#endif
if (smp_sanity_check(max_cpus) < 0) {
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c
index f2a3418d0cc9..ad3837a59bd4 100644
--- a/arch/x86/mach-generic/bigsmp.c
+++ b/arch/x86/mach-generic/bigsmp.c
@@ -78,7 +78,7 @@ struct genapic apic_bigsmp = {
.init_apic_ldr = bigsmp_init_apic_ldr,
.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,
.apicid_to_node = apicid_to_node,
.cpu_to_logical_apicid = cpu_to_logical_apicid,
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c
index c403f3d9300c..67f287fc12df 100644
--- a/arch/x86/mach-generic/default.c
+++ b/arch/x86/mach-generic/default.c
@@ -59,7 +59,7 @@ struct genapic apic_default = {
.init_apic_ldr = default_init_apic_ldr,
.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,
.apicid_to_node = apicid_to_node,
.cpu_to_logical_apicid = cpu_to_logical_apicid,
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c
index ce09baf08724..f61172939461 100644
--- a/arch/x86/mach-generic/es7000.c
+++ b/arch/x86/mach-generic/es7000.c
@@ -120,7 +120,7 @@ struct genapic apic_es7000 = {
.init_apic_ldr = es7000_init_apic_ldr,
.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,
.apicid_to_node = apicid_to_node,
.cpu_to_logical_apicid = cpu_to_logical_apicid,
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c
index 5d98f18a0bde..8c137f413485 100644
--- a/arch/x86/mach-generic/numaq.c
+++ b/arch/x86/mach-generic/numaq.c
@@ -65,7 +65,7 @@ struct genapic apic_numaq = {
.init_apic_ldr = numaq_init_apic_ldr,
.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,
.apicid_to_node = apicid_to_node,
.cpu_to_logical_apicid = cpu_to_logical_apicid,
diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c
index 6abdd53a01c5..0698566dc7b4 100644
--- a/arch/x86/mach-generic/summit.c
+++ b/arch/x86/mach-generic/summit.c
@@ -58,7 +58,7 @@ struct genapic apic_summit = {
.init_apic_ldr = summit_init_apic_ldr,
.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,
.apicid_to_node = apicid_to_node,
.cpu_to_logical_apicid = cpu_to_logical_apicid,
commit d190cb87c4503014353f2310c4bfa2268fa7111d
Author: Ingo Molnar <mingo@elte.hu>
Date: Wed Jan 28 06:50:47 2009 +0100
x86, apic: clean up ->ioapic_phys_id_map()
- separate the namespace
- remove macros
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h
index 819413082999..05116d5487d2 100644
--- a/arch/x86/include/asm/bigsmp/apic.h
+++ b/arch/x86/include/asm/bigsmp/apic.h
@@ -94,7 +94,7 @@ static inline int cpu_to_logical_apicid(int cpu)
return cpu_physical_id(cpu);
}
-static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_map)
+static inline physid_mask_t bigsmp_ioapic_phys_id_map(physid_mask_t phys_map)
{
/* For clustered we don't have a good way to do this yet - hack */
return physids_promote(0xFFL);
diff --git a/arch/x86/include/asm/es7000/apic.h b/arch/x86/include/asm/es7000/apic.h
index 06f5757bf7af..db3e652f0f7d 100644
--- a/arch/x86/include/asm/es7000/apic.h
+++ b/arch/x86/include/asm/es7000/apic.h
@@ -125,7 +125,7 @@ static inline int cpu_to_logical_apicid(int cpu)
#endif
}
-static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_map)
+static inline physid_mask_t es7000_ioapic_phys_id_map(physid_mask_t phys_map)
{
/* For clustered we don't have a good way to do this yet - hack */
return physids_promote(0xff);
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h
index 23e0a2da3a96..7abdaae06f24 100644
--- a/arch/x86/include/asm/mach-default/mach_apic.h
+++ b/arch/x86/include/asm/mach-default/mach_apic.h
@@ -99,7 +99,7 @@ static inline unsigned long default_check_apicid_present(int bit)
return physid_isset(bit, phys_cpu_present_map);
}
-static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_map)
+static inline physid_mask_t default_ioapic_phys_id_map(physid_mask_t phys_map)
{
return phys_map;
}
diff --git a/arch/x86/include/asm/mach-generic/mach_apic.h b/arch/x86/include/asm/mach-generic/mach_apic.h
index 8e51f4163944..c1c96e6bb185 100644
--- a/arch/x86/include/asm/mach-generic/mach_apic.h
+++ b/arch/x86/include/asm/mach-generic/mach_apic.h
@@ -3,7 +3,6 @@
#include <asm/genapic.h>
-#define ioapic_phys_id_map (apic->ioapic_phys_id_map)
#define setup_apic_routing (apic->setup_apic_routing)
#define multi_timer_check (apic->multi_timer_check)
#define apicid_to_node (apic->apicid_to_node)
diff --git a/arch/x86/include/asm/numaq/apic.h b/arch/x86/include/asm/numaq/apic.h
index 802297489a34..dc7499b92629 100644
--- a/arch/x86/include/asm/numaq/apic.h
+++ b/arch/x86/include/asm/numaq/apic.h
@@ -48,7 +48,7 @@ static inline int multi_timer_check(int apic, int irq)
return apic != 0 && irq == 0;
}
-static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_map)
+static inline physid_mask_t numaq_ioapic_phys_id_map(physid_mask_t phys_map)
{
/* We don't have a good way to do this yet - hack */
return physids_promote(0xFUL);
diff --git a/arch/x86/include/asm/summit/apic.h b/arch/x86/include/asm/summit/apic.h
index 9108c89fe881..4dafb58f9307 100644
--- a/arch/x86/include/asm/summit/apic.h
+++ b/arch/x86/include/asm/summit/apic.h
@@ -109,7 +109,8 @@ static inline int cpu_present_to_apicid(int mps_cpu)
return BAD_APICID;
}
-static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_id_map)
+static inline physid_mask_t
+ summit_ioapic_phys_id_map(physid_mask_t phys_id_map)
{
/* For clustered we don't have a good way to do this yet - hack */
return physids_promote(0x0F);
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index 49899e066247..db79ad9a7646 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -2108,7 +2108,7 @@ static void __init setup_ioapic_ids_from_mpc(void)
* This is broken; anything with a real cpu count has to
* circumvent this idiocy regardless.
*/
- phys_id_present_map = ioapic_phys_id_map(phys_cpu_present_map);
+ phys_id_present_map = apic->ioapic_phys_id_map(phys_cpu_present_map);
/*
* Set the IOAPIC ID to the value stored in the MPC table.
@@ -3862,7 +3862,7 @@ int __init io_apic_get_unique_id(int ioapic, int apic_id)
*/
if (physids_empty(apic_id_map))
- apic_id_map = ioapic_phys_id_map(phys_cpu_present_map);
+ apic_id_map = apic->ioapic_phys_id_map(phys_cpu_present_map);
spin_lock_irqsave(&ioapic_lock, flags);
reg_00.raw = io_apic_read(ioapic, 0);
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c
index 7b7fc471a3f7..f2a3418d0cc9 100644
--- a/arch/x86/mach-generic/bigsmp.c
+++ b/arch/x86/mach-generic/bigsmp.c
@@ -77,7 +77,7 @@ struct genapic apic_bigsmp = {
.vector_allocation_domain = bigsmp_vector_allocation_domain,
.init_apic_ldr = bigsmp_init_apic_ldr,
- .ioapic_phys_id_map = ioapic_phys_id_map,
+ .ioapic_phys_id_map = bigsmp_ioapic_phys_id_map,
.setup_apic_routing = setup_apic_routing,
.multi_timer_check = multi_timer_check,
.apicid_to_node = apicid_to_node,
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c
index 633e8482af25..c403f3d9300c 100644
--- a/arch/x86/mach-generic/default.c
+++ b/arch/x86/mach-generic/default.c
@@ -58,7 +58,7 @@ struct genapic apic_default = {
.vector_allocation_domain = default_vector_allocation_domain,
.init_apic_ldr = default_init_apic_ldr,
- .ioapic_phys_id_map = ioapic_phys_id_map,
+ .ioapic_phys_id_map = default_ioapic_phys_id_map,
.setup_apic_routing = setup_apic_routing,
.multi_timer_check = multi_timer_check,
.apicid_to_node = apicid_to_node,
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c
index b70833e35976..ce09baf08724 100644
--- a/arch/x86/mach-generic/es7000.c
+++ b/arch/x86/mach-generic/es7000.c
@@ -119,7 +119,7 @@ struct genapic apic_es7000 = {
.vector_allocation_domain = es7000_vector_allocation_domain,
.init_apic_ldr = es7000_init_apic_ldr,
- .ioapic_phys_id_map = ioapic_phys_id_map,
+ .ioapic_phys_id_map = es7000_ioapic_phys_id_map,
.setup_apic_routing = setup_apic_routing,
.multi_timer_check = multi_timer_check,
.apicid_to_node = apicid_to_node,
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c
index a06fda579281..5d98f18a0bde 100644
--- a/arch/x86/mach-generic/numaq.c
+++ b/arch/x86/mach-generic/numaq.c
@@ -64,7 +64,7 @@ struct genapic apic_numaq = {
.vector_allocation_domain = numaq_vector_allocation_domain,
.init_apic_ldr = numaq_init_apic_ldr,
- .ioapic_phys_id_map = ioapic_phys_id_map,
+ .ioapic_phys_id_map = numaq_ioapic_phys_id_map,
.setup_apic_routing = setup_apic_routing,
.multi_timer_check = multi_timer_check,
.apicid_to_node = apicid_to_node,
diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c
index 36c552fa4275..6abdd53a01c5 100644
--- a/arch/x86/mach-generic/summit.c
+++ b/arch/x86/mach-generic/summit.c
@@ -57,7 +57,7 @@ struct genapic apic_summit = {
.vector_allocation_domain = summit_vector_allocation_domain,
.init_apic_ldr = summit_init_apic_ldr,
- .ioapic_phys_id_map = ioapic_phys_id_map,
+ .ioapic_phys_id_map = summit_ioapic_phys_id_map,
.setup_apic_routing = setup_apic_routing,
.multi_timer_check = multi_timer_check,
.apicid_to_node = apicid_to_node,
commit a5c4329622a3437adef4b2a4288d127957743c97
Author: Ingo Molnar <mingo@elte.hu>
Date: Wed Jan 28 06:50:47 2009 +0100
x86, apic: clean up ->init_apic_ldr()
- separate the namespace
- remove macros
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h
index 916451252b3a..819413082999 100644
--- a/arch/x86/include/asm/bigsmp/apic.h
+++ b/arch/x86/include/asm/bigsmp/apic.h
@@ -46,7 +46,7 @@ static inline unsigned long calculate_ldr(int cpu)
* an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel
* document number 292116). So here it goes...
*/
-static inline void init_apic_ldr(void)
+static inline void bigsmp_init_apic_ldr(void)
{
unsigned long val;
int cpu = smp_processor_id();
diff --git a/arch/x86/include/asm/es7000/apic.h b/arch/x86/include/asm/es7000/apic.h
index 847008a77029..06f5757bf7af 100644
--- a/arch/x86/include/asm/es7000/apic.h
+++ b/arch/x86/include/asm/es7000/apic.h
@@ -52,7 +52,7 @@ static inline unsigned long calculate_ldr(int cpu)
* an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel
* document number 292116). So here it goes...
*/
-static inline void init_apic_ldr_cluster(void)
+static inline void es7000_init_apic_ldr_cluster(void)
{
unsigned long val;
int cpu = smp_processor_id();
@@ -62,7 +62,7 @@ static inline void init_apic_ldr_cluster(void)
apic_write(APIC_LDR, val);
}
-static inline void init_apic_ldr(void)
+static inline void es7000_init_apic_ldr(void)
{
unsigned long val;
int cpu = smp_processor_id();
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h
index 9c56542644ca..23e0a2da3a96 100644
--- a/arch/x86/include/asm/mach-default/mach_apic.h
+++ b/arch/x86/include/asm/mach-default/mach_apic.h
@@ -19,7 +19,6 @@ static inline const struct cpumask *default_target_cpus(void)
#ifdef CONFIG_X86_64
#include <asm/genapic.h>
-#define init_apic_ldr (apic->init_apic_ldr)
#define cpu_mask_to_apicid (apic->cpu_mask_to_apicid)
#define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and)
#define phys_pkg_id (apic->phys_pkg_id)
@@ -36,7 +35,7 @@ extern void setup_apic_routing(void);
* an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel
* document number 292116). So here it goes...
*/
-static inline void init_apic_ldr(void)
+static inline void default_init_apic_ldr(void)
{
unsigned long val;
diff --git a/arch/x86/include/asm/mach-generic/mach_apic.h b/arch/x86/include/asm/mach-generic/mach_apic.h
index e94881af9625..8e51f4163944 100644
--- a/arch/x86/include/asm/mach-generic/mach_apic.h
+++ b/arch/x86/include/asm/mach-generic/mach_apic.h
@@ -3,7 +3,6 @@
#include <asm/genapic.h>
-#define init_apic_ldr (apic->init_apic_ldr)
#define ioapic_phys_id_map (apic->ioapic_phys_id_map)
#define setup_apic_routing (apic->setup_apic_routing)
#define multi_timer_check (apic->multi_timer_check)
diff --git a/arch/x86/include/asm/numaq/apic.h b/arch/x86/include/asm/numaq/apic.h
index defee3496ad6..802297489a34 100644
--- a/arch/x86/include/asm/numaq/apic.h
+++ b/arch/x86/include/asm/numaq/apic.h
@@ -28,7 +28,7 @@ static inline int numaq_apic_id_registered(void)
return 1;
}
-static inline void init_apic_ldr(void)
+static inline void numaq_init_apic_ldr(void)
{
/* Already done in NUMA-Q firmware */
}
diff --git a/arch/x86/include/asm/summit/apic.h b/arch/x86/include/asm/summit/apic.h
index 51df002ecf4c..9108c89fe881 100644
--- a/arch/x86/include/asm/summit/apic.h
+++ b/arch/x86/include/asm/summit/apic.h
@@ -37,7 +37,7 @@ static inline unsigned long summit_check_apicid_present(int bit)
extern u8 cpu_2_logical_apicid[];
-static inline void init_apic_ldr(void)
+static inline void summit_init_apic_ldr(void)
{
unsigned long val, id;
int count = 0;
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c
index 3853ed76c888..b7077936ac09 100644
--- a/arch/x86/kernel/apic.c
+++ b/arch/x86/kernel/apic.c
@@ -1179,7 +1179,7 @@ void __cpuinit setup_local_APIC(void)
* an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel
* document number 292116). So here it goes...
*/
- init_apic_ldr();
+ apic->init_apic_ldr();
/*
* Set Task Priority to 'accept all'. We never change this
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c
index 391cc99cd21c..7b7fc471a3f7 100644
--- a/arch/x86/mach-generic/bigsmp.c
+++ b/arch/x86/mach-generic/bigsmp.c
@@ -75,7 +75,7 @@ struct genapic apic_bigsmp = {
.check_apicid_present = bigsmp_check_apicid_present,
.vector_allocation_domain = bigsmp_vector_allocation_domain,
- .init_apic_ldr = init_apic_ldr,
+ .init_apic_ldr = bigsmp_init_apic_ldr,
.ioapic_phys_id_map = ioapic_phys_id_map,
.setup_apic_routing = setup_apic_routing,
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c
index 6adc3c69a3c9..633e8482af25 100644
--- a/arch/x86/mach-generic/default.c
+++ b/arch/x86/mach-generic/default.c
@@ -56,7 +56,7 @@ struct genapic apic_default = {
.check_apicid_present = default_check_apicid_present,
.vector_allocation_domain = default_vector_allocation_domain,
- .init_apic_ldr = init_apic_ldr,
+ .init_apic_ldr = default_init_apic_ldr,
.ioapic_phys_id_map = ioapic_phys_id_map,
.setup_apic_routing = setup_apic_routing,
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c
index bc1f21cd6a4d..b70833e35976 100644
--- a/arch/x86/mach-generic/es7000.c
+++ b/arch/x86/mach-generic/es7000.c
@@ -24,7 +24,7 @@ void __init es7000_update_genapic_to_cluster(void)
apic->irq_delivery_mode = INT_DELIVERY_MODE_CLUSTER;
apic->irq_dest_mode = INT_DEST_MODE_CLUSTER;
- apic->init_apic_ldr = init_apic_ldr_cluster;
+ apic->init_apic_ldr = es7000_init_apic_ldr_cluster;
apic->cpu_mask_to_apicid = cpu_mask_to_apicid_cluster;
}
@@ -117,7 +117,7 @@ struct genapic apic_es7000 = {
.check_apicid_present = es7000_check_apicid_present,
.vector_allocation_domain = es7000_vector_allocation_domain,
- .init_apic_ldr = init_apic_ldr,
+ .init_apic_ldr = es7000_init_apic_ldr,
.ioapic_phys_id_map = ioapic_phys_id_map,
.setup_apic_routing = setup_apic_routing,
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c
index 712882f48c4e..a06fda579281 100644
--- a/arch/x86/mach-generic/numaq.c
+++ b/arch/x86/mach-generic/numaq.c
@@ -62,7 +62,7 @@ struct genapic apic_numaq = {
.check_apicid_present = numaq_check_apicid_present,
.vector_allocation_domain = numaq_vector_allocation_domain,
- .init_apic_ldr = init_apic_ldr,
+ .init_apic_ldr = numaq_init_apic_ldr,
.ioapic_phys_id_map = ioapic_phys_id_map,
.setup_apic_routing = setup_apic_routing,
diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c
index 1834887b94a3..36c552fa4275 100644
--- a/arch/x86/mach-generic/summit.c
+++ b/arch/x86/mach-generic/summit.c
@@ -55,7 +55,7 @@ struct genapic apic_summit = {
.check_apicid_present = summit_check_apicid_present,
.vector_allocation_domain = summit_vector_allocation_domain,
- .init_apic_ldr = init_apic_ldr,
+ .init_apic_ldr = summit_init_apic_ldr,
.ioapic_phys_id_map = ioapic_phys_id_map,
.setup_apic_routing = setup_apic_routing,
commit e2d40b1878bd13ca1028ddd299c48e4821ac3535
Author: Ingo Molnar <mingo@elte.hu>
Date: Wed Jan 28 06:50:47 2009 +0100
x86, apic: clean up ->vector_allocation_domain()
- separate the namespace
- remove macros
- move the default vector-allocation-domain to mach-generic
- fix whitespace damage
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h
index 8adccf8ee473..9c56542644ca 100644
--- a/arch/x86/include/asm/mach-default/mach_apic.h
+++ b/arch/x86/include/asm/mach-default/mach_apic.h
@@ -23,7 +23,6 @@ static inline const struct cpumask *default_target_cpus(void)
#define cpu_mask_to_apicid (apic->cpu_mask_to_apicid)
#define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and)
#define phys_pkg_id (apic->phys_pkg_id)
-#define vector_allocation_domain (apic->vector_allocation_domain)
#define read_apic_id() (GET_APIC_ID(apic_read(APIC_ID)))
#define send_IPI_self (apic->send_IPI_self)
#define wakeup_secondary_cpu (apic->wakeup_cpu)
@@ -89,18 +88,6 @@ static inline int apicid_to_node(int logical_apicid)
#endif
}
-static inline void vector_allocation_domain(int cpu, struct cpumask *retmask)
-{
- /* Careful. Some cpus do not strictly honor the set of cpus
- * specified in the interrupt destination when using lowest
- * priority interrupt delivery mode.
- *
- * In particular there was a hyperthreading cpu observed to
- * deliver interrupts to the wrong hyperthread when only one
- * hyperthread was specified in the interrupt desitination.
- */
- *retmask = (cpumask_t) { { [0] = APIC_ALL_CPUS } };
-}
#endif
static inline unsigned long default_check_apicid_used(physid_mask_t bitmap, int apicid)
diff --git a/arch/x86/include/asm/mach-generic/mach_apic.h b/arch/x86/include/asm/mach-generic/mach_apic.h
index 4cb9e2b99e37..e94881af9625 100644
--- a/arch/x86/include/asm/mach-generic/mach_apic.h
+++ b/arch/x86/include/asm/mach-generic/mach_apic.h
@@ -15,7 +15,6 @@
#define check_phys_apicid_present (apic->check_phys_apicid_present)
#define cpu_mask_to_apicid (apic->cpu_mask_to_apicid)
#define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and)
-#define vector_allocation_domain (apic->vector_allocation_domain)
#define enable_apic_mode (apic->enable_apic_mode)
#define phys_pkg_id (apic->phys_pkg_id)
#define wakeup_secondary_cpu (apic->wakeup_cpu)
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index 733ecf172724..49899e066247 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -1316,7 +1316,7 @@ __assign_irq_vector(int irq, struct irq_cfg *cfg, const struct cpumask *mask)
int new_cpu;
int vector, offset;
- vector_allocation_domain(cpu, tmp_mask);
+ apic->vector_allocation_domain(cpu, tmp_mask);
vector = current_vector;
offset = current_offset;
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c
index 6da251aa9f4e..391cc99cd21c 100644
--- a/arch/x86/mach-generic/bigsmp.c
+++ b/arch/x86/mach-generic/bigsmp.c
@@ -42,7 +42,7 @@ static const struct dmi_system_id bigsmp_dmi_table[] = {
{ }
};
-static void vector_allocation_domain(int cpu, cpumask_t *retmask)
+static void bigsmp_vector_allocation_domain(int cpu, cpumask_t *retmask)
{
cpus_clear(*retmask);
cpu_set(cpu, *retmask);
@@ -74,7 +74,7 @@ struct genapic apic_bigsmp = {
.check_apicid_used = bigsmp_check_apicid_used,
.check_apicid_present = bigsmp_check_apicid_present,
- .vector_allocation_domain = vector_allocation_domain,
+ .vector_allocation_domain = bigsmp_vector_allocation_domain,
.init_apic_ldr = init_apic_ldr,
.ioapic_phys_id_map = ioapic_phys_id_map,
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c
index e89e8c9dd68d..6adc3c69a3c9 100644
--- a/arch/x86/mach-generic/default.c
+++ b/arch/x86/mach-generic/default.c
@@ -18,6 +18,20 @@
#include <asm/mach-default/mach_mpparse.h>
#include <asm/mach-default/mach_wakecpu.h>
+static void default_vector_allocation_domain(int cpu, struct cpumask *retmask)
+{
+ /*
+ * Careful. Some cpus do not strictly honor the set of cpus
+ * specified in the interrupt destination when using lowest
+ * priority interrupt delivery mode.
+ *
+ * In particular there was a hyperthreading cpu observed to
+ * deliver interrupts to the wrong hyperthread when only one
+ * hyperthread was specified in the interrupt desitination.
+ */
+ *retmask = (cpumask_t) { { [0] = APIC_ALL_CPUS } };
+}
+
/* should be called last. */
static int probe_default(void)
{
@@ -41,7 +55,7 @@ struct genapic apic_default = {
.check_apicid_used = default_check_apicid_used,
.check_apicid_present = default_check_apicid_present,
- .vector_allocation_domain = vector_allocation_domain,
+ .vector_allocation_domain = default_vector_allocation_domain,
.init_apic_ldr = init_apic_ldr,
.ioapic_phys_id_map = ioapic_phys_id_map,
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c
index 8e9eeecf7e24..bc1f21cd6a4d 100644
--- a/arch/x86/mach-generic/es7000.c
+++ b/arch/x86/mach-generic/es7000.c
@@ -86,7 +86,7 @@ static int __init es7000_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
}
#endif
-static void vector_allocation_domain(int cpu, cpumask_t *retmask)
+static void es7000_vector_allocation_domain(int cpu, cpumask_t *retmask)
{
/* Careful. Some cpus do not strictly honor the set of cpus
* specified in the interrupt destination when using lowest
@@ -116,7 +116,7 @@ struct genapic apic_es7000 = {
.check_apicid_used = es7000_check_apicid_used,
.check_apicid_present = es7000_check_apicid_present,
- .vector_allocation_domain = vector_allocation_domain,
+ .vector_allocation_domain = es7000_vector_allocation_domain,
.init_apic_ldr = init_apic_ldr,
.ioapic_phys_id_map = ioapic_phys_id_map,
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c
index f909189fee3e..712882f48c4e 100644
--- a/arch/x86/mach-generic/numaq.c
+++ b/arch/x86/mach-generic/numaq.c
@@ -31,7 +31,7 @@ static int probe_numaq(void)
return found_numaq;
}
-static void vector_allocation_domain(int cpu, cpumask_t *retmask)
+static void numaq_vector_allocation_domain(int cpu, cpumask_t *retmask)
{
/* Careful. Some cpus do not strictly honor the set of cpus
* specified in the interrupt destination when using lowest
@@ -61,7 +61,7 @@ struct genapic apic_numaq = {
.check_apicid_used = numaq_check_apicid_used,
.check_apicid_present = numaq_check_apicid_present,
- .vector_allocation_domain = vector_allocation_domain,
+ .vector_allocation_domain = numaq_vector_allocation_domain,
.init_apic_ldr = init_apic_ldr,
.ioapic_phys_id_map = ioapic_phys_id_map,
diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c
index 99a9bea8d141..1834887b94a3 100644
--- a/arch/x86/mach-generic/summit.c
+++ b/arch/x86/mach-generic/summit.c
@@ -24,7 +24,7 @@ static int probe_summit(void)
return 0;
}
-static void vector_allocation_domain(int cpu, cpumask_t *retmask)
+static void summit_vector_allocation_domain(int cpu, cpumask_t *retmask)
{
/* Careful. Some cpus do not strictly honor the set of cpus
* specified in the interrupt destination when using lowest
@@ -54,7 +54,7 @@ struct genapic apic_summit = {
.check_apicid_used = summit_check_apicid_used,
.check_apicid_present = summit_check_apicid_present,
- .vector_allocation_domain = vector_allocation_domain,
+ .vector_allocation_domain = summit_vector_allocation_domain,
.init_apic_ldr = init_apic_ldr,
.ioapic_phys_id_map = ioapic_phys_id_map,
commit 2e867b17cc02e1799f18126af0ddd7b63dd8f6f4
Author: Ingo Molnar <mingo@elte.hu>
Date: Wed Jan 28 05:57:56 2009 +0100
x86, apic: remove no_balance_irq and no_ioapic_check flags
These flags are completely unused. (the in-kernel IRQ balancer has
been removed from the upstream kernel.)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h
index bd52d4d86f0e..916451252b3a 100644
--- a/arch/x86/include/asm/bigsmp/apic.h
+++ b/arch/x86/include/asm/bigsmp/apic.h
@@ -18,7 +18,6 @@ static inline const cpumask_t *bigsmp_target_cpus(void)
}
#define APIC_DFR_VALUE (APIC_DFR_FLAT)
-#define NO_BALANCE_IRQ (0)
static inline unsigned long
bigsmp_check_apicid_used(physid_mask_t bitmap, int apicid)
diff --git a/arch/x86/include/asm/es7000/apic.h b/arch/x86/include/asm/es7000/apic.h
index cd888daa1930..847008a77029 100644
--- a/arch/x86/include/asm/es7000/apic.h
+++ b/arch/x86/include/asm/es7000/apic.h
@@ -23,10 +23,8 @@ static inline const cpumask_t *es7000_target_cpus(void)
#define APIC_DFR_VALUE_CLUSTER (APIC_DFR_CLUSTER)
#define INT_DELIVERY_MODE_CLUSTER (dest_LowestPrio)
#define INT_DEST_MODE_CLUSTER (1) /* logical delivery broadcast to all procs */
-#define NO_BALANCE_IRQ_CLUSTER (1)
#define APIC_DFR_VALUE (APIC_DFR_FLAT)
-#define NO_BALANCE_IRQ (0)
static inline unsigned long
es7000_check_apicid_used(physid_mask_t bitmap, int apicid)
diff --git a/arch/x86/include/asm/genapic.h b/arch/x86/include/asm/genapic.h
index f9d1ec018fd3..661898c2229c 100644
--- a/arch/x86/include/asm/genapic.h
+++ b/arch/x86/include/asm/genapic.h
@@ -34,9 +34,6 @@ struct genapic {
unsigned long (*check_apicid_used)(physid_mask_t bitmap, int apicid);
unsigned long (*check_apicid_present)(int apicid);
- int no_balance_irq;
- int no_ioapic_check;
-
void (*vector_allocation_domain)(int cpu, struct cpumask *retmask);
void (*init_apic_ldr)(void);
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h
index 064bc11a991c..8adccf8ee473 100644
--- a/arch/x86/include/asm/mach-default/mach_apic.h
+++ b/arch/x86/include/asm/mach-default/mach_apic.h
@@ -17,8 +17,6 @@ static inline const struct cpumask *default_target_cpus(void)
#endif
}
-#define NO_BALANCE_IRQ (0)
-
#ifdef CONFIG_X86_64
#include <asm/genapic.h>
#define init_apic_ldr (apic->init_apic_ldr)
diff --git a/arch/x86/include/asm/mach-generic/mach_apic.h b/arch/x86/include/asm/mach-generic/mach_apic.h
index e035f88dfcde..4cb9e2b99e37 100644
--- a/arch/x86/include/asm/mach-generic/mach_apic.h
+++ b/arch/x86/include/asm/mach-generic/mach_apic.h
@@ -3,7 +3,6 @@
#include <asm/genapic.h>
-#define NO_BALANCE_IRQ (apic->no_balance_irq)
#define init_apic_ldr (apic->init_apic_ldr)
#define ioapic_phys_id_map (apic->ioapic_phys_id_map)
#define setup_apic_routing (apic->setup_apic_routing)
diff --git a/arch/x86/include/asm/numaq/apic.h b/arch/x86/include/asm/numaq/apic.h
index 571fdaeafaa8..defee3496ad6 100644
--- a/arch/x86/include/asm/numaq/apic.h
+++ b/arch/x86/include/asm/numaq/apic.h
@@ -12,8 +12,6 @@ static inline const cpumask_t *numaq_target_cpus(void)
return &CPU_MASK_ALL;
}
-#define NO_BALANCE_IRQ (1)
-
static inline unsigned long
numaq_check_apicid_used(physid_mask_t bitmap, int apicid)
{
diff --git a/arch/x86/include/asm/summit/apic.h b/arch/x86/include/asm/summit/apic.h
index 482038b244b0..51df002ecf4c 100644
--- a/arch/x86/include/asm/summit/apic.h
+++ b/arch/x86/include/asm/summit/apic.h
@@ -4,8 +4,6 @@
#include <asm/smp.h>
#include <linux/gfp.h>
-#define NO_BALANCE_IRQ (0)
-
/* In clustered mode, the high nibble of APIC ID is a cluster number.
* The low nibble is a 4-bit bitmap. */
#define XAPIC_DEST_CPUS_SHIFT 4
diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c
index d22cbdaee208..9446f372a16b 100644
--- a/arch/x86/kernel/genapic_flat_64.c
+++ b/arch/x86/kernel/genapic_flat_64.c
@@ -189,9 +189,6 @@ struct genapic apic_flat = {
.check_apicid_used = NULL,
.check_apicid_present = NULL,
- .no_balance_irq = 0,
- .no_ioapic_check = 0,
-
.vector_allocation_domain = flat_vector_allocation_domain,
.init_apic_ldr = flat_init_apic_ldr,
@@ -335,9 +332,6 @@ struct genapic apic_physflat = {
.check_apicid_used = NULL,
.check_apicid_present = NULL,
- .no_balance_irq = 0,
- .no_ioapic_check = 0,
-
.vector_allocation_domain = physflat_vector_allocation_domain,
/* not needed, but shouldn't hurt: */
.init_apic_ldr = flat_init_apic_ldr,
diff --git a/arch/x86/kernel/genx2apic_cluster.c b/arch/x86/kernel/genx2apic_cluster.c
index b91a48eae52e..2eeca6e744af 100644
--- a/arch/x86/kernel/genx2apic_cluster.c
+++ b/arch/x86/kernel/genx2apic_cluster.c
@@ -191,9 +191,6 @@ struct genapic apic_x2apic_cluster = {
.check_apicid_used = NULL,
.check_apicid_present = NULL,
- .no_balance_irq = 0,
- .no_ioapic_check = 0,
-
.vector_allocation_domain = x2apic_vector_allocation_domain,
.init_apic_ldr = init_x2apic_ldr,
diff --git a/arch/x86/kernel/genx2apic_phys.c b/arch/x86/kernel/genx2apic_phys.c
index f070e86af0f4..be0ee3e56ef1 100644
--- a/arch/x86/kernel/genx2apic_phys.c
+++ b/arch/x86/kernel/genx2apic_phys.c
@@ -187,9 +187,6 @@ struct genapic apic_x2apic_phys = {
.check_apicid_used = NULL,
.check_apicid_present = NULL,
- .no_balance_irq = 0,
- .no_ioapic_check = 0,
-
.vector_allocation_domain = x2apic_vector_allocation_domain,
.init_apic_ldr = init_x2apic_ldr,
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c
index c8a891586799..68b423f3da99 100644
--- a/arch/x86/kernel/genx2apic_uv_x.c
+++ b/arch/x86/kernel/genx2apic_uv_x.c
@@ -252,9 +252,6 @@ struct genapic apic_x2apic_uv_x = {
.check_apicid_used = NULL,
.check_apicid_present = NULL,
- .no_balance_irq = 0,
- .no_ioapic_check = 0,
-
.vector_allocation_domain = uv_vector_allocation_domain,
.init_apic_ldr = uv_init_apic_ldr,
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c
index aa8443f6c0f7..6da251aa9f4e 100644
--- a/arch/x86/mach-generic/bigsmp.c
+++ b/arch/x86/mach-generic/bigsmp.c
@@ -74,9 +74,6 @@ struct genapic apic_bigsmp = {
.check_apicid_used = bigsmp_check_apicid_used,
.check_apicid_present = bigsmp_check_apicid_present,
- .no_balance_irq = NO_BALANCE_IRQ,
- .no_ioapic_check = 0,
-
.vector_allocation_domain = vector_allocation_domain,
.init_apic_ldr = init_apic_ldr,
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c
index 47f6b5b06ba1..e89e8c9dd68d 100644
--- a/arch/x86/mach-generic/default.c
+++ b/arch/x86/mach-generic/default.c
@@ -41,9 +41,6 @@ struct genapic apic_default = {
.check_apicid_used = default_check_apicid_used,
.check_apicid_present = default_check_apicid_present,
- .no_balance_irq = NO_BALANCE_IRQ,
- .no_ioapic_check = 0,
-
.vector_allocation_domain = vector_allocation_domain,
.init_apic_ldr = init_apic_ldr,
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c
index 5633f3296e1c..8e9eeecf7e24 100644
--- a/arch/x86/mach-generic/es7000.c
+++ b/arch/x86/mach-generic/es7000.c
@@ -23,7 +23,6 @@ void __init es7000_update_genapic_to_cluster(void)
apic->target_cpus = target_cpus_cluster;
apic->irq_delivery_mode = INT_DELIVERY_MODE_CLUSTER;
apic->irq_dest_mode = INT_DEST_MODE_CLUSTER;
- apic->no_balance_irq = NO_BALANCE_IRQ_CLUSTER;
apic->init_apic_ldr = init_apic_ldr_cluster;
@@ -117,9 +116,6 @@ struct genapic apic_es7000 = {
.check_apicid_used = es7000_check_apicid_used,
.check_apicid_present = es7000_check_apicid_present,
- .no_balance_irq = NO_BALANCE_IRQ,
- .no_ioapic_check = 0,
-
.vector_allocation_domain = vector_allocation_domain,
.init_apic_ldr = init_apic_ldr,
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c
index d85206d8e4ae..f909189fee3e 100644
--- a/arch/x86/mach-generic/numaq.c
+++ b/arch/x86/mach-generic/numaq.c
@@ -61,9 +61,6 @@ struct genapic apic_numaq = {
.check_apicid_used = numaq_check_apicid_used,
.check_apicid_present = numaq_check_apicid_present,
- .no_balance_irq = NO_BALANCE_IRQ,
- .no_ioapic_check = 0,
-
.vector_allocation_domain = vector_allocation_domain,
.init_apic_ldr = init_apic_ldr,
diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c
index f54cf73d3edb..99a9bea8d141 100644
--- a/arch/x86/mach-generic/summit.c
+++ b/arch/x86/mach-generic/summit.c
@@ -54,9 +54,6 @@ struct genapic apic_summit = {
.check_apicid_used = summit_check_apicid_used,
.check_apicid_present = summit_check_apicid_present,
- .no_balance_irq = NO_BALANCE_IRQ,
- .no_ioapic_check = 0,
-
.vector_allocation_domain = vector_allocation_domain,
.init_apic_ldr = init_apic_ldr,
commit d1d7cae8fd54a301a0de531b48451649933ffdcf
Author: Ingo Molnar <mingo@elte.hu>
Date: Wed Jan 28 05:41:42 2009 +0100
x86, apic: clean up check_apicid*() callbacks
Clean up these methods - to make it clearer which function is
used in which case.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h
index 7e6e33a6db02..bd52d4d86f0e 100644
--- a/arch/x86/include/asm/bigsmp/apic.h
+++ b/arch/x86/include/asm/bigsmp/apic.h
@@ -20,14 +20,15 @@ static inline const cpumask_t *bigsmp_target_cpus(void)
#define APIC_DFR_VALUE (APIC_DFR_FLAT)
#define NO_BALANCE_IRQ (0)
-static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
+static inline unsigned long
+bigsmp_check_apicid_used(physid_mask_t bitmap, int apicid)
{
- return (0);
+ return 0;
}
-static inline unsigned long check_apicid_present(int bit)
+static inline unsigned long bigsmp_check_apicid_present(int bit)
{
- return (1);
+ return 1;
}
static inline unsigned long calculate_ldr(int cpu)
diff --git a/arch/x86/include/asm/es7000/apic.h b/arch/x86/include/asm/es7000/apic.h
index 0d770fce4b28..cd888daa1930 100644
--- a/arch/x86/include/asm/es7000/apic.h
+++ b/arch/x86/include/asm/es7000/apic.h
@@ -28,11 +28,12 @@ static inline const cpumask_t *es7000_target_cpus(void)
#define APIC_DFR_VALUE (APIC_DFR_FLAT)
#define NO_BALANCE_IRQ (0)
-static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
+static inline unsigned long
+es7000_check_apicid_used(physid_mask_t bitmap, int apicid)
{
return 0;
}
-static inline unsigned long check_apicid_present(int bit)
+static inline unsigned long es7000_check_apicid_present(int bit)
{
return physid_isset(bit, phys_cpu_present_map);
}
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h
index 5f8d17fdc965..064bc11a991c 100644
--- a/arch/x86/include/asm/mach-default/mach_apic.h
+++ b/arch/x86/include/asm/mach-default/mach_apic.h
@@ -105,12 +105,12 @@ static inline void vector_allocation_domain(int cpu, struct cpumask *retmask)
}
#endif
-static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
+static inline unsigned long default_check_apicid_used(physid_mask_t bitmap, int apicid)
{
return physid_isset(apicid, bitmap);
}
-static inline unsigned long check_apicid_present(int bit)
+static inline unsigned long default_check_apicid_present(int bit)
{
return physid_isset(bit, phys_cpu_present_map);
}
diff --git a/arch/x86/include/asm/mach-generic/mach_apic.h b/arch/x86/include/asm/mach-generic/mach_apic.h
index 00d5fe6e6769..e035f88dfcde 100644
--- a/arch/x86/include/asm/mach-generic/mach_apic.h
+++ b/arch/x86/include/asm/mach-generic/mach_apic.h
@@ -13,9 +13,7 @@
#define cpu_present_to_apicid (apic->cpu_present_to_apicid)
#define apicid_to_cpu_present (apic->apicid_to_cpu_present)
#define setup_portio_remap (apic->setup_portio_remap)
-#define check_apicid_present (apic->check_apicid_present)
#define check_phys_apicid_present (apic->check_phys_apicid_present)
-#define check_apicid_used (apic->check_apicid_used)
#define cpu_mask_to_apicid (apic->cpu_mask_to_apicid)
#define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and)
#define vector_allocation_domain (apic->vector_allocation_domain)
diff --git a/arch/x86/include/asm/numaq/apic.h b/arch/x86/include/asm/numaq/apic.h
index 8ecb3b45c6c4..571fdaeafaa8 100644
--- a/arch/x86/include/asm/numaq/apic.h
+++ b/arch/x86/include/asm/numaq/apic.h
@@ -14,11 +14,12 @@ static inline const cpumask_t *numaq_target_cpus(void)
#define NO_BALANCE_IRQ (1)
-static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
+static inline unsigned long
+numaq_check_apicid_used(physid_mask_t bitmap, int apicid)
{
return physid_isset(apicid, bitmap);
}
-static inline unsigned long check_apicid_present(int bit)
+static inline unsigned long numaq_check_apicid_present(int bit)
{
return physid_isset(bit, phys_cpu_present_map);
}
diff --git a/arch/x86/include/asm/summit/apic.h b/arch/x86/include/asm/summit/apic.h
index 84679e687add..482038b244b0 100644
--- a/arch/x86/include/asm/summit/apic.h
+++ b/arch/x86/include/asm/summit/apic.h
@@ -23,13 +23,14 @@ static inline const cpumask_t *summit_target_cpus(void)
return &cpumask_of_cpu(0);
}
-static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
+static inline unsigned long
+summit_check_apicid_used(physid_mask_t bitmap, int apicid)
{
return 0;
}
/* we don't use the phys_cpu_present_map to indicate apicid presence */
-static inline unsigned long check_apicid_present(int bit)
+static inline unsigned long summit_check_apicid_present(int bit)
{
return 1;
}
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index 7f8b32b20897..733ecf172724 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -2135,7 +2135,7 @@ static void __init setup_ioapic_ids_from_mpc(void)
* system must have a unique ID or we get lots of nice
* 'stuck on smp_invalidate_needed IPI wait' messages.
*/
- if (check_apicid_used(phys_id_present_map,
+ if (apic->check_apicid_used(phys_id_present_map,
mp_ioapics[apic_id].apicid)) {
printk(KERN_ERR "BIOS bug, IO-APIC#%d ID %d is already used!...\n",
apic_id, mp_ioapics[apic_id].apicid);
@@ -3878,10 +3878,10 @@ int __init io_apic_get_unique_id(int ioapic, int apic_id)
* Every APIC in a system must have a unique ID or we get lots of nice
* 'stuck on smp_invalidate_needed IPI wait' messages.
*/
- if (check_apicid_used(apic_id_map, apic_id)) {
+ if (apic->check_apicid_used(apic_id_map, apic_id)) {
for (i = 0; i < get_physical_broadcast(); i++) {
- if (!check_apicid_used(apic_id_map, i))
+ if (!apic->check_apicid_used(apic_id_map, i))
break;
}
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c
index 7c52840f2050..aa8443f6c0f7 100644
--- a/arch/x86/mach-generic/bigsmp.c
+++ b/arch/x86/mach-generic/bigsmp.c
@@ -71,8 +71,8 @@ struct genapic apic_bigsmp = {
.target_cpus = bigsmp_target_cpus,
.disable_esr = 1,
.dest_logical = 0,
- .check_apicid_used = check_apicid_used,
- .check_apicid_present = check_apicid_present,
+ .check_apicid_used = bigsmp_check_apicid_used,
+ .check_apicid_present = bigsmp_check_apicid_present,
.no_balance_irq = NO_BALANCE_IRQ,
.no_ioapic_check = 0,
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c
index 53fa1ad83184..47f6b5b06ba1 100644
--- a/arch/x86/mach-generic/default.c
+++ b/arch/x86/mach-generic/default.c
@@ -38,8 +38,8 @@ struct genapic apic_default = {
.target_cpus = default_target_cpus,
.disable_esr = 0,
.dest_logical = APIC_DEST_LOGICAL,
- .check_apicid_used = check_apicid_used,
- .check_apicid_present = check_apicid_present,
+ .check_apicid_used = default_check_apicid_used,
+ .check_apicid_present = default_check_apicid_present,
.no_balance_irq = NO_BALANCE_IRQ,
.no_ioapic_check = 0,
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c
index 50fed0225cda..5633f3296e1c 100644
--- a/arch/x86/mach-generic/es7000.c
+++ b/arch/x86/mach-generic/es7000.c
@@ -114,8 +114,8 @@ struct genapic apic_es7000 = {
.target_cpus = es7000_target_cpus,
.disable_esr = 1,
.dest_logical = 0,
- .check_apicid_used = check_apicid_used,
- .check_apicid_present = check_apicid_present,
+ .check_apicid_used = es7000_check_apicid_used,
+ .check_apicid_present = es7000_check_apicid_present,
.no_balance_irq = NO_BALANCE_IRQ,
.no_ioapic_check = 0,
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c
index 1fb1b1a4aa00..d85206d8e4ae 100644
--- a/arch/x86/mach-generic/numaq.c
+++ b/arch/x86/mach-generic/numaq.c
@@ -58,8 +58,8 @@ struct genapic apic_numaq = {
.target_cpus = numaq_target_cpus,
.disable_esr = 1,
.dest_logical = APIC_DEST_LOGICAL,
- .check_apicid_used = check_apicid_used,
- .check_apicid_present = check_apicid_present,
+ .check_apicid_used = numaq_check_apicid_used,
+ .check_apicid_present = numaq_check_apicid_present,
.no_balance_irq = NO_BALANCE_IRQ,
.no_ioapic_check = 0,
diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c
index 5c27d4d824e5..f54cf73d3edb 100644
--- a/arch/x86/mach-generic/summit.c
+++ b/arch/x86/mach-generic/summit.c
@@ -51,8 +51,8 @@ struct genapic apic_summit = {
.target_cpus = summit_target_cpus,
.disable_esr = 1,
.dest_logical = APIC_DEST_LOGICAL,
- .check_apicid_used = check_apicid_used,
- .check_apicid_present = check_apicid_present,
+ .check_apicid_used = summit_check_apicid_used,
+ .check_apicid_present = summit_check_apicid_present,
.no_balance_irq = NO_BALANCE_IRQ,
.no_ioapic_check = 0,
commit bdb1a9b62fc182d4da3143e346f7a0925d243352
Author: Ingo Molnar <mingo@elte.hu>
Date: Wed Jan 28 05:29:25 2009 +0100
x86, apic: rename genapic::apic_destination_logical to genapic::dest_logical
This field name was unreasonably long - shorten it.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/include/asm/genapic.h b/arch/x86/include/asm/genapic.h
index 7aee4a4c5244..f9d1ec018fd3 100644
--- a/arch/x86/include/asm/genapic.h
+++ b/arch/x86/include/asm/genapic.h
@@ -30,7 +30,7 @@ struct genapic {
int disable_esr;
- int apic_destination_logical;
+ int dest_logical;
unsigned long (*check_apicid_used)(physid_mask_t bitmap, int apicid);
unsigned long (*check_apicid_present)(int apicid);
diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c
index fd242c6b3ba1..d22cbdaee208 100644
--- a/arch/x86/kernel/genapic_flat_64.c
+++ b/arch/x86/kernel/genapic_flat_64.c
@@ -74,7 +74,7 @@ static inline void _flat_send_IPI_mask(unsigned long mask, int vector)
unsigned long flags;
local_irq_save(flags);
- __send_IPI_dest_field(mask, vector, apic->apic_destination_logical);
+ __send_IPI_dest_field(mask, vector, apic->dest_logical);
local_irq_restore(flags);
}
@@ -114,7 +114,7 @@ static void flat_send_IPI_allbutself(int vector)
_flat_send_IPI_mask(mask, vector);
}
} else if (num_online_cpus() > 1) {
- __send_IPI_shortcut(APIC_DEST_ALLBUT, vector, apic->apic_destination_logical);
+ __send_IPI_shortcut(APIC_DEST_ALLBUT, vector, apic->dest_logical);
}
}
@@ -123,7 +123,7 @@ static void flat_send_IPI_all(int vector)
if (vector == NMI_VECTOR)
flat_send_IPI_mask(cpu_online_mask, vector);
else
- __send_IPI_shortcut(APIC_DEST_ALLINC, vector, apic->apic_destination_logical);
+ __send_IPI_shortcut(APIC_DEST_ALLINC, vector, apic->dest_logical);
}
static unsigned int get_apic_id(unsigned long x)
@@ -185,7 +185,7 @@ struct genapic apic_flat = {
.target_cpus = flat_target_cpus,
.disable_esr = 0,
- .apic_destination_logical = APIC_DEST_LOGICAL,
+ .dest_logical = APIC_DEST_LOGICAL,
.check_apicid_used = NULL,
.check_apicid_present = NULL,
@@ -331,7 +331,7 @@ struct genapic apic_physflat = {
.target_cpus = physflat_target_cpus,
.disable_esr = 0,
- .apic_destination_logical = 0,
+ .dest_logical = 0,
.check_apicid_used = NULL,
.check_apicid_present = NULL,
diff --git a/arch/x86/kernel/genx2apic_cluster.c b/arch/x86/kernel/genx2apic_cluster.c
index a76e75ecc206..b91a48eae52e 100644
--- a/arch/x86/kernel/genx2apic_cluster.c
+++ b/arch/x86/kernel/genx2apic_cluster.c
@@ -64,7 +64,7 @@ static void x2apic_send_IPI_mask(const struct cpumask *mask, int vector)
for_each_cpu(query_cpu, mask)
__x2apic_send_IPI_dest(
per_cpu(x86_cpu_to_logical_apicid, query_cpu),
- vector, apic->apic_destination_logical);
+ vector, apic->dest_logical);
local_irq_restore(flags);
}
@@ -80,7 +80,7 @@ static void x2apic_send_IPI_mask_allbutself(const struct cpumask *mask,
if (query_cpu != this_cpu)
__x2apic_send_IPI_dest(
per_cpu(x86_cpu_to_logical_apicid, query_cpu),
- vector, apic->apic_destination_logical);
+ vector, apic->dest_logical);
local_irq_restore(flags);
}
@@ -95,7 +95,7 @@ static void x2apic_send_IPI_allbutself(int vector)
if (query_cpu != this_cpu)
__x2apic_send_IPI_dest(
per_cpu(x86_cpu_to_logical_apicid, query_cpu),
- vector, apic->apic_destination_logical);
+ vector, apic->dest_logical);
local_irq_restore(flags);
}
@@ -187,7 +187,7 @@ struct genapic apic_x2apic_cluster = {
.target_cpus = x2apic_target_cpus,
.disable_esr = 0,
- .apic_destination_logical = APIC_DEST_LOGICAL,
+ .dest_logical = APIC_DEST_LOGICAL,
.check_apicid_used = NULL,
.check_apicid_present = NULL,
diff --git a/arch/x86/kernel/genx2apic_phys.c b/arch/x86/kernel/genx2apic_phys.c
index 9b6d68deb147..f070e86af0f4 100644
--- a/arch/x86/kernel/genx2apic_phys.c
+++ b/arch/x86/kernel/genx2apic_phys.c
@@ -183,7 +183,7 @@ struct genapic apic_x2apic_phys = {
.target_cpus = x2apic_target_cpus,
.disable_esr = 0,
- .apic_destination_logical = 0,
+ .dest_logical = 0,
.check_apicid_used = NULL,
.check_apicid_present = NULL,
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c
index 0a756800c11a..c8a891586799 100644
--- a/arch/x86/kernel/genx2apic_uv_x.c
+++ b/arch/x86/kernel/genx2apic_uv_x.c
@@ -248,7 +248,7 @@ struct genapic apic_x2apic_uv_x = {
.target_cpus = uv_target_cpus,
.disable_esr = 0,
- .apic_destination_logical = APIC_DEST_LOGICAL,
+ .dest_logical = APIC_DEST_LOGICAL,
.check_apicid_used = NULL,
.check_apicid_present = NULL,
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index 17526d7a8ab3..7f8b32b20897 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -806,7 +806,7 @@ void send_IPI_self(int vector)
* Wait for idle.
*/
apic_wait_icr_idle();
- cfg = APIC_DM_FIXED | APIC_DEST_SELF | vector | apic->apic_destination_logical;
+ cfg = APIC_DM_FIXED | APIC_DEST_SELF | vector | apic->dest_logical;
/*
* Send the IPI. The write to APIC_ICR fires this off.
*/
diff --git a/arch/x86/kernel/ipi.c b/arch/x86/kernel/ipi.c
index 400b7bd48f67..e2e4895ca69f 100644
--- a/arch/x86/kernel/ipi.c
+++ b/arch/x86/kernel/ipi.c
@@ -30,7 +30,7 @@
static inline int __prepare_ICR(unsigned int shortcut, int vector)
{
- unsigned int icr = shortcut | apic->apic_destination_logical;
+ unsigned int icr = shortcut | apic->dest_logical;
switch (vector) {
default:
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index f0a173718d9f..45c096f605fe 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -583,7 +583,7 @@ wakeup_secondary_cpu_via_nmi(int logical_apicid, unsigned long start_eip)
/* Target chip */
/* Boot on the stack */
/* Kick the second */
- apic_icr_write(APIC_DM_NMI | apic->apic_destination_logical, logical_apicid);
+ apic_icr_write(APIC_DM_NMI | apic->dest_logical, logical_apicid);
pr_debug("Waiting for send to finish...\n");
send_status = safe_apic_wait_icr_idle();
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c
index 13ee7dc9b952..7c52840f2050 100644
--- a/arch/x86/mach-generic/bigsmp.c
+++ b/arch/x86/mach-generic/bigsmp.c
@@ -70,7 +70,7 @@ struct genapic apic_bigsmp = {
.target_cpus = bigsmp_target_cpus,
.disable_esr = 1,
- .apic_destination_logical = 0,
+ .dest_logical = 0,
.check_apicid_used = check_apicid_used,
.check_apicid_present = check_apicid_present,
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c
index d3fe8017e94a..53fa1ad83184 100644
--- a/arch/x86/mach-generic/default.c
+++ b/arch/x86/mach-generic/default.c
@@ -37,7 +37,7 @@ struct genapic apic_default = {
.target_cpus = default_target_cpus,
.disable_esr = 0,
- .apic_destination_logical = APIC_DEST_LOGICAL,
+ .dest_logical = APIC_DEST_LOGICAL,
.check_apicid_used = check_apicid_used,
.check_apicid_present = check_apicid_present,
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c
index 61b5da213ce6..50fed0225cda 100644
--- a/arch/x86/mach-generic/es7000.c
+++ b/arch/x86/mach-generic/es7000.c
@@ -113,7 +113,7 @@ struct genapic apic_es7000 = {
.target_cpus = es7000_target_cpus,
.disable_esr = 1,
- .apic_destination_logical = 0,
+ .dest_logical = 0,
.check_apicid_used = check_apicid_used,
.check_apicid_present = check_apicid_present,
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c
index f3b7840d227d..1fb1b1a4aa00 100644
--- a/arch/x86/mach-generic/numaq.c
+++ b/arch/x86/mach-generic/numaq.c
@@ -57,7 +57,7 @@ struct genapic apic_numaq = {
.target_cpus = numaq_target_cpus,
.disable_esr = 1,
- .apic_destination_logical = APIC_DEST_LOGICAL,
+ .dest_logical = APIC_DEST_LOGICAL,
.check_apicid_used = check_apicid_used,
.check_apicid_present = check_apicid_present,
diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c
index 95e075b61bdd..5c27d4d824e5 100644
--- a/arch/x86/mach-generic/summit.c
+++ b/arch/x86/mach-generic/summit.c
@@ -50,7 +50,7 @@ struct genapic apic_summit = {
.target_cpus = summit_target_cpus,
.disable_esr = 1,
- .apic_destination_logical = APIC_DEST_LOGICAL,
+ .dest_logical = APIC_DEST_LOGICAL,
.check_apicid_used = check_apicid_used,
.check_apicid_present = check_apicid_present,
commit 0b06e734bff7554c31eac4aad2fc9be4adb7c1c1
Author: Ingo Molnar <mingo@elte.hu>
Date: Wed Jan 28 05:13:04 2009 +0100
x86: clean up the APIC_DEST_LOGICAL logic
Impact: cleanup
The bigsmp and es7000 subarchitectures un-defined APIC_DEST_LOGICAL in
a rather nasty way by re-defining it to zero. That is infinitely
fragile and makes it very hard to see what to code really does in
a given context. The very same constant has different meanings and
values - depending on which subarch is enabled.
Untangle this mess by never undefining the constant, but instead
propagating the right values into the genapic driver templates.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h
index b550cb111028..7e6e33a6db02 100644
--- a/arch/x86/include/asm/bigsmp/apic.h
+++ b/arch/x86/include/asm/bigsmp/apic.h
@@ -17,8 +17,6 @@ static inline const cpumask_t *bigsmp_target_cpus(void)
#endif
}
-#undef APIC_DEST_LOGICAL
-#define APIC_DEST_LOGICAL 0
#define APIC_DFR_VALUE (APIC_DFR_FLAT)
#define NO_BALANCE_IRQ (0)
diff --git a/arch/x86/include/asm/es7000/apic.h b/arch/x86/include/asm/es7000/apic.h
index aa11c768bed7..0d770fce4b28 100644
--- a/arch/x86/include/asm/es7000/apic.h
+++ b/arch/x86/include/asm/es7000/apic.h
@@ -27,8 +27,6 @@ static inline const cpumask_t *es7000_target_cpus(void)
#define APIC_DFR_VALUE (APIC_DFR_FLAT)
#define NO_BALANCE_IRQ (0)
-#undef APIC_DEST_LOGICAL
-#define APIC_DEST_LOGICAL 0x0
static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
{
diff --git a/arch/x86/include/asm/mach-generic/mach_apic.h b/arch/x86/include/asm/mach-generic/mach_apic.h
index 63fe985219f9..00d5fe6e6769 100644
--- a/arch/x86/include/asm/mach-generic/mach_apic.h
+++ b/arch/x86/include/asm/mach-generic/mach_apic.h
@@ -4,8 +4,6 @@
#include <asm/genapic.h>
#define NO_BALANCE_IRQ (apic->no_balance_irq)
-#undef APIC_DEST_LOGICAL
-#define APIC_DEST_LOGICAL (apic->apic_destination_logical)
#define init_apic_ldr (apic->init_apic_ldr)
#define ioapic_phys_id_map (apic->ioapic_phys_id_map)
#define setup_apic_routing (apic->setup_apic_routing)
diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c
index d437a60cc589..fd242c6b3ba1 100644
--- a/arch/x86/kernel/genapic_flat_64.c
+++ b/arch/x86/kernel/genapic_flat_64.c
@@ -74,7 +74,7 @@ static inline void _flat_send_IPI_mask(unsigned long mask, int vector)
unsigned long flags;
local_irq_save(flags);
- __send_IPI_dest_field(mask, vector, APIC_DEST_LOGICAL);
+ __send_IPI_dest_field(mask, vector, apic->apic_destination_logical);
local_irq_restore(flags);
}
@@ -114,7 +114,7 @@ static void flat_send_IPI_allbutself(int vector)
_flat_send_IPI_mask(mask, vector);
}
} else if (num_online_cpus() > 1) {
- __send_IPI_shortcut(APIC_DEST_ALLBUT, vector,APIC_DEST_LOGICAL);
+ __send_IPI_shortcut(APIC_DEST_ALLBUT, vector, apic->apic_destination_logical);
}
}
@@ -123,7 +123,7 @@ static void flat_send_IPI_all(int vector)
if (vector == NMI_VECTOR)
flat_send_IPI_mask(cpu_online_mask, vector);
else
- __send_IPI_shortcut(APIC_DEST_ALLINC, vector, APIC_DEST_LOGICAL);
+ __send_IPI_shortcut(APIC_DEST_ALLINC, vector, apic->apic_destination_logical);
}
static unsigned int get_apic_id(unsigned long x)
@@ -181,11 +181,11 @@ struct genapic apic_flat = {
.apic_id_registered = flat_apic_id_registered,
.irq_delivery_mode = dest_LowestPrio,
- .irq_dest_mode = (APIC_DEST_LOGICAL != 0),
+ .irq_dest_mode = 1, /* logical */
.target_cpus = flat_target_cpus,
.disable_esr = 0,
- .apic_destination_logical = 0,
+ .apic_destination_logical = APIC_DEST_LOGICAL,
.check_apicid_used = NULL,
.check_apicid_present = NULL,
@@ -327,7 +327,7 @@ struct genapic apic_physflat = {
.apic_id_registered = flat_apic_id_registered,
.irq_delivery_mode = dest_Fixed,
- .irq_dest_mode = (APIC_DEST_PHYSICAL != 0),
+ .irq_dest_mode = 0, /* physical */
.target_cpus = physflat_target_cpus,
.disable_esr = 0,
diff --git a/arch/x86/kernel/genx2apic_cluster.c b/arch/x86/kernel/genx2apic_cluster.c
index c1cffae4a4c2..a76e75ecc206 100644
--- a/arch/x86/kernel/genx2apic_cluster.c
+++ b/arch/x86/kernel/genx2apic_cluster.c
@@ -64,7 +64,7 @@ static void x2apic_send_IPI_mask(const struct cpumask *mask, int vector)
for_each_cpu(query_cpu, mask)
__x2apic_send_IPI_dest(
per_cpu(x86_cpu_to_logical_apicid, query_cpu),
- vector, APIC_DEST_LOGICAL);
+ vector, apic->apic_destination_logical);
local_irq_restore(flags);
}
@@ -80,7 +80,7 @@ static void x2apic_send_IPI_mask_allbutself(const struct cpumask *mask,
if (query_cpu != this_cpu)
__x2apic_send_IPI_dest(
per_cpu(x86_cpu_to_logical_apicid, query_cpu),
- vector, APIC_DEST_LOGICAL);
+ vector, apic->apic_destination_logical);
local_irq_restore(flags);
}
@@ -95,7 +95,7 @@ static void x2apic_send_IPI_allbutself(int vector)
if (query_cpu != this_cpu)
__x2apic_send_IPI_dest(
per_cpu(x86_cpu_to_logical_apicid, query_cpu),
- vector, APIC_DEST_LOGICAL);
+ vector, apic->apic_destination_logical);
local_irq_restore(flags);
}
@@ -183,11 +183,11 @@ struct genapic apic_x2apic_cluster = {
.apic_id_registered = x2apic_apic_id_registered,
.irq_delivery_mode = dest_LowestPrio,
- .irq_dest_mode = (APIC_DEST_LOGICAL != 0),
+ .irq_dest_mode = 1, /* logical */
.target_cpus = x2apic_target_cpus,
.disable_esr = 0,
- .apic_destination_logical = 0,
+ .apic_destination_logical = APIC_DEST_LOGICAL,
.check_apicid_used = NULL,
.check_apicid_present = NULL,
diff --git a/arch/x86/kernel/genx2apic_phys.c b/arch/x86/kernel/genx2apic_phys.c
index c59602be0353..9b6d68deb147 100644
--- a/arch/x86/kernel/genx2apic_phys.c
+++ b/arch/x86/kernel/genx2apic_phys.c
@@ -179,7 +179,7 @@ struct genapic apic_x2apic_phys = {
.apic_id_registered = x2apic_apic_id_registered,
.irq_delivery_mode = dest_Fixed,
- .irq_dest_mode = (APIC_DEST_PHYSICAL != 0),
+ .irq_dest_mode = 0, /* physical */
.target_cpus = x2apic_target_cpus,
.disable_esr = 0,
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c
index 525b4e480a73..0a756800c11a 100644
--- a/arch/x86/kernel/genx2apic_uv_x.c
+++ b/arch/x86/kernel/genx2apic_uv_x.c
@@ -244,11 +244,11 @@ struct genapic apic_x2apic_uv_x = {
.apic_id_registered = uv_apic_id_registered,
.irq_delivery_mode = dest_Fixed,
- .irq_dest_mode = (APIC_DEST_PHYSICAL != 0),
+ .irq_dest_mode = 1, /* logical */
.target_cpus = uv_target_cpus,
.disable_esr = 0,
- .apic_destination_logical = 0,
+ .apic_destination_logical = APIC_DEST_LOGICAL,
.check_apicid_used = NULL,
.check_apicid_present = NULL,
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index 7503285e180d..17526d7a8ab3 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -806,7 +806,7 @@ void send_IPI_self(int vector)
* Wait for idle.
*/
apic_wait_icr_idle();
- cfg = APIC_DM_FIXED | APIC_DEST_SELF | vector | APIC_DEST_LOGICAL;
+ cfg = APIC_DM_FIXED | APIC_DEST_SELF | vector | apic->apic_destination_logical;
/*
* Send the IPI. The write to APIC_ICR fires this off.
*/
diff --git a/arch/x86/kernel/ipi.c b/arch/x86/kernel/ipi.c
index 285bbf8831fa..400b7bd48f67 100644
--- a/arch/x86/kernel/ipi.c
+++ b/arch/x86/kernel/ipi.c
@@ -30,7 +30,7 @@
static inline int __prepare_ICR(unsigned int shortcut, int vector)
{
- unsigned int icr = shortcut | APIC_DEST_LOGICAL;
+ unsigned int icr = shortcut | apic->apic_destination_logical;
switch (vector) {
default:
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index f9dbcff43546..f0a173718d9f 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -583,7 +583,7 @@ wakeup_secondary_cpu_via_nmi(int logical_apicid, unsigned long start_eip)
/* Target chip */
/* Boot on the stack */
/* Kick the second */
- apic_icr_write(APIC_DM_NMI | APIC_DEST_LOGICAL, logical_apicid);
+ apic_icr_write(APIC_DM_NMI | apic->apic_destination_logical, logical_apicid);
pr_debug("Waiting for send to finish...\n");
send_status = safe_apic_wait_icr_idle();
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c
index fe9bf252c069..13ee7dc9b952 100644
--- a/arch/x86/mach-generic/bigsmp.c
+++ b/arch/x86/mach-generic/bigsmp.c
@@ -70,7 +70,7 @@ struct genapic apic_bigsmp = {
.target_cpus = bigsmp_target_cpus,
.disable_esr = 1,
- .apic_destination_logical = APIC_DEST_LOGICAL,
+ .apic_destination_logical = 0,
.check_apicid_used = check_apicid_used,
.check_apicid_present = check_apicid_present,
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c
index b4f8abfb714f..61b5da213ce6 100644
--- a/arch/x86/mach-generic/es7000.c
+++ b/arch/x86/mach-generic/es7000.c
@@ -113,7 +113,7 @@ struct genapic apic_es7000 = {
.target_cpus = es7000_target_cpus,
.disable_esr = 1,
- .apic_destination_logical = APIC_DEST_LOGICAL,
+ .apic_destination_logical = 0,
.check_apicid_used = check_apicid_used,
.check_apicid_present = check_apicid_present,
commit 08125d3edab90644724652eedec3e219e3e0f2e7
Author: Ingo Molnar <mingo@elte.hu>
Date: Wed Jan 28 05:08:44 2009 +0100
x86: rename ->ESR_DISABLE to ->disable_esr
the ->ESR_DISABLE shouting variant was used to enable the esr_disable
macro wrappers. Those ugly macros are removed now so we can rename
->ESR_DISABLE to ->disable_esr
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/include/asm/genapic.h b/arch/x86/include/asm/genapic.h
index e998e3df5d23..7aee4a4c5244 100644
--- a/arch/x86/include/asm/genapic.h
+++ b/arch/x86/include/asm/genapic.h
@@ -28,7 +28,7 @@ struct genapic {
const struct cpumask *(*target_cpus)(void);
- int ESR_DISABLE;
+ int disable_esr;
int apic_destination_logical;
unsigned long (*check_apicid_used)(physid_mask_t bitmap, int apicid);
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c
index 69d8c30d5711..3853ed76c888 100644
--- a/arch/x86/kernel/apic.c
+++ b/arch/x86/kernel/apic.c
@@ -1107,7 +1107,7 @@ static void __cpuinit lapic_setup_esr(void)
return;
}
- if (apic->ESR_DISABLE) {
+ if (apic->disable_esr) {
/*
* Something untraceable is creating bad interrupts on
* secondary quads ... for the moment, just leave the
@@ -1157,7 +1157,7 @@ void __cpuinit setup_local_APIC(void)
#ifdef CONFIG_X86_32
/* Pound the ESR really hard over the head with a big hammer - mbligh */
- if (lapic_is_integrated() && apic->ESR_DISABLE) {
+ if (lapic_is_integrated() && apic->disable_esr) {
apic_write(APIC_ESR, 0);
apic_write(APIC_ESR, 0);
apic_write(APIC_ESR, 0);
diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c
index 0a263d6bb5e2..d437a60cc589 100644
--- a/arch/x86/kernel/genapic_flat_64.c
+++ b/arch/x86/kernel/genapic_flat_64.c
@@ -184,7 +184,7 @@ struct genapic apic_flat = {
.irq_dest_mode = (APIC_DEST_LOGICAL != 0),
.target_cpus = flat_target_cpus,
- .ESR_DISABLE = 0,
+ .disable_esr = 0,
.apic_destination_logical = 0,
.check_apicid_used = NULL,
.check_apicid_present = NULL,
@@ -330,7 +330,7 @@ struct genapic apic_physflat = {
.irq_dest_mode = (APIC_DEST_PHYSICAL != 0),
.target_cpus = physflat_target_cpus,
- .ESR_DISABLE = 0,
+ .disable_esr = 0,
.apic_destination_logical = 0,
.check_apicid_used = NULL,
.check_apicid_present = NULL,
diff --git a/arch/x86/kernel/genx2apic_cluster.c b/arch/x86/kernel/genx2apic_cluster.c
index e9ff7dc9a0f6..c1cffae4a4c2 100644
--- a/arch/x86/kernel/genx2apic_cluster.c
+++ b/arch/x86/kernel/genx2apic_cluster.c
@@ -186,7 +186,7 @@ struct genapic apic_x2apic_cluster = {
.irq_dest_mode = (APIC_DEST_LOGICAL != 0),
.target_cpus = x2apic_target_cpus,
- .ESR_DISABLE = 0,
+ .disable_esr = 0,
.apic_destination_logical = 0,
.check_apicid_used = NULL,
.check_apicid_present = NULL,
diff --git a/arch/x86/kernel/genx2apic_phys.c b/arch/x86/kernel/genx2apic_phys.c
index 8141b5a88f61..c59602be0353 100644
--- a/arch/x86/kernel/genx2apic_phys.c
+++ b/arch/x86/kernel/genx2apic_phys.c
@@ -182,7 +182,7 @@ struct genapic apic_x2apic_phys = {
.irq_dest_mode = (APIC_DEST_PHYSICAL != 0),
.target_cpus = x2apic_target_cpus,
- .ESR_DISABLE = 0,
+ .disable_esr = 0,
.apic_destination_logical = 0,
.check_apicid_used = NULL,
.check_apicid_present = NULL,
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c
index 6a73cad0d3e9..525b4e480a73 100644
--- a/arch/x86/kernel/genx2apic_uv_x.c
+++ b/arch/x86/kernel/genx2apic_uv_x.c
@@ -247,7 +247,7 @@ struct genapic apic_x2apic_uv_x = {
.irq_dest_mode = (APIC_DEST_PHYSICAL != 0),
.target_cpus = uv_target_cpus,
- .ESR_DISABLE = 0,
+ .disable_esr = 0,
.apic_destination_logical = 0,
.check_apicid_used = NULL,
.check_apicid_present = NULL,
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c
index f0bb72674f73..fe9bf252c069 100644
--- a/arch/x86/mach-generic/bigsmp.c
+++ b/arch/x86/mach-generic/bigsmp.c
@@ -69,7 +69,7 @@ struct genapic apic_bigsmp = {
.irq_dest_mode = 0,
.target_cpus = bigsmp_target_cpus,
- .ESR_DISABLE = 1,
+ .disable_esr = 1,
.apic_destination_logical = APIC_DEST_LOGICAL,
.check_apicid_used = check_apicid_used,
.check_apicid_present = check_apicid_present,
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c
index c30141a9aca0..d3fe8017e94a 100644
--- a/arch/x86/mach-generic/default.c
+++ b/arch/x86/mach-generic/default.c
@@ -36,7 +36,7 @@ struct genapic apic_default = {
.irq_dest_mode = 1,
.target_cpus = default_target_cpus,
- .ESR_DISABLE = 0,
+ .disable_esr = 0,
.apic_destination_logical = APIC_DEST_LOGICAL,
.check_apicid_used = check_apicid_used,
.check_apicid_present = check_apicid_present,
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c
index e8aa8fd4f49f..b4f8abfb714f 100644
--- a/arch/x86/mach-generic/es7000.c
+++ b/arch/x86/mach-generic/es7000.c
@@ -112,7 +112,7 @@ struct genapic apic_es7000 = {
.irq_dest_mode = 0,
.target_cpus = es7000_target_cpus,
- .ESR_DISABLE = 1,
+ .disable_esr = 1,
.apic_destination_logical = APIC_DEST_LOGICAL,
.check_apicid_used = check_apicid_used,
.check_apicid_present = check_apicid_present,
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c
index 860edc8bd903..f3b7840d227d 100644
--- a/arch/x86/mach-generic/numaq.c
+++ b/arch/x86/mach-generic/numaq.c
@@ -56,7 +56,7 @@ struct genapic apic_numaq = {
.irq_dest_mode = 0,
.target_cpus = numaq_target_cpus,
- .ESR_DISABLE = 1,
+ .disable_esr = 1,
.apic_destination_logical = APIC_DEST_LOGICAL,
.check_apicid_used = check_apicid_used,
.check_apicid_present = check_apicid_present,
diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c
index cd5ef115a4ee..95e075b61bdd 100644
--- a/arch/x86/mach-generic/summit.c
+++ b/arch/x86/mach-generic/summit.c
@@ -49,7 +49,7 @@ struct genapic apic_summit = {
.irq_dest_mode = 1,
.target_cpus = summit_target_cpus,
- .ESR_DISABLE = 1,
+ .disable_esr = 1,
.apic_destination_logical = APIC_DEST_LOGICAL,
.check_apicid_used = check_apicid_used,
.check_apicid_present = check_apicid_present,
commit f6f52baf2613dd319e9ba3f3319bf1f1c442e4b3
Author: Ingo Molnar <mingo@elte.hu>
Date: Wed Jan 28 05:01:41 2009 +0100
x86: clean up esr_disable() methods
Impact: cleanup
Most subarchitectures want to disable the APIC ESR (Error Status Register),
because they generally have hardware hacks that wrap standard CPUs into
a bigger system and hence the APIC bus is quite non-standard and weirdnesses
(lockups) have been seen with ESR reporting.
Remove the esr_disable macros and put the desired flag into each
subarchitecture's genapic template directly.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h
index d6aeca3c5a8d..b550cb111028 100644
--- a/arch/x86/include/asm/bigsmp/apic.h
+++ b/arch/x86/include/asm/bigsmp/apic.h
@@ -2,7 +2,6 @@
#define __ASM_MACH_APIC_H
#define xapic_phys_to_log_apicid(cpu) (per_cpu(x86_bios_cpu_apicid, cpu))
-#define esr_disable (1)
static inline int bigsmp_apic_id_registered(void)
{
diff --git a/arch/x86/include/asm/es7000/apic.h b/arch/x86/include/asm/es7000/apic.h
index 53adda099c96..aa11c768bed7 100644
--- a/arch/x86/include/asm/es7000/apic.h
+++ b/arch/x86/include/asm/es7000/apic.h
@@ -4,7 +4,6 @@
#include <linux/gfp.h>
#define xapic_phys_to_log_apicid(cpu) per_cpu(x86_bios_cpu_apicid, cpu)
-#define esr_disable (1)
static inline int es7000_apic_id_registered(void)
{
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h
index 77a972475878..5f8d17fdc965 100644
--- a/arch/x86/include/asm/mach-default/mach_apic.h
+++ b/arch/x86/include/asm/mach-default/mach_apic.h
@@ -18,7 +18,6 @@ static inline const struct cpumask *default_target_cpus(void)
}
#define NO_BALANCE_IRQ (0)
-#define esr_disable (0)
#ifdef CONFIG_X86_64
#include <asm/genapic.h>
diff --git a/arch/x86/include/asm/mach-generic/mach_apic.h b/arch/x86/include/asm/mach-generic/mach_apic.h
index da2d7780cb52..63fe985219f9 100644
--- a/arch/x86/include/asm/mach-generic/mach_apic.h
+++ b/arch/x86/include/asm/mach-generic/mach_apic.h
@@ -3,7 +3,6 @@
#include <asm/genapic.h>
-#define esr_disable (apic->ESR_DISABLE)
#define NO_BALANCE_IRQ (apic->no_balance_irq)
#undef APIC_DEST_LOGICAL
#define APIC_DEST_LOGICAL (apic->apic_destination_logical)
diff --git a/arch/x86/include/asm/numaq/apic.h b/arch/x86/include/asm/numaq/apic.h
index 1111ff9e41de..8ecb3b45c6c4 100644
--- a/arch/x86/include/asm/numaq/apic.h
+++ b/arch/x86/include/asm/numaq/apic.h
@@ -13,7 +13,6 @@ static inline const cpumask_t *numaq_target_cpus(void)
}
#define NO_BALANCE_IRQ (1)
-#define esr_disable (1)
static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
{
diff --git a/arch/x86/include/asm/summit/apic.h b/arch/x86/include/asm/summit/apic.h
index cf5036f1ce6d..84679e687add 100644
--- a/arch/x86/include/asm/summit/apic.h
+++ b/arch/x86/include/asm/summit/apic.h
@@ -4,7 +4,6 @@
#include <asm/smp.h>
#include <linux/gfp.h>
-#define esr_disable (1)
#define NO_BALANCE_IRQ (0)
/* In clustered mode, the high nibble of APIC ID is a cluster number.
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c
index b6740de18fbb..69d8c30d5711 100644
--- a/arch/x86/kernel/apic.c
+++ b/arch/x86/kernel/apic.c
@@ -1107,7 +1107,7 @@ static void __cpuinit lapic_setup_esr(void)
return;
}
- if (esr_disable) {
+ if (apic->ESR_DISABLE) {
/*
* Something untraceable is creating bad interrupts on
* secondary quads ... for the moment, just leave the
@@ -1157,7 +1157,7 @@ void __cpuinit setup_local_APIC(void)
#ifdef CONFIG_X86_32
/* Pound the ESR really hard over the head with a big hammer - mbligh */
- if (lapic_is_integrated() && esr_disable) {
+ if (lapic_is_integrated() && apic->ESR_DISABLE) {
apic_write(APIC_ESR, 0);
apic_write(APIC_ESR, 0);
apic_write(APIC_ESR, 0);
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c
index d3cead2d2fc8..f0bb72674f73 100644
--- a/arch/x86/mach-generic/bigsmp.c
+++ b/arch/x86/mach-generic/bigsmp.c
@@ -69,7 +69,7 @@ struct genapic apic_bigsmp = {
.irq_dest_mode = 0,
.target_cpus = bigsmp_target_cpus,
- .ESR_DISABLE = esr_disable,
+ .ESR_DISABLE = 1,
.apic_destination_logical = APIC_DEST_LOGICAL,
.check_apicid_used = check_apicid_used,
.check_apicid_present = check_apicid_present,
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c
index a483e22273e5..c30141a9aca0 100644
--- a/arch/x86/mach-generic/default.c
+++ b/arch/x86/mach-generic/default.c
@@ -36,7 +36,7 @@ struct genapic apic_default = {
.irq_dest_mode = 1,
.target_cpus = default_target_cpus,
- .ESR_DISABLE = esr_disable,
+ .ESR_DISABLE = 0,
.apic_destination_logical = APIC_DEST_LOGICAL,
.check_apicid_used = check_apicid_used,
.check_apicid_present = check_apicid_present,
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c
index e31f0c35470d..e8aa8fd4f49f 100644
--- a/arch/x86/mach-generic/es7000.c
+++ b/arch/x86/mach-generic/es7000.c
@@ -112,7 +112,7 @@ struct genapic apic_es7000 = {
.irq_dest_mode = 0,
.target_cpus = es7000_target_cpus,
- .ESR_DISABLE = esr_disable,
+ .ESR_DISABLE = 1,
.apic_destination_logical = APIC_DEST_LOGICAL,
.check_apicid_used = check_apicid_used,
.check_apicid_present = check_apicid_present,
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c
index 4b84b5970fbe..860edc8bd903 100644
--- a/arch/x86/mach-generic/numaq.c
+++ b/arch/x86/mach-generic/numaq.c
@@ -56,7 +56,7 @@ struct genapic apic_numaq = {
.irq_dest_mode = 0,
.target_cpus = numaq_target_cpus,
- .ESR_DISABLE = esr_disable,
+ .ESR_DISABLE = 1,
.apic_destination_logical = APIC_DEST_LOGICAL,
.check_apicid_used = check_apicid_used,
.check_apicid_present = check_apicid_present,
diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c
index e6b956a08484..cd5ef115a4ee 100644
--- a/arch/x86/mach-generic/summit.c
+++ b/arch/x86/mach-generic/summit.c
@@ -49,7 +49,7 @@ struct genapic apic_summit = {
.irq_dest_mode = 1,
.target_cpus = summit_target_cpus,
- .ESR_DISABLE = esr_disable,
+ .ESR_DISABLE = 1,
.apic_destination_logical = APIC_DEST_LOGICAL,
.check_apicid_used = check_apicid_used,
.check_apicid_present = check_apicid_present,