diff options
author | Sridhar Siricilla <sridhar.siricilla@intel.com> | 2022-01-29 14:26:22 +0530 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-02-07 14:07:30 +0000 |
commit | 51c75ac0dffcc7cf34827eb0df0bc0980255af5d (patch) | |
tree | b25136f3e5b1bf86b5c8be193f4d7f62f7aaa587 | |
parent | 6efc7edc13fbfea66d2de31a1b0707852fb9d9fc (diff) |
soc/intel/common: Define enum cpu_perf_eff_type type for core types
The patch defines enum values for small and big cores and uses them
to indicate the big or small core.
TEST=Verify the build for Brya
Signed-off-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Change-Id: I740984a437da9d0518652f43180faf9b6ed4255e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61459
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
-rw-r--r-- | src/soc/intel/common/block/acpi/cpu_hybrid.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/soc/intel/common/block/acpi/cpu_hybrid.c b/src/soc/intel/common/block/acpi/cpu_hybrid.c index 70e632900b..4335a468d2 100644 --- a/src/soc/intel/common/block/acpi/cpu_hybrid.c +++ b/src/soc/intel/common/block/acpi/cpu_hybrid.c @@ -11,6 +11,11 @@ #define CPPC_NOM_FREQ_IDX 22 #define CPPC_NOM_PERF_IDX 3 +enum cpu_perf_eff_type { + CPU_TYPE_SMALL, + CPU_TYPE_BIG, +}; + DECLARE_SPIN_LOCK(cpu_lock); static u8 global_cpu_type[CONFIG_MAX_CPUS]; @@ -46,7 +51,7 @@ static void set_cpu_type(void *unused) u8 cpu_index = get_cpu_index(); if (is_big_core()) - global_cpu_type[cpu_index] = 1; + global_cpu_type[cpu_index] = CPU_TYPE_BIG; spin_unlock(&cpu_lock); } @@ -86,7 +91,7 @@ static void acpigen_cppc_update_nominal_freq_perf(const char *pkg_path, s32 core acpi_get_cpu_nomi_perf(&small_core_nom_perf, &big_core_nom_perf); - if (global_cpu_type[core_id]) + if (global_cpu_type[core_id] == CPU_TYPE_BIG) acpigen_set_package_element_int(pkg_path, CPPC_NOM_PERF_IDX, big_core_nom_perf); else acpigen_set_package_element_int(pkg_path, CPPC_NOM_PERF_IDX, |