aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2015-12-16 05:10:22 -0500
committerMichael Ellerman <mpe@ellerman.id.au>2015-12-17 06:40:58 -0500
commit2613265cb5b07a46bc01eb67202874136efd7049 (patch)
treee4f647d2b9f43ba436c930e41fb835845ff2f466
parentd8725ce86c37fa750fc01f739ee4d4ced39167da (diff)
powerpc/kernel: Combine vec/loc for STD_EXCEPTION_PSERIES
The STD_EXCEPTION_PSERIES macro takes both a vector number, and a location (memory address). However both are always identical, so combine them to save repeating ourselves. This does mean an exception handler must always exist at the location in memory that matches its vector number. But that's OK because this is the "STD" macro (standard), which does exactly that. We have other macros for the other cases, eg. STD_EXCEPTION_PSERIES_OOL (out of line). Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/include/asm/exception-64s.h4
-rw-r--r--arch/powerpc/kernel/exceptions-64s.S16
2 files changed, 10 insertions, 10 deletions
diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/include/asm/exception-64s.h
index 60b2bbda212d..93ae809fe5ea 100644
--- a/arch/powerpc/include/asm/exception-64s.h
+++ b/arch/powerpc/include/asm/exception-64s.h
@@ -333,8 +333,8 @@ do_kvm_##n: \
333/* 333/*
334 * Exception vectors. 334 * Exception vectors.
335 */ 335 */
336#define STD_EXCEPTION_PSERIES(loc, vec, label) \ 336#define STD_EXCEPTION_PSERIES(vec, label) \
337 . = loc; \ 337 . = vec; \
338 .globl label##_pSeries; \ 338 .globl label##_pSeries; \
339label##_pSeries: \ 339label##_pSeries: \
340 SET_SCRATCH0(r13); /* save r13 */ \ 340 SET_SCRATCH0(r13); /* save r13 */ \
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index 0757f23d35aa..7716cebf4b8e 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -230,7 +230,7 @@ data_access_slb_pSeries:
230 bctr 230 bctr
231#endif 231#endif
232 232
233 STD_EXCEPTION_PSERIES(0x400, 0x400, instruction_access) 233 STD_EXCEPTION_PSERIES(0x400, instruction_access)
234 234
235 . = 0x480 235 . = 0x480
236 .globl instruction_access_slb_pSeries 236 .globl instruction_access_slb_pSeries
@@ -274,13 +274,13 @@ hardware_interrupt_hv:
274 KVM_HANDLER(PACA_EXGEN, EXC_STD, 0x500) 274 KVM_HANDLER(PACA_EXGEN, EXC_STD, 0x500)
275 ALT_FTR_SECTION_END_IFSET(CPU_FTR_HVMODE | CPU_FTR_ARCH_206) 275 ALT_FTR_SECTION_END_IFSET(CPU_FTR_HVMODE | CPU_FTR_ARCH_206)
276 276
277 STD_EXCEPTION_PSERIES(0x600, 0x600, alignment) 277 STD_EXCEPTION_PSERIES(0x600, alignment)
278 KVM_HANDLER(PACA_EXGEN, EXC_STD, 0x600) 278 KVM_HANDLER(PACA_EXGEN, EXC_STD, 0x600)
279 279
280 STD_EXCEPTION_PSERIES(0x700, 0x700, program_check) 280 STD_EXCEPTION_PSERIES(0x700, program_check)
281 KVM_HANDLER(PACA_EXGEN, EXC_STD, 0x700) 281 KVM_HANDLER(PACA_EXGEN, EXC_STD, 0x700)
282 282
283 STD_EXCEPTION_PSERIES(0x800, 0x800, fp_unavailable) 283 STD_EXCEPTION_PSERIES(0x800, fp_unavailable)
284 KVM_HANDLER(PACA_EXGEN, EXC_STD, 0x800) 284 KVM_HANDLER(PACA_EXGEN, EXC_STD, 0x800)
285 285
286 . = 0x900 286 . = 0x900
@@ -293,7 +293,7 @@ decrementer_pSeries:
293 MASKABLE_EXCEPTION_PSERIES(0xa00, 0xa00, doorbell_super) 293 MASKABLE_EXCEPTION_PSERIES(0xa00, 0xa00, doorbell_super)
294 KVM_HANDLER(PACA_EXGEN, EXC_STD, 0xa00) 294 KVM_HANDLER(PACA_EXGEN, EXC_STD, 0xa00)
295 295
296 STD_EXCEPTION_PSERIES(0xb00, 0xb00, trap_0b) 296 STD_EXCEPTION_PSERIES(0xb00, trap_0b)
297 KVM_HANDLER(PACA_EXGEN, EXC_STD, 0xb00) 297 KVM_HANDLER(PACA_EXGEN, EXC_STD, 0xb00)
298 298
299 . = 0xc00 299 . = 0xc00
@@ -325,7 +325,7 @@ system_call_pSeries:
325 SYSCALL_PSERIES_3 325 SYSCALL_PSERIES_3
326 KVM_HANDLER(PACA_EXGEN, EXC_STD, 0xc00) 326 KVM_HANDLER(PACA_EXGEN, EXC_STD, 0xc00)
327 327
328 STD_EXCEPTION_PSERIES(0xd00, 0xd00, single_step) 328 STD_EXCEPTION_PSERIES(0xd00, single_step)
329 KVM_HANDLER(PACA_EXGEN, EXC_STD, 0xd00) 329 KVM_HANDLER(PACA_EXGEN, EXC_STD, 0xd00)
330 330
331 /* At 0xe??? we have a bunch of hypervisor exceptions, we branch 331 /* At 0xe??? we have a bunch of hypervisor exceptions, we branch
@@ -401,7 +401,7 @@ hv_facility_unavailable_trampoline:
401 KVM_HANDLER_SKIP(PACA_EXGEN, EXC_HV, 0x1202) 401 KVM_HANDLER_SKIP(PACA_EXGEN, EXC_HV, 0x1202)
402#endif /* CONFIG_CBE_RAS */ 402#endif /* CONFIG_CBE_RAS */
403 403
404 STD_EXCEPTION_PSERIES(0x1300, 0x1300, instruction_breakpoint) 404 STD_EXCEPTION_PSERIES(0x1300, instruction_breakpoint)
405 KVM_HANDLER_SKIP(PACA_EXGEN, EXC_STD, 0x1300) 405 KVM_HANDLER_SKIP(PACA_EXGEN, EXC_STD, 0x1300)
406 406
407 . = 0x1500 407 . = 0x1500
@@ -428,7 +428,7 @@ denorm_exception_hv:
428 KVM_HANDLER_SKIP(PACA_EXGEN, EXC_HV, 0x1602) 428 KVM_HANDLER_SKIP(PACA_EXGEN, EXC_HV, 0x1602)
429#endif /* CONFIG_CBE_RAS */ 429#endif /* CONFIG_CBE_RAS */
430 430
431 STD_EXCEPTION_PSERIES(0x1700, 0x1700, altivec_assist) 431 STD_EXCEPTION_PSERIES(0x1700, altivec_assist)
432 KVM_HANDLER(PACA_EXGEN, EXC_STD, 0x1700) 432 KVM_HANDLER(PACA_EXGEN, EXC_STD, 0x1700)
433 433
434#ifdef CONFIG_CBE_RAS 434#ifdef CONFIG_CBE_RAS