[PATCH v6 7/8] asm-generic/runtime-const: Add dummy runtime_const_mask_32()

K Prateek Nayak kprateek.nayak at amd.com
Mon Jul 27 22:25:39 PDT 2026


From: Peter Zijlstra <peterz at infradead.org>

Add a dummy runtime_const_mask_32() for all the architectures that do
not support runtime-const.

Link: https://patch.msgid.link/20260227161841.GH606826@noisy.programming.kicks-ass.net
Signed-off-by: Peter Zijlstra <peterz at infradead.org>
Reviewed-by: Charlie Jenkins <thecharlesjenkins at gmail.com>
Tested-by: Charlie Jenkins <thecharlesjenkins at gmail.com>
Signed-off-by: K Prateek Nayak <kprateek.nayak at amd.com>
---
changelog v5..v6:

o Picked up tags from Charlie. (Thanks a ton!)
o Picked up Peter's S-o-b from his tree.
---
 include/asm-generic/runtime-const.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/asm-generic/runtime-const.h b/include/asm-generic/runtime-const.h
index 670499459514..03e6e3e02401 100644
--- a/include/asm-generic/runtime-const.h
+++ b/include/asm-generic/runtime-const.h
@@ -10,6 +10,7 @@
  */
 #define runtime_const_ptr(sym) (sym)
 #define runtime_const_shift_right_32(val, sym) ((u32)(val)>>(sym))
+#define runtime_const_mask_32(val, sym) ((u32)(val)&(sym))
 #define runtime_const_init(type,sym) do { } while (0)
 
 #endif
-- 
2.34.1




More information about the linux-riscv mailing list