alpha: Add support for HAVE_ARCH_JUMP_LABEL
Subsystems (3)
Magnus Lindholm
maintainerv4 cover alpha: Add support for HAVE_ARCH_JUMP_LABEL
Apply-time cleanups following Matt Turner's review of v3:
- Move jump_label.o beside the other object entries near the top of arch/alpha/kernel/Makefile, outside the GENERIC block.
- Include linux/cacheflush.h instead of asm/cacheflush.h.
- Regenerate the cover-letter diffstat and retain Matt's Reviewed-by.
The jump-label implementation is otherwise unchanged from v3.
V3 was cross-built with W=1 and boot-tested on a three-CPU AlphaServer ES40 with CMA v2. The static-key boot selftest and 30 module load/unload cycles passed, including cross-module keys. This revised export has not been rebuilt or boot-tested separately.
Batching I-cache synchronization and relative jump-table entries remain follow-ups. The early jump_label_init() call needed before Alpha's new early-parameter parsing is carried by the separate CMA v3 series.
This patch applies to for-next at 0b4cadbe7c39.
Magnus Lindholm (1):
alpha: Add support for HAVE_ARCH_JUMP_LABEL
.../core/jump-labels/arch-support.txt | 2 +- arch/alpha/Kconfig | 1 + arch/alpha/include/asm/jump_label.h | 65 +++++++++++++++ arch/alpha/kernel/Makefile | 1 + arch/alpha/kernel/jump_label.c | 79 +++++++++++++++++++ 5 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 arch/alpha/include/asm/jump_label.h create mode 100644 arch/alpha/kernel/jump_label.c
base-commit: 0b4cadbe7c39d830dec35c4a2655483de0dae568
Signature · 1 line
2.43.0
Magnus Lindholm
maintainerPATCH v4 1/1 alpha: Add support for HAVE_ARCH_JUMP_LABEL
Implement static key (jump label) support for Alpha. Emit jump table entries and patch instruction sites between NOP and BR, synchronizing instruction caches after each update.
Warn and leave the instruction unchanged if the target is outside the signed 21-bit branch displacement range.
This relies on kernel and module text being writable; Alpha does not implement STRICT_KERNEL_RWX or STRICT_MODULE_RWX.
--- .../core/jump-labels/arch-support.txt | 2 +- arch/alpha/Kconfig | 1 + arch/alpha/include/asm/jump_label.h | 65 +++++++++++++++ arch/alpha/kernel/Makefile | 1 + arch/alpha/kernel/jump_label.c | 79 +++++++++++++++++++ 5 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 arch/alpha/include/asm/jump_label.h create mode 100644 arch/alpha/kernel/jump_label.c
Documentation/features/core/jump-labels/arch-support.txt +1 -1
@@ -6,7 +6,7 @@ ----------------------- | arch |status| ----------------------- - | alpha: | TODO | + | alpha: | ok | | arc: | ok | | arm: | ok | | arm64: | ok |
arch/alpha/Kconfig +1 -0
@@ -28,6 +28,7 @@ config ALPHA select PCI_DOMAINS if PCI select PCI_SYSCALL if PCI select HAVE_ARCH_COMPILER_H + select HAVE_ARCH_JUMP_LABEL select HAVE_ASM_MODVERSIONS select HAVE_DEBUG_KMEMLEAK select HAVE_GUP_FAST
arch/alpha/include/asm/jump_label.h new file +65 -0
65 lines not on this page · raw message
arch/alpha/kernel/Makefile +1 -0
@@ -19,6 +19,7 @@ obj-$(CONFIG_SRM_ENV) += srm_env.o obj-$(CONFIG_MODULES) += module.o obj-$(CONFIG_PERF_EVENTS) += perf_event.o obj-$(CONFIG_HAVE_PERF_REGS) += perf_regs.o +obj-$(CONFIG_JUMP_LABEL) += jump_label.o obj-$(CONFIG_RTC_DRV_ALPHA) += rtc.o ifdef CONFIG_ALPHA_GENERIC
arch/alpha/kernel/jump_label.c new file +79 -0
79 lines not on this page · raw message
Signature · 1 line
2.43.0