All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Check for IRQ trigger type mismatch in __setup_irq()
@ 2022-05-30  8:08 Manivannan Sadhasivam
  2022-05-30  8:08 ` [PATCH 1/3] ARM: dts: qcom: sdx55: Fix the IRQ trigger type for UART Manivannan Sadhasivam
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Manivannan Sadhasivam @ 2022-05-30  8:08 UTC (permalink / raw)
  To: tglx, maz, bjorn.andersson
  Cc: linux-kernel, linux-arm-msm, Manivannan Sadhasivam

Hi,

This series adds a check for detecting the IRQ trigger type mismatch between the
platform (DT) and a device driver. Currently, if there is a mismatch, there
is no error thrown but the driver requested trigger gets set silently. Then
during the second time probe of a driver (due to probe defer or rmmod/insmod),
platform_get_irq() throws a warning similar to below and fails.

irq: type mismatch, failed to map hwirq-9 for interrupt-controller@b220000!

But ideally, during the first time itself, request_irq() should've failed as
the flag mismatch is a hard error. So let's add a check in __setup_irq(), such
that the request_irq() would fail if a mismatch has been detected.

NOTE: This might break platforms those has the flag set incorrectly in DT. One
of such case is SDX55, where the UART node has the trigger set incorrectly.
I fixed it in a couple of places I happen to know. But there could be many...

Thanks,
Mani

Manivannan Sadhasivam (3):
  ARM: dts: qcom: sdx55: Fix the IRQ trigger type for UART
  arm64: dts: qcom: sm8450: Fix the IRQ trigger type for remoteproc
    nodes
  genirq: Check for trigger type mismatch in __setup_irq()

 arch/arm/boot/dts/qcom-sdx55.dtsi    |  2 +-
 arch/arm64/boot/dts/qcom/sm8450.dtsi |  8 ++++----
 kernel/irq/manage.c                  | 14 ++++++++++++--
 3 files changed, 17 insertions(+), 7 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-02-13  8:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-30  8:08 [PATCH 0/3] Check for IRQ trigger type mismatch in __setup_irq() Manivannan Sadhasivam
2022-05-30  8:08 ` [PATCH 1/3] ARM: dts: qcom: sdx55: Fix the IRQ trigger type for UART Manivannan Sadhasivam
2022-07-03  3:56   ` (subset) " Bjorn Andersson
2022-05-30  8:08 ` [PATCH 2/3] arm64: dts: qcom: sm8450: Fix the IRQ trigger type for remoteproc nodes Manivannan Sadhasivam
2022-05-30 22:39   ` Dmitry Baryshkov
2022-05-31  7:04     ` Manivannan Sadhasivam
2022-07-03  3:56   ` (subset) " Bjorn Andersson
2022-05-30  8:08 ` [PATCH 3/3] genirq: Check for trigger type mismatch in __setup_irq() Manivannan Sadhasivam
2022-06-06  8:49   ` Marc Zyngier
2022-11-11 10:41     ` Luca Weiss
2023-02-13  8:46       ` Luca Weiss

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.