From: "Vincent Stehlé" <vincent.stehle@arm.com>
To: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Mark Rutland <mark.rutland@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
"Vincent Stehlé" <vincent.stehle@arm.com>
Subject: [PATCH] arm64: smccc: adjust quirk id to 32-bits
Date: Thu, 26 Nov 2026 10:01:00 +0100 [thread overview]
Message-ID: <20261126-w9-v1-1-b5fad7213afe@arm.com> (raw)
The id member of the arm_smccc_quirk structure is declared as a 32-bits
int, but it is loaded as 64-bits. This will load the alignment bytes
present in the structure after id into the high part of the x9 register.
This has no effect in practice, as the alignment bytes are probably zeros,
but fix the load and compare instructions for consistency.
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
---
This was tested manually under gdb.
---
arch/arm64/kernel/smccc-call.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/kernel/smccc-call.S b/arch/arm64/kernel/smccc-call.S
index 2def9d0dd3ddb..63ec546722599 100644
--- a/arch/arm64/kernel/smccc-call.S
+++ b/arch/arm64/kernel/smccc-call.S
@@ -15,8 +15,8 @@
stp x2, x3, [x4, #ARM_SMCCC_RES_X2_OFFS]
ldr x4, [sp, #8]
cbz x4, 1f /* no quirk structure */
- ldr x9, [x4, #ARM_SMCCC_QUIRK_ID_OFFS]
- cmp x9, #ARM_SMCCC_QUIRK_QCOM_A6
+ ldr w9, [x4, #ARM_SMCCC_QUIRK_ID_OFFS]
+ cmp w9, #ARM_SMCCC_QUIRK_QCOM_A6
b.ne 1f
str x6, [x4, ARM_SMCCC_QUIRK_STATE_OFFS]
1: ret
---
base-commit: 25faec9ce61c01fb45abf812a222c5b43c3cd5c5
change-id: 20261126-w9-6cb1b6325f0d
Best regards,
--
Vincent Stehlé <vincent.stehle@arm.com>
next reply other threads:[~2026-11-26 9:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 9:01 Vincent Stehlé [this message]
2026-12-04 16:56 ` [PATCH] arm64: smccc: adjust quirk id to 32-bits 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=20261126-w9-v1-1-b5fad7213afe@arm.com \
--to=vincent.stehle@arm.com \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.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