Thread (65 messages) flat view 65 messages, 10 authors, 1d ago

Re: [Linux PPC] Disable PREEMPT

From: Shrikanth Hegde <sshegde@linux.ibm.com>
Date: 2026-09-18 09:27:09
Subsystem: function hooks (ftrace), linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Steven Rostedt, Masami Hiramatsu, Madhavan Srinivasan, Linus Torvalds

Hi Michal.

On 9/17/26 7:45 PM, Shrikanth Hegde wrote:
Hi Michal,
quoted
quoted
Give it a try.

I am suspecting both lockup, stack corruptions are secondary symptoms here.
While recreate, I have different type of traces.
Yes, it does work for the crash I see.
Thanks. Give me sometime to see further on that. Didn't get any time today.
This is going to be the fix IMO. It passes all the recreates i have as of now.
(Please ignore the whitespace mangling if any)

Let me write changelog and send it across.
---
diff --git a/arch/powerpc/kernel/trace/ftrace_entry.S b/arch/powerpc/kernel/trace/ftrace_entry.S
index 6599fe3c6234..54c8727b48cd 100644
--- a/arch/powerpc/kernel/trace/ftrace_entry.S
+++ b/arch/powerpc/kernel/trace/ftrace_entry.S
@@ -220,7 +220,9 @@
  
  	/* Restore gprs */
  	.if \allregs == 1
-	REST_GPRS(2, 31, r1)
+	REST_GPRS(2, 12, r1)
+	/* Do not restore a stale PACA pointer if the task migrated */
+	REST_GPRS(14, 31, r1)
  	.else
  	REST_GPRS(3, 10, r1)
  #if defined(CONFIG_LIVEPATCH_64) || defined(CONFIG_PPC_FTRACE_OUT_OF_LINE)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help