Re: [patch 3/5] x86: mce: Split timer init

From: Hidetoshi Seto
Date: Tue Jun 19 2012 - 23:36:10 EST


(2012/06/07 6:53), Thomas Gleixner wrote:
> --- tip.orig/arch/x86/kernel/cpu/mcheck/mce.c
> +++ tip/arch/x86/kernel/cpu/mcheck/mce.c
> @@ -1554,23 +1554,28 @@ static void __mcheck_cpu_init_vendor(str
> }
> }
>
> -static void __mcheck_cpu_init_timer(void)
> +static void mce_start_timer(unsigned int cpu, struct timer_list *t)
> {
> - struct timer_list *t = &__get_cpu_var(mce_timer);
> unsigned long iv = check_interval * HZ;
>
> - setup_timer(t, mce_timer_fn, smp_processor_id());
> + __this_cpu_write(mce_next_interval, iv);
>
> - if (mce_ignore_ce)
> + if (mce_ignore_ce || !iv)
> return;
>
> - __this_cpu_write(mce_next_interval, iv);
> - if (!iv)
> - return;
> t->expires = round_jiffies(jiffies + iv);
> add_timer_on(t, smp_processor_id());

add_timer_on(t, cpu) ?

If so, using __this_cpu_write() here is wrong too.

> }
>

Thanks,
H.Seto

--
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/