Skip to content
Snippets Groups Projects
  • Marc Zyngier's avatar
    c50b30f3
    irqchip/gic: Atomically update affinity · c50b30f3
    Marc Zyngier authored
    
    commit 005c34ae upstream.
    
    The GIC driver uses a RMW sequence to update the affinity, and
    relies on the gic_lock_irqsave/gic_unlock_irqrestore sequences
    to update it atomically.
    
    But these sequences only expand into anything meaningful if
    the BL_SWITCHER option is selected, which almost never happens.
    
    It also turns out that using a RMW and locks is just as silly,
    as the GIC distributor supports byte accesses for the GICD_TARGETRn
    registers, which when used make the update atomic by definition.
    
    Drop the terminally broken code and replace it by a byte write.
    
    Fixes: 04c8b0f8 ("irqchip/gic: Make locking a BL_SWITCHER only feature")
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    
    c50b30f3
    History
    irqchip/gic: Atomically update affinity
    Marc Zyngier authored
    
    commit 005c34ae upstream.
    
    The GIC driver uses a RMW sequence to update the affinity, and
    relies on the gic_lock_irqsave/gic_unlock_irqrestore sequences
    to update it atomically.
    
    But these sequences only expand into anything meaningful if
    the BL_SWITCHER option is selected, which almost never happens.
    
    It also turns out that using a RMW and locks is just as silly,
    as the GIC distributor supports byte accesses for the GICD_TARGETRn
    registers, which when used make the update atomic by definition.
    
    Drop the terminally broken code and replace it by a byte write.
    
    Fixes: 04c8b0f8 ("irqchip/gic: Make locking a BL_SWITCHER only feature")
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    
Code owners
Assign users and groups as approvers for specific file changes. Learn more.