From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Mark Rutland <mark.rutland@arm.com>, Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 5.15.y] arm64: smccc: Remove broken support for SMCCCv1.3 SVE discard hint
Date: Mon, 9 Dec 2024 15:55:44 -0500 [thread overview]
Message-ID: <20241209143539-38502b99747e56fd@stable.kernel.org> (raw)
In-Reply-To: <20241209134602.2088353-1-mark.rutland@arm.com>
[ Sasha's backport helper bot ]
Hi,
The upstream commit SHA1 provided is correct: 8c462d56487e3abdbf8a61cedfe7c795a54f4a78
Status in newer kernel trees:
6.12.y | Present (exact SHA1)
6.6.y | Present (different SHA1: 701fae8dce72)
6.1.y | Not found
5.15.y | Not found
Note: The patch differs from the upstream commit:
---
1: 8c462d56487e3 ! 1: b6e0debc41724 arm64: smccc: Remove broken support for SMCCCv1.3 SVE discard hint
@@ Metadata
## Commit message ##
arm64: smccc: Remove broken support for SMCCCv1.3 SVE discard hint
+ [ Upstream commit 8c462d56487e3abdbf8a61cedfe7c795a54f4a78 ]
+
SMCCCv1.3 added a hint bit which callers can set in an SMCCC function ID
(AKA "FID") to indicate that it is acceptable for the SMCCC
implementation to discard SVE and/or SME state over a specific SMCCC
@@ Commit message
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20241106160448.2712997-1-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
+ [ Mark: fix conflicts in <linux/arm-smccc.h> and drivers/firmware/smccc/smccc.c ]
+ Signed-off-by: Mark Rutland <mark.rutland@arm.com>
## arch/arm64/kernel/smccc-call.S ##
@@
@@ drivers/firmware/smccc/smccc.c: static u32 smccc_version = ARM_SMCCC_VERSION_1_0
bool __ro_after_init smccc_trng_available = false;
-u64 __ro_after_init smccc_has_sve_hint = false;
- s32 __ro_after_init smccc_soc_id_version = SMCCC_RET_NOT_SUPPORTED;
- s32 __ro_after_init smccc_soc_id_revision = SMCCC_RET_NOT_SUPPORTED;
+ void __init arm_smccc_version_init(u32 version, enum arm_smccc_conduit conduit)
+ {
@@ drivers/firmware/smccc/smccc.c: void __init arm_smccc_version_init(u32 version, enum arm_smccc_conduit conduit)
smccc_conduit = conduit;
@@ drivers/firmware/smccc/smccc.c: void __init arm_smccc_version_init(u32 version,
- if (IS_ENABLED(CONFIG_ARM64_SVE) &&
- smccc_version >= ARM_SMCCC_VERSION_1_3)
- smccc_has_sve_hint = true;
+ }
- if ((smccc_version >= ARM_SMCCC_VERSION_1_2) &&
- (smccc_conduit != SMCCC_CONDUIT_NONE)) {
+ enum arm_smccc_conduit arm_smccc_1_1_get_conduit(void)
## include/linux/arm-smccc.h ##
@@ include/linux/arm-smccc.h: u32 arm_smccc_get_version(void);
@@ include/linux/arm-smccc.h: u32 arm_smccc_get_version(void);
-extern u64 smccc_has_sve_hint;
-
/**
- * arm_smccc_get_soc_id_version()
- *
+ * struct arm_smccc_res - Result from SMC/HVC call
+ * @a0-a3 result values from registers 0 to 3
@@ include/linux/arm-smccc.h: struct arm_smccc_quirk {
} state;
};
@@ include/linux/arm-smccc.h: asmlinkage void __arm_smccc_hvc(unsigned long a0, uns
-
-#endif
-
- #define __constraint_read_2 "r" (arg0)
- #define __constraint_read_3 __constraint_read_2, "r" (arg1)
- #define __constraint_read_4 __constraint_read_3, "r" (arg2)
+ #define ___count_args(_0, _1, _2, _3, _4, _5, _6, _7, _8, x, ...) x
+
+ #define __count_args(...) \
@@ include/linux/arm-smccc.h: asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1,
+
+ #define ___constraints(count) \
+ : __constraint_read_ ## count \
+- : smccc_sve_clobbers "memory"
++ : "memory"
+ #define __constraints(count) ___constraints(count)
+
+ /*
+@@ include/linux/arm-smccc.h: asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1,
+ register unsigned long r2 asm("r2"); \
register unsigned long r3 asm("r3"); \
- CONCATENATE(__declare_arg_, \
- COUNT_ARGS(__VA_ARGS__))(__VA_ARGS__); \
+ __declare_args(__count_args(__VA_ARGS__), __VA_ARGS__); \
- asm volatile(SMCCC_SVE_CHECK \
- inst "\n" : \
+ asm volatile(inst "\n" : \
"=r" (r0), "=r" (r1), "=r" (r2), "=r" (r3) \
- : CONCATENATE(__constraint_read_, \
- COUNT_ARGS(__VA_ARGS__)) \
-- : smccc_sve_clobbers "memory"); \
-+ : "memory"); \
- if (___res) \
- *___res = (typeof(*___res)){r0, r1, r2, r3}; \
- } while (0)
-@@ include/linux/arm-smccc.h: asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1,
- asm ("" : \
- : CONCATENATE(__constraint_read_, \
- COUNT_ARGS(__VA_ARGS__)) \
-- : smccc_sve_clobbers "memory"); \
-+ : "memory"); \
+ __constraints(__count_args(__VA_ARGS__))); \
if (___res) \
- ___res->a0 = SMCCC_RET_NOT_SUPPORTED; \
- } while (0)
---
Results of testing on various branches:
| Branch | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-5.15.y | Success | Success |
prev parent reply other threads:[~2024-12-09 20:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 13:46 [PATCH 5.15.y] arm64: smccc: Remove broken support for SMCCCv1.3 SVE discard hint Mark Rutland
2024-12-09 20:55 ` Sasha Levin [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=20241209143539-38502b99747e56fd@stable.kernel.org \
--to=sashal@kernel.org \
--cc=mark.rutland@arm.com \
--cc=stable@vger.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