[PATCH v1 21/26] x86/cpuid: Scan CPUID(0x80000005) and CPUID(0x80000006)

"Ahmed S. Darwish" <[email protected]>
Newsgroups dev.linux.lists.x86-cpuid,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Scan AMD cacheinfo CPUID(0x80000005) and CPUID(0x80000006), if available,
using the generic CPUID scanner read function cpuid_read_generic().

Follow-up commits will switch the x86/cacheinfo AMD CPUID(0x4)-emulation
logic to the scanned CPUID table API.

Signed-off-by: Ahmed S. Darwish <[email protected]>
---
 arch/x86/include/asm/cpuid/types.h  | 2 ++
 arch/x86/kernel/cpu/cpuid_scanner.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/arch/x86/include/asm/cpuid/types.h b/arch/x86/include/asm/cpuid/types.h
index 2ac3d05c3fe4..50280bbc01d6 100644
--- a/arch/x86/include/asm/cpuid/types.h
+++ b/arch/x86/include/asm/cpuid/types.h
@@ -183,6 +183,8 @@ struct cpuid_leaves {
 	CPUID_LEAF(0x2,		0,		1);
 	CPUID_LEAF(0x4,		0,		8);
 	CPUID_LEAF(0x80000000,	0,		1);
+	CPUID_LEAF(0x80000005,	0,		1);
+	CPUID_LEAF(0x80000006,	0,		1);
 	CPUID_LEAF(0x8000001d,	0,		8);
 };
 
diff --git a/arch/x86/kernel/cpu/cpuid_scanner.h b/arch/x86/kernel/cpu/cpuid_scanner.h
index a09110a4c72c..42d88732b1f5 100644
--- a/arch/x86/kernel/cpu/cpuid_scanner.h
+++ b/arch/x86/kernel/cpu/cpuid_scanner.h
@@ -95,6 +95,8 @@ struct cpuid_scan_entry {
 	SCAN_ENTRY(0x2,		0,		0x2),				\
 	SCAN_ENTRY(0x4,		0,		deterministic_cache),		\
 	SCAN_ENTRY(0x80000000,  0,              0x80000000),			\
+	SCAN_ENTRY(0x80000005,  0,              generic),			\
+	SCAN_ENTRY(0x80000006,  0,              generic),			\
 	SCAN_ENTRY(0x8000001d,  0,              deterministic_cache),		\
 
 /**
-- 
2.49.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.