public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Jinjie Ruan <ruanjinjie@huawei.com>
Cc: catalin.marinas@arm.com, will@kernel.org, ardb@kernel.org,
	broonie@kernel.org, masahiroy@kernel.org, robh@kernel.org,
	scott@os.amperecomputing.com, joey.gouly@arm.com,
	ndesaulniers@google.com, anshuman.khandual@arm.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] arm64: Rename disable_daif to disable_all_int
Date: Thu, 29 Feb 2024 14:24:43 +0000	[thread overview]
Message-ID: <ZeCTq-jvNvLy_80-@FVFF77S0Q05N> (raw)
In-Reply-To: <20240229132802.1682026-3-ruanjinjie@huawei.com>

On Thu, Feb 29, 2024 at 09:28:02PM +0800, Jinjie Ruan wrote:
> As commit 0fbeb3187548 ("arm64: explicitly mask all exceptions") said,
> the disable_daif macro is used to make it clear to 'mask all
> exceptions'. However, if ALLINT is introduced by FEAT_NMI, DAIF and
> ALLINT should be set to mask IRQs and NMIs, the disable_daif name
> is not appropriate, so rename it to disable_all_int in all places.
> 
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>

These macros only touch DAIF, and don't touch ALLINT, so the name *is*
appropriate.

Please leave these as-is for now; as and when we manipulate ALLINT these will
need a more substantial rework.

Mark.

> ---
>  arch/arm64/include/asm/assembler.h | 2 +-
>  arch/arm64/kernel/entry.S          | 2 +-
>  arch/arm64/mm/proc.S               | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm64/include/asm/assembler.h b/arch/arm64/include/asm/assembler.h
> index ab8b396428da..b93916594e8a 100644
> --- a/arch/arm64/include/asm/assembler.h
> +++ b/arch/arm64/include/asm/assembler.h
> @@ -34,7 +34,7 @@
>  	wx\n	.req	w\n
>  	.endr
>  
> -	.macro disable_daif
> +	.macro disable_all_int
>  	msr	daifset, #0xf
>  	.endm
>  
> diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
> index 7ef0e127b149..cb12003120ef 100644
> --- a/arch/arm64/kernel/entry.S
> +++ b/arch/arm64/kernel/entry.S
> @@ -334,7 +334,7 @@ alternative_else_nop_endif
>  
>  	.macro	kernel_exit, el
>  	.if	\el != 0
> -	disable_daif
> +	disable_all_int
>  	.endif
>  
>  #ifdef CONFIG_ARM64_PSEUDO_NMI
> diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S
> index bfd2ad896108..4cd5558c5957 100644
> --- a/arch/arm64/mm/proc.S
> +++ b/arch/arm64/mm/proc.S
> @@ -142,7 +142,7 @@ SYM_FUNC_START(cpu_do_resume)
>  	 * exception. Mask them until local_daif_restore() in cpu_suspend()
>  	 * resets them.
>  	 */
> -	disable_daif
> +	disable_all_int
>  	msr	mdscr_el1, x10
>  
>  	msr	sctlr_el1, x12
> -- 
> 2.34.1
> 

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

  reply	other threads:[~2024-02-29 14:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-29 13:28 [PATCH 0/2] arm64: Remove enable_daif macro and rename disable_daif Jinjie Ruan
2024-02-29 13:28 ` [PATCH 1/2] arm64: Remove enable_daif macro Jinjie Ruan
2024-02-29 13:35   ` Mark Brown
2024-02-29 14:30   ` Mark Rutland
2024-02-29 13:28 ` [PATCH 2/2] arm64: Rename disable_daif to disable_all_int Jinjie Ruan
2024-02-29 14:24   ` Mark Rutland [this message]
2024-03-01 18:29 ` (subset) [PATCH 0/2] arm64: Remove enable_daif macro and rename disable_daif Catalin Marinas

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=ZeCTq-jvNvLy_80-@FVFF77S0Q05N \
    --to=mark.rutland@arm.com \
    --cc=anshuman.khandual@arm.com \
    --cc=ardb@kernel.org \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=joey.gouly@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=masahiroy@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=robh@kernel.org \
    --cc=ruanjinjie@huawei.com \
    --cc=scott@os.amperecomputing.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