Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

Pull powerpc fixes from Ben Herrenschmidt:
"We discovered some breakage in our "EEH" (PCI Error Handling) code
while doing error injection, due to a couple of regressions. One of
them is due to a patch (37f02195bee9 "powerpc/pci: fix PCI-e devices
rescan issue on powerpc platform") that, in hindsight, I shouldn't
have merged considering that it caused more problems than it solved.

Please pull those two fixes. One for a simple EEH address cache
initialization issue. The other one is a patch from Guenter that I
had originally planned to put in 3.11 but which happens to also fix
that other regression (a kernel oops during EEH error handling and
possibly hotplug).

With those two, the couple of test machines I've hammered with error
injection are remaining up now. EEH appears to still fail to recover
on some devices, so there is another problem that Gavin is looking
into but at least it's no longer crashing the kernel."

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc/pci: Improve device hotplug initialization
powerpc/eeh: Add eeh_dev to the cache during boot

Changed files
+14 -7
arch
powerpc
kernel
platforms
pseries
+12 -5
arch/powerpc/kernel/pci-common.c
··· 994 994 ppc_md.pci_dma_bus_setup(bus); 995 995 } 996 996 997 - void pcibios_setup_device(struct pci_dev *dev) 997 + static void pcibios_setup_device(struct pci_dev *dev) 998 998 { 999 999 /* Fixup NUMA node as it may not be setup yet by the generic 1000 1000 * code and is needed by the DMA init ··· 1013 1013 pci_read_irq_line(dev); 1014 1014 if (ppc_md.pci_irq_fixup) 1015 1015 ppc_md.pci_irq_fixup(dev); 1016 + } 1017 + 1018 + int pcibios_add_device(struct pci_dev *dev) 1019 + { 1020 + /* 1021 + * We can only call pcibios_setup_device() after bus setup is complete, 1022 + * since some of the platform specific DMA setup code depends on it. 1023 + */ 1024 + if (dev->bus->is_added) 1025 + pcibios_setup_device(dev); 1026 + return 0; 1016 1027 } 1017 1028 1018 1029 void pcibios_setup_bus_devices(struct pci_bus *bus) ··· 1479 1468 if (ppc_md.pcibios_enable_device_hook) 1480 1469 if (ppc_md.pcibios_enable_device_hook(dev)) 1481 1470 return -EINVAL; 1482 - 1483 - /* avoid pcie irq fix up impact on cardbus */ 1484 - if (dev->hdr_type != PCI_HEADER_TYPE_CARDBUS) 1485 - pcibios_setup_device(dev); 1486 1471 1487 1472 return pci_enable_resources(dev, mask); 1488 1473 }
+2 -2
arch/powerpc/platforms/pseries/eeh_cache.c
··· 294 294 spin_lock_init(&pci_io_addr_cache_root.piar_lock); 295 295 296 296 for_each_pci_dev(dev) { 297 - eeh_addr_cache_insert_dev(dev); 298 - 299 297 dn = pci_device_to_OF_node(dev); 300 298 if (!dn) 301 299 continue; ··· 305 307 pci_dev_get(dev); /* matching put is in eeh_remove_device() */ 306 308 dev->dev.archdata.edev = edev; 307 309 edev->pdev = dev; 310 + 311 + eeh_addr_cache_insert_dev(dev); 308 312 309 313 eeh_sysfs_add_device(dev); 310 314 }