From 86f2ef440909059a85222883c4272e7e241fe907 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Mon, 12 Nov 2018 21:22:32 +0100 Subject: x86/boot: work around an SMP-related warning --- arch/x86/machine/boot.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/x86/machine/boot.c b/arch/x86/machine/boot.c index 0ffbe8d1..aad1a037 100644 --- a/arch/x86/machine/boot.c +++ b/arch/x86/machine/boot.c @@ -537,7 +537,15 @@ boot_get_ap_stack(void) unsigned int index; index = boot_ap_id - 1; - assert(boot_ap_id < ARRAY_SIZE(boot_ap_stacks)); + + /* + * TODO Remove this check once all the SMP-related code has been cleanly + * isolated. + */ +#if CONFIG_SMP + assert(index< ARRAY_SIZE(boot_ap_stacks)); +#endif /* CONFIG_SMP */ + return boot_ap_stacks[index]; } -- cgit v1.2.3