Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935866AbcCQOdK (ORCPT ); Thu, 17 Mar 2016 10:33:10 -0400 Received: from mga11.intel.com ([192.55.52.93]:58700 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932568AbcCQOdH (ORCPT ); Thu, 17 Mar 2016 10:33:07 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,350,1455004800"; d="scan'208";a="926268412" Subject: Re: intel_pstate oopses and lockdep report with Linux v4.5-1822-g63e30271b04c To: "Rafael J. Wysocki" , Josh Boyer , Srinivas Pandruvada References: <1704778.QLUl50G1uZ@vostro.rjw.lan> Cc: Len Brown , Viresh Kumar , Linux PM list , "Linux-Kernel@Vger. Kernel. Org" From: Philippe Longepe Message-ID: <56EAC066.4080203@linux.intel.com> Date: Thu, 17 Mar 2016 15:34:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1704778.QLUl50G1uZ@vostro.rjw.lan> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1917 Lines: 61 Hi, The wmsrl is supposed to write on the MSR corresponding to the cpu that is executing it. However, it seems that the following commit done by Joe Konno already fixed this bug on BYT. 0dd23f94251f49da99a6cbfb22418b2d757d77d6 Now, we need to figure out why the wmsrl is not executed on the current cpu! Regards, Philippe On 17/03/2016 15:07, Rafael J. Wysocki wrote: > On Thursday, March 17, 2016 09:02:29 AM Josh Boyer wrote: >> Hello, > Hi, > >> I have an Intel Atom based NUC that is producing the following >> backtraces on boot of Linus' tree as of last evening. This does not >> happen with a tree with top level commit 271ecc5253e2, but does happen >> when using the tree mentioned in the subject with top level commit >> 63e30271b04c. >> >> The first backtrace appears to be a warning because the intel_pstate >> driver is calling wrmsrl_on_cpu when interrupts are disabled? Not >> sure on that one. >> >> The second backtrace is a lockdep report. Both are from the same boot. > OK, thanks for the report. > > Can you please try the patch below? > > I'm actually unsure if we can do that safely in general for Atom because > of the initialization, but that's what Core does anyway. > > Srinivas, Philippe, why exactly do we need the wrmsrl_on_cpu() in > atom_set_pstate()? core_set_pstate() uses wrmsrl() and seems to be doing fine. > > --- > drivers/cpufreq/intel_pstate.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index: linux-pm/drivers/cpufreq/intel_pstate.c > =================================================================== > --- linux-pm.orig/drivers/cpufreq/intel_pstate.c > +++ linux-pm/drivers/cpufreq/intel_pstate.c > @@ -587,7 +587,7 @@ static void atom_set_pstate(struct cpuda > > val |= vid; > > - wrmsrl_on_cpu(cpudata->cpu, MSR_IA32_PERF_CTL, val); > + wrmsrl(MSR_IA32_PERF_CTL, val); > } > > static int silvermont_get_scaling(void) >