• Nicholas Piggin's avatar
    powerpc/watchdog: Improve watchdog lock primitive · d8e2a405
    Nicholas Piggin authored
    - Hard-disable interrupts before taking the lock, which prevents
      soft-NMI re-entrancy and therefore can prevent deadlocks.
    - Use raw_ variants of local_irq_disable to avoid irq debugging.
    - When the lock is contended, spin at low SMT priority, using
      loads only, and with interrupts enabled (where possible).
    
    Some stalls have been noticed at high loads that go away with improved
    locking. There should not be so much locking contention in the first
    place (which is addressed in a subsequent patch), but locking should
    still be improved.
    Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    d8e2a405
watchdog.c 9.12 KB