The patch titled genirq: cleanup: merge irq_affinity[] into irq_desc[] has been added to the -mm tree. Its filename is genirq-cleanup-merge-irq_affinity-into-irq_desc.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: cleanup: merge irq_affinity[] into irq_desc[] From: Ingo Molnar <mingo@xxxxxxx> Consolidation: remove the irq_affinity[NR_IRQS] array and move it into the irq_desc[NR_IRQS].affinity field. Signed-off-by: Ingo Molnar <mingo@xxxxxxx> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- arch/alpha/kernel/irq.c | 2 +- arch/i386/kernel/irq.c | 2 +- arch/ia64/kernel/irq.c | 4 ++-- arch/parisc/kernel/irq.c | 8 ++++---- arch/powerpc/kernel/irq.c | 2 +- arch/powerpc/platforms/pseries/xics.c | 4 ++-- arch/powerpc/sysdev/mpic.c | 2 +- arch/ppc/syslib/open_pic.c | 4 ++-- arch/x86_64/kernel/irq.c | 2 +- include/linux/irq.h | 7 ++++--- kernel/irq/handle.c | 5 ++++- kernel/irq/manage.c | 2 -- kernel/irq/proc.c | 4 ++-- 13 files changed, 25 insertions(+), 23 deletions(-) diff -puN arch/alpha/kernel/irq.c~genirq-cleanup-merge-irq_affinity-into-irq_desc arch/alpha/kernel/irq.c --- devel/arch/alpha/kernel/irq.c~genirq-cleanup-merge-irq_affinity-into-irq_desc 2006-05-22 15:12:21.000000000 -0700 +++ devel-akpm/arch/alpha/kernel/irq.c 2006-05-22 15:12:21.000000000 -0700 @@ -56,7 +56,7 @@ select_smp_affinity(unsigned int irq) cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0); last_cpu = cpu; - irq_affinity[irq] = cpumask_of_cpu(cpu); + irq_desc[irq].affinity = cpumask_of_cpu(cpu); irq_desc[irq].chip->set_affinity(irq, cpumask_of_cpu(cpu)); return 0; } diff -puN arch/i386/kernel/irq.c~genirq-cleanup-merge-irq_affinity-into-irq_desc arch/i386/kernel/irq.c --- devel/arch/i386/kernel/irq.c~genirq-cleanup-merge-irq_affinity-into-irq_desc 2006-05-22 15:12:21.000000000 -0700 +++ devel-akpm/arch/i386/kernel/irq.c 2006-05-22 15:12:21.000000000 -0700 @@ -277,7 +277,7 @@ void fixup_irqs(cpumask_t map) if (irq == 2) continue; - cpus_and(mask, irq_affinity[irq], map); + cpus_and(mask, irq_desc[irq].affinity, map); if (any_online_cpu(mask) == NR_CPUS) { printk("Breaking affinity for irq %i\n", irq); mask = map; diff -puN arch/ia64/kernel/irq.c~genirq-cleanup-merge-irq_affinity-into-irq_desc arch/ia64/kernel/irq.c --- devel/arch/ia64/kernel/irq.c~genirq-cleanup-merge-irq_affinity-into-irq_desc 2006-05-22 15:12:21.000000000 -0700 +++ devel-akpm/arch/ia64/kernel/irq.c 2006-05-22 15:12:21.000000000 -0700 @@ -100,7 +100,7 @@ void set_irq_affinity_info (unsigned int cpu_set(cpu_logical_id(hwid), mask); if (irq < NR_IRQS) { - irq_affinity[irq] = mask; + irq_desc[irq].affinity = mask; irq_redir[irq] = (char) (redir & 0xff); } } @@ -131,7 +131,7 @@ static void migrate_irqs(void) if (desc->status == IRQ_PER_CPU) continue; - cpus_and(mask, irq_affinity[irq], cpu_online_map); + cpus_and(mask, irq_desc[irq].affinity, cpu_online_map); if (any_online_cpu(mask) == NR_CPUS) { /* * Save it for phase 2 processing diff -puN arch/parisc/kernel/irq.c~genirq-cleanup-merge-irq_affinity-into-irq_desc arch/parisc/kernel/irq.c --- devel/arch/parisc/kernel/irq.c~genirq-cleanup-merge-irq_affinity-into-irq_desc 2006-05-22 15:12:21.000000000 -0700 +++ devel-akpm/arch/parisc/kernel/irq.c 2006-05-22 15:12:21.000000000 -0700 @@ -94,7 +94,7 @@ int cpu_check_affinity(unsigned int irq, if (irq == TIMER_IRQ || irq == IPI_IRQ) { /* Bad linux design decision. The mask has already * been set; we must reset it */ - irq_affinity[irq] = CPU_MASK_ALL; + irq_desc[irq].affinity = CPU_MASK_ALL; return -EINVAL; } @@ -110,7 +110,7 @@ static void cpu_set_affinity_irq(unsigne if (cpu_check_affinity(irq, &dest)) return; - irq_affinity[irq] = dest; + irq_desc[irq].affinity = dest; } #endif @@ -265,7 +265,7 @@ int txn_alloc_irq(unsigned int bits_wide unsigned long txn_affinity_addr(unsigned int irq, int cpu) { #ifdef CONFIG_SMP - irq_affinity[irq] = cpumask_of_cpu(cpu); + irq_desc[irq].affinity = cpumask_of_cpu(cpu); #endif return cpu_data[cpu].txn_addr; @@ -326,7 +326,7 @@ void do_cpu_irq_mask(struct pt_regs *reg /* Work our way from MSb to LSb...same order we alloc EIRs */ for (irq = TIMER_IRQ; eirr_val && bit; bit>>=1, irq++) { #ifdef CONFIG_SMP - cpumask_t dest = irq_affinity[irq]; + cpumask_t dest = irq_desc[irq].affinity; #endif if (!(bit & eirr_val)) continue; diff -puN arch/powerpc/kernel/irq.c~genirq-cleanup-merge-irq_affinity-into-irq_desc arch/powerpc/kernel/irq.c --- devel/arch/powerpc/kernel/irq.c~genirq-cleanup-merge-irq_affinity-into-irq_desc 2006-05-22 15:12:21.000000000 -0700 +++ devel-akpm/arch/powerpc/kernel/irq.c 2006-05-22 15:12:21.000000000 -0700 @@ -163,7 +163,7 @@ void fixup_irqs(cpumask_t map) if (irq_desc[irq].status & IRQ_PER_CPU) continue; - cpus_and(mask, irq_affinity[irq], map); + cpus_and(mask, irq_desc[irq].affinity, map); if (any_online_cpu(mask) == NR_CPUS) { printk("Breaking affinity for irq %i\n", irq); mask = map; diff -puN arch/powerpc/platforms/pseries/xics.c~genirq-cleanup-merge-irq_affinity-into-irq_desc arch/powerpc/platforms/pseries/xics.c --- devel/arch/powerpc/platforms/pseries/xics.c~genirq-cleanup-merge-irq_affinity-into-irq_desc 2006-05-22 15:12:21.000000000 -0700 +++ devel-akpm/arch/powerpc/platforms/pseries/xics.c 2006-05-22 15:12:21.000000000 -0700 @@ -238,7 +238,7 @@ static int get_irq_server(unsigned int i { unsigned int server; /* For the moment only implement delivery to all cpus or one cpu */ - cpumask_t cpumask = irq_affinity[irq]; + cpumask_t cpumask = irq_desc[irq].affinity; cpumask_t tmp = CPU_MASK_NONE; if (!distribute_irqs) @@ -729,7 +729,7 @@ void xics_migrate_irqs_away(void) /* Reset affinity to all cpus */ desc->chip->set_affinity(virq, CPU_MASK_ALL); - irq_affinity[virq] = CPU_MASK_ALL; + irq_desc[irq].affinity = CPU_MASK_ALL; unlock: spin_unlock_irqrestore(&desc->lock, flags); } diff -puN arch/powerpc/sysdev/mpic.c~genirq-cleanup-merge-irq_affinity-into-irq_desc arch/powerpc/sysdev/mpic.c --- devel/arch/powerpc/sysdev/mpic.c~genirq-cleanup-merge-irq_affinity-into-irq_desc 2006-05-22 15:12:21.000000000 -0700 +++ devel-akpm/arch/powerpc/sysdev/mpic.c 2006-05-22 15:12:21.000000000 -0700 @@ -886,7 +886,7 @@ void mpic_setup_this_cpu(void) /* let the mpic know we want intrs. default affinity is 0xffffffff * until changed via /proc. That's how it's done on x86. If we want * it differently, then we should make sure we also change the default - * values of irq_affinity in irq.c. + * values of irq_desc[].affinity in irq.c. */ if (distribute_irqs) { for (i = 0; i < mpic->num_sources ; i++) diff -puN arch/ppc/syslib/open_pic.c~genirq-cleanup-merge-irq_affinity-into-irq_desc arch/ppc/syslib/open_pic.c --- devel/arch/ppc/syslib/open_pic.c~genirq-cleanup-merge-irq_affinity-into-irq_desc 2006-05-22 15:12:21.000000000 -0700 +++ devel-akpm/arch/ppc/syslib/open_pic.c 2006-05-22 15:12:21.000000000 -0700 @@ -615,8 +615,8 @@ void __devinit do_openpic_setup_cpu(void /* let the openpic know we want intrs. default affinity * is 0xffffffff until changed via /proc * That's how it's done on x86. If we want it differently, then - * we should make sure we also change the default values of irq_affinity - * in irq.c. + * we should make sure we also change the default values of + * irq_desc[].affinity in irq.c. */ for (i = 0; i < NumSources; i++) openpic_mapirq(i, msk, CPU_MASK_ALL); diff -puN arch/x86_64/kernel/irq.c~genirq-cleanup-merge-irq_affinity-into-irq_desc arch/x86_64/kernel/irq.c --- devel/arch/x86_64/kernel/irq.c~genirq-cleanup-merge-irq_affinity-into-irq_desc 2006-05-22 15:12:21.000000000 -0700 +++ devel-akpm/arch/x86_64/kernel/irq.c 2006-05-22 15:12:21.000000000 -0700 @@ -114,7 +114,7 @@ void fixup_irqs(cpumask_t map) if (irq == 2) continue; - cpus_and(mask, irq_affinity[irq], map); + cpus_and(mask, irq_desc[irq].affinity, map); if (any_online_cpu(mask) == NR_CPUS) { printk("Breaking affinity for irq %i\n", irq); mask = map; diff -puN include/linux/irq.h~genirq-cleanup-merge-irq_affinity-into-irq_desc include/linux/irq.h --- devel/include/linux/irq.h~genirq-cleanup-merge-irq_affinity-into-irq_desc 2006-05-22 15:12:21.000000000 -0700 +++ devel-akpm/include/linux/irq.h 2006-05-22 15:12:21.000000000 -0700 @@ -77,6 +77,9 @@ typedef struct irq_desc { unsigned int irq_count; /* For detecting broken interrupts */ unsigned int irqs_unhandled; spinlock_t lock; +#ifdef CONFIG_SMP + cpumask_t affinity; +#endif #if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE) unsigned int move_irq; /* Flag need to re-target intr dest*/ #endif @@ -96,12 +99,10 @@ irq_descp (int irq) extern int setup_irq(unsigned int irq, struct irqaction * new); #ifdef CONFIG_GENERIC_HARDIRQS -extern cpumask_t irq_affinity[NR_IRQS]; - #ifdef CONFIG_SMP static inline void set_native_irq_info(int irq, cpumask_t mask) { - irq_affinity[irq] = mask; + irq_desc[irq].affinity = mask; } #else static inline void set_native_irq_info(int irq, cpumask_t mask) diff -puN kernel/irq/handle.c~genirq-cleanup-merge-irq_affinity-into-irq_desc kernel/irq/handle.c --- devel/kernel/irq/handle.c~genirq-cleanup-merge-irq_affinity-into-irq_desc 2006-05-22 15:12:21.000000000 -0700 +++ devel-akpm/kernel/irq/handle.c 2006-05-22 15:12:21.000000000 -0700 @@ -32,7 +32,10 @@ irq_desc_t irq_desc[NR_IRQS] __cacheline [0 ... NR_IRQS-1] = { .status = IRQ_DISABLED, .chip = &no_irq_type, - .lock = SPIN_LOCK_UNLOCKED + .lock = SPIN_LOCK_UNLOCKED, +#ifdef CONFIG_SMP + .affinity = CPU_MASK_ALL +#endif } }; diff -puN kernel/irq/manage.c~genirq-cleanup-merge-irq_affinity-into-irq_desc kernel/irq/manage.c --- devel/kernel/irq/manage.c~genirq-cleanup-merge-irq_affinity-into-irq_desc 2006-05-22 15:12:21.000000000 -0700 +++ devel-akpm/kernel/irq/manage.c 2006-05-22 15:12:21.000000000 -0700 @@ -16,8 +16,6 @@ #ifdef CONFIG_SMP -cpumask_t irq_affinity[NR_IRQS] = { [0 ... NR_IRQS-1] = CPU_MASK_ALL }; - #if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE) cpumask_t __cacheline_aligned pending_irq_cpumask[NR_IRQS]; #endif diff -puN kernel/irq/proc.c~genirq-cleanup-merge-irq_affinity-into-irq_desc kernel/irq/proc.c --- devel/kernel/irq/proc.c~genirq-cleanup-merge-irq_affinity-into-irq_desc 2006-05-22 15:12:21.000000000 -0700 +++ devel-akpm/kernel/irq/proc.c 2006-05-22 15:12:21.000000000 -0700 @@ -36,7 +36,7 @@ void proc_set_irq_affinity(unsigned int void proc_set_irq_affinity(unsigned int irq, cpumask_t mask_val) { set_balance_irq_affinity(irq, mask_val); - irq_affinity[irq] = mask_val; + irq_desc[irq].affinity = mask_val; irq_desc[irq].chip->set_affinity(irq, mask_val); } #endif @@ -44,7 +44,7 @@ void proc_set_irq_affinity(unsigned int static int irq_affinity_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data) { - int len = cpumask_scnprintf(page, count, irq_affinity[(long)data]); + int len = cpumask_scnprintf(page, count, irq_desc[(long)data].affinity); if (count - len < 2) return -EINVAL; _ Patches currently in -mm which might be from mingo@xxxxxxx are git-acpi.patch fix-drivers-mfd-ucb1x00-corec-irq-probing-bug.patch git-dvb.patch git-netdev-all.patch fix-for-serial-uart-lockup.patch qla2xxx-lock-ordering-fix.patch qla2xxx-lock-ordering-fix-warning-fix.patch swapless-pm-add-r-w-migration-entries-fix.patch i386-break-out-of-recursion-in-stackframe-walk.patch work-around-ppc64-bootup-bug-by-making-mutex-debugging-save-restore-irqs.patch kernel-kernel-cpuc-to-mutexes.patch cond-resched-might-sleep-fix.patch define-__raw_get_cpu_var-and-use-it.patch ide-cd-end-of-media-error-fix.patch time-clocksource-infrastructure.patch sched-comment-bitmap-size-accounting.patch sched-fix-interactive-ceiling-code.patch sched-implement-smpnice.patch sched-protect-calculation-of-max_pull-from-integer-wrap.patch sched-store-weighted-load-on-up.patch sched-add-discrete-weighted-cpu-load-function.patch sched-prevent-high-load-weight-tasks-suppressing-balancing.patch sched-improve-stability-of-smpnice-load-balancing.patch sched-improve-smpnice-load-balancing-when-load-per-task.patch smpnice-dont-consider-sched-groups-which-are-lightly-loaded-for-balancing.patch smpnice-dont-consider-sched-groups-which-are-lightly-loaded-for-balancing-fix.patch sched-modify-move_tasks-to-improve-load-balancing-outcomes.patch sched-avoid-unnecessarily-moving-highest-priority-task-move_tasks.patch sched-avoid-unnecessarily-moving-highest-priority-task-move_tasks-fix-2.patch sched_domain-handle-kmalloc-failure.patch sched_domain-handle-kmalloc-failure-fix.patch sched_domain-dont-use-gfp_atomic.patch sched_domain-use-kmalloc_node.patch sched_domain-allocate-sched_group-structures-dynamically.patch sched-add-above-background-load-function.patch mm-implement-swap-prefetching-fix.patch pi-futex-futex-code-cleanups.patch pi-futex-futex-code-cleanups-fix.patch pi-futex-introduce-debug_check_no_locks_freed.patch pi-futex-add-plist-implementation.patch pi-futex-scheduler-support-for-pi.patch pi-futex-rt-mutex-core.patch pi-futex-rt-mutex-core-fix-timeout-race.patch pi-futex-rt-mutex-docs.patch pi-futex-rt-mutex-debug.patch pi-futex-rt-mutex-tester.patch pi-futex-rt-mutex-futex-api.patch pi-futex-futex_lock_pi-futex_unlock_pi-support.patch pi-futex-v2.patch pi-futex-v3.patch pi-futex-patchset-v4.patch pi-futex-patchset-v4-update.patch pi-futex-patchset-v4-fix.patch rtmutex-remove-buggy-bug_on-in-pi-boosting-code.patch futex-pi-enforce-waiter-bit-when-owner-died-is-detected.patch rtmutex-debug-printk-correct-task-information.patch futex-pi-make-use-of-restart_block-when-interrupted.patch document-futex-pi-design.patch futex_requeue-optimization.patch reiser4.patch genirq-rename-desc-handler-to-desc-chip.patch genirq-rename-desc-handler-to-desc-chip-power-fix.patch genirq-rename-desc-handler-to-desc-chip-ia64-fix.patch genirq-sem2mutex-probe_sem-probing_active.patch genirq-cleanup-merge-irq_affinity-into-irq_desc.patch genirq-cleanup-remove-irq_descp.patch genirq-cleanup-remove-fastcall.patch genirq-cleanup-misc-code-cleanups.patch genirq-cleanup-reduce-irq_desc_t-use-mark-it-obsolete.patch genirq-cleanup-include-linux-irqh.patch genirq-cleanup-merge-irq_dir-smp_affinity_entry-into-irq_desc.patch genirq-cleanup-merge-pending_irq_cpumask-into-irq_desc.patch genirq-cleanup-turn-arch_has_irq_per_cpu-into-config_irq_per_cpu.patch genirq-debug-better-debug-printout-in-enable_irq.patch genirq-add-retrigger-irq-op-to-consolidate-hw_irq_resend.patch genirq-doc-comment-include-linux-irqh-structures.patch genirq-doc-handle_irq_event-and-__do_irq-comments.patch genirq-cleanup-no_irq_type-cleanups.patch genirq-doc-add-design-documentation.patch genirq-add-genirq-sw-irq-retrigger.patch genirq-add-irq_noprobe-support.patch genirq-add-irq_norequest-support.patch genirq-add-irq_noautoen-support.patch genirq-update-copyrights.patch genirq-core.patch genirq-add-irq-chip-support.patch genirq-add-handle_bad_irq.patch genirq-add-irq-wake-power-management-support.patch genirq-add-sa_trigger-support.patch genirq-cleanup-no_irq_type-no_irq_chip-rename.patch genirq-convert-the-x86_64-architecture-to-irq-chips.patch genirq-convert-the-i386-architecture-to-irq-chips.patch genirq-more-verbose-debugging-on-unexpected-irq-vectors.patch detect-atomic-counter-underflows.patch debug-shared-irqs.patch make-frame_pointer-default=y.patch mutex-subsystem-synchro-test-module.patch add-print_fatal_signals-support.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