All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] arm64: Correct wrong label in macro __init_el2_gicv3
@ 2022-02-14 17:56 ` Joakim Tjernlund
  0 siblings, 0 replies; 4+ messages in thread
From: Joakim Tjernlund @ 2022-02-14 17:56 UTC (permalink / raw)
  To: linux-arm-kernel, Mark Rutland; +Cc: Joakim Tjernlund, stable

In commit:

  114945d84a30a5fe ("arm64: Fix labels in el2_setup macros")

We renamed a label from '1' to '.Lskip_gicv3_\@', but failed to update
a branch to it, which now targets a later label also called '1'.

The branch is taken rarely, when GICv3 is present but SRE is disabled
at EL3, causing a boot-time crash.
Update the caller to the new label name.

Fixes: 114945d84a30a5fe ("arm64: Fix labels in el2_setup macros")
Cc: stable@vger.kernel.org
Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
---
 - v2: fix commit msg
 
 arch/arm64/include/asm/el2_setup.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/include/asm/el2_setup.h b/arch/arm64/include/asm/el2_setup.h
index 3198acb2aad8..7f3c87f7a0ce 100644
--- a/arch/arm64/include/asm/el2_setup.h
+++ b/arch/arm64/include/asm/el2_setup.h
@@ -106,7 +106,7 @@
 	msr_s	SYS_ICC_SRE_EL2, x0
 	isb					// Make sure SRE is now set
 	mrs_s	x0, SYS_ICC_SRE_EL2		// Read SRE back,
-	tbz	x0, #0, 1f			// and check that it sticks
+	tbz	x0, #0, .Lskip_gicv3_\@		// and check that it sticks
 	msr_s	SYS_ICH_HCR_EL2, xzr		// Reset ICC_HCR_EL2 to defaults
 .Lskip_gicv3_\@:
 .endm
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2] arm64: Correct wrong label in macro __init_el2_gicv3
@ 2022-02-14 17:56 ` Joakim Tjernlund
  0 siblings, 0 replies; 4+ messages in thread
From: Joakim Tjernlund @ 2022-02-14 17:56 UTC (permalink / raw)
  To: linux-arm-kernel, Mark Rutland; +Cc: Joakim Tjernlund, stable

In commit:

  114945d84a30a5fe ("arm64: Fix labels in el2_setup macros")

We renamed a label from '1' to '.Lskip_gicv3_\@', but failed to update
a branch to it, which now targets a later label also called '1'.

The branch is taken rarely, when GICv3 is present but SRE is disabled
at EL3, causing a boot-time crash.
Update the caller to the new label name.

Fixes: 114945d84a30a5fe ("arm64: Fix labels in el2_setup macros")
Cc: stable@vger.kernel.org
Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
---
 - v2: fix commit msg
 
 arch/arm64/include/asm/el2_setup.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/include/asm/el2_setup.h b/arch/arm64/include/asm/el2_setup.h
index 3198acb2aad8..7f3c87f7a0ce 100644
--- a/arch/arm64/include/asm/el2_setup.h
+++ b/arch/arm64/include/asm/el2_setup.h
@@ -106,7 +106,7 @@
 	msr_s	SYS_ICC_SRE_EL2, x0
 	isb					// Make sure SRE is now set
 	mrs_s	x0, SYS_ICC_SRE_EL2		// Read SRE back,
-	tbz	x0, #0, 1f			// and check that it sticks
+	tbz	x0, #0, .Lskip_gicv3_\@		// and check that it sticks
 	msr_s	SYS_ICH_HCR_EL2, xzr		// Reset ICC_HCR_EL2 to defaults
 .Lskip_gicv3_\@:
 .endm
-- 
2.32.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] arm64: Correct wrong label in macro __init_el2_gicv3
  2022-02-14 17:56 ` Joakim Tjernlund
@ 2022-02-15 14:46   ` Catalin Marinas
  -1 siblings, 0 replies; 4+ messages in thread
From: Catalin Marinas @ 2022-02-15 14:46 UTC (permalink / raw)
  To: Mark Rutland, Joakim Tjernlund, linux-arm-kernel; +Cc: Will Deacon, stable

On Mon, 14 Feb 2022 18:56:43 +0100, Joakim Tjernlund wrote:
> In commit:
> 
>   114945d84a30a5fe ("arm64: Fix labels in el2_setup macros")
> 
> We renamed a label from '1' to '.Lskip_gicv3_\@', but failed to update
> a branch to it, which now targets a later label also called '1'.
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64: Correct wrong label in macro __init_el2_gicv3
      https://git.kernel.org/arm64/c/4f6de676d94e

-- 
Catalin


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] arm64: Correct wrong label in macro __init_el2_gicv3
@ 2022-02-15 14:46   ` Catalin Marinas
  0 siblings, 0 replies; 4+ messages in thread
From: Catalin Marinas @ 2022-02-15 14:46 UTC (permalink / raw)
  To: Mark Rutland, Joakim Tjernlund, linux-arm-kernel; +Cc: Will Deacon, stable

On Mon, 14 Feb 2022 18:56:43 +0100, Joakim Tjernlund wrote:
> In commit:
> 
>   114945d84a30a5fe ("arm64: Fix labels in el2_setup macros")
> 
> We renamed a label from '1' to '.Lskip_gicv3_\@', but failed to update
> a branch to it, which now targets a later label also called '1'.
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64: Correct wrong label in macro __init_el2_gicv3
      https://git.kernel.org/arm64/c/4f6de676d94e

-- 
Catalin


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-15 14:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-14 17:56 [PATCH v2] arm64: Correct wrong label in macro __init_el2_gicv3 Joakim Tjernlund
2022-02-14 17:56 ` Joakim Tjernlund
2022-02-15 14:46 ` Catalin Marinas
2022-02-15 14:46   ` Catalin Marinas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.