aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/cpuidle.c
diff options
context:
space:
mode:
authorDeepthi Dharwar <deepthi@linux.vnet.ibm.com>2011-10-28 06:50:33 -0400
committerLen Brown <len.brown@intel.com>2011-11-06 21:13:49 -0500
commit4202735e8ab6ecfb0381631a0d0b58fefe0bd4e2 (patch)
tree189e5aab466995128c5a9d5a2a4075a5db530674 /arch/arm/mach-davinci/cpuidle.c
parentb25edc42bfb9602f0503474b2c94701d5536ce60 (diff)
cpuidle: Split cpuidle_state structure and move per-cpu statistics fields
This is the first step towards global registration of cpuidle states. The statistics used primarily by the governor are per-cpu and have to be split from rest of the fields inside cpuidle_state, which would be made global i.e. single copy. The driver_data field is also per-cpu and moved. Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com> Signed-off-by: Trinabh Gupta <g.trinabh@gmail.com> Tested-by: Jean Pihet <j-pihet@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com> Acked-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'arch/arm/mach-davinci/cpuidle.c')
-rw-r--r--arch/arm/mach-davinci/cpuidle.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mach-davinci/cpuidle.c b/arch/arm/mach-davinci/cpuidle.c
index ca8582a95ad9..f2d2f34603d9 100644
--- a/arch/arm/mach-davinci/cpuidle.c
+++ b/arch/arm/mach-davinci/cpuidle.c
@@ -80,7 +80,8 @@ static struct davinci_ops davinci_states[DAVINCI_CPUIDLE_MAX_STATES] = {
80static int davinci_enter_idle(struct cpuidle_device *dev, 80static int davinci_enter_idle(struct cpuidle_device *dev,
81 int index) 81 int index)
82{ 82{
83 struct davinci_ops *ops = cpuidle_get_statedata(&dev->states[index]); 83 struct cpuidle_state_usage *state_usage = &dev->states_usage[index];
84 struct davinci_ops *ops = cpuidle_get_statedata(state_usage);
84 struct timeval before, after; 85 struct timeval before, after;
85 int idle_time; 86 int idle_time;
86 87
@@ -142,7 +143,7 @@ static int __init davinci_cpuidle_probe(struct platform_device *pdev)
142 strcpy(device->states[1].desc, "WFI and DDR Self Refresh"); 143 strcpy(device->states[1].desc, "WFI and DDR Self Refresh");
143 if (pdata->ddr2_pdown) 144 if (pdata->ddr2_pdown)
144 davinci_states[1].flags |= DAVINCI_CPUIDLE_FLAGS_DDR2_PWDN; 145 davinci_states[1].flags |= DAVINCI_CPUIDLE_FLAGS_DDR2_PWDN;
145 cpuidle_set_statedata(&device->states[1], &davinci_states[1]); 146 cpuidle_set_statedata(&device->states_usage[1], &davinci_states[1]);
146 147
147 device->state_count = DAVINCI_CPUIDLE_MAX_STATES; 148 device->state_count = DAVINCI_CPUIDLE_MAX_STATES;
148 149