From: Christophe LEROY <christophe.leroy@c-s.fr>
To: Michael Ellerman <mpe@ellerman.id.au>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>, Scott Wood <oss@buserror.net>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc: ipic - fix status get and status clear
Date: Thu, 19 Oct 2017 07:51:00 +0200 [thread overview]
Message-ID: <803bdda8-d40b-569b-571d-7af415bf1853@c-s.fr> (raw)
In-Reply-To: <8760bbn2va.fsf@concordia.ellerman.id.au>
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
next prev parent reply other threads:[~2017-10-19 5:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-18 9:16 Christophe Leroy
2017-10-19 5:06 ` Michael Ellerman
2017-10-19 5:51 ` Christophe LEROY [this message]
2017-11-07 23:30 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=803bdda8-d40b-569b-571d-7af415bf1853@c-s.fr \
--to=christophe.leroy@c-s.fr \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=oss@buserror.net \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®