From patchwork Mon Nov 12 02:35:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 150773 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp2643175ljp; Sun, 11 Nov 2018 18:38:13 -0800 (PST) X-Google-Smtp-Source: AJdET5dN5XKSs1GFkmt5xY7N9623vvO/PY2YUJpZ1vGrFCTc/2bY9G4lO/U2UH9VC5GxKhnpLHb8 X-Received: by 2002:a62:4b8c:: with SMTP id d12-v6mr18341763pfj.38.1541990293793; Sun, 11 Nov 2018 18:38:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541990293; cv=none; d=google.com; s=arc-20160816; b=dIQqhu7NLvigA4DFj4kPeZ4ljYccBLM3sT5FHf5acvuejmlEfNbMzkI/pQuheSyZMi fqWd8+WdBnShS2Od2wIve0QsJctmR7j0xTrE4zTZjV+uBe6ptlF02P01Zh/BRRBgDFAF 1Fe6egC5+kgzY3V5ALt1mTo+e/XCXIwviXAxiYSOY3lFw+1HT2GB6nHhIDU1f0s8c3VP /EENhhBwSrEVynYkiIiaZ4K+DBgd6+W8ccJdQoj7pTi3uUhp/l3z6d/7El011rNlHaht 8EzryK0/BJJmcGkDJoxGiq/fICbiAPRdUGCQ5CKSDJlHcANF9H1mKSjdlmyRx5k9tlCc beHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=QWXSE7/OQHBlT44+TGlqxkRhZ97JeJizcyopsk4jHsY=; b=YxZDu4eKEpEGE4d712iSbqrXs0vY+tokp387KQyg7vNbMLBGG6+ng9e2o9in6kqm/x u7fq+bThV9vYXp+XHVdc8KkgCTnZtQ1H7Mh47mc4A6wWb6nSVQG4SvKj7ZzUjWIalAt1 8a0xVGCkC2XDF6CJrnOqMUSYapl/B5EQII5BV8nRI1Ppi3eenu0DlAll2s5T31o+DYFm CvgBp+bjkgCSV1DooQZIlwjZjNzE5WZ3nHYKnk6L7FMzxsF6/T4EMmIq36qRl/yh6YXO Im/FKdW5fuQBSONCiguM/Sx+zoPSAQ1G16Z6t/fAylQFwQVdJGBfReHAHB10y8OsqyNX 6E/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=FA91h4yJ; 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 b35-v6si16413260plh.326.2018.11.11.18.38.13; Sun, 11 Nov 2018 18:38:13 -0800 (PST) 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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=FA91h4yJ; 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 S1730143AbeKLM3L (ORCPT + 32 others); Mon, 12 Nov 2018 07:29:11 -0500 Received: from conuserg-08.nifty.com ([210.131.2.75]:65080 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729729AbeKLM3K (ORCPT ); Mon, 12 Nov 2018 07:29:10 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id wAC2ZqVT015801; Mon, 12 Nov 2018 11:35:53 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com wAC2ZqVT015801 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1541990154; bh=QWXSE7/OQHBlT44+TGlqxkRhZ97JeJizcyopsk4jHsY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FA91h4yJOyJENTGNyr75p88tfVsNiDXhOMInZzw3/rfJHw3x2OV/RH4xPefEqEaYm MMbVZ+9LlRjnCfqRP6SZkAN3jWbpeIXY6mVbMysyQb3V2luFgTIZ9a6ZyOohJ7S5gb qacupi+SvN7TZKLquE9qfBWONdhDg17n4E29ZLrf/D7cJpcXkmR1eGBVhM1hyDt2o+ AjH8sy8Ce37kZUPq3C5aveDOJEd97a9B7WcuQ6e51EK3Y5PTKwKDoWRuyPYQYqv0f3 7v76VVz5fBrTNXvRcFY2nZjdizkP7wsi05HlCt2KDNMb4o2YrD7ksjhX6SlUH5fBiF fBwr7zq78p25A== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Ingo Molnar , Thomas Gleixner , x86@kernel.org Cc: Richard Weinberger , linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Masahiro Yamada , "H. Peter Anvin" , Borislav Petkov , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] um: remove -fno-unit-at-a-time workaround for pre-4.0 GCC Date: Mon, 12 Nov 2018 11:35:19 +0900 Message-Id: <1541990120-9643-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1541990120-9643-1-git-send-email-yamada.masahiro@socionext.com> References: <1541990120-9643-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6") bumped the minimum GCC version to 4.6 for all architectures. '$(call cc-option,-fno-unit-at-a-time)' is now dead code since '$(cc-version) -lt 0400' is always false. Signed-off-by: Masahiro Yamada --- arch/x86/Makefile.um | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) -- 2.7.4 Acked-by: Richard Weinberger diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um index 91085a0..577976b 100644 --- a/arch/x86/Makefile.um +++ b/arch/x86/Makefile.um @@ -26,12 +26,8 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2) # an unresolved reference. cflags-y += -ffreestanding -# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use -# a lot more stack due to the lack of sharing of stacklots. Also, gcc -# 4.3.0 needs -funit-at-a-time for extern inline functions. -KBUILD_CFLAGS += $(shell if [ $(cc-version) -lt 0400 ] ; then \ - echo $(call cc-option,-fno-unit-at-a-time); \ - else echo $(call cc-option,-funit-at-a-time); fi ;) +# gcc 4.3.0 needs -funit-at-a-time for extern inline functions. +KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time) KBUILD_CFLAGS += $(cflags-y) From patchwork Mon Nov 12 02:35:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 150775 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp2643409ljp; Sun, 11 Nov 2018 18:38:34 -0800 (PST) X-Google-Smtp-Source: AJdET5dWBfEmHrrNFJ5Lqjg4NlciCFxML29+4+lcYicdfVb70MQT1rhTEGSkvezs86NPd3YXeCGD X-Received: by 2002:a17:902:3103:: with SMTP id w3-v6mr5689957plb.18.1541990314095; Sun, 11 Nov 2018 18:38:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541990314; cv=none; d=google.com; s=arc-20160816; b=MbqP0QnBfHh7ha/tiXZsnzIECVsNZXpbdteA6UVJwUrBKiYdUl8LV6+TKk1n4lASxo TBx/7rDVhB9Nxi+zfLsxSi+5rh1uSbAqXhDkCsJTjOGHHMeLsKSJwi0jFgVHf5ceN6Q9 3/VB6OUQGLTp3O3Mv/iponAPmH1JtXX+qqFHZAttELz3XhcIzoS5575DGTlXRCHFRY4S vn8fsA+zFP3dvifE8MaUwcCf+lcq9YyFjdShRHfpEOZ54BhVJmVQTX5ts9FMS4bRFA0N eZgFobq08O5RulmMa0PAmxuAOs3RL833n2MZfN0XNImCNF3zipNWjrzSyf70siymQSkE rv7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=D/YvA7fG3eU8iQ4XCYgoVJjQnd4bdw8V+EnSjh78kh0=; b=r733x5MgPkilW9kXGrscVYq4pEwY57zJjZ2KjA6Y9DqS3wnA654lN/eLng2vlC8DEL ECLvOdM+cHq4PwVg6qN7xTovnIg1NY3cQ87uqnml0uPgbrK+8Zsuv2HQF+msUNeErfhB /7Rh289oFvD9AYXxSI0sSNFI8Cjd79V+Zh4WaVvc6P3Nnr42UZpZDSTqzzmyMM6UDcvH m/NPI0L+wZ2aKPCstLl6YefLCZ0uMtEwp8RYUteIepXBVmbUwI+pCSl5UnvORpvZ+HRv 8sAFQ79WsSGuLWeOxCwJiLgeX6JaEBiijZ3obcaTb6c29C3gILTyMLIcdA6SRKXzQrzN LUJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=fzvuX3Br; 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 v4-v6si15658147plz.250.2018.11.11.18.38.33; Sun, 11 Nov 2018 18:38:34 -0800 (PST) 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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=fzvuX3Br; 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 S1730308AbeKLM3b (ORCPT + 32 others); Mon, 12 Nov 2018 07:29:31 -0500 Received: from conuserg-08.nifty.com ([210.131.2.75]:16507 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729935AbeKLM3b (ORCPT ); Mon, 12 Nov 2018 07:29:31 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id wAC2ZqVU015801; Mon, 12 Nov 2018 11:35:54 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com wAC2ZqVU015801 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1541990155; bh=D/YvA7fG3eU8iQ4XCYgoVJjQnd4bdw8V+EnSjh78kh0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fzvuX3Bra8KLE9Rh3REv55KBUmUCE7oTRkQlfJ2ZyFZNyr7uLINHuLHxFSk6lrTLi kNcg3yxZAGvaNt0UVlG3Uh3HecmArW8QmgBJQ7/ejCUUxxKYkSuKrZaf2x81bFmg6S zv5ZN0s2WmCLfl35TvG2Hm306NwOHWGmgQf8yVI322xsSpwFnND2PCH4zaRiySqtNg pQpYzKR+8/H96J13EPQpu64My7ZB7DU6tyHT69MFLHIUyqAaK5NGt4F+eimsAjlTdd ArY3H7djdnoflh2KtFzqQ5ApxLN0HslLF5dVNNS3u+LRZ/HUDQXjGpieEYxt0cE3oo BP0FjJUpn4nCA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Ingo Molnar , Thomas Gleixner , x86@kernel.org Cc: Richard Weinberger , linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Masahiro Yamada , "H. Peter Anvin" , Borislav Petkov , Benjamin Herrenschmidt , linux-kernel@vger.kernel.org, Paul Mackerras Subject: [PATCH 2/2] x86, powerpc: remove -funit-at-a-time compiler option entirely Date: Mon, 12 Nov 2018 11:35:20 +0900 Message-Id: <1541990120-9643-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1541990120-9643-1-git-send-email-yamada.masahiro@socionext.com> References: <1541990120-9643-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org GCC 4.6 manual says: -funit-at-a-time This option is left for compatibility reasons. -funit-at-a-time has no effect, while -fno-unit-at-a-time implies -fno-toplevel-reorder and -fno-section-anchors. Enabled by default. Signed-off-by: Masahiro Yamada --- arch/powerpc/Makefile | 4 ---- arch/x86/Makefile | 4 ---- arch/x86/Makefile.um | 5 ----- 3 files changed, 13 deletions(-) -- 2.7.4 Acked-by: Ingo Molnar Acked-by: Michael Ellerman diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 8a2ce14..854199c 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -228,10 +228,6 @@ KBUILD_CFLAGS += $(call cc-option,-mno-vsx) KBUILD_CFLAGS += $(call cc-option,-mno-spe) KBUILD_CFLAGS += $(call cc-option,-mspe=no) -# Enable unit-at-a-time mode when possible. It shrinks the -# kernel considerably. -KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time) - # FIXME: the module load should be taught about the additional relocs # generated by this. # revert to pre-gcc-4.4 behaviour of .eh_frame diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 88398fd..3508049 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -130,10 +130,6 @@ else KBUILD_CFLAGS += -mno-red-zone KBUILD_CFLAGS += -mcmodel=kernel - - # -funit-at-a-time shrinks the kernel .text considerably - # unfortunately it makes reading oopses harder. - KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time) endif ifdef CONFIG_X86_X32 diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um index 577976b..1db7913 100644 --- a/arch/x86/Makefile.um +++ b/arch/x86/Makefile.um @@ -26,9 +26,6 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2) # an unresolved reference. cflags-y += -ffreestanding -# gcc 4.3.0 needs -funit-at-a-time for extern inline functions. -KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time) - KBUILD_CFLAGS += $(cflags-y) else @@ -50,6 +47,4 @@ ELF_FORMAT := elf64-x86-64 LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64 LINK-y += -m64 -# Do unit-at-a-time unconditionally on x86_64, following the host -KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time) endif