cpuidle: powernv: Don't continually set thread priority in snooze_loop()
authorAnton Blanchard <anton@samba.org>
Mon, 3 Apr 2017 21:54:13 +0000 (07:54 +1000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 19 Apr 2017 21:17:18 +0000 (23:17 +0200)
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 <anton@samba.org>
Reviewed-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/cpuidle-powernv.c

index 0ddf1a5bb0a91504a98b924c40fa1fabb6b03794..f8901671fff478fda663e514452b3cd59d43f360 100644 (file)
@@ -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;
        }