]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
ARM: cpuidle: Refactor rollback operations if init fails
authorLeo Yan <leo.yan@linaro.org>
Tue, 10 Oct 2017 05:47:56 +0000 (13:47 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 13 Oct 2017 23:01:11 +0000 (01:01 +0200)
commit7943bfaeb6bbbf595df4bd4087f5b890761c4898
tree33bc6cbc6f66778cf4445363520813346983827e
parent0f87855d969a87f02048ff5ced7503465d5ab2f1
ARM: cpuidle: Refactor rollback operations if init fails

If init fails, we need execute two levels rollback operations: the first
level is for the failed CPU rollback operations, the second level is to
iterate all succeeded CPUs to cancel their registration; currently the
code uses one function to finish these two levels rollback operations.

This commit is to refactor rollback operations, so it adds a new
function arm_idle_init_cpu() to encapsulate one specified CPU driver
registration and rollback the first level operations; and use function
arm_idle_init() to iterate all CPUs and finish the second level's
rollback operations.

Suggested-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/cpuidle-arm.c