linux-stable/arch/powerpc
Breno Leitao 115a0d6687 powerpc/xmon: Fix invocation inside lock region
[ Upstream commit 8d4a862276 ]

Currently xmon needs to get devtree_lock (through rtas_token()) during its
invocation (at crash time). If there is a crash while devtree_lock is being
held, then xmon tries to get the lock but spins forever and never get into
the interactive debugger, as in the following case:

	int *ptr = NULL;
	raw_spin_lock_irqsave(&devtree_lock, flags);
	*ptr = 0xdeadbeef;

This patch avoids calling rtas_token(), thus trying to get the same lock,
at crash time. This new mechanism proposes getting the token at
initialization time (xmon_init()) and just consuming it at crash time.

This would allow xmon to be possible invoked independent of devtree_lock
being held or not.

Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-01-26 09:32:37 +01:00
..
boot powerpc/boot: Set target when cross-compiling for clang 2019-01-13 09:51:05 +01:00
configs powerpc updates for 4.19 2018-08-17 11:32:50 -07:00
crypto powerpc updates for 4.19 2018-08-17 11:32:50 -07:00
include powerpc/io: Fix the IO workarounds code to work with Radix 2018-12-01 09:37:32 +01:00
kernel powerpc/tm: Set MSR[TS] just prior to recheckpoint 2019-01-13 09:51:08 +01:00
kvm KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE 2018-12-01 09:37:32 +01:00
lib powerpc/lib: fix book3s/32 boot failure due to code patching 2018-10-02 23:34:14 +10:00
math-emu
mm powerpc/mm: Fallback to RAM if the altmap is unusable 2019-01-13 09:50:57 +01:00
net powerpc updates for 4.19 2018-08-17 11:32:50 -07:00
oprofile treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
perf powerpc updates for 4.19 2018-08-17 11:32:50 -07:00
platforms powerpc: consolidate -mno-sched-epilog into FTRACE flags 2019-01-13 09:51:05 +01:00
purgatory powerpc updates for 4.19 2018-08-17 11:32:50 -07:00
sysdev treewide: correct "differenciate" and "instanciate" typos 2018-08-23 18:48:43 -07:00
tools powerpc: Add a checkpatch wrapper with our preferred settings 2018-08-07 21:49:25 +10:00
xmon powerpc/xmon: Fix invocation inside lock region 2019-01-26 09:32:37 +01:00
Kconfig powerpc: disable support for relative ksymtab references 2018-08-29 16:12:07 -07:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile powerpc: avoid -mno-sched-epilog on GCC 4.9 and newer 2019-01-13 09:51:05 +01:00
Makefile.postlink