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>
This commit is contained in:
@@ -38,8 +38,8 @@ struct cpuidle_state {
|
||||
unsigned int power_usage; /* in mW */
|
||||
unsigned int target_residency; /* in US */
|
||||
|
||||
unsigned int usage;
|
||||
unsigned int time; /* in US */
|
||||
unsigned long long usage;
|
||||
unsigned long long time; /* in US */
|
||||
|
||||
int (*enter) (struct cpuidle_device *dev,
|
||||
struct cpuidle_state *state);
|
||||
|
Reference in New Issue
Block a user