Commit be642c34 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman

powerpc/64s: Consolidate exception handler alignment

Move exception handler alignment directives into the head-64.h macros,
beause they will no longer work in-place after the next patch. This
slightly changes functions that have alignments applied and therefore
code generation, which is why it was not done initially (see earlier
patch).
Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent da2bc464
...@@ -18,6 +18,7 @@ exc_virt_##start##_##name: ...@@ -18,6 +18,7 @@ exc_virt_##start##_##name:
#define EXC_VIRT_END(name, start, end) #define EXC_VIRT_END(name, start, end)
#define EXC_COMMON_BEGIN(name) \ #define EXC_COMMON_BEGIN(name) \
.align 7; \
.global name; \ .global name; \
name: name:
......
...@@ -366,7 +366,6 @@ EXC_REAL_NONE(0x1800, 0x1900) ...@@ -366,7 +366,6 @@ EXC_REAL_NONE(0x1800, 0x1900)
/*** Out of line interrupts support ***/ /*** Out of line interrupts support ***/
/* moved from 0x200 */ /* moved from 0x200 */
.align 7;
TRAMP_REAL_BEGIN(machine_check_powernv_early) TRAMP_REAL_BEGIN(machine_check_powernv_early)
BEGIN_FTR_SECTION BEGIN_FTR_SECTION
EXCEPTION_PROLOG_1(PACA_EXMC, NOTEST, 0x200) EXCEPTION_PROLOG_1(PACA_EXMC, NOTEST, 0x200)
...@@ -535,7 +534,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_CFAR) ...@@ -535,7 +534,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_CFAR)
b . b .
#endif #endif
.align 7
/* moved from 0xe00 */ /* moved from 0xe00 */
__TRAMP_REAL_REAL_OOL_HV(h_data_storage, 0xe00) __TRAMP_REAL_REAL_OOL_HV(h_data_storage, 0xe00)
TRAMP_KVM_HV_SKIP(PACA_EXGEN, 0xe00) TRAMP_KVM_HV_SKIP(PACA_EXGEN, 0xe00)
...@@ -652,7 +650,6 @@ ALT_FTR_SECTION_END_IFSET(CPU_FTR_HVMODE) ...@@ -652,7 +650,6 @@ ALT_FTR_SECTION_END_IFSET(CPU_FTR_HVMODE)
/* /*
* Vectors for the FWNMI option. Share common code. * Vectors for the FWNMI option. Share common code.
*/ */
.align 7
TRAMP_REAL_BEGIN(system_reset_fwnmi) TRAMP_REAL_BEGIN(system_reset_fwnmi)
SET_SCRATCH0(r13) /* save r13 */ SET_SCRATCH0(r13) /* save r13 */
EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, system_reset_common, EXC_STD, EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, system_reset_common, EXC_STD,
...@@ -695,46 +692,30 @@ TRAMP_REAL_BEGIN(kvmppc_skip_Hinterrupt) ...@@ -695,46 +692,30 @@ TRAMP_REAL_BEGIN(kvmppc_skip_Hinterrupt)
/*** Common interrupt handlers ***/ /*** Common interrupt handlers ***/
.align 7;
EXC_COMMON(system_reset_common, 0x100, system_reset_exception) EXC_COMMON(system_reset_common, 0x100, system_reset_exception)
.align 7;
EXC_COMMON_ASYNC(hardware_interrupt_common, 0x500, do_IRQ) EXC_COMMON_ASYNC(hardware_interrupt_common, 0x500, do_IRQ)
.align 7;
EXC_COMMON_ASYNC(decrementer_common, 0x900, timer_interrupt) EXC_COMMON_ASYNC(decrementer_common, 0x900, timer_interrupt)
.align 7;
EXC_COMMON(hdecrementer_common, 0x980, hdec_interrupt) EXC_COMMON(hdecrementer_common, 0x980, hdec_interrupt)
.align 7;
#ifdef CONFIG_PPC_DOORBELL #ifdef CONFIG_PPC_DOORBELL
EXC_COMMON_ASYNC(doorbell_super_common, 0xa00, doorbell_exception) EXC_COMMON_ASYNC(doorbell_super_common, 0xa00, doorbell_exception)
#else #else
EXC_COMMON_ASYNC(doorbell_super_common, 0xa00, unknown_exception) EXC_COMMON_ASYNC(doorbell_super_common, 0xa00, unknown_exception)
#endif #endif
.align 7;
EXC_COMMON(trap_0b_common, 0xb00, unknown_exception) EXC_COMMON(trap_0b_common, 0xb00, unknown_exception)
.align 7;
EXC_COMMON(single_step_common, 0xd00, single_step_exception) EXC_COMMON(single_step_common, 0xd00, single_step_exception)
.align 7;
EXC_COMMON(trap_0e_common, 0xe00, unknown_exception) EXC_COMMON(trap_0e_common, 0xe00, unknown_exception)
.align 7;
EXC_COMMON(emulation_assist_common, 0xe40, emulation_assist_interrupt) EXC_COMMON(emulation_assist_common, 0xe40, emulation_assist_interrupt)
.align 7;
EXC_COMMON_ASYNC(hmi_exception_common, 0xe60, handle_hmi_exception) EXC_COMMON_ASYNC(hmi_exception_common, 0xe60, handle_hmi_exception)
.align 7;
#ifdef CONFIG_PPC_DOORBELL #ifdef CONFIG_PPC_DOORBELL
EXC_COMMON_ASYNC(h_doorbell_common, 0xe80, doorbell_exception) EXC_COMMON_ASYNC(h_doorbell_common, 0xe80, doorbell_exception)
#else #else
EXC_COMMON_ASYNC(h_doorbell_common, 0xe80, unknown_exception) EXC_COMMON_ASYNC(h_doorbell_common, 0xe80, unknown_exception)
#endif #endif
.align 7;
EXC_COMMON_ASYNC(h_virt_irq_common, 0xea0, do_IRQ) EXC_COMMON_ASYNC(h_virt_irq_common, 0xea0, do_IRQ)
.align 7;
EXC_COMMON_ASYNC(performance_monitor_common, 0xf00, performance_monitor_exception) EXC_COMMON_ASYNC(performance_monitor_common, 0xf00, performance_monitor_exception)
.align 7;
EXC_COMMON(instruction_breakpoint_common, 0x1300, instruction_breakpoint_exception) EXC_COMMON(instruction_breakpoint_common, 0x1300, instruction_breakpoint_exception)
.align 7;
EXC_COMMON_HV(denorm_common, 0x1500, unknown_exception) EXC_COMMON_HV(denorm_common, 0x1500, unknown_exception)
.align 7;
#ifdef CONFIG_ALTIVEC #ifdef CONFIG_ALTIVEC
EXC_COMMON(altivec_assist_common, 0x1700, altivec_assist_exception) EXC_COMMON(altivec_assist_common, 0x1700, altivec_assist_exception)
#else #else
...@@ -889,7 +870,6 @@ TRAMP_REAL_BEGIN(ppc64_runlatch_on_trampoline) ...@@ -889,7 +870,6 @@ TRAMP_REAL_BEGIN(ppc64_runlatch_on_trampoline)
* SRR0 and SRR1 are saved in r11 and r12, * SRR0 and SRR1 are saved in r11 and r12,
* r9 - r13 are saved in paca->exgen. * r9 - r13 are saved in paca->exgen.
*/ */
.align 7
EXC_COMMON_BEGIN(data_access_common) EXC_COMMON_BEGIN(data_access_common)
mfspr r10,SPRN_DAR mfspr r10,SPRN_DAR
std r10,PACA_EXGEN+EX_DAR(r13) std r10,PACA_EXGEN+EX_DAR(r13)
...@@ -909,7 +889,6 @@ MMU_FTR_SECTION_ELSE ...@@ -909,7 +889,6 @@ MMU_FTR_SECTION_ELSE
b handle_page_fault b handle_page_fault
ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_TYPE_RADIX) ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_TYPE_RADIX)
.align 7
EXC_COMMON_BEGIN(h_data_storage_common) EXC_COMMON_BEGIN(h_data_storage_common)
mfspr r10,SPRN_HDAR mfspr r10,SPRN_HDAR
std r10,PACA_EXGEN+EX_DAR(r13) std r10,PACA_EXGEN+EX_DAR(r13)
...@@ -922,7 +901,6 @@ EXC_COMMON_BEGIN(h_data_storage_common) ...@@ -922,7 +901,6 @@ EXC_COMMON_BEGIN(h_data_storage_common)
bl unknown_exception bl unknown_exception
b ret_from_except b ret_from_except
.align 7
EXC_COMMON_BEGIN(instruction_access_common) EXC_COMMON_BEGIN(instruction_access_common)
EXCEPTION_PROLOG_COMMON(0x400, PACA_EXGEN) EXCEPTION_PROLOG_COMMON(0x400, PACA_EXGEN)
RECONCILE_IRQ_STATE(r10, r11) RECONCILE_IRQ_STATE(r10, r11)
...@@ -938,14 +916,12 @@ MMU_FTR_SECTION_ELSE ...@@ -938,14 +916,12 @@ MMU_FTR_SECTION_ELSE
b handle_page_fault b handle_page_fault
ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_TYPE_RADIX) ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_TYPE_RADIX)
.align 7
EXC_COMMON(h_instr_storage_common, 0xe20, unknown_exception) EXC_COMMON(h_instr_storage_common, 0xe20, unknown_exception)
/* /*
* Machine check is different because we use a different * Machine check is different because we use a different
* save area: PACA_EXMC instead of PACA_EXGEN. * save area: PACA_EXMC instead of PACA_EXGEN.
*/ */
.align 7
EXC_COMMON_BEGIN(machine_check_common) EXC_COMMON_BEGIN(machine_check_common)
mfspr r10,SPRN_DAR mfspr r10,SPRN_DAR
std r10,PACA_EXMC+EX_DAR(r13) std r10,PACA_EXMC+EX_DAR(r13)
...@@ -966,7 +942,6 @@ EXC_COMMON_BEGIN(machine_check_common) ...@@ -966,7 +942,6 @@ EXC_COMMON_BEGIN(machine_check_common)
bl machine_check_exception bl machine_check_exception
b ret_from_except b ret_from_except
.align 7
EXC_COMMON_BEGIN(alignment_common) EXC_COMMON_BEGIN(alignment_common)
mfspr r10,SPRN_DAR mfspr r10,SPRN_DAR
std r10,PACA_EXGEN+EX_DAR(r13) std r10,PACA_EXGEN+EX_DAR(r13)
...@@ -983,7 +958,6 @@ EXC_COMMON_BEGIN(alignment_common) ...@@ -983,7 +958,6 @@ EXC_COMMON_BEGIN(alignment_common)
bl alignment_exception bl alignment_exception
b ret_from_except b ret_from_except
.align 7
EXC_COMMON_BEGIN(program_check_common) EXC_COMMON_BEGIN(program_check_common)
EXCEPTION_PROLOG_COMMON(0x700, PACA_EXGEN) EXCEPTION_PROLOG_COMMON(0x700, PACA_EXGEN)
bl save_nvgprs bl save_nvgprs
...@@ -992,7 +966,6 @@ EXC_COMMON_BEGIN(program_check_common) ...@@ -992,7 +966,6 @@ EXC_COMMON_BEGIN(program_check_common)
bl program_check_exception bl program_check_exception
b ret_from_except b ret_from_except
.align 7
EXC_COMMON_BEGIN(fp_unavailable_common) EXC_COMMON_BEGIN(fp_unavailable_common)
EXCEPTION_PROLOG_COMMON(0x800, PACA_EXGEN) EXCEPTION_PROLOG_COMMON(0x800, PACA_EXGEN)
bne 1f /* if from user, just load it up */ bne 1f /* if from user, just load it up */
...@@ -1022,7 +995,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_TM) ...@@ -1022,7 +995,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_TM)
b ret_from_except b ret_from_except
#endif #endif
.align 7
EXC_COMMON_BEGIN(altivec_unavailable_common) EXC_COMMON_BEGIN(altivec_unavailable_common)
EXCEPTION_PROLOG_COMMON(0xf20, PACA_EXGEN) EXCEPTION_PROLOG_COMMON(0xf20, PACA_EXGEN)
#ifdef CONFIG_ALTIVEC #ifdef CONFIG_ALTIVEC
...@@ -1056,7 +1028,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) ...@@ -1056,7 +1028,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
bl altivec_unavailable_exception bl altivec_unavailable_exception
b ret_from_except b ret_from_except
.align 7
EXC_COMMON_BEGIN(vsx_unavailable_common) EXC_COMMON_BEGIN(vsx_unavailable_common)
EXCEPTION_PROLOG_COMMON(0xf40, PACA_EXGEN) EXCEPTION_PROLOG_COMMON(0xf40, PACA_EXGEN)
#ifdef CONFIG_VSX #ifdef CONFIG_VSX
...@@ -1125,22 +1096,16 @@ fwnmi_data_area: ...@@ -1125,22 +1096,16 @@ fwnmi_data_area:
. = 0x8000 . = 0x8000
#endif /* defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV) */ #endif /* defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV) */
.align 7;
EXC_COMMON(facility_unavailable_common, 0xf60, facility_unavailable_exception) EXC_COMMON(facility_unavailable_common, 0xf60, facility_unavailable_exception)
.align 7;
EXC_COMMON(h_facility_unavailable_common, 0xf80, facility_unavailable_exception) EXC_COMMON(h_facility_unavailable_common, 0xf80, facility_unavailable_exception)
#ifdef CONFIG_CBE_RAS #ifdef CONFIG_CBE_RAS
.align 7;
EXC_COMMON(cbe_system_error_common, 0x1200, cbe_system_error_exception) EXC_COMMON(cbe_system_error_common, 0x1200, cbe_system_error_exception)
.align 7;
EXC_COMMON(cbe_maintenance_common, 0x1600, cbe_maintenance_exception) EXC_COMMON(cbe_maintenance_common, 0x1600, cbe_maintenance_exception)
.align 7;
EXC_COMMON(cbe_thermal_common, 0x1800, cbe_thermal_exception) EXC_COMMON(cbe_thermal_common, 0x1800, cbe_thermal_exception)
#endif /* CONFIG_CBE_RAS */ #endif /* CONFIG_CBE_RAS */
.align 7;
EXC_COMMON_BEGIN(hmi_exception_early) EXC_COMMON_BEGIN(hmi_exception_early)
EXCEPTION_PROLOG_1(PACA_EXGEN, KVMTEST_HV, 0xe60) EXCEPTION_PROLOG_1(PACA_EXGEN, KVMTEST_HV, 0xe60)
mr r10,r1 /* Save r1 */ mr r10,r1 /* Save r1 */
...@@ -1226,7 +1191,6 @@ hmi_exception_after_realmode: ...@@ -1226,7 +1191,6 @@ hmi_exception_after_realmode:
* Handle machine check early in real mode. We come here with * Handle machine check early in real mode. We come here with
* ME=1, MMU (IR=0 and DR=0) off and using MC emergency stack. * ME=1, MMU (IR=0 and DR=0) off and using MC emergency stack.
*/ */
.align 7
EXC_COMMON_BEGIN(machine_check_handle_early) EXC_COMMON_BEGIN(machine_check_handle_early)
std r0,GPR0(r1) /* Save r0 */ std r0,GPR0(r1) /* Save r0 */
EXCEPTION_PROLOG_COMMON_3(0x200) EXCEPTION_PROLOG_COMMON_3(0x200)
......
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