Add support for HAVE_ARCH_JUMP_LABEL
Subsystems (2)
Magnus Lindholm
maintainercover Add support for HAVE_ARCH_JUMP_LABEL
This patch adds jump label (static key) support for Alpha. Testing and verification were performed on an UP2000+ system.
Verification steps:
- Confirmed __jump_table section is present at runtime via /proc/kallsyms and contains a non-zero number of entries.
- Instrumented arch_jump_label_transform() to log patch
operations and verified instruction sites toggle between:
NOP (bis $31,$31,$31, 0x47ff041f)
BR (br $31,target) - Added temporary instrumentation in arch_jump_label_transform() to log old/new instruction values at each patch site, and used a Python script to validate correct NOP/BR transitions and branch encoding, confirming functional runtime patching.
Instruction stream synchronization uses imb()/smp_imb() via flush_icache_range(), and runtime behavior confirms correct I-cache coherency.
The system remained stable throughout all testing.
Magnus Lindholm (1):
alpha: Add support for HAVE_ARCH_JUMP_LABEL
arch/alpha/Kconfig | 1 + arch/alpha/include/asm/jump_label.h | 66 +++++++++++++++++++++++ arch/alpha/kernel/Makefile | 1 + arch/alpha/kernel/jump_label.c | 81 +++++++++++++++++++++++++++++ 4 files changed, 149 insertions(+) create mode 100644 arch/alpha/include/asm/jump_label.h create mode 100644 arch/alpha/kernel/jump_label.c
Signature · 1 line
2.52.0
Magnus Lindholm
maintainerPATCH 1/1 alpha: Add support for HAVE_ARCH_JUMP_LABEL
Implement static key (jump label) support for Alpha.
Provide arch_static_branch() helpers and implement arch_jump_label_transform() to patch a single instruction site between NOP and BR, with appropriate I-cache synchronization.
Tested on Alpha UP2000+ SMP. Static key sites toggle correctly under tracepoint enable/disable and repeated stress testing without faults.
--- arch/alpha/Kconfig | 1 + arch/alpha/include/asm/jump_label.h | 66 +++++++++++++++++++++++ arch/alpha/kernel/Makefile | 1 + arch/alpha/kernel/jump_label.c | 81 +++++++++++++++++++++++++++++ 4 files changed, 149 insertions(+) create mode 100644 arch/alpha/include/asm/jump_label.h create mode 100644 arch/alpha/kernel/jump_label.c
arch/alpha/Kconfig +1 -0
@@ -41,6 +41,7 @@ config ALPHA select MMU_GATHER_RCU_TABLE_FREE select SPARSEMEM_EXTREME if SPARSEMEM select ZONE_DMA + select HAVE_ARCH_JUMP_LABEL help The Alpha is a 64-bit general-purpose processor designed and marketed by the Digital Equipment Corporation of blessed memory,
arch/alpha/include/asm/jump_label.h new file +66 -0
66 lines not on this page · raw message
arch/alpha/kernel/Makefile +1 -0
@@ -19,6 +19,7 @@ obj-$(CONFIG_MODULES) += module.o obj-$(CONFIG_PERF_EVENTS) += perf_event.o obj-$(CONFIG_RTC_DRV_ALPHA) += rtc.o obj-$(CONFIG_AUDIT) += audit.o +obj-$(CONFIG_JUMP_LABEL) += jump_label.o ifdef CONFIG_ALPHA_GENERIC
arch/alpha/kernel/jump_label.c new file +81 -0
81 lines not on this page · raw message
Signature · 1 line
2.52.0