All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: lse: remove -fcall-used-x0 flag
@ 2018-10-29 17:10 ndesaulniers
  2018-10-29 18:13 ` Tri Vo
  2018-11-11 16:28 ` Greg KH
  0 siblings, 2 replies; 4+ messages in thread
From: ndesaulniers @ 2018-10-29 17:10 UTC (permalink / raw)
  To: gregkh
  Cc: natechancellor, mka, stable, trong, Catalin Marinas,
	Nick Desaulniers

From: Tri Vo <trong@android.com>

commit 2a6c7c367de82951c98a290a21156770f6f82c84 upstream

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.

Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Tri Vo <trong@android.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
Sending to stable for inclusion in 4.14. Needed for
CONFIG_ARM64_LSE_ATOMICS.


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

diff --git a/arch/arm64/lib/Makefile b/arch/arm64/lib/Makefile
index f28f91fd96a2..69ff9887f724 100644
--- a/arch/arm64/lib/Makefile
+++ b/arch/arm64/lib/Makefile
@@ -12,7 +12,7 @@ lib-y		:= 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.1.568.g152ad8e336-goog

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

* Re: [PATCH] arm64: lse: remove -fcall-used-x0 flag
  2018-10-29 17:10 [PATCH] arm64: lse: remove -fcall-used-x0 flag ndesaulniers
@ 2018-10-29 18:13 ` Tri Vo
  2018-11-08 23:12   ` Nick Desaulniers
  2018-11-11 16:28 ` Greg KH
  1 sibling, 1 reply; 4+ messages in thread
From: Tri Vo @ 2018-10-29 18:13 UTC (permalink / raw)
  To: Nick Desaulniers; +Cc: gregkh, natechancellor, mka, stable, Catalin Marinas

On Mon, Oct 29, 2018 at 10:10 AM <ndesaulniers@google.com> wrote:
>
> From: Tri Vo <trong@android.com>
>
> commit 2a6c7c367de82951c98a290a21156770f6f82c84 upstream
>
> 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.
>
> Tested-by: Nick Desaulniers <ndesaulniers@google.com>
> Acked-by: Will Deacon <will.deacon@arm.com>
> Signed-off-by: Tri Vo <trong@android.com>
> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
> ---
> Sending to stable for inclusion in 4.14. Needed for
> CONFIG_ARM64_LSE_ATOMICS.

Please take this patch into 4.9 too.
>
>
>  arch/arm64/lib/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/lib/Makefile b/arch/arm64/lib/Makefile
> index f28f91fd96a2..69ff9887f724 100644
> --- a/arch/arm64/lib/Makefile
> +++ b/arch/arm64/lib/Makefile
> @@ -12,7 +12,7 @@ lib-y         := 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.1.568.g152ad8e336-goog
>

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

* Re: [PATCH] arm64: lse: remove -fcall-used-x0 flag
  2018-10-29 18:13 ` Tri Vo
@ 2018-11-08 23:12   ` Nick Desaulniers
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Desaulniers @ 2018-11-08 23:12 UTC (permalink / raw)
  To: Greg KH
  Cc: Nathan Chancellor, Matthias Kaehlcke, stable, Catalin Marinas,
	trong

Just re-pinging this thread.  We're looking into enabling
CONFIG_ARM64_LSE_ATOMICS on some devices, and this patch is required
for building them with Clang.

On Mon, Oct 29, 2018 at 11:13 AM Tri Vo <trong@android.com> wrote:
>
> On Mon, Oct 29, 2018 at 10:10 AM <ndesaulniers@google.com> wrote:
> >
> > From: Tri Vo <trong@android.com>
> >
> > commit 2a6c7c367de82951c98a290a21156770f6f82c84 upstream
> >
> > 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.
> >
> > Tested-by: Nick Desaulniers <ndesaulniers@google.com>
> > Acked-by: Will Deacon <will.deacon@arm.com>
> > Signed-off-by: Tri Vo <trong@android.com>
> > Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
> > Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
> > ---
> > Sending to stable for inclusion in 4.14. Needed for
> > CONFIG_ARM64_LSE_ATOMICS.
>
> Please take this patch into 4.9 too.
> >
> >
> >  arch/arm64/lib/Makefile | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/lib/Makefile b/arch/arm64/lib/Makefile
> > index f28f91fd96a2..69ff9887f724 100644
> > --- a/arch/arm64/lib/Makefile
> > +++ b/arch/arm64/lib/Makefile
> > @@ -12,7 +12,7 @@ lib-y         := 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.1.568.g152ad8e336-goog
> >



-- 
Thanks,
~Nick Desaulniers

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

* Re: [PATCH] arm64: lse: remove -fcall-used-x0 flag
  2018-10-29 17:10 [PATCH] arm64: lse: remove -fcall-used-x0 flag ndesaulniers
  2018-10-29 18:13 ` Tri Vo
@ 2018-11-11 16:28 ` Greg KH
  1 sibling, 0 replies; 4+ messages in thread
From: Greg KH @ 2018-11-11 16:28 UTC (permalink / raw)
  To: ndesaulniers; +Cc: natechancellor, mka, stable, trong, Catalin Marinas

On Mon, Oct 29, 2018 at 10:10:26AM -0700, ndesaulniers@google.com wrote:
> From: Tri Vo <trong@android.com>
> 
> commit 2a6c7c367de82951c98a290a21156770f6f82c84 upstream
> 
> 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.
> 
> Tested-by: Nick Desaulniers <ndesaulniers@google.com>
> Acked-by: Will Deacon <will.deacon@arm.com>
> Signed-off-by: Tri Vo <trong@android.com>
> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
> ---
> Sending to stable for inclusion in 4.14. Needed for
> CONFIG_ARM64_LSE_ATOMICS.

Now queued up, and also added to 4.18.y and 4.19.y and 4.9.y

thanks,

greg k-h

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

end of thread, other threads:[~2018-11-12  2:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-29 17:10 [PATCH] arm64: lse: remove -fcall-used-x0 flag ndesaulniers
2018-10-29 18:13 ` Tri Vo
2018-11-08 23:12   ` Nick Desaulniers
2018-11-11 16:28 ` Greg KH

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.