aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/eeh.h
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2014-07-17 00:41:43 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-08-05 01:41:43 -0400
commitbb593c0049fd6b6e420a6f68c5a688e14782dba1 (patch)
tree844f038aca08d97c89fb02b8b167f19fea2d141c /arch/powerpc/include/asm/eeh.h
parentf18440fb7e4f95d2a8f882d3d27c8777101fac12 (diff)
powerpc/eeh: Aux PE data for error log
The patch allows PE (struct eeh_pe) instance to have auxillary data, whose size is configurable on basis of platform. For PowerNV, the auxillary data will be used to cache PHB diag-data for that PE (frozen PE or fenced PHB). In turn, we can retrieve the diag-data at any later points. It's useful for the case of VFIO PCI devices where the error log should be cached, and then be retrieved by the guest at later point. Also, it can avoid PHB diag-data overwritting if another frozen PE reported and the previous diag-data isn't fetched by guest. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/eeh.h')
-rw-r--r--arch/powerpc/include/asm/eeh.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h
index 494c3fff4623..9983c3d26bca 100644
--- a/arch/powerpc/include/asm/eeh.h
+++ b/arch/powerpc/include/asm/eeh.h
@@ -88,6 +88,7 @@ struct eeh_pe {
88 int false_positives; /* Times of reported #ff's */ 88 int false_positives; /* Times of reported #ff's */
89 atomic_t pass_dev_cnt; /* Count of passed through devs */ 89 atomic_t pass_dev_cnt; /* Count of passed through devs */
90 struct eeh_pe *parent; /* Parent PE */ 90 struct eeh_pe *parent; /* Parent PE */
91 void *data; /* PE auxillary data */
91 struct list_head child_list; /* Link PE to the child list */ 92 struct list_head child_list; /* Link PE to the child list */
92 struct list_head edevs; /* Link list of EEH devices */ 93 struct list_head edevs; /* Link list of EEH devices */
93 struct list_head child; /* Child PEs */ 94 struct list_head child; /* Child PEs */
@@ -248,6 +249,7 @@ static inline void eeh_serialize_unlock(unsigned long flags)
248#define EEH_MAX_ALLOWED_FREEZES 5 249#define EEH_MAX_ALLOWED_FREEZES 5
249 250
250typedef void *(*eeh_traverse_func)(void *data, void *flag); 251typedef void *(*eeh_traverse_func)(void *data, void *flag);
252void eeh_set_pe_aux_size(int size);
251int eeh_phb_pe_create(struct pci_controller *phb); 253int eeh_phb_pe_create(struct pci_controller *phb);
252struct eeh_pe *eeh_phb_pe_get(struct pci_controller *phb); 254struct eeh_pe *eeh_phb_pe_get(struct pci_controller *phb);
253struct eeh_pe *eeh_pe_get(struct eeh_dev *edev); 255struct eeh_pe *eeh_pe_get(struct eeh_dev *edev);