aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-28 01:17:26 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-28 17:20:22 -0500
commit33a201fac698a93d9d1ffa77030ba2ff38d1a3d1 (patch)
treec1087d996f5d83f987e83380f27aa73c7aaa0871 /arch
parent72ce016583916fb7ffcbaa6a3e1f8f731b79a865 (diff)
x86, apic: streamline the ->multi_timer_check() quirk
only NUMAQ uses this quirk: to prevent the timer IRQ from being added on secondary nodes. All other genapic templates can have a NULL ->multi_timer_check() callback. Also, extend the generic code to treat a NULL pointer accordingly. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/include/asm/bigsmp/apic.h5
-rw-r--r--arch/x86/include/asm/es7000/apic.h5
-rw-r--r--arch/x86/include/asm/mach-default/mach_apic.h5
-rw-r--r--arch/x86/include/asm/mach-generic/mach_apic.h1
-rw-r--r--arch/x86/include/asm/numaq/apic.h2
-rw-r--r--arch/x86/include/asm/summit/apic.h5
-rw-r--r--arch/x86/kernel/io_apic.c11
-rw-r--r--arch/x86/mach-generic/bigsmp.c2
-rw-r--r--arch/x86/mach-generic/default.c2
-rw-r--r--arch/x86/mach-generic/es7000.c2
-rw-r--r--arch/x86/mach-generic/numaq.c2
-rw-r--r--arch/x86/mach-generic/summit.c2
12 files changed, 14 insertions, 30 deletions
diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h
index 321ea47b5dd1..df59298086c6 100644
--- a/arch/x86/include/asm/bigsmp/apic.h
+++ b/arch/x86/include/asm/bigsmp/apic.h
@@ -62,11 +62,6 @@ static inline void bigsmp_setup_apic_routing(void)
62 "Physflat", nr_ioapics); 62 "Physflat", nr_ioapics);
63} 63}
64 64
65static inline int multi_timer_check(int apic, int irq)
66{
67 return (0);
68}
69
70static inline int apicid_to_node(int logical_apicid) 65static inline int apicid_to_node(int logical_apicid)
71{ 66{
72 return apicid_2_node[hard_smp_processor_id()]; 67 return apicid_2_node[hard_smp_processor_id()];
diff --git a/arch/x86/include/asm/es7000/apic.h b/arch/x86/include/asm/es7000/apic.h
index f1183000a940..632e4cd3f4fd 100644
--- a/arch/x86/include/asm/es7000/apic.h
+++ b/arch/x86/include/asm/es7000/apic.h
@@ -82,11 +82,6 @@ static inline void es7000_setup_apic_routing(void)
82 nr_ioapics, cpus_addr(*es7000_target_cpus())[0]); 82 nr_ioapics, cpus_addr(*es7000_target_cpus())[0]);
83} 83}
84 84
85static inline int multi_timer_check(int apic, int irq)
86{
87 return 0;
88}
89
90static inline int apicid_to_node(int logical_apicid) 85static inline int apicid_to_node(int logical_apicid)
91{ 86{
92 return 0; 87 return 0;
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h
index d44677463046..f418d470cf45 100644
--- a/arch/x86/include/asm/mach-default/mach_apic.h
+++ b/arch/x86/include/asm/mach-default/mach_apic.h
@@ -104,11 +104,6 @@ static inline physid_mask_t default_ioapic_phys_id_map(physid_mask_t phys_map)
104 return phys_map; 104 return phys_map;
105} 105}
106 106
107static inline int multi_timer_check(int apic, int irq)
108{
109 return 0;
110}
111
112/* Mapping from cpu number to logical apicid */ 107/* Mapping from cpu number to logical apicid */
113static inline int cpu_to_logical_apicid(int cpu) 108static inline int cpu_to_logical_apicid(int cpu)
114{ 109{
diff --git a/arch/x86/include/asm/mach-generic/mach_apic.h b/arch/x86/include/asm/mach-generic/mach_apic.h
index ddf369248ab7..bdea0a759e8a 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 @@
3 3
4#include <asm/genapic.h> 4#include <asm/genapic.h>
5 5
6#define multi_timer_check (apic->multi_timer_check)
7#define apicid_to_node (apic->apicid_to_node) 6#define apicid_to_node (apic->apicid_to_node)
8#define cpu_to_logical_apicid (apic->cpu_to_logical_apicid) 7#define cpu_to_logical_apicid (apic->cpu_to_logical_apicid)
9#define cpu_present_to_apicid (apic->cpu_present_to_apicid) 8#define cpu_present_to_apicid (apic->cpu_present_to_apicid)
diff --git a/arch/x86/include/asm/numaq/apic.h b/arch/x86/include/asm/numaq/apic.h
index 2feb7e72e9ea..22bdf3d4c0e3 100644
--- a/arch/x86/include/asm/numaq/apic.h
+++ b/arch/x86/include/asm/numaq/apic.h
@@ -43,7 +43,7 @@ static inline void numaq_setup_apic_routing(void)
43 * Skip adding the timer int on secondary nodes, which causes 43 * Skip adding the timer int on secondary nodes, which causes
44 * a small but painful rift in the time-space continuum. 44 * a small but painful rift in the time-space continuum.
45 */ 45 */
46static inline int multi_timer_check(int apic, int irq) 46static inline int numaq_multi_timer_check(int apic, int irq)
47{ 47{
48 return apic != 0 && irq == 0; 48 return apic != 0 && irq == 0;
49} 49}
diff --git a/arch/x86/include/asm/summit/apic.h b/arch/x86/include/asm/summit/apic.h
index 7ec2696bc9a0..acb7bd1de848 100644
--- a/arch/x86/include/asm/summit/apic.h
+++ b/arch/x86/include/asm/summit/apic.h
@@ -64,11 +64,6 @@ static inline void summit_init_apic_ldr(void)
64 apic_write(APIC_LDR, val); 64 apic_write(APIC_LDR, val);
65} 65}
66 66
67static inline int multi_timer_check(int apic, int irq)
68{
69 return 0;
70}
71
72static inline int summit_apic_id_registered(void) 67static inline int summit_apic_id_registered(void)
73{ 68{
74 return 1; 69 return 1;
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index db79ad9a7646..282ea112f3cf 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -1618,10 +1618,15 @@ static void __init setup_IO_APIC_irqs(void)
1618 } 1618 }
1619 1619
1620 irq = pin_2_irq(idx, apic_id, pin); 1620 irq = pin_2_irq(idx, apic_id, pin);
1621#ifdef CONFIG_X86_32 1621
1622 if (multi_timer_check(apic_id, irq)) 1622 /*
1623 * Skip the timer IRQ if there's a quirk handler
1624 * installed and if it returns 1:
1625 */
1626 if (apic->multi_timer_check &&
1627 apic->multi_timer_check(apic_id, irq))
1623 continue; 1628 continue;
1624#endif 1629
1625 desc = irq_to_desc_alloc_cpu(irq, cpu); 1630 desc = irq_to_desc_alloc_cpu(irq, cpu);
1626 if (!desc) { 1631 if (!desc) {
1627 printk(KERN_INFO "can not get irq_desc for %d\n", irq); 1632 printk(KERN_INFO "can not get irq_desc for %d\n", irq);
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c
index ad3837a59bd4..d0749569cdf7 100644
--- a/arch/x86/mach-generic/bigsmp.c
+++ b/arch/x86/mach-generic/bigsmp.c
@@ -79,7 +79,7 @@ struct genapic apic_bigsmp = {
79 79
80 .ioapic_phys_id_map = bigsmp_ioapic_phys_id_map, 80 .ioapic_phys_id_map = bigsmp_ioapic_phys_id_map,
81 .setup_apic_routing = bigsmp_setup_apic_routing, 81 .setup_apic_routing = bigsmp_setup_apic_routing,
82 .multi_timer_check = multi_timer_check, 82 .multi_timer_check = NULL,
83 .apicid_to_node = apicid_to_node, 83 .apicid_to_node = apicid_to_node,
84 .cpu_to_logical_apicid = cpu_to_logical_apicid, 84 .cpu_to_logical_apicid = cpu_to_logical_apicid,
85 .cpu_present_to_apicid = cpu_present_to_apicid, 85 .cpu_present_to_apicid = cpu_present_to_apicid,
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c
index 67f287fc12df..6a21aa7c0c6d 100644
--- a/arch/x86/mach-generic/default.c
+++ b/arch/x86/mach-generic/default.c
@@ -60,7 +60,7 @@ struct genapic apic_default = {
60 60
61 .ioapic_phys_id_map = default_ioapic_phys_id_map, 61 .ioapic_phys_id_map = default_ioapic_phys_id_map,
62 .setup_apic_routing = default_setup_apic_routing, 62 .setup_apic_routing = default_setup_apic_routing,
63 .multi_timer_check = multi_timer_check, 63 .multi_timer_check = NULL,
64 .apicid_to_node = apicid_to_node, 64 .apicid_to_node = apicid_to_node,
65 .cpu_to_logical_apicid = cpu_to_logical_apicid, 65 .cpu_to_logical_apicid = cpu_to_logical_apicid,
66 .cpu_present_to_apicid = cpu_present_to_apicid, 66 .cpu_present_to_apicid = cpu_present_to_apicid,
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c
index f61172939461..0be59a51df2f 100644
--- a/arch/x86/mach-generic/es7000.c
+++ b/arch/x86/mach-generic/es7000.c
@@ -121,7 +121,7 @@ struct genapic apic_es7000 = {
121 121
122 .ioapic_phys_id_map = es7000_ioapic_phys_id_map, 122 .ioapic_phys_id_map = es7000_ioapic_phys_id_map,
123 .setup_apic_routing = es7000_setup_apic_routing, 123 .setup_apic_routing = es7000_setup_apic_routing,
124 .multi_timer_check = multi_timer_check, 124 .multi_timer_check = NULL,
125 .apicid_to_node = apicid_to_node, 125 .apicid_to_node = apicid_to_node,
126 .cpu_to_logical_apicid = cpu_to_logical_apicid, 126 .cpu_to_logical_apicid = cpu_to_logical_apicid,
127 .cpu_present_to_apicid = cpu_present_to_apicid, 127 .cpu_present_to_apicid = cpu_present_to_apicid,
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c
index 8c137f413485..da4ed653506a 100644
--- a/arch/x86/mach-generic/numaq.c
+++ b/arch/x86/mach-generic/numaq.c
@@ -66,7 +66,7 @@ struct genapic apic_numaq = {
66 66
67 .ioapic_phys_id_map = numaq_ioapic_phys_id_map, 67 .ioapic_phys_id_map = numaq_ioapic_phys_id_map,
68 .setup_apic_routing = numaq_setup_apic_routing, 68 .setup_apic_routing = numaq_setup_apic_routing,
69 .multi_timer_check = multi_timer_check, 69 .multi_timer_check = numaq_multi_timer_check,
70 .apicid_to_node = apicid_to_node, 70 .apicid_to_node = apicid_to_node,
71 .cpu_to_logical_apicid = cpu_to_logical_apicid, 71 .cpu_to_logical_apicid = cpu_to_logical_apicid,
72 .cpu_present_to_apicid = cpu_present_to_apicid, 72 .cpu_present_to_apicid = cpu_present_to_apicid,
diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c
index 0698566dc7b4..b618a186f1e2 100644
--- a/arch/x86/mach-generic/summit.c
+++ b/arch/x86/mach-generic/summit.c
@@ -59,7 +59,7 @@ struct genapic apic_summit = {
59 59
60 .ioapic_phys_id_map = summit_ioapic_phys_id_map, 60 .ioapic_phys_id_map = summit_ioapic_phys_id_map,
61 .setup_apic_routing = summit_setup_apic_routing, 61 .setup_apic_routing = summit_setup_apic_routing,
62 .multi_timer_check = multi_timer_check, 62 .multi_timer_check = NULL,
63 .apicid_to_node = apicid_to_node, 63 .apicid_to_node = apicid_to_node,
64 .cpu_to_logical_apicid = cpu_to_logical_apicid, 64 .cpu_to_logical_apicid = cpu_to_logical_apicid,
65 .cpu_present_to_apicid = cpu_present_to_apicid, 65 .cpu_present_to_apicid = cpu_present_to_apicid,