[lkml]   [2022]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH 0/3] Check for IRQ trigger type mismatch in __setup_irq()

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...


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
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(-)


 \ /
  Last update: 2022-05-30 10:10    [W:0.075 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site