linux/arch/mips
Hidehiro Kawai 54c721b857 mips/panic: replace smp_send_stop() with kdump friendly version in panic path
Daniel Walker reported problems which happens when
crash_kexec_post_notifiers kernel option is enabled
(https://lkml.org/lkml/2015/6/24/44).

In that case, smp_send_stop() is called before entering kdump routines
which assume other CPUs are still online.  As the result, kdump
routines fail to save other CPUs' registers.  Additionally for MIPS
OCTEON, it misses to stop the watchdog timer.

To fix this problem, call a new kdump friendly function,
crash_smp_send_stop(), instead of the smp_send_stop() when
crash_kexec_post_notifiers is enabled.  crash_smp_send_stop() is a
weak function, and it just call smp_send_stop().  Architecture
codes should override it so that kdump can work appropriately.
This patch provides MIPS version.

Fixes: f06e5153f4 (kernel/panic.c: add "crash_kexec_post_notifiers" option)
Link: http://lkml.kernel.org/r/20160810080950.11028.28000.stgit@sysi4-13.yrl.intra.hitachi.co.jp
Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Reported-by: Daniel Walker <dwalker@fifo99.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Daniel Walker <dwalker@fifo99.com>
Cc: Xunlei Pang <xpang@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Toshi Kani <toshi.kani@hpe.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: David Daney <david.daney@cavium.com>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: "Steven J. Hill" <steven.hill@cavium.com>
Cc: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-10-11 15:06:32 -07:00
..
alchemy Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-05-19 10:02:26 -07:00
ar7 MIPS: ar7: use gpiochip data pointer 2016-02-19 09:51:43 +01:00
ath25 genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
ath79 MIPS: ath79: Fix test for error return of clk_register_fixed_factor(). 2016-09-13 14:13:26 +02:00
bcm47xx MIPS: BCM47xx: Move SPROM driver to drivers/firmware/ 2016-05-13 14:01:43 +02:00
bcm63xx Merge branch 'ib-mfd-regulator-gpio-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into devel 2016-03-09 17:40:37 +07:00
bmips MIPS: store the appended dtb address in a variable 2016-08-02 14:00:16 +02:00
boot MIPS: tools: Fix relocs tool compiler warnings 2016-08-03 09:00:55 +02:00
cavium-octeon mips/panic: replace smp_send_stop() with kdump friendly version in panic path 2016-10-11 15:06:32 -07:00
cobalt MIPS: Cobalt: Fix typo 2016-08-03 08:16:30 +02:00
configs Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-08-06 09:13:11 -04:00
dec MIPS: DEC: Avoid la pseudo-instruction in delay slots 2016-09-29 18:59:49 +02:00
emma
fw MIPS: Fix misspellings in comments. 2016-04-03 12:32:09 +02:00
include mips/panic: replace smp_send_stop() with kdump friendly version in panic path 2016-10-11 15:06:32 -07:00
jazz MIPS: Jazz: Migrate to new 'set-state' interface 2015-09-03 12:07:50 +02:00
jz4740 tree-wide: replace config_enabled() with IS_ENABLED() 2016-08-04 08:50:07 -04:00
kernel mips/panic: replace smp_send_stop() with kdump friendly version in panic path 2016-10-11 15:06:32 -07:00
kvm MIPS KVM updates for v4.9 2016-09-29 16:26:52 +02:00
lantiq Merge branch '4.7-fixes' into mips-for-linux-next 2016-08-03 12:55:49 +02:00
lasat MIPS: Lasat: A couple off by one bugs in picvue_proc.c 2016-05-28 12:35:06 +02:00
lib MIPS: lib: Mark intrinsics notrace 2016-05-28 12:35:11 +02:00
loongson32 MIPS: Loongson1B: Some updates/fixes for LS1B 2016-05-13 14:02:05 +02:00
loongson64 mips/loongson/smp: Convert to hotplug state machine 2016-09-19 21:44:32 +02:00
math-emu MIPS: Fix delay slot emulation count in debugfs 2016-09-25 01:59:16 +02:00
mm MIPS: Fix detection of unsupported highmem with cache aliases 2016-09-29 18:59:49 +02:00
mti-malta MIPS: Malta: Fix IOCU disable switch read for MIPS64 2016-09-29 18:59:49 +02:00
mti-sead3 mips: Remove unnecessary of_platform_populate with default match table 2016-06-23 15:00:29 -05:00
net Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-08-06 09:13:11 -04:00
netlogic dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
oprofile MIPS/Loongson-3: Convert oprofile to hotplug state machine 2016-07-15 10:40:29 +02:00
paravirt MIPS: SMP: Don't increment irq_count multiple times for call function IPIs 2015-08-03 09:25:12 +02:00
pci MIPS/PCI: Claim bus resources on PCI_PROBE_ONLY set-ups 2016-06-23 16:32:20 -05:00
pic32 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-08-06 09:13:11 -04:00
pistachio Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-08-06 09:13:11 -04:00
pmcs-msp71xx MIPS: MSP71xx: Use __flush_cache_all instead of flush_cache_all. 2016-05-13 14:01:38 +02:00
pnx833x MIPS: make PCI_DMA_BUS_IS_PHYS=1 constant 2016-05-13 14:02:17 +02:00
power MIPS: Hibernate: flush TLB entries earlier 2015-04-10 15:41:52 +02:00
ralink Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-08-06 09:13:11 -04:00
rb532 MIPS: rb532: use gpiochip data pointer 2016-02-19 09:51:44 +01:00
sgi-ip22 rtc: ds1286: move header to linux/rtc 2016-07-08 16:23:11 +02:00
sgi-ip27 MIPS: Spelling fix lets -> let's 2016-05-28 12:35:09 +02:00
sgi-ip32 MIPS: IP32: Fix build errors in reset code in DS1685 platform hook. 2015-05-13 00:01:41 +02:00
sibyte MIPS: Sibyte: Fix Kconfig dependencies of SIBYTE_BUS_WATCHER 2016-05-09 12:00:03 +02:00
sni char/genrtc: remove asm-generic/rtc.h from mips 2016-06-04 00:23:36 +02:00
txx9 treewide: replace obsolete _refok by __ref 2016-08-02 17:31:41 -04:00
vdso MIPS: Build microMIPS VDSO for microMIPS kernels 2016-05-28 12:35:12 +02:00
vr41xx MIPS: VR41xx: Fix typo 2016-05-28 12:35:09 +02:00
xilfpga mips: Remove unnecessary of_platform_populate with default match table 2016-06-23 15:00:29 -05:00
Kbuild MIPS: Initial implementation of a VDSO 2015-11-11 08:36:36 +01:00
Kbuild.platforms MIPS: Add support for PIC32MZDA platform 2016-01-24 02:53:28 +01:00
Kconfig atomic64: no need for CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE 2016-10-07 18:46:30 -07:00
Kconfig.debug MIPS: Remove compact branch policy Kconfig entries 2016-09-13 14:14:50 +02:00
Makefile MIPS: Remove compact branch policy Kconfig entries 2016-09-13 14:14:50 +02:00