diff options
author | Felix Held <felix.held@amd.corp-partner.google.com> | 2021-10-20 20:18:12 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2021-10-21 20:51:43 +0000 |
commit | d27ef5bf6f5e444141dca6a89c46e667bca64652 (patch) | |
tree | 5625401e34f2a4f08175023de22172e4fa95589e /src/soc/intel/xeon_sp | |
parent | e0e49c858bc603ac8216cd3d87c6a4a9996a8083 (diff) |
cpu/x86/mp_init: use cb_err as mp_init_with_smm return type
Using cb_err as return type 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
mp_init_with_smm 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 <felix-coreboot@felixheld.de>
Change-Id: Ibcd4a9a63cc87fe176ba885ced0f00832587d492
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58491
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/soc/intel/xeon_sp')
-rw-r--r-- | src/soc/intel/xeon_sp/cpx/cpu.c | 3 | ||||
-rw-r--r-- | src/soc/intel/xeon_sp/skx/cpu.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/soc/intel/xeon_sp/cpx/cpu.c b/src/soc/intel/xeon_sp/cpx/cpu.c index cfd9e5c153..9746972a38 100644 --- a/src/soc/intel/xeon_sp/cpx/cpu.c +++ b/src/soc/intel/xeon_sp/cpx/cpu.c @@ -24,6 +24,7 @@ #include <soc/smmrelocate.h> #include <soc/soc_util.h> #include <soc/util.h> +#include <types.h> #include "chip.h" @@ -211,7 +212,7 @@ void cpx_init_cpus(struct device *dev) intel_microcode_load_unlocked(microcode_patch); - if (mp_init_with_smm(dev->link_list, &mp_ops) < 0) + if (mp_init_with_smm(dev->link_list, &mp_ops) != CB_SUCCESS) printk(BIOS_ERR, "MP initialization failure.\n"); /* diff --git a/src/soc/intel/xeon_sp/skx/cpu.c b/src/soc/intel/xeon_sp/skx/cpu.c index df2b9b3a00..4d01740656 100644 --- a/src/soc/intel/xeon_sp/skx/cpu.c +++ b/src/soc/intel/xeon_sp/skx/cpu.c @@ -16,7 +16,7 @@ #include "chip.h" #include <cpu/intel/smm_reloc.h> #include <cpu/intel/em64t101_save_state.h> - +#include <types.h> static const config_t *chip_config = NULL; @@ -231,7 +231,7 @@ void xeon_sp_init_cpus(struct device *dev) config_reset_cpl3_csrs(); /* calls src/cpu/x86/mp_init.c */ - if (mp_init_with_smm(dev->link_list, &mp_ops) < 0) + if (mp_init_with_smm(dev->link_list, &mp_ops) != CB_SUCCESS) printk(BIOS_ERR, "MP initialization failure.\n"); /* update numa domain for all cpu devices */ |