* [PATCH] firmware: qcom: scm: add missing IRQ_DOMAIN select to QCOM_SCM
@ 2026-07-01 11:03 Julian Braha
2026-07-01 11:10 ` Konrad Dybcio
2026-07-02 11:04 ` sashiko-bot
0 siblings, 2 replies; 3+ messages in thread
From: Julian Braha @ 2026-07-01 11:03 UTC (permalink / raw)
To: andersson
Cc: sumit.garg, linux-arm-msm, dri-devel, freedreno, linux-media,
netdev, linux-wireless, ath12k, linux-remoteproc, konradybcio,
robh, krzk+dt, conor+dt, robin.clark, sean, akhilpo, lumag,
abhinav.kumar, jesszhan0024, marijn.suijten, airlied, simona,
vikash.garodia, bod, mchehab, elder, andrew+netdev, davem,
edumazet, kuba, pabeni, jjohnson, mathieu.poirier,
trilokkumar.soni, mukesh.ojha, pavan.kondeti, jorge.ramirez,
tonyh, vignesh.viswanathan, srinivas.kandagatla, amirreza.zarrabi,
jens.wiklander, op-tee, apurupa, skare, linux-kernel, sumit.garg,
harshal.dev, Julian Braha
'drivers/firmware/qcom/qcom_scm.c' calls 'irq_create_fwspec_mapping'
so it will fail to compile if IRQ_DOMAIN is disabled:
drivers/firmware/qcom/qcom_scm.c: In function ‘qcom_scm_get_waitq_irq’:
drivers/firmware/qcom/qcom_scm.c:2512:16: error: implicit declaration
of function ‘irq_create_fwspec_mapping’; did you mean
‘irq_create_of_mapping’? [-Wimplicit-function-declaration]
2512 | return irq_create_fwspec_mapping(&fwspec);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| irq_create_of_mapping
A patch-set in review proposes making QCOM_SCM visible in the kconfig
frontend, so let's ensure that it's safe for users to enable:
https://lore.kernel.org/lkml/akS_6izxrhgK-I22@sumit-xelite/
Signed-off-by: Julian Braha <julianbraha@gmail.com>
---
drivers/firmware/qcom/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/firmware/qcom/Kconfig b/drivers/firmware/qcom/Kconfig
index b477d54b495a..9d137fa2aa23 100644
--- a/drivers/firmware/qcom/Kconfig
+++ b/drivers/firmware/qcom/Kconfig
@@ -7,6 +7,7 @@
menu "Qualcomm firmware drivers"
config QCOM_SCM
+ select IRQ_DOMAIN
select QCOM_TZMEM
tristate
--
2.54.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] firmware: qcom: scm: add missing IRQ_DOMAIN select to QCOM_SCM
2026-07-01 11:03 [PATCH] firmware: qcom: scm: add missing IRQ_DOMAIN select to QCOM_SCM Julian Braha
@ 2026-07-01 11:10 ` Konrad Dybcio
2026-07-02 11:04 ` sashiko-bot
1 sibling, 0 replies; 3+ messages in thread
From: Konrad Dybcio @ 2026-07-01 11:10 UTC (permalink / raw)
To: Julian Braha, andersson
Cc: sumit.garg, linux-arm-msm, dri-devel, freedreno, linux-media,
netdev, linux-wireless, ath12k, linux-remoteproc, konradybcio,
robh, krzk+dt, conor+dt, robin.clark, sean, akhilpo, lumag,
abhinav.kumar, jesszhan0024, marijn.suijten, airlied, simona,
vikash.garodia, bod, mchehab, elder, andrew+netdev, davem,
edumazet, kuba, pabeni, jjohnson, mathieu.poirier,
trilokkumar.soni, mukesh.ojha, pavan.kondeti, jorge.ramirez,
tonyh, vignesh.viswanathan, srinivas.kandagatla, amirreza.zarrabi,
jens.wiklander, op-tee, apurupa, skare, linux-kernel, sumit.garg,
harshal.dev
On 7/1/26 1:03 PM, Julian Braha wrote:
> 'drivers/firmware/qcom/qcom_scm.c' calls 'irq_create_fwspec_mapping'
> so it will fail to compile if IRQ_DOMAIN is disabled:
>
> drivers/firmware/qcom/qcom_scm.c: In function ‘qcom_scm_get_waitq_irq’:
> drivers/firmware/qcom/qcom_scm.c:2512:16: error: implicit declaration
> of function ‘irq_create_fwspec_mapping’; did you mean
> ‘irq_create_of_mapping’? [-Wimplicit-function-declaration]
> 2512 | return irq_create_fwspec_mapping(&fwspec);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~
> | irq_create_of_mapping
>
> A patch-set in review proposes making QCOM_SCM visible in the kconfig
> frontend, so let's ensure that it's safe for users to enable:
> https://lore.kernel.org/lkml/akS_6izxrhgK-I22@sumit-xelite/
>
> Signed-off-by: Julian Braha <julianbraha@gmail.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] firmware: qcom: scm: add missing IRQ_DOMAIN select to QCOM_SCM
2026-07-01 11:03 [PATCH] firmware: qcom: scm: add missing IRQ_DOMAIN select to QCOM_SCM Julian Braha
2026-07-01 11:10 ` Konrad Dybcio
@ 2026-07-02 11:04 ` sashiko-bot
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-07-02 11:04 UTC (permalink / raw)
To: Julian Braha; +Cc: dri-devel
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] `qcom_scm_get_waitq_irq()` returns 0 on failure, but `qcom_scm_probe()` only checks `if (irq < 0)`. This causes the driver to skip the fallback `platform_get_irq_optional()` and incorrectly attempt to request IRQ 0, leading to a probe failure.
--
commit a810ba9e83e9707877b7e2fd4e5099068b665038
Author: Julian Braha <julianbraha@gmail.com>
firmware: qcom: scm: add missing IRQ_DOMAIN select to QCOM_SCM
This commit adds the missing select for IRQ_DOMAIN to the QCOM_SCM kconfig.
This ensures the driver will compile successfully since it relies on
irq_create_fwspec_mapping().
> diff --git a/drivers/firmware/qcom/Kconfig b/drivers/firmware/qcom/Kconfig
> index b477d54b495a6..9d137fa2aa232 100644
> --- a/drivers/firmware/qcom/Kconfig
> +++ b/drivers/firmware/qcom/Kconfig
> @@ -7,6 +7,7 @@
> menu "Qualcomm firmware drivers"
>
> config QCOM_SCM
> + select IRQ_DOMAIN
[Severity: High]
This is a pre-existing issue, but since this patch ensures the code
using irq_create_fwspec_mapping() is compiled, I noticed a potential
regression in how its return value is handled.
In drivers/firmware/qcom/qcom_scm.c:qcom_scm_get_waitq_irq():
return irq_create_fwspec_mapping(&fwspec);
If irq_create_fwspec_mapping() fails, it returns 0. However, when
checked in qcom_scm_probe():
irq = qcom_scm_get_waitq_irq(scm);
if (irq < 0)
irq = platform_get_irq_optional(pdev, 0);
Since 0 is not less than 0, the check misses the failure. Does this cause
the driver to skip the fallback path and incorrectly attempt to request
irq 0, resulting in a probe failure?
Should this check be updated to if (irq <= 0) to properly trigger the
fallback path?
> select QCOM_TZMEM
> tristate
>
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260701110344.1999068-1-julianbraha@gmail.com?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-02 11:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-01 11:03 [PATCH] firmware: qcom: scm: add missing IRQ_DOMAIN select to QCOM_SCM Julian Braha
2026-07-01 11:10 ` Konrad Dybcio
2026-07-02 11:04 ` sashiko-bot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.