diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2022-03-08 14:50:42 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-05-19 15:11:27 +0200 |
commit | 014b2e896cc8445fcc04636e69bf5f9e24281daa (patch) | |
tree | 966be50851bfc85c523b452dcf867480e2e2d849 /arch/powerpc/kernel/rtas_entry.S | |
parent | powerpc/rtas: PACA can be restored directly from SPRG (diff) | |
download | linux-014b2e896cc8445fcc04636e69bf5f9e24281daa.tar.xz linux-014b2e896cc8445fcc04636e69bf5f9e24281daa.zip |
powerpc/rtas: Leave MSR[RI] enabled over RTAS call
PAPR specifies that RTAS may be called with MSR[RI] enabled if the
calling context is recoverable, and RTAS will manage RI as necessary.
Call the rtas entry point with RI enabled, and add a check to ensure
the caller has RI enabled.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220308135047.478297-10-npiggin@gmail.com
Diffstat (limited to 'arch/powerpc/kernel/rtas_entry.S')
-rw-r--r-- | arch/powerpc/kernel/rtas_entry.S | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/powerpc/kernel/rtas_entry.S b/arch/powerpc/kernel/rtas_entry.S index 3bd29ddba546..9a434d42e660 100644 --- a/arch/powerpc/kernel/rtas_entry.S +++ b/arch/powerpc/kernel/rtas_entry.S @@ -122,15 +122,8 @@ __enter_rtas: rtas_return_loc: FIXUP_ENDIAN - /* - * Clear RI and set SF before anything. - */ - mfmsr r6 - li r0,MSR_RI - andc r6,r6,r0 - sldi r0,r0,(MSR_SF_LG - MSR_RI_LG) - or r6,r6,r0 - sync + /* Set SF before anything. */ + LOAD_REG_IMMEDIATE(r6, MSR_KERNEL & ~(MSR_IR|MSR_DR)) mtmsrd r6 /* relocation is off at this point */ |