From: "tip-bot2 for Stefan Eichenberger" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Stefan Eichenberger <eichest@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
stable@vger.kernel.org, x86@kernel.org,
linux-kernel@vger.kernel.org, maz@kernel.org
Subject: [tip: irq/urgent] irqchip/irq-mvebu-icu: Fix access to msi_data from irq_domain::host_data
Date: Mon, 27 Jan 2025 10:13:56 -0000 [thread overview]
Message-ID: <173797283644.31546.7475280911630632901.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20250124085140.44792-1-eichest@gmail.com>
The following commit has been merged into the irq/urgent branch of tip:
Commit-ID: 987f379b54091cc1b1db986bde71cee1081350b3
Gitweb: https://git.kernel.org/tip/987f379b54091cc1b1db986bde71cee1081350b3
Author: Stefan Eichenberger <eichest@gmail.com>
AuthorDate: Fri, 24 Jan 2025 09:50:39 +01:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Mon, 27 Jan 2025 11:07:03 +01:00
irqchip/irq-mvebu-icu: Fix access to msi_data from irq_domain::host_data
mvebu_icu_translate() incorrectly casts irq_domain::host_data directly to
mvebu_icu_msi_data. However, host_data actually points to a structure of
type msi_domain_info.
This incorrect cast causes issues such as the thermal sensors of the
CP110 platform malfunctioning. Specifically, the translation of the SEI
interrupt to IRQ_TYPE_EDGE_RISING fails, preventing proper interrupt
handling. The following error was observed:
genirq: Setting trigger mode 4 for irq 85 failed (irq_chip_set_type_parent+0x0/0x34)
armada_thermal f2400000.system-controller:thermal-sensor@70: Cannot request threaded IRQ 85
Resolve the issue by first casting host_data to msi_domain_info and then
accessing mvebu_icu_msi_data through msi_domain_info::chip_data.
Fixes: d929e4db22b6 ("irqchip/irq-mvebu-icu: Prepare for real per device MSI")
Signed-off-by: Stefan Eichenberger <eichest@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/all/20250124085140.44792-1-eichest@gmail.com
---
drivers/irqchip/irq-mvebu-icu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-mvebu-icu.c b/drivers/irqchip/irq-mvebu-icu.c
index b337f6c..4eebed3 100644
--- a/drivers/irqchip/irq-mvebu-icu.c
+++ b/drivers/irqchip/irq-mvebu-icu.c
@@ -68,7 +68,8 @@ static int mvebu_icu_translate(struct irq_domain *d, struct irq_fwspec *fwspec,
unsigned long *hwirq, unsigned int *type)
{
unsigned int param_count = static_branch_unlikely(&legacy_bindings) ? 3 : 2;
- struct mvebu_icu_msi_data *msi_data = d->host_data;
+ struct msi_domain_info *info = d->host_data;
+ struct mvebu_icu_msi_data *msi_data = info->chip_data;
struct mvebu_icu *icu = msi_data->icu;
/* Check the count of the parameters in dt */
next prev parent reply other threads:[~2025-01-27 10:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-24 8:50 [PATCH v2] irqchip/irq-mvebu-icu: Fix access to msi_data from irq_domain Stefan Eichenberger
2025-01-27 10:13 ` tip-bot2 for Stefan Eichenberger [this message]
2025-01-27 10:30 ` Thomas Gleixner
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=173797283644.31546.7475280911630632901.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=eichest@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=maz@kernel.org \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®