|
@@ -310,13 +310,6 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev)
|
|
|
|
|
|
data->bucket = which_bucket(data->next_timer_us);
|
|
data->bucket = which_bucket(data->next_timer_us);
|
|
|
|
|
|
- /*
|
|
|
|
- * if the correction factor is 0 (eg first time init or cpu hotplug
|
|
|
|
- * etc), we actually want to start out with a unity factor.
|
|
|
|
- */
|
|
|
|
- if (data->correction_factor[data->bucket] == 0)
|
|
|
|
- data->correction_factor[data->bucket] = RESOLUTION * DECAY;
|
|
|
|
-
|
|
|
|
/*
|
|
/*
|
|
* Force the result of multiplication to be 64 bits even if both
|
|
* Force the result of multiplication to be 64 bits even if both
|
|
* operands are 32 bits.
|
|
* operands are 32 bits.
|
|
@@ -466,9 +459,17 @@ static int menu_enable_device(struct cpuidle_driver *drv,
|
|
struct cpuidle_device *dev)
|
|
struct cpuidle_device *dev)
|
|
{
|
|
{
|
|
struct menu_device *data = &per_cpu(menu_devices, dev->cpu);
|
|
struct menu_device *data = &per_cpu(menu_devices, dev->cpu);
|
|
|
|
+ int i;
|
|
|
|
|
|
memset(data, 0, sizeof(struct menu_device));
|
|
memset(data, 0, sizeof(struct menu_device));
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * if the correction factor is 0 (eg first time init or cpu hotplug
|
|
|
|
+ * etc), we actually want to start out with a unity factor.
|
|
|
|
+ */
|
|
|
|
+ for(i = 0; i < BUCKETS; i++)
|
|
|
|
+ data->correction_factor[i] = RESOLUTION * DECAY;
|
|
|
|
+
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|