The patch titled genirq: clean up irq-flow-type naming has been added to the -mm tree. Its filename is genirq-clean-up-irq-flow-type-naming.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: genirq: clean up irq-flow-type naming From: Ingo Molnar <mingo@xxxxxxx> Introduce desc->name and eliminate the handle_irq_name() hack. Add set_irq_chip_and_handler_name() to set the flow type and name at once. Signed-off-by: Ingo Molnar <mingo@xxxxxxx> Acked-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- arch/i386/kernel/i8259.c | 7 ++-- arch/i386/kernel/io_apic.c | 17 ++++++---- arch/i386/kernel/irq.c | 2 - arch/x86_64/kernel/i8259.c | 7 ++-- arch/x86_64/kernel/io_apic.c | 15 ++++----- arch/x86_64/kernel/irq.c | 2 - include/asm-parisc/irq-handlers.h | 7 ---- include/linux/irq.h | 26 ++++++++------- kernel/irq/chip.c | 46 +++++++--------------------- 9 files changed, 55 insertions(+), 74 deletions(-) diff -puN arch/i386/kernel/i8259.c~genirq-clean-up-irq-flow-type-naming arch/i386/kernel/i8259.c --- a/arch/i386/kernel/i8259.c~genirq-clean-up-irq-flow-type-naming +++ a/arch/i386/kernel/i8259.c @@ -113,7 +113,8 @@ void make_8259A_irq(unsigned int irq) { disable_irq_nosync(irq); io_apic_irqs &= ~(1<<irq); - set_irq_chip_and_handler(irq, &i8259A_chip, handle_level_irq); + set_irq_chip_and_handler_name(irq, &i8259A_chip, handle_level_irq, + "XT"); enable_irq(irq); } @@ -369,8 +370,8 @@ void __init init_ISA_irqs (void) /* * 16 old-style INTA-cycle interrupts: */ - set_irq_chip_and_handler(i, &i8259A_chip, - handle_level_irq); + set_irq_chip_and_handler_name(i, &i8259A_chip, + handle_level_irq, "XT"); } else { /* * 'high' PCI IRQs filled in on demand diff -puN arch/i386/kernel/io_apic.c~genirq-clean-up-irq-flow-type-naming arch/i386/kernel/io_apic.c --- a/arch/i386/kernel/io_apic.c~genirq-clean-up-irq-flow-type-naming +++ a/arch/i386/kernel/io_apic.c @@ -1225,11 +1225,11 @@ static void ioapic_register_intr(int irq { if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) || trigger == IOAPIC_LEVEL) - set_irq_chip_and_handler(irq, &ioapic_chip, - handle_fasteoi_irq); + set_irq_chip_and_handler_name(irq, &ioapic_chip, + handle_fasteoi_irq, "fasteoi"); else - set_irq_chip_and_handler(irq, &ioapic_chip, - handle_edge_irq); + set_irq_chip_and_handler_name(irq, &ioapic_chip, + handle_edge_irq, "edge"); set_intr_gate(vector, interrupt[irq]); } @@ -2235,7 +2235,8 @@ static inline void check_timer(void) printk(KERN_INFO "...trying to set up timer as Virtual Wire IRQ..."); disable_8259A_irq(0); - set_irq_chip_and_handler(0, &lapic_chip, handle_fasteoi_irq); + set_irq_chip_and_handler_name(0, &lapic_chip, handle_fasteoi_irq, + "fasteio"); apic_write_around(APIC_LVT0, APIC_DM_FIXED | vector); /* Fixed mode */ enable_8259A_irq(0); @@ -2541,7 +2542,8 @@ int arch_setup_msi_irq(unsigned int irq, write_msi_msg(irq, &msg); - set_irq_chip_and_handler(irq, &msi_chip, handle_edge_irq); + set_irq_chip_and_handler_name(irq, &msi_chip, handle_edge_irq, + "edge"); return 0; } @@ -2636,7 +2638,8 @@ int arch_setup_ht_irq(unsigned int irq, write_ht_irq_low(irq, low); write_ht_irq_high(irq, high); - set_irq_chip_and_handler(irq, &ht_irq_chip, handle_edge_irq); + set_irq_chip_and_handler_name(irq, &ht_irq_chip, + handle_edge_irq, "edge"); } return vector; } diff -puN arch/i386/kernel/irq.c~genirq-clean-up-irq-flow-type-naming arch/i386/kernel/irq.c --- a/arch/i386/kernel/irq.c~genirq-clean-up-irq-flow-type-naming +++ a/arch/i386/kernel/irq.c @@ -256,7 +256,7 @@ int show_interrupts(struct seq_file *p, seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); #endif seq_printf(p, " %8s", irq_desc[i].chip->name); - seq_printf(p, "-%s", handle_irq_name(irq_desc[i].handle_irq)); + seq_printf(p, "-%-8s", irq_desc[i].name); seq_printf(p, " %s", action->name); for (action=action->next; action; action = action->next) diff -puN arch/x86_64/kernel/i8259.c~genirq-clean-up-irq-flow-type-naming arch/x86_64/kernel/i8259.c --- a/arch/x86_64/kernel/i8259.c~genirq-clean-up-irq-flow-type-naming +++ a/arch/x86_64/kernel/i8259.c @@ -178,7 +178,8 @@ void make_8259A_irq(unsigned int irq) { disable_irq_nosync(irq); io_apic_irqs &= ~(1<<irq); - set_irq_chip_and_handler(irq, &i8259A_chip, handle_level_irq); + set_irq_chip_and_handler_name(irq, &i8259A_chip, handle_level_irq, + "XT"); enable_irq(irq); } @@ -431,8 +432,8 @@ void __init init_ISA_irqs (void) /* * 16 old-style INTA-cycle interrupts: */ - set_irq_chip_and_handler(i, &i8259A_chip, - handle_level_irq); + set_irq_chip_and_handler_name(i, &i8259A_chip, + handle_level_irq, "XT"); } else { /* * 'high' PCI IRQs filled in on demand diff -puN arch/x86_64/kernel/io_apic.c~genirq-clean-up-irq-flow-type-naming arch/x86_64/kernel/io_apic.c --- a/arch/x86_64/kernel/io_apic.c~genirq-clean-up-irq-flow-type-naming +++ a/arch/x86_64/kernel/io_apic.c @@ -649,11 +649,11 @@ static void ioapic_register_intr(int irq { if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) || trigger == IOAPIC_LEVEL) - set_irq_chip_and_handler(irq, &ioapic_chip, - handle_fasteoi_irq); + set_irq_chip_and_handler_name(irq, &ioapic_chip, + handle_fasteoi_irq, "fasteoi"); else - set_irq_chip_and_handler(irq, &ioapic_chip, - handle_edge_irq); + set_irq_chip_and_handler_name(irq, &ioapic_chip, + handle_edge_irq, "edge"); } static void __init setup_IO_APIC_irqs(void) @@ -761,7 +761,7 @@ static void __init setup_ExtINT_IRQ0_pin * The timer IRQ doesn't have to know that behind the * scene we have a 8259A-master in AEOI mode ... */ - set_irq_chip_and_handler(0, &ioapic_chip, handle_edge_irq); + set_irq_chip_and_handler_name(0, &ioapic_chip, handle_edge_irq, "edge"); /* * Add it to the IO-APIC irq-routing table: @@ -1797,7 +1797,7 @@ int arch_setup_msi_irq(unsigned int irq, write_msi_msg(irq, &msg); - set_irq_chip_and_handler(irq, &msi_chip, handle_edge_irq); + set_irq_chip_and_handler_name(irq, &msi_chip, handle_edge_irq, "edge"); return 0; } @@ -1898,7 +1898,8 @@ int arch_setup_ht_irq(unsigned int irq, write_ht_irq_low(irq, low); write_ht_irq_high(irq, high); - set_irq_chip_and_handler(irq, &ht_irq_chip, handle_edge_irq); + set_irq_chip_and_handler_name(irq, &ht_irq_chip, + handle_edge_irq, "edge"); } return vector; } diff -puN arch/x86_64/kernel/irq.c~genirq-clean-up-irq-flow-type-naming arch/x86_64/kernel/irq.c --- a/arch/x86_64/kernel/irq.c~genirq-clean-up-irq-flow-type-naming +++ a/arch/x86_64/kernel/irq.c @@ -75,7 +75,7 @@ int show_interrupts(struct seq_file *p, seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); #endif seq_printf(p, " %8s", irq_desc[i].chip->name); - seq_printf(p, "-%s", handle_irq_name(irq_desc[i].handle_irq)); + seq_printf(p, "-%-8s", irq_desc[i].name); seq_printf(p, " %s", action->name); for (action=action->next; action; action = action->next) diff -puN include/asm-parisc/irq-handlers.h~genirq-clean-up-irq-flow-type-naming include/asm-parisc/irq-handlers.h --- a/include/asm-parisc/irq-handlers.h~genirq-clean-up-irq-flow-type-naming +++ a/include/asm-parisc/irq-handlers.h @@ -6,10 +6,3 @@ HANDLE_SPECIFIC_IRQ(_ipi, cpu_ack_irq, c #ifdef CONFIG_IOSAPIC HANDLE_LEVEL_IRQ(_iosapic, cpu_ack_irq, iosapic_end_irq) #endif - -static inline char *arch_handle_irq_name(void fastcall (*handle)(unsigned int, - struct irq_desc *, - struct pt_regs *)) -{ - return NULL; -} diff -puN include/linux/irq.h~genirq-clean-up-irq-flow-type-naming include/linux/irq.h --- a/include/linux/irq.h~genirq-clean-up-irq-flow-type-naming +++ a/include/linux/irq.h @@ -135,6 +135,7 @@ struct irq_chip { * @pending_mask: pending rebalanced interrupts * @dir: /proc/irq/ procfs entry * @affinity_entry: /proc/irq/smp_affinity procfs entry on SMP + * @name: flow handler name for /proc/interrupts output * * Pad this out to 32 bytes for cache and indexing reasons. */ @@ -161,8 +162,9 @@ struct irq_desc { cpumask_t pending_mask; #endif #ifdef CONFIG_PROC_FS - struct proc_dir_entry *dir; + struct proc_dir_entry *dir; #endif + const char *name; } ____cacheline_aligned; extern struct irq_desc irq_desc[NR_IRQS]; @@ -279,14 +281,6 @@ extern void fastcall handle_bad_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs); /* - * Get a descriptive string for the highlevel handler, for - * /proc/interrupts output: - */ -extern const char * -handle_irq_name(void fastcall (*handle)(unsigned int, struct irq_desc *, - struct pt_regs *)); - -/* * Monolithic do_IRQ implementation. * (is an explicit fastcall, because i386 4KSTACKS calls it from assembly) */ @@ -340,10 +334,18 @@ set_irq_chip_and_handler(unsigned int ir struct irq_desc *, struct pt_regs *)); extern void +set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip, + void fastcall (*handle)(unsigned int, + struct irq_desc *, + struct pt_regs *), + const char *name); + +extern void __set_irq_handler(unsigned int irq, void fastcall (*handle)(unsigned int, struct irq_desc *, struct pt_regs *), - int is_chained); + int is_chained, + const char *name); /* * Set a highlevel flow handler for a given IRQ: @@ -353,7 +355,7 @@ set_irq_handler(unsigned int irq, void fastcall (*handle)(unsigned int, struct irq_desc *, struct pt_regs *)) { - __set_irq_handler(irq, handle, 0); + __set_irq_handler(irq, handle, 0, NULL); } /* @@ -366,7 +368,7 @@ set_irq_chained_handler(unsigned int irq void fastcall (*handle)(unsigned int, struct irq_desc *, struct pt_regs *)) { - __set_irq_handler(irq, handle, 1); + __set_irq_handler(irq, handle, 1, NULL); } /* Handle dynamic irq creation and destruction */ diff -puN kernel/irq/chip.c~genirq-clean-up-irq-flow-type-naming kernel/irq/chip.c --- a/kernel/irq/chip.c~genirq-clean-up-irq-flow-type-naming +++ a/kernel/irq/chip.c @@ -549,14 +549,7 @@ out_unlock: HANDLE_PERCPU_IRQ(, do_ack_irq, eoi_irq) #ifdef ARCH_HAS_IRQ_HANDLERS -#include <asm/irq-handlers.h> -#else -static inline char *arch_handle_irq_name(void fastcall (*handle)(unsigned int, - struct irq_desc *, - struct pt_regs *)) -{ - return NULL; -} +# include <asm/irq-handlers.h> #endif @@ -564,7 +557,8 @@ void __set_irq_handler(unsigned int irq, void fastcall (*handle)(unsigned int, irq_desc_t *, struct pt_regs *), - int is_chained) + int is_chained, + const char *name) { struct irq_desc *desc; unsigned long flags; @@ -605,6 +599,7 @@ __set_irq_handler(unsigned int irq, desc->depth = 1; } desc->handle_irq = handle; + desc->name = name; if (handle != handle_bad_irq && is_chained) { desc->status &= ~IRQ_DISABLED; @@ -622,31 +617,16 @@ set_irq_chip_and_handler(unsigned int ir struct pt_regs *)) { set_irq_chip(irq, chip); - __set_irq_handler(irq, handle, 0); + __set_irq_handler(irq, handle, 0, NULL); } -/* - * Get a descriptive string for the highlevel handler, for - * /proc/interrupts output: - */ -const char * -handle_irq_name(void fastcall (*handle)(unsigned int, struct irq_desc *, - struct pt_regs *)) +void +set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip, + void fastcall (*handle)(unsigned int, + struct irq_desc *, + struct pt_regs *), + const char *name) { - if (handle == handle_level_irq) - return "level "; - if (handle == handle_fasteoi_irq) - return "fasteoi"; - if (handle == handle_edge_irq) - return "edge "; - if (handle == handle_simple_irq) - return "simple "; -#ifdef CONFIG_SMP - if (handle == handle_percpu_irq) - return "percpu "; -#endif - if (handle == handle_bad_irq) - return "bad "; - - return arch_handle_irq_name(handle); + set_irq_chip(irq, chip); + __set_irq_handler(irq, handle, 0, name); } _ Patches currently in -mm which might be from mingo@xxxxxxx are origin.patch forcedeth-hardirq-lockdep-warning.patch bonding-lockdep-annotation.patch spinlock-debug-all-cpu-backtrace.patch maximum-latency-tracking-infrastructure.patch maximum-latency-tracking-infrastructure-tidy.patch remove-the-old-bd_mutex-lockdep-annotation.patch new-bd_mutex-lockdep-annotation.patch doc-lockdep-design-explain-display-of-state-bits.patch directed-yield-cpu_relax-variants-for-spinlocks-and-rw-locks.patch directed-yield-direct-yield-of-spinlocks-for-powerpc.patch directed-yield-direct-yield-of-spinlocks-for-s390.patch sysrq-disable-lockdep-on-reboot.patch typo-fixes-for-rt-mutex-designtxt.patch completions-lockdep-annotate-on-stack-completions.patch ntp-move-all-the-ntp-related-code-to-ntpc.patch nfsd-lockdep-annotation.patch sched-force-sbin-init-off-isolated-cpus.patch sched-remove-unnecessary-sched-group-allocations.patch sched-remove-unnecessary-sched-group-allocations-fix.patch lower-migration-thread-stop-machine-prio.patch sched-introduce-child-field-in-sched_domain.patch sched-cleanup-sched_group-cpu_power-setup.patch sched-fixing-wrong-comment-for-find_idlest_cpu.patch scheduler-numa-aware-placement-of-sched_group_allnodes.patch sched-add-above-background-load-function.patch mm-implement-swap-prefetching.patch sched-cleanup-remove-task_t-convert-to-struct-task_struct-prefetch.patch genirq-convert-the-x86_64-architecture-to-irq-chips.patch genirq-convert-the-i386-architecture-to-irq-chips.patch genirq-irq-convert-the-move_irq-flag-from-a-32bit-word-to-a-single-bit.patch genirq-irq-add-moved_masked_irq.patch genirq-x86_64-irq-reenable-migrating-irqs-to-other-cpus.patch genirq-msi-simplify-msi-enable-and-disable.patch genirq-msi-make-the-msi-boolean-tests-return-either-0-or-1.patch genirq-msi-implement-helper-functions-read_msi_msg-and-write_msi_msg.patch genirq-msi-refactor-the-msi_ops.patch genirq-msi-simplify-the-msi-irq-limit-policy.patch genirq-irq-add-a-dynamic-irq-creation-api.patch genirq-ia64-irq-dynamic-irq-support.patch genirq-i386-irq-dynamic-irq-support.patch genirq-x86_64-irq-dynamic-irq-support.patch genirq-msi-make-the-msi-code-irq-based-and-not-vector-based.patch genirq-x86_64-irq-move-msi-message-composition-into-io_apicc.patch genirq-i386-irq-move-msi-message-composition-into-io_apicc.patch genirq-msi-only-build-msi-apicc-on-ia64.patch genirq-x86_64-irq-remove-the-msi-assumption-that-irq-==-vector.patch genirq-i386-irq-remove-the-msi-assumption-that-irq-==-vector.patch genirq-irq-remove-msi-hacks.patch genirq-irq-generalize-the-check-for-hardirq_bits.patch genirq-x86_64-irq-make-the-external-irq-handlers-report-their-vector-not-the-irq-number.patch genirq-x86_64-irq-make-vector_irq-per-cpu.patch genirq-x86_64-irq-make-vector_irq-per-cpu-warning-fix.patch genirq-x86_64-irq-kill-gsi_irq_sharing.patch genirq-x86_64-irq-kill-irq-compression.patch msi-simplify-msi-sanity-checks-by-adding-with-generic-irq-code.patch msi-only-use-a-single-irq_chip-for-msi-interrupts.patch msi-refactor-and-move-the-msi-irq_chip-into-the-arch-code.patch msi-move-the-ia64-code-into-arch-ia64.patch htirq-tidy-up-the-htirq-code.patch genirq-clean-up-irq-flow-type-naming.patch detect-atomic-counter-underflows.patch debug-shared-irqs.patch make-frame_pointer-default=y.patch mutex-subsystem-synchro-test-module.patch vdso-print-fatal-signals.patch vdso-improve-print_fatal_signals-support-by-adding-memory-maps.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html