lkml.org 
[lkml]   [2017]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V4 2/2] perf/x86: add sysfs entry to freeze counter on SMI
> +	if (x86_pmu.attr_freeze_on_smi == val)
> + return count;
> +
> + mutex_lock(&freeze_on_smi_mutex);

I don't think the mutex is really needed, but if it was it would
need to include the previous check too to be atomic.

> +
> + get_online_cpus();
> +
> + flip_smm_bit(&val);
> + smp_call_function(flip_smm_bit, &val, 1);
> +
> + put_online_cpus();

This is on_each_cpu()

> +
> + x86_pmu.attr_freeze_on_smi = val;
> +
> + mutex_unlock(&freeze_on_smi_mutex);


-Andi

\
 
 \ /
  Last update: 2017-03-29 06:19    [W:0.090 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site