Subject: [PATCH 10/41] powerpc/64s: consolidate External 0x500 interrupt

From: Nicholas Piggin <[email-masked]>
Date: Wed, 21 Sep 2016 17:43:36 +1000

Signed-off-by: Nicholas Piggin <[email-masked]>
---
 arch/powerpc/kernel/exceptions-64s.S | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index 0320b60..fc5ad5c 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -752,6 +752,19 @@ do_kvm_0x500:
 	ALT_FTR_SECTION_END_IFSET(CPU_FTR_HVMODE | CPU_FTR_ARCH_206)
 VECTOR_HANDLER_REAL_END(hardware_interrupt, 0x500, 0x600)
 
+VECTOR_HANDLER_VIRT_BEGIN(hardware_interrupt, 0x4500, 0x4600)
+	.globl hardware_interrupt_relon_hv;
+hardware_interrupt_relon_hv:
+	BEGIN_FTR_SECTION
+		_MASKABLE_RELON_EXCEPTION_PSERIES(0x500, hardware_interrupt_common, EXC_HV, SOFTEN_TEST_HV)
+	FTR_SECTION_ELSE
+		_MASKABLE_RELON_EXCEPTION_PSERIES(0x500, FIXED_SECTION_REL_ADDR(text, hardware_interrupt_common), EXC_STD, SOFTEN_TEST_PR)
+	ALT_FTR_SECTION_END_IFSET(CPU_FTR_HVMODE)
+VECTOR_HANDLER_VIRT_END(hardware_interrupt, 0x4500, 0x4600)
+
+COMMON_HANDLER_ASYNC(hardware_interrupt_common, 0x500, do_IRQ)
+
+
 VECTOR_HANDLER_REAL(alignment, 0x600, 0x700)
 
 TRAMP_KVM(PACA_EXGEN, 0x600)
@@ -1122,7 +1135,6 @@ TRAMP_HANDLER_END(kvmppc_skip_Hinterrupt)
 
 /*** Common interrupt handlers ***/
 
-COMMON_HANDLER_ASYNC(hardware_interrupt_common, 0x500, do_IRQ)
 COMMON_HANDLER_ASYNC(decrementer_common, 0x900, timer_interrupt)
 COMMON_HANDLER(hdecrementer_common, 0x980, hdec_interrupt)
 
@@ -1170,16 +1182,6 @@ COMMON_HANDLER(altivec_assist_common, 0x1700, unknown_exception)

-VECTOR_HANDLER_VIRT_BEGIN(hardware_interrupt, 0x4500, 0x4600)
-	.globl hardware_interrupt_relon_hv;
-hardware_interrupt_relon_hv:
-	BEGIN_FTR_SECTION
-		_MASKABLE_RELON_EXCEPTION_PSERIES(0x500, hardware_interrupt_common, EXC_HV, SOFTEN_TEST_HV)
-	FTR_SECTION_ELSE
-		_MASKABLE_RELON_EXCEPTION_PSERIES(0x500, FIXED_SECTION_REL_ADDR(text, hardware_interrupt_common), EXC_STD, SOFTEN_TEST_PR)
-	ALT_FTR_SECTION_END_IFSET(CPU_FTR_HVMODE)
-VECTOR_HANDLER_VIRT_END(hardware_interrupt, 0x4500, 0x4600)
-
 VECTOR_HANDLER_VIRT(alignment, 0x4600, 0x4700, 0x600)
 VECTOR_HANDLER_VIRT(program_check, 0x4700, 0x4800, 0x700)
 VECTOR_HANDLER_VIRT(fp_unavailable, 0x4800, 0x4900, 0x800)
-- 
2.9.3