From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751951AbdKHKso (ORCPT ); Wed, 8 Nov 2017 05:48:44 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:46161 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750917AbdKHKsm (ORCPT ); Wed, 8 Nov 2017 05:48:42 -0500 Date: Wed, 8 Nov 2017 11:48:28 +0100 (CET) From: Thomas Gleixner To: Borislav Petkov cc: Linus Torvalds , Fengguang Wu , "oprofile-list@lists.sf.net" , Robert Richter , Ingo Molnar , "H. Peter Anvin" , the arch/x86 maintainers , Linux Kernel Mailing List Subject: Re: [PATCH] x86/oprofile/ppro: Do not use __this_cpu* accessors in preemptible context In-Reply-To: <20171107175307.yl25jewyopgymil4@pd.tnic> Message-ID: References: <20171107093518.hnvd37aprqwrea6h@wfg-t540p.sh.intel.com> <20171107175307.yl25jewyopgymil4@pd.tnic> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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