All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: linux-kernel@vger.kernel.org
Subject: [RFC: 2.6 patch] i386: always enable regparm
Date: Sun, 26 Nov 2006 05:31:25 +0100	[thread overview]
Message-ID: <20061126043125.GI15364@stusta.de> (raw)

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

---

 Documentation/stable_api_nonsense.txt |    3 ---
 arch/i386/Kconfig                     |   14 --------------
 arch/i386/Makefile                    |    4 +---
 include/asm-i386/module.h             |    8 +-------
 4 files changed, 2 insertions(+), 27 deletions(-)

--- linux-2.6.19-rc6-mm1/arch/i386/Kconfig.old	2006-11-26 02:32:46.000000000 +0100
+++ linux-2.6.19-rc6-mm1/arch/i386/Kconfig	2006-11-26 02:32:55.000000000 +0100
@@ -740,20 +740,6 @@
 	depends on (((X86_SUMMIT || X86_GENERICARCH) && NUMA) || (X86 && EFI))
 	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
 	bool "Enable seccomp to safely compute untrusted bytecode"
 	depends on PROC_FS
--- linux-2.6.19-rc6-mm1/arch/i386/Makefile.old	2006-11-26 02:33:02.000000000 +0100
+++ linux-2.6.19-rc6-mm1/arch/i386/Makefile	2006-11-26 02:33:23.000000000 +0100
@@ -31,7 +31,7 @@
 endif
 CHECKFLAGS	+= -D__i386__
 
-CFLAGS += -pipe -msoft-float
+CFLAGS += -pipe -msoft-float -mregparm=3
 
 # prevent gcc from keeping the stack 16 byte aligned
 CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
@@ -39,8 +39,6 @@
 # CPU-specific tuning. Anything which can be shared with UML should go here.
 include $(srctree)/arch/i386/Makefile.cpu
 
-cflags-$(CONFIG_REGPARM) += -mregparm=3
-
 # temporary until string.h is fixed
 cflags-y += -ffreestanding
 
--- linux-2.6.19-rc6-mm1/include/asm-i386/module.h.old	2006-11-26 02:34:00.000000000 +0100
+++ linux-2.6.19-rc6-mm1/include/asm-i386/module.h	2006-11-26 02:34:12.000000000 +0100
@@ -60,18 +60,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 */
--- linux-2.6.19-rc6-mm1/Documentation/stable_api_nonsense.txt.old	2006-11-26 02:34:38.000000000 +0100
+++ linux-2.6.19-rc6-mm1/Documentation/stable_api_nonsense.txt	2006-11-26 02:34:45.000000000 +0100
@@ -62,9 +62,6 @@
       - different structures can contain different fields
       - Some functions may not be implemented at all, (i.e. some locks
 	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,
 	depending on the build options.
   - Linux runs on a wide range of different processor architectures.


             reply	other threads:[~2006-11-26  4:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-26  4:31 Adrian Bunk [this message]
2006-11-27 11:14 ` [RFC: 2.6 patch] i386: always enable regparm Andi Kleen

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=20061126043125.GI15364@stusta.de \
    --to=bunk@stusta.de \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.