From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yijing Wang Subject: Re: [Xen-devel] [PATCH v1 04/21] x86/xen/MSI: Eliminate arch_msix_mask_irq() and arch_msi_mask_irq() Date: Thu, 11 Sep 2014 09:22:29 +0800 Message-ID: <5410F955.80609@huawei.com> References: <1409911806-10519-1-git-send-email-wangyijing@huawei.com> <1409911806-10519-5-git-send-email-wangyijing@huawei.com> <541045BE.9050804@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <541045BE.9050804@citrix.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: David Vrabel , Bjorn Helgaas Cc: linux-mips@linux-mips.org, linux-ia64@vger.kernel.org, linux-pci@vger.kernel.org, Xinwei Hu , 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 , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Bharat.Bhushan@freescale.com, Tony Luck , Ralf Baechle , iommu@lists.linux-foundation.org, Wuyun , linuxppc-dev@lists.ozlabs.org, "David S. Miller" List-Id: linux-arch.vger.kernel.org On 2014/9/10 20:36, David Vrabel wrote: > On 05/09/14 11:09, Yijing Wang wrote: >> Commit 0e4ccb150 added two __weak arch functions arch_msix_mask_irq() >> and arch_msi_mask_irq() to fix a bug found when running xen in x86. >> Introduced these two funcntions make MSI code complex. And mask/unmask >> is the irq actions related to interrupt controller, should not use >> weak arch functions to override mask/unmask interfaces. This patch >> reverted commit 0e4ccb150 and export struct irq_chip msi_chip, modify >> msi_chip->irq_mask/irq_unmask() in xen init functions to fix this >> bug for simplicity. Also this is preparation for using struct >> msi_chip instead of weak arch MSI functions in all platforms. > > Acked-by: David Vrabel > > But I wonder if it would be better the Xen subsystem to provide its own > struct irq_chip instead of adjusting the fields in the generic x86 one. Thanks! Currently, Xen and the bare x86 system only have the different irq_chip->irq_mask/irq_unmask. So I chose to override the two ops of bare x86 irq_chip in xen. Konrad Rzeszutek Wilk has been tested it ok in his platform, so I think we could use its own irq_chip for xen later if the difference become large. Thanks! Yijing. > > David > > . > -- Thanks! Yijing From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from szxga03-in.huawei.com ([119.145.14.66]:40478 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750970AbaIKBZI (ORCPT ); Wed, 10 Sep 2014 21:25:08 -0400 Message-ID: <5410F955.80609@huawei.com> Date: Thu, 11 Sep 2014 09:22:29 +0800 From: Yijing Wang MIME-Version: 1.0 Subject: Re: [Xen-devel] [PATCH v1 04/21] x86/xen/MSI: Eliminate arch_msix_mask_irq() and arch_msi_mask_irq() References: <1409911806-10519-1-git-send-email-wangyijing@huawei.com> <1409911806-10519-5-git-send-email-wangyijing@huawei.com> <541045BE.9050804@citrix.com> In-Reply-To: <541045BE.9050804@citrix.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: David Vrabel , Bjorn Helgaas 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 , 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" Message-ID: <20140911012229.FeP4ST015D7YvvPf2EMxX7EpOV1HN1cwuEWeDkF_t78@z> On 2014/9/10 20:36, David Vrabel wrote: > On 05/09/14 11:09, Yijing Wang wrote: >> Commit 0e4ccb150 added two __weak arch functions arch_msix_mask_irq() >> and arch_msi_mask_irq() to fix a bug found when running xen in x86. >> Introduced these two funcntions make MSI code complex. And mask/unmask >> is the irq actions related to interrupt controller, should not use >> weak arch functions to override mask/unmask interfaces. This patch >> reverted commit 0e4ccb150 and export struct irq_chip msi_chip, modify >> msi_chip->irq_mask/irq_unmask() in xen init functions to fix this >> bug for simplicity. Also this is preparation for using struct >> msi_chip instead of weak arch MSI functions in all platforms. > > Acked-by: David Vrabel > > But I wonder if it would be better the Xen subsystem to provide its own > struct irq_chip instead of adjusting the fields in the generic x86 one. Thanks! Currently, Xen and the bare x86 system only have the different irq_chip->irq_mask/irq_unmask. So I chose to override the two ops of bare x86 irq_chip in xen. Konrad Rzeszutek Wilk has been tested it ok in his platform, so I think we could use its own irq_chip for xen later if the difference become large. Thanks! Yijing. > > David > > . > -- Thanks! Yijing From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yijing Wang Date: Thu, 11 Sep 2014 01:22:29 +0000 Subject: Re: [Xen-devel] [PATCH v1 04/21] x86/xen/MSI: Eliminate arch_msix_mask_irq() and arch_msi_mask_irq() Message-Id: <5410F955.80609@huawei.com> List-Id: References: <1409911806-10519-1-git-send-email-wangyijing@huawei.com> <1409911806-10519-5-git-send-email-wangyijing@huawei.com> <541045BE.9050804@citrix.com> In-Reply-To: <541045BE.9050804@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: David Vrabel , Bjorn Helgaas Cc: linux-mips@linux-mips.org, linux-ia64@vger.kernel.org, linux-pci@vger.kernel.org, Xinwei Hu , 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 , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Bharat.Bhushan@freescale.com, Tony Luck , Ralf Baechle , iommu@lists.linux-foundation.org, Wuyun , linuxppc-dev@lists.ozlabs.org, "David S. Miller" On 2014/9/10 20:36, David Vrabel wrote: > On 05/09/14 11:09, Yijing Wang wrote: >> Commit 0e4ccb150 added two __weak arch functions arch_msix_mask_irq() >> and arch_msi_mask_irq() to fix a bug found when running xen in x86. >> Introduced these two funcntions make MSI code complex. And mask/unmask >> is the irq actions related to interrupt controller, should not use >> weak arch functions to override mask/unmask interfaces. This patch >> reverted commit 0e4ccb150 and export struct irq_chip msi_chip, modify >> msi_chip->irq_mask/irq_unmask() in xen init functions to fix this >> bug for simplicity. Also this is preparation for using struct >> msi_chip instead of weak arch MSI functions in all platforms. > > Acked-by: David Vrabel > > But I wonder if it would be better the Xen subsystem to provide its own > struct irq_chip instead of adjusting the fields in the generic x86 one. Thanks! Currently, Xen and the bare x86 system only have the different irq_chip->irq_mask/irq_unmask. So I chose to override the two ops of bare x86 irq_chip in xen. Konrad Rzeszutek Wilk has been tested it ok in his platform, so I think we could use its own irq_chip for xen later if the difference become large. Thanks! Yijing. > > David > > . > -- Thanks! Yijing From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 11 Sep 2014 03:24:47 +0200 (CEST) Received: from szxga03-in.huawei.com ([119.145.14.66]:41542 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S27006909AbaIKBYnRXHpn (ORCPT ); Thu, 11 Sep 2014 03:24:43 +0200 Received: from 172.24.2.119 (EHLO szxeml448-hub.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id AUE31679; Thu, 11 Sep 2014 09:22:48 +0800 (CST) Received: from [127.0.0.1] (10.177.27.212) by szxeml448-hub.china.huawei.com (10.82.67.191) with Microsoft SMTP Server id 14.3.158.1; Thu, 11 Sep 2014 09:22:37 +0800 Message-ID: <5410F955.80609@huawei.com> Date: Thu, 11 Sep 2014 09:22:29 +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: David Vrabel , Bjorn Helgaas CC: , , , , , , , Russell King , "Joerg Roedel" , , Sebastian Ott , Benjamin Herrenschmidt , , , Arnd Bergmann , Chris Metcalf , Thomas Gleixner , , Xinwei Hu , "Tony Luck" , Ralf Baechle , , Wuyun , , "David S. Miller" Subject: Re: [Xen-devel] [PATCH v1 04/21] x86/xen/MSI: Eliminate arch_msix_mask_irq() and arch_msi_mask_irq() References: <1409911806-10519-1-git-send-email-wangyijing@huawei.com> <1409911806-10519-5-git-send-email-wangyijing@huawei.com> <541045BE.9050804@citrix.com> In-Reply-To: <541045BE.9050804@citrix.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.27.212] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020208.5410F96D.006D,ss=1,re=0.000,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2011-05-27 18:58:46 X-Mirapoint-Loop-Id: 5b23eb4297e59afdb70bc19d5e198dc7 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: 42500 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 On 2014/9/10 20:36, David Vrabel wrote: > On 05/09/14 11:09, Yijing Wang wrote: >> Commit 0e4ccb150 added two __weak arch functions arch_msix_mask_irq() >> and arch_msi_mask_irq() to fix a bug found when running xen in x86. >> Introduced these two funcntions make MSI code complex. And mask/unmask >> is the irq actions related to interrupt controller, should not use >> weak arch functions to override mask/unmask interfaces. This patch >> reverted commit 0e4ccb150 and export struct irq_chip msi_chip, modify >> msi_chip->irq_mask/irq_unmask() in xen init functions to fix this >> bug for simplicity. Also this is preparation for using struct >> msi_chip instead of weak arch MSI functions in all platforms. > > Acked-by: David Vrabel > > But I wonder if it would be better the Xen subsystem to provide its own > struct irq_chip instead of adjusting the fields in the generic x86 one. Thanks! Currently, Xen and the bare x86 system only have the different irq_chip->irq_mask/irq_unmask. So I chose to override the two ops of bare x86 irq_chip in xen. Konrad Rzeszutek Wilk has been tested it ok in his platform, so I think we could use its own irq_chip for xen later if the difference become large. Thanks! Yijing. > > David > > . > -- Thanks! Yijing From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [119.145.14.66]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3CF371A0044 for ; Thu, 11 Sep 2014 11:24:52 +1000 (EST) Message-ID: <5410F955.80609@huawei.com> Date: Thu, 11 Sep 2014 09:22:29 +0800 From: Yijing Wang MIME-Version: 1.0 To: David Vrabel , Bjorn Helgaas Subject: Re: [Xen-devel] [PATCH v1 04/21] x86/xen/MSI: Eliminate arch_msix_mask_irq() and arch_msi_mask_irq() References: <1409911806-10519-1-git-send-email-wangyijing@huawei.com> <1409911806-10519-5-git-send-email-wangyijing@huawei.com> <541045BE.9050804@citrix.com> In-Reply-To: <541045BE.9050804@citrix.com> Content-Type: text/plain; charset="ISO-8859-1" Cc: linux-mips@linux-mips.org, linux-ia64@vger.kernel.org, linux-pci@vger.kernel.org, Xinwei Hu , 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 , Chris Metcalf , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Bharat.Bhushan@freescale.com, 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: , On 2014/9/10 20:36, David Vrabel wrote: > On 05/09/14 11:09, Yijing Wang wrote: >> Commit 0e4ccb150 added two __weak arch functions arch_msix_mask_irq() >> and arch_msi_mask_irq() to fix a bug found when running xen in x86. >> Introduced these two funcntions make MSI code complex. And mask/unmask >> is the irq actions related to interrupt controller, should not use >> weak arch functions to override mask/unmask interfaces. This patch >> reverted commit 0e4ccb150 and export struct irq_chip msi_chip, modify >> msi_chip->irq_mask/irq_unmask() in xen init functions to fix this >> bug for simplicity. Also this is preparation for using struct >> msi_chip instead of weak arch MSI functions in all platforms. > > Acked-by: David Vrabel > > But I wonder if it would be better the Xen subsystem to provide its own > struct irq_chip instead of adjusting the fields in the generic x86 one. Thanks! Currently, Xen and the bare x86 system only have the different irq_chip->irq_mask/irq_unmask. So I chose to override the two ops of bare x86 irq_chip in xen. Konrad Rzeszutek Wilk has been tested it ok in his platform, so I think we could use its own irq_chip for xen later if the difference become large. Thanks! Yijing. > > David > > . > -- Thanks! Yijing From mboxrd@z Thu Jan 1 00:00:00 1970 From: wangyijing@huawei.com (Yijing Wang) Date: Thu, 11 Sep 2014 09:22:29 +0800 Subject: [Xen-devel] [PATCH v1 04/21] x86/xen/MSI: Eliminate arch_msix_mask_irq() and arch_msi_mask_irq() In-Reply-To: <541045BE.9050804@citrix.com> References: <1409911806-10519-1-git-send-email-wangyijing@huawei.com> <1409911806-10519-5-git-send-email-wangyijing@huawei.com> <541045BE.9050804@citrix.com> Message-ID: <5410F955.80609@huawei.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 2014/9/10 20:36, David Vrabel wrote: > On 05/09/14 11:09, Yijing Wang wrote: >> Commit 0e4ccb150 added two __weak arch functions arch_msix_mask_irq() >> and arch_msi_mask_irq() to fix a bug found when running xen in x86. >> Introduced these two funcntions make MSI code complex. And mask/unmask >> is the irq actions related to interrupt controller, should not use >> weak arch functions to override mask/unmask interfaces. This patch >> reverted commit 0e4ccb150 and export struct irq_chip msi_chip, modify >> msi_chip->irq_mask/irq_unmask() in xen init functions to fix this >> bug for simplicity. Also this is preparation for using struct >> msi_chip instead of weak arch MSI functions in all platforms. > > Acked-by: David Vrabel > > But I wonder if it would be better the Xen subsystem to provide its own > struct irq_chip instead of adjusting the fields in the generic x86 one. Thanks! Currently, Xen and the bare x86 system only have the different irq_chip->irq_mask/irq_unmask. So I chose to override the two ops of bare x86 irq_chip in xen. Konrad Rzeszutek Wilk has been tested it ok in his platform, so I think we could use its own irq_chip for xen later if the difference become large. Thanks! Yijing. > > David > > . > -- Thanks! Yijing