aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/io_apic.c18
-rw-r--r--drivers/xen/events.c3
-rw-r--r--fs/proc/stat.c11
-rw-r--r--include/linux/interrupt.h6
-rw-r--r--include/linux/irq.h27
-rw-r--r--include/linux/irqnr.h23
-rw-r--r--init/main.c9
-rw-r--r--kernel/hrtimer.c1
-rw-r--r--kernel/irq/autoprobe.c15
-rw-r--r--kernel/irq/handle.c48
-rw-r--r--kernel/irq/numa_migrate.c7
-rw-r--r--kernel/irq/spurious.c5
-rw-r--r--kernel/softirq.c20
13 files changed, 84 insertions, 109 deletions
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index f6ea94b74da..74917658b00 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
@@ -1345,8 +1349,6 @@ void __setup_vector_irq(int cpu)
1345 1349
1346 /* Mark the inuse vectors */ 1350 /* Mark the inuse vectors */
1347 for_each_irq_desc(irq, desc) { 1351 for_each_irq_desc(irq, desc) {
1348 if (!desc)
1349 continue;
1350 cfg = desc->chip_data; 1352 cfg = desc->chip_data;
1351 if (!cpu_isset(cpu, cfg->domain)) 1353 if (!cpu_isset(cpu, cfg->domain))
1352 continue; 1354 continue;
@@ -1730,8 +1732,6 @@ __apicdebuginit(void) print_IO_APIC(void)
1730 for_each_irq_desc(irq, desc) { 1732 for_each_irq_desc(irq, desc) {
1731 struct irq_pin_list *entry; 1733 struct irq_pin_list *entry;
1732 1734
1733 if (!desc)
1734 continue;
1735 cfg = desc->chip_data; 1735 cfg = desc->chip_data;
1736 entry = cfg->irq_2_pin; 1736 entry = cfg->irq_2_pin;
1737 if (!entry) 1737 if (!entry)
@@ -2378,9 +2378,6 @@ static void ir_irq_migration(struct work_struct *work)
2378 struct irq_desc *desc; 2378 struct irq_desc *desc;
2379 2379
2380 for_each_irq_desc(irq, desc) { 2380 for_each_irq_desc(irq, desc) {
2381 if (!desc)
2382 continue;
2383
2384 if (desc->status & IRQ_MOVE_PENDING) { 2381 if (desc->status & IRQ_MOVE_PENDING) {
2385 unsigned long flags; 2382 unsigned long flags;
2386 2383
@@ -2670,9 +2667,6 @@ static inline void init_IO_APIC_traps(void)
2670 * 0x80, because int 0x80 is hm, kind of importantish. ;) 2667 * 0x80, because int 0x80 is hm, kind of importantish. ;)
2671 */ 2668 */
2672 for_each_irq_desc(irq, desc) { 2669 for_each_irq_desc(irq, desc) {
2673 if (!desc)
2674 continue;
2675
2676 cfg = desc->chip_data; 2670 cfg = desc->chip_data;
2677 if (IO_APIC_IRQ(irq) && cfg && !cfg->vector) { 2671 if (IO_APIC_IRQ(irq) && cfg && !cfg->vector) {
2678 /* 2672 /*
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 46625cd3874..e26733a9df2 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -142,9 +142,6 @@ static void init_evtchn_cpu_bindings(void)
142 142
143 /* By default all event channels notify CPU#0. */ 143 /* By default all event channels notify CPU#0. */
144 for_each_irq_desc(i, desc) { 144 for_each_irq_desc(i, desc) {
145 if (!desc)
146 continue;
147
148 desc->affinity = cpumask_of_cpu(0); 145 desc->affinity = cpumask_of_cpu(0);
149 } 146 }
150#endif 147#endif
diff --git a/fs/proc/stat.c b/fs/proc/stat.c
index 3bb1cf1e742..f75efa22df5 100644
--- a/fs/proc/stat.c
+++ b/fs/proc/stat.c
@@ -9,6 +9,7 @@
9#include <linux/seq_file.h> 9#include <linux/seq_file.h>
10#include <linux/slab.h> 10#include <linux/slab.h>
11#include <linux/time.h> 11#include <linux/time.h>
12#include <linux/irqnr.h>
12#include <asm/cputime.h> 13#include <asm/cputime.h>
13 14
14#ifndef arch_irq_stat_cpu 15#ifndef arch_irq_stat_cpu
@@ -45,10 +46,6 @@ static int show_stat(struct seq_file *p, void *v)
45 steal = cputime64_add(steal, kstat_cpu(i).cpustat.steal); 46 steal = cputime64_add(steal, kstat_cpu(i).cpustat.steal);
46 guest = cputime64_add(guest, kstat_cpu(i).cpustat.guest); 47 guest = cputime64_add(guest, kstat_cpu(i).cpustat.guest);
47 for_each_irq_nr(j) { 48 for_each_irq_nr(j) {
48#ifdef CONFIG_SPARSE_IRQ
49 if (!irq_to_desc(j))
50 continue;
51#endif
52 sum += kstat_irqs_cpu(j, i); 49 sum += kstat_irqs_cpu(j, i);
53 } 50 }
54 sum += arch_irq_stat_cpu(i); 51 sum += arch_irq_stat_cpu(i);
@@ -95,12 +92,6 @@ static int show_stat(struct seq_file *p, void *v)
95 /* sum again ? it could be updated? */ 92 /* sum again ? it could be updated? */
96 for_each_irq_nr(j) { 93 for_each_irq_nr(j) {
97 per_irq_sum = 0; 94 per_irq_sum = 0;
98#ifdef CONFIG_SPARSE_IRQ
99 if (!irq_to_desc(j)) {
100 seq_printf(p, " %u", per_irq_sum);
101 continue;
102 }
103#endif
104 for_each_possible_cpu(i) 95 for_each_possible_cpu(i)
105 per_irq_sum += kstat_irqs_cpu(j, i); 96 per_irq_sum += kstat_irqs_cpu(j, i);
106 97
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index be3c484b524..8cc8ef47f5b 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -464,4 +464,10 @@ static inline void init_irq_proc(void)
464 464
465int show_interrupts(struct seq_file *p, void *v); 465int show_interrupts(struct seq_file *p, void *v);
466 466
467struct irq_desc;
468
469extern int early_irq_init(void);
470extern int arch_early_irq_init(void);
471extern int arch_init_chip_data(struct irq_desc *desc, int cpu);
472
467#endif 473#endif
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 98564dc6447..d64a6d49bde 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -193,42 +193,23 @@ struct irq_desc {
193 const char *name; 193 const char *name;
194} ____cacheline_internodealigned_in_smp; 194} ____cacheline_internodealigned_in_smp;
195 195
196extern void early_irq_init(void);
197extern void arch_early_irq_init(void);
198extern void arch_init_chip_data(struct irq_desc *desc, int cpu);
199extern void arch_init_copy_chip_data(struct irq_desc *old_desc, 196extern void arch_init_copy_chip_data(struct irq_desc *old_desc,
200 struct irq_desc *desc, int cpu); 197 struct irq_desc *desc, int cpu);
201extern void arch_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc); 198extern void arch_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc);
202 199
203#ifndef CONFIG_SPARSE_IRQ 200#ifndef CONFIG_SPARSE_IRQ
204extern struct irq_desc irq_desc[NR_IRQS]; 201extern struct irq_desc irq_desc[NR_IRQS];
205 202#else /* CONFIG_SPARSE_IRQ */
206static inline struct irq_desc *irq_to_desc(unsigned int irq)
207{
208 return (irq < NR_IRQS) ? irq_desc + irq : NULL;
209}
210static inline struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu)
211{
212 return irq_to_desc(irq);
213}
214
215#else
216
217extern struct irq_desc *irq_to_desc(unsigned int irq);