From: wangyijing@huawei•com (wangyijing)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v1 00/25] PCI: Request host bridge window resources
Date: Wed, 22 Jun 2016 09:07:57 +0800 [thread overview]
Message-ID: <5769E4ED.4050904@huawei.com> (raw)
In-Reply-To: <20160621150352.GB31917@localhost>
? 2016/6/21 23:03, Bjorn Helgaas ??:
> On Tue, Jun 21, 2016 at 07:58:08PM +0800, wangyijing wrote:
>> Hi Bjorn, use devm_request_resource() for host bridge resource is cool,
>> what about do the similar change for x86, now we request host bridge resource
>> in pci_acpi_root_add_resources() in x86, and we would release the host bridge
>> resource when host bridge device refcount reach 0. This logic may introduce issue,
>> E.g.
>> If we try to remove a pci host bridge, but there is a child pci device which refcount
>> cannot decrease to 0 after remove the device, in this case, its parent pci_bus and
>> parent device, all their refcount cannot reach to 0, the result is pci host bridge
>> refcount can not reach 0, so its .release_fn() won't be called, and host bridge
>> resouces can not release. If we want to add the pci host bridge again, all pci devices
>> can not work because the resource is conflict with the old.
>>
>> devm resource would be released when the driver detach, this is better than what we do now, I think.
>
> I'm not going to convert pci_root.c to use devm right now. That might
> be a good thing, but this current series is mostly trivial. I think
> changing pci_root.c would not be trivial, so that looks like a project
> all by itself.
OK.
>
> I don't quite follow the example of removing a host bridge while a
> child PCI device refcount is non-zero. That sounds like an invalid
> scenario regardless of whether the resources are released by a
> .release_fn() or by devm.
I would send a draft patch to describe and fix the issue, because it's not related to
this series, so let's discuess it in another thread. :)
Thanks!
Yijing.
>
> Bjorn
>
> .
>
next prev parent reply other threads:[~2016-06-22 1:07 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-06 23:04 [PATCH v1 00/25] PCI: Request host bridge window resources Bjorn Helgaas
2016-06-06 23:04 ` [PATCH v1 01/25] PCI: Add devm_request_pci_bus_resources() Bjorn Helgaas
2016-06-06 23:05 ` [PATCH v1 02/25] PCI: designware: Free bridge resource list on failure Bjorn Helgaas
2016-06-06 23:05 ` [PATCH v1 03/25] PCI: designware: Request host bridge window resources Bjorn Helgaas
2016-06-06 23:05 ` [PATCH v1 04/25] PCI: designware: Simplify host bridge window iteration Bjorn Helgaas
2016-06-06 23:05 ` [PATCH v1 05/25] PCI: iproc: Request host bridge window resources Bjorn Helgaas
2016-06-06 23:05 ` [PATCH v1 06/25] PCI: xgene: Free bridge resource list on failure Bjorn Helgaas
2016-06-06 23:05 ` [PATCH v1 07/25] PCI: xgene: Request host bridge window resources Bjorn Helgaas
2016-06-06 23:05 ` [PATCH v1 08/25] PCI: xilinx: Free bridge resource list on failure Bjorn Helgaas
2016-06-06 23:05 ` [PATCH v1 09/25] PCI: xilinx: Request host bridge window resources Bjorn Helgaas
2016-06-06 23:05 ` [PATCH v1 10/25] PCI: xilinx-nwl: Free bridge resource list on failure Bjorn Helgaas
2016-06-06 23:06 ` [PATCH v1 11/25] PCI: xilinx-nwl: Request host bridge window resources Bjorn Helgaas
2016-06-06 23:06 ` [PATCH v1 12/25] PCI: xilinx-nwl: Use dev_printk() when possible Bjorn Helgaas
2016-06-06 23:06 ` [PATCH v1 13/25] PCI: altera: Request host bridge window resources with core function Bjorn Helgaas
2016-06-06 23:06 ` [PATCH v1 14/25] PCI: altera: Simplify host bridge window iteration Bjorn Helgaas
2016-06-06 23:06 ` [PATCH v1 15/25] PCI: generic: Free resource list close to where it's allocated Bjorn Helgaas
2016-06-20 16:56 ` Tyler Baker
2016-06-20 17:22 ` Lorenzo Pieralisi
2016-06-21 15:14 ` Bjorn Helgaas
2016-06-06 23:06 ` [PATCH v1 16/25] PCI: generic: Request host bridge window resources with core function Bjorn Helgaas
2016-06-06 23:06 ` [PATCH v1 17/25] PCI: generic: Simplify host bridge window iteration Bjorn Helgaas
2016-06-06 23:06 ` [PATCH v1 18/25] PCI: mvebu: Request host bridge window resources with core function Bjorn Helgaas
2016-06-06 23:07 ` [PATCH v1 19/25] PCI: rcar Gen2: Request host bridge window resources Bjorn Helgaas
2016-06-21 10:41 ` Geert Uytterhoeven
2016-06-21 14:26 ` Bjorn Helgaas
2016-06-21 15:41 ` Valentine Barshak
2016-06-21 16:49 ` Bjorn Helgaas
2016-06-24 14:19 ` Geert Uytterhoeven
2016-06-06 23:07 ` [PATCH v1 20/25] PCI: rcar: Request host bridge window resources with core function Bjorn Helgaas
2016-06-06 23:07 ` [PATCH v1 21/25] PCI: rcar: Simplify host bridge window iteration Bjorn Helgaas
2016-06-06 23:07 ` [PATCH v1 22/25] PCI: tegra: Remove top-level resource from hierarchy Bjorn Helgaas
2016-06-06 23:07 ` [PATCH v1 23/25] PCI: tegra: Request host bridge window resources with core function Bjorn Helgaas
2016-06-06 23:07 ` [PATCH v1 24/25] PCI: versatile: " Bjorn Helgaas
2016-06-06 23:07 ` [PATCH v1 25/25] PCI: versatile: Simplify host bridge window iteration Bjorn Helgaas
2016-06-07 8:21 ` [PATCH v1 00/25] PCI: Request host bridge window resources Arnd Bergmann
2016-06-07 13:11 ` Bjorn Helgaas
2016-06-07 13:25 ` Arnd Bergmann
2016-06-07 23:34 ` Bjorn Helgaas
2016-06-18 17:58 ` Bjorn Helgaas
2016-06-18 18:07 ` Bjorn Helgaas
2016-06-21 11:58 ` wangyijing
2016-06-21 15:03 ` Bjorn Helgaas
2016-06-22 1:07 ` wangyijing [this message]
2016-07-05 4:37 ` Duc Dang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5769E4ED.4050904@huawei.com \
--to=wangyijing@huawei$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox