diff options
Diffstat (limited to 'include/asm-sparc64/ttable.h')
-rw-r--r-- | include/asm-sparc64/ttable.h | 45 |
1 files changed, 43 insertions, 2 deletions
diff --git a/include/asm-sparc64/ttable.h b/include/asm-sparc64/ttable.h index f2352606a79f..c2a16e188499 100644 --- a/include/asm-sparc64/ttable.h +++ b/include/asm-sparc64/ttable.h | |||
@@ -137,10 +137,49 @@ | |||
137 | #endif | 137 | #endif |
138 | #define BREAKPOINT_TRAP TRAP(breakpoint_trap) | 138 | #define BREAKPOINT_TRAP TRAP(breakpoint_trap) |
139 | 139 | ||
140 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
141 | |||
142 | #define TRAP_IRQ(routine, level) \ | ||
143 | rdpr %pil, %g2; \ | ||
144 | wrpr %g0, 15, %pil; \ | ||
145 | sethi %hi(1f-4), %g7; \ | ||
146 | ba,pt %xcc, etrap_irq; \ | ||
147 | or %g7, %lo(1f-4), %g7; \ | ||
148 | nop; \ | ||
149 | nop; \ | ||
150 | nop; \ | ||
151 | .subsection 2; \ | ||
152 | 1: call trace_hardirqs_off; \ | ||
153 | nop; \ | ||
154 | mov level, %o0; \ | ||
155 | call routine; \ | ||
156 | add %sp, PTREGS_OFF, %o1; \ | ||
157 | ba,a,pt %xcc, rtrap_irq; \ | ||
158 | .previous; | ||
159 | |||
160 | #define TICK_SMP_IRQ \ | ||
161 | rdpr %pil, %g2; \ | ||
162 | wrpr %g0, 15, %pil; \ | ||
163 | sethi %hi(1f-4), %g7; \ | ||
164 | ba,pt %xcc, etrap_irq; \ | ||
165 | or %g7, %lo(1f-4), %g7; \ | ||
166 | nop; \ | ||
167 | nop; \ | ||
168 | nop; \ | ||
169 | .subsection 2; \ | ||
170 | 1: call trace_hardirqs_off; \ | ||
171 | nop; \ | ||
172 | call smp_percpu_timer_interrupt; \ | ||
173 | add %sp, PTREGS_OFF, %o0; \ | ||
174 | ba,a,pt %xcc, rtrap_irq; \ | ||
175 | .previous; | ||
176 | |||
177 | #else | ||
178 | |||
140 | #define TRAP_IRQ(routine, level) \ | 179 | #define TRAP_IRQ(routine, level) \ |
141 | rdpr %pil, %g2; \ | 180 | rdpr %pil, %g2; \ |
142 | wrpr %g0, 15, %pil; \ | 181 | wrpr %g0, 15, %pil; \ |
143 | b,pt %xcc, etrap_irq; \ | 182 | ba,pt %xcc, etrap_irq; \ |
144 | rd %pc, %g7; \ | 183 | rd %pc, %g7; \ |
145 | mov level, %o0; \ | 184 | mov level, %o0; \ |
146 | call routine; \ | 185 | call routine; \ |
@@ -151,12 +190,14 @@ | |||
151 | rdpr %pil, %g2; \ | 190 | rdpr %pil, %g2; \ |
152 | wrpr %g0, 15, %pil; \ | 191 | wrpr %g0, 15, %pil; \ |
153 | sethi %hi(109f), %g7; \ | 192 | sethi %hi(109f), %g7; \ |
154 | b,pt %xcc, etrap_irq; \ | 193 | ba,pt %xcc, etrap_irq; \ |
155 | 109: or %g7, %lo(109b), %g7; \ | 194 | 109: or %g7, %lo(109b), %g7; \ |
156 | call smp_percpu_timer_interrupt; \ | 195 | call smp_percpu_timer_interrupt; \ |
157 | add %sp, PTREGS_OFF, %o0; \ | 196 | add %sp, PTREGS_OFF, %o0; \ |
158 | ba,a,pt %xcc, rtrap_irq; | 197 | ba,a,pt %xcc, rtrap_irq; |
159 | 198 | ||
199 | #endif | ||
200 | |||
160 | #define TRAP_IVEC TRAP_NOSAVE(do_ivec) | 201 | #define TRAP_IVEC TRAP_NOSAVE(do_ivec) |
161 | 202 | ||
162 | #define BTRAP(lvl) TRAP_ARG(bad_trap, lvl) | 203 | #define BTRAP(lvl) TRAP_ARG(bad_trap, lvl) |