Loading arch/arm/Kconfig +20 −0 Original line number Diff line number Diff line Loading @@ -1726,6 +1726,26 @@ config CPU_SW_DOMAIN_PAN Their lower 1MB needs to remain accessible for the vectors, but the remainder of userspace will become appropriately inaccessible. config MODULES_USE_LONG_CALLS bool help Use long calls for calling exported symbols. config MODULES_USE_VMALLOC bool "Put modules into vmalloc area" select MODULES_USE_LONG_CALLS depends on MMU && MODULES depends on !XIP_KERNEL depends on !FUNCTION_TRACER help Usually modules are loaded into small area prior to the kernel text because they are linked with the kernel using short calls. This option enables long calls and moves modules into vmalloc area. This allows to load more modules but adds some perfromance penalty. If unsure, say n. config HW_PERF_EVENTS def_bool y depends on ARM_PMU Loading arch/arm/Makefile +4 −0 Original line number Diff line number Diff line Loading @@ -136,6 +136,10 @@ CFLAGS_ISA :=$(call cc-option,-marm,) AFLAGS_ISA :=$(CFLAGS_ISA) endif ifeq ($(CONFIG_MODULES_USE_LONG_CALLS),y) CFLAGS_MODULE += -mlong-calls endif # Need -Uarm for gcc < 3.x KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float $(call cc-option, -Uarm,) KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float Loading arch/arm/include/asm/compiler.h +13 −0 Original line number Diff line number Diff line Loading @@ -25,5 +25,18 @@ ".endif; " \ ".endif\n\t" /* * This is used for calling exported symbols from inline assembly code. */ #if defined(MODULE) && defined(CONFIG_MODULES_USE_LONG_CALLS) #define __asmbl(cond, reg, target) \ "movw " reg ", #:lower16:" target "\n\t" \ "movt " reg ", #:upper16:" target "\n\t" \ "blx" cond " " reg "\n\t" #define __asmbl_clobber(reg) ,reg #else #define __asmbl(cond, reg, target) "bl" cond " " target"\n\t" #define __asmbl_clobber(reg) #endif #endif /* __ASM_ARM_COMPILER_H */ arch/arm/include/asm/div64.h +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ static inline uint32_t __div64_32(uint64_t *n, uint32_t base) __asmeq("%1", "r2") __asmeq("%2", "r0") __asmeq("%3", "r4") "bl __do_div64" __asmbl("", "ip", "__do_div64") : "=r" (__rem), "=r" (__res) : "r" (__n), "r" (__base) : "ip", "lr", "cc"); Loading arch/arm/include/asm/memory.h +11 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,15 @@ */ #define TASK_SIZE_26 (UL(1) << 26) #ifdef CONFIG_MODULES_USE_VMALLOC /* * Modules might be anywhere in the vmalloc area. */ #define MODULES_VADDR VMALLOC_START #define MODULES_END VMALLOC_END #else /* CONFIG_MODULES_USE_VMALLOC */ /* * The module space lives between the addresses given by TASK_SIZE * and PAGE_OFFSET - it must be within 32MB of the kernel text. Loading @@ -69,6 +78,8 @@ #define MODULES_END (PAGE_OFFSET) #endif #endif /* CONFIG_MODULES_USE_VMALLOC */ /* * The XIP kernel gets mapped at the bottom of the module vm area. * Since we use sections to map it, this macro replaces the physical address Loading Loading
arch/arm/Kconfig +20 −0 Original line number Diff line number Diff line Loading @@ -1726,6 +1726,26 @@ config CPU_SW_DOMAIN_PAN Their lower 1MB needs to remain accessible for the vectors, but the remainder of userspace will become appropriately inaccessible. config MODULES_USE_LONG_CALLS bool help Use long calls for calling exported symbols. config MODULES_USE_VMALLOC bool "Put modules into vmalloc area" select MODULES_USE_LONG_CALLS depends on MMU && MODULES depends on !XIP_KERNEL depends on !FUNCTION_TRACER help Usually modules are loaded into small area prior to the kernel text because they are linked with the kernel using short calls. This option enables long calls and moves modules into vmalloc area. This allows to load more modules but adds some perfromance penalty. If unsure, say n. config HW_PERF_EVENTS def_bool y depends on ARM_PMU Loading
arch/arm/Makefile +4 −0 Original line number Diff line number Diff line Loading @@ -136,6 +136,10 @@ CFLAGS_ISA :=$(call cc-option,-marm,) AFLAGS_ISA :=$(CFLAGS_ISA) endif ifeq ($(CONFIG_MODULES_USE_LONG_CALLS),y) CFLAGS_MODULE += -mlong-calls endif # Need -Uarm for gcc < 3.x KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float $(call cc-option, -Uarm,) KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float Loading
arch/arm/include/asm/compiler.h +13 −0 Original line number Diff line number Diff line Loading @@ -25,5 +25,18 @@ ".endif; " \ ".endif\n\t" /* * This is used for calling exported symbols from inline assembly code. */ #if defined(MODULE) && defined(CONFIG_MODULES_USE_LONG_CALLS) #define __asmbl(cond, reg, target) \ "movw " reg ", #:lower16:" target "\n\t" \ "movt " reg ", #:upper16:" target "\n\t" \ "blx" cond " " reg "\n\t" #define __asmbl_clobber(reg) ,reg #else #define __asmbl(cond, reg, target) "bl" cond " " target"\n\t" #define __asmbl_clobber(reg) #endif #endif /* __ASM_ARM_COMPILER_H */
arch/arm/include/asm/div64.h +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ static inline uint32_t __div64_32(uint64_t *n, uint32_t base) __asmeq("%1", "r2") __asmeq("%2", "r0") __asmeq("%3", "r4") "bl __do_div64" __asmbl("", "ip", "__do_div64") : "=r" (__rem), "=r" (__res) : "r" (__n), "r" (__base) : "ip", "lr", "cc"); Loading
arch/arm/include/asm/memory.h +11 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,15 @@ */ #define TASK_SIZE_26 (UL(1) << 26) #ifdef CONFIG_MODULES_USE_VMALLOC /* * Modules might be anywhere in the vmalloc area. */ #define MODULES_VADDR VMALLOC_START #define MODULES_END VMALLOC_END #else /* CONFIG_MODULES_USE_VMALLOC */ /* * The module space lives between the addresses given by TASK_SIZE * and PAGE_OFFSET - it must be within 32MB of the kernel text. Loading @@ -69,6 +78,8 @@ #define MODULES_END (PAGE_OFFSET) #endif #endif /* CONFIG_MODULES_USE_VMALLOC */ /* * The XIP kernel gets mapped at the bottom of the module vm area. * Since we use sections to map it, this macro replaces the physical address Loading