[PATCH v2 51/52] powerpc/64s/exception: machine check improve branch labels

Nicholas Piggin npiggin at gmail.com
Thu Jun 20 15:14:58 AEST 2019


Short forward and backward branches can be given number labels,
but larger significant divergences in code path a more readable
if they're given descriptive names.

Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
 arch/powerpc/kernel/exceptions-64s.S | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index 793d611fa937..e21bf047156d 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -1071,11 +1071,11 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_206)
 	 * continue in host kernel in V mode to deliver the MC event.
 	 */
 	rldicl.	r11,r12,4,63		/* See if MC hit while in HV mode. */
-	beq	5f
+	beq	1f
 	andi.	r11,r12,MSR_PR		/* See if coming from user. */
-	bne	9f			/* continue in V mode if we are. */
+	bne	deliver_mce		/* continue in V mode if we are. */
+1:
 
-5:
 #ifdef CONFIG_KVM_BOOK3S_64_HANDLER
 	/*
 	 * We are coming from kernel context. Check if we are coming from
@@ -1084,7 +1084,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_206)
 	 */
 	lbz	r11,HSTATE_IN_GUEST(r13)
 	cmpwi	r11,0			/* Check if coming from guest */
-	bne	9f			/* continue if we are. */
+	bne	deliver_mce		/* continue if we are. */
 #endif
 	/*
 	 * At this point we are not sure about what context we come from.
@@ -1112,7 +1112,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_206)
 	MACHINE_CHECK_HANDLER_WINDUP
 	RFI_TO_USER_OR_KERNEL
 
-9:
+deliver_mce:
 	/* Deliver the machine check to host kernel in V mode. */
 BEGIN_FTR_SECTION
 	ld	r10,ORIG_GPR3(r1)
-- 
2.20.1



More information about the Linuxppc-dev mailing list