• Sebastian Andrzej Siewior's avatar
    x86: devicetree: Configure IOAPIC pin only once · 20443598
    Sebastian Andrzej Siewior authored
    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: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
    Link: http://lkml.kernel.org/r/%3C20110427143052.GA15211%40linutronix.de%3ESigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    20443598
io_apic.h 5.26 KB