From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] drivers: pci: host-generic: claim bus resources on PROBE_ONLY set-ups
Date: Mon, 23 Nov 2015 13:47:28 +0000 [thread overview]
Message-ID: <20151123134727.GA4236@arm.com> (raw)
In-Reply-To: <1447779838-15585-2-git-send-email-lorenzo.pieralisi@arm.com>
On Tue, Nov 17, 2015 at 05:03:57PM +0000, Lorenzo Pieralisi wrote:
> The PCI host generic driver does not reassign bus resources on systems
> that require the BARs set-up to be immutable (ie PROBE_ONLY) since
> that would trigger system failures. Nonetheless, PCI bus resources
> allocated to PCI bridge and devices must be claimed in order to be
> validated and inserted in the kernel resource tree, but the current
> driver omits the resources claiming and relies on arch specific kludges
> to prevent probing failure (ie preventing resources enablement on
> PROBE_ONLY systems).
>
> This patch adds code to the PCI host generic driver that correctly
> claims bus resources upon probe on systems that are required to
> prevent reassignment after bus enumeration, so that the allocated
> resources can be enabled successfully upon PCI device drivers probing,
> without resorting to arch back-ends workarounds.
>
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: David Daney <david.daney@cavium.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> ---
> drivers/pci/host/pci-host-generic.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
Assuming patch one is accepted, then this looks fine to me:
Acked-by: Will Deacon <will.deacon@arm.com>
Will
> diff --git a/drivers/pci/host/pci-host-generic.c b/drivers/pci/host/pci-host-generic.c
> index 5434c90..c62d13f 100644
> --- a/drivers/pci/host/pci-host-generic.c
> +++ b/drivers/pci/host/pci-host-generic.c
> @@ -261,7 +261,10 @@ static int gen_pci_probe(struct platform_device *pdev)
>
> pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci);
>
> - if (!pci_has_flag(PCI_PROBE_ONLY)) {
> +
> + if (pci_has_flag(PCI_PROBE_ONLY)) {
> + pci_bus_claim_resources(bus);
> + } else {
> pci_bus_size_bridges(bus);
> pci_bus_assign_resources(bus);
>
> --
> 2.5.1
>
next prev parent reply other threads:[~2015-11-23 13:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-17 17:03 [PATCH 1/3] drivers: pci: add generic code to claim bus resources Lorenzo Pieralisi
2015-11-17 17:03 ` [PATCH 2/3] drivers: pci: host-generic: claim bus resources on PROBE_ONLY set-ups Lorenzo Pieralisi
2015-11-23 13:47 ` Will Deacon [this message]
2015-11-17 17:03 ` [PATCH 3/3] arm/arm64: pci: remove arch specific pcibios_enable_device() Lorenzo Pieralisi
2015-11-23 13:49 ` Will Deacon
2016-01-20 16:22 ` Lorenzo Pieralisi
2016-02-25 15:24 ` Bjorn Helgaas
2016-02-25 16:05 ` Lorenzo Pieralisi
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=20151123134727.GA4236@arm.com \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).