From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yijing Wang Subject: Re: [PATCH v1 03/21] MSI: Remove the redundant irq_set_chip_data() Date: Tue, 16 Sep 2014 09:30:40 +0800 Message-ID: <541792C0.9090303__29922.0945606523$1410831399$gmane$org@huawei.com> References: <1409911806-10519-1-git-send-email-wangyijing@huawei.com> <1409911806-10519-4-git-send-email-wangyijing@huawei.com> <1410789648.3314.5.camel@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XThfa-0007zZ-C3 for xen-devel@lists.xenproject.org; Tue, 16 Sep 2014 01:35:02 +0000 In-Reply-To: <1410789648.3314.5.camel@pengutronix.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Lucas Stach Cc: linux-mips@linux-mips.org, linux-ia64@vger.kernel.org, linux-pci@vger.kernel.org, Bharat.Bhushan@freescale.com, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, Russell King , Joerg Roedel , x86@kernel.org, Sebastian Ott , Benjamin Herrenschmidt , xen-devel@lists.xenproject.org, arnab.basu@freescale.com, Arnd Bergmann , Chris Metcalf , Bjorn Helgaas , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Xinwei Hu , Tony Luck , Ralf Baechle , iommu@lists.linux-foundation.org, Wuyun , linuxppc-dev@lists.ozlabs.org, "David S. Miller" List-Id: xen-devel@lists.xenproject.org On 2014/9/15 22:00, Lucas Stach wrote: > Am Freitag, den 05.09.2014, 18:09 +0800 schrieb Yijing Wang: >> Currently, pcie-designware, pcie-rcar, pci-tegra drivers >> use irq chip_data to save the msi_chip pointer. They >> already call irq_set_chip_data() in their own MSI irq map >> functions. So irq_set_chip_data() in arch_setup_msi_irq() >> is useless. >> >> Signed-off-by: Yijing Wang >> --- >> drivers/pci/msi.c | 2 -- >> 1 files changed, 0 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c >> index f6cb317..d547f7f 100644 >> --- a/drivers/pci/msi.c >> +++ b/drivers/pci/msi.c >> @@ -41,8 +41,6 @@ int __weak arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) >> if (err < 0) >> return err; >> >> - irq_set_chip_data(desc->irq, chip); >> - >> return 0; >> } >> > > arch_teardown_msi_irq() expects to find the msi_chip in the irq > chip_data field. As this means drivers don't have any reasonable other > possibility to stuff things into this field, I think it would make sense > to do the cleanup the other way around: keep the irq_set_chip_data > arch_setup_msi_irq() and rip it out of the individual drivers. Hi Lucas, thanks for your review and comments! irq_set_chip_data() should not be placed in MSI core functions, because other arch like x86, use irq_data->chip_data to stores irq_cfg. So how to set the chip_data is arch dependent. And this series is mainly to use MSI chip framework in all platforms. Currently, only ARM platform MSI drivers use the chip_data to store msi_chip, and the drivers call irq_set_chip_data() in their driver already. So I thought we should clean up it in MSI core code. Thanks! Yijing. > > Regards, > Lucas > -- Thanks! Yijing