forked from luck/tmp_suning_uos_patched
[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>
This commit is contained in:
parent
73ad8355d7
commit
a1a70c25be
|
@ -62,9 +62,6 @@ consider the following facts about the Linux kernel:
|
||||||
- different structures can contain different fields
|
- different structures can contain different fields
|
||||||
- Some functions may not be implemented at all, (i.e. some locks
|
- Some functions may not be implemented at all, (i.e. some locks
|
||||||
compile away to nothing for non-SMP builds.)
|
compile away to nothing for non-SMP builds.)
|
||||||
- Parameter passing of variables from function to function can be
|
|
||||||
done in different ways (the CONFIG_REGPARM option controls
|
|
||||||
this.)
|
|
||||||
- Memory within the kernel can be aligned in different ways,
|
- Memory within the kernel can be aligned in different ways,
|
||||||
depending on the build options.
|
depending on the build options.
|
||||||
- Linux runs on a wide range of different processor architectures.
|
- Linux runs on a wide range of different processor architectures.
|
||||||
|
|
|
@ -721,20 +721,6 @@ config BOOT_IOREMAP
|
||||||
depends on (((X86_SUMMIT || X86_GENERICARCH) && NUMA) || (X86 && EFI))
|
depends on (((X86_SUMMIT || X86_GENERICARCH) && NUMA) || (X86 && EFI))
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config REGPARM
|
|
||||||
bool "Use register arguments"
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
Compile the kernel with -mregparm=3. This instructs gcc to use
|
|
||||||
a more efficient function call ABI which passes the first three
|
|
||||||
arguments of a function call via registers, which results in denser
|
|
||||||
and faster code.
|
|
||||||
|
|
||||||
If this option is disabled, then the default ABI of passing
|
|
||||||
arguments via the stack is used.
|
|
||||||
|
|
||||||
If unsure, say Y.
|
|
||||||
|
|
||||||
config SECCOMP
|
config SECCOMP
|
||||||
bool "Enable seccomp to safely compute untrusted bytecode"
|
bool "Enable seccomp to safely compute untrusted bytecode"
|
||||||
depends on PROC_FS
|
depends on PROC_FS
|
||||||
|
|
|
@ -31,7 +31,7 @@ LDFLAGS_vmlinux := --emit-relocs
|
||||||
endif
|
endif
|
||||||
CHECKFLAGS += -D__i386__
|
CHECKFLAGS += -D__i386__
|
||||||
|
|
||||||
CFLAGS += -pipe -msoft-float
|
CFLAGS += -pipe -msoft-float -mregparm=3
|
||||||
|
|
||||||
# prevent gcc from keeping the stack 16 byte aligned
|
# prevent gcc from keeping the stack 16 byte aligned
|
||||||
CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
|
CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
|
||||||
|
@ -39,8 +39,6 @@ CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
|
||||||
# CPU-specific tuning. Anything which can be shared with UML should go here.
|
# CPU-specific tuning. Anything which can be shared with UML should go here.
|
||||||
include $(srctree)/arch/i386/Makefile.cpu
|
include $(srctree)/arch/i386/Makefile.cpu
|
||||||
|
|
||||||
cflags-$(CONFIG_REGPARM) += -mregparm=3
|
|
||||||
|
|
||||||
# temporary until string.h is fixed
|
# temporary until string.h is fixed
|
||||||
cflags-y += -ffreestanding
|
cflags-y += -ffreestanding
|
||||||
|
|
||||||
|
|
|
@ -62,18 +62,12 @@ struct mod_arch_specific
|
||||||
#error unknown processor family
|
#error unknown processor family
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_REGPARM
|
|
||||||
#define MODULE_REGPARM "REGPARM "
|
|
||||||
#else
|
|
||||||
#define MODULE_REGPARM ""
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_4KSTACKS
|
#ifdef CONFIG_4KSTACKS
|
||||||
#define MODULE_STACKSIZE "4KSTACKS "
|
#define MODULE_STACKSIZE "4KSTACKS "
|
||||||
#else
|
#else
|
||||||
#define MODULE_STACKSIZE ""
|
#define MODULE_STACKSIZE ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_REGPARM MODULE_STACKSIZE
|
#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_STACKSIZE
|
||||||
|
|
||||||
#endif /* _ASM_I386_MODULE_H */
|
#endif /* _ASM_I386_MODULE_H */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user