powerpc/64: Add macros for annotating the destination of rfid/hrfid
authorNicholas Piggin <npiggin@gmail.com>
Tue, 9 Jan 2018 16:07:15 +0000 (03:07 +1100)
committerSasha Levin <alexander.levin@microsoft.com>
Thu, 1 Mar 2018 03:09:48 +0000 (22:09 -0500)
commitb7b61b39d55f0e79ff09a948bab0f81c4e2bd10e
treecdfdcbc7c78366da019a8ef8f7bb75c127a72d4c
parent2e7059a5873845bc6054f0eb14682c576766d273
powerpc/64: Add macros for annotating the destination of rfid/hrfid

[ Upstream commit 50e51c13b3822d14ff6df4279423e4b7b2269bc3 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
arch/powerpc/include/asm/exception-64e.h
arch/powerpc/include/asm/exception-64s.h