From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King - ARM Linux Subject: Re: [PATCH 05/20] ARM: implement pci_remap_cfgspace() interface Date: Mon, 20 Mar 2017 16:43:55 +0000 Message-ID: <20170320164354.GQ21222@n2100.armlinux.org.uk> References: <20170227151436.18698-1-lorenzo.pieralisi@arm.com> <20170227151436.18698-6-lorenzo.pieralisi@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20170227151436.18698-6-lorenzo.pieralisi@arm.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: Lorenzo Pieralisi Cc: Wenrui Li , Gabriele Paoloni , linux-pci@vger.kernel.org, Shawn Lin , Will Deacon , Thierry Reding , Tanmay Inamdar , linux-arch@vger.kernel.org, Joao Pinto , Pratyush Anand , Michal Simek , Jon Mason , Murali Karicheri , Catalin Marinas , Arnd Bergmann , Bharat Kumar Gogada , Ray Jui , John Garry , Bjorn Helgaas , Mingkai Hu , linux-arm-kernel@lists.infradead.org, Thomas Petazzoni , Jingoo Han List-Id: linux-arch.vger.kernel.org On Mon, Feb 27, 2017 at 03:14:16PM +0000, Lorenzo Pieralisi wrote: > The PCI bus specifications (rev 3.0, 3.2.5 "Transaction Ordering > and Posting") define rules for PCI configuration space transactions > ordering and posting, that state that configuration writes have to > be non-posted transactions. > > Current ioremap interface on ARM provides mapping functions that > provide "bufferable" writes transactions (ie ioremap uses MT_DEVICE > memory type) aka posted writes, so PCI host controller drivers have > no arch interface to remap PCI configuration space with memory > attributes that comply with the PCI specifications for configuration > space. > > Implement an ARM specific pci_remap_cfgspace() interface that allows to > map PCI config memory regions with MT_UNCACHED memory type (ie strongly > ordered - non-posted writes), providing a remap function that complies > with PCI specifications for config space transactions. Doesn't this have the side effect that configuration writes can bypass writes to device memory if there isn't an intervening dsb? (They probably can do on some CPUs today anyway.) So, in any case, this looks like an improvement: Acked-by: Russell King Thanks. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from pandora.armlinux.org.uk ([78.32.30.218]:36944 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756047AbdCTQub (ORCPT ); Mon, 20 Mar 2017 12:50:31 -0400 Date: Mon, 20 Mar 2017 16:43:55 +0000 From: Russell King - ARM Linux Subject: Re: [PATCH 05/20] ARM: implement pci_remap_cfgspace() interface Message-ID: <20170320164354.GQ21222@n2100.armlinux.org.uk> References: <20170227151436.18698-1-lorenzo.pieralisi@arm.com> <20170227151436.18698-6-lorenzo.pieralisi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170227151436.18698-6-lorenzo.pieralisi@arm.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Lorenzo Pieralisi Cc: linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Arnd Bergmann , Will Deacon , Catalin Marinas , Pratyush Anand , Jingoo Han , Bjorn Helgaas , Mingkai Hu , John Garry , Tanmay Inamdar , Murali Karicheri , Bharat Kumar Gogada , Ray Jui , Wenrui Li , Shawn Lin , Minghuan Lian , Jon Mason , Gabriele Paoloni , Thomas Petazzoni , Joao Pinto , Thierry Reding , Michal Simek , Stanimir Varbanov , Zhou Wang , Roy Zang Message-ID: <20170320164355.RcfAvE1dzsdRw81so1WU-DfMLltpiBgCQCTyqrfpYFk@z> On Mon, Feb 27, 2017 at 03:14:16PM +0000, Lorenzo Pieralisi wrote: > The PCI bus specifications (rev 3.0, 3.2.5 "Transaction Ordering > and Posting") define rules for PCI configuration space transactions > ordering and posting, that state that configuration writes have to > be non-posted transactions. > > Current ioremap interface on ARM provides mapping functions that > provide "bufferable" writes transactions (ie ioremap uses MT_DEVICE > memory type) aka posted writes, so PCI host controller drivers have > no arch interface to remap PCI configuration space with memory > attributes that comply with the PCI specifications for configuration > space. > > Implement an ARM specific pci_remap_cfgspace() interface that allows to > map PCI config memory regions with MT_UNCACHED memory type (ie strongly > ordered - non-posted writes), providing a remap function that complies > with PCI specifications for config space transactions. Doesn't this have the side effect that configuration writes can bypass writes to device memory if there isn't an intervening dsb? (They probably can do on some CPUs today anyway.) So, in any case, this looks like an improvement: Acked-by: Russell King Thanks. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.