summaryrefslogtreecommitdiff
path: root/arch/s390/kernel/ftrace.c
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2021-10-01 14:21:43 +0200
committerVasily Gorbik <gor@linux.ibm.com>2021-10-11 20:55:58 +0200
commitae2b9a11b494a9ec59d7dc11d42654d659f859c6 (patch)
treeb6d6cd4e1115b968bfe0521296bcbaebfaa50a1a /arch/s390/kernel/ftrace.c
parent1c27dfb24e3b2a026488aa51e9991e27a1d94164 (diff)
s390/ftrace: use text_poke_sync_lock()
Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel/ftrace.c')
-rw-r--r--arch/s390/kernel/ftrace.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/s390/kernel/ftrace.c b/arch/s390/kernel/ftrace.c
index 5d0c45c13b5f..04a3e88c58d7 100644
--- a/arch/s390/kernel/ftrace.c
+++ b/arch/s390/kernel/ftrace.c
@@ -17,6 +17,7 @@
#include <linux/kprobes.h>
#include <trace/syscall.h>
#include <asm/asm-offsets.h>
+#include <asm/text-patching.h>
#include <asm/cacheflush.h>
#include <asm/ftrace.lds.h>
#include <asm/nospec-branch.h>
@@ -207,14 +208,13 @@ void arch_ftrace_update_code(int command)
ftrace_modify_all_code(command);
}
-static void __ftrace_sync(void *dummy)
-{
-}
-
int ftrace_arch_code_modify_post_process(void)
{
- /* Send SIGP to the other CPUs, so they see the new code. */
- smp_call_function(__ftrace_sync, NULL, 1);
+ /*
+ * Flush any pre-fetched instructions on all
+ * CPUs to make the new code visible.
+ */
+ text_poke_sync_lock();
return 0;
}