smp: Add BUILD_ASSERT to make sure Kconfig values are the same

Add check to ensure that CONFIG_MP_NUM_CPUS and CONFIG_MP_MAX_NUM_CPUS
are set the same.  This will at least cause a build issue for out of
tree users.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
This commit is contained in:
Kumar Gala 2022-10-21 09:34:08 -05:00 committed by Carles Cufí
commit 0722b6f74f

View file

@ -37,6 +37,10 @@
#include <zephyr/pm/device_runtime.h>
LOG_MODULE_REGISTER(os, CONFIG_KERNEL_LOG_LEVEL);
BUILD_ASSERT(CONFIG_MP_NUM_CPUS == CONFIG_MP_MAX_NUM_CPUS,
"CONFIG_MP_NUM_CPUS and CONFIG_MP_MAX_NUM_CPUS need to be set the same");
/* the only struct z_kernel instance */
struct z_kernel _kernel;