From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752432AbdCBMJT (ORCPT ); Thu, 2 Mar 2017 07:09:19 -0500 Received: from foss.arm.com ([217.140.101.70]:58640 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750892AbdCBMJQ (ORCPT ); Thu, 2 Mar 2017 07:09:16 -0500 Date: Thu, 2 Mar 2017 12:05:46 +0000 From: Lorenzo Pieralisi To: Andy Shevchenko Cc: "linux-pci@vger.kernel.org" , linux-arm Mailing List , "linux-kernel@vger.kernel.org" , Linux-Arch , Jonathan Corbet , Bjorn Helgaas , Arnd Bergmann , Will Deacon , Catalin Marinas , Russell King , Pratyush Anand , Jingoo Han , 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 Subject: Re: [PATCH 07/20] PCI: implement Devres interface to map PCI config space Message-ID: <20170302120546.GB17277@red-moon> References: <20170227151436.18698-1-lorenzo.pieralisi@arm.com> <20170227151436.18698-8-lorenzo.pieralisi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy, On Thu, Mar 02, 2017 at 01:54:42AM +0200, Andy Shevchenko wrote: > On Mon, Feb 27, 2017 at 5:14 PM, Lorenzo Pieralisi > wrote: > > The introduction of the pci_remap_cfgspace() interface allows > > PCI host controller drivers to map PCI config space through a > > dedicated kernel interface. Current PCI host controller drivers > > use the devm_ioremap_* Devres interfaces to map PCI configuration > > space regions so in order to update them to the new > > pci_remap_cfgspace() mapping interface a new set of Devres interfaces > > should be implemented so that PCI host controller drivers can make > > use of them. > > > > Introduce two new functions in the PCI kernel layer and Devres > > documentation: > > > > - devm_pci_remap_cfgspace() > > - devm_pci_remap_cfg_resource() > > > > so that PCI host controller drivers can make use of them to map > > PCI configuration space regions. > > Wouldn't you like to be consistent with current PCI API, i.e.: > 1. devm_*() functions called pcim_*() in PCI. I thought about that and did not do it because here we are remapping resources that are _not_ PCI bus resources (ie it is not PCI BARs we are remapping), keeping the devm_* prefix would be more consistent to the typical device drivers remapping functions pattern (ie a typical PCI host controller driver would mix devm_ and pcim_ calls which is a bit hard to parse), that was my rationale. I am not too fussed about that either way, I am happy to update it to pcim_* though, it is Bjorn/Arnd's decision. > 2. If you may notice there is no separate pcim_*map*() stuff, they are > dynamically adapting to the case. I do not understand what you mean here I would ask you to elaborate a bit more please so that I can do something about it. Thanks ! Lorenzo