diff options
author | Gavin Shan <shangw@linux.vnet.ibm.com> | 2012-09-08 00:44:12 +0200 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-09-10 01:35:32 +0200 |
commit | 5b6635294418a954b5f911375b86d3552cf93f36 (patch) | |
tree | 1847cd93abadbc9dddec44de701c7d668c0c53bb /arch/powerpc/include/asm | |
parent | powerpc/eeh: Build EEH event based on PE (diff) | |
download | linux-5b6635294418a954b5f911375b86d3552cf93f36.tar.xz linux-5b6635294418a954b5f911375b86d3552cf93f36.zip |
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.h | 3 | ||||
-rw-r--r-- | arch/powerpc/include/asm/ppc-pci.h | 4 |
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 { struct list_head child; /* Child PEs */ }; +#define eeh_pe_for_each_dev(pe, edev) \ + list_for_each_entry(edev, &pe->edevs, list) + /* * The struct is used to trace EEH state for the associated * 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 *); void eeh_restore_bars(struct eeh_dev *); int rtas_write_config(struct pci_dn *, int where, int size, u32 val); int rtas_read_config(struct pci_dn *, int where, int size, u32 *val); -void eeh_mark_slot(struct device_node *dn, int mode_flag); -void eeh_clear_slot(struct device_node *dn, int mode_flag); +void eeh_pe_state_mark(struct eeh_pe *pe, int state); +void eeh_pe_state_clear(struct eeh_pe *pe, int state); struct device_node *eeh_find_device_pe(struct device_node *dn); void eeh_sysfs_add_device(struct pci_dev *pdev); |