]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
soc: qcom: icc-bwmon: Allow for interrupts to be shared across instances
authorSibi Sankar <quic_sibis@quicinc.com>
Mon, 24 Jun 2024 09:22:13 +0000 (14:52 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Aug 2024 13:34:08 +0000 (15:34 +0200)
commit4ededa02c6f50ec0df3bf438f10776828814d0ac
tree11b419abaccfb5a83ebfda6844e3be70ae7629fc
parent809d5e8398114f0d1ebd8785bdd34c59525443b0
soc: qcom: icc-bwmon: Allow for interrupts to be shared across instances

[ Upstream commit dc18836435e7f8dda019db2c618c69194933157f ]

The multiple BWMONv4 instances available on the X1E80100 SoC use the
same interrupt number. Mark them are shared to allow for re-use across
instances.

Using IRQF_SHARED coupled with devm_request_threaded_irq implies that
the irq can still trigger during/after bwmon_remove due to other active
bwmon instances. Handle this race by relying on bwmon_disable to disable
the interrupt and coupled with explicit request/free irqs.

Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240624092214.146935-4-quic_sibis@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/soc/qcom/icc-bwmon.c