The arm64 pcibios_enable_device() implementation exists solely to prevent enabling PCI resources on PCI_PROBE_ONLY systems, since on those systems the PCI resources are currently not claimed (ie inserted in the PCI resource tree - which means their parent pointer is not correctly set-up) therefore they can not be enabled since this would trigger PCI set-ups failures. By introducing resources claiming in the PCI host controllers set-ups that have PCI_PROBE_ONLY as a probe option, there is no need for arch specific pcibios_enable_device() implementations anymore in that the kernel can rely on the generic pcibios_enable_device() implementation without resorting to arch specific code to work around the missing resources claiming enumeration step. On !PCI_PROBE_ONLY PCI bus set-ups, resources are always assigned in the PCI host controllers drivers; since the PCI resource assignment API takes care of inserting the assigned resources in the resource tree, the resources parent pointer is correctly set-up, which means that this patch leaves behaviour unchanged for all arm64 PCI set-ups that do not set the PCI_PROBE_ONLY flag. Remove the pcibios_enable_device() function from the arm64 arch back-end so that the kernel now uses its generic implementation. Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx> Acked-by: Will Deacon <will.deacon@xxxxxxx> Cc: Arnd Bergmann <arnd@xxxxxxxx> Cc: Will Deacon <will.deacon@xxxxxxx> Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx> Cc: Catalin Marinas <catalin.marinas@xxxxxxx> --- arch/arm64/kernel/pci.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c index 3c4e308..39cfa03 100644 --- a/arch/arm64/kernel/pci.c +++ b/arch/arm64/kernel/pci.c @@ -36,19 +36,6 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res, return res->start; } -/** - * pcibios_enable_device - Enable I/O and memory. - * @dev: PCI device to be enabled - * @mask: bitmask of BARs to enable - */ -int pcibios_enable_device(struct pci_dev *dev, int mask) -{ - if (pci_has_flag(PCI_PROBE_ONLY)) - return 0; - - return pci_enable_resources(dev, mask); -} - /* * Try to assign the IRQ number from DT when adding a new device */ -- 2.6.4 -- 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