aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm
diff options
context:
space:
mode:
authorGavin Shan <shangw@linux.vnet.ibm.com>2012-09-07 18:44:12 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-09-09 19:35:32 -0400
commit5b6635294418a954b5f911375b86d3552cf93f36 (patch)
tree1847cd93abadbc9dddec44de701c7d668c0c53bb /arch/powerpc/include/asm
parentc533b46cc7da58e5ccbd20ac2f607ff60d24eb4e (diff)
powerpc/eeh: Trace EEH state based on PE
Since we've introduced dedicated struct to trace individual PEs, it's reasonable to trace its state through the dedicated struct instead of using "eeh_dev" any more. The patches implements the state tracing based on PE. It's notable that the PE state will be applied to the specified PE as well as its child PEs. That complies with the rule that problematic parent PE will prevent those child PEs from working properly. Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r--arch/powerpc/include/asm/eeh.h3
-rw-r--r--arch/powerpc/include/asm/ppc-pci.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h
index 250ae2718bb8..f86a85f5f049 100644
--- a/arch/powerpc/include/asm/eeh.h
+++ b/arch/powerpc/include/asm/eeh.h
@@ -67,6 +67,9 @@ struct eeh_pe {
67 struct list_head child; /* Child PEs */ 67 struct list_head child; /* Child PEs */
68}; 68};
69 69
70#define eeh_pe_for_each_dev(pe, edev) \
71 list_for_each_entry(edev, &pe->edevs, list)
72
70/* 73/*
71 * The struct is used to trace EEH state for the associated 74 * The struct is used to trace EEH state for the associated
72 * PCI device node or PCI device. In future, it might 75 * PCI device node or PCI device. In future, it might
diff --git a/arch/powerpc/include/asm/ppc-pci.h b/arch/powerpc/include/asm/ppc-pci.h
index 80fa704d410f..c7e5bd60bca1 100644
--- a/arch/powerpc/include/asm/ppc-pci.h
+++ b/arch/powerpc/include/asm/ppc-pci.h
@@ -57,8 +57,8 @@ int eeh_reset_pe(struct eeh_dev *);
57void eeh_restore_bars(struct eeh_dev *); 57void eeh_restore_bars(struct eeh_dev *);
58int rtas_write_config(struct pci_dn *, int where, int size, u32 val); 58int rtas_write_config(struct pci_dn *, int where, int size, u32 val);
59int rtas_read_config(struct pci_dn *, int where, int size, u32 *val); 59int rtas_read_config(struct pci_dn *, int where, int size, u32 *val);
60void eeh_mark_slot(struct device_node *dn, int mode_flag); 60void eeh_pe_state_mark(struct eeh_pe *pe, int state);
61void eeh_clear_slot(struct device_node *dn, int mode_flag); 61void eeh_pe_state_clear(struct eeh_pe *pe, int state);
62struct device_node *eeh_find_device_pe(struct device_node *dn); 62struct device_node *eeh_find_device_pe(struct device_node *dn);
63 63
64void eeh_sysfs_add_device(struct pci_dev *pdev); 64void eeh_sysfs_add_device(struct pci_dev *pdev);