Re: [PATCH] x86/oprofile/ppro: Do not use __this_cpu* accessors in preemptible context

Thomas Gleixner <[email protected]>
Newsgroups gmane.linux.kernel,gmane.linux.oprofile
Message-ID <alpine.DEB.2.20.1711081147310.1937@nanos>
On Tue, 7 Nov 2017, Borislav Petkov wrote:
> --- a/arch/x86/oprofile/op_model_ppro.c
> +++ b/arch/x86/oprofile/op_model_ppro.c
> @@ -212,8 +212,9 @@ static void arch_perfmon_setup_counters(void)
>  	eax.full = cpuid_eax(0xa);
>  
>  	/* Workaround for BIOS bugs in 6/15. Taken from perfmon2 */
> -	if (eax.split.version_id == 0 && __this_cpu_read(cpu_info.x86) == 6 &&
> -		__this_cpu_read(cpu_info.x86_model) == 15) {
> +	if (eax.split.version_id == 0 &&
> +	    boot_cpu_data.x86 == 6 &&
> +	    boot_cpu_data.x86_model == 15) {
>  		eax.split.version_id = 2;
>  		eax.split.num_counters = 2;
>  		eax.split.bit_width = 40;

AFAICT, ppro_setup_ctrs() has the same issue
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.