[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170821163552.pom6iqlaezvtdmie@armageddon.cambridge.arm.com>
Date: Mon, 21 Aug 2017 17:35:53 +0100
From: Catalin Marinas <catalin.marinas@....com>
To: Hoeun Ryu <hoeun.ryu@...il.com>
Cc: Will Deacon <will.deacon@....com>,
James Morse <james.morse@....com>,
Mark Rutland <mark.rutland@....com>,
AKASHI Takahiro <takahiro.akashi@...aro.org>,
Robin Murphy <robin.murphy@....com>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Ingo Molnar <mingo@...nel.org>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Mark Salter <msalter@...hat.com>,
Suzuki K Poulose <suzuki.poulose@....com>,
David Daney <david.daney@...ium.com>,
Rob Herring <robh@...nel.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCHv3] arm64:kexec: have own crash_smp_send_stop() for crash
dump for nonpanic cores
On Thu, Aug 17, 2017 at 11:24:27AM +0900, Hoeun Ryu wrote:
> Commit 0ee5941 : (x86/panic: replace smp_send_stop() with kdump friendly
> version in panic path) introduced crash_smp_send_stop() which is a weak
> function and can be overridden by architecture codes to fix the side effect
> caused by commit f06e515 : (kernel/panic.c: add "crash_kexec_post_
> notifiers" option).
>
> ARM64 architecture uses the weak version function and the problem is that
> the weak function simply calls smp_send_stop() which makes other CPUs
> offline and takes away the chance to save crash information for nonpanic
> CPUs in machine_crash_shutdown() when crash_kexec_post_notifiers kernel
> option is enabled.
>
> Calling smp_send_crash_stop() in machine_crash_shutdown() is useless
> because all nonpanic CPUs are already offline by smp_send_stop() in this
> case and smp_send_crash_stop() only works against online CPUs.
>
> The result is that secondary CPUs registers are not saved by
> crash_save_cpu() and the vmcore file misreports these CPUs as being
> offline.
>
> crash_smp_send_stop() is implemented to fix this problem by replacing the
> existing smp_send_crash_stop() and adding a check for multiple calling to
> the function. The function (strong symbol version) saves crash information
> for nonpanic CPUs and machine_crash_shutdown() tries to save crash
> information for nonpanic CPUs only when crash_kexec_post_notifiers kernel
> option is disabled.
>
> * crash_kexec_post_notifiers : false
>
> panic()
> __crash_kexec()
> machine_crash_shutdown()
> crash_smp_send_stop() <= save crash dump for nonpanic cores
>
> * crash_kexec_post_notifiers : true
>
> panic()
> crash_smp_send_stop() <= save crash dump for nonpanic cores
> __crash_kexec()
> machine_crash_shutdown()
> crash_smp_send_stop() <= just return.
>
> Signed-off-by: Hoeun Ryu <hoeun.ryu@...il.com>
> Reviewed-by: James Morse <james.morse@....com>
> Tested-by: James Morse <james.morse@....com>
Queued for 4.14. Thanks.
--
Catalin
Powered by blists - more mailing lists