Skip to content

arm64: acpi/pci: allow the firmware BAR configuration to be preserved

Lorenzo Pieralisi linux-arm-kernel linux-pci 1 version New

Get series with b4
b4 am 20170612165525.GB32131@red-moon

Versions newest first

  1. v1 Latest0 of 2 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 2 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] arm64: acpi/pci: allow the firmware BAR configuration to be preserved
Quoted 45 lines · Ard Biesheuvel
Quoted 9 lines · Lorenzo Pieralisi

On Tue, Jun 06, 2017 at 09:14:26AM +0000, Ard Biesheuvel wrote:

[...]

Quoted 5 lines
Quoted 4 lines

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 !

Quoted 9 lines
Quoted 5 lines

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

"""

arch/arm64/kernel/pci.c +3 -0
index c7e3e6387a49..9a529c6369ac 100644
@@ -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])

Quoted 6 lines

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.

Quoted 3 lines

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