diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-06-04 12:30:02 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-06-19 12:34:34 -0700 |
| commit | e78298556ee5d881f6679effb2a6743969ea6e2d (patch) | |
| tree | 207742567635f7acab0a2e4b6a2bf35ef18977d4 /include/asm-generic/vmlinux.lds.h | |
| parent | vfs: dcache: move hashlen_hash() from callers into d_hash() (diff) | |
| download | linux-e78298556ee5d881f6679effb2a6743969ea6e2d.tar.gz linux-e78298556ee5d881f6679effb2a6743969ea6e2d.zip | |
runtime constants: add default dummy infrastructure
This adds the initial dummy support for 'runtime constants' for when
an architecture doesn't actually support an implementation of fixing
up said runtime constants.
This ends up being the fallback to just using the variables as regular
__ro_after_init variables, and changes the dcache d_hash() function to
use this model.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-generic/vmlinux.lds.h')
| -rw-r--r-- | include/asm-generic/vmlinux.lds.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 5703526d6ebf..389a78415b9b 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -944,6 +944,14 @@ #define CON_INITCALL \ BOUNDED_SECTION_POST_LABEL(.con_initcall.init, __con_initcall, _start, _end) +#define RUNTIME_NAME(t,x) runtime_##t##_##x + +#define RUNTIME_CONST(t,x) \ + . = ALIGN(8); \ + RUNTIME_NAME(t,x) : AT(ADDR(RUNTIME_NAME(t,x)) - LOAD_OFFSET) { \ + *(RUNTIME_NAME(t,x)); \ + } + /* Alignment must be consistent with (kunit_suite *) in include/kunit/test.h */ #define KUNIT_TABLE() \ . = ALIGN(8); \ |
