Even when nohz is not runtime enabled, the dynticks idle cputime accounting can run and the common idle cputime accessors are still relevant. Remove the nohz disabled special case accordingly.
Unified · Split
| @@ -795,9 +795,6 @@ static u64 get_cpu_sleep_time_us(int cpu, enum cpu_usage_stat idx, · 794 unmodified lines | |||
| 795 | ktime_t now, idle; | 795 | ktime_t now, idle; |
| 796 | unsigned int seq; | 796 | unsigned int seq; |
| 797 | 797 | ||
| 798 | if (!tick_nohz_active) | ||
| 799 | return -1; | ||
| 800 | |||
| 801 | now = ktime_get(); | 798 | now = ktime_get(); |
| 802 | if (last_update_time) | 799 | if (last_update_time) |
| 803 | *last_update_time = ktime_to_us(now); | 800 | *last_update_time = ktime_to_us(now); |
| @@ -839,7 +836,7 @@ static u64 get_cpu_sleep_time_us(int cpu, enum cpu_usage_stat idx, · 35 unmodified lines | |||
| 839 | * This time is measured via accounting rather than sampling, | 836 | * This time is measured via accounting rather than sampling, |
| 840 | * and is as accurate as ktime_get() is. | 837 | * and is as accurate as ktime_get() is. |
| 841 | * | 838 | * |
| 842 | * Return: -1 if NOHZ is not enabled, else total idle time of the @cpu | 839 | * Return: -1 if generic vtime is enabled, else total idle time of the @cpu |
| 843 | */ | 840 | */ |
| 844 | u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time) | 841 | u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time) |
| 845 | { | 842 | { |
| @@ -863,7 +860,7 @@ EXPORT_SYMBOL_GPL(get_cpu_idle_time_us); · 17 unmodified lines | |||
| 863 | * This time is measured via accounting rather than sampling, | 860 | * This time is measured via accounting rather than sampling, |
| 864 | * and is as accurate as ktime_get() is. | 861 | * and is as accurate as ktime_get() is. |
| 865 | * | 862 | * |
| 866 | * Return: -1 if NOHZ is not enabled, else total iowait time of @cpu | 863 | * Return: -1 if generic vtime is enabled, else total iowait time of @cpu |
| 867 | */ | 864 | */ |
| 868 | u64 get_cpu_iowait_time_us(int cpu, u64 *last_update_time) | 865 | u64 get_cpu_iowait_time_us(int cpu, u64 *last_update_time) |
| 869 | { | 866 | { |