diff options
-rw-r--r-- | arch/i386/kernel/i8259.c | 7 | ||||
-rw-r--r-- | arch/i386/kernel/io_apic.c | 17 | ||||
-rw-r--r-- | arch/i386/kernel/irq.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/i8259.c | 7 | ||||
-rw-r--r-- | arch/x86_64/kernel/io_apic.c | 15 | ||||
-rw-r--r-- | arch/x86_64/kernel/irq.c | 2 | ||||
-rw-r--r-- | include/linux/irq.h | 22 | ||||
-rw-r--r-- | kernel/irq/chip.c | 33 |
8 files changed, 47 insertions, 58 deletions
diff --git a/arch/i386/kernel/i8259.c b/arch/i386/kernel/i8259.c index d53eafb6daa7..62996cd17084 100644 --- a/arch/i386/kernel/i8259.c +++ b/arch/i386/kernel/i8259.c | |||
@@ -113,7 +113,8 @@ void make_8259A_irq(unsigned int irq) | |||
113 | { | 113 | { |
114 | disable_irq_nosync(irq); | 114 | disable_irq_nosync(irq); |
115 | io_apic_irqs &= ~(1<<irq); | 115 | io_apic_irqs &= ~(1<<irq); |
116 | set_irq_chip_and_handler(irq, &i8259A_chip, handle_level_irq); | 116 | set_irq_chip_and_handler_name(irq, &i8259A_chip, handle_level_irq, |
117 | "XT"); | ||
117 | enable_irq(irq); | 118 | enable_irq(irq); |
118 | } | 119 | } |
119 | 120 | ||
@@ -369,8 +370,8 @@ void __init init_ISA_irqs (void) | |||
369 | /* | 370 | /* |
370 | * 16 old-style INTA-cycle interrupts: | 371 | * 16 old-style INTA-cycle interrupts: |
371 | */ | 372 | */ |
372 | set_irq_chip_and_handler(i, &i8259A_chip, | 373 | set_irq_chip_and_handler_name(i, &i8259A_chip, |
373 | handle_level_irq); | 374 | handle_level_irq, "XT"); |
374 | } else { | 375 | } else { |
375 | /* | 376 | /* |
376 | * 'high' PCI IRQs filled in on demand | 377 | * 'high' PCI IRQs filled in on demand |
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index 27bceaf5ce40..350192d6ab98 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c | |||
@@ -1225,11 +1225,11 @@ static void ioapic_register_intr(int irq, int vector, unsigned long trigger) | |||
1225 | { | 1225 | { |
1226 | if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) || | 1226 | if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) || |
1227 | trigger == IOAPIC_LEVEL) | 1227 | trigger == IOAPIC_LEVEL) |
1228 | set_irq_chip_and_handler(irq, &ioapic_chip, | 1228 | set_irq_chip_and_handler_name(irq, &ioapic_chip, |
1229 | handle_fasteoi_irq); | 1229 | handle_fasteoi_irq, "fasteoi"); |
1230 | else | 1230 | else |
1231 | set_irq_chip_and_handler(irq, &ioapic_chip, | 1231 | set_irq_chip_and_handler_name(irq, &ioapic_chip, |
1232 | handle_edge_irq); | 1232 | handle_edge_irq, "edge"); |
1233 | set_intr_gate(vector, interrupt[irq]); | 1233 | set_intr_gate(vector, interrupt[irq]); |
1234 | } | 1234 | } |
1235 | 1235 | ||
@@ -2235,7 +2235,8 @@ static inline void check_timer(void) | |||
2235 | printk(KERN_INFO "...trying to set up timer as Virtual Wire IRQ..."); | 2235 | printk(KERN_INFO "...trying to set up timer as Virtual Wire IRQ..."); |
2236 | 2236 | ||
2237 | disable_8259A_irq(0); | 2237 | disable_8259A_irq(0); |
2238 | set_irq_chip_and_handler(0, &lapic_chip, handle_fasteoi_irq); | 2238 | set_irq_chip_and_handler_name(0, &lapic_chip, handle_fasteoi_irq, |
2239 | "fasteio"); | ||
2239 | apic_write_around(APIC_LVT0, APIC_DM_FIXED | vector); /* Fixed mode */ | 2240 | apic_write_around(APIC_LVT0, APIC_DM_FIXED | vector); /* Fixed mode */ |
2240 | enable_8259A_irq(0); | 2241 | enable_8259A_irq(0); |
2241 | 2242 | ||
@@ -2541,7 +2542,8 @@ int arch_setup_msi_irq(unsigned int irq, struct pci_dev *dev) | |||
2541 | 2542 | ||
2542 | write_msi_msg(irq, &msg); | 2543 | write_msi_msg(irq, &msg); |
2543 | 2544 | ||
2544 | set_irq_chip_and_handler(irq, &msi_chip, handle_edge_irq); | 2545 | set_irq_chip_and_handler_name(irq, &msi_chip, handle_edge_irq, |
2546 | "edge"); | ||
2545 | 2547 | ||
2546 | return 0; | 2548 | return 0; |
2547 | } | 2549 | } |
@@ -2636,7 +2638,8 @@ int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev) | |||
2636 | write_ht_irq_low(irq, low); | 2638 | write_ht_irq_low(irq, low); |
2637 | write_ht_irq_high(irq, high); | 2639 | write_ht_irq_high(irq, high); |
2638 | 2640 | ||
2639 | set_irq_chip_and_handler(irq, &ht_irq_chip, handle_edge_irq); | 2641 | set_irq_chip_and_handler_name(irq, &ht_irq_chip, |
2642 | handle_edge_irq, "edge"); | ||
2640 | } | 2643 | } |
2641 | return vector; | 2644 | return vector; |
2642 | } | 2645 | } |
diff --git a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c index 8cfc7dbec7b9..3201d421090a 100644 --- a/arch/i386/kernel/irq.c +++ b/arch/i386/kernel/irq.c | |||
@@ -258,7 +258,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
258 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); | 258 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); |
259 | #endif | 259 | #endif |
260 | seq_printf(p, " %8s", irq_desc[i].chip->name); | 260 | seq_printf(p, " %8s", irq_desc[i].chip->name); |
261 | seq_printf(p, "-%s", handle_irq_name(irq_desc[i].handle_irq)); | 261 | seq_printf(p, "-%-8s", irq_desc[i].name); |
262 | seq_printf(p, " %s", action->name); | 262 | seq_printf(p, " %s", action->name); |
263 | 263 | ||
264 | for (action=action->next; action; action = action->next) | 264 | for (action=action->next; action; action = action->next) |
diff --git a/arch/x86_64/kernel/i8259.c b/arch/x86_64/kernel/i8259.c index 0612a33bb896..c4ef801b765b 100644 --- a/arch/x86_64/kernel/i8259.c +++ b/arch/x86_64/kernel/i8259.c | |||
@@ -178,7 +178,8 @@ void make_8259A_irq(unsigned int irq) | |||
178 | { | 178 | { |
179 | disable_irq_nosync(irq); | 179 | disable_irq_nosync(irq); |
180 | io_apic_irqs &= ~(1<<irq); | 180 | io_apic_irqs &= ~(1<<irq); |
181 | set_irq_chip_and_handler(irq, &i8259A_chip, handle_level_irq); | 181 | set_irq_chip_and_handler_name(irq, &i8259A_chip, handle_level_irq, |
182 | "XT"); | ||
182 | enable_irq(irq); | 183 | enable_irq(irq); |
183 | } | 184 | } |
184 | 185 | ||
@@ -431,8 +432,8 @@ void __init init_ISA_irqs (void) | |||
431 | /* | 432 | /* |
432 | * 16 old-style INTA-cycle interrupts: | 433 | * 16 old-style INTA-cycle interrupts: |
433 | */ | 434 | */ |
434 | set_irq_chip_and_handler(i, &i8259A_chip, | 435 | set_irq_chip_and_handler_name(i, &i8259A_chip, |
435 | handle_level_irq); | 436 | handle_level_irq, "XT"); |
436 | } else { | 437 | } else { |
437 | /* | 438 | /* |
438 | * 'high' PCI IRQs filled in on demand | 439 | * 'high' PCI IRQs filled in on demand |
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index 44b55f833875..49e94f7994c5 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
@@ -696,11 +696,11 @@ static void ioapic_register_intr(int irq, int vector, unsigned long trigger) | |||
696 | { | 696 | { |
697 | if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) || | 697 | if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) || |
698 | trigger == IOAPIC_LEVEL) | 698 | trigger == IOAPIC_LEVEL) |
699 | set_irq_chip_and_handler(irq, &ioapic_chip, | 699 | set_irq_chip_and_handler_name(irq, &ioapic_chip, |
700 | handle_fasteoi_irq); | 700 | handle_fasteoi_irq, "fasteoi"); |
701 | else | 701 | else |
702 | set_irq_chip_and_handler(irq, &ioapic_chip, | 702 | set_irq_chip_and_handler_name(irq, &ioapic_chip, |
703 | handle_edge_irq); | 703 | handle_edge_irq, "edge"); |
704 | } | 704 | } |
705 | 705 | ||
706 | static void __init setup_IO_APIC_irqs(void) | 706 | static void __init setup_IO_APIC_irqs(void) |
@@ -806,7 +806,7 @@ static void __init setup_ExtINT_IRQ0_pin(unsigned int apic, unsigned int pin, in | |||
806 | * The timer IRQ doesn't have to know that behind the | 806 | * The timer IRQ doesn't have to know that behind the |
807 | * scene we have a 8259A-master in AEOI mode ... | 807 | * scene we have a 8259A-master in AEOI mode ... |
808 | */ | 808 | */ |
809 | set_irq_chip_and_handler(0, &ioapic_chip, handle_edge_irq); | 809 | set_irq_chip_and_handler_name(0, &ioapic_chip, handle_edge_irq, "edge"); |
810 | 810 | ||
811 | /* | 811 | /* |
812 | * Add it to the IO-APIC irq-routing table: | 812 | * Add it to the IO-APIC irq-routing table: |
@@ -1839,7 +1839,7 @@ int arch_setup_msi_irq(unsigned int irq, struct pci_dev *dev) | |||
1839 | 1839 | ||
1840 | write_msi_msg(irq, &msg); | 1840 | write_msi_msg(irq, &msg); |
1841 | 1841 | ||
1842 | set_irq_chip_and_handler(irq, &msi_chip, handle_edge_irq); | 1842 | set_irq_chip_and_handler_name(irq, &msi_chip, handle_edge_irq, "edge"); |
1843 | 1843 | ||
1844 | return 0; | 1844 | return 0; |
1845 | } | 1845 | } |
@@ -1936,7 +1936,8 @@ int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev) | |||
1936 | write_ht_irq_low(irq, low); | 1936 | write_ht_irq_low(irq, low); |
1937 | write_ht_irq_high(irq, high); | 1937 | write_ht_irq_high(irq, high); |
1938 | 1938 | ||
1939 | set_irq_chip_and_handler(irq, &ht_irq_chip, handle_edge_irq); | 1939 | set_irq_chip_and_handler_name(irq, &ht_irq_chip, |
1940 | handle_edge_irq, "edge"); | ||
1940 | } | 1941 | } |
1941 | return vector; | 1942 | return vector; |
1942 | } | 1943 | } |
diff --git a/arch/x86_64/kernel/irq.c b/arch/x86_64/kernel/irq.c index dff68eb2b787..e46c55856d40 100644 --- a/arch/x86_64/kernel/irq.c +++ b/arch/x86_64/kernel/irq.c | |||
@@ -75,7 +75,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
75 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); | 75 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); |
76 | #endif | 76 | #endif |
77 | seq_printf(p, " %8s", irq_desc[i].chip->name); | 77 | seq_printf(p, " %8s", irq_desc[i].chip->name); |
78 | seq_printf(p, "-%s", handle_irq_name(irq_desc[i].handle_irq)); | 78 | seq_printf(p, "-%-8s", irq_desc[i].name); |
79 | 79 | ||
80 | seq_printf(p, " %s", action->name); | 80 | seq_printf(p, " %s", action->name); |
81 | for (action=action->next; action; action = action->next) | 81 | for (action=action->next; action; action = action->next) |
diff --git a/include/linux/irq.h b/include/linux/irq.h index c64f3cc7e870..775f5a7da493 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -141,6 +141,7 @@ struct irq_chip { | |||
141 | * @pending_mask: pending rebalanced interrupts | 141 | * @pending_mask: pending rebalanced interrupts |
142 | * @dir: /proc/irq/ procfs entry | 142 | * @dir: /proc/irq/ procfs entry |
143 | * @affinity_entry: /proc/irq/smp_affinity procfs entry on SMP | 143 | * @affinity_entry: /proc/irq/smp_affinity procfs entry on SMP |
144 | * @name: flow handler name for /proc/interrupts output | ||
144 | * | 145 | * |
145 | * Pad this out to 32 bytes for cache and indexing reasons. | 146 | * Pad this out to 32 bytes for cache and indexing reasons. |
146 | */ | 147 | */ |
@@ -165,8 +166,9 @@ struct irq_desc { | |||
165 | cpumask_t pending_mask; | 166 | cpumask_t pending_mask; |
166 | #endif | 167 | #endif |
167 | #ifdef CONFIG_PROC_FS | 168 | #ifdef CONFIG_PROC_FS |
168 | struct proc_dir_entry *dir; | 169 | struct proc_dir_entry *dir; |
169 | #endif | 170 | #endif |
171 | const char *name; | ||
170 | } ____cacheline_aligned; | 172 | } ____cacheline_aligned; |
171 | 173 | ||
172 | extern struct irq_desc irq_desc[NR_IRQS]; | 174 | extern struct irq_desc irq_desc[NR_IRQS]; |
@@ -272,12 +274,6 @@ extern void fastcall handle_percpu_irq(unsigned int irq, struct irq_desc *desc); | |||
272 | extern void fastcall handle_bad_irq(unsigned int irq, struct irq_desc *desc); | 274 | extern void fastcall handle_bad_irq(unsigned int irq, struct irq_desc *desc); |
273 | 275 | ||
274 | /* | 276 | /* |
275 | * Get a descriptive string for the highlevel handler, for | ||
276 | * /proc/interrupts output: | ||
277 | */ | ||
278 | extern const char *handle_irq_name(irq_flow_handler_t handle); | ||
279 | |||
280 | /* | ||
281 | * Monolithic do_IRQ implementation. | 277 | * Monolithic do_IRQ implementation. |
282 | * (is an explicit fastcall, because i386 4KSTACKS calls it from assembly) | 278 | * (is an explicit fastcall, because i386 4KSTACKS calls it from assembly) |
283 | */ | 279 | */ |
@@ -326,10 +322,12 @@ extern struct irq_chip no_irq_chip; | |||
326 | extern struct irq_chip dummy_irq_chip; | 322 | extern struct irq_chip dummy_irq_chip; |
327 | 323 | ||
328 | extern void | 324 | extern void |
329 | set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, | 325 | set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip, |
330 | irq_flow_handler_t handle); | 326 | irq_flow_handler_t handle, const char *name); |
327 | |||
331 | extern void | 328 | extern void |
332 | __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained); | 329 | __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, |
330 | const char *name); | ||
333 | 331 | ||
334 | /* | 332 | /* |
335 | * Set a highlevel flow handler for a given IRQ: | 333 | * Set a highlevel flow handler for a given IRQ: |
@@ -337,7 +335,7 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained); | |||
337 | static inline void | 335 | static inline void |
338 | set_irq_handler(unsigned int irq, irq_flow_handler_t handle) | 336 | set_irq_handler(unsigned int irq, irq_flow_handler_t handle) |
339 | { | 337 | { |
340 | __set_irq_handler(irq, handle, 0); | 338 | __set_irq_handler(irq, handle, 0, NULL); |
341 | } | 339 | } |
342 | 340 | ||
343 | /* | 341 | /* |
@@ -349,7 +347,7 @@ static inline void | |||
349 | set_irq_chained_handler(unsigned int irq, | 347 | set_irq_chained_handler(unsigned int irq, |
350 | irq_flow_handler_t handle) | 348 | irq_flow_handler_t handle) |
351 | { | 349 | { |
352 | __set_irq_handler(irq, handle, 1); | 350 | __set_irq_handler(irq, handle, 1, NULL); |
353 | } | 351 | } |
354 | 352 | ||
355 | /* Handle dynamic irq creation and destruction */ | 353 | /* Handle dynamic irq creation and destruction */ |
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 11c99697acfe..2d0dc3efe813 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -499,7 +499,8 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc) | |||
499 | #endif /* CONFIG_SMP */ | 499 | #endif /* CONFIG_SMP */ |
500 | 500 | ||
501 | void | 501 | void |
502 | __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained) | 502 | __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, |
503 | const char *name) | ||
503 | { | 504 | { |
504 | struct irq_desc *desc; | 505 | struct irq_desc *desc; |
505 | unsigned long flags; | 506 | unsigned long flags; |
@@ -540,6 +541,7 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained) | |||
540 | desc->depth = 1; | 541 | desc->depth = 1; |
541 | } | 542 | } |
542 | desc->handle_irq = handle; | 543 | desc->handle_irq = handle; |
544 | desc->name = name; | ||
543 | 545 | ||
544 | if (handle != handle_bad_irq && is_chained) { | 546 | if (handle != handle_bad_irq && is_chained) { |
545 | desc->status &= ~IRQ_DISABLED; | 547 | desc->status &= ~IRQ_DISABLED; |
@@ -555,30 +557,13 @@ set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, | |||
555 | irq_flow_handler_t handle) | 557 | irq_flow_handler_t handle) |
556 | { | 558 | { |
557 | set_irq_chip(irq, chip); | 559 | set_irq_chip(irq, chip); |
558 | __set_irq_handler(irq, handle, 0); | 560 | __set_irq_handler(irq, handle, 0, NULL); |
559 | } | 561 | } |
560 | 562 | ||
561 | /* | 563 | void |
562 | * Get a descriptive string for the highlevel handler, for | 564 | set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip, |
563 | * /proc/interrupts output: | 565 | irq_flow_handler_t handle, const char *name) |
564 | */ | ||
565 | const char * | ||
566 | handle_irq_name(irq_flow_handler_t handle) | ||
567 | { | 566 | { |
568 | if (handle == handle_level_irq) | 567 | set_irq_chip(irq, chip); |
569 | return "level "; | 568 | __set_irq_handler(irq, handle, 0, name); |
570 | if (handle == handle_fasteoi_irq) | ||
571 | return "fasteoi"; | ||
572 | if (handle == handle_edge_irq) | ||
573 | return "edge "; | ||
574 | if (handle == handle_simple_irq) | ||
575 | return "simple "; | ||
576 | #ifdef CONFIG_SMP | ||
577 | if (handle == handle_percpu_irq) | ||
578 | return "percpu "; | ||
579 | #endif | ||
580 | if (handle == handle_bad_irq) | ||
581 | return "bad "; | ||
582 | |||
583 | return NULL; | ||
584 | } | 569 | } |