From: lorenzo.pieralisi@arm.com (Lorenzo Pieralisi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/2] arm64: acpi/pci: allow the firmware BAR configuration to be preserved
Date: Mon, 12 Jun 2017 17:55:25 +0100 [thread overview]
Message-ID: <20170612165525.GB32131@red-moon> (raw)
In-Reply-To: <CAKv+Gu9EffaBNW=8mM-xd+bFvWetds7LTsX1cc81Q=X1hwk39Q@mail.gmail.com>
On Wed, Jun 07, 2017 at 01:45:19PM +0000, Ard Biesheuvel wrote:
> On 6 June 2017 at 10:02, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> wrote:
> > On Tue, Jun 06, 2017 at 09:14:26AM +0000, Ard Biesheuvel wrote:
> >
> > [...]
> >
> >> > Do you want me to create a branch out of these patches (inclusive of
> >> > another patch to fix this bus reallocation policy discrepancy) for
> >> > ARM64 folks to test ? Let me know, thanks !
> >> >
> >>
> >> Hi Lorenzo,
> >>
> >> Bjorn has already picked up #1, which is now in -next. I will get back
> >> to this topic today or tomorrow, so let me respin (including the bus
> >> range fix) first, ok?
> >
> > Of course, I just want to help you make progress on this, I think
> > we need help for testing them on ARM64 systems to see how to proceed.
> >
>
> OK, so I am hitting another issue. While it is quite simple to do this
>
> """
> diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
> index c7e3e6387a49..9a529c6369ac 100644
> --- a/arch/arm64/kernel/pci.c
> +++ b/arch/arm64/kernel/pci.c
> @@ -203,6 +203,9 @@
> return NULL;
> }
>
> + /* ignore bus ranges assigned by the firmware */
> + pci_add_flags(PCI_REASSIGN_ALL_BUS);
> +
> root_ops->release_info = pci_acpi_generic_release_info;
> root_ops->prepare_resources = pci_acpi_root_prepare_resources;
> root_ops->pci_ops = &ri->cfg->ops->pci_ops;
> """
>
> and get the ACPI code to behave in the same way as the DT code,
> including the resulting quirks, i.e.
>
> pci_bus 0000:01: busn_res: can not insert [bus 01-ff] under [bus
> 00-0f] (conflicts with (null) [bus 00-0f])
>
> there are two problems when we want to refine this to take _DSM #5 into account.
>
> 1) PCI_REASSIGN_ALL_BUS is a global flag, while _DSM is per PCI root
> 2) setting the flag conditionally on whether _DSM #5 allows it is
> difficult to achieve, given that the flag needs to be set before
> acpi_pci_root_create(), at which point we cannot access the _DSM yet
(2) Why ? You have the ACPI root bridge handle at that point. Anyway
(1) makes (2) irrelevant unfortunately.
> So I can send out the above as a separate patch, but right now, I am
> not entirely sure how to proceed with conditionally preserving the
> firmware configuration.
Yes, this definitely requires some focus because that's becoming a bit
unwieldy to manage consistently, I will look into this.
Thanks !
Lorenzo
next prev parent reply other threads:[~2017-06-12 16:55 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-11 16:33 [PATCH 0/2] arm64: acpi/pci: allow the firmware BAR configuration to be preserved Ard Biesheuvel
2017-04-11 16:33 ` [PATCH 1/2] drivers: pci: do not disregard parent resources starting at 0x0 Ard Biesheuvel
2017-04-11 18:30 ` Ard Biesheuvel
2017-04-12 13:24 ` Lorenzo Pieralisi
2017-04-13 7:39 ` Ard Biesheuvel
2017-04-13 9:42 ` Lorenzo Pieralisi
2017-04-11 16:33 ` [PATCH 2/2] arm64: acpi/pci: invoke _DSM whether to preserve firmware PCI setup Ard Biesheuvel
2017-04-12 17:26 ` Lorenzo Pieralisi
2017-04-12 18:03 ` Sinan Kaya
2017-05-17 21:53 ` Bjorn Helgaas
2017-05-17 21:56 ` [PATCH 0/2] arm64: acpi/pci: allow the firmware BAR configuration to be preserved Bjorn Helgaas
2017-05-18 10:59 ` Ard Biesheuvel
2017-05-18 14:05 ` Bjorn Helgaas
2017-05-18 15:10 ` Ard Biesheuvel
2017-05-18 15:47 ` Lorenzo Pieralisi
2017-05-18 16:51 ` Ard Biesheuvel
2017-05-18 17:46 ` Lorenzo Pieralisi
2017-06-01 15:04 ` Ard Biesheuvel
2017-06-01 16:15 ` Lorenzo Pieralisi
2017-06-01 16:18 ` Ard Biesheuvel
2017-06-01 17:38 ` Lorenzo Pieralisi
2017-06-06 8:59 ` Lorenzo Pieralisi
2017-06-06 9:14 ` Ard Biesheuvel
2017-06-06 10:02 ` Lorenzo Pieralisi
2017-06-07 13:45 ` Ard Biesheuvel
2017-06-12 16:55 ` Lorenzo Pieralisi [this message]
2017-06-12 17:00 ` Ard Biesheuvel
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=20170612165525.GB32131@red-moon \
--to=lorenzo.pieralisi@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).