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/amd/common/block/cpu/smm/finalize.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/soc/amd/common/block/cpu') diff --git a/src/soc/amd/common/block/cpu/smm/finalize.c b/src/soc/amd/common/block/cpu/smm/finalize.c index 2795100d86..ec975bea27 100644 --- a/src/soc/amd/common/block/cpu/smm/finalize.c +++ b/src/soc/amd/common/block/cpu/smm/finalize.c @@ -7,6 +7,7 @@ #include #include #include +#include static void per_core_finalize(void *unused) { @@ -31,7 +32,7 @@ static void finalize_cores(void) { printk(BIOS_SPEW, "Lock SMM configuration\n"); - if (mp_run_on_all_cpus(per_core_finalize, NULL)) + if (mp_run_on_all_cpus(per_core_finalize, NULL) != CB_SUCCESS) printk(BIOS_WARNING, "Failed to finalize all cores\n"); } -- cgit v1.2.3