[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-id: <002e01ce9fbd$5b728430$12578c90$%han@samsung.com>
Date: Fri, 23 Aug 2013 13:58:07 +0900
From: Jingoo Han <jg1.han@...sung.com>
To: 'Thierry Reding' <thierry.reding@...il.com>
Cc: 'Bjorn Helgaas' <bhelgaas@...gle.com>, linux-pci@...r.kernel.org,
linux-samsung-soc@...r.kernel.org,
'Kukjin Kim' <kgene.kim@...sung.com>,
'Pratyush Anand' <pratyush.anand@...com>,
'Mohit KUMAR' <Mohit.KUMAR@...com>,
'Siva Reddy Kallam' <siva.kallam@...sung.com>,
'SRIKANTH TUMKUR SHIVANAND' <ts.srikanth@...sung.com>,
'Arnd Bergmann' <arnd@...db.de>,
'Sean Cross' <xobs@...agi.com>,
'Kishon Vijay Abraham I' <kishon@...com>,
'Thomas Petazzoni' <thomas.petazzoni@...e-electrons.com>,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
'Jingoo Han' <jg1.han@...sung.com>
Subject: Re: [PATCH] PCI: exynos: add support for MSI
On Monday, August 12, 2013 7:57 PM, Thierry Reding wrote:
> On Mon, Aug 12, 2013 at 05:56:47PM +0900, Jingoo Han wrote:
> [...]
> > diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
> > index 855d4a7..9ef1c95 100644
> > --- a/arch/arm/mach-exynos/Kconfig
> > +++ b/arch/arm/mach-exynos/Kconfig
> > @@ -93,6 +93,7 @@ config SOC_EXYNOS5440
> > default y
> > depends on ARCH_EXYNOS5
> > select ARCH_HAS_OPP
> > + select ARCH_SUPPORTS_MSI
>
> This symbol goes away in Thomas Petazzoni's MSI patch series which is
> targetted at 3.12, so I don't think you should add that here.
OK, I see.
I will remove ARCH_SUPPORTS_MSI.
[.....]
> > +#endif
> > +
> > static void exynos_pcie_enable_interrupts(struct pcie_port *pp)
> > {
> > exynos_pcie_enable_irq_pulse(pp);
> > +#ifdef CONFIG_PCI_MSI
> > + exynos_pcie_msi_init(pp);
> > +#endif
> > return;
> > }
>
> Instead of the whole #ifdef business above, can't you just use something
> like this in exynos_pcie_enable_interrupts():
>
> if (IS_ENABLED(CONFIG_PCI_MSI))
> exynos_pcie_msi_init(pp);
>
> Now you can drop the #ifdef guards and the compiler will throw away all
> the related code automatically if PCI_MSI is not selected because the
> functions are all static and unused. This has the advantage of compiling
> all the code whether or not PCI_MSI is selected or not, therefore
> increasing compile coverage of the driver.
OK, I see.
I will use 'if IS_ENABLED(CONFIG_PCI_MSI))', and remove #ifdef guards.
[.....]
> > +
> > +void arch_teardown_msi_irq(unsigned int irq)
> > +{
> > + clear_irq(irq);
> > +}
>
> And we've reworked this largely so that drivers no longer provide arch_*
> functions because that prevents multi-platform support. So I think you
> need to port this to the new msi_chip infrastructure that's being
> introduced in 3.12.
OK, I have looked at the new msi_chip infrastructure made by Thomas Petazzoni.
I will use this msi_chip.
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 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