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 18:37:32 +0800 Message-ID: <541812EC.3000501@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> <541792C0.9090303@huawei.com> <1410863349.2746.5.camel@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1410863349.2746.5.camel@pengutronix.de> Sender: linux-ia64-owner@vger.kernel.org To: Lucas Stach Cc: Bjorn Helgaas , Xinwei Hu , Wuyun , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King , linux-arch@vger.kernel.org, arnab.basu@freescale.com, Bharat.Bhushan@freescale.com, x86@kernel.org, Arnd Bergmann , Thomas Gleixner , Konrad Rzeszutek Wilk , xen-devel@lists.xenproject.org, Joerg Roedel , iommu@lists.linux-foundation.org, linux-mips@linux-mips.org, Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, Sebastian Ott , Tony Luck , linux-ia64@vger.kernel.org, "David S. Miller" , sparclinux@vger.kernel.org, Chris Metcalf List-Id: linux-arch.vger.kernel.org >>> 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. >> > Okay I see your point, so the cleanup done this way is okay. > > But then this still introduces a problem: arch_teardown_msi_irq() > expects to find the msi_chip in the chip_data field, which is okay for > all ARM PCI host drivers, but not for other arch MSI chips. > > You fix this by completely removing arch_teardown_msi_irq() at the end > of the series, but this still has the potential to introduce issues for > other arches than ARM within the series. So this patch should include a > change to replace the line > > struct msi_chip *chip = irq_get_chip_data(irq); > > with something that doesn't rely on the msi_chip being in the irq > chip_data field. OK, I will update arch_teardown_msi_irq() in this patch, thanks! Thanks! Yijing. > > Regards, > Lucas > -- Thanks! Yijing From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from szxga01-in.huawei.com ([119.145.14.64]:16697 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753173AbaIPKiC (ORCPT ); Tue, 16 Sep 2014 06:38:02 -0400 Message-ID: <541812EC.3000501@huawei.com> Date: Tue, 16 Sep 2014 18:37:32 +0800 From: Yijing Wang MIME-Version: 1.0 Subject: Re: [PATCH v1 03/21] MSI: Remove the redundant irq_set_chip_data() 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> <541792C0.9090303@huawei.com> <1410863349.2746.5.camel@pengutronix.de> In-Reply-To: <1410863349.2746.5.camel@pengutronix.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Lucas Stach Cc: Bjorn Helgaas , Xinwei Hu , Wuyun , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King , linux-arch@vger.kernel.org, arnab.basu@freescale.com, Bharat.Bhushan@freescale.com, x86@kernel.org, Arnd Bergmann , Thomas Gleixner , Konrad Rzeszutek Wilk , xen-devel@lists.xenproject.org, Joerg Roedel , iommu@lists.linux-foundation.org, linux-mips@linux-mips.org, Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, Sebastian Ott , Tony Luck , linux-ia64@vger.kernel.org, "David S. Miller" , sparclinux@vger.kernel.org, Chris Metcalf , Ralf Baechle Message-ID: <20140916103732.40vjl7LPRB2-fUv8qT1WntmtAIM4_s0GmGUZ6L4OI64@z> >>> 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. >> > Okay I see your point, so the cleanup done this way is okay. > > But then this still introduces a problem: arch_teardown_msi_irq() > expects to find the msi_chip in the chip_data field, which is okay for > all ARM PCI host drivers, but not for other arch MSI chips. > > You fix this by completely removing arch_teardown_msi_irq() at the end > of the series, but this still has the potential to introduce issues for > other arches than ARM within the series. So this patch should include a > change to replace the line > > struct msi_chip *chip = irq_get_chip_data(irq); > > with something that doesn't rely on the msi_chip being in the irq > chip_data field. OK, I will update arch_teardown_msi_irq() in this patch, thanks! Thanks! Yijing. > > Regards, > Lucas > -- Thanks! Yijing From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yijing Wang Date: Tue, 16 Sep 2014 10:37:32 +0000 Subject: Re: [PATCH v1 03/21] MSI: Remove the redundant irq_set_chip_data() Message-Id: <541812EC.3000501@huawei.com> List-Id: 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> <541792C0.9090303@huawei.com> <1410863349.2746.5.camel@pengutronix.de> In-Reply-To: <1410863349.2746.5.camel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Lucas Stach Cc: Bjorn Helgaas , Xinwei Hu , Wuyun , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King , linux-arch@vger.kernel.org, arnab.basu@freescale.com, Bharat.Bhushan@freescale.com, x86@kernel.org, Arnd Bergmann , Thomas Gleixner , Konrad Rzeszutek Wilk , xen-devel@lists.xenproject.org, Joerg Roedel , iommu@lists.linux-foundation.org, linux-mips@linux-mips.org, Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, Sebastian Ott , Tony Luck , linux-ia64@vger.kernel.org, "David S. Miller" , sparclinux@vger.kernel.org, Chris Metcalf >>> 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. >> > Okay I see your point, so the cleanup done this way is okay. > > But then this still introduces a problem: arch_teardown_msi_irq() > expects to find the msi_chip in the chip_data field, which is okay for > all ARM PCI host drivers, but not for other arch MSI chips. > > You fix this by completely removing arch_teardown_msi_irq() at the end > of the series, but this still has the potential to introduce issues for > other arches than ARM within the series. So this patch should include a > change to replace the line > > struct msi_chip *chip = irq_get_chip_data(irq); > > with something that doesn't rely on the msi_chip being in the irq > chip_data field. OK, I will update arch_teardown_msi_irq() in this patch, thanks! Thanks! Yijing. > > Regards, > Lucas > -- Thanks! Yijing From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Sep 2014 12:38:45 +0200 (CEST) Received: from szxga01-in.huawei.com ([119.145.14.64]:18689 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S27007194AbaIPKimfQCSc (ORCPT ); Tue, 16 Sep 2014 12:38:42 +0200 Received: from 172.24.2.119 (EHLO szxeml462-hub.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CBT19998; Tue, 16 Sep 2014 18:37:45 +0800 (CST) Received: from [127.0.0.1] (10.177.27.212) by szxeml462-hub.china.huawei.com (10.82.67.205) with Microsoft SMTP Server id 14.3.158.1; Tue, 16 Sep 2014 18:37:35 +0800 Message-ID: <541812EC.3000501@huawei.com> Date: Tue, 16 Sep 2014 18:37:32 +0800 From: Yijing Wang User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Lucas Stach CC: Bjorn Helgaas , Xinwei Hu , Wuyun , , , Russell King , , , , , Arnd Bergmann , Thomas Gleixner , "Konrad Rzeszutek Wilk" , , Joerg Roedel , , , Benjamin Herrenschmidt , , , Sebastian Ott , "Tony Luck" , , "David S. Miller" , , Chris Metcalf , Ralf Baechle Subject: Re: [PATCH v1 03/21] MSI: Remove the redundant irq_set_chip_data() 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> <541792C0.9090303@huawei.com> <1410863349.2746.5.camel@pengutronix.de> In-Reply-To: <1410863349.2746.5.camel@pengutronix.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.27.212] X-CFilter-Loop: Reflected Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 42650 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: wangyijing@huawei.com Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips >>> 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. >> > Okay I see your point, so the cleanup done this way is okay. > > But then this still introduces a problem: arch_teardown_msi_irq() > expects to find the msi_chip in the chip_data field, which is okay for > all ARM PCI host drivers, but not for other arch MSI chips. > > You fix this by completely removing arch_teardown_msi_irq() at the end > of the series, but this still has the potential to introduce issues for > other arches than ARM within the series. So this patch should include a > change to replace the line > > struct msi_chip *chip = irq_get_chip_data(irq); > > with something that doesn't rely on the msi_chip being in the irq > chip_data field. OK, I will update arch_teardown_msi_irq() in this patch, thanks! Thanks! Yijing. > > Regards, > Lucas > -- Thanks! Yijing From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [119.145.14.64]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 017F61A01B0 for ; Tue, 16 Sep 2014 20:37:56 +1000 (EST) Message-ID: <541812EC.3000501@huawei.com> Date: Tue, 16 Sep 2014 18:37:32 +0800 From: Yijing Wang MIME-Version: 1.0 To: Lucas Stach Subject: Re: [PATCH v1 03/21] MSI: Remove the redundant irq_set_chip_data() 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> <541792C0.9090303@huawei.com> <1410863349.2746.5.camel@pengutronix.de> In-Reply-To: <1410863349.2746.5.camel@pengutronix.de> Content-Type: text/plain; charset="UTF-8" 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 , xen-devel@lists.xenproject.org, arnab.basu@freescale.com, Arnd Bergmann , Konrad Rzeszutek Wilk , 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: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , >>> 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. >> > Okay I see your point, so the cleanup done this way is okay. > > But then this still introduces a problem: arch_teardown_msi_irq() > expects to find the msi_chip in the chip_data field, which is okay for > all ARM PCI host drivers, but not for other arch MSI chips. > > You fix this by completely removing arch_teardown_msi_irq() at the end > of the series, but this still has the potential to introduce issues for > other arches than ARM within the series. So this patch should include a > change to replace the line > > struct msi_chip *chip = irq_get_chip_data(irq); > > with something that doesn't rely on the msi_chip being in the irq > chip_data field. OK, I will update arch_teardown_msi_irq() in this patch, thanks! Thanks! Yijing. > > Regards, > Lucas > -- Thanks! Yijing From mboxrd@z Thu Jan 1 00:00:00 1970 From: wangyijing@huawei.com (Yijing Wang) Date: Tue, 16 Sep 2014 18:37:32 +0800 Subject: [PATCH v1 03/21] MSI: Remove the redundant irq_set_chip_data() In-Reply-To: <1410863349.2746.5.camel@pengutronix.de> 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> <541792C0.9090303@huawei.com> <1410863349.2746.5.camel@pengutronix.de> Message-ID: <541812EC.3000501@huawei.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org >>> 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. >> > Okay I see your point, so the cleanup done this way is okay. > > But then this still introduces a problem: arch_teardown_msi_irq() > expects to find the msi_chip in the chip_data field, which is okay for > all ARM PCI host drivers, but not for other arch MSI chips. > > You fix this by completely removing arch_teardown_msi_irq() at the end > of the series, but this still has the potential to introduce issues for > other arches than ARM within the series. So this patch should include a > change to replace the line > > struct msi_chip *chip = irq_get_chip_data(irq); > > with something that doesn't rely on the msi_chip being in the irq > chip_data field. OK, I will update arch_teardown_msi_irq() in this patch, thanks! Thanks! Yijing. > > Regards, > Lucas > -- Thanks! Yijing