linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Michael Ellerman <mpe@ellerman.id.au>, linuxppc-dev@ozlabs.org
Cc: npiggin@gmail.com
Subject: Re: [RFC, 1/4] powerpc/64: Save stack pointer when we hard disable interrupts
Date: Tue,  5 Jun 2018 00:10:43 +1000 (AEST)	[thread overview]
Message-ID: <40zxfs5L7Mz9ryk@ozlabs.org> (raw)
In-Reply-To: <20180502130729.24077-1-mpe@ellerman.id.au>

On Wed, 2018-05-02 at 13:07:26 UTC, Michael Ellerman wrote:
> A CPU that gets stuck with interrupts hard disable can be difficult to
> debug, as on some platforms we have no way to interrupt the CPU to
> find out what it's doing.
> 
> A stop-gap is to have the CPU save it's stack pointer (r1) in its paca
> when it hard disables interrupts. That way if we can't interrupt it,
> we can at least trace the stack based on where it last disabled
> interrupts.
> 
> In some cases that will be total junk, but the stack trace code should
> handle that. In the simple case of a CPU that disable interrupts and
> then gets stuck in a loop, the stack trace should be informative.
> 
> We could clear the saved stack pointer when we enable interrupts, but
> that loses information which could be useful if we have nothing else
> to go on.
> 
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Series applied to powerpc next.

https://git.kernel.org/powerpc/c/7b08729cb272b4cd5c657cd5ac0ddd

cheers

      parent reply	other threads:[~2018-06-04 14:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-02 13:07 [RFC PATCH 1/4] powerpc/64: Save stack pointer when we hard disable interrupts Michael Ellerman
2018-05-02 13:07 ` [RFC PATCH 2/4] powerpc/nmi: Add an API for sending "safe" NMIs Michael Ellerman
2018-05-02 13:07 ` [RFC PATCH 3/4] powerpc/64s: Wire up arch_trigger_cpumask_backtrace() Michael Ellerman
2018-06-13  7:32   ` Christophe LEROY
2018-05-02 13:07 ` [RFC PATCH 4/4] powerpc/stacktrace: Update copyright Michael Ellerman
2018-05-05  6:26 ` [RFC PATCH 1/4] powerpc/64: Save stack pointer when we hard disable interrupts Nicholas Piggin
2018-06-04 14:10 ` 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=40zxfs5L7Mz9ryk@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).