Skip to content

Commit 987f379

Browse files
eichenbergerKAGA-KOKO
authored andcommitted
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: d929e4d ("irqchip/irq-mvebu-icu: Prepare for real per device MSI") Signed-off-by: Stefan Eichenberger <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/all/[email protected]
1 parent 825c78e commit 987f379

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/irqchip/irq-mvebu-icu.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ static int mvebu_icu_translate(struct irq_domain *d, struct irq_fwspec *fwspec,
6868
unsigned long *hwirq, unsigned int *type)
6969
{
7070
unsigned int param_count = static_branch_unlikely(&legacy_bindings) ? 3 : 2;
71-
struct mvebu_icu_msi_data *msi_data = d->host_data;
71+
struct msi_domain_info *info = d->host_data;
72+
struct mvebu_icu_msi_data *msi_data = info->chip_data;
7273
struct mvebu_icu *icu = msi_data->icu;
7374

7475
/* Check the count of the parameters in dt */

0 commit comments

Comments
 (0)