From: H. Peter Anvin Date: Tue, 23 Feb 2010 00:25:18 +0000 (-0800) Subject: Merge remote branch 'origin/x86/apic' into x86/mrst X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=54b56170e4517e9606b245c3f805fc96baa059f0;p=linux-beck.git Merge remote branch 'origin/x86/apic' into x86/mrst Conflicts: arch/x86/kernel/apic/io_apic.c --- 54b56170e4517e9606b245c3f805fc96baa059f0 diff --cc arch/x86/include/asm/i8259.h index 2832babd91fc,7ec65b18085d..1655147646aa --- a/arch/x86/include/asm/i8259.h +++ b/arch/x86/include/asm/i8259.h @@@ -24,8 -24,13 +24,8 @@@ extern unsigned int cached_irq_mask #define SLAVE_ICW4_DEFAULT 0x01 #define PIC_ICW4_AEOI 2 - extern spinlock_t i8259A_lock; + extern raw_spinlock_t i8259A_lock; -extern void init_8259A(int auto_eoi); -extern void enable_8259A_irq(unsigned int irq); -extern void disable_8259A_irq(unsigned int irq); -extern unsigned int startup_8259A_irq(unsigned int irq); - /* the PIC may need a careful delay on some platforms, hence specific calls */ static inline unsigned char inb_pic(unsigned int port) { diff --cc arch/x86/kernel/apic/io_apic.c index 3592a72f3f0a,979589881c80..b34854358ee6 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@@ -167,8 -166,14 +167,14 @@@ int __init arch_early_irq_init(void desc->chip_data = &cfg[i]; zalloc_cpumask_var_node(&cfg[i].domain, GFP_NOWAIT, node); zalloc_cpumask_var_node(&cfg[i].old_domain, GFP_NOWAIT, node); - if (i < legacy_pic->nr_legacy_irqs) - cpumask_setall(cfg[i].domain); + /* + * For legacy IRQ's, start with assigning irq0 to irq15 to + * IRQ0_VECTOR to IRQ15_VECTOR on cpu 0. + */ - if (i < nr_legacy_irqs) { ++ if (i < legacy_pic->nr_legacy_irqs) { + cfg[i].vector = IRQ0_VECTOR + i; + cpumask_set_cpu(0, cfg[i].domain); + } } return 0; @@@ -2180,10 -2250,10 +2251,10 @@@ static unsigned int startup_ioapic_irq( unsigned long flags; struct irq_cfg *cfg; - spin_lock_irqsave(&ioapic_lock, flags); + raw_spin_lock_irqsave(&ioapic_lock, flags); - if (irq < nr_legacy_irqs) { - disable_8259A_irq(irq); - if (i8259A_irq_pending(irq)) + if (irq < legacy_pic->nr_legacy_irqs) { + legacy_pic->chip->mask(irq); + if (legacy_pic->irq_pending(irq)) was_pending = 1; } cfg = irq_cfg(irq); diff --cc arch/x86/kernel/i8259.c index 1c790e75f7a0,8c93a84bb627..9bac6817456f --- a/arch/x86/kernel/i8259.c +++ b/arch/x86/kernel/i8259.c @@@ -32,14 -32,8 +32,14 @@@ */ static int i8259A_auto_eoi; - DEFINE_SPINLOCK(i8259A_lock); + DEFINE_RAW_SPINLOCK(i8259A_lock); static void mask_and_ack_8259A(unsigned int); +static void mask_8259A(void); +static void unmask_8259A(void); +static void disable_8259A_irq(unsigned int irq); +static void enable_8259A_irq(unsigned int irq); +static void init_8259A(int auto_eoi); +static int i8259A_irq_pending(unsigned int irq); struct irq_chip i8259A_chip = { .name = "XT-PIC", @@@ -80,10 -74,10 +80,10 @@@ static void disable_8259A_irq(unsigned outb(cached_slave_mask, PIC_SLAVE_IMR); else outb(cached_master_mask, PIC_MASTER_IMR); - spin_unlock_irqrestore(&i8259A_lock, flags); + raw_spin_unlock_irqrestore(&i8259A_lock, flags); } -void enable_8259A_irq(unsigned int irq) +static void enable_8259A_irq(unsigned int irq) { unsigned int mask = ~(1 << irq); unsigned long flags; @@@ -94,10 -88,10 +94,10 @@@ outb(cached_slave_mask, PIC_SLAVE_IMR); else outb(cached_master_mask, PIC_MASTER_IMR); - spin_unlock_irqrestore(&i8259A_lock, flags); + raw_spin_unlock_irqrestore(&i8259A_lock, flags); } -int i8259A_irq_pending(unsigned int irq) +static int i8259A_irq_pending(unsigned int irq) { unsigned int mask = 1<