From: guoren@kernel.org
To: arnd@arndb.de, palmer@rivosinc.com, rostedt@goodmis.org,
andy.chiu@sifive.com, greentime.hu@sifive.com,
zong.li@sifive.com, jrtc27@jrtc27.com, mingo@redhat.com,
palmer@dabbelt.com
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org, guoren@kernel.org,
Guo Ren <guoren@linux.alibaba.com>
Subject: [PATCH V2 0/3] riscv: ftrace: Fixup ftrace detour code
Date: Tue, 20 Sep 2022 23:49:07 -0400 [thread overview]
Message-ID: <20220921034910.3142465-1-guoren@kernel.org> (raw)
From: Guo Ren <guoren@linux.alibaba.com>
The previous ftrace detour implementation fc76b8b8011 ("riscv: Using
PATCHABLE_FUNCTION_ENTRY instead of MCOUNT") contain three problems. The
most horrible bug is preemption panic which found by Andy [1]. Let's
disable preemption for ftrace first, and Andy could continue the
ftrace preemption work.
[1]: https://lpc.events/event/16/contributions/1171/
V2:
- Add Signed-off for preemption fixup.
V1:
https://lore.kernel.org/linux-riscv/20220916103817.9490-1-guoren@kernel.org/
Andy Chiu (1):
riscv: ftrace: Fixup panic by disabling preemption
Guo Ren (2):
riscv: ftrace: Remove wasted nops for !RISCV_ISA_C
riscv: ftrace: Reduce the detour code size to half
arch/riscv/Kconfig | 2 +-
arch/riscv/Makefile | 6 ++-
arch/riscv/include/asm/ftrace.h | 46 ++++++++++++++++++-----
arch/riscv/kernel/ftrace.c | 65 ++++++++++-----------------------
arch/riscv/kernel/mcount-dyn.S | 43 +++++++++-------------
5 files changed, 78 insertions(+), 84 deletions(-)
--
2.36.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next reply other threads:[~2022-09-21 3:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-21 3:49 guoren [this message]
2022-09-21 3:49 ` [PATCH V2 1/3] riscv: ftrace: Fixup panic by disabling preemption guoren
2022-09-21 3:49 ` [PATCH V2 2/3] riscv: ftrace: Remove wasted nops for !RISCV_ISA_C guoren
2022-09-21 3:49 ` [PATCH V2 3/3] riscv: ftrace: Reduce the detour code size to half guoren
2022-11-22 8:56 ` Song Shuai
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=20220921034910.3142465-1-guoren@kernel.org \
--to=guoren@kernel.org \
--cc=andy.chiu@sifive.com \
--cc=arnd@arndb.de \
--cc=greentime.hu@sifive.com \
--cc=guoren@linux.alibaba.com \
--cc=jrtc27@jrtc27.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mingo@redhat.com \
--cc=palmer@dabbelt.com \
--cc=palmer@rivosinc.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).