On Monday 09 November 2015 18:57:39 Lorenzo Pieralisi wrote: > Commit b3a72384fe29 ("ARM/PCI: Replace pci_sys_data->align_resource > with global function pointer") removed the struct pci_sys_data > dependency from the ARM pcibios functions that are part of the > common ARM PCI arch back-end (eg pcibios_align_resource()), so that > struct pci_sys_data has now become data that is only used internally > by the ARM bios32 layer (ie pci_common_init_dev()) and by host > controllers drivers callbacks (eg pci_sys_data.setup) that rely on the > ARM bios32 API to probe. > > PCI host controller drivers that do not rely on ARM bios32 calls to > probe do not need to have the pci_bus.sysdata pointer field pointing > at a struct pci_sys_data anymore, therefore it can be removed from the > respective drivers data structures. > > This patch removes the pci_sys_data structures from the host > controller drivers that do not rely on ARM bios32 interface to > scan the PCI bus, completing the pci_sys_data clean-up and removing > the related dependency on arch/arm specific data. > > Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx> > Cc: Arnd Bergmann <arnd@xxxxxxxx> > Cc: Will Deacon <will.deacon@xxxxxxx> > Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx> > Cc: Rob Herring <robh@xxxxxxxxxx> > Nice! Acked-by: Arnd Bergmann <arnd@xxxxxxxx> On the downside, I just saw how b3a72384fe29 ("ARM/PCI: Replace pci_sys_data->align_resource with global function pointer") manages to get rid of the last user of this, and how this is not the way we had planned for it to be done. It doesn't matter that much, because there is only a single user of hw->align_resource, but this is now unportable code and cannot easily be separated from hw_pci. It also breaks if we ever get a machine with two different host controllers on ARM that don't use the same pointer here. I really would have hoped we could put that function pointer into 'struct pci_host_bridge' instead, and eventually killed off the architecture specific pcibios_align_resource function as well. Any idea why it was done with a global function pointer for ARM rather than a proper solution? Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html