diff options
author | Yi Yang <yi.y.yang@intel.com> | 2008-02-24 19:46:12 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-03-26 00:45:26 -0400 |
commit | 8b78cf602fd3bd97c0080edd22fe8fd5d0fa7832 (patch) | |
tree | e5f8d7f74c0c1dbd03af793e0b7cb8fb1c06ccdf /include | |
parent | 996520c1fdd2948addb629be56c9febf2967e02b (diff) |
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 'include')
-rw-r--r-- | include/linux/cpuidle.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 6b72a4584086..51e6b1e520e6 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
@@ -38,8 +38,8 @@ struct cpuidle_state { | |||
38 | unsigned int power_usage; /* in mW */ | 38 | unsigned int power_usage; /* in mW */ |
39 | unsigned int target_residency; /* in US */ | 39 | unsigned int target_residency; /* in US */ |
40 | 40 | ||
41 | unsigned int usage; | 41 | unsigned long long usage; |
42 | unsigned int time; /* in US */ | 42 | unsigned long long time; /* in US */ |
43 | 43 | ||
44 | int (*enter) (struct cpuidle_device *dev, | 44 | int (*enter) (struct cpuidle_device *dev, |
45 | struct cpuidle_state *state); | 45 | struct cpuidle_state *state); |