RE: [PATCH V3 1/2] x86/msr: add msr_set/clear_bit_on_cpu/cpus access functions

From: Thomas Gleixner
Date: Tue Mar 28 2017 - 14:35:02 EST


On Tue, 28 Mar 2017, Liang, Kan wrote:
> Thanks. It simplify the code very much.
> I think we still need to protect the smp_call_function in the driver, right?

Yes.

> Would be the following code enough?
>
> get_online_cpus();
> preempt_disable();

Only get_online_cpus(). smp_call_function() disables preemption internaly.

Thanks,

tglx