diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2023-04-12 21:25:16 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2023-04-14 08:34:51 +0000 |
commit | 8e6146049fa50ea089437bb63b9f8e387cd975f2 (patch) | |
tree | 1f34bb79bb8be37eb1cb5e08b90420d21c866be4 /src/cpu/intel/speedstep | |
parent | c77b607138cba25e6fc979c176a8c6b255687a59 (diff) |
intel/i82371eb,speedstep: Use dev_count_cpu()
Change-Id: I8582d401c72ad44137f117315c5c6869654c3e99
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74397
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/cpu/intel/speedstep')
-rw-r--r-- | src/cpu/intel/speedstep/acpi.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/cpu/intel/speedstep/acpi.c b/src/cpu/intel/speedstep/acpi.c index 839fec4185..acca77edf9 100644 --- a/src/cpu/intel/speedstep/acpi.c +++ b/src/cpu/intel/speedstep/acpi.c @@ -9,18 +9,6 @@ #include <device/device.h> #include <types.h> -static int determine_total_number_of_cores(void) -{ - struct device *cpu; - int count = 0; - for (cpu = all_devices; cpu; cpu = cpu->next) { - if (!is_enabled_cpu(cpu)) - continue; - count++; - } - return count; -} - static void gen_pstate_entries(const sst_table_t *const pstates, const int cpuID, const int cores_per_package, const uint8_t coordination) @@ -78,7 +66,7 @@ static void gen_pstate_entries(const sst_table_t *const pstates, void generate_cpu_entries(const struct device *device) { int coreID, cpuID, pcontrol_blk = PMB0_BASE, plen = 6; - int totalcores = determine_total_number_of_cores(); + int totalcores = dev_count_cpu(); int cores_per_package = (cpuid_ebx(1)>>16) & 0xff; int numcpus = totalcores/cores_per_package; /* This assumes that all CPUs share the same |