linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Will Deacon <will@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org, kernel-team@android.com,
	Sami Tolvanen <samitolvanen@google.com>
Subject: Re: [PATCH] arm64: scs: Drop unused 'tmp' argument to scs_{load,save} asm macros
Date: Thu, 27 May 2021 12:03:12 +0100	[thread overview]
Message-ID: <20210527110312.GB34323@C02TD0UTHF1T.local> (raw)
In-Reply-To: <20210527105529.21967-1-will@kernel.org>

On Thu, May 27, 2021 at 11:55:29AM +0100, Will Deacon wrote:
> The scs_load and scs_save asm macros don't make use of the mandatory
> 'tmp' register argument, so drop it and fix up the callers.
> 
> Cc: Sami Tolvanen <samitolvanen@google.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Signed-off-by: Will Deacon <will@kernel.org>

I see this has been the case since commit:

  51189c7a7ed1b4ed ("arm64: scs: Store absolute SCS stack pointer value in thread_info")

... so this looks good to me:

Acked-by: Mark Rutland <mark.rutland@arm.com>

Mark.

> ---
> 
> Applies against for-next/boot
> 
>  arch/arm64/include/asm/scs.h | 8 ++++----
>  arch/arm64/kernel/entry.S    | 8 ++++----
>  arch/arm64/kernel/head.S     | 2 +-
>  3 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/arm64/include/asm/scs.h b/arch/arm64/include/asm/scs.h
> index eaa2cd92e4c1..8297bccf0784 100644
> --- a/arch/arm64/include/asm/scs.h
> +++ b/arch/arm64/include/asm/scs.h
> @@ -9,18 +9,18 @@
>  #ifdef CONFIG_SHADOW_CALL_STACK
>  	scs_sp	.req	x18
>  
> -	.macro scs_load tsk, tmp
> +	.macro scs_load tsk
>  	ldr	scs_sp, [\tsk, #TSK_TI_SCS_SP]
>  	.endm
>  
> -	.macro scs_save tsk, tmp
> +	.macro scs_save tsk
>  	str	scs_sp, [\tsk, #TSK_TI_SCS_SP]
>  	.endm
>  #else
> -	.macro scs_load tsk, tmp
> +	.macro scs_load tsk
>  	.endm
>  
> -	.macro scs_save tsk, tmp
> +	.macro scs_save tsk
>  	.endm
>  #endif /* CONFIG_SHADOW_CALL_STACK */
>  
> diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
> index 294f24e16fee..3153f1448cdb 100644
> --- a/arch/arm64/kernel/entry.S
> +++ b/arch/arm64/kernel/entry.S
> @@ -275,7 +275,7 @@ alternative_else_nop_endif
>  
>  	mte_set_kernel_gcr x22, x23
>  
> -	scs_load tsk, x20
> +	scs_load tsk
>  	.else
>  	add	x21, sp, #PT_REGS_SIZE
>  	get_current_task tsk
> @@ -375,7 +375,7 @@ alternative_if ARM64_WORKAROUND_845719
>  alternative_else_nop_endif
>  #endif
>  3:
> -	scs_save tsk, x0
> +	scs_save tsk
>  
>  #ifdef CONFIG_ARM64_PTR_AUTH
>  alternative_if ARM64_HAS_ADDRESS_AUTH
> @@ -979,8 +979,8 @@ SYM_FUNC_START(cpu_switch_to)
>  	mov	sp, x9
>  	msr	sp_el0, x1
>  	ptrauth_keys_install_kernel x1, x8, x9, x10
> -	scs_save x0, x8
> -	scs_load x1, x8
> +	scs_save x0
> +	scs_load x1
>  	ret
>  SYM_FUNC_END(cpu_switch_to)
>  NOKPROBE(cpu_switch_to)
> diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
> index 070ed53c049d..6a700526b117 100644
> --- a/arch/arm64/kernel/head.S
> +++ b/arch/arm64/kernel/head.S
> @@ -412,7 +412,7 @@ SYM_FUNC_END(__create_page_tables)
>  	stp	xzr, xzr, [sp, #S_STACKFRAME]
>  	add	x29, sp, #S_STACKFRAME
>  
> -	scs_load \tsk, \tmp1
> +	scs_load \tsk
>  
>  	adr_l	\tmp1, __per_cpu_offset
>  	ldr	w\tmp2, [\tsk, #TSK_CPU]
> -- 
> 2.31.1.818.g46aad6cb9e-goog
> 

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

  reply	other threads:[~2021-05-27 11:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-27 10:55 [PATCH] arm64: scs: Drop unused 'tmp' argument to scs_{load, save} asm macros Will Deacon
2021-05-27 11:03 ` Mark Rutland [this message]
2021-05-27 15:08 ` Sami Tolvanen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210527110312.GB34323@C02TD0UTHF1T.local \
    --to=mark.rutland@arm.com \
    --cc=kernel-team@android.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=samitolvanen@google.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).