Skip to contentSkip to conversation

arm64: Drop workaround for broken 'S' constraint with GCC 4.9

PATCH Applied Marc Zyngier 3 participants 4 messages Jan 18, 2021 – Jan 20, 2021

Subsystems (2)
lore
Share & tools
lore

Marc Zyngier

author maintainer
#0 lore raw

PATCH 1/1 arm64: Drop workaround for broken 'S' constraint with GCC 4.9

Since GCC < 5.1 has been shown to be unsuitable for the arm64 kernel, let's drop the workaround for the 'S' asm constraint that GCC 4.9 doesn't always grok.

This is effectively a revert of 9fd339a45be5 ("arm64: Work around broken GCC 4.9 handling of "S" constraint").

---
 arch/arm64/include/asm/kvm_asm.h | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
arch/arm64/include/asm/kvm_asm.h +1 -7
index 8a33d83ea843..7ccf770c53d9 100644
@@ -199,12 +199,6 @@ extern void __vgic_v3_init_lrs(void);
 
 extern u32 __kvm_get_mdcr_el2(void);
 
-#if defined(GCC_VERSION) && GCC_VERSION < 50000
-#define SYM_CONSTRAINT	"i"
-#else
-#define SYM_CONSTRAINT	"S"
-#endif
-
 /*
  * Obtain the PC-relative address of a kernel symbol
  * s: symbol
@@ -221,7 +215,7 @@ extern u32 __kvm_get_mdcr_el2(void);
 		typeof(s) *addr;					\
 		asm("adrp	%0, %1\n"				\
 		    "add	%0, %0, :lo12:%1\n"			\
-		    : "=r" (addr) : SYM_CONSTRAINT (&s));		\
+		    : "=r" (addr) : "S" (&s));				\
 		addr;							\
 	})
 
Signature · 6 lines
2.29.2

_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
maintainer
#1 lore raw
Quoted 8 lines · Marc Zyngier

Since GCC < 5.1 has been shown to be unsuitable for the arm64 kernel, let's drop the workaround for the 'S' asm constraint that GCC 4.9 doesn't always grok.

This is effectively a revert of 9fd339a45be5 ("arm64: Work around broken GCC 4.9 handling of "S" constraint").

It looks like I merged this fix in -rc1. Do you want me to merge the revert as well or you'll handle it?

Signature · 5 lines
Catalin
_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
author maintainer
#2 lore raw
Quoted 5 lines · Catalin Marinas
Quoted 4 lines · Marc Zyngier

Since GCC < 5.1 has been shown to be unsuitable for the arm64 kernel, let's drop the workaround for the 'S' asm constraint that GCC 4.9 doesn't always grok.

Quoted 7 lines
Quoted 4 lines

This is effectively a revert of 9fd339a45be5 ("arm64: Work around broken GCC 4.9 handling of "S" constraint").

It looks like I merged this fix in -rc1. Do you want me to merge the revert as well or you'll handle it?

It'd make sense if it went via the arm64 tree as well.

Thanks,

        M.
Signature · 5 lines
Jazz is not dead. It just smells funny...
_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
maintainer Applied
#3 lore raw
In reply to Marc Zyngier
Quoted 6 lines · Marc Zyngier

Since GCC < 5.1 has been shown to be unsuitable for the arm64 kernel, let's drop the workaround for the 'S' asm constraint that GCC 4.9 doesn't always grok.

This is effectively a revert of 9fd339a45be5 ("arm64: Work around broken GCC 4.9 handling of "S" constraint").

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

[1/1] arm64: Drop workaround for broken 'S' constraint with GCC 4.9

      https://git.kernel.org/arm64/c/7001d4af926b

Cheers,

Signature · 9 lines
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm