Greg Ungerer <[email protected]> writes:
> Attached is a test case - derived from the original signal.c code.
It looks like with all those trivial functions in the non-MMU case the
compiler sees enough to consider the writes to the (pseudo) function
arguments dead.
How about this:
diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c
index af1c4f3..3cc9eaa 100644
--- a/arch/m68k/kernel/signal.c
+++ b/arch/m68k/kernel/signal.c
@@ -757,6 +757,11 @@ asmlinkage int do_sigreturn(unsigned long __unused)
if (restore_sigcontext(regs, &frame->sc, frame + 1))
goto badframe;
+ /*
+ * Force a barrier so that the compiler does not consider writes
+ * to *sw and *regs as dead.
+ */
+ barrier();
return regs->d0;
badframe:
@@ -781,6 +786,11 @@ asmlinkage int do_rt_sigreturn(unsigned long __unused)
if (rt_restore_ucontext(regs, sw, &frame->uc))
goto badframe;
+ /*
+ * Force a barrier so that the compiler does not consider writes
+ * to *sw and *regs as dead.
+ */
+ barrier();
return regs->d0;
badframe:
Andreas.
--
Andreas Schwab, [email protected]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html