linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: ipic - fix status get and status clear
@ 2017-10-18  9:16 Christophe Leroy
  2017-10-19  5:06 ` Michael Ellerman
  2017-11-07 23:30 ` Michael Ellerman
  0 siblings, 2 replies; 4+ messages in thread
From: Christophe Leroy @ 2017-10-18  9:16 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, Scott Wood
  Cc: linux-kernel, linuxppc-dev

IPIC Status is provided by register IPIC_SERSR and not by IPIC_SERMR
which is the mask register.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/sysdev/ipic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c
index 16f1edd78c40..535cf1f6941c 100644
--- a/arch/powerpc/sysdev/ipic.c
+++ b/arch/powerpc/sysdev/ipic.c
@@ -846,12 +846,12 @@ void ipic_disable_mcp(enum ipic_mcp_irq mcp_irq)
 
 u32 ipic_get_mcp_status(void)
 {
-	return ipic_read(primary_ipic->regs, IPIC_SERMR);
+	return ipic_read(primary_ipic->regs, IPIC_SERSR);
 }
 
 void ipic_clear_mcp_status(u32 mask)
 {
-	ipic_write(primary_ipic->regs, IPIC_SERMR, mask);
+	ipic_write(primary_ipic->regs, IPIC_SERSR, mask);
 }
 
 /* Return an interrupt vector or 0 if no interrupt is pending. */
-- 
2.13.3

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

* Re: [PATCH] powerpc: ipic - fix status get and status clear
  2017-10-18  9:16 [PATCH] powerpc: ipic - fix status get and status clear Christophe Leroy
@ 2017-10-19  5:06 ` Michael Ellerman
  2017-10-19  5:51   ` Christophe LEROY
  2017-11-07 23:30 ` Michael Ellerman
  1 sibling, 1 reply; 4+ messages in thread
From: Michael Ellerman @ 2017-10-19  5:06 UTC (permalink / raw)
  To: Christophe Leroy, Benjamin Herrenschmidt, Paul Mackerras, Scott Wood
  Cc: linux-kernel, linuxppc-dev

Christophe Leroy <christophe.leroy@c-s.fr> writes:

> IPIC Status is provided by register IPIC_SERSR and not by IPIC_SERMR
> which is the mask register.

This seems like it would be a bad bug. But I guess it hasn't mattered
for some reason?

cheers

> diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c
> index 16f1edd78c40..535cf1f6941c 100644
> --- a/arch/powerpc/sysdev/ipic.c
> +++ b/arch/powerpc/sysdev/ipic.c
> @@ -846,12 +846,12 @@ void ipic_disable_mcp(enum ipic_mcp_irq mcp_irq)
>  
>  u32 ipic_get_mcp_status(void)
>  {
> -	return ipic_read(primary_ipic->regs, IPIC_SERMR);
> +	return ipic_read(primary_ipic->regs, IPIC_SERSR);
>  }
>  
>  void ipic_clear_mcp_status(u32 mask)
>  {
> -	ipic_write(primary_ipic->regs, IPIC_SERMR, mask);
> +	ipic_write(primary_ipic->regs, IPIC_SERSR, mask);
>  }
>  
>  /* Return an interrupt vector or 0 if no interrupt is pending. */
> -- 
> 2.13.3

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

* Re: [PATCH] powerpc: ipic - fix status get and status clear
  2017-10-19  5:06 ` Michael Ellerman
@ 2017-10-19  5:51   ` Christophe LEROY
  0 siblings, 0 replies; 4+ messages in thread
From: Christophe LEROY @ 2017-10-19  5:51 UTC (permalink / raw)
  To: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras, Scott Wood
  Cc: linux-kernel, linuxppc-dev



Le 19/10/2017 à 07:06, Michael Ellerman a écrit :
> Christophe Leroy <christophe.leroy@c-s.fr> writes:
> 
>> IPIC Status is provided by register IPIC_SERSR and not by IPIC_SERMR
>> which is the mask register.
> 
> This seems like it would be a bad bug. But I guess it hasn't mattered
> for some reason?

As far as I can see, this function has been added in kernel 2.6.12 but 
has never been used in-tree.

I have discovered this error while implementing NMI watchdog on a 832x 
board, ie this function is needed to know when a machine check exception 
is generated by the watchdog timer.

Christophe

> 
> cheers
> 
>> diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c
>> index 16f1edd78c40..535cf1f6941c 100644
>> --- a/arch/powerpc/sysdev/ipic.c
>> +++ b/arch/powerpc/sysdev/ipic.c
>> @@ -846,12 +846,12 @@ void ipic_disable_mcp(enum ipic_mcp_irq mcp_irq)
>>   
>>   u32 ipic_get_mcp_status(void)
>>   {
>> -	return ipic_read(primary_ipic->regs, IPIC_SERMR);
>> +	return ipic_read(primary_ipic->regs, IPIC_SERSR);
>>   }
>>   
>>   void ipic_clear_mcp_status(u32 mask)
>>   {
>> -	ipic_write(primary_ipic->regs, IPIC_SERMR, mask);
>> +	ipic_write(primary_ipic->regs, IPIC_SERSR, mask);
>>   }
>>   
>>   /* Return an interrupt vector or 0 if no interrupt is pending. */
>> -- 
>> 2.13.3

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

* Re: powerpc: ipic - fix status get and status clear
  2017-10-18  9:16 [PATCH] powerpc: ipic - fix status get and status clear Christophe Leroy
  2017-10-19  5:06 ` Michael Ellerman
@ 2017-11-07 23:30 ` Michael Ellerman
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2017-11-07 23:30 UTC (permalink / raw)
  To: Christophe Leroy, Benjamin Herrenschmidt, Paul Mackerras, Scott Wood
  Cc: linuxppc-dev, linux-kernel

On Wed, 2017-10-18 at 09:16:47 UTC, Christophe Leroy wrote:
> IPIC Status is provided by register IPIC_SERSR and not by IPIC_SERMR
> which is the mask register.
> 
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/6b148a7ce72a7f87c81cbcde48af01

cheers

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

end of thread, other threads:[~2017-11-07 23:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-18  9:16 [PATCH] powerpc: ipic - fix status get and status clear Christophe Leroy
2017-10-19  5:06 ` Michael Ellerman
2017-10-19  5:51   ` Christophe LEROY
2017-11-07 23:30 ` Michael Ellerman

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).