ARM: tegra: cpuidle: Handle tick broadcasting within cpuidle core on Tegra20/30
Subsystems (3)
PATCH 1/1 ARM: tegra: cpuidle: Handle tick broadcasting within cpuidle core on Tegra20/30
Tegra20/30 drivers do not handle the tick_broadcast_enter() error which potentially could happen when CPU timer isn't permitted to be stopped. Let's just move out the broadcasting to the CPUIDLE core by setting the respective flag in the Tegra20/30 drivers. This patch doesn't fix any problem because currently tick_broadcast_enter() could fail only on ARM64, so consider this change as a minor cleanup.
--- arch/arm/mach-tegra/cpuidle-tegra20.c | 11 ++--------- arch/arm/mach-tegra/cpuidle-tegra30.c | 9 +-------- 2 files changed, 3 insertions(+), 17 deletions(-)
arch/arm/mach-tegra/cpuidle-tegra20.c +2 -9
@@ -61,7 +61,8 @@ static struct cpuidle_driver tegra_idle_driver = { .exit_latency = 5000, .target_residency = 10000, .power_usage = 0, - .flags = CPUIDLE_FLAG_COUPLED, + .flags =CPUIDLE_FLAG_COUPLED | + CPUIDLE_FLAG_TIMER_STOP, .name = "powered-down", .desc = "CPU power gated", },
@@ -136,12 +137,8 @@ static bool tegra20_cpu_cluster_power_down(struct cpuidle_device *dev,if (tegra20_reset_cpu_1 () || !tegra_cpu_rail_off_ready ())return false; -tick_broadcast_enter (); -tegra_idle_lp2_last (); -tick_broadcast_exit (); -if (cpu_online (1 ))tegra20_wake_cpu1_from_reset ();
@@ -153,14 +150,10 @@ static bool tegra20_idle_enter_lp2_cpu_1(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) { -tick_broadcast_enter (); -cpu_suspend (0 , tegra20_sleep_cpu_secondary_finish);tegra20_cpu_clear_resettable (); -tick_broadcast_exit (); -return true; }#else
arch/arm/mach-tegra/cpuidle-tegra30.c +1 -8
@@ -56,6 +56,7 @@ static struct cpuidle_driver tegra_idle_driver = { .exit_latency = 2000, .target_residency = 2200, .power_usage = 0, + .flags = CPUIDLE_FLAG_TIMER_STOP, .name = "powered-down", .desc = "CPU power gated", },
@@ -76,12 +77,8 @@ static bool tegra30_cpu_cluster_power_down(struct cpuidle_device *dev,return false; } -tick_broadcast_enter (); -tegra_idle_lp2_last (); -tick_broadcast_exit (); -return true; }
@@ -90,14 +87,10 @@ static bool tegra30_cpu_core_power_down(struct cpuidle_device *dev,struct cpuidle_driver *drv, int index) { -tick_broadcast_enter (); -smp_wmb ();cpu_suspend (0 , tegra30_sleep_cpu_secondary_finish); -tick_broadcast_exit (); -return true; }#else
Signature · 1 line
2.20.1
24.02.2019 18:21, Dmitry Osipenko пишет:
Quoted 7 lines
Tegra20/30 drivers do not handle the
tick_broadcast_enter()error which potentially could happen when CPU timer isn't permitted to be stopped. Let's just move out the broadcasting to the CPUIDLE core by setting the respective flag in the Tegra20/30 drivers. This patch doesn't fix any problem because currentlytick_broadcast_enter()could fail only on ARM64, so consider this change as a minor cleanup.
Quoted 5 lines
Signed-off-by Dmitry Osipenko <[email protected]>--- arch/arm/mach-tegra/cpuidle-tegra20.c | 11 ++--------- arch/arm/mach-tegra/cpuidle-tegra30.c | 9 +-------- 2 files changed, 3 insertions(+), 17 deletions(-)
Hello Jon and Thierry,
Could you please pick up this patch? Thanks in advance.
Thierry Reding
AppliedQuoted 7 lines · Dmitry Osipenko
Tegra20/30 drivers do not handle the
tick_broadcast_enter()error which potentially could happen when CPU timer isn't permitted to be stopped. Let's just move out the broadcasting to the CPUIDLE core by setting the respective flag in the Tegra20/30 drivers. This patch doesn't fix any problem because currentlytick_broadcast_enter()could fail only on ARM64, so consider this change as a minor cleanup.
Quoted 5 lines
Signed-off-by Dmitry Osipenko <[email protected]>--- arch/arm/mach-tegra/cpuidle-tegra20.c | 11 ++--------- arch/arm/mach-tegra/cpuidle-tegra30.c | 9 +-------- 2 files changed, 3 insertions(+), 17 deletions(-)
Applied to for-5.2/arm/soc, thanks.
Thierry