• Tomasz Nowicki's avatar
    arm64: PCI: Manage controller-specific data on per-controller basis · 093d24a2
    Tomasz Nowicki authored
    Currently we use one shared global acpi_pci_root_ops structure to keep
    controller-specific ops. We pass its pointer to acpi_pci_root_create() and
    associate it with a host bridge instance for good.  Such a design implies
    serious drawback. Any potential manipulation on the single system-wide
    acpi_pci_root_ops leads to kernel crash. The structure content is not
    really changing even across multiple host bridges creation; thus it was not
    an issue so far.
    
    In preparation for adding ECAM quirks mechanism (where controller-specific
    PCI ops may be different for each host bridge) allocate new
    acpi_pci_root_ops and fill in with data for each bridge. Now it is safe to
    have different controller-specific info. As a consequence free
    acpi_pci_root_ops when host bridge is released.
    
    No functional changes in this patch.
    Signed-off-by: default avatarTomasz Nowicki <tn@semihalf.com>
    Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    Acked-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    093d24a2
pci.c 5.23 KB