diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-13 10:56:24 +0200 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-13 10:56:24 +0200 |
commit | 74b8721099992b76d3faff78cb8a5d13c65c3529 (patch) | |
tree | 2c9971160051cae98237715f791ce2b93a0720b5 /drivers/cpuidle/governors/menu.c | |
parent | Merge branch 'for-russell' of git://codeaurora.org/quic/kernel/dwalker/linux-... (diff) | |
parent | [ARM] pxa: add namespace on ssp (diff) | |
download | linux-74b8721099992b76d3faff78cb8a5d13c65c3529.tar.xz linux-74b8721099992b76d3faff78cb8a5d13c65c3529.zip |
Merge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel-stable
Diffstat (limited to 'drivers/cpuidle/governors/menu.c')
-rw-r--r-- | drivers/cpuidle/governors/menu.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c index 1aea7157d8ff..f8e57c6303f2 100644 --- a/drivers/cpuidle/governors/menu.c +++ b/drivers/cpuidle/governors/menu.c @@ -100,7 +100,6 @@ struct menu_device { int needs_update; unsigned int expected_us; - unsigned int measured_us; u64 predicted_us; unsigned int exit_us; unsigned int bucket; @@ -187,14 +186,14 @@ static int menu_select(struct cpuidle_device *dev) int i; int multiplier; - data->last_state_idx = 0; - data->exit_us = 0; - if (data->needs_update) { menu_update(dev); data->needs_update = 0; } + data->last_state_idx = 0; + data->exit_us = 0; + /* Special case when user has set very strict latency requirement */ if (unlikely(latency_req == 0)) return 0; @@ -294,7 +293,7 @@ static void menu_update(struct cpuidle_device *dev) new_factor = data->correction_factor[data->bucket] * (DECAY - 1) / DECAY; - if (data->expected_us > 0 && data->measured_us < MAX_INTERESTING) + if (data->expected_us > 0 && measured_us < MAX_INTERESTING) new_factor += RESOLUTION * measured_us / data->expected_us; else /* |