aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/rack-meter.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c
index 909908ebf164..6dc26b61219b 100644
--- a/drivers/macintosh/rack-meter.c
+++ b/drivers/macintosh/rack-meter.c
@@ -81,12 +81,13 @@ static int rackmeter_ignore_nice;
81 */ 81 */
82static inline cputime64_t get_cpu_idle_time(unsigned int cpu) 82static inline cputime64_t get_cpu_idle_time(unsigned int cpu)
83{ 83{
84 cputime64_t retval; 84 u64 retval;
85 85
86 retval = kstat_cpu(cpu).cpustat.idle + kstat_cpu(cpu).cpustat.iowait; 86 retval = kcpustat_cpu(cpu).cpustat[CPUTIME_IDLE] +
87 kcpustat_cpu(cpu).cpustat[CPUTIME_IOWAIT];
87 88
88 if (rackmeter_ignore_nice) 89 if (rackmeter_ignore_nice)
89 retval += kstat_cpu(cpu).cpustat.nice; 90 retval += kcpustat_cpu(cpu).cpustat[CPUTIME_NICE];
90 91
91 return retval; 92 return retval;
92} 93}