irq fixes
Linus,
Please pull the latest irq-fixes-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git irq-fixes-for-linus
Thanks,
Ingo
------------------>
Ingo Molnar (1):
irq: fix typo
Mark Nelson (1):
genirq: __irq_set_trigger: change pr_warning to pr_debug
Randy Dunlap (1):
irq.h: fix missing/extra kernel-doc
Thomas Gleixner (3):
genirq: keep affinities set from userspace across free/request_irq()
genirq: fix the affinity setting in setup_irq
x86: apic honour irq affinity which was set in early boot
arch/x86/kernel/io_apic.c | 26 ++++++++++++++--- include/linux/irq.h | 11 ++----- kernel/irq/internals.h | 2 + kernel/irq/manage.c | 68 +++++++++++++++++++++++++++++++++++---------- kernel/irq/migration.c | 11 ------- kernel/irq/proc.c | 2 +- 6 files changed, 80 insertions(+), 40 deletions(-)
arch/x86/kernel/io_apic.c +21 -5
@@ -3775,7 +3775,9 @@ int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity)void __init setup_ioapic_dest (void ) {int pin, ioapic, irq, irq_entry; +struct irq_desc *desc;struct irq_cfg *cfg; +cpumask_t mask;if (skip_ioapic_setup ==1 )return ;
@@ -3792,16 +3794,30 @@ void __init setup_ioapic_dest(void)* cpu is online. */ cfg =irq_cfg (irq); -if (!cfg->vector) +if (!cfg->vector) {setup_IO_APIC_irq (ioapic, pin, irq,irq_trigger (irq_entry),irq_polarity (irq_entry)); +continue ; + + } + +/* +* Honour affinities which have been set in early boot +*/ + desc =irq_to_desc (irq); +if (desc->status & + (IRQ_NO_BALANCING |IRQ_AFFINITY_SET )) + mask = desc->affinity; +else + mask =TARGET_CPUS ; +#ifdef CONFIG_INTR_REMAP - else if (intr_remapping_enabled) - set_ir_ioapic_affinity_irq(irq, TARGET_CPUS); -#endif +if (intr_remapping_enabled) +set_ir_ioapic_affinity_irq (irq, mask); else -set_ioapic_affinity_irq (irq ,TARGET_CPUS ); +#endif +set_ioapic_affinity_irq (irq, mask); } }
include/linux/irq.h +3 -8
@@ -63,7 +63,8 @@ typedef void (*irq_flow_handler_t)(unsigned int irq,#define IRQ_MOVE_PENDING 0x00200000/* need to re-target IRQ destination */ #define IRQ_NO_BALANCING 0x00400000/* IRQ is excluded from balancing */ #define IRQ_SPURIOUS_DISABLED 0x00800000/* IRQ was disabled by the spurious trap */ -#define IRQ_MOVE_PCNTXT 0x01000000/* IRQ migration from process context */ +#define IRQ_MOVE_PCNTXT 0x01000000/* IRQ migration from process context */ +#define IRQ_AFFINITY_SET 0x02000000/* IRQ affinity was set from userspace*/ #ifdef CONFIG_IRQ_PER_CPU # define CHECK_IRQ_PER_CPU (var) ((var) & IRQ_PER_CPU)
@@ -130,7 +131,7 @@ struct irq_chip {/** * struct irq_desc - interrupt descriptor -* +* @irq: interrupt number for this descriptor * @handle_irq: highlevel irq-events handler [if NULL, __do_IRQ()] * @chip: low level interrupt hardware access * @msi_desc: MSI descriptor
@@ -149,7 +150,6 @@ struct irq_chip {* @cpu: cpu index useful for balancing * @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 */ struct irq_desc {
@@ -210,7 +210,6 @@ extern int setup_irq(unsigned int irq, struct irqaction *new);#ifdef CONFIG_GENERIC_PENDING_IRQ -void set_pending_irq (unsigned int irq,cpumask_t mask);void move_native_irq (int irq);void move_masked_irq (int irq);
@@ -228,10 +227,6 @@ static inline void move_masked_irq(int irq) { } -static inline void set_pending_irq (unsigned int irq,cpumask_t mask) -{ -} -#endif /* CONFIG_GENERIC_PENDING_IRQ */ #else /* CONFIG_SMP */
kernel/irq/internals.h +2 -0
@@ -25,6 +25,8 @@ static inline void unregister_handler_proc(unsigned int irq, struct irqaction *action) { }#endif +extern int irq_select_affinity_usr (unsigned int irq); +/* * Debugging printout: */
kernel/irq/manage.c +53 -15
126 lines not on this page · raw message
kernel/irq/migration.c +0 -11
@@ -1,17 +1,6 @@#include <linux/irq.h> -void set_pending_irq (unsigned int irq,cpumask_t mask) -{ -struct irq_desc *desc =irq_to_desc (irq); -unsigned long flags; - -spin_lock_irqsave (&desc->lock, flags); - desc->status |=IRQ_MOVE_PENDING ; - desc->pending_mask = mask; -spin_unlock_irqrestore (&desc->lock, flags); -} -void move_masked_irq (int irq) {struct irq_desc *desc =irq_to_desc (irq);
kernel/irq/proc.c +1 -1
@@ -62,7 +62,7 @@ static ssize_t irq_affinity_proc_write(struct file *file,if (!cpus_intersects (new_value, cpu_online_map))/* Special case for empty set - allow the architecture code to set default SMP affinity. */ -return irq_select_affinity (irq) ? -EINVAL : count; +return irq_select_affinity_usr (irq) ? -EINVAL : count;irq_set_affinity (irq, new_value);