cpuidle: menu: Take negative "sleep length" values into account
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 29 Mar 2021 18:37:12 +0000 (20:37 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 7 Apr 2021 17:26:44 +0000 (19:26 +0200)
commit060e3535adf5c961b01421b9fdaddab8dd43ba85
treea560de19936faa2795782f532914f98b1b4ba8f3
parent030adec9f68e30cbbc24c57296a141943177c148
cpuidle: menu: Take negative "sleep length" values into account

Make the menu governor check the tick_nohz_get_next_hrtimer()
return value so as to avoid dealing with negative "sleep length"
values and make it use that value directly when the tick is stopped.

While at it, rename local variable delta_next in menu_select() to
delta_tick which better reflects its purpose.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/governors/menu.c