From: Andy Chiu <andy.chiu@sifive.com>
To: linux-riscv@lists.infradead.org, palmer@dabbelt.com,
mingo@redhat.com, paul.walmsley@sifive.com,
aou@eecs.berkeley.edu, rostedt@goodmis.org
Cc: guoren@linux.alibaba.com, Andy Chiu <andy.chiu@sifive.com>,
Greentime Hu <greentime.hu@sifive.com>,
Zong Li <zong.li@sifive.com>
Subject: [RFC PATCH riscv/for-next 4/4] riscv: ftrace: do not use stop_machine to update code
Date: Sun, 29 May 2022 22:33:15 +0800 [thread overview]
Message-ID: <20220529143315.3678563-5-andy.chiu@sifive.com> (raw)
In-Reply-To: <20220529143315.3678563-1-andy.chiu@sifive.com>
Now it is safe to remove dependency from stop_machine() to patch code in
ftrace.
Signed-off-by: Andy Chiu <andy.chiu@sifive.com>
Reviewed-by: Greentime Hu <greentime.hu@sifive.com>
Reviewed-by: Zong Li <zong.li@sifive.com>
---
arch/riscv/kernel/ftrace.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/riscv/kernel/ftrace.c b/arch/riscv/kernel/ftrace.c
index d4bf0e5255f6..e7b8bf0a699b 100644
--- a/arch/riscv/kernel/ftrace.c
+++ b/arch/riscv/kernel/ftrace.c
@@ -12,6 +12,11 @@
#include <asm/patch.h>
#ifdef CONFIG_DYNAMIC_FTRACE
+void arch_ftrace_update_code(int command)
+{
+ ftrace_modify_all_code(command);
+}
+
int ftrace_arch_code_modify_prepare(void) __acquires(&text_mutex)
{
mutex_lock(&text_mutex);
--
2.36.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2022-05-29 14:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-29 14:33 [RFC PATCH riscv/for-next 0/4] Enable ftrace with kernel preemption for RISC-V Andy Chiu
2022-05-29 14:33 ` [RFC PATCH riscv/for-next 1/4] riscv: align ftrace to 4 Byte boundary and increase ftrace prologue size Andy Chiu
2022-07-21 5:40 ` Palmer Dabbelt
2022-05-29 14:33 ` [RFC PATCH riscv/for-next 2/4] riscv: export patch_insn_write Andy Chiu
2022-07-21 5:40 ` Palmer Dabbelt
2022-05-29 14:33 ` [RFC PATCH riscv/for-next 3/4] riscv: ftrace: use indirect jump to work with kernel preemption Andy Chiu
2022-07-21 5:40 ` Palmer Dabbelt
2022-05-29 14:33 ` Andy Chiu [this message]
2022-06-05 16:14 ` [RFC PATCH riscv/for-next 4/4] riscv: ftrace: do not use stop_machine to update code Steven Rostedt
2022-07-21 5:40 ` Palmer Dabbelt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220529143315.3678563-5-andy.chiu@sifive.com \
--to=andy.chiu@sifive.com \
--cc=aou@eecs.berkeley.edu \
--cc=greentime.hu@sifive.com \
--cc=guoren@linux.alibaba.com \
--cc=linux-riscv@lists.infradead.org \
--cc=mingo@redhat.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=rostedt@goodmis.org \
--cc=zong.li@sifive.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).