LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] powerpc/Makefile: set -mcpu=860 flag for the 8xx
@ 2018-05-28 6:08 Christophe Leroy
2018-06-04 14:11 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Christophe Leroy @ 2018-05-28 6:08 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
Cc: linux-kernel, linuxppc-dev
When compiled with GCC 8.1, vmlinux is significantly bigger than
with GCC 4.8.
When looking at the generated code with objdump, we notice that
all functions and loops when a 16 bytes alignment. This significantly
increases the size of the kernel. It is pointless and even
counterproductive as on the 8xx 'nop' also consumes one clock cycle.
Size of vmlinux with GCC 4.8:
text data bss dec hex filename
5801948 1626076 457796 7885820 7853fc vmlinux
Size of vmlinux with GCC 8.1:
text data bss dec hex filename
6764592 1630652 456476 8851720 871108 vmlinux
Size of vmlinux with GCC 8.1 and this patch:
text data bss dec hex filename
6331544 1631756 456476 8419776 8079c0 vmlinux
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
arch/powerpc/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 6a050b42a9f2..26ccd0b91512 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -178,6 +178,7 @@ CFLAGS-$(CONFIG_POWER6_CPU) += $(call cc-option,-mcpu=power6)
CFLAGS-$(CONFIG_POWER7_CPU) += $(call cc-option,-mcpu=power7)
CFLAGS-$(CONFIG_POWER8_CPU) += $(call cc-option,-mcpu=power8)
CFLAGS-$(CONFIG_POWER9_CPU) += $(call cc-option,-mcpu=power9)
+CFLAGS-$(CONFIG_PPC_8xx) += $(call cc-option,-mcpu=860)
# Altivec option not allowed with e500mc64 in GCC.
ifeq ($(CONFIG_ALTIVEC),y)
--
2.13.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: powerpc/Makefile: set -mcpu=860 flag for the 8xx
2018-05-28 6:08 [PATCH] powerpc/Makefile: set -mcpu=860 flag for the 8xx Christophe Leroy
@ 2018-06-04 14:11 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2018-06-04 14:11 UTC (permalink / raw)
To: Christophe Leroy, Benjamin Herrenschmidt, Paul Mackerras
Cc: linuxppc-dev, linux-kernel
On Mon, 2018-05-28 at 06:08:34 UTC, Christophe Leroy wrote:
> When compiled with GCC 8.1, vmlinux is significantly bigger than
> with GCC 4.8.
>
> When looking at the generated code with objdump, we notice that
> all functions and loops when a 16 bytes alignment. This significantly
> increases the size of the kernel. It is pointless and even
> counterproductive as on the 8xx 'nop' also consumes one clock cycle.
>
> Size of vmlinux with GCC 4.8:
> text data bss dec hex filename
> 5801948 1626076 457796 7885820 7853fc vmlinux
>
> Size of vmlinux with GCC 8.1:
> text data bss dec hex filename
> 6764592 1630652 456476 8851720 871108 vmlinux
>
> Size of vmlinux with GCC 8.1 and this patch:
> text data bss dec hex filename
> 6331544 1631756 456476 8419776 8079c0 vmlinux
>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/1c38976334c0efce1b285369a6037f
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-04 14:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-28 6:08 [PATCH] powerpc/Makefile: set -mcpu=860 flag for the 8xx Christophe Leroy
2018-06-04 14:11 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).