diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-03-10 10:02:49 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-03-10 10:02:49 +0100 |
commit | cb05c6c82fb0853b53ecf983c29ab02aaca13194 (patch) | |
tree | e6316ab7e1625a550079803e8f80ab3f327448a9 /arch/riscv/kernel/module.c | |
parent | d24e163af05c93e923aff76e01e6e30182cb38e3 (diff) | |
parent | 2c523b344dfa65a3738e7039832044aa133c75fb (diff) | |
download | kernel_replicant_linux-cb05c6c82fb0853b53ecf983c29ab02aaca13194.tar.gz kernel_replicant_linux-cb05c6c82fb0853b53ecf983c29ab02aaca13194.tar.bz2 kernel_replicant_linux-cb05c6c82fb0853b53ecf983c29ab02aaca13194.zip |
Merge 5.6-rc5 into tty-next
We need the vt fixes in here and it resolves a merge issue with
drivers/tty/vt/selection.c
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/riscv/kernel/module.c')
-rw-r--r-- | arch/riscv/kernel/module.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/riscv/kernel/module.c b/arch/riscv/kernel/module.c index b7401858d872..8bbe5dbe1341 100644 --- a/arch/riscv/kernel/module.c +++ b/arch/riscv/kernel/module.c @@ -8,6 +8,10 @@ #include <linux/err.h> #include <linux/errno.h> #include <linux/moduleloader.h> +#include <linux/vmalloc.h> +#include <linux/sizes.h> +#include <asm/pgtable.h> +#include <asm/sections.h> static int apply_r_riscv_32_rela(struct module *me, u32 *location, Elf_Addr v) { @@ -386,3 +390,15 @@ int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, return 0; } + +#if defined(CONFIG_MMU) && defined(CONFIG_64BIT) +#define VMALLOC_MODULE_START \ + max(PFN_ALIGN((unsigned long)&_end - SZ_2G), VMALLOC_START) +void *module_alloc(unsigned long size) +{ + return __vmalloc_node_range(size, 1, VMALLOC_MODULE_START, + VMALLOC_END, GFP_KERNEL, + PAGE_KERNEL_EXEC, 0, NUMA_NO_NODE, + __builtin_return_address(0)); +} +#endif |