From: Thomas Gleixner <tglx@linutronix.de>
To: Tony Luck <tony.luck@intel.com>, x86@kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 01/74] x86/cpu/vfm: Add/initialize x86_vfm field to struct cpuinfo_x86
Date: Tue, 09 Apr 2024 14:46:45 +0200 [thread overview]
Message-ID: <871q7e7lfu.ffs@tglx> (raw)
In-Reply-To: <Zgr7vfS4ArMh4kWx@agluck-desk3>
On Mon, Apr 01 2024 at 11:23, Tony Luck wrote:
> Refactor struct cpuinfo_x86 so that the vendor, family, and model
> fields are overlayed in a union with a 32-bit field that combines
> all three (together with a one byte reserved field in the upper
> byte).
>
> This will make it easy, cheap, and reliable to check all three
> values at once.
>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
> ---
> arch/x86/include/asm/processor.h | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
> index 811548f131f4..4c5d166aa473 100644
> --- a/arch/x86/include/asm/processor.h
> +++ b/arch/x86/include/asm/processor.h
> @@ -108,9 +108,15 @@ struct cpuinfo_topology {
> };
>
> struct cpuinfo_x86 {
> - __u8 x86; /* CPU family */
> - __u8 x86_vendor; /* CPU vendor */
> - __u8 x86_model;
> + union {
> + struct {
> + __u8 x86_model;
> + __u8 x86; /* CPU family */
> + __u8 x86_vendor; /* CPU vendor */
> + __u8 x86_reserved;
> + };
> + __u32 x86_vfm; /* combined vendor, family, model */
> + };
> __u8 x86_stepping;
> #ifdef CONFIG_X86_64
> /* Number of 4K pages in DTLB/ITLB combined(in pages): */
next prev parent reply other threads:[~2024-04-09 12:46 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-28 16:37 [PATCH 00/74] New Intel CPUID families Tony Luck
2024-03-28 16:37 ` [PATCH 01/74] x86/cpu/vfm: Add/initialize x86_vfm field to struct cpuinfo_x86 Tony Luck
2024-03-28 16:48 ` Borislav Petkov
2024-03-28 16:52 ` Borislav Petkov
2024-03-28 17:00 ` Luck, Tony
2024-03-28 17:12 ` Borislav Petkov
2024-03-28 18:32 ` Luck, Tony
2024-03-28 20:52 ` Luck, Tony
2024-03-29 11:40 ` Borislav Petkov
2024-03-29 16:46 ` Tony Luck
2024-03-29 17:23 ` Borislav Petkov
2024-04-01 18:18 ` Tony Luck
2024-04-07 10:54 ` Borislav Petkov
2024-04-08 16:20 ` Luck, Tony
2024-04-09 8:22 ` Borislav Petkov
2024-04-16 18:16 ` Tony Luck
2024-04-16 18:23 ` Borislav Petkov
2024-04-16 18:37 ` Luck, Tony
2024-04-16 19:58 ` Borislav Petkov
2024-04-16 21:45 ` Luck, Tony
2024-04-17 19:02 ` Sean Christopherson
2024-04-17 19:42 ` Borislav Petkov
2024-04-18 1:47 ` Luck, Tony
2024-03-28 16:56 ` Luck, Tony
2024-03-28 17:06 ` Borislav Petkov
2024-04-01 18:23 ` [PATCH v2 " Tony Luck
2024-04-09 12:46 ` Thomas Gleixner [this message]
2024-03-28 16:37 ` [PATCH 02/74] x86/cpu/vfm: Add new macros to work with (vendor/family/model) values Tony Luck
2024-04-01 18:24 ` [PATCH v2 " Tony Luck
2024-04-09 12:47 ` Thomas Gleixner
2024-03-28 16:37 ` [PATCH 03/74] x86/cpu/vfm: Update arch/x86/include/asm/intel-family.h Tony Luck
2024-04-09 12:48 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871q7e7lfu.ffs@tglx \
--to=tglx@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox