diff options
Diffstat (limited to 'drivers/clocksource/arm_arch_timer.c')
-rw-r--r-- | drivers/clocksource/arm_arch_timer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index 395f5d95a737..5c114da0ed71 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c | |||
@@ -839,14 +839,14 @@ static int arch_timer_dying_cpu(unsigned int cpu) | |||
839 | } | 839 | } |
840 | 840 | ||
841 | #ifdef CONFIG_CPU_PM | 841 | #ifdef CONFIG_CPU_PM |
842 | static unsigned int saved_cntkctl; | 842 | static DEFINE_PER_CPU(unsigned long, saved_cntkctl); |
843 | static int arch_timer_cpu_pm_notify(struct notifier_block *self, | 843 | static int arch_timer_cpu_pm_notify(struct notifier_block *self, |
844 | unsigned long action, void *hcpu) | 844 | unsigned long action, void *hcpu) |
845 | { | 845 | { |
846 | if (action == CPU_PM_ENTER) | 846 | if (action == CPU_PM_ENTER) |
847 | saved_cntkctl = arch_timer_get_cntkctl(); | 847 | __this_cpu_write(saved_cntkctl, arch_timer_get_cntkctl()); |
848 | else if (action == CPU_PM_ENTER_FAILED || action == CPU_PM_EXIT) | 848 | else if (action == CPU_PM_ENTER_FAILED || action == CPU_PM_EXIT) |
849 | arch_timer_set_cntkctl(saved_cntkctl); | 849 | arch_timer_set_cntkctl(__this_cpu_read(saved_cntkctl)); |
850 | return NOTIFY_OK; | 850 | return NOTIFY_OK; |
851 | } | 851 | } |
852 | 852 | ||