diff options
author | Christoph Lameter <cl@linux.com> | 2014-08-17 13:30:34 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-08-26 13:45:46 -0400 |
commit | f7f66b05aa2ac2632c5441a3f129f3be827fe7e7 (patch) | |
tree | 47db3e1e6f4106d88473f18777dfa58d8d332717 | |
parent | 70b2776a5cb16c39ff5451c4eee72691734eabfc (diff) |
watchdog: Replace __raw_get_cpu_var uses
Most of these are the uses of &__raw_get_cpu_var for address calculation.
touch_softlockup_watchdog_sync() uses __raw_get_cpu_var to write to
per cpu variables. Use __this_cpu_write instead.
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: linux-watchdog@vger.kernel.org
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r-- | kernel/watchdog.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c index a8d6914030fe..dca8cae7e55d 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c | |||
@@ -185,7 +185,7 @@ void touch_nmi_watchdog(void) | |||
185 | * case we shouldn't have to worry about the watchdog | 185 | * case we shouldn't have to worry about the watchdog |
186 | * going off. | 186 | * going off. |
187 | */ | 187 | */ |
188 | __raw_get_cpu_var(watchdog_nmi_touch) = true; | 188 | raw_cpu_write(watchdog_nmi_touch, true); |
189 | touch_softlockup_watchdog(); | 189 | touch_softlockup_watchdog(); |
190 | } | 190 | } |
191 | EXPORT_SYMBOL(touch_nmi_watchdog); | 191 | EXPORT_SYMBOL(touch_nmi_watchdog); |
@@ -194,8 +194,8 @@ EXPORT_SYMBOL(touch_nmi_watchdog); | |||
194 | 194 | ||
195 | void touch_softlockup_watchdog_sync(void) | 195 | void touch_softlockup_watchdog_sync(void) |
196 | { | 196 | { |
197 | __raw_get_cpu_var(softlockup_touch_sync) = true; | 197 | __this_cpu_write(softlockup_touch_sync, true); |
198 | __raw_get_cpu_var(watchdog_touch_ts) = 0; | 198 | __this_cpu_write(watchdog_touch_ts, 0); |
199 | } | 199 | } |
200 | 200 | ||
201 | #ifdef CONFIG_HARDLOCKUP_DETECTOR | 201 | #ifdef CONFIG_HARDLOCKUP_DETECTOR |
@@ -387,7 +387,7 @@ static void watchdog_set_prio(unsigned int policy, unsigned int prio) | |||
387 | 387 | ||
388 | static void watchdog_enable(unsigned int cpu) | 388 | static void watchdog_enable(unsigned int cpu) |
389 | { | 389 | { |
390 | struct hrtimer *hrtimer = &__raw_get_cpu_var(watchdog_hrtimer); | 390 | struct hrtimer *hrtimer = raw_cpu_ptr(&watchdog_hrtimer); |
391 | 391 | ||
392 | /* kick off the timer for the hardlockup detector */ | 392 | /* kick off the timer for the hardlockup detector */ |
393 | hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); | 393 | hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); |
@@ -407,7 +407,7 @@ static void watchdog_enable(unsigned int cpu) | |||
407 | 407 | ||
408 | static void watchdog_disable(unsigned int cpu) | 408 | static void watchdog_disable(unsigned int cpu) |
409 | { | 409 | { |
410 | struct hrtimer *hrtimer = &__raw_get_cpu_var(watchdog_hrtimer); | 410 | struct hrtimer *hrtimer = raw_cpu_ptr(&watchdog_hrtimer); |
411 | 411 | ||
412 | watchdog_set_prio(SCHED_NORMAL, 0); | 412 | watchdog_set_prio(SCHED_NORMAL, 0); |
413 | hrtimer_cancel(hrtimer); | 413 | hrtimer_cancel(hrtimer); |
@@ -534,7 +534,7 @@ static struct smp_hotplug_thread watchdog_threads = { | |||
534 | 534 | ||
535 | static void restart_watchdog_hrtimer(void *info) | 535 | static void restart_watchdog_hrtimer(void *info) |
536 | { | 536 | { |
537 | struct hrtimer *hrtimer = &__raw_get_cpu_var(watchdog_hrtimer); | 537 | struct hrtimer *hrtimer = raw_cpu_ptr(&watchdog_hrtimer); |
538 | int ret; | 538 | int ret; |
539 | 539 | ||
540 | /* | 540 | /* |