summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/exception-64s.h
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2019-06-22 16:15:18 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2019-07-02 13:24:42 +0300
commitc0c6cd156c1239cd199a3bc083f1924518dd02a6 (patch)
treeed200b8cae48d47685e9a809b1fb77b8808123ed /arch/powerpc/include/asm/exception-64s.h
parent17bdc064a1fe8638b526ec44e6593685dbfdc714 (diff)
downloadlinux-c0c6cd156c1239cd199a3bc083f1924518dd02a6.tar.xz
powerpc/64s/exception: KVM handler can set the HSRR trap bit
Move the KVM trap HSRR bit into the KVM handler, which can be conditionally applied when hsrr parameter is set. No generated code change. 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-64s.h')
-rw-r--r--arch/powerpc/include/asm/exception-64s.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/include/asm/exception-64s.h
index d2a5bbeb727d..a7b514574b80 100644
--- a/arch/powerpc/include/asm/exception-64s.h
+++ b/arch/powerpc/include/asm/exception-64s.h
@@ -454,7 +454,12 @@ END_FTR_SECTION_NESTED(ftr,ftr,943)
ld r10,\area+EX_R10(r13)
std r12,HSTATE_SCRATCH0(r13)
sldi r12,r9,32
+ /* HSRR variants have the 0x2 bit added to their trap number */
+ .if \hsrr
+ ori r12,r12,(\n + 0x2)
+ .else
ori r12,r12,(\n)
+ .endif
/* This reloads r9 before branching to kvmppc_interrupt */
__BRANCH_TO_KVM_EXIT(\area, kvmppc_interrupt)