diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2018-01-09 17:07:15 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-01-09 17:07:30 +0100 |
commit | 50e51c13b3822d14ff6df4279423e4b7b2269bc3 (patch) | |
tree | 6f37b935c308c39495e190170a2a1e028ca5ef9a /arch/powerpc/include/asm/exception-64e.h | |
parent | Merge branch 'topic/ppc-kvm' into fixes (diff) | |
download | linux-50e51c13b3822d14ff6df4279423e4b7b2269bc3.tar.xz linux-50e51c13b3822d14ff6df4279423e4b7b2269bc3.zip |
powerpc/64: Add macros for annotating the destination of rfid/hrfid
The rfid/hrfid ((Hypervisor) Return From Interrupt) instruction is
used for switching from the kernel to userspace, and from the
hypervisor to the guest kernel. However it can and is also used for
other transitions, eg. from real mode kernel code to virtual mode
kernel code, and it's not always clear from the code what the
destination context is.
To make it clearer when reading the code, add macros which encode the
expected destination context.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/exception-64e.h')
-rw-r--r-- | arch/powerpc/include/asm/exception-64e.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/exception-64e.h b/arch/powerpc/include/asm/exception-64e.h index a703452d67b6..555e22d5e07f 100644 --- a/arch/powerpc/include/asm/exception-64e.h +++ b/arch/powerpc/include/asm/exception-64e.h @@ -209,5 +209,11 @@ exc_##label##_book3e: ori r3,r3,vector_offset@l; \ mtspr SPRN_IVOR##vector_number,r3; +#define RFI_TO_KERNEL \ + rfi + +#define RFI_TO_USER \ + rfi + #endif /* _ASM_POWERPC_EXCEPTION_64E_H */ |