From patchwork Fri Feb 12 16:06:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102792 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp912515lbl; Fri, 12 Feb 2016 08:07:32 -0800 (PST) X-Received: by 10.66.193.202 with SMTP id hq10mr3241175pac.6.1455293252747; Fri, 12 Feb 2016 08:07:32 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r21si20778605pfi.191.2016.02.12.08.07.32; Fri, 12 Feb 2016 08:07:32 -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; 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 S1751514AbcBLQH2 (ORCPT + 30 others); Fri, 12 Feb 2016 11:07:28 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:55132 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750917AbcBLQHZ (ORCPT ); Fri, 12 Feb 2016 11:07:25 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue001) with ESMTPA (Nemesis) id 0Lf3PM-1ZfrX727B2-00omP6; Fri, 12 Feb 2016 17:06:49 +0100 From: Arnd Bergmann To: Michal Marek Cc: linux-arm-kernel@lists.infradead.org, Peter Oberparleiter , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 1/5] Kbuild: change CC_OPTIMIZE_FOR_SIZE definition Date: Fri, 12 Feb 2016 17:06:18 +0100 Message-Id: <1455293187-179811-2-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1455293187-179811-1-git-send-email-arnd@arndb.de> References: <1455293187-179811-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:QPOq1zIKBti0+Re3G3WnM5xeGWtG5X7YilwQDwzpKKo3Rgq4ipt wCdHRwgGNetDTkU8ZXh7QMx19BZSt4qUuHNPIq+hLLBjT7i4eEcGeFISBfMlOtx7HspyFrD 51cFRZAwkRVx74kyO2rrUw4LVnM9bIiHLnpCFsg0xRBHWLfCctflkNAtg+LrWoKkuPldpsV mj8GmErMoalkLt/PAEZ/w== X-UI-Out-Filterresults: notjunk:1; V01:K0:4WnsDgrZsRQ=:+P5X5XuxiFtGcHO0ngnHQH B9gqrfVICbClaHnptrTgmPjctBo0fmX5k8Uyw8IIl5N+CSddS0RfBLvnh5k706ao5oVuxaLQG zjcAd3j+aLnG4fzOYa917pHrKpEokFDGkn/vVfkgrZUrItckJmA6JaIX+gwElQqqhWCTMPnE7 a13XK0o1dQCouD32vcu39o9KnXD0ksuFU3c8yq+t8qx+Xz3lYhOrcdF++hSimWx1BSPD81M8C T6pQVyIqS9Xq2zPwRXKIMmsV8QVNQzwBCw7j2ebx03vidtqlCSCY6ESZrHOp/2/i+7z+T03iO CDHpb8nI/h26O8p4OSKqGLIVcHlIZytiyU4jnp+UE2RewJxehFZRUfiz/cVQvONPYYByDFTI0 3xo8340zMAqtZGURUu7KpgS/mgcNMLratzvTIc0/Imkq2yzjupDwBDahaMbDIPH3o31GLJ+dT 6GeO2KcC3kldDur5bZygvypWOtUYtpH9ikX7u8921jAdCSigiAOUlV8XcAm1vO/G7CZarD4n2 UR+ipYVtlItYzVt54PLrrP03wvCyLubMQNYwJwvNINygq/p0gf0F8XL6vMqC/IjgZA2KZqZYG nobYuU/KO8HpfmZLogH90QnrYqwZmi+EEQrHxMw4ZJH3da7CQISeGEZmuFtLPK9TUKqyzJ+ot /hgU9Eq8O0XH1w02xX6y7FYDtPQa6N1cUw72mYhn6B948B9mHIo+9ZQkFAIaa8i0ENGk= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org CC_OPTIMIZE_FOR_SIZE disables the often useful -Wmaybe-unused warning, because that causes a ridiculous amount of false positives when combined with -Os. This means a lot of warnings don't show up in testing by the developers that should see them with an 'allmodconfig' kernel that has CC_OPTIMIZE_FOR_SIZE enabled, but only later in randconfig builds that don't. This changes the Kconfig logic around CC_OPTIMIZE_FOR_SIZE to make it a 'choice' statement defaulting to CC_OPTIMIZE_FOR_PERFORMANCE that gets added for this purpose. The allmodconfig and allyesconfig kernels now default to -O2 with the maybe-unused warning enabled. Signed-off-by: Arnd Bergmann --- init/Kconfig | 13 +++++++++++++ 1 file changed, 13 insertions(+) -- 2.7.0 diff --git a/init/Kconfig b/init/Kconfig index 651ec15ecddb..159a542ef3fc 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1305,6 +1305,17 @@ source "usr/Kconfig" endif +choice + prompt "Compiler optimization level" + default CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE + +config CC_OPTIMIZE_FOR_PERFORMANCE + bool "Optimize for performance" + help + This is the default optimization level for the kernel, building + with the "-O2" compiler flag for best performance and most + helpful compile-time warnings. + config CC_OPTIMIZE_FOR_SIZE bool "Optimize for size" help @@ -1313,6 +1324,8 @@ config CC_OPTIMIZE_FOR_SIZE If unsure, say N. +endchoice + config SYSCTL bool From patchwork Fri Feb 12 16:06:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102791 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp912592lbl; Fri, 12 Feb 2016 08:07:40 -0800 (PST) X-Received: by 10.66.141.11 with SMTP id rk11mr3232318pab.75.1455293259860; Fri, 12 Feb 2016 08:07:39 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id or6si20803441pab.5.2016.02.12.08.07.39; Fri, 12 Feb 2016 08:07:39 -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; 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 S1751565AbcBLQHh (ORCPT + 30 others); Fri, 12 Feb 2016 11:07:37 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:52765 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750917AbcBLQHe (ORCPT ); Fri, 12 Feb 2016 11:07:34 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue001) with ESMTPA (Nemesis) id 0MbXng-1akpj2260y-00InAO; Fri, 12 Feb 2016 17:06:56 +0100 From: Arnd Bergmann To: Michal Marek Cc: linux-arm-kernel@lists.infradead.org, Peter Oberparleiter , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 2/5] Kbuild: disable 'maybe-uninitialized' warning for CONFIG_PROFILE_ALL_BRANCHES Date: Fri, 12 Feb 2016 17:06:19 +0100 Message-Id: <1455293187-179811-3-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1455293187-179811-1-git-send-email-arnd@arndb.de> References: <1455293187-179811-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:s1Oi12seCjumdw2BWNK2FQL9njEDf/8ViLnDXlRHuLlTmzpd5LN THvAx2u7W+oF8WBHcZWklVeLCUJ4uZHuDGu5AI45SUghOhxcHXLTm95ojbd1EX2P6FBxSy7 E9hWqfch4ugUGiaYncd31iBdnsf4hLxY1qzyXOjCB/s2EmJ326DKzugYtAFraiuiY7LsmpB eEaIv9PcuDhgZ6gzLZa+w== X-UI-Out-Filterresults: notjunk:1; V01:K0:u1s8PVbB9LY=:FUFo++Ur7/Fpp8lWZcWs1J i6L8efQZXNG9IOIdVwXRE08syWAWThV8YfhxtjPydEuzvYYxA4TeYLj8lOwleH1+fWQPSO1s9 PUHIyfH8f4DhaIcmE8BcY8XYiQO0WXeX9LFsXNWMmOP3NmcTyhv7Wpd64gP3Wy2orsl+RW2AR Idhn3/lQcFZfZCaa+uO5CNu8wcvVL8a831HEp+M/t0QcDCnX3AmAgMb3lYVgqk7gdhuc4s4X3 s78MoX5KG91FllQJ9mq/fgPBUTz92Y3rwqMG/uymBBQTqbh0HpcwfnZVIEcHIR56UXh2vGbhl CN+t+C30DSNXqS8cTjw4nQRoGfYcRgxdSbD97Myd/7yw6AJ4jdOd+DcOqc7gdt+4nuEWkepVf T9Qd0ua0KSFSHUHZHP4IALz5zioeVc35b8a27o93EisdAVc5PfravUEpgI3EI12VOWG00Rjz4 IwV9KDqzsBUUxFGx+a20xXXGhfpt4hbD52lGRuINvBOIU/h5hC0Z3lvVNxivSAwbwoEgj08ZB SUA1M9kg8w8IqZq4hpiCP4yhw1iAa9MRtYuTfE/1rq5/tK7AlehxqCbXGA2fj4kZV5Y1NkfBf chU1DzuagRAPx7s0HzjKGRL/iYoj5rAbiLtDROEIe22IA+6WhlIH3xjXsDwIceawt20KzpDqF TKbu3uup1M3ojxtbIar7sUuuUZwIMEyOJZXKpCw6ExAYPH1TqpHjbxsaMuFfO6nnpu6I= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org CONFIG_PROFILE_ALL_BRANCHES confuses gcc-5.x to the degree that it prints incorrect warnings about a lot of variables that it thinks can be used uninitialized, e.g.: i2c/busses/i2c-diolan-u2c.c: In function 'diolan_usb_xfer': i2c/busses/i2c-diolan-u2c.c:391:16: warning: 'byte' may be used uninitialized in this function iio/gyro/itg3200_core.c: In function 'itg3200_probe': iio/gyro/itg3200_core.c:213:6: warning: 'val' may be used uninitialized in this function leds/leds-lp55xx-common.c: In function 'lp55xx_update_bits': leds/leds-lp55xx-common.c:350:6: warning: 'tmp' may be used uninitialized in this function misc/bmp085.c: In function 'show_pressure': misc/bmp085.c:363:10: warning: 'pressure' may be used uninitialized in this function power/ds2782_battery.c: In function 'ds2786_get_capacity': power/ds2782_battery.c:214:17: warning: 'raw' may be used uninitialized in this function These are all false positives that either rob someone's time when trying to figure out whether they are real, or they get people to send wrong patches to shut up the warnings. Nobody normally wants to run a CONFIG_PROFILE_ALL_BRANCHES kernel in production, so disabling the whole class of warnings for this configuration has no serious downsides either. Signed-off-by: Arnd Bergmann --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.7.0 diff --git a/Makefile b/Makefile index 9092c16fa6cf..352f55ccc54e 100644 --- a/Makefile +++ b/Makefile @@ -617,7 +617,11 @@ KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,) ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,) else -KBUILD_CFLAGS += -O2 +ifdef CONFIG_PROFILE_ALL_BRANCHES +KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,) +else +KBUILD_CFLAGS += -O2 +endif endif # Tell gcc to never replace conditional load with a non-conditional one From patchwork Fri Feb 12 16:06:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102790 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp912686lbl; Fri, 12 Feb 2016 08:07:50 -0800 (PST) X-Received: by 10.98.0.84 with SMTP id 81mr3276295pfa.67.1455293269887; Fri, 12 Feb 2016 08:07:49 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r79si20768576pfb.75.2016.02.12.08.07.49; Fri, 12 Feb 2016 08:07:49 -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; 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 S1751649AbcBLQHk (ORCPT + 30 others); Fri, 12 Feb 2016 11:07:40 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:56720 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750771AbcBLQHh (ORCPT ); Fri, 12 Feb 2016 11:07:37 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue001) with ESMTPA (Nemesis) id 0MEOE4-1aEvEQ0mMa-00FReW; Fri, 12 Feb 2016 17:07:06 +0100 From: Arnd Bergmann To: Michal Marek , Peter Oberparleiter Cc: linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 3/5] gcov: disable for COMPILE_TEST Date: Fri, 12 Feb 2016 17:06:20 +0100 Message-Id: <1455293187-179811-4-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1455293187-179811-1-git-send-email-arnd@arndb.de> References: <1455293187-179811-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:yYoFLmsDdCnpQaQSN6A1M2cbe0cRRwg2nvUn2/AyCMNIYk2ZDf5 XEpqjQfvvoKpzW0Lzuc+bUKPz0E+4w9Ot0nSHANMEYpATNsUYCUSnuIC8MnB6Lam6HpXKYV UQjoqFdUo7rJCAQ1JQkqgz7hWQSW6AXLeF0qinmo8qsEA3co5WpMQFHWgsvc0dz7mcjcltR dgzYBB0cNJ9Gn1GIAWEtw== X-UI-Out-Filterresults: notjunk:1; V01:K0:UAwaYcaznec=:8vL2VyPeJiVoFkx/2mdE9s sb8OGvZnycz8oodb6GdtFchXGyb2fBQrl8NEI0t7SJzCE+tQb8k2Y6qjDNSQwmtPBgA/2SOHT yBvDpVVMrkgfq7FZ9FAlyO6vXwAvZAerFEFG95JVT4CRLjVctNUX9is0CMOYQs2WW57YOox8C 7J5NqdyK0TlWPkDINMKUsZGogQdN8Hkso7uXCV4KNE6YRGvK6SRgD6OM3rrXU+rnnBtLIr4dA EWpYC/UkPP1m20OYRCds1tJ7UC+Fh6HKcAoHQ1YCaT9DA629veRi8CtP+eQRZvDLe+JRquZFH D9mwKu0T86NETfsgx5Po3U9bSfkHEbuDzDjJB+s63WBo354SghewUDusBNmvlOkToP5cjLrao 9zM1vHYp4O0a5yLyzMaB9Ez+lqQJ7kFJsxbMIZ24q1EYZ41cAb58iYZHCMTAehKF+8+uAodi6 5wFmYoEOZ1qzHBYaUOtDLeCRy7vVLkj8oT458bcIfPwsKdcPHaMbtySkalEy4rZnxIfgYTEnd UUtonGva1WP5I4V4McVAoN+ncYrezQDxWIia5znmOyw2KxyiEoDYfjng2e5NIoXU95eV3Otvn b2nxMWmoWqh2G7Dq6Hr+sxEl9cRRkNLCiDkq2kA/8xlhiHwlQSseVfaAM7mzeFxMeVzV2lM1v Jpk1hfQSTYxoR696TBs+459y3IvlSgJeIFhOLlm1H3f3naCkVPMN2heRxZjrqulEft0w= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Enabling gcov is counterproductive to compile testing: it significantly increases the kernel image size, compile time, and it produces lots of false positive "may be used uninitialized" warnings as the result of missed optimizations. This is in line with how UBSAN_SANITIZE_ALL and PROFILE_ALL_BRANCHES work, both of which have similar problems. With an ARM allmodconfig kernel, I see the build time drop from 283 minutes CPU time to 225 minutes, and the vmlinux size drops from 43MB to 26MB. Signed-off-by: Arnd Bergmann --- kernel/gcov/Kconfig | 1 + 1 file changed, 1 insertion(+) -- 2.7.0 diff --git a/kernel/gcov/Kconfig b/kernel/gcov/Kconfig index c92e44855ddd..1276aabaab55 100644 --- a/kernel/gcov/Kconfig +++ b/kernel/gcov/Kconfig @@ -37,6 +37,7 @@ config ARCH_HAS_GCOV_PROFILE_ALL config GCOV_PROFILE_ALL bool "Profile entire Kernel" + depends on !COMPILE_TEST depends on GCOV_KERNEL depends on ARCH_HAS_GCOV_PROFILE_ALL default n From patchwork Fri Feb 12 16:06:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102788 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp912766lbl; Fri, 12 Feb 2016 08:07:57 -0800 (PST) X-Received: by 10.66.142.200 with SMTP id ry8mr3247667pab.31.1455293276912; Fri, 12 Feb 2016 08:07:56 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wl2si20694241pab.236.2016.02.12.08.07.56; Fri, 12 Feb 2016 08:07:56 -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; 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 S1751882AbcBLQHv (ORCPT + 30 others); Fri, 12 Feb 2016 11:07:51 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:49734 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751451AbcBLQHs (ORCPT ); Fri, 12 Feb 2016 11:07:48 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue001) with ESMTPA (Nemesis) id 0M1NdZ-1aAx571aDR-00tVMT; Fri, 12 Feb 2016 17:07:12 +0100 From: Arnd Bergmann To: Michal Marek Cc: linux-arm-kernel@lists.infradead.org, Peter Oberparleiter , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 4/5] gcov: disable tree-loop-im to reduce stack usage Date: Fri, 12 Feb 2016 17:06:21 +0100 Message-Id: <1455293187-179811-5-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1455293187-179811-1-git-send-email-arnd@arndb.de> References: <1455293187-179811-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:x/jMpVkUysqmD34epmDM+BoZ6elgxq12s3MRWysAhiBbFPa60uA gL7OYWzSfe3T3ORq9IqDWkXVeDN+5PTlV3WaIiXmDYbXaUphCE98fRuXuNfvbEzcpF9iozE w8HKB7haDQ8inkNIuIFK/GdLvjMKle1GnGRpM/HHtfMnRwL6Sl+RwW0UKUL+Cjia6boQA9z RSTygYcYrjPjle6yEsEAA== X-UI-Out-Filterresults: notjunk:1; V01:K0:3CJKc2b1+iQ=:Pbw2fgkCQx/Zyu1LnjmwDt tj0KYQsDlQJxfJwZxghA0spCMpfpU37uIbxzFf0WCvxNRhFaiM6CNFxYQmrqCjypFSsbixw/H b+2VErBEy1evJUlL8Mlxkm47+lheU6uoLrCB8lLjMG9XOE+HOsbPfLijibq4k86s9FzQ+X8MX 5IWaUfVFqe7B30/ZaLeaBL9Gj2EEmEY/gvIsyZPNzfKMLzmqNpdN0lvE45uKIMncosk+F0hD1 QdXb/XufSntgqyyWBThfdnkTN0MGriM0Gi0C0ZfOqQSH4Qn1Bpf+Fl6fAskX/2poubPje5HAQ 076xql+809+613CYZjMBBTi0VBXkFJGR9M4jkPN64a+52sjZJ1wH5VtwhnLy/2L7TW+BtE9el U3ikB9tEHM5GdJZCDA0EQzqu/ZsJoBHFY6d0NQs5g22NWSN1obJXp7IMtK7uDAj2Q+IrmfD8X Y1vRdL7lcZ/uesVyQ4CZfEzgSlWBKGmu/33ZYbhGBVLVSu1uMbNqeA0WrcZ1kPgWKy5VQo2TX lM/0m8yDdKMpbtFIt7l3UyWyHL7cKWxD7G2s83hfRpOJ9iVun5WFr53uZoVgnECIYFoaSy30v Ohuu8usUhamcie6gbPKGGXg1LrytK5qmi97DqCqB91nM+HWg3GhB+O3VG7VJv3C5NqDpAtw1u VtMjT1zQ8hnRzPv28gHgb2B3wpV2AN9BkZKLImj3gGVgKrn66SSptvcAx+mY8qHRvA6Y= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Enabling CONFIG_GCOV_PROFILE_ALL produces us a lot of warnings like lib/lz4/lz4hc_compress.c: In function 'lz4_compresshcctx': lib/lz4/lz4hc_compress.c:514:1: warning: the frame size of 1504 bytes is larger than 1024 bytes [-Wframe-larger-than=] After some investigation, I found that this behavior started with gcc-4.9, and opened https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69702. A suggested workaround for it is to use the -fno-tree-loop-im flag that turns off one of the optimization stages in gcc, so the code runs a little slower but does not use excessive amounts of stack. We could make this conditional on the gcc version, but I could not find an easy way to do this in Kbuild and the benefit would be fairly small, given that most of the gcc version in production are affected now. Signed-off-by: Arnd Bergmann --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.0 diff --git a/Makefile b/Makefile index 352f55ccc54e..6bb89728a9d1 100644 --- a/Makefile +++ b/Makefile @@ -364,7 +364,7 @@ AFLAGS_MODULE = LDFLAGS_MODULE = CFLAGS_KERNEL = AFLAGS_KERNEL = -CFLAGS_GCOV = -fprofile-arcs -ftest-coverage +CFLAGS_GCOV = -fprofile-arcs -ftest-coverage -fno-tree-loop-im CFLAGS_KCOV = -fsanitize-coverage=trace-pc From patchwork Fri Feb 12 16:06:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102789 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp912702lbl; Fri, 12 Feb 2016 08:07:51 -0800 (PST) X-Received: by 10.98.34.209 with SMTP id p78mr3310247pfj.154.1455293270265; Fri, 12 Feb 2016 08:07:50 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r79si20768576pfb.75.2016.02.12.08.07.49; Fri, 12 Feb 2016 08:07:50 -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; 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 S1751737AbcBLQHo (ORCPT + 30 others); Fri, 12 Feb 2016 11:07:44 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:53244 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750771AbcBLQHl (ORCPT ); Fri, 12 Feb 2016 11:07:41 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue001) with ESMTPA (Nemesis) id 0LeUuc-1ZeDMp3FVO-00qQpW; Fri, 12 Feb 2016 17:07:17 +0100 From: Arnd Bergmann To: Michal Marek Cc: linux-arm-kernel@lists.infradead.org, Peter Oberparleiter , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 5/5] gcov: disable -Wmaybe-uninitialized warning Date: Fri, 12 Feb 2016 17:06:22 +0100 Message-Id: <1455293187-179811-6-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1455293187-179811-1-git-send-email-arnd@arndb.de> References: <1455293187-179811-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:du479uTw3+4oRo3fn8qoXIuHeL4DxfimU6tI1bxRzEi4kH/4Gta /DRcc8unmjelrrVH85dx4MKGTRLfn8iuH5NyIwm7MNvmLf+JLc2hZ7MOoS8fzhIiad3x70p S08MPvCAXEHra//9lAkzsiqyIt0fO25gjFhpNaUlBNynWY+MIODAy9A+6xn7JVDw2s6YDir Q9y3h90B45mzPWv4bOzGQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:Pz6rD4liuto=:OyL7zTcmlbAfqBJ5E6pEk/ 5O+u6NtUYhM1X8IKUOPBz+dJdl7X3/prd0OnlN2MRrWqAusSAQcz5QXXGliZFSaEM4m+kb6Rs BdDGsaE4Qe3emUeNfNxorFtz6lwvIItJFVhX9Q7ixbb70MS6x0csEFHFAZpH4JnVdi+1efvx7 PQ0mooUApgrtXhzF4AMkpIIVmZFzWsXYizqpNhwaatpv3XQ2zAiFPVlLKlsbDRNNbSWpA/WvK 5mNiaSLsMfOIVE90iezlk+qMehnmfbp4cdzle0pS8ZZijwpSrfyvP9ymDnMU86H8DMdnnB/uW LxNsqISV4Jyads8V7WoYm3VTHnY3ZQigKxZDQlDd2pxtD9kyHfaKrqLpJTZz6QjBBXnN3rJTg C0nQJZy6vg4OBhgwN5l0m1OC8pE9Z0fUe+cWTOcSX95l09igGZZQ/DA/R/5sznX9oiBavlrvK yelEbQUwSqxQ4jWngCPKnEvLOKhv2s3wlz0EPyFwkIhUJ8t5FEXDusZ3g3rX+Bn16Z5unaEHI m9+zzzC5ADgdKvOK6iQWNvP4IiBuCD33SbwTnDEpTx/QzI0Splt11OCcTUfLMve7kQKTpmO5f Q+eyZugd0MquCKPXn4Ensy5YY9WgvhW1vWClg+Naf5HixEZHlKWsI0S3DWfz9g70xvyOCnIkX qQH/3ITlYt/huUnsGrt+2p/dST90StgOh8iet0xZIOhuJmOrvh4Hx8eM+M/+v36G0k9I= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When gcov profiling is enabled, we see a lot of spurious warnings about possibly uninitialized variables being used: arch/arm/mm/dma-mapping.c: In function 'arm_coherent_iommu_map_page': arch/arm/mm/dma-mapping.c:1085:16: warning: 'start' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/clk/st/clk-flexgen.c: In function 'st_of_flexgen_setup': drivers/clk/st/clk-flexgen.c:323:9: warning: 'num_parents' may be used uninitialized in this function [-Wmaybe-uninitialized] kernel/cgroup.c: In function 'cgroup_mount': kernel/cgroup.c:2119:11: warning: 'root' may be used uninitialized in this function [-Wmaybe-uninitialized] All of these are false positives, so it seems better to just disable the warnings whenever GCOV is enabled. Most users don't enable GCOV, and based on a prior patch, it is now also disabled for 'allmodconfig' builds, so there should be no downsides of doing this. Signed-off-by: Arnd Bergmann --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.0 diff --git a/Makefile b/Makefile index 6bb89728a9d1..7b6900931a47 100644 --- a/Makefile +++ b/Makefile @@ -364,7 +364,7 @@ AFLAGS_MODULE = LDFLAGS_MODULE = CFLAGS_KERNEL = AFLAGS_KERNEL = -CFLAGS_GCOV = -fprofile-arcs -ftest-coverage -fno-tree-loop-im +CFLAGS_GCOV = -fprofile-arcs -ftest-coverage -fno-tree-loop-im -Wno-maybe-uninitialized CFLAGS_KCOV = -fsanitize-coverage=trace-pc