From: Anton Blanchard Date: Mon, 3 Apr 2017 21:54:13 +0000 (+1000) Subject: cpuidle: powernv: Don't continually set thread priority in snooze_loop() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=26eb48a9faf241abd60aa546e6beb896011667c1;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git cpuidle: powernv: Don't continually set thread priority in snooze_loop() The powerpc64 kernel exception handlers have preserved thread priorities for a long time now, so there is no need to continually set it. Just set it once on entry and once exit. Signed-off-by: Anton Blanchard Reviewed-by: Vaidyanathan Srinivasan Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers/cpuidle/cpuidle-powernv.c index 0ddf1a5bb0a9..f8901671fff4 100644 --- a/drivers/cpuidle/cpuidle-powernv.c +++ b/drivers/cpuidle/cpuidle-powernv.c @@ -56,8 +56,8 @@ static int snooze_loop(struct cpuidle_device *dev, snooze_exit_time = get_tb() + snooze_timeout; ppc64_runlatch_off(); + HMT_very_low(); while (!need_resched()) { - HMT_very_low(); if (snooze_timeout_en && get_tb() > snooze_exit_time) break; }