lkml.org 
[lkml]   [2021]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 7/8] x86/ioapic: Force affinity setup before startup
    The IO/APIC cannot handle interrupt affinity changes safely after startup
    other than from an interrupt handler. The startup sequence in the generic
    interrupt code violates that assumption.

    Mark the irq chip with the new IRQCHIP_AFFINITY_PRE_STARTUP flag so that
    the default interrupt setting happens before the interrupt is started up
    for the first time.

    Fixes: 18404756765c ("genirq: Expose default irq affinity mask (take 3)")
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: x86@kernel.org
    ---
    arch/x86/kernel/apic/io_apic.c | 6 ++++--
    1 file changed, 4 insertions(+), 2 deletions(-)

    --- a/arch/x86/kernel/apic/io_apic.c
    +++ b/arch/x86/kernel/apic/io_apic.c
    @@ -1986,7 +1986,8 @@ static struct irq_chip ioapic_chip __rea
    .irq_set_affinity = ioapic_set_affinity,
    .irq_retrigger = irq_chip_retrigger_hierarchy,
    .irq_get_irqchip_state = ioapic_irq_get_chip_state,
    - .flags = IRQCHIP_SKIP_SET_WAKE,
    + .flags = IRQCHIP_SKIP_SET_WAKE |
    + IRQCHIP_AFFINITY_PRE_STARTUP,
    };

    static struct irq_chip ioapic_ir_chip __read_mostly = {
    @@ -1999,7 +2000,8 @@ static struct irq_chip ioapic_ir_chip __
    .irq_set_affinity = ioapic_set_affinity,
    .irq_retrigger = irq_chip_retrigger_hierarchy,
    .irq_get_irqchip_state = ioapic_irq_get_chip_state,
    - .flags = IRQCHIP_SKIP_SET_WAKE,
    + .flags = IRQCHIP_SKIP_SET_WAKE |
    + IRQCHIP_AFFINITY_PRE_STARTUP,
    };

    static inline void init_IO_APIC_traps(void)
    \
     
     \ /
      Last update: 2021-07-21 21:30    [W:5.607 / U:0.564 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site