From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757230AbaIZKjW (ORCPT ); Fri, 26 Sep 2014 06:39:22 -0400 Received: from www.linutronix.de ([62.245.132.108]:39354 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754672AbaIZKjT (ORCPT ); Fri, 26 Sep 2014 06:39:19 -0400 Date: Fri, 26 Sep 2014 12:38:26 +0200 (CEST) From: Thomas Gleixner To: Yijing Wang cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Xinwei Hu , Wuyun , 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 , 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 , Lucas Stach , David Vrabel , Sergei Shtylyov , Michael Ellerman , Thierry Reding , Thomas Petazzoni Subject: Re: [PATCH v2 06/22] PCI/MSI: Introduce weak arch_find_msi_chip() to find MSI chip In-Reply-To: <5424D30A.6040900@huawei.com> Message-ID: References: <1411614872-4009-1-git-send-email-wangyijing@huawei.com> <1411614872-4009-7-git-send-email-wangyijing@huawei.com> <5424D30A.6040900@huawei.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 26 Sep 2014, Yijing Wang wrote: > On 2014/9/25 18:38, Thomas Gleixner wrote: > > On Thu, 25 Sep 2014, Yijing Wang wrote: > > > >> Introduce weak arch_find_msi_chip() to find the match msi_chip. > >> Currently, MSI chip associates pci bus to msi_chip. Because in > >> ARM platform, there may be more than one MSI controller in system. > >> Associate pci bus to msi_chip help pci device to find the match > >> msi_chip and setup MSI/MSI-X irq correctly. But in other platform, > >> like in x86. we only need one MSI chip, because all device use > >> the same MSI address/data and irq etc. So it's no need to associate > >> pci bus to MSI chip, just use a arch function, arch_find_msi_chip() > >> to return the MSI chip for simplicity. The default weak > >> arch_find_msi_chip() used in ARM platform, find the MSI chip > >> by pci bus. > > > > This is really backwards. On one hand you try to get rid of the weak > > arch functions zoo and then you invent new ones for no good > > reason. Why can't x86 store the chip in the pci bus? > > > > Looking deeper, I'm questioning the whole notion of different > > msi_chips. Are this really different MSI controllers with a different > > feature set or are this defacto multiple instances of the same > > controller which just need a different data set? > > MSI chip in this series is to setup MSI irq, including IRQ allocation, Map, > compose MSI msg ..., in different platform, many arch specific MSI irq details in it. > It's difficult to extract the common data and code. > > I have a plan to rework MSI related irq_chips in kernel, PCI and Non-PCI, currently, > HPET, DMAR and PCI have their own irq_chip and MSI related functions, write_msi_msg(), > mask_msi_irq(), etc... I want to extract the common data set for that, so we can > remove lots of unnecessary MSI code. That makes sense. Can you please make sure that this does not conflict with the ongoing work Jiang is doing in the x86 irq area with hierarchical irqdomains to distangle layered levels like MSI from the underlying vector/irqremap mechanics. Thanks, tglx From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: [PATCH v2 06/22] PCI/MSI: Introduce weak arch_find_msi_chip() to find MSI chip Date: Fri, 26 Sep 2014 12:38:26 +0200 (CEST) Message-ID: References: <1411614872-4009-1-git-send-email-wangyijing@huawei.com> <1411614872-4009-7-git-send-email-wangyijing@huawei.com> <5424D30A.6040900@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5424D30A.6040900-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Yijing Wang Cc: linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org, linux-ia64-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Thierry Reding , sparclinux-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-s390-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Russell King , Michael Ellerman , x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, Sebastian Ott , Benjamin Herrenschmidt , xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b@public.gmane.org, arnab.basu-KZfg59tc24xl57MIdRCFDg@public.gmane.org, Arnd Bergmann , Chris Metcalf , Bjorn Helgaas , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Thomas Petazzoni , Xinwei Hu , Tony Luck , Sergei Shtylyov , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Ralf Baechle , iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, David List-Id: linux-arch.vger.kernel.org On Fri, 26 Sep 2014, Yijing Wang wrote: > On 2014/9/25 18:38, Thomas Gleixner wrote: > > On Thu, 25 Sep 2014, Yijing Wang wrote: > > > >> Introduce weak arch_find_msi_chip() to find the match msi_chip. > >> Currently, MSI chip associates pci bus to msi_chip. Because in > >> ARM platform, there may be more than one MSI controller in system. > >> Associate pci bus to msi_chip help pci device to find the match > >> msi_chip and setup MSI/MSI-X irq correctly. But in other platform, > >> like in x86. we only need one MSI chip, because all device use > >> the same MSI address/data and irq etc. So it's no need to associate > >> pci bus to MSI chip, just use a arch function, arch_find_msi_chip() > >> to return the MSI chip for simplicity. The default weak > >> arch_find_msi_chip() used in ARM platform, find the MSI chip > >> by pci bus. > > > > This is really backwards. On one hand you try to get rid of the weak > > arch functions zoo and then you invent new ones for no good > > reason. Why can't x86 store the chip in the pci bus? > > > > Looking deeper, I'm questioning the whole notion of different > > msi_chips. Are this really different MSI controllers with a different > > feature set or are this defacto multiple instances of the same > > controller which just need a different data set? > > MSI chip in this series is to setup MSI irq, including IRQ allocation, Map, > compose MSI msg ..., in different platform, many arch specific MSI irq details in it. > It's difficult to extract the common data and code. > > I have a plan to rework MSI related irq_chips in kernel, PCI and Non-PCI, currently, > HPET, DMAR and PCI have their own irq_chip and MSI related functions, write_msi_msg(), > mask_msi_irq(), etc... I want to extract the common data set for that, so we can > remove lots of unnecessary MSI code. That makes sense. Can you please make sure that this does not conflict with the ongoing work Jiang is doing in the x86 irq area with hierarchical irqdomains to distangle layered levels like MSI from the underlying vector/irqremap mechanics. Thanks, tglx From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Date: Fri, 26 Sep 2014 10:38:26 +0000 Subject: Re: [PATCH v2 06/22] PCI/MSI: Introduce weak arch_find_msi_chip() to find MSI chip Message-Id: List-Id: References: <1411614872-4009-1-git-send-email-wangyijing@huawei.com> <1411614872-4009-7-git-send-email-wangyijing@huawei.com> <5424D30A.6040900@huawei.com> In-Reply-To: <5424D30A.6040900-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Yijing Wang Cc: linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org, linux-ia64-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Thierry Reding , sparclinux-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-s390-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Russell King , Michael Ellerman , x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, Sebastian Ott , Benjamin Herrenschmidt , xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b@public.gmane.org, arnab.basu-KZfg59tc24xl57MIdRCFDg@public.gmane.org, Arnd Bergmann , Chris Metcalf , Bjorn Helgaas , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Thomas Petazzoni , Xinwei Hu , Tony Luck , Sergei Shtylyov , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Ralf Baechle , iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, David On Fri, 26 Sep 2014, Yijing Wang wrote: > On 2014/9/25 18:38, Thomas Gleixner wrote: > > On Thu, 25 Sep 2014, Yijing Wang wrote: > > > >> Introduce weak arch_find_msi_chip() to find the match msi_chip. > >> Currently, MSI chip associates pci bus to msi_chip. Because in > >> ARM platform, there may be more than one MSI controller in system. > >> Associate pci bus to msi_chip help pci device to find the match > >> msi_chip and setup MSI/MSI-X irq correctly. But in other platform, > >> like in x86. we only need one MSI chip, because all device use > >> the same MSI address/data and irq etc. So it's no need to associate > >> pci bus to MSI chip, just use a arch function, arch_find_msi_chip() > >> to return the MSI chip for simplicity. The default weak > >> arch_find_msi_chip() used in ARM platform, find the MSI chip > >> by pci bus. > > > > This is really backwards. On one hand you try to get rid of the weak > > arch functions zoo and then you invent new ones for no good > > reason. Why can't x86 store the chip in the pci bus? > > > > Looking deeper, I'm questioning the whole notion of different > > msi_chips. Are this really different MSI controllers with a different > > feature set or are this defacto multiple instances of the same > > controller which just need a different data set? > > MSI chip in this series is to setup MSI irq, including IRQ allocation, Map, > compose MSI msg ..., in different platform, many arch specific MSI irq details in it. > It's difficult to extract the common data and code. > > I have a plan to rework MSI related irq_chips in kernel, PCI and Non-PCI, currently, > HPET, DMAR and PCI have their own irq_chip and MSI related functions, write_msi_msg(), > mask_msi_irq(), etc... I want to extract the common data set for that, so we can > remove lots of unnecessary MSI code. That makes sense. Can you please make sure that this does not conflict with the ongoing work Jiang is doing in the x86 irq area with hierarchical irqdomains to distangle layered levels like MSI from the underlying vector/irqremap mechanics. Thanks, tglx From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2001:470:1f0b:db:abcd:42:0:1]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id DB3851A09AD for ; Fri, 26 Sep 2014 20:39:13 +1000 (EST) Date: Fri, 26 Sep 2014 12:38:26 +0200 (CEST) From: Thomas Gleixner To: Yijing Wang Subject: Re: [PATCH v2 06/22] PCI/MSI: Introduce weak arch_find_msi_chip() to find MSI chip In-Reply-To: <5424D30A.6040900@huawei.com> Message-ID: References: <1411614872-4009-1-git-send-email-wangyijing@huawei.com> <1411614872-4009-7-git-send-email-wangyijing@huawei.com> <5424D30A.6040900@huawei.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: linux-mips@linux-mips.org, linux-ia64@vger.kernel.org, linux-pci@vger.kernel.org, Bharat.Bhushan@freescale.com, Thierry Reding , 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 , linux-arm-kernel@lists.infradead.org, Thomas Petazzoni , Xinwei Hu , Tony Luck , Sergei Shtylyov , linux-kernel@vger.kernel.org, Ralf Baechle , iommu@lists.linux-foundation.org, David Vrabel , Wuyun , linuxppc-dev@lists.ozlabs.org, "David S. Miller" , Lucas Stach List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, 26 Sep 2014, Yijing Wang wrote: > On 2014/9/25 18:38, Thomas Gleixner wrote: > > On Thu, 25 Sep 2014, Yijing Wang wrote: > > > >> Introduce weak arch_find_msi_chip() to find the match msi_chip. > >> Currently, MSI chip associates pci bus to msi_chip. Because in > >> ARM platform, there may be more than one MSI controller in system. > >> Associate pci bus to msi_chip help pci device to find the match > >> msi_chip and setup MSI/MSI-X irq correctly. But in other platform, > >> like in x86. we only need one MSI chip, because all device use > >> the same MSI address/data and irq etc. So it's no need to associate > >> pci bus to MSI chip, just use a arch function, arch_find_msi_chip() > >> to return the MSI chip for simplicity. The default weak > >> arch_find_msi_chip() used in ARM platform, find the MSI chip > >> by pci bus. > > > > This is really backwards. On one hand you try to get rid of the weak > > arch functions zoo and then you invent new ones for no good > > reason. Why can't x86 store the chip in the pci bus? > > > > Looking deeper, I'm questioning the whole notion of different > > msi_chips. Are this really different MSI controllers with a different > > feature set or are this defacto multiple instances of the same > > controller which just need a different data set? > > MSI chip in this series is to setup MSI irq, including IRQ allocation, Map, > compose MSI msg ..., in different platform, many arch specific MSI irq details in it. > It's difficult to extract the common data and code. > > I have a plan to rework MSI related irq_chips in kernel, PCI and Non-PCI, currently, > HPET, DMAR and PCI have their own irq_chip and MSI related functions, write_msi_msg(), > mask_msi_irq(), etc... I want to extract the common data set for that, so we can > remove lots of unnecessary MSI code. That makes sense. Can you please make sure that this does not conflict with the ongoing work Jiang is doing in the x86 irq area with hierarchical irqdomains to distangle layered levels like MSI from the underlying vector/irqremap mechanics. Thanks, tglx From mboxrd@z Thu Jan 1 00:00:00 1970 From: tglx@linutronix.de (Thomas Gleixner) Date: Fri, 26 Sep 2014 12:38:26 +0200 (CEST) Subject: [PATCH v2 06/22] PCI/MSI: Introduce weak arch_find_msi_chip() to find MSI chip In-Reply-To: <5424D30A.6040900@huawei.com> References: <1411614872-4009-1-git-send-email-wangyijing@huawei.com> <1411614872-4009-7-git-send-email-wangyijing@huawei.com> <5424D30A.6040900@huawei.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri, 26 Sep 2014, Yijing Wang wrote: > On 2014/9/25 18:38, Thomas Gleixner wrote: > > On Thu, 25 Sep 2014, Yijing Wang wrote: > > > >> Introduce weak arch_find_msi_chip() to find the match msi_chip. > >> Currently, MSI chip associates pci bus to msi_chip. Because in > >> ARM platform, there may be more than one MSI controller in system. > >> Associate pci bus to msi_chip help pci device to find the match > >> msi_chip and setup MSI/MSI-X irq correctly. But in other platform, > >> like in x86. we only need one MSI chip, because all device use > >> the same MSI address/data and irq etc. So it's no need to associate > >> pci bus to MSI chip, just use a arch function, arch_find_msi_chip() > >> to return the MSI chip for simplicity. The default weak > >> arch_find_msi_chip() used in ARM platform, find the MSI chip > >> by pci bus. > > > > This is really backwards. On one hand you try to get rid of the weak > > arch functions zoo and then you invent new ones for no good > > reason. Why can't x86 store the chip in the pci bus? > > > > Looking deeper, I'm questioning the whole notion of different > > msi_chips. Are this really different MSI controllers with a different > > feature set or are this defacto multiple instances of the same > > controller which just need a different data set? > > MSI chip in this series is to setup MSI irq, including IRQ allocation, Map, > compose MSI msg ..., in different platform, many arch specific MSI irq details in it. > It's difficult to extract the common data and code. > > I have a plan to rework MSI related irq_chips in kernel, PCI and Non-PCI, currently, > HPET, DMAR and PCI have their own irq_chip and MSI related functions, write_msi_msg(), > mask_msi_irq(), etc... I want to extract the common data set for that, so we can > remove lots of unnecessary MSI code. That makes sense. Can you please make sure that this does not conflict with the ongoing work Jiang is doing in the x86 irq area with hierarchical irqdomains to distangle layered levels like MSI from the underlying vector/irqremap mechanics. Thanks, tglx From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Date: Fri, 26 Sep 2014 10:38:26 +0000 Subject: Re: [PATCH v2 06/22] PCI/MSI: Introduce weak arch_find_msi_chip() to find MSI chip Message-Id: List-Id: References: <1411614872-4009-1-git-send-email-wangyijing@huawei.com> <1411614872-4009-7-git-send-email-wangyijing@huawei.com> <5424D30A.6040900@huawei.com> In-Reply-To: <5424D30A.6040900@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Yijing Wang Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Xinwei Hu , Wuyun , 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 , 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 , Lucas Stach , David Vrabel , Sergei Shtylyov , Michael Ellerman , Thierry Reding , Thomas Petazzoni On Fri, 26 Sep 2014, Yijing Wang wrote: > On 2014/9/25 18:38, Thomas Gleixner wrote: > > On Thu, 25 Sep 2014, Yijing Wang wrote: > > > >> Introduce weak arch_find_msi_chip() to find the match msi_chip. > >> Currently, MSI chip associates pci bus to msi_chip. Because in > >> ARM platform, there may be more than one MSI controller in system. > >> Associate pci bus to msi_chip help pci device to find the match > >> msi_chip and setup MSI/MSI-X irq correctly. But in other platform, > >> like in x86. we only need one MSI chip, because all device use > >> the same MSI address/data and irq etc. So it's no need to associate > >> pci bus to MSI chip, just use a arch function, arch_find_msi_chip() > >> to return the MSI chip for simplicity. The default weak > >> arch_find_msi_chip() used in ARM platform, find the MSI chip > >> by pci bus. > > > > This is really backwards. On one hand you try to get rid of the weak > > arch functions zoo and then you invent new ones for no good > > reason. Why can't x86 store the chip in the pci bus? > > > > Looking deeper, I'm questioning the whole notion of different > > msi_chips. Are this really different MSI controllers with a different > > feature set or are this defacto multiple instances of the same > > controller which just need a different data set? > > MSI chip in this series is to setup MSI irq, including IRQ allocation, Map, > compose MSI msg ..., in different platform, many arch specific MSI irq details in it. > It's difficult to extract the common data and code. > > I have a plan to rework MSI related irq_chips in kernel, PCI and Non-PCI, currently, > HPET, DMAR and PCI have their own irq_chip and MSI related functions, write_msi_msg(), > mask_msi_irq(), etc... I want to extract the common data set for that, so we can > remove lots of unnecessary MSI code. That makes sense. Can you please make sure that this does not conflict with the ongoing work Jiang is doing in the x86 irq area with hierarchical irqdomains to distangle layered levels like MSI from the underlying vector/irqremap mechanics. Thanks, tglx