aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/exceptions-64s.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/exceptions-64s.S')
-rw-r--r--arch/powerpc/kernel/exceptions-64s.S25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index 85b3c7e9dd6d..4dc1a045052a 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -62,6 +62,31 @@ END_FTR_SECTION_IFSET(CPU_FTR_REAL_LE) \
62 rfid ; \ 62 rfid ; \
63 b . ; /* prevent speculative execution */ 63 b . ; /* prevent speculative execution */
64 64
65#if defined(CONFIG_RELOCATABLE)
66 /*
67 * We can't branch directly; in the direct case we use LR
68 * and system_call_entry restores LR. (We thus need to move
69 * LR to r10 in the RFID case too.)
70 */
71#define SYSCALL_PSERIES_2_DIRECT \
72 mflr r10 ; \
73 ld r12,PACAKBASE(r13) ; \
74 LOAD_HANDLER(r12, system_call_entry_direct) ; \
75 mtlr r12 ; \
76 mfspr r12,SPRN_SRR1 ; \
77 /* Re-use of r13... No spare regs to do this */ \
78 li r13,MSR_RI ; \
79 mtmsrd r13,1 ; \
80 GET_PACA(r13) ; /* get r13 back */ \
81 blr ;
82#else
83 /* We can branch directly */
84#define SYSCALL_PSERIES_2_DIRECT \
85 mfspr r12,SPRN_SRR1 ; \
86 li r10,MSR_RI ; \
87 mtmsrd r10,1 ; /* Set RI (EE=0) */ \
88 b system_call_entry_direct ;
89#endif
65 90
66/* 91/*
67 * This is the start of the interrupt handlers for pSeries 92 * This is the start of the interrupt handlers for pSeries