• Mark Nelson's avatar
    powerpc/pseries: Track previous CPPR values to correctly EOI interrupts · 49bd3647
    Mark Nelson authored
    At the moment when we EOI an interrupt we set the CPPR back to 0xFF
    regardless of its previous value. This could lead to problems if we
    take an interrupt with a priority of 5, but before EOIing it we get
    an IPI which has a priority of 4. The problem is that at the moment
    when we EOI the IPI we will set the CPPR to 0xFF, but it should
    really be set back to 5 (the previous priority).
    
    To keep track of the previous CPPR values we create the xics_cppr
    structure that has an array for CPPR values and an index pointing
    to the current priority. This can easily grow if new priorities get
    added in the future.
    
    This will also be useful because the partition adjunct option of
    upcoming machines will update the H_XIRR hcall to accept the CPPR
    as a parameter.
    Signed-off-by: default avatarMark Nelson <markn@au1.ibm.com>
    Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    49bd3647
xics.c 21.2 KB