From: Olaf Hering <olh@suse.de>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org, trini@kernel.crashing.org
Subject: [PATCH] Set cpu explicitly in kernel compiles
Date: Sun, 2 Apr 2006 21:40:45 +0200 [thread overview]
Message-ID: <20060402194044.GA866@suse.de> (raw)
In-Reply-To: <17016.29775.224816.691409@cargo.ozlabs.ibm.com>
On Wed, 2005-05-04, Paul Mackeras wrote:
> What do people think of this patch? The motivation for it is that a
> biarch gcc-4.0 will by default tune for POWER4, even for a 32-bit
> compile, meaning that we end up with a lot of nops we don't need.
> This also takes out -mstring.
>
> With this, the text size reduces by about 120k for my normal config
> when compiling with a biarch gcc-4.0. The text size also reduces
> slightly when compiling with the Debian gcc-3.3.5 (32-bit only, not
> biarch).
Compile the 32bit kernel with -mcpu=powerpc. This reduces the imagesize
when a compiler is used that defaults to -mtune=power4. It inserts lots
of nops to please the 64bit cpu instruction scheduling. But all these nops
are not needed for 32bit kernels.
Example with SLES10 gcc 4.1.0 and arch/powerpc/configs/pmac32_defconfig:
vmlinux vmlinux.strip vmlinux.gz
-O2 4980515 4187528 1846829
-Os 4618801 3827084 1673333
-O2 -mcpu=powerpc 4738851 3945868 1816253
-Os -mcpu=powerpc 4532785 3741068 1664688
Signed-off-by: Olaf Hering <olh@suse.de>
---
arch/powerpc/Makefile | 1 +
1 file changed, 1 insertion(+)
Index: linux-2.6.16-olh/arch/powerpc/Makefile
===================================================================
--- linux-2.6.16-olh.orig/arch/powerpc/Makefile
+++ linux-2.6.16-olh/arch/powerpc/Makefile
@@ -107,6 +107,7 @@ endif
cpu-as-$(CONFIG_PPC64BRIDGE) += -Wa,-mppc64bridge
cpu-as-$(CONFIG_4xx) += -Wa,-m405
cpu-as-$(CONFIG_6xx) += -Wa,-maltivec
+cpu-as-$(CONFIG_6xx) += -mcpu=powerpc
cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec
cpu-as-$(CONFIG_E500) += -Wa,-me500
cpu-as-$(CONFIG_E200) += -Wa,-me200
next prev parent reply other threads:[~2006-04-02 19:40 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-04 7:05 [PATCH] Set cpu explicitly in kernel compiles Paul Mackerras
2005-05-04 11:28 ` Dan Malek
2005-05-04 15:34 ` Tom Rini
2005-05-04 16:06 ` Chris Friesen
2005-05-04 21:36 ` Paul Mackerras
2005-05-04 23:21 ` Dan Malek
2005-05-05 4:00 ` Paul Mackerras
2005-05-05 4:12 ` Tom Rini
2005-05-05 4:44 ` Paul Mackerras
2005-05-05 4:47 ` Tom Rini
2005-05-05 5:22 ` Paul Mackerras
2005-05-05 12:24 ` Dan Malek
2005-05-05 14:00 ` Kumar Gala
2005-05-05 14:23 ` Tom Rini
2005-05-05 15:12 ` Kumar Gala
2005-05-05 15:27 ` Tom Rini
2005-05-05 16:22 ` Kumar Gala
2005-05-05 16:29 ` Tom Rini
2005-05-06 14:44 ` Segher Boessenkool
2005-05-06 14:53 ` Tom Rini
2005-05-06 15:28 ` Segher Boessenkool
2005-05-06 15:34 ` Tom Rini
2005-05-06 15:47 ` Kumar Gala
2005-05-05 12:12 ` Dan Malek
2005-05-04 13:45 ` Kumar Gala
2005-05-04 15:28 ` Tom Rini
2005-07-03 17:29 ` Olaf Hering
2005-07-03 18:32 ` Tom Rini
2005-07-05 18:14 ` Olaf Hering
2005-07-05 19:47 ` Tom Rini
2005-07-05 19:54 ` Olaf Hering
2005-07-05 19:58 ` Tom Rini
2005-07-05 20:17 ` Olaf Hering
2005-07-05 20:27 ` Olaf Hering
2005-07-05 21:22 ` Tom Rini
2005-07-06 6:38 ` Olaf Hering
2006-04-02 19:40 ` Olaf Hering [this message]
2006-04-06 4:37 ` Paul Mackerras
2006-04-11 18:42 ` Olaf Hering
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=20060402194044.GA866@suse.de \
--to=olh@suse.de \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=trini@kernel.crashing.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.