From 51c75ac0dffcc7cf34827eb0df0bc0980255af5d Mon Sep 17 00:00:00 2001 From: Sridhar Siricilla Date: Sat, 29 Jan 2022 14:26:22 +0530 Subject: 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 Change-Id: I740984a437da9d0518652f43180faf9b6ed4255e Reviewed-on: https://review.coreboot.org/c/coreboot/+/61459 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak Reviewed-by: Maulik V Vaghela --- src/soc/intel/common/block/acpi/cpu_hybrid.c | 9 +++++++-- 1 file 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, -- cgit v1.2.3