ARC: SMP: fix livelock in thread abort due to exception
We are missing setting of switch_handle for the thread which
is aborting due to exception (i.e. in case of k_panic or
__ASSERT triggered). This may cause livelock in SMP code
after a08e23f68e
commit ("kernel/sched: Fix SMP
must-wait-for-switch conditions in abort/join").
Fix that.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
This commit is contained in:
parent
028e0a3c8d
commit
9d6ced3822
1 changed files with 5 additions and 0 deletions
|
@ -118,6 +118,11 @@ _exc_return:
|
|||
|
||||
BREQR r0, 0, _exc_return_from_exc
|
||||
|
||||
/* Save old thread into switch handle which is required by z_sched_switch_spin which
|
||||
* will be called during old thread abort.
|
||||
*/
|
||||
STR r2, r2, ___thread_t_switch_handle_OFFSET
|
||||
|
||||
MOVR r2, r0
|
||||
|
||||
#ifdef CONFIG_ARC_SECURE_FIRMWARE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue