Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] arm64: entry: Clean out some indirection
Date: Tue, 4 Nov 2025 15:22:42 +0000	[thread overview]
Message-ID: <aQoaQlR-AAuCEAO5@willie-the-truck> (raw)
In-Reply-To: <20251014-arm64-skip-indirection-v1-1-f8ccfd9dbcb7@linaro.org>

On Tue, Oct 14, 2025 at 09:08:30PM +0200, Linus Walleij wrote:
> The conversion to generic IRQ entry left some functions
> in the EL1 (kernel) IRQ entry path very shallow, so drop
> the __inner_functions() where appropriate, saving some
> time and stack.
> 
> This is not a fix but an optimization.
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  arch/arm64/kernel/entry-common.c | 22 +++-------------------
>  1 file changed, 3 insertions(+), 19 deletions(-)

I think the code was originally structured to follow the same flow as
the generic code so that the two could be easily compared. Now that
we're moving over to the generic code, I agree that it makes sense to
clean things up.

> diff --git a/arch/arm64/kernel/entry-common.c b/arch/arm64/kernel/entry-common.c
> index f546a914f04174e37bf3578490545edebb66afd1..e34dfd93c522ae58a5f1c914fe4a5bfc6522cdae 100644
> --- a/arch/arm64/kernel/entry-common.c
> +++ b/arch/arm64/kernel/entry-common.c
> @@ -38,16 +38,11 @@
>   * This is intended to match the logic in irqentry_enter(), handling the kernel
>   * mode transitions only.

nit: this comment ^^^ (the reference to irqentry_enter()) also seems to
be out of date now.

>   */
> -static __always_inline irqentry_state_t __enter_from_kernel_mode(struct pt_regs *regs)
> -{
> -	return irqentry_enter(regs);
> -}
> -
>  static noinstr irqentry_state_t enter_from_kernel_mode(struct pt_regs *regs)
>  {
>  	irqentry_state_t state;
>  
> -	state = __enter_from_kernel_mode(regs);
> +	state = irqentry_enter(regs);
>  	mte_check_tfsr_entry();
>  	mte_disable_tco_entry(current);
>  
> @@ -62,17 +57,11 @@ static noinstr irqentry_state_t enter_from_kernel_mode(struct pt_regs *regs)
>   * This is intended to match the logic in irqentry_exit(), handling the kernel
>   * mode transitions only, and with preemption handled elsewhere.
>   */

Similarly for this one ^^^.

Will


      parent reply	other threads:[~2025-11-04 15:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-14 19:08 [PATCH] arm64: entry: Clean out some indirection Linus Walleij
2025-10-14 19:10 ` Linus Walleij
2025-11-04 15:22 ` Will Deacon [this message]

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=aQoaQlR-AAuCEAO5@willie-the-truck \
    --to=will@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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