From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: tglx@linutronix.de, maz@kernel.org, bjorn.andersson@linaro.org
Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Subject: [PATCH 0/3] Check for IRQ trigger type mismatch in __setup_irq()
Date: Mon, 30 May 2022 13:38:39 +0530 [thread overview]
Message-ID: <20220530080842.37024-1-manivannan.sadhasivam@linaro.org> (raw)
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
next reply other threads:[~2022-05-30 8:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-30 8:08 Manivannan Sadhasivam [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220530080842.37024-1-manivannan.sadhasivam@linaro.org \
--to=manivannan.sadhasivam@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.