diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2021-04-01 15:30:43 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-04-14 15:04:13 +0200 |
commit | 80edc68e0479bafdc4869ec3351e42316b824596 (patch) | |
tree | 5b4e9349e138e5417601d17dc0da7ff55ba16855 /arch/powerpc/mm/book3s32 | |
parent | powerpc/8xx: Define a MODULE area below kernel text (diff) | |
download | linux-80edc68e0479bafdc4869ec3351e42316b824596.tar.xz linux-80edc68e0479bafdc4869ec3351e42316b824596.zip |
powerpc/32s: Define a MODULE area below kernel text all the time
On book3s/32, the segment below kernel text is used for module
allocation when CONFIG_STRICT_KERNEL_RWX is defined.
In order to benefit from the powerpc specific module_alloc()
function which allocate modules with 32 Mbytes from
end of kernel text, use that segment below PAGE_OFFSET at all time.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/a46dcdd39a9e80b012d86c294c4e5cd8d31665f3.1617283827.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/mm/book3s32')
-rw-r--r-- | arch/powerpc/mm/book3s32/mmu.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/arch/powerpc/mm/book3s32/mmu.c b/arch/powerpc/mm/book3s32/mmu.c index a0db398b5c26..159930351d9f 100644 --- a/arch/powerpc/mm/book3s32/mmu.c +++ b/arch/powerpc/mm/book3s32/mmu.c @@ -184,17 +184,10 @@ static bool is_module_segment(unsigned long addr) { if (!IS_ENABLED(CONFIG_MODULES)) return false; -#ifdef MODULES_VADDR if (addr < ALIGN_DOWN(MODULES_VADDR, SZ_256M)) return false; if (addr > ALIGN(MODULES_END, SZ_256M) - 1) return false; -#else - if (addr < ALIGN_DOWN(VMALLOC_START, SZ_256M)) - return false; - if (addr > ALIGN(VMALLOC_END, SZ_256M) - 1) - return false; -#endif return true; } |