diff options
author | Nathan Lynch <nathanl@linux.ibm.com> | 2020-12-07 15:51:47 -0600 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-12-08 21:40:59 +1100 |
commit | 4d756894ba75f1afe7945ccafe9afebff50484b6 (patch) | |
tree | 1e4dcd82593b2ace225e0e12055ab079058c9c44 /arch/powerpc/include/asm/rtas.h | |
parent | aeca35b9a52b0e0d019a5244fbaab699f753b443 (diff) | |
download | lwn-4d756894ba75f1afe7945ccafe9afebff50484b6.tar.gz lwn-4d756894ba75f1afe7945ccafe9afebff50484b6.zip |
powerpc/rtas: dispatch partition migration requests to pseries
sys_rtas() cannot call ibm,suspend-me directly in the same way it
handles other inputs. Instead it must dispatch the request to code
that can first perform the H_JOIN sequence before any call to
ibm,suspend-me can succeed. Over time kernel/rtas.c has accreted a fair
amount of platform-specific code to implement this.
Since a different, more robust implementation of the suspend sequence
is now in the pseries platform code, we want to dispatch the request
there.
Note that invoking ibm,suspend-me via the RTAS syscall is all but
deprecated; this change preserves ABI compatibility for old programs
while providing to them the benefit of the new partition suspend
implementation. This is a behavior change in that the kernel performs
the device tree update and firmware activation before returning, but
experimentation indicates this is tolerated fine by legacy user space.
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-16-nathanl@linux.ibm.com
Diffstat (limited to 'arch/powerpc/include/asm/rtas.h')
-rw-r--r-- | arch/powerpc/include/asm/rtas.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h index fdefe6a974eb..3b52d8574fcc 100644 --- a/arch/powerpc/include/asm/rtas.h +++ b/arch/powerpc/include/asm/rtas.h @@ -279,8 +279,13 @@ extern time64_t last_rtas_event; extern int clobbering_unread_rtas_event(void); extern int pseries_devicetree_update(s32 scope); extern void post_mobility_fixup(void); +int rtas_syscall_dispatch_ibm_suspend_me(u64 handle); #else static inline int clobbering_unread_rtas_event(void) { return 0; } +static inline int rtas_syscall_dispatch_ibm_suspend_me(u64 handle) +{ + return -EINVAL; +} #endif #ifdef CONFIG_PPC_RTAS_DAEMON |