From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753330AbaIZDmu (ORCPT ); Thu, 25 Sep 2014 23:42:50 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:52559 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752982AbaIZDms (ORCPT ); Thu, 25 Sep 2014 23:42:48 -0400 Message-ID: <5424E09F.50701@huawei.com> Date: Fri, 26 Sep 2014 11:42:23 +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: Thierry Reding , Liviu Dudau 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 , Lucas Stach , David Vrabel , "Sergei Shtylyov" , Michael Ellerman , Thomas Petazzoni Subject: Re: [PATCH v2 00/22] Use MSI chip framework to configure MSI/MSI-X in all platforms References: <1411614872-4009-1-git-send-email-wangyijing@huawei.com> <20140925074235.GN12423@ulmo> <20140925144855.GB31157@bart.dudau.co.uk> <20140925164937.GB30382@ulmo> In-Reply-To: <20140925164937.GB30382@ulmo> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.27.212] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> I am actually in disagreement with you, Thierry. I don't like the general direction >> of the patches, or at least I don't like the fact that we don't have a portable >> way of setting up the msi_chip without having to rely on weak architectural hooks. > > Oh, good. That's actually one of the things I said I wasn't happy with > either. =) Hm, I decide to drop weak arch_find_msi_chip(), no one likes it. Let's find a better solution :) > >> I'm surprised no one considers the case of a platform having more than one host >> bridge and possibly more than one MSI unit. With the current proposed patchset I >> can't see how that would work. > > The PCI core can already deal with that. An MSI chip can be set per bus > and the weak pcibios_add_bus() can be used to set that. Often it might > not even be necessary to do it via pcibios_add_bus() if you create the > root bus directly, since you can attach the MSI chip at that time. Yes, PCI hostbridge driver find the matched msi chip during its initialization, and assign the msi chip to PCI bus in pcibios_add_bus(). > >> What I would like to see is a way of creating the pci_host_bridge structure outside >> the pci_create_root_bus(). That would then allow us to pass this sort of platform >> details like associated msi_chip into the host bridge and the child busses will >> have an easy way of finding the information needed by finding the root bus and then >> the host bridge structure. Then the generic pci_scan_root_bus() can be used by (mostly) >> everyone and the drivers can remove their kludges that try to work around the >> current limitations. So I think maybe save msi chip in PCI arch sysdata is a good candidate. > > I think both issues are orthogonal. Last time I checked a lot of work > was still necessary to unify host bridges enough so that it could be > shared across architectures. But perhaps some of that work has > happened in the meantime. > > But like I said, when you create the root bus, you can easily attach the > MSI chip to it. > > Thierry > -- Thanks! Yijing From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yijing Wang Subject: Re: [PATCH v2 00/22] Use MSI chip framework to configure MSI/MSI-X in all platforms Date: Fri, 26 Sep 2014 11:42:23 +0800 Message-ID: <5424E09F.50701@huawei.com> References: <1411614872-4009-1-git-send-email-wangyijing@huawei.com> <20140925074235.GN12423@ulmo> <20140925144855.GB31157@bart.dudau.co.uk> <20140925164937.GB30382@ulmo> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140925164937.GB30382@ulmo> Sender: linux-ia64-owner@vger.kernel.org List-Archive: List-Post: To: Thierry Reding , Liviu Dudau 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 , 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.ke List-ID: >> I am actually in disagreement with you, Thierry. I don't like the general direction >> of the patches, or at least I don't like the fact that we don't have a portable >> way of setting up the msi_chip without having to rely on weak architectural hooks. > > Oh, good. That's actually one of the things I said I wasn't happy with > either. =) Hm, I decide to drop weak arch_find_msi_chip(), no one likes it. Let's find a better solution :) > >> I'm surprised no one considers the case of a platform having more than one host >> bridge and possibly more than one MSI unit. With the current proposed patchset I >> can't see how that would work. > > The PCI core can already deal with that. An MSI chip can be set per bus > and the weak pcibios_add_bus() can be used to set that. Often it might > not even be necessary to do it via pcibios_add_bus() if you create the > root bus directly, since you can attach the MSI chip at that time. Yes, PCI hostbridge driver find the matched msi chip during its initialization, and assign the msi chip to PCI bus in pcibios_add_bus(). > >> What I would like to see is a way of creating the pci_host_bridge structure outside >> the pci_create_root_bus(). That would then allow us to pass this sort of platform >> details like associated msi_chip into the host bridge and the child busses will >> have an easy way of finding the information needed by finding the root bus and then >> the host bridge structure. Then the generic pci_scan_root_bus() can be used by (mostly) >> everyone and the drivers can remove their kludges that try to work around the >> current limitations. So I think maybe save msi chip in PCI arch sysdata is a good candidate. > > I think both issues are orthogonal. Last time I checked a lot of work > was still necessary to unify host bridges enough so that it could be > shared across architectures. But perhaps some of that work has > happened in the meantime. > > But like I said, when you create the root bus, you can easily attach the > MSI chip to it. > > Thierry > -- Thanks! Yijing From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from szxga02-in.huawei.com ([119.145.14.65]:52559 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752982AbaIZDms (ORCPT ); Thu, 25 Sep 2014 23:42:48 -0400 Message-ID: <5424E09F.50701@huawei.com> Date: Fri, 26 Sep 2014 11:42:23 +0800 From: Yijing Wang MIME-Version: 1.0 Subject: Re: [PATCH v2 00/22] Use MSI chip framework to configure MSI/MSI-X in all platforms References: <1411614872-4009-1-git-send-email-wangyijing@huawei.com> <20140925074235.GN12423@ulmo> <20140925144855.GB31157@bart.dudau.co.uk> <20140925164937.GB30382@ulmo> In-Reply-To: <20140925164937.GB30382@ulmo> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Thierry Reding , Liviu Dudau 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 , 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 , Lucas Stach , David Vrabel , Sergei Shtylyov , Michael Ellerman , Thomas Petazzoni Message-ID: <20140926034223.lfTo5n3YRQcl4WlCQ_MVLHfAmnF4Sl2Qyz-ge8wApUY@z> >> I am actually in disagreement with you, Thierry. I don't like the general direction >> of the patches, or at least I don't like the fact that we don't have a portable >> way of setting up the msi_chip without having to rely on weak architectural hooks. > > Oh, good. That's actually one of the things I said I wasn't happy with > either. =) Hm, I decide to drop weak arch_find_msi_chip(), no one likes it. Let's find a better solution :) > >> I'm surprised no one considers the case of a platform having more than one host >> bridge and possibly more than one MSI unit. With the current proposed patchset I >> can't see how that would work. > > The PCI core can already deal with that. An MSI chip can be set per bus > and the weak pcibios_add_bus() can be used to set that. Often it might > not even be necessary to do it via pcibios_add_bus() if you create the > root bus directly, since you can attach the MSI chip at that time. Yes, PCI hostbridge driver find the matched msi chip during its initialization, and assign the msi chip to PCI bus in pcibios_add_bus(). > >> What I would like to see is a way of creating the pci_host_bridge structure outside >> the pci_create_root_bus(). That would then allow us to pass this sort of platform >> details like associated msi_chip into the host bridge and the child busses will >> have an easy way of finding the information needed by finding the root bus and then >> the host bridge structure. Then the generic pci_scan_root_bus() can be used by (mostly) >> everyone and the drivers can remove their kludges that try to work around the >> current limitations. So I think maybe save msi chip in PCI arch sysdata is a good candidate. > > I think both issues are orthogonal. Last time I checked a lot of work > was still necessary to unify host bridges enough so that it could be > shared across architectures. But perhaps some of that work has > happened in the meantime. > > But like I said, when you create the root bus, you can easily attach the > MSI chip to it. > > Thierry > -- Thanks! Yijing From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yijing Wang Date: Fri, 26 Sep 2014 03:42:23 +0000 Subject: Re: [PATCH v2 00/22] Use MSI chip framework to configure MSI/MSI-X in all platforms Message-Id: <5424E09F.50701@huawei.com> List-Id: References: <1411614872-4009-1-git-send-email-wangyijing@huawei.com> <20140925074235.GN12423@ulmo> <20140925144855.GB31157@bart.dudau.co.uk> <20140925164937.GB30382@ulmo> In-Reply-To: <20140925164937.GB30382@ulmo> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Thierry Reding , Liviu Dudau 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 , 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.ke >> I am actually in disagreement with you, Thierry. I don't like the general direction >> of the patches, or at least I don't like the fact that we don't have a portable >> way of setting up the msi_chip without having to rely on weak architectural hooks. > > Oh, good. That's actually one of the things I said I wasn't happy with > either. =) Hm, I decide to drop weak arch_find_msi_chip(), no one likes it. Let's find a better solution :) > >> I'm surprised no one considers the case of a platform having more than one host >> bridge and possibly more than one MSI unit. With the current proposed patchset I >> can't see how that would work. > > The PCI core can already deal with that. An MSI chip can be set per bus > and the weak pcibios_add_bus() can be used to set that. Often it might > not even be necessary to do it via pcibios_add_bus() if you create the > root bus directly, since you can attach the MSI chip at that time. Yes, PCI hostbridge driver find the matched msi chip during its initialization, and assign the msi chip to PCI bus in pcibios_add_bus(). > >> What I would like to see is a way of creating the pci_host_bridge structure outside >> the pci_create_root_bus(). That would then allow us to pass this sort of platform >> details like associated msi_chip into the host bridge and the child busses will >> have an easy way of finding the information needed by finding the root bus and then >> the host bridge structure. Then the generic pci_scan_root_bus() can be used by (mostly) >> everyone and the drivers can remove their kludges that try to work around the >> current limitations. So I think maybe save msi chip in PCI arch sysdata is a good candidate. > > I think both issues are orthogonal. Last time I checked a lot of work > was still necessary to unify host bridges enough so that it could be > shared across architectures. But perhaps some of that work has > happened in the meantime. > > But like I said, when you create the root bus, you can easily attach the > MSI chip to it. > > Thierry > -- Thanks! Yijing From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [119.145.14.65]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 101171A0026 for ; Fri, 26 Sep 2014 13:43:15 +1000 (EST) Message-ID: <5424E09F.50701@huawei.com> Date: Fri, 26 Sep 2014 11:42:23 +0800 From: Yijing Wang MIME-Version: 1.0 To: Thierry Reding , Liviu Dudau Subject: Re: [PATCH v2 00/22] Use MSI chip framework to configure MSI/MSI-X in all platforms References: <1411614872-4009-1-git-send-email-wangyijing@huawei.com> <20140925074235.GN12423@ulmo> <20140925144855.GB31157@bart.dudau.co.uk> <20140925164937.GB30382@ulmo> In-Reply-To: <20140925164937.GB30382@ulmo> Content-Type: text/plain; charset="ISO-8859-1" 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, 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: , >> I am actually in disagreement with you, Thierry. I don't like the general direction >> of the patches, or at least I don't like the fact that we don't have a portable >> way of setting up the msi_chip without having to rely on weak architectural hooks. > > Oh, good. That's actually one of the things I said I wasn't happy with > either. =) Hm, I decide to drop weak arch_find_msi_chip(), no one likes it. Let's find a better solution :) > >> I'm surprised no one considers the case of a platform having more than one host >> bridge and possibly more than one MSI unit. With the current proposed patchset I >> can't see how that would work. > > The PCI core can already deal with that. An MSI chip can be set per bus > and the weak pcibios_add_bus() can be used to set that. Often it might > not even be necessary to do it via pcibios_add_bus() if you create the > root bus directly, since you can attach the MSI chip at that time. Yes, PCI hostbridge driver find the matched msi chip during its initialization, and assign the msi chip to PCI bus in pcibios_add_bus(). > >> What I would like to see is a way of creating the pci_host_bridge structure outside >> the pci_create_root_bus(). That would then allow us to pass this sort of platform >> details like associated msi_chip into the host bridge and the child busses will >> have an easy way of finding the information needed by finding the root bus and then >> the host bridge structure. Then the generic pci_scan_root_bus() can be used by (mostly) >> everyone and the drivers can remove their kludges that try to work around the >> current limitations. So I think maybe save msi chip in PCI arch sysdata is a good candidate. > > I think both issues are orthogonal. Last time I checked a lot of work > was still necessary to unify host bridges enough so that it could be > shared across architectures. But perhaps some of that work has > happened in the meantime. > > But like I said, when you create the root bus, you can easily attach the > MSI chip to it. > > Thierry > -- Thanks! Yijing From mboxrd@z Thu Jan 1 00:00:00 1970 From: wangyijing@huawei.com (Yijing Wang) Date: Fri, 26 Sep 2014 11:42:23 +0800 Subject: [PATCH v2 00/22] Use MSI chip framework to configure MSI/MSI-X in all platforms In-Reply-To: <20140925164937.GB30382@ulmo> References: <1411614872-4009-1-git-send-email-wangyijing@huawei.com> <20140925074235.GN12423@ulmo> <20140925144855.GB31157@bart.dudau.co.uk> <20140925164937.GB30382@ulmo> Message-ID: <5424E09F.50701@huawei.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org >> I am actually in disagreement with you, Thierry. I don't like the general direction >> of the patches, or at least I don't like the fact that we don't have a portable >> way of setting up the msi_chip without having to rely on weak architectural hooks. > > Oh, good. That's actually one of the things I said I wasn't happy with > either. =) Hm, I decide to drop weak arch_find_msi_chip(), no one likes it. Let's find a better solution :) > >> I'm surprised no one considers the case of a platform having more than one host >> bridge and possibly more than one MSI unit. With the current proposed patchset I >> can't see how that would work. > > The PCI core can already deal with that. An MSI chip can be set per bus > and the weak pcibios_add_bus() can be used to set that. Often it might > not even be necessary to do it via pcibios_add_bus() if you create the > root bus directly, since you can attach the MSI chip at that time. Yes, PCI hostbridge driver find the matched msi chip during its initialization, and assign the msi chip to PCI bus in pcibios_add_bus(). > >> What I would like to see is a way of creating the pci_host_bridge structure outside >> the pci_create_root_bus(). That would then allow us to pass this sort of platform >> details like associated msi_chip into the host bridge and the child busses will >> have an easy way of finding the information needed by finding the root bus and then >> the host bridge structure. Then the generic pci_scan_root_bus() can be used by (mostly) >> everyone and the drivers can remove their kludges that try to work around the >> current limitations. So I think maybe save msi chip in PCI arch sysdata is a good candidate. > > I think both issues are orthogonal. Last time I checked a lot of work > was still necessary to unify host bridges enough so that it could be > shared across architectures. But perhaps some of that work has > happened in the meantime. > > But like I said, when you create the root bus, you can easily attach the > MSI chip to it. > > Thierry > -- Thanks! Yijing From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yijing Wang Date: Fri, 26 Sep 2014 03:42:23 +0000 Subject: Re: [PATCH v2 00/22] Use MSI chip framework to configure MSI/MSI-X in all platforms Message-Id: <5424E09F.50701@huawei.com> List-Id: References: <1411614872-4009-1-git-send-email-wangyijing@huawei.com> <20140925074235.GN12423@ulmo> <20140925144855.GB31157@bart.dudau.co.uk> <20140925164937.GB30382@ulmo> In-Reply-To: <20140925164937.GB30382@ulmo> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Thierry Reding , Liviu Dudau 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 , 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 , Lucas Stach , David Vrabel , Sergei Shtylyov , Michael Ellerman , Thomas Petazzoni >> I am actually in disagreement with you, Thierry. I don't like the general direction >> of the patches, or at least I don't like the fact that we don't have a portable >> way of setting up the msi_chip without having to rely on weak architectural hooks. > > Oh, good. That's actually one of the things I said I wasn't happy with > either. =) Hm, I decide to drop weak arch_find_msi_chip(), no one likes it. Let's find a better solution :) > >> I'm surprised no one considers the case of a platform having more than one host >> bridge and possibly more than one MSI unit. With the current proposed patchset I >> can't see how that would work. > > The PCI core can already deal with that. An MSI chip can be set per bus > and the weak pcibios_add_bus() can be used to set that. Often it might > not even be necessary to do it via pcibios_add_bus() if you create the > root bus directly, since you can attach the MSI chip at that time. Yes, PCI hostbridge driver find the matched msi chip during its initialization, and assign the msi chip to PCI bus in pcibios_add_bus(). > >> What I would like to see is a way of creating the pci_host_bridge structure outside >> the pci_create_root_bus(). That would then allow us to pass this sort of platform >> details like associated msi_chip into the host bridge and the child busses will >> have an easy way of finding the information needed by finding the root bus and then >> the host bridge structure. Then the generic pci_scan_root_bus() can be used by (mostly) >> everyone and the drivers can remove their kludges that try to work around the >> current limitations. So I think maybe save msi chip in PCI arch sysdata is a good candidate. > > I think both issues are orthogonal. Last time I checked a lot of work > was still necessary to unify host bridges enough so that it could be > shared across architectures. But perhaps some of that work has > happened in the meantime. > > But like I said, when you create the root bus, you can easily attach the > MSI chip to it. > > Thierry > -- Thanks! Yijing