Commit 229b6863 authored by Christoph Lameter's avatar Christoph Lameter Committed by Tejun Heo

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: default avatarRafael J. Wysocki <rjw@sisk.pl>
[cpufreq changes]
Signed-off-by: default avatarChristoph Lameter <cl@linux.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 1b2a1a7e
...@@ -66,7 +66,7 @@ static inline void ladder_do_selection(struct ladder_device *ldev, ...@@ -66,7 +66,7 @@ static inline void ladder_do_selection(struct ladder_device *ldev,
static int ladder_select_state(struct cpuidle_driver *drv, static int ladder_select_state(struct cpuidle_driver *drv,
struct cpuidle_device *dev) struct cpuidle_device *dev)
{ {
struct ladder_device *ldev = &__get_cpu_var(ladder_devices); struct ladder_device *ldev = this_cpu_ptr(&ladder_devices);
struct ladder_device_state *last_state; struct ladder_device_state *last_state;
int last_residency, last_idx = ldev->last_state_idx; int last_residency, last_idx = ldev->last_state_idx;
int latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY); 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,7 +170,7 @@ static int ladder_enable_device(struct cpuidle_driver *drv,
*/ */
static void ladder_reflect(struct cpuidle_device *dev, int index) static void ladder_reflect(struct cpuidle_device *dev, int index)
{ {
struct ladder_device *ldev = &__get_cpu_var(ladder_devices); struct ladder_device *ldev = this_cpu_ptr(&ladder_devices);
if (index > 0) if (index > 0)
ldev->last_state_idx = index; ldev->last_state_idx = index;
} }
......
...@@ -289,7 +289,7 @@ static void get_typical_interval(struct menu_device *data) ...@@ -289,7 +289,7 @@ static void get_typical_interval(struct menu_device *data)
*/ */
static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev) static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev)
{ {
struct menu_device *data = &__get_cpu_var(menu_devices); struct menu_device *data = this_cpu_ptr(&menu_devices);
int latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY); int latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY);
int i; int i;
unsigned int interactivity_req; unsigned int interactivity_req;
...@@ -372,7 +372,7 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev) ...@@ -372,7 +372,7 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev)
*/ */
static void menu_reflect(struct cpuidle_device *dev, int index) static void menu_reflect(struct cpuidle_device *dev, int index)
{ {
struct menu_device *data = &__get_cpu_var(menu_devices); struct menu_device *data = this_cpu_ptr(&menu_devices);
data->last_state_idx = index; data->last_state_idx = index;
if (index >= 0) if (index >= 0)
data->needs_update = 1; data->needs_update = 1;
...@@ -385,7 +385,7 @@ static void menu_reflect(struct cpuidle_device *dev, int index) ...@@ -385,7 +385,7 @@ static void menu_reflect(struct cpuidle_device *dev, int index)
*/ */
static void menu_update(struct cpuidle_driver *drv, struct cpuidle_device *dev) static void menu_update(struct cpuidle_driver *drv, struct cpuidle_device *dev)
{ {
struct menu_device *data = &__get_cpu_var(menu_devices); struct menu_device *data = this_cpu_ptr(&menu_devices);
int last_idx = data->last_state_idx; int last_idx = data->last_state_idx;
struct cpuidle_state *target = &drv->states[last_idx]; struct cpuidle_state *target = &drv->states[last_idx];
unsigned int measured_us; unsigned int measured_us;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment