[PATCH 04/14] powerpc/pseries: move decrementer exception vector out of line

Nicholas Piggin nicholas.piggin at gmail.com
Thu Jul 21 16:44:03 AEST 2016


In preparation for extending the reach of exception handler loading,
decrementer interrupt has to be moved out of line. The in-line version
is already 0x80 bytes long in worst case, so there is no more room for
instructions.

This is done to make intermediate patch steps build and run. It gets
reverted in a later patch.

Signed-off-by: Nick Piggin <npiggin at gmail.com>
---
 arch/powerpc/include/asm/exception-64s.h |  6 ++++++
 arch/powerpc/kernel/exceptions-64s.S     | 11 ++++++++---
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/include/asm/exception-64s.h
index 93ae809..addc19b 100644
--- a/arch/powerpc/include/asm/exception-64s.h
+++ b/arch/powerpc/include/asm/exception-64s.h
@@ -438,6 +438,12 @@ label##_pSeries:							\
 	_MASKABLE_EXCEPTION_PSERIES(vec, label,				\
 				    EXC_STD, SOFTEN_TEST_PR)
 
+#define MASKABLE_EXCEPTION_PSERIES_OOL(vec, label)			\
+	.globl label##_pSeries;						\
+label##_pSeries:							\
+	EXCEPTION_PROLOG_1(PACA_EXGEN, SOFTEN_TEST_PR, vec);		\
+	EXCEPTION_PROLOG_PSERIES_1(label##_common, EXC_STD);
+
 #define MASKABLE_EXCEPTION_HV(loc, vec, label)				\
 	. = loc;							\
 	.globl label##_hv;						\
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index 18befa5..79eb752 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -279,9 +279,11 @@ hardware_interrupt_hv:
 	KVM_HANDLER(PACA_EXGEN, EXC_STD, 0x800)
 
 	. = 0x900
-	.globl decrementer_pSeries
-decrementer_pSeries:
-	_MASKABLE_EXCEPTION_PSERIES(0x900, decrementer, EXC_STD, SOFTEN_TEST_PR)
+	.globl decrementer_pseries_trampoline
+decrementer_pseries_trampoline:
+	SET_SCRATCH0(r13)
+	EXCEPTION_PROLOG_0(PACA_EXGEN)
+	b	decrementer_pSeries
 
 	STD_EXCEPTION_HV(0x980, 0x982, hdecrementer)
 
@@ -593,6 +595,9 @@ END_FTR_SECTION_IFSET(CPU_FTR_CFAR)
 #endif
 
 	.align	7
+	/* moved from 0x900 */
+	MASKABLE_EXCEPTION_PSERIES_OOL(0x900, decrementer)
+
 	/* moved from 0xe00 */
 	STD_EXCEPTION_HV_OOL(0xe02, h_data_storage)
 	KVM_HANDLER_SKIP(PACA_EXGEN, EXC_HV, 0xe02)
-- 
2.8.1



More information about the Linuxppc-dev mailing list