diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2024-02-13 22:06:14 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-02-15 22:07:45 +0100 |
commit | fd43b8ae76e903c76f14d06eb939449bcc3f614f (patch) | |
tree | 512c9bfce5133df3cc07fb4a77cdfd012e0ee93a /arch/x86/kernel/cpu/common.c | |
parent | bd745d1c41e7fa56242889eb5dc6df2d7dd5df32 (diff) | |
download | linux-fd43b8ae76e903c76f14d06eb939449bcc3f614f.tar.gz linux-fd43b8ae76e903c76f14d06eb939449bcc3f614f.tar.bz2 linux-fd43b8ae76e903c76f14d06eb939449bcc3f614f.zip |
x86/cpu/topology: Provide __num_[cores|threads]_per_package
Expose properly accounted information and accessors so the fiddling with
other topology variables can be replaced.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Michael Kelley <mhklinux@outlook.com>
Tested-by: Sohil Mehta <sohil.mehta@intel.com>
Link: https://lore.kernel.org/r/20240213210253.120958987@linutronix.de
Diffstat (limited to 'arch/x86/kernel/cpu/common.c')
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index cb22cb8d983b..c9a1014386a9 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -82,6 +82,12 @@ EXPORT_SYMBOL(__max_dies_per_package); unsigned int __max_logical_packages __ro_after_init = 1; EXPORT_SYMBOL(__max_logical_packages); +unsigned int __num_cores_per_package __ro_after_init = 1; +EXPORT_SYMBOL(__num_cores_per_package); + +unsigned int __num_threads_per_package __ro_after_init = 1; +EXPORT_SYMBOL(__num_threads_per_package); + static struct ppin_info { int feature; int msr_ppin_ctl; |