#4627 closed defect (fixed)

Multitasking start is broken on SMP targets which do not restore the interrupt state during context switching

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone: 6.1
Component: score Version: 5
Severity: normal Keywords: qualification
Cc: Blocked By:
Blocking:

Description

The current SMP multitasking start assumed that the initial heir thread of a processor starts execution in _Thread_Handler() which sets the interrupt state explicitly by _ISR_Set_level(). Under certain timing conditions processors may perform an initial context switch to a thread which already executes its thread body. In this case, interrupts are disabled after the context switch on targets which do not save/restore the interrupt state during a context switch (for example arm and riscv).

Change History (2)

comment:1 Changed on 03/08/22 at 08:37:38 by Sebastian Huber <sebastian.huber@…>

In b08ba92/rtems:

smptests/smpstart01: New test program

Update #4627.

comment:2 Changed on 03/09/22 at 20:01:37 by Sebastian Huber <sebastian.huber@…>

Resolution: fixed
Status: assignedclosed

In 32f0f11/rtems:

SMP: Fix start multitasking for some targets

The previous SMP multitasking start assumed that the initial heir thread of a
processor starts execution in _Thread_Handler(). The _Thread_Handler() sets
the interrupt state explicitly by _ISR_Set_level() before it calls the thread
entry. Under certain timing conditions, processors may perform an initial
context switch to a thread which already executes its thread body (see
smptests/smpstart01). In this case, interrupts are disabled after the context
switch on targets which do not save/restore the interrupt state during a
context switch (aarch64, arm, and riscv).

Close #4627.

Note: See TracTickets for help on using tickets.