Skip to content

Commit 3b4a49e

Browse files
committed
[XTENSA] Fix modules for non-exec processor configurations
We need to use vmalloc_exec for module loading. Also remove the definitions MODULE_START and MODULE_END, which wasn't used, and increase the VMALLOC memory range accordingly. Signed-off-by: Chris Zankel <[email protected]>
1 parent 3e92501 commit 3b4a49e

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

arch/xtensa/kernel/module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void *module_alloc(unsigned long size)
2828
{
2929
if (size == 0)
3030
return NULL;
31-
return vmalloc(size);
31+
return vmalloc_exec(size);
3232
}
3333

3434
void module_free(struct module *mod, void *module_region)

include/asm-xtensa/module.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515

1616
struct mod_arch_specific
1717
{
18-
/* Module support is not completely implemented. */
18+
/* No special elements, yet. */
1919
};
2020

21+
#define MODULE_ARCH_VERMAGIC "xtensa-" __stringify(XCHAL_CORE_ID) " "
22+
2123
#define Elf_Shdr Elf32_Shdr
2224
#define Elf_Sym Elf32_Sym
2325
#define Elf_Ehdr Elf32_Ehdr

include/asm-xtensa/pgtable.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,9 @@
6666
*/
6767

6868
#define VMALLOC_START 0xC0000000
69-
#define VMALLOC_END 0xC6FEFFFF
70-
#define TLBTEMP_BASE_1 0xC6FF0000
71-
#define TLBTEMP_BASE_2 0xC6FF8000
72-
#define MODULE_START 0xC7000000
73-
#define MODULE_END 0xC7FFFFFF
69+
#define VMALLOC_END 0xC7FEFFFF
70+
#define TLBTEMP_BASE_1 0xC7FF0000
71+
#define TLBTEMP_BASE_2 0xC7FF8000
7472

7573
/*
7674
* Xtensa Linux config PTE layout (when present):

0 commit comments

Comments
 (0)