Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87855
b: refs/heads/master
c: 8b78cf6
h: refs/heads/master
i:
  87853: 400db64
  87851: 53b04ea
  87847: fa0471d
  87839: 8b8a060
v: v3
  • Loading branch information
Yi Yang authored and Len Brown committed Mar 26, 2008
1 parent 2dbf54e commit 6337af3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 996520c1fdd2948addb629be56c9febf2967e02b
refs/heads/master: 8b78cf602fd3bd97c0080edd22fe8fd5d0fa7832
2 changes: 1 addition & 1 deletion trunk/drivers/cpuidle/cpuidle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
10 changes: 8 additions & 2 deletions trunk/drivers/cpuidle/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,12 @@ static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \
return sprintf(buf, "%u\n", state->_name);\
}

#define define_show_state_ull_function(_name) \
static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \
{ \
return sprintf(buf, "%llu\n", state->_name);\
}

#define define_show_state_str_function(_name) \
static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \
{ \
Expand All @@ -228,8 +234,8 @@ static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \

define_show_state_function(exit_latency)
define_show_state_function(power_usage)
define_show_state_function(usage)
define_show_state_function(time)
define_show_state_ull_function(usage)
define_show_state_ull_function(time)
define_show_state_str_function(name)
define_show_state_str_function(desc)

Expand Down
4 changes: 2 additions & 2 deletions trunk/include/linux/cpuidle.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6337af3

Please sign in to comment.