All of lore.kernel.org
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/1] arm64: kexec: machine_kexec should call __flush_icache_range
Date: Mon, 30 Jul 2018 17:57:57 +0100	[thread overview]
Message-ID: <20180730165757.GF4276@arm.com> (raw)
In-Reply-To: <2651847f-79ea-fe2a-c1d7-efe4d11702b4@oracle.com>

On Mon, Jul 30, 2018 at 11:46:24AM -0500, Dave Kleikamp wrote:
> On 07/30/2018 11:22 AM, Will Deacon wrote:
> > On Mon, Jul 30, 2018 at 05:16:42PM +0100, Catalin Marinas wrote:
> >> On Mon, Jul 30, 2018 at 10:29:21AM -0500, Dave Kleikamp wrote:
> >>> machine_kexec flushes the reboot_code_buffer from the icache
> >>> after stopping the other cpus.
> >>>
> >>> Commit 3b8c9f1cdfc5 ("arm64: IPI each CPU after invalidating the I-cache
> >>> for kernel mappings") added an IPI call to flush_icache_range, which
> >>> causes a hang here, so replace the call with __flush_icache_range
> >>
> >> While machine_kexec() may be called with interrupts disabled (IIUC) and
> >> we shouldn't IPI other CPUs, I don't understand why it hangs here. Are
> >> there any other CPUs online at this point?
> > 
> > The BUG_ON and WARN_ON at the start of machine_kexec() suggest to me that
> > this should only happen if we're kexec'ing a crash kernel and
> > smp_crash_stop_failed(). Is that something we need to care about?
> 
> I observed the hang trying to kexec a crash kernel and I did not see the
> warning that smp_crash_stop_failed(). I'm not exactly sure why
> flush_icache_range() hung (but it did), but I think that
> __flush_icache_range() makes more sense here anyway.

Yeah, I'll pick the patch up, but it would be nice to understand the
failure case you observed.

Will

WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will.deacon@arm.com>
To: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	AKASHI Takahiro <takahiro.akashi@linaro.org>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/1] arm64: kexec: machine_kexec should call __flush_icache_range
Date: Mon, 30 Jul 2018 17:57:57 +0100	[thread overview]
Message-ID: <20180730165757.GF4276@arm.com> (raw)
In-Reply-To: <2651847f-79ea-fe2a-c1d7-efe4d11702b4@oracle.com>

On Mon, Jul 30, 2018 at 11:46:24AM -0500, Dave Kleikamp wrote:
> On 07/30/2018 11:22 AM, Will Deacon wrote:
> > On Mon, Jul 30, 2018 at 05:16:42PM +0100, Catalin Marinas wrote:
> >> On Mon, Jul 30, 2018 at 10:29:21AM -0500, Dave Kleikamp wrote:
> >>> machine_kexec flushes the reboot_code_buffer from the icache
> >>> after stopping the other cpus.
> >>>
> >>> Commit 3b8c9f1cdfc5 ("arm64: IPI each CPU after invalidating the I-cache
> >>> for kernel mappings") added an IPI call to flush_icache_range, which
> >>> causes a hang here, so replace the call with __flush_icache_range
> >>
> >> While machine_kexec() may be called with interrupts disabled (IIUC) and
> >> we shouldn't IPI other CPUs, I don't understand why it hangs here. Are
> >> there any other CPUs online at this point?
> > 
> > The BUG_ON and WARN_ON at the start of machine_kexec() suggest to me that
> > this should only happen if we're kexec'ing a crash kernel and
> > smp_crash_stop_failed(). Is that something we need to care about?
> 
> I observed the hang trying to kexec a crash kernel and I did not see the
> warning that smp_crash_stop_failed(). I'm not exactly sure why
> flush_icache_range() hung (but it did), but I think that
> __flush_icache_range() makes more sense here anyway.

Yeah, I'll pick the patch up, but it would be nice to understand the
failure case you observed.

Will

  reply	other threads:[~2018-07-30 16:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-30 15:28 [PATCH 0/1] arm64: for-next/core: Fix hang in machine_kexec Dave Kleikamp
2018-07-30 15:28 ` Dave Kleikamp
2018-07-30 15:29 ` [PATCH 1/1] arm64: kexec: machine_kexec should call __flush_icache_range Dave Kleikamp
2018-07-30 15:29   ` Dave Kleikamp
2018-07-30 16:16   ` Catalin Marinas
2018-07-30 16:16     ` Catalin Marinas
2018-07-30 16:22     ` Will Deacon
2018-07-30 16:22       ` Will Deacon
2018-07-30 16:39       ` Catalin Marinas
2018-07-30 16:39         ` Catalin Marinas
2018-07-30 16:46       ` Dave Kleikamp
2018-07-30 16:46         ` Dave Kleikamp
2018-07-30 16:57         ` Will Deacon [this message]
2018-07-30 16:57           ` Will Deacon
2018-07-30 16:59           ` Dave Kleikamp
2018-07-30 16:59             ` Dave Kleikamp
2018-07-30 21:36           ` Dave Kleikamp
2018-07-30 21:36             ` Dave Kleikamp
2018-07-31  0:28             ` AKASHI Takahiro
2018-07-31  0:28               ` AKASHI Takahiro
2018-07-31  0:31               ` Dave Kleikamp
2018-07-31  0:31                 ` Dave Kleikamp

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=20180730165757.GF4276@arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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.