Re: [PATCH] irqchip: gic-v3: fix unmet dependency on ARM_PSCI_FW
Marc Zyngier <[email protected]>
| Newsgroups | dev.linux.lists.imx,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 19 Aug 2026 20:05:55 +0100, Thomas Gleixner <[email protected]> wrote: > > On Sat, Aug 01 2026 at 22:22, Julian Braha wrote: > > > ARM_GIC_V3 selects HAVE_ARM_SMCCC_DISCOVERY without ensuring its > > dependency, ARM_PSCI_FW is met. However, ARM_PSCI_FW should be > > selected by the system type, so ARM_GIC_V3 should depend on ARM_PSCI_FW. > > > > Additionally, the systems that select ARM_GIC_V3 (ARCH_BRCMSTB and > > SOC_IMX8M) need to select its dependency, ARM_PSCI_FW, too. > > > > This unmet dependency was found by kconfirm, a static analysis tool for > > Kconfig. > > Marc? > [+ SMCCC folks] Thanks for roping me in. This looks like the wrong fix altogether. Whatever the Broadcom stuff depends on is irrelevant, and has nothing to do with GICv3. Same thing for the NXP contraptions. If there is something to do *for the GIC driver*, it is to make sure it compiles/links correctly when the platform does not select options that are not required. Why would NXP and Broadcom care about an erratum that is specific to NVIDIA? I also disagree with what the commit message asserts, ARM_PSCI_FW is selected *globally* on arm64, not on a per platform basis (TFFT!). The NVIDIA machine being an arm64 platform, the correct dependency fix is to select HAVE_ARM_SMCCC_DISCOVERY on arm64. The overall issue is that there is no fallback to do something sensible when HAVE_ARM_SMCCC_DISCOVERY is not selected. Random drivers should not have to guess or add random #ifdefs all over the shop. I came up with the following hack, which compiles correctly on 32bit ARM without PSCI at all. YMMV. Thanks, M. diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig index 42f2278a702d0..937f17ec93a2e 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 diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h index 4de81848fe2ee..75f9d3f1723b5 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__ -- Jazz isn't dead. It just smells funny.