diff options
author | Gavin Shan <gwshan@linux.vnet.ibm.com> | 2014-06-11 04:26:44 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-06-11 05:12:23 -0400 |
commit | 357b2f3dd9b7e220ddbaef5bcc108f0359dc0fcf (patch) | |
tree | 722fdbf7ec1406f437f5f4bb2c7073c4fb629642 /arch/powerpc/platforms | |
parent | d4e58e5928f8c6c49228451dd03e0714cbab299a (diff) |
powerpc/eeh: Dump PE location code
As Ben suggested, it's meaningful to dump PE's location code
for site engineers when hitting EEH errors. The patch introduces
function eeh_pe_loc_get() to retireve the location code from
dev-tree so that we can output it when hitting EEH errors.
If primary PE bus is root bus, the PHB's dev-node would be tried
prior to root port's dev-node. Otherwise, the upstream bridge's
dev-node of the primary PE bus will be check for the location code
directly.
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')
-rw-r--r-- | arch/powerpc/platforms/powernv/eeh-ioda.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/powernv/eeh-ioda.c b/arch/powerpc/platforms/powernv/eeh-ioda.c index 9c002099f875..8ad0c5b891f4 100644 --- a/arch/powerpc/platforms/powernv/eeh-ioda.c +++ b/arch/powerpc/platforms/powernv/eeh-ioda.c | |||
@@ -774,19 +774,24 @@ static int ioda_eeh_next_error(struct eeh_pe **pe) | |||
774 | case OPAL_EEH_PHB_ERROR: | 774 | case OPAL_EEH_PHB_ERROR: |
775 | if (be16_to_cpu(severity) == OPAL_EEH_SEV_PHB_DEAD) { | 775 | if (be16_to_cpu(severity) == OPAL_EEH_SEV_PHB_DEAD) { |
776 | *pe = phb_pe; | 776 | *pe = phb_pe; |
777 | pr_err("EEH: dead PHB#%x detected\n", | 777 | pr_err("EEH: dead PHB#%x detected, " |
778 | hose->global_number); | 778 | "location: %s\n", |
779 | hose->global_number, | ||
780 | eeh_pe_loc_get(phb_pe)); | ||
779 | ret = EEH_NEXT_ERR_DEAD_PHB; | 781 | ret = EEH_NEXT_ERR_DEAD_PHB; |
780 | } else if (be16_to_cpu(severity) == | 782 | } else if (be16_to_cpu(severity) == |
781 | OPAL_EEH_SEV_PHB_FENCED) { | 783 | OPAL_EEH_SEV_PHB_FENCED) { |
782 | *pe = phb_pe; | 784 | *pe = phb_pe; |
783 | pr_err("EEH: fenced PHB#%x detected\n", | 785 | pr_err("EEH: Fenced PHB#%x detected, " |
784 | hose->global_number); | 786 | "location: %s\n", |
787 | hose->global_number, | ||
788 | eeh_pe_loc_get(phb_pe)); | ||
785 | ret = EEH_NEXT_ERR_FENCED_PHB; | 789 | ret = EEH_NEXT_ERR_FENCED_PHB; |
786 | } else if (be16_to_cpu(severity) == OPAL_EEH_SEV_INF) { | 790 | } else if (be16_to_cpu(severity) == OPAL_EEH_SEV_INF) { |
787 | pr_info("EEH: PHB#%x informative error " | 791 | pr_info("EEH: PHB#%x informative error " |
788 | "detected\n", | 792 | "detected, location: %s\n", |
789 | hose->global_number); | 793 | hose->global_number, |
794 | eeh_pe_loc_get(phb_pe)); | ||
790 | ioda_eeh_phb_diag(hose); | 795 | ioda_eeh_phb_diag(hose); |
791 | ret = EEH_NEXT_ERR_NONE; | 796 | ret = EEH_NEXT_ERR_NONE; |
792 | } | 797 | } |
@@ -802,6 +807,8 @@ static int ioda_eeh_next_error(struct eeh_pe **pe) | |||
802 | /* Try best to clear it */ | 807 | /* Try best to clear it */ |
803 | pr_info("EEH: Clear non-existing PHB#%x-PE#%llx\n", | 808 | pr_info("EEH: Clear non-existing PHB#%x-PE#%llx\n", |
804 | hose->global_number, frozen_pe_no); | 809 | hose->global_number, frozen_pe_no); |
810 | pr_info("EEH: PHB location: %s\n", | ||
811 | eeh_pe_loc_get(phb_pe)); | ||
805 | opal_pci_eeh_freeze_clear(phb->opal_id, frozen_pe_no, | 812 | opal_pci_eeh_freeze_clear(phb->opal_id, frozen_pe_no, |
806 | OPAL_EEH_ACTION_CLEAR_FREEZE_ALL); | 813 | OPAL_EEH_ACTION_CLEAR_FREEZE_ALL); |
807 | ret = EEH_NEXT_ERR_NONE; | 814 | ret = EEH_NEXT_ERR_NONE; |
@@ -810,6 +817,8 @@ static int ioda_eeh_next_error(struct eeh_pe **pe) | |||
810 | } else { | 817 | } else { |
811 | pr_err("EEH: Frozen PE#%x on PHB#%x detected\n", | 818 | pr_err("EEH: Frozen PE#%x on PHB#%x detected\n", |
812 | (*pe)->addr, (*pe)->phb->global_number); | 819 | (*pe)->addr, (*pe)->phb->global_number); |
820 | pr_err("EEH: PE location: %s, PHB location: %s\n", | ||
821 | eeh_pe_loc_get(*pe), eeh_pe_loc_get(phb_pe)); | ||
813 | ret = EEH_NEXT_ERR_FROZEN_PE; | 822 | ret = EEH_NEXT_ERR_FROZEN_PE; |
814 | } | 823 | } |
815 | 824 | ||