From 82faefb339a0853dd49f10bafd2c4f5ca1723fb3 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Wed, 20 Oct 2021 20:50:58 +0200 Subject: cpu/x86/mp_init: use cb_err as status return type in remaining functions Using cb_err as return type of mp_run_on_aps, mp_run_on_all_aps, mp_run_on_all_cpus and mp_park_aps clarifies the meaning of the different return values. This patch also adds the types.h include that provides the definition of the cb_err enum and checks the return value of all 4 functions listed above against the enum values instead of either checking if it's non-zero or less than zero to handle the error case. Signed-off-by: Felix Held Change-Id: I4b3f03415a041d3ec9cd0e102980e53868b004b0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58494 Tested-by: build bot (Jenkins) Reviewed-by: Raul Rangel --- src/soc/intel/skylake/cpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/soc/intel/skylake') diff --git a/src/soc/intel/skylake/cpu.c b/src/soc/intel/skylake/cpu.c index d88dd36ad6..86e8e52797 100644 --- a/src/soc/intel/skylake/cpu.c +++ b/src/soc/intel/skylake/cpu.c @@ -178,14 +178,14 @@ static void post_mp_init(void) if (CONFIG(HAVE_SMI_HANDLER)) smm_lock(); - if (mp_run_on_all_cpus(vmx_configure, NULL)) + if (mp_run_on_all_cpus(vmx_configure, NULL) != CB_SUCCESS) failure = true; if (CONFIG(SOC_INTEL_COMMON_BLOCK_SGX_ENABLE)) - if (mp_run_on_all_cpus(sgx_configure, NULL)) + if (mp_run_on_all_cpus(sgx_configure, NULL) != CB_SUCCESS) failure = true; - if (mp_run_on_all_cpus(fc_lock_configure, NULL)) + if (mp_run_on_all_cpus(fc_lock_configure, NULL) != CB_SUCCESS) failure = true; if (failure) -- cgit v1.2.3