• Guilherme G. Piccoli's avatar
    parisc: Replace regular spinlock with spin_trylock on panic path · 829632da
    Guilherme G. Piccoli authored
    The panic notifiers' callbacks execute in an atomic context, with
    interrupts/preemption disabled, and all CPUs not running the panic
    function are off, so it's very dangerous to wait on a regular
    spinlock, there's a risk of deadlock.
    
    Refactor the panic notifier of parisc/power driver to make use
    of spin_trylock - for that, we've added a second version of the
    soft-power function. Also, some comments were reorganized and
    trailing white spaces, useless header inclusion and blank lines
    were removed.
    
    Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
    Cc: Jeroen Roovers <jer@xs4all.nl>
    Acked-by: Helge Deller <deller@gmx.de> # parisc
    Signed-off-by: default avatarGuilherme G. Piccoli <gpiccoli@igalia.com>
    Signed-off-by: default avatarHelge Deller <deller@gmx.de>
    829632da
power.c 7.41 KB