Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1590797 > unrolled thread
| Started by | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| First post | 2017-03-02 03:10 +0100 |
| Last post | 2017-03-03 00:20 +0100 |
| Articles | 5 — 4 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 07/20] PCI: implement Devres interface to map PCI config space Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-03-02 03:10 +0100
Re: [PATCH 07/20] PCI: implement Devres interface to map PCI config space Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-03-02 13:10 +0100
Re: [PATCH 07/20] PCI: implement Devres interface to map PCI config space Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-03-02 14:30 +0100
Re: [PATCH 07/20] PCI: implement Devres interface to map PCI config space Thierry Reding <thierry.reding@gmail.com> - 2017-03-02 21:20 +0100
Re: [PATCH 07/20] PCI: implement Devres interface to map PCI config space Tejun Heo <tj@kernel.org> - 2017-03-03 00:20 +0100
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Date | 2017-03-02 03:10 +0100 |
| Subject | Re: [PATCH 07/20] PCI: implement Devres interface to map PCI config space |
| Message-ID | <tgolP-3FJ-5@gated-at.bofh.it> |
On Mon, Feb 27, 2017 at 5:14 PM, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> 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. 2. If you may notice there is no separate pcim_*map*() stuff, they are dynamically adapting to the case. ? -- With Best Regards, Andy Shevchenko
[toc] | [next] | [standalone]
| From | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> |
|---|---|
| Date | 2017-03-02 13:10 +0100 |
| Subject | Re: [PATCH 07/20] PCI: implement Devres interface to map PCI config space |
| Message-ID | <tgxIt-26H-1@gated-at.bofh.it> |
| In reply to | #1590797 |
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 > <lorenzo.pieralisi@arm.com> 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
[toc] | [prev] | [next] | [standalone]
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Date | 2017-03-02 14:30 +0100 |
| Message-ID | <tgyXU-2Pg-3@gated-at.bofh.it> |
| In reply to | #1591019 |
On Thu, Mar 2, 2017 at 2:05 PM, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> 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 >> <lorenzo.pieralisi@arm.com> 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
[toc] | [prev] | [next] | [standalone]
| From | Thierry Reding <thierry.reding@gmail.com> |
|---|---|
| Date | 2017-03-02 21:20 +0100 |
| Subject | Re: [PATCH 07/20] PCI: implement Devres interface to map PCI config space |
| Message-ID | <tgFmF-7nY-3@gated-at.bofh.it> |
| In reply to | #1591075 |
[Multipart message — attachments visible in raw view] — view raw
On Thu, Mar 02, 2017 at 02:24:06PM -0500, Tejun Heo wrote: > Hello, > > On Thu, Mar 02, 2017 at 02:50:00PM +0200, Andy Shevchenko wrote: > > > 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. > > Me too, for brevity. devm_* is equally brief. Also, all existing pcim_*() functions take a struct pci_dev * as their first argument, because they operate on the PCI devices. However in this case the devm_pci_remap_*() functions do not operate on PCI devices. Rather they operate on the struct device that represents the PCI host bridge. Therefore I think devm_ is more appropriate here. Thierry
[toc] | [prev] | [next] | [standalone]
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Date | 2017-03-03 00:20 +0100 |
| Subject | Re: [PATCH 07/20] PCI: implement Devres interface to map PCI config space |
| Message-ID | <tgFmF-7nY-5@gated-at.bofh.it> |
| In reply to | #1591075 |
Hello, On Thu, Mar 02, 2017 at 02:50:00PM +0200, Andy Shevchenko wrote: > > 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. Me too, for brevity. > >> 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. Sounds good to me. Thanks. -- tejun
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web