Permalink
Browse files

[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>
  • Loading branch information...
Ingo Molnar Linus Torvalds
Ingo Molnar authored and Linus Torvalds committed Jun 29, 2006
1 parent cfb9e32 commit d1bef4ed5faf7d9872337b33c4269e45ae1bf960
Showing with 384 additions and 380 deletions.
  1. +3 −3 arch/alpha/kernel/irq.c
  2. +1 −1 arch/alpha/kernel/irq_alpha.c
  3. +1 −1 arch/alpha/kernel/irq_i8259.c
  4. +1 −1 arch/alpha/kernel/irq_pyxis.c
  5. +1 −1 arch/alpha/kernel/irq_srm.c
  6. +1 −1 arch/alpha/kernel/sys_alcor.c
  7. +1 −1 arch/alpha/kernel/sys_cabriolet.c
  8. +1 −1 arch/alpha/kernel/sys_dp264.c
  9. +1 −1 arch/alpha/kernel/sys_eb64p.c
  10. +1 −1 arch/alpha/kernel/sys_eiger.c
  11. +5 −5 arch/alpha/kernel/sys_jensen.c
  12. +3 −3 arch/alpha/kernel/sys_marvel.c
  13. +1 −1 arch/alpha/kernel/sys_mikasa.c
  14. +1 −1 arch/alpha/kernel/sys_noritake.c
  15. +1 −1 arch/alpha/kernel/sys_rawhide.c
  16. +1 −1 arch/alpha/kernel/sys_rx164.c
  17. +1 −1 arch/alpha/kernel/sys_sable.c
  18. +1 −1 arch/alpha/kernel/sys_takara.c
  19. +1 −1 arch/alpha/kernel/sys_titan.c
  20. +3 −3 arch/alpha/kernel/sys_wildfire.c
  21. +1 −1 arch/cris/arch-v10/kernel/irq.c
  22. +1 −1 arch/cris/arch-v32/kernel/irq.c
  23. +1 −1 arch/cris/kernel/irq.c
  24. +3 −3 arch/i386/kernel/i8259.c
  25. +9 −7 arch/i386/kernel/io_apic.c
  26. +3 −3 arch/i386/kernel/irq.c
  27. +6 −6 arch/i386/mach-visws/visws_apic.c
  28. +1 −1 arch/i386/mach-voyager/voyager_smp.c
  29. +5 −5 arch/ia64/kernel/iosapic.c
  30. +9 −9 arch/ia64/kernel/irq.c
  31. +1 −1 arch/ia64/kernel/irq_ia64.c
  32. +3 −3 arch/ia64/kernel/smpboot.c
  33. +2 −2 arch/ia64/sn/kernel/irq.c
  34. +1 −1 arch/m32r/kernel/irq.c
  35. +4 −4 arch/m32r/kernel/setup_m32104ut.c
  36. +14 −14 arch/m32r/kernel/setup_m32700ut.c
  37. +8 −8 arch/m32r/kernel/setup_mappi.c
  38. +10 −10 arch/m32r/kernel/setup_mappi2.c
  39. +10 −10 arch/m32r/kernel/setup_mappi3.c
  40. +6 −6 arch/m32r/kernel/setup_oaks32r.c
  41. +14 −14 arch/m32r/kernel/setup_opsput.c
  42. +9 −9 arch/m32r/kernel/setup_usrv.c
  43. +10 −10 arch/mips/au1000/common/irq.c
  44. +1 −1 arch/mips/au1000/pb1200/irqmap.c
  45. +1 −1 arch/mips/ddb5xxx/ddb5477/irq_5477.c
  46. +2 −2 arch/mips/dec/ioasic-irq.c
  47. +1 −1 arch/mips/dec/kn02-irq.c
  48. +1 −1 arch/mips/gt64120/ev64120/irq.c
  49. +2 −2 arch/mips/ite-boards/generic/irq.c
  50. +1 −1 arch/mips/jazz/irq.c
  51. +1 −1 arch/mips/jmr3927/rbhma3100/irq.c
  52. +2 −2 arch/mips/kernel/i8259.c
  53. +2 −2 arch/mips/kernel/irq-msc01.c
  54. +1 −1 arch/mips/kernel/irq-mv6434x.c
  55. +1 −1 arch/mips/kernel/irq-rm7000.c
  56. +2 −2 arch/mips/kernel/irq-rm9000.c
  57. +2 −2 arch/mips/kernel/irq.c
  58. +2 −2 arch/mips/kernel/irq_cpu.c
  59. +1 −1 arch/mips/lasat/interrupt.c
  60. +1 −1 arch/mips/mips-boards/atlas/atlas_int.c
  61. +1 −1 arch/mips/momentum/ocelot_c/cpci-irq.c
  62. +2 −2 arch/mips/momentum/ocelot_c/uart-irq.c
  63. +5 −5 arch/mips/philips/pnx8550/common/int.c
  64. +2 −2 arch/mips/sgi-ip22/ip22-eisa.c
  65. +1 −1 arch/mips/sgi-ip22/ip22-int.c
  66. +1 −1 arch/mips/sgi-ip27/ip27-irq.c
  67. +1 −1 arch/mips/sgi-ip32/ip32-irq.c
  68. +2 −2 arch/mips/sibyte/bcm1480/irq.c
  69. +2 −2 arch/mips/sibyte/sb1250/irq.c
  70. +1 −1 arch/mips/sni/irq.c
  71. +2 −2 arch/mips/tx4927/common/tx4927_irq.c
  72. +7 −7 arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
  73. +2 −2 arch/mips/tx4938/common/irq.c
  74. +1 −1 arch/mips/tx4938/toshiba_rbtx4938/irq.c
  75. +2 −2 arch/mips/vr41xx/common/icu.c
  76. +2 −2 arch/mips/vr41xx/common/irq.c
  77. +1 −1 arch/mips/vr41xx/common/vrc4173.c
  78. +1 −1 arch/mips/vr41xx/nec-cmbvr4133/irq.c
  79. +5 −5 arch/parisc/kernel/irq.c
  80. +2 −2 arch/powerpc/kernel/crash.c
  81. +4 −4 arch/powerpc/kernel/irq.c
  82. +2 −2 arch/powerpc/platforms/cell/interrupt.c
  83. +2 −2 arch/powerpc/platforms/cell/spider-pic.c
  84. +3 −3 arch/powerpc/platforms/iseries/irq.c
  85. +2 −2 arch/powerpc/platforms/powermac/pic.c
  86. +4 −4 arch/powerpc/platforms/pseries/xics.c
  87. +1 −1 arch/powerpc/sysdev/i8259.c
  88. +1 −1 arch/powerpc/sysdev/ipic.c
  89. +4 −4 arch/powerpc/sysdev/mpic.c
  90. +1 −1 arch/ppc/8xx_io/commproc.c
  91. +2 −2 arch/ppc/platforms/apus_setup.c
  92. +1 −1 arch/ppc/platforms/sbc82xx.c
  93. +2 −2 arch/ppc/syslib/cpc700_pic.c
  94. +1 −1 arch/ppc/syslib/cpm2_pic.c
  95. +1 −1 arch/ppc/syslib/gt64260_pic.c
  96. +1 −1 arch/ppc/syslib/m82xx_pci.c
  97. +2 −2 arch/ppc/syslib/m8xx_setup.c
  98. +2 −2 arch/ppc/syslib/mpc52xx_pic.c
  99. +1 −1 arch/ppc/syslib/mv64360_pic.c
  100. +2 −2 arch/ppc/syslib/open_pic.c
  101. +1 −1 arch/ppc/syslib/open_pic2.c
  102. +1 −1 arch/ppc/syslib/ppc403_pic.c
  103. +1 −1 arch/ppc/syslib/ppc4xx_pic.c
  104. +1 −1 arch/ppc/syslib/xilinx_pic.c
  105. +1 −1 arch/sh/boards/adx/irq_maskreg.c
  106. +2 −2 arch/sh/boards/bigsur/irq.c
  107. +2 −2 arch/sh/boards/cqreek/irq.c
  108. +1 −1 arch/sh/boards/dreamcast/setup.c
  109. +1 −1 arch/sh/boards/ec3104/setup.c
  110. +1 −1 arch/sh/boards/harp/irq.c
  111. +1 −1 arch/sh/boards/mpc1211/setup.c
  112. +1 −1 arch/sh/boards/overdrive/irq.c
  113. +1 −1 arch/sh/boards/renesas/hs7751rvoip/irq.c
  114. +1 −1 arch/sh/boards/renesas/rts7751r2d/irq.c
  115. +1 −1 arch/sh/boards/renesas/systemh/irq.c
  116. +1 −1 arch/sh/boards/se/73180/irq.c
  117. +1 −1 arch/sh/boards/superh/microdev/irq.c
  118. +1 −1 arch/sh/cchips/hd6446x/hd64461/setup.c
  119. +1 −1 arch/sh/cchips/hd6446x/hd64465/setup.c
  120. +1 −1 arch/sh/cchips/voyagergx/irq.c
  121. +1 −1 arch/sh/kernel/cpu/irq/imask.c
  122. +1 −1 arch/sh/kernel/cpu/irq/intc2.c
  123. +1 −1 arch/sh/kernel/cpu/irq/ipr.c
  124. +1 −1 arch/sh/kernel/cpu/irq/pint.c
  125. +1 −1 arch/sh/kernel/irq.c
  126. +1 −1 arch/sh64/kernel/irq.c
  127. +2 −2 arch/sh64/kernel/irq_intc.c
  128. +1 −1 arch/sh64/mach-cayman/irq.c
  129. +5 −5 arch/sparc64/kernel/irq.c
  130. +3 −3 arch/um/kernel/irq.c
  131. +3 −3 arch/v850/kernel/irq.c
  132. +3 −3 arch/x86_64/kernel/i8259.c
  133. +9 −7 arch/x86_64/kernel/io_apic.c
  134. +3 −3 arch/x86_64/kernel/irq.c
  135. +2 −2 arch/xtensa/kernel/irq.c
  136. +2 −2 drivers/char/vr41xx_giu.c
  137. +2 −2 drivers/parisc/dino.c
  138. +1 −1 drivers/parisc/eisa.c
  139. +4 −4 drivers/parisc/gsc.c
  140. +1 −1 drivers/parisc/iosapic.c
  141. +1 −1 drivers/parisc/superio.c
  142. +3 −3 drivers/pci/msi.c
  143. +3 −3 drivers/pcmcia/hd64465_ss.c
  144. +6 −6 include/asm-powerpc/hw_irq.h
  145. +2 −2 include/linux/irq.h
  146. +5 −5 kernel/irq/autoprobe.c
  147. +7 −7 kernel/irq/handle.c
  148. +12 −12 kernel/irq/manage.c
  149. +4 −4 kernel/irq/migration.c
  150. +3 −3 kernel/irq/proc.c
  151. +2 −2 kernel/irq/spurious.c
@@ -49,15 +49,15 @@ select_smp_affinity(unsigned int irq)
static int last_cpu;
int cpu = last_cpu + 1;
if (!irq_desc[irq].handler->set_affinity || irq_user_affinity[irq])
if (!irq_desc[irq].chip->set_affinity || irq_user_affinity[irq])
return 1;
while (!cpu_possible(cpu))
cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0);
last_cpu = cpu;
irq_affinity[irq] = cpumask_of_cpu(cpu);
irq_desc[irq].handler->set_affinity(irq, cpumask_of_cpu(cpu));
irq_desc[irq].chip->set_affinity(irq, cpumask_of_cpu(cpu));
return 0;
}
#endif /* CONFIG_SMP */
@@ -93,7 +93,7 @@ show_interrupts(struct seq_file *p, void *v)
for_each_online_cpu(j)
seq_printf(p, "%10u ", kstat_cpu(j).irqs[irq]);
#endif
seq_printf(p, " %14s", irq_desc[irq].handler->typename);
seq_printf(p, " %14s", irq_desc[irq].chip->typename);
seq_printf(p, " %c%s",
(action->flags & SA_INTERRUPT)?'+':' ',
action->name);
@@ -233,7 +233,7 @@ void __init
init_rtc_irq(void)
{
irq_desc[RTC_IRQ].status = IRQ_DISABLED;
irq_desc[RTC_IRQ].handler = &rtc_irq_type;
irq_desc[RTC_IRQ].chip = &rtc_irq_type;
setup_irq(RTC_IRQ, &timer_irqaction);
}
@@ -109,7 +109,7 @@ init_i8259a_irqs(void)
for (i = 0; i < 16; i++) {
irq_desc[i].status = IRQ_DISABLED;
irq_desc[i].handler = &i8259a_irq_type;
irq_desc[i].chip = &i8259a_irq_type;
}
setup_irq(2, &cascade);
@@ -120,7 +120,7 @@ init_pyxis_irqs(unsigned long ignore_mask)
if ((ignore_mask >> i) & 1)
continue;
irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[i].handler = &pyxis_irq_type;
irq_desc[i].chip = &pyxis_irq_type;
}
setup_irq(16+7, &isa_cascade_irqaction);
@@ -67,7 +67,7 @@ init_srm_irqs(long max, unsigned long ignore_mask)
if (i < 64 && ((ignore_mask >> i) & 1))
continue;
irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[i].handler = &srm_irq_type;
irq_desc[i].chip = &srm_irq_type;
}
}
@@ -144,7 +144,7 @@ alcor_init_irq(void)
if (i >= 16+20 && i <= 16+30)
continue;
irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[i].handler = &alcor_irq_type;
irq_desc[i].chip = &alcor_irq_type;
}
i8259a_irq_type.ack = alcor_isa_mask_and_ack_irq;
@@ -124,7 +124,7 @@ common_init_irq(void (*srm_dev_int)(unsigned long v, struct pt_regs *r))
for (i = 16; i < 35; ++i) {
irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[i].handler = &cabriolet_irq_type;
irq_desc[i].chip = &cabriolet_irq_type;
}
}
@@ -300,7 +300,7 @@ init_tsunami_irqs(struct hw_interrupt_type * ops, int imin, int imax)
long i;
for (i = imin; i <= imax; ++i) {
irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[i].handler = ops;
irq_desc[i].chip = ops;
}
}
@@ -137,7 +137,7 @@ eb64p_init_irq(void)
for (i = 16; i < 32; ++i) {
irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[i].handler = &eb64p_irq_type;
irq_desc[i].chip = &eb64p_irq_type;
}
common_init_isa_dma();
@@ -154,7 +154,7 @@ eiger_init_irq(void)
for (i = 16; i < 128; ++i) {
irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[i].handler = &eiger_irq_type;
irq_desc[i].chip = &eiger_irq_type;
}
}
@@ -206,11 +206,11 @@ jensen_init_irq(void)
{
init_i8259a_irqs();
irq_desc[1].handler = &jensen_local_irq_type;
irq_desc[4].handler = &jensen_local_irq_type;
irq_desc[3].handler = &jensen_local_irq_type;
irq_desc[7].handler = &jensen_local_irq_type;
irq_desc[9].handler = &jensen_local_irq_type;
irq_desc[1].chip = &jensen_local_irq_type;
irq_desc[4].chip = &jensen_local_irq_type;
irq_desc[3].chip = &jensen_local_irq_type;
irq_desc[7].chip = &jensen_local_irq_type;
irq_desc[9].chip = &jensen_local_irq_type;
common_init_isa_dma();
}
@@ -303,7 +303,7 @@ init_io7_irqs(struct io7 *io7,
/* Set up the lsi irqs. */
for (i = 0; i < 128; ++i) {
irq_desc[base + i].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[base + i].handler = lsi_ops;
irq_desc[base + i].chip = lsi_ops;
}
/* Disable the implemented irqs in hardware. */
@@ -317,7 +317,7 @@ init_io7_irqs(struct io7 *io7,
/* Set up the msi irqs. */
for (i = 128; i < (128 + 512); ++i) {
irq_desc[base + i].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[base + i].handler = msi_ops;
irq_desc[base + i].chip = msi_ops;
}
for (i = 0; i < 16; ++i)
@@ -335,7 +335,7 @@ marvel_init_irq(void)
/* Reserve the legacy irqs. */
for (i = 0; i < 16; ++i) {
irq_desc[i].status = IRQ_DISABLED;
irq_desc[i].handler = &marvel_legacy_irq_type;
irq_desc[i].chip = &marvel_legacy_irq_type;
}
/* Init the io7 irqs. */
@@ -117,7 +117,7 @@ mikasa_init_irq(void)
for (i = 16; i < 32; ++i) {
irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[i].handler = &mikasa_irq_type;
irq_desc[i].chip = &mikasa_irq_type;
}
init_i8259a_irqs();
@@ -139,7 +139,7 @@ noritake_init_irq(void)
for (i = 16; i < 48; ++i) {
irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[i].handler = &noritake_irq_type;
irq_desc[i].chip = &noritake_irq_type;
}
init_i8259a_irqs();
@@ -180,7 +180,7 @@ rawhide_init_irq(void)
for (i = 16; i < 128; ++i) {
irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[i].handler = &rawhide_irq_type;
irq_desc[i].chip = &rawhide_irq_type;
}
init_i8259a_irqs();
@@ -117,7 +117,7 @@ rx164_init_irq(void)
rx164_update_irq_hw(0);
for (i = 16; i < 40; ++i) {
irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[i].handler = &rx164_irq_type;
irq_desc[i].chip = &rx164_irq_type;
}
init_i8259a_irqs();
@@ -537,7 +537,7 @@ sable_lynx_init_irq(int nr_irqs)
for (i = 0; i < nr_irqs; ++i) {
irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[i].handler = &sable_lynx_irq_type;
irq_desc[i].chip = &sable_lynx_irq_type;
}
common_init_isa_dma();
@@ -154,7 +154,7 @@ takara_init_irq(void)
for (i = 16; i < 128; ++i) {
irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[i].handler = &takara_irq_type;
irq_desc[i].chip = &takara_irq_type;
}
common_init_isa_dma();
@@ -189,7 +189,7 @@ init_titan_irqs(struct hw_interrupt_type * ops, int imin, int imax)
long i;
for (i = imin; i <= imax; ++i) {
irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[i].handler = ops;
irq_desc[i].chip = ops;
}
}
@@ -199,14 +199,14 @@ wildfire_init_irq_per_pca(int qbbno, int pcano)
if (i == 2)
continue;
irq_desc[i+irq_bias].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[i+irq_bias].handler = &wildfire_irq_type;
irq_desc[i+irq_bias].chip = &wildfire_irq_type;
}
irq_desc[36+irq_bias].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[36+irq_bias].handler = &wildfire_irq_type;
irq_desc[36+irq_bias].chip = &wildfire_irq_type;
for (i = 40; i < 64; ++i) {
irq_desc[i+irq_bias].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[i+irq_bias].handler = &wildfire_irq_type;
irq_desc[i+irq_bias].chip = &wildfire_irq_type;
}
setup_irq(32+irq_bias, &isa_enable);
@@ -172,7 +172,7 @@ init_IRQ(void)
/* Initialize IRQ handler descriptiors. */
for(i = 2; i < NR_IRQS; i++) {
irq_desc[i].handler = &crisv10_irq_type;
irq_desc[i].chip = &crisv10_irq_type;
set_int_vector(i, interrupt[i]);
}
@@ -369,7 +369,7 @@ init_IRQ(void)
/* Point all IRQ's to bad handlers. */
for (i = FIRST_IRQ, j = 0; j < NR_IRQS; i++, j++) {
irq_desc[j].handler = &crisv32_irq_type;
irq_desc[j].chip = &crisv32_irq_type;
set_exception_vector(i, interrupt[j]);
}
@@ -69,7 +69,7 @@ int show_interrupts(struct seq_file *p, void *v)
for_each_online_cpu(j)
seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
#endif
seq_printf(p, " %14s", irq_desc[i].handler->typename);
seq_printf(p, " %14s", irq_desc[i].chip->typename);
seq_printf(p, " %s", action->name);
for (action=action->next; action; action = action->next)
@@ -132,7 +132,7 @@ void make_8259A_irq(unsigned int irq)
{
disable_irq_nosync(irq);
io_apic_irqs &= ~(1<<irq);
irq_desc[irq].handler = &i8259A_irq_type;
irq_desc[irq].chip = &i8259A_irq_type;
enable_irq(irq);
}
@@ -386,12 +386,12 @@ void __init init_ISA_irqs (void)
/*
* 16 old-style INTA-cycle interrupts:
*/
irq_desc[i].handler = &i8259A_irq_type;
irq_desc[i].chip = &i8259A_irq_type;
} else {
/*
* 'high' PCI IRQs filled in on demand
*/
irq_desc[i].handler = &no_irq_type;
irq_desc[i].chip = &no_irq_type;
}
}
}
@@ -1205,15 +1205,17 @@ static struct hw_interrupt_type ioapic_edge_type;
#define IOAPIC_EDGE 0
#define IOAPIC_LEVEL 1
static inline void ioapic_register_intr(int irq, int vector, unsigned long trigger)
static void ioapic_register_intr(int irq, int vector, unsigned long trigger)
{
unsigned idx = use_pci_vector() && !platform_legacy_irq(irq) ? vector : irq;
unsigned idx;
idx = use_pci_vector() && !platform_legacy_irq(irq) ? vector : irq;
if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) ||
trigger == IOAPIC_LEVEL)
irq_desc[idx].handler = &ioapic_level_type;
irq_desc[idx].chip = &ioapic_level_type;
else
irq_desc[idx].handler = &ioapic_edge_type;
irq_desc[idx].chip = &ioapic_edge_type;
set_intr_gate(vector, interrupt[idx]);
}
@@ -1325,7 +1327,7 @@ static void __init setup_ExtINT_IRQ0_pin(unsigned int apic, unsigned int pin, in
* The timer IRQ doesn't have to know that behind the
* scene we have a 8259A-master in AEOI mode ...
*/
irq_desc[0].handler = &ioapic_edge_type;
irq_desc[0].chip = &ioapic_edge_type;
/*
* Add it to the IO-APIC irq-routing table:
@@ -2135,7 +2137,7 @@ static inline void init_IO_APIC_traps(void)
make_8259A_irq(irq);
else
/* Strange. Oh, well.. */
irq_desc[irq].handler = &no_irq_type;
irq_desc[irq].chip = &no_irq_type;
}
}
}
@@ -2351,7 +2353,7 @@ static inline void check_timer(void)
printk(KERN_INFO "...trying to set up timer as Virtual Wire IRQ...");
disable_8259A_irq(0);
irq_desc[0].handler = &lapic_irq_type;
irq_desc[0].chip = &lapic_irq_type;
apic_write_around(APIC_LVT0, APIC_DM_FIXED | vector); /* Fixed mode */
enable_8259A_irq(0);
@@ -249,7 +249,7 @@ int show_interrupts(struct seq_file *p, void *v)
for_each_online_cpu(j)
seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
#endif
seq_printf(p, " %14s", irq_desc[i].handler->typename);
seq_printf(p, " %14s", irq_desc[i].chip->typename);
seq_printf(p, " %s", action->name);
for (action=action->next; action; action = action->next)
@@ -296,8 +296,8 @@ void fixup_irqs(cpumask_t map)
printk("Breaking affinity for irq %i\n", irq);
mask = map;
}
if (irq_desc[irq].handler->set_affinity)
irq_desc[irq].handler->set_affinity(irq, mask);
if (irq_desc[irq].chip->set_affinity)
irq_desc[irq].chip->set_affinity(irq, mask);
else if (irq_desc[irq].action && !(warned++))
printk("Cannot set affinity for irq %i\n", irq);
}
@@ -278,22 +278,22 @@ void init_VISWS_APIC_irqs(void)
irq_desc[i].depth = 1;
if (i == 0) {
irq_desc[i].handler = &cobalt_irq_type;
irq_desc[i].chip = &cobalt_irq_type;
}
else if (i == CO_IRQ_IDE0) {
irq_desc[i].handler = &cobalt_irq_type;
irq_desc[i].chip = &cobalt_irq_type;
}
else if (i == CO_IRQ_IDE1) {
irq_desc[i].handler = &cobalt_irq_type;
irq_desc[i].chip = &cobalt_irq_type;
}
else if (i == CO_IRQ_8259) {
irq_desc[i].handler = &piix4_master_irq_type;
irq_desc[i].chip = &piix4_master_irq_type;
}
else if (i < CO_IRQ_APIC0) {
irq_desc[i].handler = &piix4_virtual_irq_type;
irq_desc[i].chip = &piix4_virtual_irq_type;
}
else if (IS_CO_APIC(i)) {
irq_desc[i].handler = &cobalt_irq_type;
irq_desc[i].chip = &cobalt_irq_type;
}
}
@@ -1419,7 +1419,7 @@ smp_intr_init(void)
* This is for later: first 16 correspond to PC IRQs; next 16
* are Primary MC IRQs and final 16 are Secondary MC IRQs */
for(i = 0; i < 48; i++)
irq_desc[i].handler = &vic_irq_type;
irq_desc[i].chip = &vic_irq_type;
}
/* send a CPI at level cpi to a set of cpus in cpuset (set 1 bit per
Oops, something went wrong.

0 comments on commit d1bef4e

Please sign in to comment.