Skip to content

Commit d1bef4e

Browse files
Ingo MolnarLinus Torvalds
authored andcommitted
[PATCH] genirq: rename desc->handler to desc->chip
This patch-queue improves the generic IRQ layer to be truly generic, by adding various abstractions and features to it, without impacting existing functionality. While the queue can be best described as "fix and improve everything in the generic IRQ layer that we could think of", and thus it consists of many smaller features and lots of cleanups, the one feature that stands out most is the new 'irq chip' abstraction. The irq-chip abstraction is about describing and coding and IRQ controller driver by mapping its raw hardware capabilities [and quirks, if needed] in a straightforward way, without having to think about "IRQ flow" (level/edge/etc.) type of details. This stands in contrast with the current 'irq-type' model of genirq architectures, which 'mixes' raw hardware capabilities with 'flow' details. The patchset supports both types of irq controller designs at once, and converts i386 and x86_64 to the new irq-chip design. As a bonus side-effect of the irq-chip approach, chained interrupt controllers (master/slave PIC constructs, etc.) are now supported by design as well. The end result of this patchset intends to be simpler architecture-level code and more consolidation between architectures. We reused many bits of code and many concepts from Russell King's ARM IRQ layer, the merging of which was one of the motivations for this patchset. This patch: rename desc->handler to desc->chip. Originally i did not want to do this, because it's a big patch. But having both "desc->handler", "desc->handle_irq" and "action->handler" caused a large degree of confusion and made the code appear alot less clean than it truly is. I have also attempted a dual approach as well by introducing a desc->chip alias - but that just wasnt robust enough and broke frequently. So lets get over with this quickly. The conversion was done automatically via scripts and converts all the code in the kernel. This renaming patch is the first one amongst the patches, so that the remaining patches can stay flexible and can be merged and split up without having some big monolithic patch act as a merge barrier. [akpm@osdl.org: build fix] [akpm@osdl.org: another build fix] Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent cfb9e32 commit d1bef4e

151 files changed

Lines changed: 384 additions & 380 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/alpha/kernel/irq.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ select_smp_affinity(unsigned int irq)
4949
static int last_cpu;
5050
int cpu = last_cpu + 1;
5151

52-
if (!irq_desc[irq].handler->set_affinity || irq_user_affinity[irq])
52+
if (!irq_desc[irq].chip->set_affinity || irq_user_affinity[irq])
5353
return 1;
5454

5555
while (!cpu_possible(cpu))
5656
cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0);
5757
last_cpu = cpu;
5858

5959
irq_affinity[irq] = cpumask_of_cpu(cpu);
60-
irq_desc[irq].handler->set_affinity(irq, cpumask_of_cpu(cpu));
60+
irq_desc[irq].chip->set_affinity(irq, cpumask_of_cpu(cpu));
6161
return 0;
6262
}
6363
#endif /* CONFIG_SMP */
@@ -93,7 +93,7 @@ show_interrupts(struct seq_file *p, void *v)
9393
for_each_online_cpu(j)
9494
seq_printf(p, "%10u ", kstat_cpu(j).irqs[irq]);
9595
#endif
96-
seq_printf(p, " %14s", irq_desc[irq].handler->typename);
96+
seq_printf(p, " %14s", irq_desc[irq].chip->typename);
9797
seq_printf(p, " %c%s",
9898
(action->flags & SA_INTERRUPT)?'+':' ',
9999
action->name);

‎arch/alpha/kernel/irq_alpha.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ void __init
233233
init_rtc_irq(void)
234234
{
235235
irq_desc[RTC_IRQ].status = IRQ_DISABLED;
236-
irq_desc[RTC_IRQ].handler = &rtc_irq_type;
236+
irq_desc[RTC_IRQ].chip = &rtc_irq_type;
237237
setup_irq(RTC_IRQ, &timer_irqaction);
238238
}
239239

‎arch/alpha/kernel/irq_i8259.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ init_i8259a_irqs(void)
109109

110110
for (i = 0; i < 16; i++) {
111111
irq_desc[i].status = IRQ_DISABLED;
112-
irq_desc[i].handler = &i8259a_irq_type;
112+
irq_desc[i].chip = &i8259a_irq_type;
113113
}
114114

115115
setup_irq(2, &cascade);

‎arch/alpha/kernel/irq_pyxis.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ init_pyxis_irqs(unsigned long ignore_mask)
120120
if ((ignore_mask >> i) & 1)
121121
continue;
122122
irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
123-
irq_desc[i].handler = &pyxis_irq_type;
123+
irq_desc[i].chip = &pyxis_irq_type;
124124
}
125125

126126
setup_irq(16+7, &isa_cascade_irqaction);

‎arch/alpha/kernel/irq_srm.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ init_srm_irqs(long max, unsigned long ignore_mask)
6767
if (i < 64 && ((ignore_mask >> i) & 1))
6868
continue;
6969
irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
70-
irq_desc[i].handler = &srm_irq_type;
70+
irq_desc[i].chip = &srm_irq_type;
7171
}
7272
}
7373

‎arch/alpha/kernel/sys_alcor.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ alcor_init_irq(void)
144144
if (i >= 16+20 && i <= 16+30)
145145
continue;
146146
irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
147-
irq_desc[i].handler = &alcor_irq_type;
147+
irq_desc[i].chip = &alcor_irq_type;
148148
}
149149
i8259a_irq_type.ack = alcor_isa_mask_and_ack_irq;
150150

‎arch/alpha/kernel/sys_cabriolet.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ common_init_irq(void (*srm_dev_int)(unsigned long v, struct pt_regs *r))
124124

125125
for (i = 16; i < 35; ++i) {
126126
irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
127-
irq_desc[i].handler = &cabriolet_irq_type;
127+
irq_desc[i].chip = &cabriolet_irq_type;
128128
}
129129
}
130130

‎arch/alpha/kernel/sys_dp264.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ init_tsunami_irqs(struct hw_interrupt_type * ops, int imin, int imax)
300300
long i;
301301
for (i = imin; i <= imax; ++i) {
302302
irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
303-
irq_desc[i].handler = ops;
303+
irq_desc[i].chip = ops;
304304
}
305305
}
306306

‎arch/alpha/kernel/sys_eb64p.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ eb64p_init_irq(void)
137137

138138
for (i = 16; i < 32; ++i) {
139139
irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
140-
irq_desc[i].handler = &eb64p_irq_type;
140+
irq_desc[i].chip = &eb64p_irq_type;
141141
}
142142

143143
common_init_isa_dma();

‎arch/alpha/kernel/sys_eiger.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ eiger_init_irq(void)
154154

155155
for (i = 16; i < 128; ++i) {
156156
irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
157-
irq_desc[i].handler = &eiger_irq_type;
157+
irq_desc[i].chip = &eiger_irq_type;
158158
}
159159
}
160160

0 commit comments

Comments
 (0)