linux-stable/arch/arm64/kernel
Hoeun Ryu a88ce63b64 arm64: kexec: have own crash_smp_send_stop() for crash dump for nonpanic cores
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@gmail.com>
Reviewed-by: James Morse <james.morse@arm.com>
Tested-by: James Morse <james.morse@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-08-21 18:01:04 +01:00
..
probes arm64: Call __show_regs directly 2017-05-30 11:07:41 +01:00
vdso arm64/vdso: Fix nsec handling for CLOCK_MONOTONIC_RAW 2017-06-20 10:41:51 +02:00
.gitignore
acpi.c efi/bgrt: Enable ACPI BGRT handling on arm64 2017-04-05 12:27:25 +02:00
acpi_numa.c arm64/numa: avoid inconsistent information to be printed 2016-09-09 14:59:08 +01:00
acpi_parking_protocol.c arm64: fix endianness annotation in acpi_parking_protocol.c 2017-06-29 11:33:15 +01:00
alternative.c arm64: fix endianness annotation for __apply_alternatives()/get_alt_insn() 2017-06-29 16:32:43 +01:00
arm64ksyms.c arm64: switch to RAW_COPY_USER 2017-03-28 18:23:24 -04:00
armv8_deprecated.c arm64: armv8_deprecated: ensure extension of addr 2017-05-09 17:47:05 +01:00
asm-offsets.c arm64: unwind: reference pt_regs via embedded stack frame 2017-08-09 14:07:13 +01:00
cacheinfo.c arm64: cacheinfo: Remove CCSIDR-based cache information probing 2017-03-20 16:16:54 +00:00
cpu-reset.h arm64: Use __pa_symbol for kernel symbols 2017-01-12 15:05:39 +00:00
cpu-reset.S arm64: Add back cpu reset routines 2016-06-27 16:31:25 +01:00
cpu_errata.c arm64: Add workaround for Cavium Thunder erratum 30115 2017-06-15 09:45:04 +01:00
cpu_ops.c arm64: Convert to using %pOF instead of full_name 2017-07-20 10:28:41 +01:00
cpufeature.c arm64: Implement pmem API support 2017-08-09 12:15:45 +01:00
cpuidle.c arm64: kernel: Update kerneldoc for cpu_suspend() rename 2017-03-10 18:06:24 +00:00
cpuinfo.c arm64: Expose DC CVAP to userspace 2017-08-09 11:00:35 +01:00
crash_dump.c arm64: kdump: provide /proc/vmcore file 2017-04-05 18:31:38 +01:00
debug-monitors.c arm64: fix endianness annotation for debug-monitors.c 2017-06-29 11:02:41 +01:00
efi-entry.S arm64: efi-entry.S: avoid open-coded adr_l 2017-01-17 17:41:14 +00:00
efi-header.S arm64: efi: split Image code and data into separate PE/COFF sections 2017-04-04 17:50:59 +01:00
efi.c efi/arm: Enable DMI/SMBIOS 2017-06-05 17:50:44 +02:00
entry-fpsimd.S arm64: neon: Remove support for nested or hardirq kernel-mode NEON 2017-08-04 15:00:57 +01:00
entry-ftrace.S arm64: include asm/assembler.h in entry-ftrace.S 2017-02-15 11:34:25 +00:00
entry.S Merge branch 'arm64/vmap-stack' of git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux into for-next/core 2017-08-15 18:40:58 +01:00
entry32.S arm64: entry32: remove pointless register assignment 2015-07-10 16:47:13 +01:00
fpsimd.c arm64: neon/efi: Make EFI fpsimd save/restore variables static 2017-08-18 18:29:10 +01:00
ftrace-mod.S arm64: ftrace: add support for far branches to dynamic ftrace 2017-06-07 11:52:02 +01:00
ftrace.c arm64: ftrace: fix !CONFIG_ARM64_MODULE_PLTS kernels 2017-06-23 18:21:13 +01:00
head.S Merge branch 'arm64/exception-stack' of git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux into for-next/core 2017-08-09 15:37:49 +01:00
hibernate-asm.S arm64: Introduce raw_{d,i}cache_line_size 2016-09-09 15:03:29 +01:00
hibernate.c arm64: Move PTE_RDONLY bit handling out of set_pte_at() 2017-08-21 11:12:50 +01:00
hw_breakpoint.c arm64: hw_breakpoint: fix watchpoint matching for tagged pointers 2017-05-09 17:26:40 +01:00
hyp-stub.S arm64: hyp-stub: Zero x0 on successful stub handling 2017-04-09 07:49:35 -07:00
image.h arm64 updates for 4.7: 2016-05-16 17:17:24 -07:00
insn.c arm64 updates for 4.13: 2017-07-05 17:09:27 -07:00
io.c arm64: optimize memcpy_{from,to}io() and memset_io() 2014-11-06 17:25:27 +00:00
irq.c arm64: add basic VMAP_STACK support 2017-08-15 18:36:04 +01:00
jump_label.c jump_label: Rename JUMP_LABEL_{EN,DIS}ABLE to JUMP_LABEL_{JMP,NOP} 2015-08-03 11:34:12 +02:00
kaslr.c arm64: fix endianness annotation in get_kaslr_seed() 2017-06-29 16:32:43 +01:00
kgdb.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task_stack.h> 2017-03-02 08:42:36 +01:00
kuser32.S
machine_kexec.c arm64: kexec: have own crash_smp_send_stop() for crash dump for nonpanic cores 2017-08-21 18:01:04 +01:00
Makefile arm64: ftrace: add support for far branches to dynamic ftrace 2017-06-07 11:52:02 +01:00
module-plts.c arm64: module: split core and init PLT sections 2017-04-26 12:31:00 +01:00
module.c arm64: fix endianness annotation for reloc_insn_movw() & reloc_insn_imm() 2017-06-29 11:09:39 +01:00
module.lds arm64: module: split core and init PLT sections 2017-04-26 12:31:00 +01:00
paravirt.c arm64: introduce CONFIG_PARAVIRT, PARAVIRT_TIME_ACCOUNTING and pv_time_ops 2015-12-21 14:40:54 +00:00
pci.c pci-v4.13-changes 2017-07-08 15:51:57 -07:00
perf_callchain.c arm64: unwind: remove sp from struct stackframe 2017-08-09 14:10:29 +01:00
perf_event.c arm64: perf: add support for Cortex-A35 2017-08-10 17:46:49 +01:00
perf_regs.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task_stack.h> 2017-03-02 08:42:36 +01:00
process.c arm64: unwind: remove sp from struct stackframe 2017-08-09 14:10:29 +01:00
psci.c arm64: Use __pa_symbol for kernel symbols 2017-01-12 15:05:39 +00:00
ptrace.c Merge branch 'arm64/vmap-stack' of git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux into for-next/core 2017-08-15 18:40:58 +01:00
reloc_test_core.c arm64: relocation testing module 2017-04-04 17:03:32 +01:00
reloc_test_syms.S arm64: relocation testing module 2017-04-04 17:03:32 +01:00
relocate_kernel.S arm64: Introduce raw_{d,i}cache_line_size 2016-09-09 15:03:29 +01:00
return_address.c arm64: unwind: remove sp from struct stackframe 2017-08-09 14:10:29 +01:00
setup.c arm64: check return value of of_flat_dt_get_machine_name 2017-05-30 11:07:42 +01:00
signal.c arm64: Abstract syscallno manipulation 2017-08-07 09:58:33 +01:00
signal32.c arm64: Abstract syscallno manipulation 2017-08-07 09:58:33 +01:00
sleep.S arm64: move sp_el0 and tpidr_el1 into cpu_suspend_ctx 2016-11-11 18:25:44 +00:00
smccc-call.S firmware: qcom: scm: Fix interrupted SCM calls 2017-02-03 18:46:33 +00:00
smp.c arm64: kexec: have own crash_smp_send_stop() for crash dump for nonpanic cores 2017-08-21 18:01:04 +01:00
smp_spin_table.c arm64: Use __pa_symbol for kernel symbols 2017-01-12 15:05:39 +00:00
stacktrace.c arm64: add on_accessible_stack() 2017-08-15 18:36:12 +01:00
suspend.c arm64: move sp_el0 and tpidr_el1 into cpu_suspend_ctx 2016-11-11 18:25:44 +00:00
sys.c arm64: compat: Check for AArch32 state 2016-04-20 12:22:42 +01:00
sys32.c arm64: fix implementation of mmap2 compat syscall 2015-03-19 10:43:51 +00:00
sys_compat.c sched/headers: Prepare for the reduction of <linux/sched.h>'s signal API dependency 2017-03-02 08:42:37 +01:00
time.c arm64: unwind: remove sp from struct stackframe 2017-08-09 14:10:29 +01:00
topology.c arm64: Convert to using %pOF instead of full_name 2017-07-20 10:28:41 +01:00
trace-events-emulation.h arm64: Trace emulation of AArch32 legacy instructions 2014-11-20 16:35:02 +00:00
traps.c Merge branch 'arm64/vmap-stack' of git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux into for-next/core 2017-08-15 18:40:58 +01:00
vdso.c arm64/vdso: Support mremap() for vDSO 2017-08-09 12:16:28 +01:00
vmlinux.lds.S arm64: add basic VMAP_STACK support 2017-08-15 18:36:04 +01:00