LinuxPPC-Dev Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] powerpc/powernv/elog: Reduce elog message severity
@ 2020-10-07 10:17 Vasant Hegde
  2020-10-09  5:04 ` Michael Ellerman
  0 siblings, 1 reply; 3+ messages in thread
From: Vasant Hegde @ 2020-10-07 10:17 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Vasant Hegde, Mahesh Salgaonkar

OPAL interrupts kernel whenever it has new error log. Kernel calls
interrupt handler (elog_event()) to retrieve event. elog_event makes
OPAL API call (opal_get_elog_size()) to retrieve elog info.

In some case before kernel makes opal_get_elog_size() call, it gets interrupt
again. So second time when elog_event() calls opal_get_elog_size API OPAL
returns error. Its safe to ignore this error. Hence reduce the severity
of log message.

CC: Mahesh Salgaonkar <mahesh@linux.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
---
 arch/powerpc/platforms/powernv/opal-elog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/powernv/opal-elog.c b/arch/powerpc/platforms/powernv/opal-elog.c
index 62ef7ad995da..67f435bb1ec4 100644
--- a/arch/powerpc/platforms/powernv/opal-elog.c
+++ b/arch/powerpc/platforms/powernv/opal-elog.c
@@ -247,7 +247,7 @@ static irqreturn_t elog_event(int irq, void *data)
 
 	rc = opal_get_elog_size(&id, &size, &type);
 	if (rc != OPAL_SUCCESS) {
-		pr_err("ELOG: OPAL log info read failed\n");
+		pr_debug("ELOG: OPAL log info read failed\n");
 		return IRQ_HANDLED;
 	}
 
-- 
2.26.2


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

* Re: [PATCH] powerpc/powernv/elog: Reduce elog message severity
  2020-10-07 10:17 [PATCH] powerpc/powernv/elog: Reduce elog message severity Vasant Hegde
@ 2020-10-09  5:04 ` Michael Ellerman
  2020-10-17 17:12   ` Vasant Hegde
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Ellerman @ 2020-10-09  5:04 UTC (permalink / raw)
  To: Vasant Hegde, linuxppc-dev; +Cc: Vasant Hegde, Mahesh Salgaonkar

Vasant Hegde <hegdevasant@linux.vnet.ibm.com> writes:
> OPAL interrupts kernel whenever it has new error log. Kernel calls
> interrupt handler (elog_event()) to retrieve event. elog_event makes
> OPAL API call (opal_get_elog_size()) to retrieve elog info.
>
> In some case before kernel makes opal_get_elog_size() call, it gets interrupt
> again. So second time when elog_event() calls opal_get_elog_size API OPAL
> returns error.

Can you give more detail there? Do you have a stack trace?

We use IRQF_ONESHOT for elog_event(), which (I thought) meant it
shouldn't be called again until it has completed.

So I'm unclear how you're seeing the behaviour you describe.

cheers

> Its safe to ignore this error. Hence reduce the severity
> of log message.
>
> CC: Mahesh Salgaonkar <mahesh@linux.ibm.com>
> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
> ---
>  arch/powerpc/platforms/powernv/opal-elog.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/platforms/powernv/opal-elog.c b/arch/powerpc/platforms/powernv/opal-elog.c
> index 62ef7ad995da..67f435bb1ec4 100644
> --- a/arch/powerpc/platforms/powernv/opal-elog.c
> +++ b/arch/powerpc/platforms/powernv/opal-elog.c
> @@ -247,7 +247,7 @@ static irqreturn_t elog_event(int irq, void *data)
>  
>  	rc = opal_get_elog_size(&id, &size, &type);
>  	if (rc != OPAL_SUCCESS) {
> -		pr_err("ELOG: OPAL log info read failed\n");
> +		pr_debug("ELOG: OPAL log info read failed\n");
>  		return IRQ_HANDLED;
>  	}
>  
> -- 
> 2.26.2

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

* Re: [PATCH] powerpc/powernv/elog: Reduce elog message severity
  2020-10-09  5:04 ` Michael Ellerman
@ 2020-10-17 17:12   ` Vasant Hegde
  0 siblings, 0 replies; 3+ messages in thread
From: Vasant Hegde @ 2020-10-17 17:12 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev; +Cc: Mahesh Salgaonkar

On 10/9/20 10:34 AM, Michael Ellerman wrote:
> Vasant Hegde <hegdevasant@linux.vnet.ibm.com> writes:
>> OPAL interrupts kernel whenever it has new error log. Kernel calls
>> interrupt handler (elog_event()) to retrieve event. elog_event makes
>> OPAL API call (opal_get_elog_size()) to retrieve elog info.
>>
>> In some case before kernel makes opal_get_elog_size() call, it gets interrupt
>> again. So second time when elog_event() calls opal_get_elog_size API OPAL
>> returns error.
> 
> Can you give more detail there? Do you have a stack trace?

I observe below log in dmesg
   [  615.708709] ELOG: OPAL log info read failed

That means elog_event called twice for same error log event.
I don't have stack trace.

> 
> We use IRQF_ONESHOT for elog_event(), which (I thought) meant it
> shouldn't be called again until it has completed.

Yes. I thought so.. But once in a while we get above message (mostly when we 
have multiple event bits are set).

-Vasant


> 
> So I'm unclear how you're seeing the behaviour you describe.
> 
> cheers
> 
>> Its safe to ignore this error. Hence reduce the severity
>> of log message.
>>
>> CC: Mahesh Salgaonkar <mahesh@linux.ibm.com>
>> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
>> ---
>>   arch/powerpc/platforms/powernv/opal-elog.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/powerpc/platforms/powernv/opal-elog.c b/arch/powerpc/platforms/powernv/opal-elog.c
>> index 62ef7ad995da..67f435bb1ec4 100644
>> --- a/arch/powerpc/platforms/powernv/opal-elog.c
>> +++ b/arch/powerpc/platforms/powernv/opal-elog.c
>> @@ -247,7 +247,7 @@ static irqreturn_t elog_event(int irq, void *data)
>>   
>>   	rc = opal_get_elog_size(&id, &size, &type);
>>   	if (rc != OPAL_SUCCESS) {
>> -		pr_err("ELOG: OPAL log info read failed\n");
>> +		pr_debug("ELOG: OPAL log info read failed\n");
>>   		return IRQ_HANDLED;
>>   	}
>>   
>> -- 
>> 2.26.2


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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-07 10:17 [PATCH] powerpc/powernv/elog: Reduce elog message severity Vasant Hegde
2020-10-09  5:04 ` Michael Ellerman
2020-10-17 17:12   ` Vasant Hegde

LinuxPPC-Dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linuxppc-dev/0 linuxppc-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linuxppc-dev linuxppc-dev/ https://lore.kernel.org/linuxppc-dev \
		linuxppc-dev@lists.ozlabs.org linuxppc-dev@ozlabs.org
	public-inbox-index linuxppc-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.ozlabs.lists.linuxppc-dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git