[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <PS1PR06MB11804FF05BBF30F2CA2083FCF51C0@PS1PR06MB1180.apcprd06.prod.outlook.com>
Date: Wed, 18 Nov 2015 18:01:39 +0000
From: Phil Edworthy <phil.edworthy@...esas.com>
To: Marc Zyngier <marc.zyngier@....com>
CC: Thierry Reding <treding@...dia.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Wolfram Sang <wsa@...-dreams.de>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Simon Horman <horms@...ge.net.au>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"linux-sh@...r.kernel.org" <linux-sh@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Ley Foon Tan <lftan@...era.com>,
Jingoo Han <jg1.han@...sung.com>
Subject: RE: [PATCH] PCI: pcie-rcar: Fix OF node passed to MSI irq domain
Hi Marc,
On 16 November 2015 18:31, Marc Zyngier wrote:
> On 13/11/15 09:36, Phil Edworthy wrote:
<snip>
> > Since the stack trace doesn't help that much I added some tracing:
> > pci_msi_setup_msi_irqs()
> > calls pci_msi_get_domain()
> > calls dev_get_msi_domain(), gets a non-NULL domain.
> > pci_msi_setup_msi_irqs()
> > calls pci_msi_domain_alloc_irqs()
> > calls msi_domain_alloc_irqs()
> > msi_domain_alloc_irqs:273: ops=ffffffc03193a810
> > msi_domain_alloc_irqs:274: ops->msi_check=ffffffc031161418
> > systemd-udevd[1311]: undefined instruction: pc=ffffffc03116141c
> > That looks to me as though msi_check is off pointing to the weeds.
>
> So the next step is to find out who initializes msi_check. Assuming
> someone does...
Nothing initializes msi_check...
> > By passing a NULL domain into irq_domain_add_linear() you get:
> > pci_msi_setup_msi_irqs()
> > calls pci_msi_get_domain()
> > calls dev_get_msi_domain(), gets a NULL domain.
> > calls arch_setup_msi_irq()
> > All ok then.
>
> Yes, because you're sidestepping the issue. Any chance you could dig a
> bit deeper? I'd really like to nail this one down (before we convert
> your PCI driver to the right API... ;-).
The problem appears to be that when the pci host driver enables msi
it calls the following:
msi->domain = irq_domain_add_linear(pcie->dev->of_node, INT_PCI_MSI_NR,
&msi_domain_ops, &msi->chip);
The last arg is documented as:
* @host_data: Controller private data pointer
In _irq_domain_add() this ptr is stored in struct irq_domain's host_data.
However, msi_domain_alloc_irqs() expects host_data to be a ptr to a
struct msi_domain_info.
It seems that a number of other pci host drivers do the same, so I am
surprised that no one else has seen this.
Thanks for your help,
Phil
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists