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.S50
1 files changed, 29 insertions, 21 deletions
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index f129408c6022..08ba447a4b3d 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -95,19 +95,35 @@ __start_interrupts:
95/* No virt vectors corresponding with 0x0..0x100 */ 95/* No virt vectors corresponding with 0x0..0x100 */
96EXC_VIRT_NONE(0x4000, 0x4100) 96EXC_VIRT_NONE(0x4000, 0x4100)
97 97
98EXC_REAL_BEGIN(system_reset, 0x100, 0x200) 98
99 SET_SCRATCH0(r13)
100#ifdef CONFIG_PPC_P7_NAP 99#ifdef CONFIG_PPC_P7_NAP
101BEGIN_FTR_SECTION 100 /*
102 /* Running native on arch 2.06 or later, check if we are 101 * If running native on arch 2.06 or later, check if we are waking up
103 * waking up from nap/sleep/winkle. 102 * from nap/sleep/winkle, and branch to idle handler.
104 */ 103 */
105 mfspr r13,SPRN_SRR1 104#define IDLETEST(n) \
106 rlwinm. r13,r13,47-31,30,31 105 BEGIN_FTR_SECTION ; \
107 beq 9f 106 mfspr r10,SPRN_SRR1 ; \
107 rlwinm. r10,r10,47-31,30,31 ; \
108 beq- 1f ; \
109 cmpwi cr3,r10,2 ; \
110 BRANCH_TO_COMMON(r10, system_reset_idle_common) ; \
1111: \
112 END_FTR_SECTION_IFSET(CPU_FTR_HVMODE | CPU_FTR_ARCH_206)
113#else
114#define IDLETEST NOTEST
115#endif
108 116
109 cmpwi cr3,r13,2 117EXC_REAL_BEGIN(system_reset, 0x100, 0x200)
110 GET_PACA(r13) 118 SET_SCRATCH0(r13)
119 EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, system_reset_common, EXC_STD,
120 IDLETEST, 0x100)
121
122EXC_REAL_END(system_reset, 0x100, 0x200)
123EXC_VIRT_NONE(0x4100, 0x4200)
124
125#ifdef CONFIG_PPC_P7_NAP
126EXC_COMMON_BEGIN(system_reset_idle_common)
111 bl pnv_restore_hyp_resource 127 bl pnv_restore_hyp_resource
112 128
113 li r0,PNV_THREAD_RUNNING 129 li r0,PNV_THREAD_RUNNING
@@ -130,14 +146,8 @@ BEGIN_FTR_SECTION
130 blt cr3,2f 146 blt cr3,2f
131 b pnv_wakeup_loss 147 b pnv_wakeup_loss
1322: b pnv_wakeup_noloss 1482: b pnv_wakeup_noloss
149#endif
133 150
1349:
135END_FTR_SECTION_IFSET(CPU_FTR_HVMODE | CPU_FTR_ARCH_206)
136#endif /* CONFIG_PPC_P7_NAP */
137 EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, system_reset_common, EXC_STD,
138 NOTEST, 0x100)
139EXC_REAL_END(system_reset, 0x100, 0x200)
140EXC_VIRT_NONE(0x4100, 0x4200)
141EXC_COMMON(system_reset_common, 0x100, system_reset_exception) 151EXC_COMMON(system_reset_common, 0x100, system_reset_exception)
142 152
143#ifdef CONFIG_PPC_PSERIES 153#ifdef CONFIG_PPC_PSERIES
@@ -817,10 +827,8 @@ EXC_VIRT(trap_0b, 0x4b00, 0x4c00, 0xb00)
817TRAMP_KVM(PACA_EXGEN, 0xb00) 827TRAMP_KVM(PACA_EXGEN, 0xb00)
818EXC_COMMON(trap_0b_common, 0xb00, unknown_exception) 828EXC_COMMON(trap_0b_common, 0xb00, unknown_exception)
819 829
820 830#define LOAD_SYSCALL_HANDLER(reg) \
821#define LOAD_SYSCALL_HANDLER(reg) \ 831 __LOAD_HANDLER(reg, system_call_common)
822 ld reg,PACAKBASE(r13); \
823 ori reg,reg,(ABS_ADDR(system_call_common))@l;
824 832
825/* Syscall routine is used twice, in reloc-off and reloc-on paths */ 833/* Syscall routine is used twice, in reloc-off and reloc-on paths */
826#define SYSCALL_PSERIES_1 \ 834#define SYSCALL_PSERIES_1 \