summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2018-11-12 21:22:32 +0100
committerRichard Braun <rbraun@sceen.net>2018-11-12 21:22:32 +0100
commit86f2ef440909059a85222883c4272e7e241fe907 (patch)
treeffeb7bd61698605ab12eb934ae247212ce44b323
parent65b665d02e7ba2ae4c1eecfb65165ef256173dd5 (diff)
x86/boot: work around an SMP-related warning
-rw-r--r--arch/x86/machine/boot.c10
1 files changed, 9 insertions, 1 deletions
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];
}