Commit 785426c7 authored by Brad Heilbrun's avatar Brad Heilbrun Committed by Linus Torvalds

[PATCH] APM compile fix, "stime" update broke it

Fix APM that got broken by getting rid of "struct tms" and clock_t.
parent f9fc1633
......@@ -814,16 +814,16 @@ static void apm_cpu_idle(void)
if (jiffies_since_last_check > IDLE_CALC_LIMIT) {
use_apm_idle = 0;
last_jiffies = jiffies;
last_stime = current->times.tms_stime;
last_stime = current->stime;
} else if (jiffies_since_last_check > idle_period) {
unsigned int idle_percentage;
idle_percentage = current->times.tms_stime - last_stime;
idle_percentage = current->stime - last_stime;
idle_percentage *= 100;
idle_percentage /= jiffies_since_last_check;
use_apm_idle = (idle_percentage > idle_threshold);
last_jiffies = jiffies;
last_stime = current->times.tms_stime;
last_stime = current->stime;
}
bucket = IDLE_LEAKY_MAX;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment