diff options
author | Mike Rapoport (IBM) <rppt@kernel.org> | 2024-05-05 18:06:24 +0200 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2024-05-14 09:31:44 +0200 |
commit | 0cc2dc4902f425e346d46deeea2352d9fba75375 (patch) | |
tree | 8e3b6c6800e6144849984089fa01267f647f1014 /arch/loongarch/kernel | |
parent | powerpc: extend execmem_params for kprobes allocations (diff) | |
download | linux-0cc2dc4902f425e346d46deeea2352d9fba75375.tar.xz linux-0cc2dc4902f425e346d46deeea2352d9fba75375.zip |
arch: make execmem setup available regardless of CONFIG_MODULES
execmem does not depend on modules, on the contrary modules use
execmem.
To make execmem available when CONFIG_MODULES=n, for instance for
kprobes, split execmem_params initialization out from
arch/*/kernel/module.c and compile it when CONFIG_EXECMEM=y
Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'arch/loongarch/kernel')
-rw-r--r-- | arch/loongarch/kernel/module.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/arch/loongarch/kernel/module.c b/arch/loongarch/kernel/module.c index ca6dd7ea1610..36d6d9eeb7c7 100644 --- a/arch/loongarch/kernel/module.c +++ b/arch/loongarch/kernel/module.c @@ -18,7 +18,6 @@ #include <linux/ftrace.h> #include <linux/string.h> #include <linux/kernel.h> -#include <linux/execmem.h> #include <asm/alternative.h> #include <asm/inst.h> #include <asm/unwind.h> @@ -491,24 +490,6 @@ int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, return 0; } -static struct execmem_info execmem_info __ro_after_init; - -struct execmem_info __init *execmem_arch_setup(void) -{ - execmem_info = (struct execmem_info){ - .ranges = { - [EXECMEM_DEFAULT] = { - .start = MODULES_VADDR, - .end = MODULES_END, - .pgprot = PAGE_KERNEL, - .alignment = 1, - }, - }, - }; - - return &execmem_info; -} - static void module_init_ftrace_plt(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mod) { |