diff options
author | Mike Rapoport (IBM) <rppt@kernel.org> | 2024-05-05 18:06:15 +0200 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2024-05-14 09:31:43 +0200 |
commit | 38762155fdda3af2cfca371b555a72187259acfd (patch) | |
tree | 0e86991d703ff692cd49bca17f6ac2fad0a41ec1 /arch/nios2/include | |
parent | mips: module: rename MODULE_START to MODULES_VADDR (diff) | |
download | linux-38762155fdda3af2cfca371b555a72187259acfd.tar.xz linux-38762155fdda3af2cfca371b555a72187259acfd.zip |
nios2: define virtual address space for modules
nios2 uses kmalloc() to implement module_alloc() because CALL26/PCREL26
cannot reach all of vmalloc address space.
Define module space as 32MiB below the kernel base and switch nios2 to
use vmalloc for module allocations.
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Dinh Nguyen <dinguyen@kernel.org>
Acked-by: Song Liu <song@kernel.org>
Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'arch/nios2/include')
-rw-r--r-- | arch/nios2/include/asm/pgtable.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/nios2/include/asm/pgtable.h b/arch/nios2/include/asm/pgtable.h index d052dfcbe8d3..eab87c6beacb 100644 --- a/arch/nios2/include/asm/pgtable.h +++ b/arch/nios2/include/asm/pgtable.h @@ -25,7 +25,10 @@ #include <asm-generic/pgtable-nopmd.h> #define VMALLOC_START CONFIG_NIOS2_KERNEL_MMU_REGION_BASE -#define VMALLOC_END (CONFIG_NIOS2_KERNEL_REGION_BASE - 1) +#define VMALLOC_END (CONFIG_NIOS2_KERNEL_REGION_BASE - SZ_32M - 1) + +#define MODULES_VADDR (CONFIG_NIOS2_KERNEL_REGION_BASE - SZ_32M) +#define MODULES_END (CONFIG_NIOS2_KERNEL_REGION_BASE - 1) struct mm_struct; |