From: Julian Braha <julianbraha@gmail.com>
To: mark.rutland@arm.com, lpieralisi@kernel.org,
sudeep.holla@kernel.org, tglx@kernel.org
Cc: radu@rendec.net, vsethi@nvidia.com, maz@kernel.org,
sdonthineni@nvidia.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Julian Braha <julianbraha@gmail.com>
Subject: [PATCH v3 2/2] firmware: smccc: provide stubs when discovery is disabled
Date: Wed, 14 Oct 2026 13:35:39 +0100 [thread overview]
Message-ID: <20261014123539.2259230-3-julianbraha@gmail.com> (raw)
In-Reply-To: <20261014123539.2259230-1-julianbraha@gmail.com>
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@kernel.org>
Signed-off-by: Julian Braha <julianbraha@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
next prev parent reply other threads:[~2026-10-14 12:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 12:35 [PATCH v3 0/2] irqchip: gic-v3: fix unmet dependency on ARM_PSCI_FW Julian Braha
2026-10-14 12:35 ` [PATCH v3 1/2] irqchip: gic-v3: only select HAVE_ARM_SMCCC_DISCOVERY on arm64 Julian Braha
2026-10-14 12:35 ` Julian Braha [this message]
2026-10-17 17:22 ` [PATCH v3 0/2] irqchip: gic-v3: fix unmet dependency on ARM_PSCI_FW Marc Zyngier
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=20261014123539.2259230-3-julianbraha@gmail.com \
--to=julianbraha@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=radu@rendec.net \
--cc=sdonthineni@nvidia.com \
--cc=sudeep.holla@kernel.org \
--cc=tglx@kernel.org \
--cc=vsethi@nvidia.com \
/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