Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754321Ab3HWE6M (ORCPT ); Fri, 23 Aug 2013 00:58:12 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:26253 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753471Ab3HWE6J (ORCPT ); Fri, 23 Aug 2013 00:58:09 -0400 X-AuditID: cbfee68f-b7f656d0000058e3-b0-5216ebdfe901 From: Jingoo Han To: "'Thierry Reding'" Cc: "'Bjorn Helgaas'" , linux-pci@vger.kernel.org, linux-samsung-soc@vger.kernel.org, "'Kukjin Kim'" , "'Pratyush Anand'" , "'Mohit KUMAR'" , "'Siva Reddy Kallam'" , "'SRIKANTH TUMKUR SHIVANAND'" , "'Arnd Bergmann'" , "'Sean Cross'" , "'Kishon Vijay Abraham I'" , "'Thomas Petazzoni'" , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, "'Jingoo Han'" References: <000401ce9739$e0a65410$a1f2fc30$@samsung.com> <20130812105638.GA12042@ulmo> In-reply-to: <20130812105638.GA12042@ulmo> Subject: Re: [PATCH] PCI: exynos: add support for MSI Date: Fri, 23 Aug 2013 13:58:07 +0900 Message-id: <002e01ce9fbd$5b728430$12578c90$%han@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: AQFGJzktPramPcVSz76V2WYwCfRKBwHt7zEGmqO6uTA= Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCKsWRmVeSWpSXmKPExsVy+t8zQ937r8WCDN7+UbX4O+kYu8WSpgyL l4c0LeYfOcdqcXnhJVaL3gVX2SwuPO1hs7i8aw6bxdl5x9ksZpzfx2SxceovRov2S8oWK5q2 Mlr83DWPxeLpgyYmi8ajD1gtWp88YHQQ9Pj9axKjx5NNFxk9ds66y+6xYFOpx/eF89k9+ras YvR4+mMvs8fxG9uZPD5vk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AANJKxj zHh56zlrwTqBigkfjjI1MP7n6WLk5JAQMJFYNHMnM4QtJnHh3nq2LkYuDiGBRYwSu+/3sUM4 vxglOt79ZgSpYhNQk/jy5TA7iC0ioC9x6folVpAiZoFrLBJTz/8GSwgJREp0d7wAG8spoCXx YE4HWFxYwFTi4sxnLCA2i4CqxM7724GGcnDwCthKfH8FdhGvgKDEj8n3wEqYgVrX7zzOBGHL S2xe85YZpFxCQF3i0V9diBOsJLZueMMKUSIise/FO8YJjEKzkEyahWTSLCSTZiFpWcDIsopR NLUguaA4KT3XUK84Mbe4NC9dLzk/dxMjOEE9k9rBuLLB4hCjAAejEg/vBGexICHWxLLiytxD jBIczEoivDargEK8KYmVValF+fFFpTmpxYcYk4H+nMgsJZqcD0yeeSXxhsYmZkaWRmYWRibm 5qQJK4nzHmi1DhQSSE8sSc1OTS1ILYLZwsTBKdXAqNJaf6fGKrPByvvb4Y6nSssuz9rHaR27 /ZH4Pf2tn594+FzKXisZXDRhyZVihU9Vx17uZ66582jhjLyyjiuvhK1fcB+9PFNm/q+sBY9j nvcZVxxaq6a++UIo4zMNv1QJ/3XTL4Ycfuyv364nt+2MjcCJFZ58e5QTQgvkX5SL/vXK5lKY /98rSomlOCPRUIu5qDgRANsoF1CUAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2269 Lines: 75 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/