aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/io_apic.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2008-12-26 05:05:47 -0500
committerIngo Molnar <mingo@elte.hu>2008-12-27 07:24:00 -0500
commit13a0c3c269b223f60abfac8a9811d77111a8b4ba (patch)
treeb57a92eb9eb7c8c1de30bbe29b6a461289e75c62 /arch/x86/kernel/io_apic.c
parent793f7b12a0c95e7bfec1badf9628043fb78fd440 (diff)
sparseirq: work around compiler optimizing away __weak functions
Impact: fix panic on null pointer with sparseirq Some GCC versions seem to inline the weak global function, when that function is empty. Work it around, by making the functions return a (dummy) integer. Signed-off-by: Yinghai <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/io_apic.c')
-rw-r--r--arch/x86/kernel/io_apic.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index 2fe543f58ac8..976039377846 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -170,7 +170,7 @@ static struct irq_cfg irq_cfgx[NR_IRQS] = {
170 [15] = { .domain = CPU_MASK_ALL, .vector = IRQ15_VECTOR, }, 170 [15] = { .domain = CPU_MASK_ALL, .vector = IRQ15_VECTOR, },
171}; 171};
172 172
173void __init arch_early_irq_init(void) 173int __init arch_early_irq_init(void)
174{ 174{
175 struct irq_cfg *cfg; 175 struct irq_cfg *cfg;
176 struct irq_desc *desc; 176 struct irq_desc *desc;
@@ -184,6 +184,8 @@ void __init arch_early_irq_init(void)
184 desc = irq_to_desc(i); 184 desc = irq_to_desc(i);
185 desc->chip_data = &cfg[i]; 185 desc->chip_data = &cfg[i];
186 } 186 }
187
188 return 0;
187} 189}
188 190
189#ifdef CONFIG_SPARSE_IRQ 191#ifdef CONFIG_SPARSE_IRQ
@@ -212,7 +214,7 @@ static struct irq_cfg *get_one_free_irq_cfg(int cpu)
212 return cfg; 214 return cfg;
213} 215}
214 216
215void arch_init_chip_data(struct irq_desc *desc, int cpu) 217int arch_init_chip_data(struct irq_desc *desc, int cpu)
216{ 218{
217 struct irq_cfg *cfg; 219 struct irq_cfg *cfg;
218 220
@@ -224,6 +226,8 @@ void arch_init_chip_data(struct irq_desc *desc, int cpu)
224 BUG_ON(1); 226 BUG_ON(1);
225 } 227 }
226 } 228 }
229
230 return 0;
227} 231}
228 232
229#ifdef CONFIG_NUMA_MIGRATE_IRQ_DESC 233#ifdef CONFIG_NUMA_MIGRATE_IRQ_DESC