• Rafael J. Wysocki's avatar
    PM / Runtime: Don't run callbacks under lock for power.irq_safe set · ad3c36a5
    Rafael J. Wysocki authored
    The rpm_suspend() and rpm_resume() routines execute subsystem or PM
    domain callbacks under power.lock if power.irq_safe is set for the
    given device.  This is inconsistent with that rpm_idle() does after
    commit 02b26774 (PM / Runtime: Allow _put_sync() from
    interrupts-disabled context) and is problematic for subsystems and PM
    domains wanting to use power.lock for synchronization in their
    runtime PM callbacks.
    
    This change requires the code checking if the device's runtime PM
    status is RPM_SUSPENDING or RPM_RESUMING to be modified too, to take
    the power.irq_safe set case into account (that code wasn't reachable
    before with power.irq_safe set, because it's executed with the
    device's power.lock held).
    Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
    Reviewed-by: default avatarMing Lei <tom.leiming@gmail.com>
    Reviewed-by: default avatarKevin Hilman <khilman@ti.com>
    ad3c36a5
runtime.c 34.7 KB