Commit 014b2e89 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman

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: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220308135047.478297-10-npiggin@gmail.com
parent 5c86bd02
...@@ -122,15 +122,8 @@ __enter_rtas: ...@@ -122,15 +122,8 @@ __enter_rtas:
rtas_return_loc: rtas_return_loc:
FIXUP_ENDIAN FIXUP_ENDIAN
/* /* Set SF before anything. */
* Clear RI and set SF before anything. LOAD_REG_IMMEDIATE(r6, MSR_KERNEL & ~(MSR_IR|MSR_DR))
*/
mfmsr r6
li r0,MSR_RI
andc r6,r6,r0
sldi r0,r0,(MSR_SF_LG - MSR_RI_LG)
or r6,r6,r0
sync
mtmsrd r6 mtmsrd r6
/* relocation is off at this point */ /* relocation is off at this point */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment