* [PATCH v3 0/2] irqchip: gic-v3: fix unmet dependency on ARM_PSCI_FW
@ 2026-10-14 12:35 Julian Braha
2026-10-14 12:35 ` [PATCH v3 1/2] irqchip: gic-v3: only select HAVE_ARM_SMCCC_DISCOVERY on arm64 Julian Braha
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Julian Braha @ 2026-10-14 12:35 UTC (permalink / raw)
To: mark.rutland, lpieralisi, sudeep.holla, tglx
Cc: radu, vsethi, maz, sdonthineni, linux-arm-kernel, linux-kernel,
Julian Braha
ARM_GIC_V3 currently selects HAVE_ARM_SMCCC_DISCOVERY without ensuring its
dependency, ARM_PSCI_FW, is met.
Patch 1 of this series makes the select conditional on arm64, and patch 2
adds stubs for arm32.
---
Julian Braha (2):
irqchip: gic-v3: fix unmet dependency on ARM_PSCI_FW
firmware: smccc: provide stubs when discovery is disabled
drivers/irqchip/Kconfig | 2 +-
include/linux/arm-smccc.h | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
--
2.55.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v3 1/2] irqchip: gic-v3: only select HAVE_ARM_SMCCC_DISCOVERY on arm64
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 ` Julian Braha
2026-10-14 12:35 ` [PATCH v3 2/2] firmware: smccc: provide stubs when discovery is disabled Julian Braha
2026-10-17 17:22 ` [PATCH v3 0/2] irqchip: gic-v3: fix unmet dependency on ARM_PSCI_FW Marc Zyngier
2 siblings, 0 replies; 4+ messages in thread
From: Julian Braha @ 2026-10-14 12:35 UTC (permalink / raw)
To: mark.rutland, lpieralisi, sudeep.holla, tglx
Cc: radu, vsethi, maz, sdonthineni, linux-arm-kernel, linux-kernel,
Julian Braha
ARM_PSCI_FW is always enabled for arm64, and the GICv3 driver only
uses HAVE_ARM_SMCCC_DISCOVERY to identify the NVIDIA T241, which is
arm64 anyway.
For ARM_GIC_V3, let's only select HAVE_ARM_SMCCC_DISCOVERY on arm64.
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/
---
drivers/irqchip/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index a8f8c423b795..31b7e4c90007 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -37,7 +37,7 @@ config ARM_GIC_V3
bool
select IRQ_DOMAIN_HIERARCHY
select GENERIC_IRQ_EFFECTIVE_AFF_MASK if SMP
- select HAVE_ARM_SMCCC_DISCOVERY
+ select HAVE_ARM_SMCCC_DISCOVERY if ARM64
select IRQ_MSI_IOMMU
config ARM_GIC_ITS_PARENT
--
2.55.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v3 2/2] firmware: smccc: provide stubs when discovery is disabled
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
2026-10-17 17:22 ` [PATCH v3 0/2] irqchip: gic-v3: fix unmet dependency on ARM_PSCI_FW Marc Zyngier
2 siblings, 0 replies; 4+ messages in thread
From: Julian Braha @ 2026-10-14 12:35 UTC (permalink / raw)
To: mark.rutland, lpieralisi, sudeep.holla, tglx
Cc: radu, vsethi, maz, sdonthineni, linux-arm-kernel, linux-kernel,
Julian Braha
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3 0/2] irqchip: gic-v3: fix unmet dependency on ARM_PSCI_FW
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 ` [PATCH v3 2/2] firmware: smccc: provide stubs when discovery is disabled Julian Braha
@ 2026-10-17 17:22 ` Marc Zyngier
2 siblings, 0 replies; 4+ messages in thread
From: Marc Zyngier @ 2026-10-17 17:22 UTC (permalink / raw)
To: Julian Braha
Cc: mark.rutland, lpieralisi, sudeep.holla, tglx, radu, vsethi,
sdonthineni, linux-arm-kernel, linux-kernel
On Wed, 14 Oct 2026 13:35:37 +0100,
Julian Braha <julianbraha@gmail.com> wrote:
>
> ARM_GIC_V3 currently selects HAVE_ARM_SMCCC_DISCOVERY without ensuring its
> dependency, ARM_PSCI_FW, is met.
>
> Patch 1 of this series makes the select conditional on arm64, and patch 2
> adds stubs for arm32.
>
> ---
> Julian Braha (2):
> irqchip: gic-v3: fix unmet dependency on ARM_PSCI_FW
> firmware: smccc: provide stubs when discovery is disabled
>
> drivers/irqchip/Kconfig | 2 +-
> include/linux/arm-smccc.h | 7 +++++++
> 2 files changed, 8 insertions(+), 1 deletion(-)
This hasn't been correctly tested, I'm afraid.
The patches are in the wrong order, as applying patch #1 on its own
will break a 32bit ARM build without PSCI (HAVE_ARM_SMCCC_DISCOVERY
not selected, but the stubs that are supposed to save the day are in
patch #2...):
arm-linux-gnueabihf-ld: drivers/irqchip/irq-gic-v3.o: in function `gic_enable_quirk_nvidia_t241':
/home/maz/hot-poop/arm-platforms/drivers/irqchip/irq-gic-v3.c:1816:(.text+0xb04): undefined reference to `arm_smccc_get_soc_id_version'
make[2]: *** [scripts/Makefile.vmlinux:72: vmlinux.unstripped] Error 1
make[1]: *** [/home/maz/hot-poop/arm-platforms/Makefile:1387: vmlinux] Error 2
make: *** [Makefile:248: __sub-make] Error 2
With the patch ordering fixed and the whole thing applied to the same
tree:
Reviewed-by: Marc Zyngier <maz@kernel.org>
M.
--
Without deviation from the norm, progress is not possible.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-10-17 17:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v3 2/2] firmware: smccc: provide stubs when discovery is disabled Julian Braha
2026-10-17 17:22 ` [PATCH v3 0/2] irqchip: gic-v3: fix unmet dependency on ARM_PSCI_FW Marc Zyngier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox