mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bradley Morgan <brads@mainlining.org>
To: catalin.marinas@arm.com, will@kernel.org
Cc: mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64: entry: drop the unused tmp2 argument of mte_set_kernel_gcr()
Date: Wed, 07 Oct 2026 18:47:21 +0100	[thread overview]
Message-ID: <EA0C88FF-9778-4645-B744-F65DFE1D1B9B@mainlining.org> (raw)
In-Reply-To: <20261007175231.1.mte-tmp2@mainlining.org>

On 7 October 2026 18:45:01 BST, Bradley Morgan <brads@mainlining.org>
wrote:
>mte_set_kernel_gcr() takes a tmp2 argument the macro never uses. It
>used to, the body passed \tmp and \tmp2 to mte_set_gcr, then
>commit 82868247897b ("arm64: kasan: mte: use a constant kernel
>GCR_EL1 value") swapped that for
>
>    mov     \tmp, KERNEL_GCR_EL1
>
>and tmp2 stayed in the declaration and in the one caller, which
>passes x23 for it.
>
>Drop it, both places.
>
>Signed-off-by: Bradley Morgan <brads@mainlining.org>
>
>diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
>index 0e1d9c3c6a93..2baefe7a82d3 100644
>--- a/arch/arm64/kernel/entry.S
>+++ b/arch/arm64/kernel/entry.S
>@@ -171,7 +171,7 @@
> #endif
> 	.endm
>
>-	.macro mte_set_kernel_gcr, tmp, tmp2
>+	.macro mte_set_kernel_gcr, tmp
> #ifdef CONFIG_KASAN_HW_TAGS
> alternative_cb	ARM64_ALWAYS_SYSTEM, kasan_hw_tags_enable
> 	b	1f
>@@ -258,7 +258,7 @@
>
> 	apply_ssbd 1, x22, x23
>
>-	mte_set_kernel_gcr x22, x23
>+	mte_set_kernel_gcr x22
>
> 	/*
> 	 * Any non-self-synchronizing system register updates required for
>---

AHH. What happened here, ugh! Why was it sent twice, stupid me man. Let me
go resend it PROPERLY, god sake Bradley..

> arch/arm64/kernel/entry.S | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
>index f63049ac32dc..c3106dee61e1 100644
>--- a/arch/arm64/kernel/entry.S
>+++ b/arch/arm64/kernel/entry.S
>@@ -171,7 +171,7 @@ alternative_else_nop_endif
> #endif
> 	.endm
> 
>-	.macro mte_set_kernel_gcr, tmp, tmp2
>+	.macro mte_set_kernel_gcr, tmp
> #ifdef CONFIG_KASAN_HW_TAGS
> alternative_cb	ARM64_ALWAYS_SYSTEM, kasan_hw_tags_enable
> 	b	1f
>@@ -258,7 +258,7 @@ alternative_else_nop_endif
> 
> 	apply_ssbd 1, x22, x23
> 
>-	mte_set_kernel_gcr x22, x23
>+	mte_set_kernel_gcr x22
> 
> 	/*
> 	 * Any non-self-synchronizing system register updates required for
>

--- Thanks!
"I'm not a very positive person" - Linus torvalds

      reply	other threads:[~2026-10-07 17:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07 17:45 Bradley Morgan
2026-10-07 17:47 ` Bradley Morgan [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=EA0C88FF-9778-4645-B744-F65DFE1D1B9B@mainlining.org \
    --to=brads@mainlining.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.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

all inboxes | Powered by JetHome®