From: ChenMiao <chenmiao.ku@gmail.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Cc: Linux OpenRISC <linux-openrisc@vger.kernel.org>,
chenmiao <chenmiao.ku@gmail.com>
Subject: [PATCH v2 0/2] Support fixmap and jump_label for openrisc
Date: Wed, 6 Aug 2025 02:05:02 +0000 [thread overview]
Message-ID: <20250806020520.570988-1-chenmiao.ku@gmail.com> (raw)
From: chenmiao <chenmiao.ku@gmail.com>
Hello everyone,
This implements a basic text patching mechanism and a complete jump_label
implementation for OpenRISC.
1. Implement the patch_map interface and the patch_insn_write single insn
write API by providing FIX_TEXT_POKE0. And create a new insn-def.h to record
openrisc's instruction macro definition which only have OPENRISC_INSN_SIZE
now.
- V2: modify the patch_insn_write API from const void* to u32 insn.
2. Based on the previously implemented patch_insn_write, achieve a complete
jump_label implementation, directly supporting arch_jump_label_transform_queue.
And add a new macro OPENRISC_INSN_NOP in insn-def.h.
- V2: using the modified patch_insn_write API in
arch_jump_label_transform_queue.
Link: https://lore.kernel.org/openrisc/20250805084926.4125564-1-chenmiao.ku@gmail.com/T/#u
Thanks,
Chen Miao
chenmiao (2):
openrisc: Add text patching API support
openrisc: Add jump label support
.../core/jump-labels/arch-support.txt | 2 +-
arch/openrisc/Kconfig | 2 +
arch/openrisc/configs/or1ksim_defconfig | 19 ++---
arch/openrisc/configs/virt_defconfig | 1 +
arch/openrisc/include/asm/Kbuild | 1 -
arch/openrisc/include/asm/fixmap.h | 1 +
arch/openrisc/include/asm/insn-def.h | 15 ++++
arch/openrisc/include/asm/jump_label.h | 68 ++++++++++++++++
arch/openrisc/include/asm/text-patching.h | 13 +++
arch/openrisc/kernel/Makefile | 2 +
arch/openrisc/kernel/jump_label.c | 53 +++++++++++++
arch/openrisc/kernel/patching.c | 79 +++++++++++++++++++
arch/openrisc/kernel/setup.c | 2 +
arch/openrisc/mm/init.c | 2 +-
14 files changed, 245 insertions(+), 15 deletions(-)
create mode 100644 arch/openrisc/include/asm/insn-def.h
create mode 100644 arch/openrisc/include/asm/jump_label.h
create mode 100644 arch/openrisc/include/asm/text-patching.h
create mode 100644 arch/openrisc/kernel/jump_label.c
create mode 100644 arch/openrisc/kernel/patching.c
--
2.45.2
next reply other threads:[~2025-08-06 2:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-06 2:05 ChenMiao [this message]
2025-08-06 2:05 ` [PATCH v2 1/2] openrisc: Add text patching API support ChenMiao
2025-08-09 8:25 ` Stafford Horne
2025-08-10 14:52 ` Miao Chen
2025-08-06 2:05 ` [PATCH v2 2/2] openrisc: Add jump label support ChenMiao
2025-08-09 8:37 ` Stafford Horne
2025-08-10 15:09 ` Miao Chen
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=20250806020520.570988-1-chenmiao.ku@gmail.com \
--to=chenmiao.ku@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-openrisc@vger.kernel.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
all inboxes | Powered by JetHome®