diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2017-11-29 15:36:47 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-12-03 21:49:12 -0600 |
commit | 171b7858a5598edf65becdaf9c5e2fbc281a052e (patch) | |
tree | e2de131e05f844e65b3fa7190ddc36e4ff5820d7 | |
parent | 068de7bc7688cb6b47e04edf76ce0461a8f6708b (diff) | |
download | skiboot-171b7858a5598edf65becdaf9c5e2fbc281a052e.zip skiboot-171b7858a5598edf65becdaf9c5e2fbc281a052e.tar.gz skiboot-171b7858a5598edf65becdaf9c5e2fbc281a052e.tar.bz2 |
fast-reboot: add more barriers around cpu state changes
This is a bit of paranoia, but when a CPU changes state to signal it
has reached a particular point, all previous stores should be visible.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r-- | core/cpu.c | 3 | ||||
-rw-r--r-- | core/fast-reboot.c | 5 |
2 files changed, 7 insertions, 1 deletions
@@ -1126,7 +1126,10 @@ void cpu_bringup(void) void cpu_callin(struct cpu_thread *cpu) { + sync(); cpu->state = cpu_state_active; + sync(); + cpu->job_has_no_return = false; init_hid(); diff --git a/core/fast-reboot.c b/core/fast-reboot.c index 8ef506b..a98b579 100644 --- a/core/fast-reboot.c +++ b/core/fast-reboot.c @@ -426,6 +426,7 @@ void fast_reboot(void) lock(&reset_lock); fast_boot_release = false; + sync(); success = fast_reset_p8(); @@ -576,8 +577,8 @@ void __noreturn fast_reboot_entry(void) prlog(PR_INFO, "RESET: Releasing secondaries...\n"); /* Release everybody */ - fast_boot_release = true; sync(); + fast_boot_release = true; /* Wait for them to respond */ cpu_state_wait_all_others(cpu_state_active, 0); @@ -597,7 +598,9 @@ void __noreturn fast_reboot_entry(void) cleanup_cpu_state(); /* Set our state to active */ + sync(); this_cpu()->state = cpu_state_active; + sync(); /* Let the CPU layer do some last minute global cleanups */ cpu_fast_reboot_complete(); |