Skip to content

Commit

Permalink
powerpc/eeh: Add eeh_dev to the cache during boot
Browse files Browse the repository at this point in the history
commit f8f7d63 ("powerpc/eeh: Trace eeh
device from I/O cache") broke EEH on pseries for devices that were
present during boot and have not been hotplugged/DLPARed.

eeh_check_failure will get the eeh_dev from the cache, and will get
NULL. eeh_addr_cache_build adds the addresses to the cache, but eeh_dev
for the giving pci_device is not set yet. Just reordering the call to
eeh_addr_cache_insert_dev works fine. The ordering is similar to the one
in eeh_add_device_late.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Acked-by: Gavin Shan <[email protected]>
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
  • Loading branch information
Thadeu Lima de Souza Cascardo authored and ozbenh committed Jun 28, 2013
1 parent b37e161 commit 1abd601
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/powerpc/platforms/pseries/eeh_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,6 @@ void __init eeh_addr_cache_build(void)
spin_lock_init(&pci_io_addr_cache_root.piar_lock);

for_each_pci_dev(dev) {
eeh_addr_cache_insert_dev(dev);

dn = pci_device_to_OF_node(dev);
if (!dn)
continue;
Expand All @@ -308,6 +306,8 @@ void __init eeh_addr_cache_build(void)
dev->dev.archdata.edev = edev;
edev->pdev = dev;

eeh_addr_cache_insert_dev(dev);

eeh_sysfs_add_device(dev);
}

Expand Down

0 comments on commit 1abd601

Please sign in to comment.