aboutsummaryrefslogtreecommitdiff
path: root/core/cpu.c
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2019-01-08 00:04:13 +1000
committerStewart Smith <stewart@linux.ibm.com>2019-02-12 15:08:17 +1100
commitd27180b55d7740a711f2a6417eed02782a1cd536 (patch)
tree9914b569f8ef01a334b5075a2906d1e1d685dad9 /core/cpu.c
parentd3803711f8a9ac90e675bf9978d983f38d14b856 (diff)
downloadskiboot-d27180b55d7740a711f2a6417eed02782a1cd536.zip
skiboot-d27180b55d7740a711f2a6417eed02782a1cd536.tar.gz
skiboot-d27180b55d7740a711f2a6417eed02782a1cd536.tar.bz2
core/cpu: HID update race
If the per-core HID register is updated concurrently by multiple threads, updates can get lost. This has been observed during fast reboot where the HILE bit does not get cleared on all cores, which can cause machine check exception interrupts to crash. Fix this by only updating HID on thread0. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'core/cpu.c')
-rw-r--r--core/cpu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/cpu.c b/core/cpu.c
index a0ed1c5..1542776 100644
--- a/core/cpu.c
+++ b/core/cpu.c
@@ -1246,8 +1246,8 @@ void cpu_callin(struct cpu_thread *cpu)
sync();
cpu->job_has_no_return = false;
-
- init_hid();
+ if (cpu_is_thread0(cpu))
+ init_hid();
}
static void opal_start_thread_job(void *data)