Skip to contentSkip to conversation

arm64: lse: remove -fcall-used-x0 flag

RFC Applied Tri Vo 3 participants 4 messages Sep 19, 2018 – Sep 24, 2018 arm64

lore
Share & tools
lore

Tri Vo

author
#0 lore raw

RFC 1/1 arm64: lse: remove -fcall-used-x0 flag

x0 is not callee-saved in the PCS. So there is no need to specify -fcall-used-x0.

Clang doesn't currently support -fcall-used flags. This patch will help building the kernel with clang.

---
 arch/arm64/lib/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/lib/Makefile +1 -1
index c86b7909ef31..2f7c60c8e588 100644
@@ -11,7 +11,7 @@ lib-y		:= bitops.o clear_user.o delay.o copy_from_user.o	\
 # when supported by the CPU. Result and argument registers are handled
 # correctly, based on the function prototype.
 lib-$(CONFIG_ARM64_LSE_ATOMICS) += atomic_ll_sc.o
-CFLAGS_atomic_ll_sc.o	:= -fcall-used-x0 -ffixed-x1 -ffixed-x2		\
+CFLAGS_atomic_ll_sc.o	:= -ffixed-x1 -ffixed-x2        		\
 		   -ffixed-x3 -ffixed-x4 -ffixed-x5 -ffixed-x6		\
 		   -ffixed-x7 -fcall-saved-x8 -fcall-saved-x9		\
 		   -fcall-saved-x10 -fcall-saved-x11 -fcall-saved-x12	\

--
2.19.0.397.gdd90340f6a-goog

Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Tri Vo

x0 is not callee-saved in the PCS. So there is no need to specify -fcall-used-x0.

Clang doesn't currently support -fcall-used flags. This patch will help building the kernel with clang.

---
 arch/arm64/lib/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

If this is useful to you, then:

Will

Quoted 16 lines
arch/arm64/lib/Makefile +1 -2
index c86b7909ef31..2f7c60c8e588 100644
@@ -11,7 +11,7 @@ lib-y		:= bitops.o clear_user.o delay.o copy_from_user.o	\
 # when supported by the CPU. Result and argument registers are handled
 # correctly, based on the function prototype.
 lib-$(CONFIG_ARM64_LSE_ATOMICS) += atomic_ll_sc.o
-CFLAGS_atomic_ll_sc.o	:= -fcall-used-x0 -ffixed-x1 -ffixed-x2		\
+CFLAGS_atomic_ll_sc.o	:= -ffixed-x1 -ffixed-x2        		\
 		   -ffixed-x3 -ffixed-x4 -ffixed-x5 -ffixed-x6		\
 		   -ffixed-x7 -fcall-saved-x8 -fcall-saved-x9		\
 		   -fcall-saved-x10 -fcall-saved-x11 -fcall-saved-x12	\
--

2.19.0.397.gdd90340f6a-goog

author
#2 lore raw
Quoted 8 lines · Will Deacon
Quoted 6 lines · Tri Vo

x0 is not callee-saved in the PCS. So there is no need to specify -fcall-used-x0.

Clang doesn't currently support -fcall-used flags. This patch will help building the kernel with clang.

Quoted 8 lines
Quoted 4 lines
---
 arch/arm64/lib/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

If this is useful to you, then:

Thank you!

Quoted 19 lines

Will

Quoted 16 lines
arch/arm64/lib/Makefile +1 -2
index c86b7909ef31..2f7c60c8e588 100644
@@ -11,7 +11,7 @@ lib-y               := bitops.o clear_user.o delay.o copy_from_user.o       \
 # when supported by the CPU. Result and argument registers are handled
 # correctly, based on the function prototype.
 lib-$(CONFIG_ARM64_LSE_ATOMICS) += atomic_ll_sc.o
-CFLAGS_atomic_ll_sc.o        := -fcall-used-x0 -ffixed-x1 -ffixed-x2         \
+CFLAGS_atomic_ll_sc.o        := -ffixed-x1 -ffixed-x2                        \
                 -ffixed-x3 -ffixed-x4 -ffixed-x5 -ffixed-x6          \
                 -ffixed-x7 -fcall-saved-x8 -fcall-saved-x9           \
                 -fcall-saved-x10 -fcall-saved-x11 -fcall-saved-x12   \
--

2.19.0.397.gdd90340f6a-goog

maintainer Applied
#3 lore raw
In reply to Tri Vo
Quoted 7 lines · Tri Vo

x0 is not callee-saved in the PCS. So there is no need to specify -fcall-used-x0.

Clang doesn't currently support -fcall-used flags. This patch will help building the kernel with clang.

Queued for 4.20. Thanks.

Signature · 1 line
Catalin