aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powernv/eeh-powernv.c
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/platforms/powernv/eeh-powernv.c
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/platforms/powernv/eeh-powernv.c')
-rw-r--r--arch/powerpc/platforms/powernv/eeh-powernv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/powernv/eeh-powernv.c b/arch/powerpc/platforms/powernv/eeh-powernv.c
index 4a113f3c9171..fd7a16f855ed 100644
--- a/arch/powerpc/platforms/powernv/eeh-powernv.c
+++ b/arch/powerpc/platforms/powernv/eeh-powernv.c
@@ -326,7 +326,7 @@ static int powernv_eeh_wait_state(struct eeh_pe *pe, int max_wait)
326 * Retrieve the temporary or permanent error from the PE. 326 * Retrieve the temporary or permanent error from the PE.
327 */ 327 */
328static int powernv_eeh_get_log(struct eeh_pe *pe, int severity, 328static int powernv_eeh_get_log(struct eeh_pe *pe, int severity,
329 char *drv_log, unsigned long len) 329 char *drv_log, unsigned long len)
330{ 330{
331 struct pci_controller *hose = pe->phb; 331 struct pci_controller *hose = pe->phb;
332 struct pnv_phb *phb = hose->private_data; 332 struct pnv_phb *phb = hose->private_data;
@@ -430,6 +430,7 @@ static int __init eeh_powernv_init(void)
430{ 430{
431 int ret = -EINVAL; 431 int ret = -EINVAL;
432 432
433 eeh_set_pe_aux_size(PNV_PCI_DIAG_BUF_SIZE);
433 ret = eeh_ops_register(&powernv_eeh_ops); 434 ret = eeh_ops_register(&powernv_eeh_ops);
434 if (!ret) 435 if (!ret)
435 pr_info("EEH: PowerNV platform initialized\n"); 436 pr_info("EEH: PowerNV platform initialized\n");