From: "Jan Beulich" Subject: Re: [PATCH v3 06/11] x86/intel_pstate: the main boby of the intel_pstate driver Date: Thu, 18 Jun 2015 16:03:27 +0100 Message-ID: <5582F9DF0200007800086B22@mail.emea.novell.com> References: <1434011265-17256-1-git-send-email-wei.w.wang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1434011265-17256-1-git-send-email-wei.w.wang@intel.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Wang Cc: andrew.cooper3@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 11.06.15 at 10:27, wrote: > The intel_pstate driver is ported following its kernel code logic > (commit: 93f0822d).In order to port the Linux source file with > minimal modifications, some of the variable types are kept intact > (e.g. "int current_pstae", would otherwise be changed to > "unsigned int"). Minimal modifications implies no whitespace changes either (and even less so indentation corruption, like I just spotted in ceiling_fp() and pid_calc(); I didn't look further). I.e. if you aim at that, a diff between the original and the Xen clone should be reasonably small (and that's what I'd likely look at in the end, as I then don't really want to review all code which already made it into upstream Linux). > --- a/xen/arch/x86/cpu/common.c > +++ b/xen/arch/x86/cpu/common.c > @@ -238,6 +238,9 @@ static void __cpuinit generic_identify(struct cpuinfo_x86 *c) > if ( cpu_has(c, X86_FEATURE_CLFLSH) ) > c->x86_clflush_size = ((ebx >> 8) & 0xff) * 8; > > + if (cpuid_ecx(6) & 0x1) > + set_bit(X86_FEATURE_APERFMPERF, c->x86_capability); With that the kind of misplaced identical code pieces in cpufreq.c and powernow.c should go away. The three changes together would probably best be broken out to a separate patch, to keep the focus on this one on the introduction of intel_pstate.c. Jan