• Thomas Gleixner's avatar
    x86/apic: Switch all APICs to Fixed delivery mode · a31e58e1
    Thomas Gleixner authored
    Some of the APIC incarnations are operating in lowest priority delivery
    mode. This worked as long as the vector management code allocated the same
    vector on all possible CPUs for each interrupt.
    
    Lowest priority delivery mode does not necessarily respect the affinity
    setting and may redirect to some other online CPU. This was documented
    somewhere in the old code and the conversion to single target delivery
    missed to update the delivery mode of the affected APIC drivers which
    results in spurious interrupts on some of the affected CPU/Chipset
    combinations.
    
    Switch the APIC drivers over to Fixed delivery mode and remove all
    leftovers of lowest priority delivery mode.
    
    Switching to Fixed delivery mode is not a problem on these CPUs because the
    kernel already uses Fixed delivery mode for IPIs. The reason for this is
    that th SDM explicitely forbids lowest prio mode for IPIs. The reason is
    obvious: If the irq routing does not honor destination targets in lowest
    prio mode then an IPI targeted at CPU1 might end up on CPU0, which would be
    a fatal problem in many cases.
    
    As a consequence of this change, the apic::irq_delivery_mode field is now
    pointless, but this needs to be cleaned up in a separate patch.
    
    Fixes: fdba46ff ("x86/apic: Get rid of multi CPU affinity")
    Reported-by: vcaputo@pengaru.com
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Tested-by: vcaputo@pengaru.com
    Cc: Pavel Machek <pavel@ucw.cz>
    Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1712281140440.1688@nanos
    a31e58e1
apic_flat_64.c 7.21 KB