Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2010808imm; Sun, 27 May 2018 23:09:12 -0700 (PDT) X-Google-Smtp-Source: AB8JxZphv0VN0k53O6hCaYM8cSoz+7+EuDdp47pVQV7lBNE1ac9p6DsdWV59MThXDcrnbOQGn6zG X-Received: by 2002:a63:8848:: with SMTP id l69-v6mr9717568pgd.149.1527487752466; Sun, 27 May 2018 23:09:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527487752; cv=none; d=google.com; s=arc-20160816; b=lvOUWlVYDec8bn2tTydvhUyvFjtUkxD3rtDVlIVou00o8cBb7+pnuIpwM1Kq2xPArp ac4CwSwfFiFAB4XdhpbaLj2Mr5o34gcC5VN/Oi47ROAkjDJ32T5mIO4hq/9mkxp93FvP Hve67pX2gFgT4OpTRiwD5GQM8/fG+8+aOe/KV1L7MMtJpgDCu1cs/eZ3FNSXYcVw9J2a Ckl5qIzU8mm1+cN3yh4eI3pC0idXTIMOVllfbdoyTbcOrRjUeatQUnkXAc8C8OwfGHQJ LJOhZE+uZrCMnkUrj2MmZccMIzxilhxB7xf0mRoEOPU7GtVuLZXikxMQ/8jHOWMWnnN1 FWWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:cc:to:subject:from :arc-authentication-results; bh=V1toxgLJ7e9JQuZj2nDKAT8SlUkzjuoqyhMJAD6Mp6s=; b=o/+Mgs1ODfnr5/c58+40xnOfF0wQyoCUOlZdq+jm3WrQ0vcTeJmgzMRSEMkZFwVGJt Z+KubrsdQPGcRpjUAizSbs2CHPVx/vDPtc9VfwEOfIgBqPKIJYdwuWecVwaaDYh1chax MAKURhQoEGTOFS9EBfg0D6giZ/Yupt1M08TzkyQQTtMaAe4V6HTQmg3HZAAawWkyk26m kKpPMU36UWYMbGxmGLmg+LhyKDks0dOGqrcwdpXHGx6sUtXoqn3DVi1FDI9pzeMGQf6Q hoWQJyUqV6lfdcmAv3NF2N6gCH2pRTfZYgvuLvciSC3adVbW538pSY2qBwVLGdlmtGcj yF2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k16-v6si30883996pli.171.2018.05.27.23.08.58; Sun, 27 May 2018 23:09:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753445AbeE1GIj (ORCPT + 99 others); Mon, 28 May 2018 02:08:39 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:17888 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751237AbeE1GIf (ORCPT ); Mon, 28 May 2018 02:08:35 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 40vRHd6sx7z9tyD9; Mon, 28 May 2018 08:08:29 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id 8Gq6pbSVpjdD; Mon, 28 May 2018 08:08:29 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 40vRHd6R87z9tyD7; Mon, 28 May 2018 08:08:29 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id BCE2B8B780; Mon, 28 May 2018 08:08:34 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id wDjQ7_LrVUO0; Mon, 28 May 2018 08:08:34 +0200 (CEST) Received: from po14934vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.2]) by messagerie.si.c-s.fr (Postfix) with ESMTP id A6F9D8B77E; Mon, 28 May 2018 08:08:34 +0200 (CEST) Received: by po14934vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 72DE86F377; Mon, 28 May 2018 06:08:34 +0000 (UTC) From: Christophe Leroy Subject: [PATCH] powerpc/Makefile: set -mcpu=860 flag for the 8xx To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Message-Id: <20180528060834.72DE86F377@po14934vm.idsi0.si.c-s.fr> Date: Mon, 28 May 2018 06:08:34 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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