aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-12-06 20:14:12 -0500
committerAndi Kleen <andi@basil.nowhere.org>2006-12-06 20:14:12 -0500
commita1a70c25bed75ed36ed48bbe18b9029428d2452d (patch)
tree0ab9fcebc25f9f71be61f91bfca96aa1e0585a0d
parent73ad8355d7db6a3cdcf313d4a4586a8f81b19c2f (diff)
[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>
-rw-r--r--Documentation/stable_api_nonsense.txt3
-rw-r--r--arch/i386/Kconfig14
-rw-r--r--arch/i386/Makefile4
-rw-r--r--include/asm-i386/module.h8
4 files changed, 2 insertions, 27 deletions
diff --git a/Documentation/stable_api_nonsense.txt b/Documentation/stable_api_nonsense.txt
index f39c9d714db3..a2afca3b2bab 100644
--- a/Documentation/stable_api_nonsense.txt
+++ b/Documentation/stable_api_nonsense.txt
@@ -62,9 +62,6 @@ consider the following facts about the Linux kernel:
62 - different structures can contain different fields 62 - different structures can contain different fields
63 - Some functions may not be implemented at all, (i.e. some locks 63 - Some functions may not be implemented at all, (i.e. some locks
64 compile away to nothing for non-SMP builds.) 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 - Memory within the kernel can be aligned in different ways, 65 - Memory within the kernel can be aligned in different ways,
69 depending on the build options. 66 depending on the build options.
70 - Linux runs on a wide range of different processor architectures. 67 - Linux runs on a wide range of different processor architectures.
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index bb1fa061c6cf..b6b2df40ca78 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -721,20 +721,6 @@ config BOOT_IOREMAP
721 depends on (((X86_SUMMIT || X86_GENERICARCH) && NUMA) || (X86 && EFI)) 721 depends on (((X86_SUMMIT || X86_GENERICARCH) && NUMA) || (X86 && EFI))
722 default y 722 default y
723 723
724config 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
738config SECCOMP 724config SECCOMP
739 bool "Enable seccomp to safely compute untrusted bytecode" 725 bool "Enable seccomp to safely compute untrusted bytecode"
740 depends on PROC_FS 726 depends on PROC_FS
diff --git a/arch/i386/Makefile b/arch/i386/Makefile
index d1aca52bf690..f7ac1aea1d8a 100644
--- a/arch/i386/Makefile
+++ b/arch/i386/Makefile
@@ -31,7 +31,7 @@ LDFLAGS_vmlinux := --emit-relocs
31endif 31endif
32CHECKFLAGS += -D__i386__ 32CHECKFLAGS += -D__i386__
33 33
34CFLAGS += -pipe -msoft-float 34CFLAGS += -pipe -msoft-float -mregparm=3
35 35
36# prevent gcc from keeping the stack 16 byte aligned 36# prevent gcc from keeping the stack 16 byte aligned
37CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2) 37CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
@@ -39,8 +39,6 @@ CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
39# CPU-specific tuning. Anything which can be shared with UML should go here. 39# CPU-specific tuning. Anything which can be shared with UML should go here.
40include $(srctree)/arch/i386/Makefile.cpu 40include $(srctree)/arch/i386/Makefile.cpu
41 41
42cflags-$(CONFIG_REGPARM) += -mregparm=3
43
44# temporary until string.h is fixed 42# temporary until string.h is fixed
45cflags-y += -ffreestanding 43cflags-y += -ffreestanding
46 44
diff --git a/include/asm-i386/module.h b/include/asm-i386/module.h
index fe5ae42e0273..02f8f541cbe0 100644
--- a/include/asm-i386/module.h
+++ b/include/asm-i386/module.h
@@ -62,18 +62,12 @@ struct mod_arch_specific
62#error unknown processor family 62#error unknown processor family
63#endif 63#endif
64 64
65#ifdef CONFIG_REGPARM
66#define MODULE_REGPARM "REGPARM "
67#else
68#define MODULE_REGPARM ""
69#endif
70
71#ifdef CONFIG_4KSTACKS 65#ifdef CONFIG_4KSTACKS
72#define MODULE_STACKSIZE "4KSTACKS " 66#define MODULE_STACKSIZE "4KSTACKS "
73#else 67#else
74#define MODULE_STACKSIZE "" 68#define MODULE_STACKSIZE ""
75#endif 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#endif /* _ASM_I386_MODULE_H */ 73#endif /* _ASM_I386_MODULE_H */