From d27ef5bf6f5e444141dca6a89c46e667bca64652 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Wed, 20 Oct 2021 20:18:12 +0200 Subject: 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 Change-Id: Ibcd4a9a63cc87fe176ba885ced0f00832587d492 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58491 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak --- src/soc/intel/denverton_ns/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/soc/intel/denverton_ns/cpu.c') diff --git a/src/soc/intel/denverton_ns/cpu.c b/src/soc/intel/denverton_ns/cpu.c index 60635483d4..ab4043bf09 100644 --- a/src/soc/intel/denverton_ns/cpu.c +++ b/src/soc/intel/denverton_ns/cpu.c @@ -20,6 +20,7 @@ #include #include #include +#include static struct smm_relocation_attrs relo_attrs; @@ -296,6 +297,6 @@ void denverton_init_cpus(struct device *dev) add_more_links(dev, 1); /* Clear for take-off */ - 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"); } -- cgit v1.2.3