lkml.org 
[lkml]   [2015]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH 1/3] x86/cpu: Unify CPU family, model, stepping calculation
From
Date


On 18/11/2015 12:28, Borislav Petkov wrote:
>> On 14/11/2015 11:37, Borislav Petkov wrote:
>>> > > vendor = x86_vendor();
>>> > > - family = x86_family();
>>> > > + family = x86_family_cpuid();
>> >
>> > What about renaming x86_vendor() so that this looks like
>> >
>> > - vendor = x86_vendor();
>> > - family = x86_family();
>> > + vendor = x86_cpuid_vendor();
>> > + family = x86_cpuid_family();
>
> The idea is that x86_family_cpuid() gives the family *after* having
> executed CPUID while x86_family() only computes the family from a
> supplied CPUID_1_EAX. I.e., the last saves us the CPUID call.

Yes, exactly. I'm suggesting that the same applies to x86_vendor(). I
also prefer x86_cpuid_* to x86_*_cpuid because, once you add two
functions in the same family it's nice that they share a prefix.

Paolo

> Hmm, maybe I should make that more clear ...


\
 
 \ /
  Last update: 2015-11-18 12:41    [W:1.835 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site