summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/module.c')
-rw-r--r--arch/powerpc/kernel/module.c63
1 files changed, 0 insertions, 63 deletions
diff --git a/arch/powerpc/kernel/module.c b/arch/powerpc/kernel/module.c
index 2a23cf7e141ba..77ea82e9dc5f8 100644
--- a/arch/powerpc/kernel/module.c
+++ b/arch/powerpc/kernel/module.c
@@ -7,10 +7,8 @@
#include <linux/elf.h>
#include <linux/moduleloader.h>
#include <linux/err.h>
-#include <linux/vmalloc.h>
#include <linux/mm.h>
#include <linux/bug.h>
-#include <linux/execmem.h>
#include <asm/module.h>
#include <linux/uaccess.h>
#include <asm/firmware.h>
@@ -89,64 +87,3 @@ int module_finalize(const Elf_Ehdr *hdr,
return 0;
}
-
-static struct execmem_info execmem_info __ro_after_init;
-
-struct execmem_info __init *execmem_arch_setup(void)
-{
- pgprot_t kprobes_prot = strict_module_rwx_enabled() ? PAGE_KERNEL_ROX : PAGE_KERNEL_EXEC;
- pgprot_t prot = strict_module_rwx_enabled() ? PAGE_KERNEL : PAGE_KERNEL_EXEC;
- unsigned long fallback_start = 0, fallback_end = 0;
- unsigned long start, end;
-
- /*
- * BOOK3S_32 and 8xx define MODULES_VADDR for text allocations and
- * allow allocating data in the entire vmalloc space
- */
-#ifdef MODULES_VADDR
- unsigned long limit = (unsigned long)_etext - SZ_32M;
-
- BUILD_BUG_ON(TASK_SIZE > MODULES_VADDR);
-
- /* First try within 32M limit from _etext to avoid branch trampolines */
- if (MODULES_VADDR < PAGE_OFFSET && MODULES_END > limit) {
- start = limit;
- fallback_start = MODULES_VADDR;
- fallback_end = MODULES_END;
- } else {
- start = MODULES_VADDR;
- }
-
- end = MODULES_END;
-#else
- start = VMALLOC_START;
- end = VMALLOC_END;
-#endif
-
- execmem_info = (struct execmem_info){
- .ranges = {
- [EXECMEM_DEFAULT] = {
- .start = start,
- .end = end,
- .pgprot = prot,
- .alignment = 1,
- .fallback_start = fallback_start,
- .fallback_end = fallback_end,
- },
- [EXECMEM_KPROBES] = {
- .start = VMALLOC_START,
- .end = VMALLOC_END,
- .pgprot = kprobes_prot,
- .alignment = 1,
- },
- [EXECMEM_MODULE_DATA] = {
- .start = VMALLOC_START,
- .end = VMALLOC_END,
- .pgprot = PAGE_KERNEL,
- .alignment = 1,
- },
- },
- };
-
- return &execmem_info;
-}