* [PATCH 11/35] [PATCH 11/36] watchdog: Replace __raw_get_cpu_var uses
[not found] <20140817173023.439660246@linux.com>
@ 2014-08-17 17:30 ` Christoph Lameter
2014-08-26 18:08 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Lameter @ 2014-08-17 17:30 UTC (permalink / raw)
To: Tejun Heo
Cc: akpm, rostedt, linux-kernel, Ingo Molnar, Peter Zijlstra,
Thomas Gleixner, Wim Van Sebroeck, linux-watchdog
[-- Attachment #1: 0011-watchdog-Replace-__raw_get_cpu_var-uses.patch --]
[-- Type: text/plain, Size: 2105 bytes --]
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>
---
kernel/watchdog.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
Index: linux/kernel/watchdog.c
===================================================================
--- linux.orig/kernel/watchdog.c
+++ linux/kernel/watchdog.c
@@ -185,7 +185,7 @@ void touch_nmi_watchdog(void)
* case we shouldn't have to worry about the watchdog
* going off.
*/
- __raw_get_cpu_var(watchdog_nmi_touch) = true;
+ raw_cpu_write(watchdog_nmi_touch, true);
touch_softlockup_watchdog();
}
EXPORT_SYMBOL(touch_nmi_watchdog);
@@ -194,8 +194,8 @@ EXPORT_SYMBOL(touch_nmi_watchdog);
void touch_softlockup_watchdog_sync(void)
{
- __raw_get_cpu_var(softlockup_touch_sync) = true;
- __raw_get_cpu_var(watchdog_touch_ts) = 0;
+ __this_cpu_write(softlockup_touch_sync, true);
+ __this_cpu_write(watchdog_touch_ts, 0);
}
#ifdef CONFIG_HARDLOCKUP_DETECTOR
@@ -387,7 +387,7 @@ static void watchdog_set_prio(unsigned i
static void watchdog_enable(unsigned int cpu)
{
- struct hrtimer *hrtimer = &__raw_get_cpu_var(watchdog_hrtimer);
+ struct hrtimer *hrtimer = raw_cpu_ptr(&watchdog_hrtimer);
/* kick off the timer for the hardlockup detector */
hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
@@ -407,7 +407,7 @@ static void watchdog_enable(unsigned int
static void watchdog_disable(unsigned int cpu)
{
- struct hrtimer *hrtimer = &__raw_get_cpu_var(watchdog_hrtimer);
+ struct hrtimer *hrtimer = raw_cpu_ptr(&watchdog_hrtimer);
watchdog_set_prio(SCHED_NORMAL, 0);
hrtimer_cancel(hrtimer);
@@ -534,7 +534,7 @@ static struct smp_hotplug_thread watchdo
static void restart_watchdog_hrtimer(void *info)
{
- struct hrtimer *hrtimer = &__raw_get_cpu_var(watchdog_hrtimer);
+ struct hrtimer *hrtimer = raw_cpu_ptr(&watchdog_hrtimer);
int ret;
/*
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 11/35] [PATCH 11/36] watchdog: Replace __raw_get_cpu_var uses
2014-08-17 17:30 ` [PATCH 11/35] [PATCH 11/36] watchdog: Replace __raw_get_cpu_var uses Christoph Lameter
@ 2014-08-26 18:08 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2014-08-26 18:08 UTC (permalink / raw)
To: Christoph Lameter
Cc: akpm, rostedt, linux-kernel, Ingo Molnar, Peter Zijlstra,
Thomas Gleixner, Wim Van Sebroeck, linux-watchdog
On Sun, Aug 17, 2014 at 12:30:34PM -0500, Christoph Lameter wrote:
> 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>
(Please disregard the ones I posted for v1 of the patch series)
Applied to percpu/for-3.18-consistent-ops. Please let me know if this
patch should be routed differently. Note that this patch was to be
applied to percpu/for-3.17 but delayed due to build issues caused by
cpumask_var_t.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-08-26 18:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20140817173023.439660246@linux.com>
2014-08-17 17:30 ` [PATCH 11/35] [PATCH 11/36] watchdog: Replace __raw_get_cpu_var uses Christoph Lameter
2014-08-26 18:08 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).