Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1272107
| From | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH 1/3] x86/cpu: Unify CPU family, model, stepping calculation |
| Date | 2015-11-18 12:40 +0100 |
| Message-ID | <qw9fI-2gd-27@gated-at.bofh.it> (permalink) |
| References | <quGpr-2Pe-3@gated-at.bofh.it> <quGps-2Pe-13@gated-at.bofh.it> <qw8Wl-29z-13@gated-at.bofh.it> <qw962-2d7-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 ... -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [RFC PATCH 1/3] x86/cpu: Unify CPU family, model, stepping calculation Paolo Bonzini <pbonzini@redhat.com> - 2015-11-18 12:20 +0100
Re: [RFC PATCH 1/3] x86/cpu: Unify CPU family, model, stepping calculation Borislav Petkov <bp@alien8.de> - 2015-11-18 12:30 +0100
Re: [RFC PATCH 1/3] x86/cpu: Unify CPU family, model, stepping calculation Paolo Bonzini <pbonzini@redhat.com> - 2015-11-18 12:40 +0100
Re: [RFC PATCH 1/3] x86/cpu: Unify CPU family, model, stepping calculation Borislav Petkov <bp@alien8.de> - 2015-11-18 20:00 +0100
Re: [RFC PATCH 1/3] x86/cpu: Unify CPU family, model, stepping calculation Paolo Bonzini <pbonzini@redhat.com> - 2015-11-19 10:40 +0100
Re: [RFC PATCH 1/3] x86/cpu: Unify CPU family, model, stepping calculation Borislav Petkov <bp@alien8.de> - 2015-11-19 10:50 +0100
csiph-web