Re: [PATCH] fix BUG using smp_processor_id() in touch_nmi_watchdogand touch_softlockup_watchdog

From: Yong Zhang
Date: Mon Aug 16 2010 - 23:17:19 EST


On Tue, Aug 17, 2010 at 10:59 AM, Frederic Weisbecker
<fweisbec@xxxxxxxxx> wrote:
> If preemption is disabled and you deal with the current cpu,
> then please use __get_cpu_var, it makes the code more
> readable:
>
>
> void touch_softlockup_watchdog(void)
> {
> Â Â Â Âpreempt_disable();
> Â Â Â Â__(watchdog_touch_ts) = 0;
> Â Â Â Âpreempt_enable();
> }

Why not use __raw_get_cpu_var() instead?
You know adding preempt protection in touch_softlockup_watchdog()
just suppress the warning. Am I missing something?

Thanks,
Yong
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/