diff options
author | Nathan Lynch <nathanl@linux.ibm.com> | 2020-12-07 22:51:35 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-12-08 11:40:54 +0100 |
commit | 7049b288ea8c95f270ec8fe643e3c3187938d5af (patch) | |
tree | 1198b3b4d30b439342b521dd4a657245251b844f /arch/powerpc/include/asm/rtas.h | |
parent | powerpc/rtas: complete ibm,suspend-me status codes (diff) | |
download | linux-7049b288ea8c95f270ec8fe643e3c3187938d5af.tar.xz linux-7049b288ea8c95f270ec8fe643e3c3187938d5af.zip |
powerpc/rtas: rtas_ibm_suspend_me -> rtas_ibm_suspend_me_unsafe
The pseries partition suspend sequence requires that all active CPUs
call H_JOIN, which suspends all but one of them with interrupts
disabled. The "chosen" CPU is then to call ibm,suspend-me to complete
the suspend. Upon returning from ibm,suspend-me, the chosen CPU is to
use H_PROD to wake the joined CPUs.
Using on_each_cpu() for this, as rtas_ibm_suspend_me() does to
implement partition migration, is susceptible to deadlock with other
users of on_each_cpu() and with users of stop_machine APIs. The
callback passed to on_each_cpu() is not allowed to synchronize with
other CPUs in the way it is used here.
Complicating the fix is the fact that rtas_ibm_suspend_me() also
occupies the function name that should be used to provide a more
conventional wrapper for ibm,suspend-me. Rename rtas_ibm_suspend_me()
to rtas_ibm_suspend_me_unsafe() to free up the name and indicate that
it should not gain users.
Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201207215200.1785968-4-nathanl@linux.ibm.com
Diffstat (limited to 'arch/powerpc/include/asm/rtas.h')
-rw-r--r-- | arch/powerpc/include/asm/rtas.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h index f060181a0d32..8436ed01567b 100644 --- a/arch/powerpc/include/asm/rtas.h +++ b/arch/powerpc/include/asm/rtas.h @@ -257,7 +257,7 @@ extern int rtas_set_indicator_fast(int indicator, int index, int new_value); extern void rtas_progress(char *s, unsigned short hex); extern int rtas_suspend_cpu(struct rtas_suspend_me_data *data); extern int rtas_suspend_last_cpu(struct rtas_suspend_me_data *data); -extern int rtas_ibm_suspend_me(u64 handle); +int rtas_ibm_suspend_me_unsafe(u64 handle); struct rtc_time; extern time64_t rtas_get_boot_time(void); |