public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: RFC: [2.6 patch] i386: always enable REGPARM
Date: Wed, 17 Nov 2004 05:32:23 +0100	[thread overview]
Message-ID: <20041117043223.GF4943@stusta.de> (raw)


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 */


             reply	other threads:[~2004-11-17  4:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-17  4:32 Adrian Bunk [this message]
2004-11-17  8:26 ` RFC: [2.6 patch] i386: always enable REGPARM Andrew Morton
2004-11-17 16:07 ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041117043223.GF4943@stusta.de \
    --to=bunk@stusta.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox