From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752846AbdCBNVO (ORCPT ); Thu, 2 Mar 2017 08:21:14 -0500 Received: from mail-qk0-f175.google.com ([209.85.220.175]:34823 "EHLO mail-qk0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750892AbdCBNVM (ORCPT ); Thu, 2 Mar 2017 08:21:12 -0500 MIME-Version: 1.0 In-Reply-To: <20170302120546.GB17277@red-moon> References: <20170227151436.18698-1-lorenzo.pieralisi@arm.com> <20170227151436.18698-8-lorenzo.pieralisi@arm.com> <20170302120546.GB17277@red-moon> From: Andy Shevchenko Date: Thu, 2 Mar 2017 14:50:00 +0200 Message-ID: Subject: Re: [PATCH 07/20] PCI: implement Devres interface to map PCI config space To: Lorenzo Pieralisi , Tejun Heo 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 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 2, 2017 at 2:05 PM, Lorenzo Pieralisi wrote: > 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: +Cc: Tejun, who is initial author of PCI managed resources implementation. > 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. I would vote for pcim_*() variant. >> 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. Oh, sorry, there are two examples currently, i.e. pci_enable_msi()/pci_enable_msix() and pci_request_region*() which has no "m" in the name, but are managed on release by pcim_release(). Some developers consider this as a bad idea, but so far no patch has been sent to introduce pcim_*() variants of those. So, regarding to your stuff, I would stick with "pcim" prefix. -- With Best Regards, Andy Shevchenko From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: MIME-Version: 1.0 In-Reply-To: <20170302120546.GB17277@red-moon> References: <20170227151436.18698-1-lorenzo.pieralisi@arm.com> <20170227151436.18698-8-lorenzo.pieralisi@arm.com> <20170302120546.GB17277@red-moon> From: Andy Shevchenko Date: Thu, 2 Mar 2017 14:50:00 +0200 Message-ID: Subject: Re: [PATCH 07/20] PCI: implement Devres interface to map PCI config space To: Lorenzo Pieralisi , Tejun Heo List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wenrui Li , Gabriele Paoloni , "linux-pci@vger.kernel.org" , Shawn Lin , Will Deacon , Michal Simek , Thierry Reding , Tanmay Inamdar , Linux-Arch , Joao Pinto , Jonathan Corbet , Pratyush Anand , Russell King , Jon Mason , Murali Karicheri , Catalin Marinas , Arnd Bergmann , Bharat Kumar Gogada , Ray Jui , John Garry , Bjorn Helgaas , Mingkai Hu , linux-arm Mailing List , Thomas Petazzoni , Jingoo Han , "linux-kernel@vger.kernel.org" , Stanimir Varbanov , Minghuan Lian , Zhou Wang , Roy Zang Content-Type: text/plain; charset="us-ascii" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+bjorn=helgaas.com@lists.infradead.org List-ID: On Thu, Mar 2, 2017 at 2:05 PM, Lorenzo Pieralisi wrote: > 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: +Cc: Tejun, who is initial author of PCI managed resources implementation. > 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. I would vote for pcim_*() variant. >> 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. Oh, sorry, there are two examples currently, i.e. pci_enable_msi()/pci_enable_msix() and pci_request_region*() which has no "m" in the name, but are managed on release by pcim_release(). Some developers consider this as a bad idea, but so far no patch has been sent to introduce pcim_*() variants of those. So, regarding to your stuff, I would stick with "pcim" prefix. -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Subject: Re: [PATCH 07/20] PCI: implement Devres interface to map PCI config space Date: Thu, 2 Mar 2017 14:50:00 +0200 Message-ID: References: <20170227151436.18698-1-lorenzo.pieralisi@arm.com> <20170227151436.18698-8-lorenzo.pieralisi@arm.com> <20170302120546.GB17277@red-moon> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20170302120546.GB17277@red-moon> 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 , Tejun Heo Cc: Wenrui Li , Gabriele Paoloni , "linux-pci@vger.kernel.org" , Shawn Lin , Will Deacon , Michal Simek , Thierry Reding , Tanmay Inamdar , Linux-Arch , Joao Pinto , Jonathan Corbet , Pratyush Anand , Russell King , Jon Mason , Murali Karicheri , Catalin Marinas , Arnd Bergmann , Bharat Kumar Gogada , Ray Jui , John Garry , Bjorn Helgaas , Mingkai Hu , linux-arm List-Id: linux-arch.vger.kernel.org On Thu, Mar 2, 2017 at 2:05 PM, Lorenzo Pieralisi wrote: > 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: +Cc: Tejun, who is initial author of PCI managed resources implementation. > 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. I would vote for pcim_*() variant. >> 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. Oh, sorry, there are two examples currently, i.e. pci_enable_msi()/pci_enable_msix() and pci_request_region*() which has no "m" in the name, but are managed on release by pcim_release(). Some developers consider this as a bad idea, but so far no patch has been sent to introduce pcim_*() variants of those. So, regarding to your stuff, I would stick with "pcim" prefix. -- With Best Regards, Andy Shevchenko From mboxrd@z Thu Jan 1 00:00:00 1970 From: andy.shevchenko@gmail.com (Andy Shevchenko) Date: Thu, 2 Mar 2017 14:50:00 +0200 Subject: [PATCH 07/20] PCI: implement Devres interface to map PCI config space In-Reply-To: <20170302120546.GB17277@red-moon> References: <20170227151436.18698-1-lorenzo.pieralisi@arm.com> <20170227151436.18698-8-lorenzo.pieralisi@arm.com> <20170302120546.GB17277@red-moon> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Mar 2, 2017 at 2:05 PM, Lorenzo Pieralisi wrote: > 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: +Cc: Tejun, who is initial author of PCI managed resources implementation. > 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. I would vote for pcim_*() variant. >> 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. Oh, sorry, there are two examples currently, i.e. pci_enable_msi()/pci_enable_msix() and pci_request_region*() which has no "m" in the name, but are managed on release by pcim_release(). Some developers consider this as a bad idea, but so far no patch has been sent to introduce pcim_*() variants of those. So, regarding to your stuff, I would stick with "pcim" prefix. -- With Best Regards, Andy Shevchenko