diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2011-04-27 16:30:52 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-04-28 11:38:30 +0200 |
commit | 20443598d9bdfe3563f901e27fd482a3f5d3d231 (patch) | |
tree | ccab9d3d7a94e6f5ce700edf2ae3889668bdf3b4 /arch/x86/kernel/devicetree.c | |
parent | 39b68976ac653cfdc7f872a293e8b7928de2dcc6 (diff) | |
download | linux-stable-20443598d9bdfe3563f901e27fd482a3f5d3d231.tar.gz linux-stable-20443598d9bdfe3563f901e27fd482a3f5d3d231.tar.bz2 linux-stable-20443598d9bdfe3563f901e27fd482a3f5d3d231.zip |
x86: devicetree: Configure IOAPIC pin only once
We use io_apic_setup_irq_pin() in order to configure pin's interrupt
number polarity and type. This is done on every irq_create_of_mapping()
which happens for instance during pci enable calls. Level typed
interrupts are masked by default, edge are unmasked.
On the first ->xlate() call the level interrupt is configured and
masked. The driver calls request_irq() and the line is unmasked. Lets
assume the interrupt line is shared with another device and we call
pci_enable_device() for this device. The ->xlate() configures the pin
again and it is masked. request_irq() does not unmask the line because
it _is_ already unmasked according to its internal state. So the
interrupt will never be unmasked again.
This patch is based on an earlier work by Torben Hohn and solves the
problem by configuring the pin only once. Since all devices must agree
on the same type and polarity there is no point in configuring the pin
more than once.
[ tglx: Split out the ce4100 part into a separate patch ]
Cc: Torben Hohn <torbenh@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: http://lkml.kernel.org/r/%3C20110427143052.GA15211%40linutronix.de%3E
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/devicetree.c')
-rw-r--r-- | arch/x86/kernel/devicetree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c index 706a9fb46a58..e90f08458e6b 100644 --- a/arch/x86/kernel/devicetree.c +++ b/arch/x86/kernel/devicetree.c @@ -391,7 +391,7 @@ static int ioapic_xlate(struct irq_domain *id, const u32 *intspec, u32 intsize, set_io_apic_irq_attr(&attr, idx, line, it->trigger, it->polarity); - return io_apic_setup_irq_pin(*out_hwirq, cpu_to_node(0), &attr); + return io_apic_setup_irq_pin_once(*out_hwirq, cpu_to_node(0), &attr); } static void __init ioapic_add_ofnode(struct device_node *np) |