[PATCH v3 2/2] firmware: smccc: provide stubs when discovery is disabled
Julian Braha
julianbraha at gmail.com
Wed Oct 14 05:35:39 PDT 2026
Add fallbacks for callers to avoid needing #ifdef guards when
HAVE_ARM_SMCCC_DISCOVERY is disabled (32-bit arm).
Fixes: 35727af2b15d ("irqchip/gicv3: Workaround for NVIDIA erratum T241-FABRIC-4")
Suggested-by: Marc Zyngier <maz at kernel.org>
Signed-off-by: Julian Braha <julianbraha at gmail.com>
---
Changes since v2:
- split out changes into two patches
Link to v2:
https://lore.kernel.org/all/20260823180832.1246363-1-julianbraha@gmail.com/
Changes since v1:
- remove select and dependency on ARM_PSCI_FW,
- make the HAVE_ARM_SMCCC_DISCOVERY 'select' conditional on arm64
Link to v1: https://lore.kernel.org/all/20260801212235.2692694-1-julianbraha@gmail.com/
---
include/linux/arm-smccc.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h
index 4de81848fe2e..75f9d3f1723b 100644
--- a/include/linux/arm-smccc.h
+++ b/include/linux/arm-smccc.h
@@ -324,6 +324,7 @@ enum arm_smccc_conduit {
SMCCC_CONDUIT_HVC,
};
+#ifdef CONFIG_HAVE_ARM_SMCCC_DISCOVERY
/**
* arm_smccc_1_1_get_conduit()
*
@@ -363,6 +364,12 @@ s32 arm_smccc_get_soc_id_version(void);
* When ARM_SMCCC_ARCH_SOC_ID is not present, returns SMCCC_RET_NOT_SUPPORTED.
*/
s32 arm_smccc_get_soc_id_revision(void);
+#else /* CONFIG_HAVE_ARM_SMCCC_DISCOVERY */
+#define arm_smccc_1_1_get_conduit() SMCCC_CONDUIT_NONE
+#define arm_smccc_get_version() 0
+#define arm_smccc_get_soc_id_version() SMCCC_RET_NOT_SUPPORTED
+#define arm_smccc_get_soc_id_revision() SMCCC_RET_NOT_SUPPORTED
+#endif /* CONFIG_HAVE_ARM_SMCCC_DISCOVERY */
#ifndef __ASSEMBLY__
--
2.55.0
More information about the linux-arm-kernel
mailing list