Michal Suchanek e6674e
From 8d81296cfcce89013a714feb8d25004a156f8181 Mon Sep 17 00:00:00 2001
Michal Suchanek e6674e
From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Michal Suchanek e6674e
Date: Thu, 30 Nov 2017 14:35:54 +0530
Michal Suchanek e6674e
Subject: [PATCH] powerpc/radix: Remove trace_tlbie call from
Michal Suchanek e6674e
 radix__flush_tlb_all
Michal Suchanek e6674e
Michal Suchanek e6674e
References: bsc#1055117, fate#323286, git-fixes
Michal Suchanek e6674e
Patch-mainline: v4.16-rc1
Michal Suchanek e6674e
Git-commit: 8d81296cfcce89013a714feb8d25004a156f8181
Michal Suchanek e6674e
Michal Suchanek e6674e
radix__flush_tlb_all() is called only in kexec path in real mode and any
Michal Suchanek e6674e
tracepoints at this stage will make kexec to fail if enabled.
Michal Suchanek e6674e
Michal Suchanek e6674e
To verify enable tlbie trace before kexec.
Michal Suchanek e6674e
Michal Suchanek e6674e
$ echo 1 > /sys/kernel/debug/tracing/events/powerpc/tlbie/enable
Michal Suchanek e6674e
== kexec into new kernel and kexec fails.
Michal Suchanek e6674e
Michal Suchanek e6674e
Fix this by not calling trace_tlbie from radix__flush_tlb_all().
Michal Suchanek e6674e
Michal Suchanek e6674e
Fixes: 0428491cba92 ("powerpc/mm: Trace tlbie(l) instructions")
Michal Suchanek e6674e
Cc: stable@vger.kernel.org # v4.13+
Michal Suchanek e6674e
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Michal Suchanek e6674e
Acked-by: Balbir Singh <bsingharora@gmail.com>
Michal Suchanek e6674e
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Michal Suchanek e6674e
Acked-by: Michal Suchanek <msuchanek@suse.de>
Michal Suchanek e6674e
---
Michal Suchanek e6674e
 arch/powerpc/mm/tlb-radix.c | 2 --
Michal Suchanek e6674e
 1 file changed, 2 deletions(-)
Michal Suchanek e6674e
Michal Suchanek e6674e
diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c
Michal Suchanek e6674e
index fbaa429471a1..71d1b19ad1c0 100644
Michal Suchanek e6674e
--- a/arch/powerpc/mm/tlb-radix.c
Michal Suchanek e6674e
+++ b/arch/powerpc/mm/tlb-radix.c
Michal Suchanek e6674e
@@ -666,14 +666,12 @@ void radix__flush_tlb_all(void)
Michal Suchanek e6674e
 	 */
Michal Suchanek e6674e
 	asm volatile(PPC_TLBIE_5(%0, %4, %3, %2, %1)
Michal Suchanek e6674e
 		     : : "r"(rb), "i"(r), "i"(1), "i"(ric), "r"(rs) : "memory");
Michal Suchanek e6674e
-	trace_tlbie(0, 0, rb, rs, ric, prs, r);
Michal Suchanek e6674e
 	/*
Michal Suchanek e6674e
 	 * now flush host entires by passing PRS = 0 and LPID == 0
Michal Suchanek e6674e
 	 */
Michal Suchanek e6674e
 	asm volatile(PPC_TLBIE_5(%0, %4, %3, %2, %1)
Michal Suchanek e6674e
 		     : : "r"(rb), "i"(r), "i"(prs), "i"(ric), "r"(0) : "memory");
Michal Suchanek e6674e
 	asm volatile("eieio; tlbsync; ptesync": : :"memory");
Michal Suchanek e6674e
-	trace_tlbie(0, 0, rb, 0, ric, prs, r);
Michal Suchanek e6674e
 }
Michal Suchanek e6674e
 
Michal Suchanek e6674e
 void radix__flush_tlb_pte_p9_dd1(unsigned long old_pte, struct mm_struct *mm,
Michal Suchanek e6674e
-- 
Michal Suchanek e6674e
2.13.6
Michal Suchanek e6674e