diff options
author | Christoph Lameter <cl@linux.com> | 2014-08-17 13:30:30 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-08-26 13:45:45 -0400 |
commit | 229b6863b2cf9514f08e468fea586bc195ebcf50 (patch) | |
tree | 19279cd06093e88822dd0854f073dd9c130c31ff /drivers/cpuidle/governors | |
parent | 1b2a1a7e8ad1144dc3f676f2651cb84e01548d59 (diff) |
drivers/cpuidle: Replace __get_cpu_var uses for address calculation
All of these are for address calculation. Replace with
this_cpu_ptr().
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: linux-pm@vger.kernel.org
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
[cpufreq changes]
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/cpuidle/governors')
-rw-r--r-- | drivers/cpuidle/governors/ladder.c | 4 | ||||
-rw-r--r-- | drivers/cpuidle/governors/menu.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/cpuidle/governors/ladder.c b/drivers/cpuidle/governors/ladder.c index 044ee0df5871..06b57c4c4d80 100644 --- a/drivers/cpuidle/governors/ladder.c +++ b/drivers/cpuidle/governors/ladder.c | |||
@@ -66,7 +66,7 @@ static inline void ladder_do_selection(struct ladder_device *ldev, | |||
66 | static int ladder_select_state(struct cpuidle_driver *drv, | 66 | static int ladder_select_state(struct cpuidle_driver *drv, |
67 | struct cpuidle_device *dev) | 67 | struct cpuidle_device *dev) |
68 | { | 68 | { |
69 | struct ladder_device *ldev = &__get_cpu_var(ladder_devices); | 69 | struct ladder_device *ldev = this_cpu_ptr(&ladder_devices); |
70 | struct ladder_device_state *last_state; | 70 | struct ladder_device_state *last_state; |
71 | int last_residency, last_idx = ldev->last_state_idx; | 71 | int last_residency, last_idx = ldev->last_state_idx; |
72 | int latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY); | 72 | int latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY); |
@@ -170,7 +170,7 @@ static int ladder_enable_device(struct cpuidle_driver *drv, | |||
170 | */ | 170 | */ |
171 | static void ladder_reflect(struct cpuidle_device *dev, int index) | 171 | static void ladder_reflect(struct cpuidle_device *dev, int index) |
172 | { | 172 | { |
173 | struct ladder_device *ldev = &__get_cpu_var(ladder_devices); | 173 | struct ladder_device *ldev = this_cpu_ptr(&ladder_devices); |
174 | if (index > 0) | 174 | if (index > 0) |
175 | ldev->last_state_idx = index; | 175 | ldev->last_state_idx = index; |
176 | } | 176 | } |
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c index 34db2fb3ef1e..710a233b9b0d 100644 --- a/drivers/cpuidle/governors/menu.c +++ b/drivers/cpuidle/governors/menu.c | |||
@@ -289,7 +289,7 @@ again: | |||
289 | */ | 289 | */ |
290 | static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev) | 290 | static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev) |
291 | { | 291 | { |
292 | struct menu_device *data = &__get_cpu_var(menu_devices); | 292 | struct menu_device *data = this_cpu_ptr(&menu_devices); |
293 | int latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY); | 293 | int latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY); |
294 | int i; | 294 | int i; |
295 | unsigned int interactivity_req; | 295 | unsigned int interactivity_req; |
@@ -372,7 +372,7 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev) | |||
372 | */ | 372 | */ |
373 | static void menu_reflect(struct cpuidle_device *dev, int index) | 373 | static void menu_reflect(struct cpuidle_device *dev, int index) |
374 | { | 374 | { |
375 | struct menu_device *data = &__get_cpu_var(menu_devices); | 375 | struct menu_device *data = this_cpu_ptr(&menu_devices); |
376 | data->last_state_idx = index; | 376 | data->last_state_idx = index; |
377 | if (index >= 0) | 377 | if (index >= 0) |
378 | data->needs_update = 1; | 378 | data->needs_update = 1; |
@@ -385,7 +385,7 @@ static void menu_reflect(struct cpuidle_device *dev, int index) | |||
385 | */ | 385 | */ |
386 | static void menu_update(struct cpuidle_driver *drv, struct cpuidle_device *dev) | 386 | static void menu_update(struct cpuidle_driver *drv, struct cpuidle_device *dev) |
387 | { | 387 | { |
388 | struct menu_device *data = &__get_cpu_var(menu_devices); | 388 | struct menu_device *data = this_cpu_ptr(&menu_devices); |
389 | int last_idx = data->last_state_idx; | 389 | int last_idx = data->last_state_idx; |
390 | struct cpuidle_state *target = &drv->states[last_idx]; | 390 | struct cpuidle_state *target = &drv->states[last_idx]; |
391 | unsigned int measured_us; | 391 | unsigned int measured_us; |