diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2022-01-25 04:14:05 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-01-26 04:15:11 +0000 |
commit | d4b5ad0ce395c44432151bf1eb20adb78d4662a7 (patch) | |
tree | 51c8376516a625d9e4a769f87f8aaf1bb7ac9a3f /src/soc/amd/cezanne | |
parent | 978930e860fdd1f5efa013ae12bc564fef7e8bef (diff) |
soc/amd/cezanne,picasso,sabrina: factor out get_threads_per_core
This code is common to at least all Zen-based APUs (Picasso, Cezanne,
Sabrina) and is also useful outside of the SoC-specific dynamic ACPI
table generation code.
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ie96d4429fb6ed9223efed9b3c754e04052d7ca7c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61357
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
Reviewed-by: Chris Wang <chris.wang@amd.corp-partner.google.com>
Reviewed-by: Eric Peers <epeers@google.com>
Diffstat (limited to 'src/soc/amd/cezanne')
-rw-r--r-- | src/soc/amd/cezanne/acpi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/soc/amd/cezanne/acpi.c b/src/soc/amd/cezanne/acpi.c index d390ca4f22..47f05b4bb2 100644 --- a/src/soc/amd/cezanne/acpi.c +++ b/src/soc/amd/cezanne/acpi.c @@ -320,9 +320,7 @@ void generate_cpu_entries(const struct device *device) }, }; - threads_per_core = ((cpuid_ebx(CPUID_EBX_CORE_ID) & CPUID_EBX_THREADS_MASK) - >> CPUID_EBX_THREADS_SHIFT) - + 1; + threads_per_core = get_threads_per_core(); pstate_count = get_pstate_info(pstate_values, pstate_xpss_values); logical_cores = get_cpu_count(); |