[ARM] Solve buggy smp_processor_id() usage
[linux-drm-fsl-dcu.git] / arch / arm / oprofile / op_model_mpcore.c
index 7791da791f5f936cb54c7d1f7cf38832652007e5..75bae067922d1c55fdef728f67e8f952062009be 100644 (file)
@@ -200,8 +200,10 @@ static int em_call_function(int (*fn)(void))
        data.fn = fn;
        data.ret = 0;
 
+       preempt_disable();
        smp_call_function(em_func, &data, 1, 1);
        em_func(&data);
+       preempt_enable();
 
        return data.ret;
 }