]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
irqchip/irq-mvebu-icu: Fix wrong private data retrieval
authorMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 1 Oct 2018 14:13:47 +0000 (16:13 +0200)
committerMarc Zyngier <marc.zyngier@arm.com>
Tue, 2 Oct 2018 10:59:31 +0000 (11:59 +0100)
The irq_domain structure has an host_data pointer that just stores
private data. It is meant to not be touched by the IRQ core. However,
when it comes to MSI, the MSI layer adds its own private data there
with a structure that also has a host_data pointer.

Because this IRQ domain is an MSI domain, to access private data we
should do a d->host_data->host_data, also wrapped as
'platform_msi_get_host_data()'.

This bug was lying there silently because the 'icu' structure retrieved
this way was just called by dev_err(), only producing a
'(NULL device *):' output on the console.

Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
drivers/irqchip/irq-mvebu-icu.c

index 13063339b416dac51bf84e77662aa28d70080be7..a2a3acd744911014cfe46389151b68d03b54504c 100644 (file)
@@ -105,7 +105,7 @@ static int
 mvebu_icu_irq_domain_translate(struct irq_domain *d, struct irq_fwspec *fwspec,
                               unsigned long *hwirq, unsigned int *type)
 {
-       struct mvebu_icu *icu = d->host_data;
+       struct mvebu_icu *icu = platform_msi_get_host_data(d);
        unsigned int icu_group;
 
        /* Check the count of the parameters in dt */