diff options
author | Shuo Liu <shuo.liu@intel.com> | 2024-04-28 18:42:15 +0800 |
---|---|---|
committer | Lean Sheng Tan <sheng.tan@9elements.com> | 2024-05-07 09:26:05 +0000 |
commit | 13a3c3a144393b2fe281b9b3ca7a5724d3fdda61 (patch) | |
tree | d91a40a6689864093a18d53db0e393e7b830bba6 /src/soc | |
parent | f063604c33da3d9b44456f21ff62ee38ab13b39f (diff) |
soc/intel/xeon_sp/spr: Add comments for get_thread_count
Add comments to clarify the usage of logical core count instead of
physical core count.
TEST=Build and boot on intel/archercity CRB
Change-Id: I2bc94391f060cec9de91183021da03bc5c7438c0
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82097
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/intel/xeon_sp/spr/cpu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/soc/intel/xeon_sp/spr/cpu.c b/src/soc/intel/xeon_sp/spr/cpu.c index c9ed8e12c9..15cb84642d 100644 --- a/src/soc/intel/xeon_sp/spr/cpu.c +++ b/src/soc/intel/xeon_sp/spr/cpu.c @@ -224,6 +224,12 @@ static int get_thread_count(void) { unsigned int num_phys = 0, num_virts = 0; + /* + * This call calculates the thread count which is corresponding to num_virts + * (logical cores), while num_phys is corresponding to physical cores (in SMT + * system, one physical core has multiple threads, a.k.a. logical cores). + * Hence num_phys is not actually used. + */ cpu_read_topology(&num_phys, &num_virts); printk(BIOS_SPEW, "Detected %u cores and %u threads\n", num_phys, num_virts); return num_virts * soc_get_num_cpus(); |