diff options
author | Yi Yang <yi.y.yang@intel.com> | 2008-02-25 03:46:12 +0300 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-03-26 07:45:26 +0300 |
commit | 8b78cf602fd3bd97c0080edd22fe8fd5d0fa7832 (patch) | |
tree | e5f8d7f74c0c1dbd03af793e0b7cb8fb1c06ccdf /drivers/cpuidle/cpuidle.c | |
parent | 996520c1fdd2948addb629be56c9febf2967e02b (diff) | |
download | linux-8b78cf602fd3bd97c0080edd22fe8fd5d0fa7832.tar.xz |
cpuidle: fix cpuidle time and usage overflow
cpuidle C-state sysfs node time and usage are very easy to overflow because
they are all of unsigned int type, time will overflow within about two hours,
usage will take longer time to overflow, but they are increasing for ever.
This patch will convert them to unsigned long long.
Signed-off-by: Yi Yang <yi.y.yang@intel.com>
Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/cpuidle/cpuidle.c')
-rw-r--r-- | drivers/cpuidle/cpuidle.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index d73663a52324..d42deb310ac7 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -67,7 +67,7 @@ static void cpuidle_idle_call(void) /* enter the state and update stats */ dev->last_residency = target_state->enter(dev, target_state); dev->last_state = target_state; - target_state->time += dev->last_residency; + target_state->time += (unsigned long long)dev->last_residency; target_state->usage++; /* give the governor an opportunity to reflect on the outcome */ |