* RFC: [2.6 patch] i386: always enable REGPARM
@ 2004-11-17 4:32 Adrian Bunk
2004-11-17 8:26 ` Andrew Morton
2004-11-17 16:07 ` Linus Torvalds
0 siblings, 2 replies; 3+ messages in thread
From: Adrian Bunk @ 2004-11-17 4:32 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-kernel
Is there still a known reason to disable CONFIG_REGPARM on i386 with
gcc 3?
If not, I'd suggest the patch below for -mm to find all remaining bugs
(if there are any).
diffstat output:
arch/i386/Kconfig | 13 -------------
arch/i386/Makefile | 2 +-
include/asm-i386/linkage.h | 5 +----
include/asm-i386/module.h | 8 +-------
4 files changed, 3 insertions(+), 25 deletions(-)
Signed-off-by: Adrian Bunk <bunk@fs.tum.de>
--- linux-2.6.10-rc2-mm1-full/arch/i386/Kconfig.old 2004-11-17 00:32:26.000000000 +0100
+++ linux-2.6.10-rc2-mm1-full/arch/i386/Kconfig 2004-11-17 00:32:50.000000000 +0100
@@ -876,19 +876,6 @@
depends on (((X86_SUMMIT || X86_GENERICARCH) && NUMA) || (X86 && EFI))
default y
-config REGPARM
- bool "Use register arguments (EXPERIMENTAL)"
- depends on EXPERIMENTAL
- default n
- help
- Compile the kernel with -mregparm=3. This uses an different ABI
- and passes the first three arguments of a function call in registers.
- This will probably break binary only modules.
-
- This feature is only enabled for gcc-3.0 and later - earlier compilers
- generate incorrect output with certain kernel constructs when
- -mregparm=3 is used.
-
source "drivers/perfctr/Kconfig"
config KERN_PHYS_OFFSET
--- linux-2.6.10-rc2-mm1-full/arch/i386/Makefile.old 2004-11-17 00:33:00.000000000 +0100
+++ linux-2.6.10-rc2-mm1-full/arch/i386/Makefile 2004-11-17 00:33:39.000000000 +0100
@@ -55,7 +55,7 @@
# -mregparm=3 works ok on gcc-3.0 and later
#
GCC_VERSION := $(call cc-version)
-cflags-$(CONFIG_REGPARM) += $(shell if [ $(GCC_VERSION) -ge 0300 ] ; then echo "-mregparm=3"; fi ;)
+cflags-y += $(shell if [ $(GCC_VERSION) -ge 0300 ] ; then echo "-mregparm=3"; fi ;)
# Disable unit-at-a-time mode, it makes gcc use a lot more stack
# due to the lack of sharing of stacklots.
--- linux-2.6.10-rc2-mm1-full/include/asm-i386/linkage.h.old 2004-11-17 00:33:53.000000000 +0100
+++ linux-2.6.10-rc2-mm1-full/include/asm-i386/linkage.h 2004-11-17 00:34:09.000000000 +0100
@@ -4,10 +4,7 @@
#define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0)))
#define FASTCALL(x) x __attribute__((regparm(3)))
#define fastcall __attribute__((regparm(3)))
-
-#ifdef CONFIG_REGPARM
-# define prevent_tail_call(ret) __asm__ ("" : "=r" (ret) : "0" (ret))
-#endif
+#define prevent_tail_call(ret) __asm__ ("" : "=r" (ret) : "0" (ret))
#ifdef CONFIG_X86_ALIGNMENT_16
#define __ALIGN .align 16,0x90
--- linux-2.6.10-rc2-mm1-full/include/asm-i386/module.h.old 2004-11-17 00:34:17.000000000 +0100
+++ linux-2.6.10-rc2-mm1-full/include/asm-i386/module.h 2004-11-17 00:34:30.000000000 +0100
@@ -56,18 +56,12 @@
#error unknown processor family
#endif
-#ifdef CONFIG_REGPARM
-#define MODULE_REGPARM "REGPARM "
-#else
-#define MODULE_REGPARM ""
-#endif
-
#ifdef CONFIG_4KSTACKS
#define MODULE_STACKSIZE "4KSTACKS "
#else
#define MODULE_STACKSIZE ""
#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 */
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: RFC: [2.6 patch] i386: always enable REGPARM
2004-11-17 4:32 RFC: [2.6 patch] i386: always enable REGPARM Adrian Bunk
@ 2004-11-17 8:26 ` Andrew Morton
2004-11-17 16:07 ` Linus Torvalds
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2004-11-17 8:26 UTC (permalink / raw)
To: Adrian Bunk; +Cc: torvalds, linux-kernel
Adrian Bunk <bunk@stusta.de> wrote:
>
> Is there still a known reason to disable CONFIG_REGPARM on i386 with
> gcc 3?
Well it lets us turn it off again if we suspect a regparm-related bug.
That's happened a couple of times.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: RFC: [2.6 patch] i386: always enable REGPARM
2004-11-17 4:32 RFC: [2.6 patch] i386: always enable REGPARM Adrian Bunk
2004-11-17 8:26 ` Andrew Morton
@ 2004-11-17 16:07 ` Linus Torvalds
1 sibling, 0 replies; 3+ messages in thread
From: Linus Torvalds @ 2004-11-17 16:07 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Andrew Morton, linux-kernel
On Wed, 17 Nov 2004, Adrian Bunk wrote:
>
> Is there still a known reason to disable CONFIG_REGPARM on i386 with
> gcc 3?
I wouldn't want to remove the config option, but we _can_ turn it around,
and just force it to 'y'. And if nobody reports any strange problems in
a few months, _then_ we can remove it.
I just make the diff be something like the appended.
Linus
----
===== arch/i386/Kconfig 1.134 vs edited =====
--- 1.134/arch/i386/Kconfig 2004-10-21 18:35:11 -07:00
+++ edited/arch/i386/Kconfig 2004-11-17 08:07:06 -08:00
@@ -862,17 +862,8 @@
default y
config REGPARM
- bool "Use register arguments (EXPERIMENTAL)"
- depends on EXPERIMENTAL
- default n
- help
- Compile the kernel with -mregparm=3. This uses an different ABI
- and passes the first three arguments of a function call in registers.
- This will probably break binary only modules.
-
- This feature is only enabled for gcc-3.0 and later - earlier compilers
- generate incorrect output with certain kernel constructs when
- -mregparm=3 is used.
+ bool
+ default y
endmenu
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-11-17 16:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-17 4:32 RFC: [2.6 patch] i386: always enable REGPARM Adrian Bunk
2004-11-17 8:26 ` Andrew Morton
2004-11-17 16:07 ` Linus Torvalds
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox