All of lore.kernel.org
 help / color / mirror / Atom feed
From: dwalker@fifo99.com
To: Ralf Baechle <ralf@linux-mips.org>,
	linux-mips@linux-mips.org, masami.hiramatsu.pt@hitachi.com,
	david.daney@cavium.com
Subject: kexec crash kernel running with watchdog enabled
Date: Tue, 23 Jun 2015 14:05:48 +0000	[thread overview]
Message-ID: <20150623140548.GA15591@fifo99.com> (raw)


Hi,

There was a commit in kernel/panic.c which altered when the kexec crash kernel is executed,

commit f06e5153f4ae2e2f3b0300f0e260e40cb7fefd45
Author: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Date:   Fri Jun 6 14:37:07 2014 -0700

    kernel/panic.c: add "crash_kexec_post_notifiers" option for kdump after panic_notifers


This made it possible for smp_send_stop() to be executed prior to calling the kexec crash
kernel.

The issue is that smp_send_stop() offlines the cores, and other code depend on the cores being online.

In my case on Octeon here's an example,

panic()
 crash_kexec()
  machine_crash_shutdown()
   octeon_generic_shutdown()

Inside octeon_generic_shutdown() the Octeon watchdog is shutdown for_each_online_cpu(), but since
most of the cpu's already got offlined in smp_send_stop() it means the watchdog is still alive on
those cores. This results in a reboot during the crash kernel execution.

Another example seem to be in default_machine_crash_shutdown() where crash_kexec_prepare_cpus() depends
on an IPI for saving the registers on different cores. However, the cpu's are all offlined with
interrupts disabled so they won't be running those IPI's in this case.

I'm looking for any advice on how this should be fixed, or if it's already fixed. I'm not going to be
submitting a patch so if anyone wants to submit one feel free to do so.

Daniel

             reply	other threads:[~2015-06-23 14:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-23 14:05 dwalker [this message]
2015-06-24  6:52 ` kexec crash kernel running with watchdog enabled Masami Hiramatsu
2015-06-24 16:31   ` dwalker
2015-06-24 17:06     ` Eric W. Biederman
2015-06-25 20:16       ` dwalker
2015-06-26  1:02     ` Hidehiro Kawai
2015-06-26 18:33       ` dwalker
2015-06-29  9:53         ` Hidehiro Kawai
2015-06-29 12:26           ` Vivek Goyal
2015-06-30  8:36             ` Hidehiro Kawai

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=20150623140548.GA15591@fifo99.com \
    --to=dwalker@fifo99.com \
    --cc=david.daney@cavium.com \
    --cc=linux-mips@linux-mips.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=ralf@linux-mips.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.