From: Michael Ellerman <michael@ellerman.id.au>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org, cbe-oss-dev@ozlabs.org
Subject: Re: powerpc/cell/axon-msi: fix MSI after kexec
Date: Mon, 15 Dec 2008 15:30:26 +1100 [thread overview]
Message-ID: <1229315426.7118.59.camel@localhost> (raw)
In-Reply-To: <200812122019.51191.arnd@arndb.de>
[-- Attachment #1: Type: text/plain, Size: 2168 bytes --]
On Fri, 2008-12-12 at 20:19 +0100, Arnd Bergmann wrote:
> Commit d015fe995 'powerpc/cell/axon-msi: Retry on missing interrupt'
> has turned a rare failure to kexec on QS22 into a reproducible
> error, which we have now analysed.
>
> The problem is that after a kexec, the MSIC hardware still points
> into the middle of the old ring buffer. We set up the ring buffer
> during reboot, but not the offset into it. On older kernels, this
> would cause a storm of thousands of spurious interrupts after a
> kexec, which would most of the time get dropped silently.
>
> With the new code, we time out on each interrupt, waiting for
> it to become valid. If more interrupts come in that we time
> out on, this goes on indefinitely, which eventually leads to
> a hard crash.
>
> The solution in this patch is to read the current offset from
> the MSIC when reinitializing it. This now works correctly, as
> expected.
>
> Reported-by: Dirk Herrendoerfer <d.herrendoerfer@de.ibm.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>
> Please apply when Dirk and Michael have given their Ack.
> Should we have it in 2.6.28? Not sure if going from 'works sometimes'
> to 'works never' counts as a regression. Most users won't be impacted,
> because they don't use kexec on QS22.
I think it does count, it's a pretty small fix.
> diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c
> index 442cf36..548fa4e 100644
> --- a/arch/powerpc/platforms/cell/axon_msi.c
> +++ b/arch/powerpc/platforms/cell/axon_msi.c
> @@ -413,6 +422,9 @@ static int axon_msi_probe(struct of_device *device,
> MSIC_CTRL_IRQ_ENABLE | MSIC_CTRL_ENABLE |
> MSIC_CTRL_FIFO_SIZE);
>
> + msic->read_offset = dcr_read(msic->dcr_host, MSIC_WRITE_OFFSET_REG)
> + & MSIC_FIFO_SIZE_MASK;
> +
Acked-by: Michael Ellerman <michael@ellerman.id.au>
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
prev parent reply other threads:[~2008-12-15 4:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-12 19:19 powerpc/cell/axon-msi: fix MSI after kexec Arnd Bergmann
2008-12-15 4:30 ` Michael Ellerman [this message]
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=1229315426.7118.59.camel@localhost \
--to=michael@ellerman.id.au \
--cc=arnd@arndb.de \
--cc=cbe-oss-dev@ozlabs.org \
--cc=linuxppc-dev@ozlabs.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.