From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lorenzo Pieralisi Subject: Re: [PATCH 00/20] PCI: fix config and I/O Address space memory mappings Date: Thu, 2 Mar 2017 18:00:57 +0000 Message-ID: <20170302180057.GA8094@red-moon> References: <20170227151436.18698-1-lorenzo.pieralisi@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-pci-owner@vger.kernel.org To: Arnd Bergmann Cc: linux-pci , Linux ARM , Linux Kernel Mailing List , linux-arch , Pratyush Anand , Jonathan Corbet , Will Deacon , Jingoo Han , Bjorn Helgaas , Mingkai Hu , Tanmay Inamdar , Murali Karicheri , Russell King , Bharat Kumar Gogada , Ray Jui , Wenrui Li , Shawn Lin , Minghuan Lian , Catalin Marinas List-Id: linux-arch.vger.kernel.org On Wed, Mar 01, 2017 at 05:18:27PM +0100, Arnd Bergmann wrote: > On Mon, Feb 27, 2017 at 4:14 PM, Lorenzo Pieralisi > wrote: > > > This patch series[1] addresses both issues in one go: > > > > - It updates the pci_remap_iospace() function to use a page mapping > > that guarantees non-posted write transactions for I/O space addresses > > - It adds a kernel API to remap PCI config space resources, so that > > architecture can override it with a mapping implementation that > > guarantees PCI specifications compliancy wrt non-posted write > > configuration transactions > > - It updates all PCI host controller implementations (and the generic > > ECAM layer) to use the newly introduced mapping interface > > > > Tested on Juno ECAM based interface (DT/ACPI). > > This looks all good to me, nice work! Thanks a lot Arnd. There is a pending issue to complete the series, that is related to asm-generic/io.h, which is not included by all arches, therefore, on top of adding a default inline for pci_remap_cfg_space() in asm-generic/io.h I will have to patch all arches that do not include asm-generic/io.h (eg x86) to make the series completely functional - ie I will have to add a #define pci_remap_cfgspace ioremap_nocache in every given asm/io.h that does not include Another option would consist in adding the default inline for pci_remap_cfg_space() in asm-generic/pci_iomap.h which seems to be included by all arches. I think the first option, even if it requires more extensive patching is more complete but please all let me know how you want me to fix this niggle, I am not sure I grasp the background policy behind asm-generic files entirely so I'd better ask. Thanks ! Lorenzo From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com ([217.140.101.70]:34702 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754905AbdCBSA6 (ORCPT ); Thu, 2 Mar 2017 13:00:58 -0500 Date: Thu, 2 Mar 2017 18:00:57 +0000 From: Lorenzo Pieralisi Subject: Re: [PATCH 00/20] PCI: fix config and I/O Address space memory mappings Message-ID: <20170302180057.GA8094@red-moon> References: <20170227151436.18698-1-lorenzo.pieralisi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-arch-owner@vger.kernel.org List-ID: To: Arnd Bergmann Cc: linux-pci , Linux ARM , Linux Kernel Mailing List , linux-arch , Pratyush Anand , Jonathan Corbet , Will Deacon , Jingoo Han , Bjorn Helgaas , Mingkai Hu , Tanmay Inamdar , Murali Karicheri , Russell King , Bharat Kumar Gogada , Ray Jui , Wenrui Li , Shawn Lin , Minghuan Lian , Catalin Marinas , Jon Mason , Gabriele Paoloni , Thomas Petazzoni , Joao Pinto , Thierry Reding , Michal Simek , Stanimir Varbanov , Zhou Wang , Roy Zang , John Garry Message-ID: <20170302180057.PPT-VMHBKJQjcV-sWe_puVxOIklcMMdjpPLN0mij6Qc@z> On Wed, Mar 01, 2017 at 05:18:27PM +0100, Arnd Bergmann wrote: > On Mon, Feb 27, 2017 at 4:14 PM, Lorenzo Pieralisi > wrote: > > > This patch series[1] addresses both issues in one go: > > > > - It updates the pci_remap_iospace() function to use a page mapping > > that guarantees non-posted write transactions for I/O space addresses > > - It adds a kernel API to remap PCI config space resources, so that > > architecture can override it with a mapping implementation that > > guarantees PCI specifications compliancy wrt non-posted write > > configuration transactions > > - It updates all PCI host controller implementations (and the generic > > ECAM layer) to use the newly introduced mapping interface > > > > Tested on Juno ECAM based interface (DT/ACPI). > > This looks all good to me, nice work! Thanks a lot Arnd. There is a pending issue to complete the series, that is related to asm-generic/io.h, which is not included by all arches, therefore, on top of adding a default inline for pci_remap_cfg_space() in asm-generic/io.h I will have to patch all arches that do not include asm-generic/io.h (eg x86) to make the series completely functional - ie I will have to add a #define pci_remap_cfgspace ioremap_nocache in every given asm/io.h that does not include Another option would consist in adding the default inline for pci_remap_cfg_space() in asm-generic/pci_iomap.h which seems to be included by all arches. I think the first option, even if it requires more extensive patching is more complete but please all let me know how you want me to fix this niggle, I am not sure I grasp the background policy behind asm-generic files entirely so I'd better ask. Thanks ! Lorenzo