sched: add depends on ARCH_INTERRUPTSTACK to SMP
Change-Id: I7edbbcf314045c5567e30b39b0693672e5d10e9a Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
ee66da4566
commit
a96cab58ad
@ -268,6 +268,7 @@ config SMP
|
||||
default n
|
||||
depends on ARCH_HAVE_MULTICPU
|
||||
depends on ARCH_HAVE_TESTSET
|
||||
depends on ARCH_INTERRUPTSTACK != 0
|
||||
select SPINLOCK
|
||||
select SCHED_RESUMESCHEDULER
|
||||
select IRQCOUNT
|
||||
@ -275,6 +276,17 @@ config SMP
|
||||
Enables support for Symmetric Multi-Processing (SMP) on a multi-CPU
|
||||
platform.
|
||||
|
||||
N.B. SMP mode requires the use of ARCH_INTERRUPTSTACK:
|
||||
|
||||
CPU0 thread0 -> IRQ enter -> add thread0 to block_list -> IRQ leave(crash)
|
||||
||
|
||||
/\
|
||||
/ \
|
||||
CPU1 thread1 -> block_task -> take thread0 from block_list -> run thread0
|
||||
|
||||
CPU0 IRQ handler use thread0's stack, but thread0 may switch to CPU1, that
|
||||
will caused IRQ handler stack corruption.
|
||||
|
||||
if SMP
|
||||
|
||||
config SMP_NCPUS
|
||||
|
Loading…
Reference in New Issue
Block a user