From 30f703148839663a7d41ff72a22be3a9b49110d7 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Wed, 20 Oct 2021 20:42:03 +0200 Subject: soc/intel/skylake/cpu: rework failure handling in post_mp_init Use a boolean type to store the information if any mp_run_on_all_cpus call failed. This is a preparation to change the return type of mp_run_on_all_cpus from int to enum cb_err which will be done in a follow-up patch. Signed-off-by: Felix Held Change-Id: Ic04ad3e4a781a00ee6edcd7dbd24bc7601be1384 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58492 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans --- src/soc/intel/skylake/cpu.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/soc') diff --git a/src/soc/intel/skylake/cpu.c b/src/soc/intel/skylake/cpu.c index 80bf251cc0..d88dd36ad6 100644 --- a/src/soc/intel/skylake/cpu.c +++ b/src/soc/intel/skylake/cpu.c @@ -163,7 +163,7 @@ static void fc_lock_configure(void *unused) static void post_mp_init(void) { - int ret = 0; + bool failure = false; /* Set Max Ratio */ cpu_set_max_ratio(); @@ -178,14 +178,17 @@ static void post_mp_init(void) if (CONFIG(HAVE_SMI_HANDLER)) smm_lock(); - ret |= mp_run_on_all_cpus(vmx_configure, NULL); + if (mp_run_on_all_cpus(vmx_configure, NULL)) + failure = true; if (CONFIG(SOC_INTEL_COMMON_BLOCK_SGX_ENABLE)) - ret |= mp_run_on_all_cpus(sgx_configure, NULL); + if (mp_run_on_all_cpus(sgx_configure, NULL)) + failure = true; - ret |= mp_run_on_all_cpus(fc_lock_configure, NULL); + if (mp_run_on_all_cpus(fc_lock_configure, NULL)) + failure = true; - if (ret) + if (failure) printk(BIOS_CRIT, "CRITICAL ERROR: MP post init failed\n"); } -- cgit v1.2.3