From: Samuel Holland <samuel.holland@sifive.com>
To: Palmer Dabbelt <palmer@dabbelt.com>
Cc: "Björn Töpel" <bjorn@rivosinc.com>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
"Samuel Holland" <samuel.holland@sifive.com>,
"Ard Biesheuvel" <ardb@kernel.org>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"Jason Baron" <jbaron@akamai.com>,
"Josh Poimboeuf" <jpoimboe@kernel.org>,
"Peter Zijlstra" <peterz@infradead.org>,
"Steven Rostedt" <rostedt@goodmis.org>,
bpf@vger.kernel.org
Subject: [PATCH v2 0/7] riscv: Various text patching improvements
Date: Wed, 27 Mar 2024 09:04:39 -0700 [thread overview]
Message-ID: <20240327160520.791322-1-samuel.holland@sifive.com> (raw)
Here are a few changes to minimize calls to stop_machine() and
flush_icache_*() in the various text patching functions, as well as
to simplify the code.
This series is based on "[PATCH v3 0/2] riscv: fix patching with IPI"[1].
[1]: https://lore.kernel.org/linux-riscv/20240229121056.203419-1-alexghiti@rivosinc.com/
Changes in v2:
- Remove unnecessary line wrapping
- Further simplify patch_insn_set()/patch_insn_write() loop conditions
- Use min() instead of min_t() since both sides are unsigned long
Samuel Holland (7):
riscv: jump_label: Batch icache maintenance
riscv: jump_label: Simplify assembly syntax
riscv: kprobes: Use patch_text_nosync() for insn slots
riscv: Simplify text patching loops
riscv: Pass patch_text() the length in bytes
riscv: Use offset_in_page() in text patching functions
riscv: Remove extra variable in patch_text_nosync()
arch/riscv/include/asm/jump_label.h | 4 +-
arch/riscv/include/asm/patch.h | 2 +-
arch/riscv/kernel/jump_label.c | 16 +++++--
arch/riscv/kernel/patch.c | 69 ++++++++++++++---------------
arch/riscv/kernel/probes/kprobes.c | 19 ++++----
arch/riscv/net/bpf_jit_comp64.c | 7 +--
6 files changed, 63 insertions(+), 54 deletions(-)
--
2.43.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next reply other threads:[~2024-03-27 17:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-27 16:04 Samuel Holland [this message]
2024-03-27 16:04 ` [PATCH v2 1/7] riscv: jump_label: Batch icache maintenance Samuel Holland
2024-03-27 16:04 ` [PATCH v2 2/7] riscv: jump_label: Simplify assembly syntax Samuel Holland
2024-03-27 16:04 ` [PATCH v2 3/7] riscv: kprobes: Use patch_text_nosync() for insn slots Samuel Holland
2024-03-27 16:04 ` [PATCH v2 4/7] riscv: Simplify text patching loops Samuel Holland
2024-04-02 11:13 ` Björn Töpel
2024-04-24 10:44 ` Conor Dooley
2024-04-24 10:47 ` Conor Dooley
2024-03-27 16:04 ` [PATCH v2 5/7] riscv: Pass patch_text() the length in bytes Samuel Holland
2024-04-24 10:49 ` Conor Dooley
2024-03-27 16:04 ` [PATCH v2 6/7] riscv: Use offset_in_page() in text patching functions Samuel Holland
2024-04-24 10:51 ` Conor Dooley
2024-03-27 16:04 ` [PATCH v2 7/7] riscv: Remove extra variable in patch_text_nosync() Samuel Holland
2024-04-24 10:54 ` Conor Dooley
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=20240327160520.791322-1-samuel.holland@sifive.com \
--to=samuel.holland@sifive.com \
--cc=ardb@kernel.org \
--cc=bjorn@rivosinc.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=jbaron@akamai.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
/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).