Commit 2613265c authored by Michael Ellerman's avatar Michael Ellerman

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: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent d8725ce8
...@@ -333,8 +333,8 @@ do_kvm_##n: \ ...@@ -333,8 +333,8 @@ do_kvm_##n: \
/* /*
* Exception vectors. * Exception vectors.
*/ */
#define STD_EXCEPTION_PSERIES(loc, vec, label) \ #define STD_EXCEPTION_PSERIES(vec, label) \
. = loc; \ . = vec; \
.globl label##_pSeries; \ .globl label##_pSeries; \
label##_pSeries: \ label##_pSeries: \
SET_SCRATCH0(r13); /* save r13 */ \ SET_SCRATCH0(r13); /* save r13 */ \
......
...@@ -230,7 +230,7 @@ data_access_slb_pSeries: ...@@ -230,7 +230,7 @@ data_access_slb_pSeries:
bctr bctr
#endif #endif
STD_EXCEPTION_PSERIES(0x400, 0x400, instruction_access) STD_EXCEPTION_PSERIES(0x400, instruction_access)
. = 0x480 . = 0x480
.globl instruction_access_slb_pSeries .globl instruction_access_slb_pSeries
...@@ -274,13 +274,13 @@ hardware_interrupt_hv: ...@@ -274,13 +274,13 @@ hardware_interrupt_hv:
KVM_HANDLER(PACA_EXGEN, EXC_STD, 0x500) KVM_HANDLER(PACA_EXGEN, EXC_STD, 0x500)
ALT_FTR_SECTION_END_IFSET(CPU_FTR_HVMODE | CPU_FTR_ARCH_206) ALT_FTR_SECTION_END_IFSET(CPU_FTR_HVMODE | CPU_FTR_ARCH_206)
STD_EXCEPTION_PSERIES(0x600, 0x600, alignment) STD_EXCEPTION_PSERIES(0x600, alignment)
KVM_HANDLER(PACA_EXGEN, EXC_STD, 0x600) KVM_HANDLER(PACA_EXGEN, EXC_STD, 0x600)
STD_EXCEPTION_PSERIES(0x700, 0x700, program_check) STD_EXCEPTION_PSERIES(0x700, program_check)
KVM_HANDLER(PACA_EXGEN, EXC_STD, 0x700) KVM_HANDLER(PACA_EXGEN, EXC_STD, 0x700)
STD_EXCEPTION_PSERIES(0x800, 0x800, fp_unavailable) STD_EXCEPTION_PSERIES(0x800, fp_unavailable)
KVM_HANDLER(PACA_EXGEN, EXC_STD, 0x800) KVM_HANDLER(PACA_EXGEN, EXC_STD, 0x800)
. = 0x900 . = 0x900
...@@ -293,7 +293,7 @@ decrementer_pSeries: ...@@ -293,7 +293,7 @@ decrementer_pSeries:
MASKABLE_EXCEPTION_PSERIES(0xa00, 0xa00, doorbell_super) MASKABLE_EXCEPTION_PSERIES(0xa00, 0xa00, doorbell_super)
KVM_HANDLER(PACA_EXGEN, EXC_STD, 0xa00) KVM_HANDLER(PACA_EXGEN, EXC_STD, 0xa00)
STD_EXCEPTION_PSERIES(0xb00, 0xb00, trap_0b) STD_EXCEPTION_PSERIES(0xb00, trap_0b)
KVM_HANDLER(PACA_EXGEN, EXC_STD, 0xb00) KVM_HANDLER(PACA_EXGEN, EXC_STD, 0xb00)
. = 0xc00 . = 0xc00
...@@ -325,7 +325,7 @@ system_call_pSeries: ...@@ -325,7 +325,7 @@ system_call_pSeries:
SYSCALL_PSERIES_3 SYSCALL_PSERIES_3
KVM_HANDLER(PACA_EXGEN, EXC_STD, 0xc00) KVM_HANDLER(PACA_EXGEN, EXC_STD, 0xc00)
STD_EXCEPTION_PSERIES(0xd00, 0xd00, single_step) STD_EXCEPTION_PSERIES(0xd00, single_step)
KVM_HANDLER(PACA_EXGEN, EXC_STD, 0xd00) KVM_HANDLER(PACA_EXGEN, EXC_STD, 0xd00)
/* At 0xe??? we have a bunch of hypervisor exceptions, we branch /* At 0xe??? we have a bunch of hypervisor exceptions, we branch
...@@ -401,7 +401,7 @@ hv_facility_unavailable_trampoline: ...@@ -401,7 +401,7 @@ hv_facility_unavailable_trampoline:
KVM_HANDLER_SKIP(PACA_EXGEN, EXC_HV, 0x1202) KVM_HANDLER_SKIP(PACA_EXGEN, EXC_HV, 0x1202)
#endif /* CONFIG_CBE_RAS */ #endif /* CONFIG_CBE_RAS */
STD_EXCEPTION_PSERIES(0x1300, 0x1300, instruction_breakpoint) STD_EXCEPTION_PSERIES(0x1300, instruction_breakpoint)
KVM_HANDLER_SKIP(PACA_EXGEN, EXC_STD, 0x1300) KVM_HANDLER_SKIP(PACA_EXGEN, EXC_STD, 0x1300)
. = 0x1500 . = 0x1500
...@@ -428,7 +428,7 @@ denorm_exception_hv: ...@@ -428,7 +428,7 @@ denorm_exception_hv:
KVM_HANDLER_SKIP(PACA_EXGEN, EXC_HV, 0x1602) KVM_HANDLER_SKIP(PACA_EXGEN, EXC_HV, 0x1602)
#endif /* CONFIG_CBE_RAS */ #endif /* CONFIG_CBE_RAS */
STD_EXCEPTION_PSERIES(0x1700, 0x1700, altivec_assist) STD_EXCEPTION_PSERIES(0x1700, altivec_assist)
KVM_HANDLER(PACA_EXGEN, EXC_STD, 0x1700) KVM_HANDLER(PACA_EXGEN, EXC_STD, 0x1700)
#ifdef CONFIG_CBE_RAS #ifdef CONFIG_CBE_RAS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment