Re: [PATCH] powernv: Avoid calling trace tlbie in kexec path.
From: Naveen N. Rao <hidden>
Date: 2017-11-22 19:07:12
Mahesh J Salgaonkar wrote:
quoted hunk ↗ jump to hunk
From: Mahesh Salgaonkar <redacted> =20 Rebooting into a new kernel with kexec fails in trace_tlbie() which is called from native_hpte_clear(). This happens if the running kernel has CONFIG_LOCKDEP enabled. With lockdep enabled, the tracepoints always execute few RCU checks regardless of whether tracing is on or off. We are already in the last phase of kexec sequence in real mode with HILE_BE set. At this point the RCU check ends up in RCU_LOCKDEP_WARN and causes kexec to fail. =20 Fix this by not calling trace_tlbie() from native_hpte_clear(). =20 Signed-off-by: Mahesh Salgaonkar <redacted> Reported-by: Aneesh Kumar K.V <redacted> Suggested-by: Michael Ellerman <mpe@ellerman.id.au> --- arch/powerpc/mm/hash_native_64.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) =20diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_nati=
ve_64.c
quoted hunk ↗ jump to hunk
index 3848af1..640cf56 100644--- a/arch/powerpc/mm/hash_native_64.c +++ b/arch/powerpc/mm/hash_native_64.c@@ -47,7 +47,8 @@=20 DEFINE_RAW_SPINLOCK(native_tlbie_lock); =20 -static inline void __tlbie(unsigned long vpn, int psize, int apsize, int=
ssize)
quoted hunk ↗ jump to hunk
+static inline unsigned long ___tlbie(unsigned long vpn, int psize, + int apsize, int ssize) { unsigned long va; unsigned int penc;@@ -100,7 +101,15 @@ static inline void __tlbie(unsigned long vpn, int ps=
ize, int apsize, int ssize)
: "memory"); break; } - trace_tlbie(0, 0, va, 0, 0, 0, 0);
Does it help if you use the _rcuidle variant instead, to turn off all=20 rcu checks for tracing __tlbie()? trace_tlbie_rcuidle(0, 0, va, 0, 0, 0, 0); - Naveen =