Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] i386: always enable regparm

-mregparm=3 has been enabled by default for some time on i386, and AFAIK
there aren't any problems with it left.

This patch removes the REGPARM config option and sets -mregparm=3
unconditionally.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andi Kleen <ak@suse.de>

authored by

Adrian Bunk and committed by
Andi Kleen
a1a70c25 73ad8355

+2 -27
-3
Documentation/stable_api_nonsense.txt
··· 62 62 - different structures can contain different fields 63 63 - Some functions may not be implemented at all, (i.e. some locks 64 64 compile away to nothing for non-SMP builds.) 65 - - Parameter passing of variables from function to function can be 66 - done in different ways (the CONFIG_REGPARM option controls 67 - this.) 68 65 - Memory within the kernel can be aligned in different ways, 69 66 depending on the build options. 70 67 - Linux runs on a wide range of different processor architectures.
-14
arch/i386/Kconfig
··· 721 721 depends on (((X86_SUMMIT || X86_GENERICARCH) && NUMA) || (X86 && EFI)) 722 722 default y 723 723 724 - config REGPARM 725 - bool "Use register arguments" 726 - default y 727 - help 728 - Compile the kernel with -mregparm=3. This instructs gcc to use 729 - a more efficient function call ABI which passes the first three 730 - arguments of a function call via registers, which results in denser 731 - and faster code. 732 - 733 - If this option is disabled, then the default ABI of passing 734 - arguments via the stack is used. 735 - 736 - If unsure, say Y. 737 - 738 724 config SECCOMP 739 725 bool "Enable seccomp to safely compute untrusted bytecode" 740 726 depends on PROC_FS
+1 -3
arch/i386/Makefile
··· 31 31 endif 32 32 CHECKFLAGS += -D__i386__ 33 33 34 - CFLAGS += -pipe -msoft-float 34 + CFLAGS += -pipe -msoft-float -mregparm=3 35 35 36 36 # prevent gcc from keeping the stack 16 byte aligned 37 37 CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2) 38 38 39 39 # CPU-specific tuning. Anything which can be shared with UML should go here. 40 40 include $(srctree)/arch/i386/Makefile.cpu 41 - 42 - cflags-$(CONFIG_REGPARM) += -mregparm=3 43 41 44 42 # temporary until string.h is fixed 45 43 cflags-y += -ffreestanding
+1 -7
include/asm-i386/module.h
··· 62 62 #error unknown processor family 63 63 #endif 64 64 65 - #ifdef CONFIG_REGPARM 66 - #define MODULE_REGPARM "REGPARM " 67 - #else 68 - #define MODULE_REGPARM "" 69 - #endif 70 - 71 65 #ifdef CONFIG_4KSTACKS 72 66 #define MODULE_STACKSIZE "4KSTACKS " 73 67 #else 74 68 #define MODULE_STACKSIZE "" 75 69 #endif 76 70 77 - #define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_REGPARM MODULE_STACKSIZE 71 + #define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_STACKSIZE 78 72 79 73 #endif /* _ASM_I386_MODULE_H */