[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220530080842.37024-1-manivannan.sadhasivam@linaro.org>
Date: Mon, 30 May 2022 13:38:39 +0530
From: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
To: tglx@...utronix.de, maz@...nel.org, bjorn.andersson@...aro.org
Cc: linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Subject: [PATCH 0/3] Check for IRQ trigger type mismatch in __setup_irq()
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@...0000!
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
Powered by blists - more mailing lists