On Tuesday, October 08, 2013 3:23 PM, Kishon Vijay Abraham I wrote:
> On Friday 06 September 2013 12:24 PM, Jingoo Han wrote:
> > This patch adds support for Message Signaled Interrupt in the
> > Exynos PCIe diver using Synopsys designware PCIe core IP.
> >
> > Signed-off-by: Siva Reddy Kallam <[email protected]>
> > Signed-off-by: Srikanth T Shivanand <[email protected]>
> > Signed-off-by: Jingoo Han <[email protected]>
> > Cc: Pratyush Anand <[email protected]>
> > Cc: Mohit KUMAR <[email protected]>
> > ---

[.....]

> >  int __init dw_pcie_host_init(struct pcie_port *pp)
> >  {
> >     struct device_node *np = pp->dev->of_node;
> > @@ -157,6 +372,8 @@ int __init dw_pcie_host_init(struct pcie_port *pp)
> >     struct of_pci_range_parser parser;
> >     u32 val;
> >
> > +   struct irq_domain *irq_domain;
> > +
> >     if (of_pci_range_parser_init(&parser, np)) {
> >             dev_err(pp->dev, "missing ranges property\n");
> >             return -EINVAL;
> > @@ -223,6 +440,18 @@ int __init dw_pcie_host_init(struct pcie_port *pp)
> >             return -EINVAL;
> >     }
> >
> > +   if (IS_ENABLED(CONFIG_PCI_MSI)) {
> > +           irq_domain = irq_domain_add_linear(pp->dev->of_node,
> > +                                   MAX_MSI_IRQS, &msi_domain_ops,
> > +                                   &dw_pcie_msi_chip);
> > +           if (!irq_domain) {
> > +                   dev_err(pp->dev, "irq domain init failed\n");
> > +                   return -ENXIO;
> > +           }
> > +
> > +           pp->msi_irq_start = irq_find_mapping(irq_domain, 0);
> 
> Where is the irq_create_mapping done for this irq domain? Is that not needed?
> Without that I'm not getting the correct irq number.

Oh, you're right.
irq_create_mapping() is necessary!

Without irq_create_mapping(), it makes the ugly NULL deference
when two PCIe controllers are used on Exynos5440.
It is my mistake.

I will add irq_create_mapping() to dw_msi_setup_irq(), as tegra PCIe driver
did. I will send the patch, soon.

I really appreciate your comment. :-)
Thank you.

Best regards,
Jingoo Han

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to