linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/eeh: Dump PHB3 diag-data on frozen PE
@ 2013-11-20  9:36 Gavin Shan
  2013-11-20  9:38 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 3+ messages in thread
From: Gavin Shan @ 2013-11-20  9:36 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Gavin Shan

While we detect frozen PE on PHB3, it's always meaningful to have
the dumped diag-data for further diagnosis and analysis.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
---
 arch/powerpc/platforms/powernv/eeh-ioda.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/powerpc/platforms/powernv/eeh-ioda.c b/arch/powerpc/platforms/powernv/eeh-ioda.c
index 02245ce..481528d 100644
--- a/arch/powerpc/platforms/powernv/eeh-ioda.c
+++ b/arch/powerpc/platforms/powernv/eeh-ioda.c
@@ -994,8 +994,11 @@ static int ioda_eeh_next_error(struct eeh_pe **pe)
 			if (ioda_eeh_get_pe(hose, frozen_pe_no, pe))
 				break;
 
+			/* It would be always indicative to have PHB diag-data */
 			pr_err("EEH: Frozen PE#%x on PHB#%x detected\n",
 				(*pe)->addr, (*pe)->phb->global_number);
+			ioda_eeh_phb_diag(hose);
+
 			ret = 1;
 			goto out;
 		}
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] powerpc/eeh: Dump PHB3 diag-data on frozen PE
  2013-11-20  9:36 [PATCH] powerpc/eeh: Dump PHB3 diag-data on frozen PE Gavin Shan
@ 2013-11-20  9:38 ` Benjamin Herrenschmidt
  2013-11-20 10:09   ` Gavin Shan
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2013-11-20  9:38 UTC (permalink / raw)
  To: Gavin Shan; +Cc: linuxppc-dev

On Wed, 2013-11-20 at 17:36 +0800, Gavin Shan wrote:
> While we detect frozen PE on PHB3, it's always meaningful to have
> the dumped diag-data for further diagnosis and analysis.

Don't we trip that during PCI probing ? For example if we probe behind
a PCI-X bridge (which can exist on an adapter) we'll trip EEH on every
non-existing device won't we ?

Cheers,
Ben.

> Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
> ---
>  arch/powerpc/platforms/powernv/eeh-ioda.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/powerpc/platforms/powernv/eeh-ioda.c b/arch/powerpc/platforms/powernv/eeh-ioda.c
> index 02245ce..481528d 100644
> --- a/arch/powerpc/platforms/powernv/eeh-ioda.c
> +++ b/arch/powerpc/platforms/powernv/eeh-ioda.c
> @@ -994,8 +994,11 @@ static int ioda_eeh_next_error(struct eeh_pe **pe)
>  			if (ioda_eeh_get_pe(hose, frozen_pe_no, pe))
>  				break;
>  
> +			/* It would be always indicative to have PHB diag-data */
>  			pr_err("EEH: Frozen PE#%x on PHB#%x detected\n",
>  				(*pe)->addr, (*pe)->phb->global_number);
> +			ioda_eeh_phb_diag(hose);
> +
>  			ret = 1;
>  			goto out;
>  		}

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] powerpc/eeh: Dump PHB3 diag-data on frozen PE
  2013-11-20  9:38 ` Benjamin Herrenschmidt
@ 2013-11-20 10:09   ` Gavin Shan
  0 siblings, 0 replies; 3+ messages in thread
From: Gavin Shan @ 2013-11-20 10:09 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Gavin Shan

On Wed, Nov 20, 2013 at 08:38:48PM +1100, Benjamin Herrenschmidt wrote:
>On Wed, 2013-11-20 at 17:36 +0800, Gavin Shan wrote:
>> While we detect frozen PE on PHB3, it's always meaningful to have
>> the dumped diag-data for further diagnosis and analysis.
>
>Don't we trip that during PCI probing ? For example if we probe behind
>a PCI-X bridge (which can exist on an adapter) we'll trip EEH on every
>non-existing device won't we ?
>

Yes, we already had the dumped PHB diag-data when detecting frozen PE
during PCI probing. After PCI probing is completed, the EEH takes over
and we won't dump PHB diag-data during PCI config cycles.

Took a close look on what we have in the code. Those functions to dump
PHB (P7IOC & PHB3) needs a bit rework or refactoring since we're dumping
same PHB diag-data in pci.c and eeh-ioda.c at the same time.

Besides, I think the appropriate place to dump PHB diag-data (for EEH
core itself) would be ioda_eeh_get_log(), which is the indirect backend
of eeh_ops::get_log, instead of the function ioda_eeh_next_error().

Ben, please drop this one for now and I'll send the revised one :-)

Thanks,
Gavin

>> Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
>> ---
>>  arch/powerpc/platforms/powernv/eeh-ioda.c |    3 +++
>>  1 file changed, 3 insertions(+)
>> 
>> diff --git a/arch/powerpc/platforms/powernv/eeh-ioda.c b/arch/powerpc/platforms/powernv/eeh-ioda.c
>> index 02245ce..481528d 100644
>> --- a/arch/powerpc/platforms/powernv/eeh-ioda.c
>> +++ b/arch/powerpc/platforms/powernv/eeh-ioda.c
>> @@ -994,8 +994,11 @@ static int ioda_eeh_next_error(struct eeh_pe **pe)
>>  			if (ioda_eeh_get_pe(hose, frozen_pe_no, pe))
>>  				break;
>>  
>> +			/* It would be always indicative to have PHB diag-data */
>>  			pr_err("EEH: Frozen PE#%x on PHB#%x detected\n",
>>  				(*pe)->addr, (*pe)->phb->global_number);
>> +			ioda_eeh_phb_diag(hose);
>> +
>>  			ret = 1;
>>  			goto out;
>>  		}
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-20 10:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-20  9:36 [PATCH] powerpc/eeh: Dump PHB3 diag-data on frozen PE Gavin Shan
2013-11-20  9:38 ` Benjamin Herrenschmidt
2013-11-20 10:09   ` Gavin Shan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).