diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2019-08-02 12:56:53 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2019-08-30 03:14:57 +0200 |
commit | 9a9c739aa83d031da7468028de8a65608146eccc (patch) | |
tree | e49e7bf8cea092aa8b05cfd0e04c916ebaf3732d /arch | |
parent | powerpc/64s/exception: KVM_HANDLER reorder arguments to match other macros (diff) | |
download | linux-9a9c739aa83d031da7468028de8a65608146eccc.tar.xz linux-9a9c739aa83d031da7468028de8a65608146eccc.zip |
powerpc/64s/exception: Merge EXCEPTION_PROLOG_COMMON_2/3
Merge EXCEPTION_PROLOG_COMMON_3 into EXCEPTION_PROLOG_COMMON_2.
No generated code change except BUG line number constants.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190802105709.27696-29-npiggin@gmail.com
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/exceptions-64s.S | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index d37420dee447..0643ae57badc 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S @@ -399,7 +399,7 @@ END_FTR_SECTION_NESTED(CPU_FTR_HAS_PPR,CPU_FTR_HAS_PPR,948) std r10,GPR1(r1); /* save r1 in stackframe */ \ /* Save original regs values from save area to stack frame. */ -#define EXCEPTION_PROLOG_COMMON_2(area) \ +#define EXCEPTION_PROLOG_COMMON_2(area, trap) \ ld r9,area+EX_R9(r13); /* move r9, r10 to stackframe */ \ ld r10,area+EX_R10(r13); \ std r9,GPR9(r1); \ @@ -415,9 +415,7 @@ BEGIN_FTR_SECTION_NESTED(66); \ std r10,ORIG_GPR3(r1); \ END_FTR_SECTION_NESTED(CPU_FTR_CFAR, CPU_FTR_CFAR, 66); \ GET_CTR(r10, area); \ - std r10,_CTR(r1); - -#define EXCEPTION_PROLOG_COMMON_3(trap) \ + std r10,_CTR(r1); \ std r2,GPR2(r1); /* save r2 in stackframe */ \ SAVE_4GPRS(3, r1); /* save r3 - r6 in stackframe */ \ SAVE_2GPRS(7, r1); /* save r7, r8 in stackframe */ \ @@ -453,8 +451,7 @@ END_FTR_SECTION_NESTED(CPU_FTR_CFAR, CPU_FTR_CFAR, 66); \ beq 4f; /* if from kernel mode */ \ ACCOUNT_CPU_USER_ENTRY(r13, r9, r10); \ SAVE_PPR(area, r9); \ -4: EXCEPTION_PROLOG_COMMON_2(area); \ - EXCEPTION_PROLOG_COMMON_3(trap); \ +4: EXCEPTION_PROLOG_COMMON_2(area, trap); \ ACCOUNT_STOLEN_TIME /* @@ -464,8 +461,7 @@ END_FTR_SECTION_NESTED(CPU_FTR_CFAR, CPU_FTR_CFAR, 66); \ #define EXCEPTION_COMMON_STACK(area, trap) \ EXCEPTION_PROLOG_COMMON_1(); \ kuap_save_amr_and_lock r9, r10, cr1; \ - EXCEPTION_PROLOG_COMMON_2(area); \ - EXCEPTION_PROLOG_COMMON_3(trap) + EXCEPTION_PROLOG_COMMON_2(area, trap) /* * Restore all registers including H/SRR0/1 saved in a stack frame of a @@ -968,8 +964,7 @@ EXC_COMMON_BEGIN(machine_check_early_common) EXCEPTION_PROLOG_COMMON_1() /* We don't touch AMR here, we never go to virtual mode */ - EXCEPTION_PROLOG_COMMON_2(PACA_EXMC) - EXCEPTION_PROLOG_COMMON_3(0x200) + EXCEPTION_PROLOG_COMMON_2(PACA_EXMC, 0x200) ld r3,PACA_EXMC+EX_DAR(r13) lwz r4,PACA_EXMC+EX_DSISR(r13) @@ -1616,8 +1611,7 @@ EXC_COMMON_BEGIN(hmi_exception_early_common) subi r1,r1,INT_FRAME_SIZE /* alloc stack frame */ EXCEPTION_PROLOG_COMMON_1() /* We don't touch AMR here, we never go to virtual mode */ - EXCEPTION_PROLOG_COMMON_2(PACA_EXGEN) - EXCEPTION_PROLOG_COMMON_3(0xe60) + EXCEPTION_PROLOG_COMMON_2(PACA_EXGEN, 0xe60) addi r3,r1,STACK_FRAME_OVERHEAD bl hmi_exception_realmode cmpdi cr0,r3,0 |