x86_64: Missing a volatile on a struct used for spinning
Before we're initialized and can use proper synchronization, the CPU initialization path spins on the thread entry function to be non-null. But the data wasn't tagged volatile, and with gcc 8.2.1 (but not 6.2.0) the optimizer was hoisting the reads to SMP init would spin forever. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
aed8288196
commit
02a1e21c3d
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ void *_isr_exit_restore_stack(void *interrupted)
|
|||
return (nested || next == interrupted) ? NULL : next;
|
||||
}
|
||||
|
||||
struct {
|
||||
volatile struct {
|
||||
void (*fn)(int, void*);
|
||||
void *arg;
|
||||
} cpu_init[CONFIG_MP_NUM_CPUS];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue