From: Tony Luck <tony.luck@intel.com>
To: x86@kernel.org
Cc: linux-kernel@vger.kernel.org, Tony Luck <tony.luck@intel.com>
Subject: [PATCH 01/74] x86/cpu/vfm: Add/initialize x86_vfm field to struct cpuinfo_x86
Date: Thu, 28 Mar 2024 09:37:44 -0700 [thread overview]
Message-ID: <20240328163746.243023-2-tony.luck@intel.com> (raw)
In-Reply-To: <20240328163746.243023-1-tony.luck@intel.com>
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>
---
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..87115e5d884f 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_vendor; /* CPU vendor */
+ __u8 x86; /* CPU family */
+ __u8 x86_model;
+ __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): */
--
2.44.0
next prev parent reply other threads:[~2024-03-28 16:37 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 ` Tony Luck [this message]
2024-03-28 16:48 ` [PATCH 01/74] x86/cpu/vfm: Add/initialize x86_vfm field to struct cpuinfo_x86 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
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=20240328163746.243023-2-tony.luck@intel.com \
--to=tony.luck@intel.com \
--cc=linux-kernel@vger.kernel.org \
--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