kernel: SMP: allow more than 5 CPU cores
Previously we limit maximum number of CPU cores to 5, now be bumping this restriction so we can use 12 cores. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
This commit is contained in:
parent
baeda6ada0
commit
54e0731666
3 changed files with 8 additions and 4 deletions
|
@ -121,8 +121,12 @@ struct _thread_base {
|
||||||
|
|
||||||
#ifdef CONFIG_SCHED_CPU_MASK
|
#ifdef CONFIG_SCHED_CPU_MASK
|
||||||
/* "May run on" bits for each CPU */
|
/* "May run on" bits for each CPU */
|
||||||
|
#if CONFIG_MP_MAX_NUM_CPUS <= 8
|
||||||
uint8_t cpu_mask;
|
uint8_t cpu_mask;
|
||||||
|
#else
|
||||||
|
uint16_t cpu_mask;
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* CONFIG_SCHED_CPU_MASK */
|
||||||
|
|
||||||
/* data returned by APIs */
|
/* data returned by APIs */
|
||||||
void *swap_data;
|
void *swap_data;
|
||||||
|
|
|
@ -989,7 +989,7 @@ config SMP_BOOT_DELAY
|
||||||
config MP_NUM_CPUS
|
config MP_NUM_CPUS
|
||||||
int "Number of CPUs/cores"
|
int "Number of CPUs/cores"
|
||||||
default MP_MAX_NUM_CPUS
|
default MP_MAX_NUM_CPUS
|
||||||
range 1 5
|
range 1 12
|
||||||
help
|
help
|
||||||
Number of multiprocessing-capable cores available to the
|
Number of multiprocessing-capable cores available to the
|
||||||
multicpu API and SMP features.
|
multicpu API and SMP features.
|
||||||
|
@ -997,7 +997,7 @@ config MP_NUM_CPUS
|
||||||
config MP_MAX_NUM_CPUS
|
config MP_MAX_NUM_CPUS
|
||||||
int "Maximum number of CPUs/cores"
|
int "Maximum number of CPUs/cores"
|
||||||
default 1
|
default 1
|
||||||
range 1 5
|
range 1 12
|
||||||
help
|
help
|
||||||
Maximum number of multiprocessing-capable cores available to the
|
Maximum number of multiprocessing-capable cores available to the
|
||||||
multicpu API and SMP features.
|
multicpu API and SMP features.
|
||||||
|
|
|
@ -1621,8 +1621,8 @@ static inline int z_vrfy_k_is_preempt_thread(void)
|
||||||
|
|
||||||
#ifdef CONFIG_SCHED_CPU_MASK
|
#ifdef CONFIG_SCHED_CPU_MASK
|
||||||
# ifdef CONFIG_SMP
|
# ifdef CONFIG_SMP
|
||||||
/* Right now we use a single byte for this mask */
|
/* Right now we use a two byte for this mask */
|
||||||
BUILD_ASSERT(CONFIG_MP_MAX_NUM_CPUS <= 8, "Too many CPUs for mask word");
|
BUILD_ASSERT(CONFIG_MP_MAX_NUM_CPUS <= 16, "Too many CPUs for mask word");
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue