From patchwork Fri Apr 19 09:47:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10908723 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 64F7714DB for ; Fri, 19 Apr 2019 09:50:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5191528CD5 for ; Fri, 19 Apr 2019 09:50:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4522B28D25; Fri, 19 Apr 2019 09:50:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D1EA628CD5 for ; Fri, 19 Apr 2019 09:50:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=HsFJ5T4nkrZRtn5UvqBW35b7KujQNWhsH9FhgU6QpWA=; b=GSQejB0XPS1NIHmt7LADiHPm8s g1WIQF8FfCvv/j29bYk9SYR4VfcgVXESAXU7i9XRzruwqV5cuiiEKhs08chDAQ+BzAH06so2ufNhR qNXUg9erwntzkv8qzSyy9bo9+CnN5gg0PdSkBVlKcfIW/0r0+BWhVlYWIfd5gyXXbamXNFzo51WzT PwlacfIrP/oGhSBx95/mPOc43Q3g37T+R1hNuHNaype3Drze71VmfRVgpBcsBzPCICu4P/FVDYIqA Sh28bv+9PjsYDrLhASgFS15CBvvPpu2Ug1iZraG6VJLiifVxmlCJTxDJMjL1TKRwSJ52b5re4DMlI SpP/ZgTQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQAI-0001Sb-P3; Fri, 19 Apr 2019 09:50:38 +0000 Received: from conuserg-08.nifty.com ([210.131.2.75]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQ8W-0006Yy-43; Fri, 19 Apr 2019 09:48:51 +0000 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id x3J9mDiM012304; Fri, 19 Apr 2019 18:48:15 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com x3J9mDiM012304 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1555667296; bh=xEQiTaRJoMiIIoSSR5uW02FG6OV+z3ajZxuyDMzswK8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2JQf30n281jQB4d2J0PFa1uofVewZCgz9BKrQlNEnXrgFMBLbR2Zq1r6w+iBaLG45 t3nsjO2yy9K2rayA6kAG7W5QOZXT/QC/pn2nbYfF3OTOTfF8RmCuBd5yJ5z4STfAVR S50CNHJXKGoZKrDOh8HkCZk629LOHn6U1lbZhC7JMhAyR3/Tr/rg3GcrCj9JDWjHAO UiGSppMnUWU7gB7Bziv+abekGW5t79hjFO9/SOc6KfN1rVoLYaqIJni87B3Xd6Wk7W H2/rg3c+1nge1l4Y9lbsm/7RvW65UIRkVG9T0d8qJA6UMAluoWZAQ17RYMK74wx8Rp ffTOmV/uhafAw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Andrew Morton , linux-arch Subject: [PATCH v2 01/11] ARM: prevent tracing IPI_CPU_BACKTRACE Date: Fri, 19 Apr 2019 18:47:44 +0900 Message-Id: <20190419094754.24667-2-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190419094754.24667-1-yamada.masahiro@socionext.com> References: <20190419094754.24667-1-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190419_024848_509807_B7C1C520 X-CRM114-Status: GOOD ( 13.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christophe Leroy , linux-s390@vger.kernel.org, Arnd Bergmann , x86@kernel.org, Heiko Carstens , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Ingo Molnar , linux-mtd@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Arnd Bergmann When function tracing for IPIs is enabled, we get a warning for an overflow of the ipi_types array with the IPI_CPU_BACKTRACE type as triggered by raise_nmi(): arch/arm/kernel/smp.c: In function 'raise_nmi': arch/arm/kernel/smp.c:489:2: error: array subscript is above array bounds [-Werror=array-bounds] trace_ipi_raise(target, ipi_types[ipinr]); This is a correct warning as we actually overflow the array here. This patch raise_nmi() to call __smp_cross_call() instead of smp_cross_call(), to avoid calling into ftrace. For clarification, I'm also adding a two new code comments describing how this one is special. The warning appears to have shown up after patch e7273ff49acf ("ARM: 8488/1: Make IPI_CPU_BACKTRACE a "non-secure" SGI"), which changed the number assignment from '15' to '8', but as far as I can tell has existed since the IPI tracepoints were first introduced. If we decide to backport this patch to stable kernels, we probably need to backport e7273ff49acf as well. Fixes: e7273ff49acf ("ARM: 8488/1: Make IPI_CPU_BACKTRACE a "non-secure" SGI") Fixes: 365ec7b17327 ("ARM: add IPI tracepoints") # v3.17 Signed-off-by: Arnd Bergmann [yamada.masahiro@socionext.com: rebase on v5.0-rc1] Signed-off-by: Masahiro Yamada --- This is a long-standing issue, and Arnd posted this patch two years ago: http://lists.infradead.org/pipermail/linux-arm-kernel/2016-February/409393.html It is no longer applied, so I rebased it on top of the latest kernel. Changes in v2: None arch/arm/include/asm/hardirq.h | 1 + arch/arm/kernel/smp.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/hardirq.h b/arch/arm/include/asm/hardirq.h index cba23eaa6072..7a88f160b1fb 100644 --- a/arch/arm/include/asm/hardirq.h +++ b/arch/arm/include/asm/hardirq.h @@ -6,6 +6,7 @@ #include #include +/* number of IPIS _not_ including IPI_CPU_BACKTRACE */ #define NR_IPI 7 typedef struct { diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index facd4240ca02..c93fe0f256de 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -70,6 +70,10 @@ enum ipi_msg_type { IPI_CPU_STOP, IPI_IRQ_WORK, IPI_COMPLETION, + /* + * CPU_BACKTRACE is special and not included in NR_IPI + * or tracable with trace_ipi_* + */ IPI_CPU_BACKTRACE, /* * SGI8-15 can be reserved by secure firmware, and thus may @@ -797,7 +801,7 @@ core_initcall(register_cpufreq_notifier); static void raise_nmi(cpumask_t *mask) { - smp_cross_call(mask, IPI_CPU_BACKTRACE); + __smp_cross_call(mask, IPI_CPU_BACKTRACE); } void arch_trigger_cpumask_backtrace(const cpumask_t *mask, bool exclude_self) From patchwork Fri Apr 19 09:47:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10908719 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BA9581515 for ; Fri, 19 Apr 2019 09:49:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7F5728CE7 for ; Fri, 19 Apr 2019 09:49:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9AEC528D26; Fri, 19 Apr 2019 09:49:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4796728CE7 for ; Fri, 19 Apr 2019 09:49:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=HPs+8Bas/rGr4o7Z1Fy6megE90cCMdEekm3Braf45Xk=; b=mVyu2brpVmqhgkwVo2PXLFOa68 5m2GKC0aUs9m4+qVcH7GUja6gSEaRiGLhFx5LjIeCG0viUOE3vc0DeqKHp1C0MhUDKgh9RwC/pqQw DzqHFhylDctZuSDShs6DJ3yD6JQ9U4XM0ZIKdgCRbIEhnVo1t7imhiu3GZEvYFmWGunK/GqR+cMK1 Fk5Wv5QT+ri/kuH9YIi5mDxdesmT5f880/cIYvwNviI3pVom9NiTxKGS6dMOmJoD91vFy+lsQdIV7 cZfzVodm9HWEt6fIhBVko523nAljFq2QMxHyKipsoACJn2pBBQQaSTRGfhj6qlTg45De4ijN0ueJr IjZOOYTQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQ8h-0006ik-UY; Fri, 19 Apr 2019 09:48:59 +0000 Received: from conuserg-08.nifty.com ([210.131.2.75]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQ8W-0006Yz-42; Fri, 19 Apr 2019 09:48:49 +0000 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id x3J9mDiN012304; Fri, 19 Apr 2019 18:48:16 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com x3J9mDiN012304 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1555667298; bh=dMl5gVEKTwHtHLItB6x+dFSf7lYx8Jwln2yhWkFBTvk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WiSRLVOq5x+2GONqtPqhDRF0aPfIywfLdfErEYoMZ6RdK4yxqxbz+tqQyKktdhALJ ZC0EplHjQIRsO0bd4gcGfzAfZvD/aZnFksxkFraObipxhINcqZ0PBSvY8jP7SQORTj OdwwG7dSJR9Ks0cIkNw5+63IypkzGIp2FzucD1i4uYJDoYimo4nbOjq/sRUowzAGQ1 QTqrvjrKruMK94jkE7107MwTjbAocK+Sd13vTiuxVIU+g1yxn93hj2IB7cRrCttREk ukMFwTu/ORTnKIYRmeM4Q/nWhGHfxQ8cKORzjRHv45JA6SZBgy5cI77VTMvNyhSKnq lgNKqF1IATJUA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Andrew Morton , linux-arch Subject: [PATCH v2 02/11] arm64: mark (__)cpus_have_const_cap as __always_inline Date: Fri, 19 Apr 2019 18:47:45 +0900 Message-Id: <20190419094754.24667-3-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190419094754.24667-1-yamada.masahiro@socionext.com> References: <20190419094754.24667-1-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190419_024848_496533_91476962 X-CRM114-Status: UNSURE ( 7.64 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christophe Leroy , linux-s390@vger.kernel.org, Arnd Bergmann , x86@kernel.org, Heiko Carstens , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Ingo Molnar , linux-mtd@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for arm64, the following errors are reported: In file included from ././include/linux/compiler_types.h:68, from : ./arch/arm64/include/asm/jump_label.h: In function 'cpus_have_const_cap': ./include/linux/compiler-gcc.h:120:38: warning: asm operand 0 probably doesn't match constraints #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) ^~~ ./arch/arm64/include/asm/jump_label.h:32:2: note: in expansion of macro 'asm_volatile_goto' asm_volatile_goto( ^~~~~~~~~~~~~~~~~ ./include/linux/compiler-gcc.h:120:38: error: impossible constraint in 'asm' #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) ^~~ ./arch/arm64/include/asm/jump_label.h:32:2: note: in expansion of macro 'asm_volatile_goto' asm_volatile_goto( ^~~~~~~~~~~~~~~~~ Signed-off-by: Masahiro Yamada --- Changes in v2: - split into a separate patch arch/arm64/include/asm/cpufeature.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h index e505e1fbd2b9..77d1aa57323e 100644 --- a/arch/arm64/include/asm/cpufeature.h +++ b/arch/arm64/include/asm/cpufeature.h @@ -406,7 +406,7 @@ static inline bool cpu_have_feature(unsigned int num) } /* System capability check for constant caps */ -static inline bool __cpus_have_const_cap(int num) +static __always_inline bool __cpus_have_const_cap(int num) { if (num >= ARM64_NCAPS) return false; @@ -420,7 +420,7 @@ static inline bool cpus_have_cap(unsigned int num) return test_bit(num, cpu_hwcaps); } -static inline bool cpus_have_const_cap(int num) +static __always_inline bool cpus_have_const_cap(int num) { if (static_branch_likely(&arm64_const_caps_ready)) return __cpus_have_const_cap(num); From patchwork Fri Apr 19 09:47:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10908717 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4126D1515 for ; Fri, 19 Apr 2019 09:48:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2016628CE7 for ; Fri, 19 Apr 2019 09:48:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 112BD28D26; Fri, 19 Apr 2019 09:48:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7BF8C28CE7 for ; Fri, 19 Apr 2019 09:48:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Rl7M94sWmkKAaF7XVIaCnK0s+7qk6aZtryD2aA+99lA=; b=HEMqiDxJd12sLCWST8ZRLFfkWv 9V0Cd9LirzgQqKCd9v3vGm/Lc8znM12q5iC7n0JP/WjF2PYiEVgHyrU9Jpz8FlzEnQzbhidwrLT84 lOlk8odqgHJtP/xNpcdsD9uf2jRIb8i11jyY1MJUBDgzy9iHOPRYZ30cAdka1VIN/+D3fNasz+Dxz V4Ec7F3bjsthpni7N8NMbpCtEcJ/kAewx6yX6ag0plBvuW3jHQqWJuoxnDf1w0zohCWFkd0mgQkPR il3dskgIi9eMpxPWlLxuCsULpFlqaOwLN2TRYvOYePsQyAt5VlEz+/Zl1BcxslCf95Ib7HFShPNKJ ljNEnhWA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQ8Z-0006aC-OO; Fri, 19 Apr 2019 09:48:51 +0000 Received: from conuserg-08.nifty.com ([210.131.2.75]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQ8W-0006Yw-46; Fri, 19 Apr 2019 09:48:49 +0000 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id x3J9mDiO012304; Fri, 19 Apr 2019 18:48:18 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com x3J9mDiO012304 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1555667299; bh=eBbK5bqyHyYLvrp0h+N2R8GVzQgJi3T0h1j8WWECYuA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OKc4G/SlCAf7HykNHZVlamSTNz1No39oMgc65nQjRDTm1rJqcc1jfITtM8UkGJeeU qObhbfjNVkPa4IwDzwkf26u4nAU3hKpzI+J6tQu3ZZdflpufZc02ms3G7P1pYc0JGU U7qK6j+UkZyyoUraiWV1lZJhK0+XIeylH+Mn3c3m1E09QsodghVCaNWl1cuXrgNz8b 5DldkJUE5/wxVWeRLc8etHsv7i3LuWfHrI9fqz+Y0tsYIthnhw01Jh2NIdTZmBrMN+ 7s8scZU2FDjhEEnGTf3RMaDna+3ZzgRUv3OjtWHIVq8LHNa1hTWHTHXXab/BDM1FmT yllXWqWf+S/IQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Andrew Morton , linux-arch Subject: [PATCH v2 03/11] MIPS: mark mult_sh_align_mod() as __always_inline Date: Fri, 19 Apr 2019 18:47:46 +0900 Message-Id: <20190419094754.24667-4-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190419094754.24667-1-yamada.masahiro@socionext.com> References: <20190419094754.24667-1-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190419_024848_496655_504E30BE X-CRM114-Status: UNSURE ( 7.60 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christophe Leroy , linux-s390@vger.kernel.org, Arnd Bergmann , x86@kernel.org, Heiko Carstens , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Ingo Molnar , linux-mtd@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for mips, the following error is reported: arch/mips/kernel/cpu-bugs64.c: In function 'mult_sh_align_mod.constprop': arch/mips/kernel/cpu-bugs64.c:33:2: error: asm operand 1 probably doesn't match constraints [-Werror] asm volatile( ^~~ arch/mips/kernel/cpu-bugs64.c:33:2: error: asm operand 1 probably doesn't match constraints [-Werror] asm volatile( ^~~ arch/mips/kernel/cpu-bugs64.c:33:2: error: impossible constraint in 'asm' asm volatile( ^~~ arch/mips/kernel/cpu-bugs64.c:33:2: error: impossible constraint in 'asm' asm volatile( ^~~ Signed-off-by: Masahiro Yamada --- Changes in v2: - split into a separate patch arch/mips/kernel/cpu-bugs64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/kernel/cpu-bugs64.c b/arch/mips/kernel/cpu-bugs64.c index bada74af7641..c04b97aace4a 100644 --- a/arch/mips/kernel/cpu-bugs64.c +++ b/arch/mips/kernel/cpu-bugs64.c @@ -42,8 +42,8 @@ static inline void align_mod(const int align, const int mod) : "n"(align), "n"(mod)); } -static inline void mult_sh_align_mod(long *v1, long *v2, long *w, - const int align, const int mod) +static __always_inline void mult_sh_align_mod(long *v1, long *v2, long *w, + const int align, const int mod) { unsigned long flags; int m1, m2; From patchwork Fri Apr 19 09:47:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10908727 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E537817EE for ; Fri, 19 Apr 2019 09:51:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D330028CD5 for ; Fri, 19 Apr 2019 09:51:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C73EA28D25; Fri, 19 Apr 2019 09:51:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7D4F828CD5 for ; Fri, 19 Apr 2019 09:51:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=SJIDUzLa0fYkYDQTCaQKJssQV9N0P6+CgAaI9IIeLp0=; b=Nu762xANLB0x99NYYt3R1OxVrA sDiJrOLSv+HHBmplmFIF1Nig4qkH8NkEmMtnr/vWDdO2IdHsksE/I+2I4ENL6emrKuw3jYHOQEBnW s5QjNhlF3PYZgwlVw0g7U1Ax5HmPDzOZztjH6wrfXIn6j3UhE93Ccj+81CgdG7AaStef1UlpJMJ0T NjDwToO1FITgZemyEe10IqMEESZVzYrCCz4VOMnp9N0UkQM6R34LQOolez/Dqo/BBmhAN9W0bzusU ++kCYlhQXmqlaEC/F569VYZapDx+hnVa9Eq4M2+zxJTe2k8tg8c6FMNMID8OHBkwFT5B6FdDCxNF7 RbzOsqJw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQAd-0001td-N1; Fri, 19 Apr 2019 09:50:59 +0000 Received: from conuserg-08.nifty.com ([210.131.2.75]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQ8a-0006aJ-A5; Fri, 19 Apr 2019 09:48:54 +0000 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id x3J9mDiP012304; Fri, 19 Apr 2019 18:48:19 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com x3J9mDiP012304 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1555667301; bh=I2dC2tyzuGPeMYW8zJtLNO2SxFu0p9zAPUz6pi0qgOE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SIFc/1m5Ydc1pZqGsG3eCmgNiSfy3fEcTrRuHrMyDzt0b0jj8XwnxcaFy2Z7DWjGS riHzRpJ1EiNeDdL5Gc9dT3SupXXDMA3GtG2u3K8Pxca74T2MoE5mm4aTh1DIhR0sLH sr01yXX6NTPQ4hvahiHWs5qiPJx+5swXFNgMpDL//v75znyCBqWjafE4ok5qB1xpNw FU4tOnsrJEcK/hbukt8CeCEuN+fheDfVwyNT6ZjigMy9E0ZREQHML885hMwaFDg7W9 EcjaUqUPqSosX8RQMcdvBqJM8nvjfZ6C4I5zLTZlAu6aYHGZ2LzOBOi9XH5rueuPtj Uiob7ameRmtFA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Andrew Morton , linux-arch Subject: [PATCH v2 04/11] s390/cpacf: mark scpacf_query() as __always_inline Date: Fri, 19 Apr 2019 18:47:47 +0900 Message-Id: <20190419094754.24667-5-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190419094754.24667-1-yamada.masahiro@socionext.com> References: <20190419094754.24667-1-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190419_024852_751970_8CF7C5C3 X-CRM114-Status: UNSURE ( 8.56 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christophe Leroy , linux-s390@vger.kernel.org, Arnd Bergmann , x86@kernel.org, Heiko Carstens , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Ingo Molnar , linux-mtd@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for s390, the following error is reported: In file included from arch/s390/crypto/des_s390.c:19: ./arch/s390/include/asm/cpacf.h: In function 'cpacf_query': ./arch/s390/include/asm/cpacf.h:170:2: warning: asm operand 3 probably doesn't match constraints asm volatile( ^~~ ./arch/s390/include/asm/cpacf.h:170:2: error: impossible constraint in 'asm' Signed-off-by: Masahiro Yamada --- Changes in v2: - split into a separate patch arch/s390/include/asm/cpacf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/include/asm/cpacf.h b/arch/s390/include/asm/cpacf.h index 3cc52e37b4b2..f316de40e51b 100644 --- a/arch/s390/include/asm/cpacf.h +++ b/arch/s390/include/asm/cpacf.h @@ -202,7 +202,7 @@ static inline int __cpacf_check_opcode(unsigned int opcode) } } -static inline int cpacf_query(unsigned int opcode, cpacf_mask_t *mask) +static __always_inline int cpacf_query(unsigned int opcode, cpacf_mask_t *mask) { if (__cpacf_check_opcode(opcode)) { __cpacf_query(opcode, mask); From patchwork Fri Apr 19 09:47:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10908735 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3CB9B14DB for ; Fri, 19 Apr 2019 09:51:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2CE6728CD5 for ; Fri, 19 Apr 2019 09:51:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 209D328D25; Fri, 19 Apr 2019 09:51:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A266A28CD5 for ; Fri, 19 Apr 2019 09:51:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qNluPewaWuITGUQhdddjNBUtxTJP2iqbHM6hIa84Jw0=; b=MxFRfPnLdn8rlX JQ31IvsSkl0pl8s3sL4UIezKPa3pPKvjS6kjc3wo7sLiBJE1dYfSqnaQx5o5cUH9qoeOb7V/VnrnM 96pU2WYXvdBMaWQWt+h+Jladm/QtPeQd/TvcQ2RmkvrZ6a6CAShScC6oijZsyHfBZYr1RAkQrK8gf cIrskPtmfZV1dUCq7L9KJYWf/l4OswkZ1ywU4PhMw1TVESOoJ1B7ENuo/KSXnACAeoZwmDPgG50Nx eVsGfdd5kG7TpRyRaoNUKU6uxomocMOnVZ+nLaNAo5MezeB4ze5RrCuWzkPQ523I0Wp1F2NxzaON3 azGP9Mr+Ym2iSCxfu0Tw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQBL-0002nk-UW; Fri, 19 Apr 2019 09:51:43 +0000 Received: from conuserg-08.nifty.com ([210.131.2.75]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQ8a-0006aX-KF; Fri, 19 Apr 2019 09:48:59 +0000 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id x3J9mDiQ012304; Fri, 19 Apr 2019 18:48:21 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com x3J9mDiQ012304 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1555667302; bh=i5XCWis3VrTykYK/RrX/WLSMvw74LO5onG7SxOwG69A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oudVdW/dFWq56OuDzP6kKUzuEWhB1LghoeXto+rXOPNib4DV9Uy/SJlJzj1AbmWfp mevr0XhyqB2vZq4Cz+Z1v2JvWwOv56OiugvEABew3D+o/TOnkAQFO0IulE/o2RPA/B +sTZx4hUEh4VtZpZbGYRBLePR5ICQudFoYOaeslkPILaHXz1Ak62JsBLFHuo6nXW+A HdImamYXzb7Yk06Xdrpl/c4BLwIZGHF/XfL1anllWbvNDOtJizhoIHVpekzfvHeQsK kLoe+3N8CTYNLyxpT4B5He8gmcUsZrbdL7Q+2LWqM5b83Cr/r8gBn0MoV7tumFH5RV 2DmcgtWPSyNuw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Andrew Morton , linux-arch Subject: [PATCH v2 05/11] mtd: rawnand: vf610_nfc: add initializer to avoid -Wmaybe-uninitialized Date: Fri, 19 Apr 2019 18:47:48 +0900 Message-Id: <20190419094754.24667-6-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190419094754.24667-1-yamada.masahiro@socionext.com> References: <20190419094754.24667-1-yamada.masahiro@socionext.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190419_024853_140263_DE59B820 X-CRM114-Status: GOOD ( 11.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christophe Leroy , linux-s390@vger.kernel.org, Arnd Bergmann , x86@kernel.org, Heiko Carstens , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Ingo Molnar , linux-mtd@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. Kbuild test robot has never reported -Wmaybe-uninitialized warning for this probably because vf610_nfc_run() is inlined by the x86 compiler's inlining heuristic. If CONFIG_OPTIMIZE_INLINING is enabled for a different architecture and vf610_nfc_run() is not inlined, the following warning is reported: drivers/mtd/nand/raw/vf610_nfc.c: In function ‘vf610_nfc_cmd’: drivers/mtd/nand/raw/vf610_nfc.c:455:3: warning: ‘offset’ may be used uninitialized in this function [-Wmaybe-uninitialized] vf610_nfc_rd_from_sram(instr->ctx.data.buf.in + offset, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ nfc->regs + NFC_MAIN_AREA(0) + offset, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ trfr_sz, !nfc->data_access); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Masahiro Yamada --- Changes in v2: - split into a separate patch drivers/mtd/nand/raw/vf610_nfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/raw/vf610_nfc.c b/drivers/mtd/nand/raw/vf610_nfc.c index a662ca1970e5..19792d725ec2 100644 --- a/drivers/mtd/nand/raw/vf610_nfc.c +++ b/drivers/mtd/nand/raw/vf610_nfc.c @@ -364,7 +364,7 @@ static int vf610_nfc_cmd(struct nand_chip *chip, { const struct nand_op_instr *instr; struct vf610_nfc *nfc = chip_to_nfc(chip); - int op_id = -1, trfr_sz = 0, offset; + int op_id = -1, trfr_sz = 0, offset = 0; u32 col = 0, row = 0, cmd1 = 0, cmd2 = 0, code = 0; bool force8bit = false; From patchwork Fri Apr 19 09:47:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10908731 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1373614DB for ; Fri, 19 Apr 2019 09:51:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01BD128CD5 for ; Fri, 19 Apr 2019 09:51:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA62128D25; Fri, 19 Apr 2019 09:51:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9E88E28CD5 for ; Fri, 19 Apr 2019 09:51:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=M+1nY8vzt5u0xEIrC8Vmlhv+0bgTNp3iN77Sax8VKLE=; b=kjXxOXAFrf4Bx0WfTukSOB18n5 dpKwQLq63o36ZxWP1x3hW1VTZHgvIz/dGB65eGL0C3tEm/wLcE99TOTZV5sIHgFCWJ3H7Q1XYeDsQ pRSJXkzApDF1AzKg1zjTMfD3K6qLVj5BJ9iTuauw5Q+wXVKm/4uluR6krSrqhQhQZR0JtIUs09ExO 8QLZ0lrIVmsttpZsY2TWZsnU97VxmuAPGOE6kzl1XP05dIzEXjB2Alzmh9FM2ABkqg2Mqo6J7s4xX pS2I+Tb0IxG+pw4ELifVgVSY/Zcl27TNbhjJFEQNJZI1myhylSdSPz4a4Rv04OBkSBaNJRZkUmF1I um/jVGWw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQAz-0002Lx-CV; Fri, 19 Apr 2019 09:51:21 +0000 Received: from conuserg-08.nifty.com ([210.131.2.75]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQ8a-0006aL-C2; Fri, 19 Apr 2019 09:49:00 +0000 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id x3J9mDiR012304; Fri, 19 Apr 2019 18:48:22 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com x3J9mDiR012304 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1555667303; bh=may15rFpYiMjCv7Gx5d6Hnsbnx9+yCkdoijkrZ87+8A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LZ5W5SbtA5B2oGV0h5lwznB9JKhiilqmHNUldJhrjUQTSZY9vxebvU3V7wW56NkbJ Rnc6SQfGcsB1yMXTT+NdVLIhmHL7U1Z4tH9i+YXCl33cqFQ7SJd9WsB/oZJXRgygOI YKzZqdsmMW2A3uMDwjeooQdN420x/jTTBNIWOjFmEDNg1gF3/PyTiLDOXwX8pu7ByU lEDznHHJXJN1BHX3WLczN7spS778ABE8MnFmpxa63+ccInS3ZWvDEHfu0ez4+mDf8B 8Xtzq+72fPoa1Remq9MZ6OTJJTm0MBQ7h8USCIRhuHh5oWB6nWd5uVtKxJPxM9yyu6 FUEmIviUowLIg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Andrew Morton , linux-arch Subject: [PATCH v2 06/11] MIPS: mark __fls() as __always_inline Date: Fri, 19 Apr 2019 18:47:49 +0900 Message-Id: <20190419094754.24667-7-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190419094754.24667-1-yamada.masahiro@socionext.com> References: <20190419094754.24667-1-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190419_024852_767318_E1A76629 X-CRM114-Status: UNSURE ( 8.62 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christophe Leroy , linux-s390@vger.kernel.org, Arnd Bergmann , x86@kernel.org, Heiko Carstens , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Ingo Molnar , linux-mtd@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for mips, the following errors are reported: arch/mips/mm/sc-mips.o: In function `mips_sc_prefetch_enable.part.2': sc-mips.c:(.text+0x98): undefined reference to `mips_gcr_base' sc-mips.c:(.text+0x9c): undefined reference to `mips_gcr_base' sc-mips.c:(.text+0xbc): undefined reference to `mips_gcr_base' sc-mips.c:(.text+0xc8): undefined reference to `mips_gcr_base' sc-mips.c:(.text+0xdc): undefined reference to `mips_gcr_base' arch/mips/mm/sc-mips.o:sc-mips.c:(.text.unlikely+0x44): more undefined references to `mips_gcr_base' Signed-off-by: Masahiro Yamada --- Changes in v2: - new patch arch/mips/include/asm/bitops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/include/asm/bitops.h b/arch/mips/include/asm/bitops.h index 830c93a010c3..6a26ead1c2b6 100644 --- a/arch/mips/include/asm/bitops.h +++ b/arch/mips/include/asm/bitops.h @@ -482,7 +482,7 @@ static inline void __clear_bit_unlock(unsigned long nr, volatile unsigned long * * Return the bit position (0..63) of the most significant 1 bit in a word * Returns -1 if no 1 bit exists */ -static inline unsigned long __fls(unsigned long word) +static __always_inline unsigned long __fls(unsigned long word) { int num; From patchwork Fri Apr 19 09:47:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10908733 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BEB8414DB for ; Fri, 19 Apr 2019 09:51:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD9BC28CD5 for ; Fri, 19 Apr 2019 09:51:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1A8728D25; Fri, 19 Apr 2019 09:51:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4409728CD5 for ; Fri, 19 Apr 2019 09:51:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Yw/RWRFteY7noFFY+KWpIt2OZSZnv31Ahu11SvahniM=; b=grw+Kh/GOP74kr4idCiMNx+jdr BLsDb+jYalWdt1NKlupcE1dpTqwo85uvbEDKtABUB97R428CZijswJVyv5gf7FLuwhdnmCHsIjU9u bYahfMAWgZai6lHNDz8mq8fR9ZKLpftzitbvbjGpxENxLXg/bqe5q9NlCGxXaH3SwmAYTLPdY8Bp+ SX0FjpJqgc130ni2GCVIqj52M6sVT6odADa+nkld3U4TS7prXsfNQoLOMfAl58Ni8l5FtIEk/jTAr 42qFpCFEZl1JkGN6flilER5yJlQvLZT79S25pVvbdN0tJ1yGtkYCipguZOL8aYUswfspbP3w+6CZd x9qFmxmg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQB9-0002Zh-UI; Fri, 19 Apr 2019 09:51:31 +0000 Received: from conuserg-08.nifty.com ([210.131.2.75]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQ8a-0006aH-8d; Fri, 19 Apr 2019 09:48:59 +0000 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id x3J9mDiS012304; Fri, 19 Apr 2019 18:48:24 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com x3J9mDiS012304 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1555667305; bh=anDfa6W5ONHce754PAdi2seOW7FOosRRq63TZhqjhq8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lNyrmzkrEzGdMdwdrwqYzWssnU73a1VE4o5EHE/QGOpC5eRh1jIeLJfgHCUNbbRZf P4fGEzjVdDAQfOVvzk/YsYpkQSYmCLsf5To/YlPN73ztVlDU5Rh0r5JUcnC7G2OsOH VpYq4BJw/uwG7phH5Dp3rCKdJXd2RgEb6fCPq33mQopk0novAobnQfoJYb7nbXZnRF nnYQf7w/ZMmRIpCQTlT1WW5gkd5vsBLTsbmcT0wM640XY3LvoLoK5l/zP7v2pWaHEO dfocS5SF1QPcvAXyAd/v2vXtMjwQNe50qA+EoOFt9UiQb0LoAZmVqQz/T9z9k1Oaa2 SCp/R5bpxgF9A== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Andrew Morton , linux-arch Subject: [PATCH v2 07/11] ARM: mark setup_machine_tags() stub as __init __noreturn Date: Fri, 19 Apr 2019 18:47:50 +0900 Message-Id: <20190419094754.24667-8-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190419094754.24667-1-yamada.masahiro@socionext.com> References: <20190419094754.24667-1-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190419_024852_739738_B46446D6 X-CRM114-Status: UNSURE ( 8.63 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christophe Leroy , linux-s390@vger.kernel.org, Arnd Bergmann , x86@kernel.org, Heiko Carstens , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Ingo Molnar , linux-mtd@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for arm, Clang build results in the following modpost warning: WARNING: vmlinux.o(.text+0x1124): Section mismatch in reference from the function setup_machine_tags() to the function .init.text:early_print() The function setup_machine_tags() references the function __init early_print(). This is often because setup_machine_tags lacks a __init annotation or the annotation of early_print is wrong. Signed-off-by: Masahiro Yamada --- Changes in v2: - new patch arch/arm/kernel/atags.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kernel/atags.h b/arch/arm/kernel/atags.h index 201100226301..067e12edc341 100644 --- a/arch/arm/kernel/atags.h +++ b/arch/arm/kernel/atags.h @@ -5,7 +5,7 @@ void convert_to_tag_list(struct tag *tags); const struct machine_desc *setup_machine_tags(phys_addr_t __atags_pointer, unsigned int machine_nr); #else -static inline const struct machine_desc * +static inline const struct machine_desc * __init __noreturn setup_machine_tags(phys_addr_t __atags_pointer, unsigned int machine_nr) { early_print("no ATAGS support: can't continue\n"); From patchwork Fri Apr 19 09:47:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10908725 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1BDCA17EE for ; Fri, 19 Apr 2019 09:50:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 09C3728CD5 for ; Fri, 19 Apr 2019 09:50:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F189F28D25; Fri, 19 Apr 2019 09:50:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8B7C928CD5 for ; Fri, 19 Apr 2019 09:50:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=tB1Vn5xf4b/G6R9ODajSoyeRC4HksSbdYa5j8SwS8Mo=; b=lqpNCBT0BwnOIxjw0Wr0QzqUYO RZ3NPiFHVzA4DJxBa6aoLL80luk7Epf3iZBRyDqOUJzhVrKaoy2XyC/AM8hx0Y9zT2BQNRxjYR+Kl Clw2p212olRYm1K/+ZBAD4s7L/lj9kjaPxpEj9Y6Sl0xTkMk2V4pFuSA3ZLx5onzrP9zJqbOoajfW QaBfiNzJUd1MjJnwMtP2TOP7sVTXC+LjF2E3/YKKrx1Ii3m9d0d/OtF6vSKa8D+Nw24RlG82LUWtB 6pUjxcqcSO82Het6Uso/1wzO2HXLNfHS+1ttAE8og7mWWGKXKmGXUAWy/CZE0768Zk1Qq4Mp9mDYt qVsGTgbg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQAU-0001ft-Kl; Fri, 19 Apr 2019 09:50:50 +0000 Received: from conuserg-08.nifty.com ([210.131.2.75]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQ8a-0006aI-8e; Fri, 19 Apr 2019 09:48:55 +0000 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id x3J9mDiT012304; Fri, 19 Apr 2019 18:48:25 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com x3J9mDiT012304 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1555667306; bh=IOsaHpZ2TEvCn87/LKuhI8uONRrcYXXxxmJ0Uzy6UC0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xlbpCLxWCESSMUFlvymWfpdpzfmpBy5siuyjRgmVq4MOlmuBdkmCkRFunf/87D+Au 1teXLYsl6q34ChxzjyXvCzlsrJoL0QOmDdvA0PYKn2s1+aBZS8pV9I/KELak7OVTyN f+VByoV8WYlJ6z4urXSwQi4RsjLCqrlJSjUWFxWAb45SNg+iZ3uNlUqnCLxkfLrQG1 kxiV8SvJ3aboun9kg5RdF9krWujMw6/u9rYWCOyqvYXry6TeFjPgzW0890xmD08dSR elm5jorLBqWDwDRISFcXPZ/HHz5Wd55C/sWn9rwGPBvO8yd/UGH/PczDNCg0HckLw/ OS+qlLF7podNA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Andrew Morton , linux-arch Subject: [PATCH v2 08/11] powerpc/prom_init: mark prom_getprop() and prom_getproplen() as __init Date: Fri, 19 Apr 2019 18:47:51 +0900 Message-Id: <20190419094754.24667-9-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190419094754.24667-1-yamada.masahiro@socionext.com> References: <20190419094754.24667-1-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190419_024852_721487_B7B2B46A X-CRM114-Status: UNSURE ( 8.66 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christophe Leroy , linux-s390@vger.kernel.org, Arnd Bergmann , x86@kernel.org, Heiko Carstens , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Ingo Molnar , linux-mtd@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for powerpc, the following modpost warnings are reported: WARNING: vmlinux.o(.text.unlikely+0x20): Section mismatch in reference from the function .prom_getprop() to the function .init.text:.call_prom() The function .prom_getprop() references the function __init .call_prom(). This is often because .prom_getprop lacks a __init annotation or the annotation of .call_prom is wrong. WARNING: vmlinux.o(.text.unlikely+0x3c): Section mismatch in reference from the function .prom_getproplen() to the function .init.text:.call_prom() The function .prom_getproplen() references the function __init .call_prom(). This is often because .prom_getproplen lacks a __init annotation or the annotation of .call_prom is wrong. Signed-off-by: Masahiro Yamada --- Changes in v2: - split into a separate patch arch/powerpc/kernel/prom_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index f33ff4163a51..241fe6b7a8cc 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c @@ -501,14 +501,14 @@ static int __init prom_next_node(phandle *nodep) } } -static inline int prom_getprop(phandle node, const char *pname, - void *value, size_t valuelen) +static inline int __init prom_getprop(phandle node, const char *pname, + void *value, size_t valuelen) { return call_prom("getprop", 4, 1, node, ADDR(pname), (u32)(unsigned long) value, (u32) valuelen); } -static inline int prom_getproplen(phandle node, const char *pname) +static inline int __init prom_getproplen(phandle node, const char *pname) { return call_prom("getproplen", 2, 1, node, ADDR(pname)); } From patchwork Fri Apr 19 09:47:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10908729 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D8AE514DB for ; Fri, 19 Apr 2019 09:51:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C5FE228CD5 for ; Fri, 19 Apr 2019 09:51:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B99C928D25; Fri, 19 Apr 2019 09:51:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5EC7428CD5 for ; Fri, 19 Apr 2019 09:51:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Daa8eiFsL0b888cnU6EWD2jASCnIfn3iHqMpclA1Eww=; b=F7gjK1X5GbTSOpRx2R/m5qio50 26pDkUyRyTbkjgRF3ed/GiHsND7um53UyWGPe3hnF9d4xRmf3j64OhYMi8wto5Mz/k5efJF3GIQCi oTUnc0nW39LeQLb7G66VDocxnBz0v9Fe182tv4cTDPT74SgX0LffL1wNXESCk1KidZRAt3UxZ4UK9 c80WRHgM71fEwW4MJOXNOLLuEry5gcgSQ7fMfKqZVIS/lyxnocKBfjL7WPARpC9TcuKHnmJh2HzTn hpDEjpEyWm58cYuLfuGY4Zf9Eq/OQmjQKfipyH7BoiWO/7ubPEirl8GyGxnRXtlrOuf/9zjCM220F Cy3nys4g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQAp-00027x-Iu; Fri, 19 Apr 2019 09:51:11 +0000 Received: from conuserg-08.nifty.com ([210.131.2.75]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQ8a-0006aG-93; Fri, 19 Apr 2019 09:48:58 +0000 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id x3J9mDiU012304; Fri, 19 Apr 2019 18:48:26 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com x3J9mDiU012304 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1555667307; bh=ZmcBGqsNIopkSvb/z9Yz7Nb+RmV19Ubtd5G31RF7cjs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jiH6HICApN78Kk5hFdRE9UlFB3DbHyO32Exybcj2tFMz2jpLTLwgX2JIw8K1qWK4T E1O0Ew8v+k/nfXa5VI4SNERYU2iuWyUszoCaY8TIGwtXn/On+OQ6Cf6HlcF4EZFBOu QDInHPQIydJH4bbzuu6Xa9Ps+zAFaqOuDnY00oHB3JgAOWUEXovFVa0xxzWMI/qUqh 9sOeDdWNiIdD62ji12XR1RvY2JL7XWAKfttdTlSoHNIoaNkVqvDLCzimUvF2iPf2Z9 j2/vL15IZ64QIadnS1igjZWzEXPL/nGG8jrU+NfUOpmpPCXsyZoz4Ce0wDf84uAPVx cNXO0eCfrYgCg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Andrew Morton , linux-arch Subject: [PATCH v2 09/11] powerpc/mm/radix: mark __radix__flush_tlb_range_psize() as __always_inline Date: Fri, 19 Apr 2019 18:47:52 +0900 Message-Id: <20190419094754.24667-10-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190419094754.24667-1-yamada.masahiro@socionext.com> References: <20190419094754.24667-1-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190419_024852_732258_9B37A686 X-CRM114-Status: UNSURE ( 8.04 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christophe Leroy , linux-s390@vger.kernel.org, Arnd Bergmann , x86@kernel.org, Heiko Carstens , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Ingo Molnar , linux-mtd@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for powerpc, the following error is reported: arch/powerpc/mm/tlb-radix.c: In function '__radix__flush_tlb_range_psize': arch/powerpc/mm/tlb-radix.c:104:2: error: asm operand 3 probably doesn't match constraints [-Werror] asm volatile(PPC_TLBIEL(%0, %4, %3, %2, %1) ^~~ arch/powerpc/mm/tlb-radix.c:104:2: error: impossible constraint in 'asm' Signed-off-by: Masahiro Yamada --- Changes in v2: - split into a separate patch arch/powerpc/mm/tlb-radix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c index 6a23b9ebd2a1..a2b2848f0ae3 100644 --- a/arch/powerpc/mm/tlb-radix.c +++ b/arch/powerpc/mm/tlb-radix.c @@ -928,7 +928,7 @@ void radix__tlb_flush(struct mmu_gather *tlb) tlb->need_flush_all = 0; } -static inline void __radix__flush_tlb_range_psize(struct mm_struct *mm, +static __always_inline void __radix__flush_tlb_range_psize(struct mm_struct *mm, unsigned long start, unsigned long end, int psize, bool also_pwc) { From patchwork Fri Apr 19 09:47:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10908737 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 25D8614DB for ; Fri, 19 Apr 2019 09:52:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F50828CD5 for ; Fri, 19 Apr 2019 09:52:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F38DF28D25; Fri, 19 Apr 2019 09:52:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7102C28CD5 for ; Fri, 19 Apr 2019 09:52:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=r44jvxByg+QZKkifqnyTbphm7vEraOaLElNg9GfxV1Y=; b=Yt1zNz6tpeZ9wX0CHFppUORfen jh+OUa1vkZBZ+Gzbsv7CJE4frvLoO7L2P1d6ImbPxBQL6p2bORpKMxCCsKZLHk0T2Hyljl2by61ku mqaVVmi5gjV5nI11gXmofrl+9dE5eBLHwv3wkHhgqfxIJ5A17a62XnycV6VbO7phL1cqgh144N0k6 FMs4rkVB+Ap7IHeb30KRhs7fK8mLt21Am9FYgU6vg7BsltBMXKqONehp55OAxC/cIZg7ilTWOWhVQ rBByXtCmRhrqRB90P7KWzmZuB8tEefzIIUvqJvlXJoVOvx9WtDUdF+BSTldVfBDI7Vpl4Mg55niFX n+ydEPnQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQBh-0003GG-CH; Fri, 19 Apr 2019 09:52:05 +0000 Received: from conuserg-08.nifty.com ([210.131.2.75]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQ8a-0006aK-Bj; Fri, 19 Apr 2019 09:49:00 +0000 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id x3J9mDiV012304; Fri, 19 Apr 2019 18:48:28 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com x3J9mDiV012304 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1555667309; bh=sNr4ub5sQxS+0LMMMb+j8VzxalFAFd/JYoE5EUyoP38=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B0BQlA/PTYdRhr/cnabblYMwAYhKD6J8OBAnfSjQcaEkjG6yjSsJYkeL42KRC579r PNg66kXGfTKg1PT7Mcezea0Le+TIG2L3R4/go1gHcEczBgXpsHfXnTklxKr73FcJpB pgKBhSPoXPMW7FmxAXFP1oXRnpOJMTmVFfi2T1b21yJJ50Dxj8uphUr9arAF2VZ5Gt iFyTtCd7tSUQLuAgFMsInuQd7Zi7f4y+HfXk6okijLRI07aBA/2tsWZxCbHUU5cMYd OpHcQiZWhdNji5KDIWUGz0avKi8LtEztXO2FBxeNaT2m5466QUP8yjbxpOEGypVmOj xzYLsSTkB+gRA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Andrew Morton , linux-arch Subject: [PATCH v2 10/11] powerpc/mm/radix: mark as __tlbie_pid() and friends as__always_inline Date: Fri, 19 Apr 2019 18:47:53 +0900 Message-Id: <20190419094754.24667-11-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190419094754.24667-1-yamada.masahiro@socionext.com> References: <20190419094754.24667-1-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190419_024852_774096_446F838F X-CRM114-Status: UNSURE ( 8.05 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christophe Leroy , linux-s390@vger.kernel.org, Arnd Bergmann , x86@kernel.org, Heiko Carstens , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Ingo Molnar , linux-mtd@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for powerpc, the following errors are reported: arch/powerpc/mm/tlb-radix.c: In function '__tlbie_lpid': arch/powerpc/mm/tlb-radix.c:148:2: warning: asm operand 3 probably doesn't match constraints asm volatile(PPC_TLBIE_5(%0, %4, %3, %2, %1) ^~~ arch/powerpc/mm/tlb-radix.c:148:2: error: impossible constraint in 'asm' arch/powerpc/mm/tlb-radix.c: In function '__tlbie_pid': arch/powerpc/mm/tlb-radix.c:118:2: warning: asm operand 3 probably doesn't match constraints asm volatile(PPC_TLBIE_5(%0, %4, %3, %2, %1) ^~~ arch/powerpc/mm/tlb-radix.c: In function '__tlbiel_pid': arch/powerpc/mm/tlb-radix.c:104:2: warning: asm operand 3 probably doesn't match constraints asm volatile(PPC_TLBIEL(%0, %4, %3, %2, %1) ^~~ Signed-off-by: Masahiro Yamada --- Changes in v2: - new patch arch/powerpc/mm/tlb-radix.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c index a2b2848f0ae3..14ff414d1545 100644 --- a/arch/powerpc/mm/tlb-radix.c +++ b/arch/powerpc/mm/tlb-radix.c @@ -90,8 +90,8 @@ void radix__tlbiel_all(unsigned int action) asm volatile(PPC_INVALIDATE_ERAT "; isync" : : :"memory"); } -static inline void __tlbiel_pid(unsigned long pid, int set, - unsigned long ric) +static __always_inline void __tlbiel_pid(unsigned long pid, int set, + unsigned long ric) { unsigned long rb,rs,prs,r; @@ -106,7 +106,7 @@ static inline void __tlbiel_pid(unsigned long pid, int set, trace_tlbie(0, 1, rb, rs, ric, prs, r); } -static inline void __tlbie_pid(unsigned long pid, unsigned long ric) +static __always_inline void __tlbie_pid(unsigned long pid, unsigned long ric) { unsigned long rb,rs,prs,r; @@ -136,7 +136,7 @@ static inline void __tlbiel_lpid(unsigned long lpid, int set, trace_tlbie(lpid, 1, rb, rs, ric, prs, r); } -static inline void __tlbie_lpid(unsigned long lpid, unsigned long ric) +static __always_inline void __tlbie_lpid(unsigned long lpid, unsigned long ric) { unsigned long rb,rs,prs,r; @@ -239,7 +239,7 @@ static inline void fixup_tlbie_lpid(unsigned long lpid) /* * We use 128 set in radix mode and 256 set in hpt mode. */ -static inline void _tlbiel_pid(unsigned long pid, unsigned long ric) +static __always_inline void _tlbiel_pid(unsigned long pid, unsigned long ric) { int set; From patchwork Fri Apr 19 09:47:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10908739 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 85D8314DB for ; Fri, 19 Apr 2019 09:53:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 73D1628CD5 for ; Fri, 19 Apr 2019 09:53:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 654C728D25; Fri, 19 Apr 2019 09:53:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DF10228CD5 for ; Fri, 19 Apr 2019 09:53:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=fkzS9odXSiuAa+hlVPwfhfzcUxc4LbJ4v8roOjESUu0=; b=nVydxXVvtvjyPy7V8++Xy1DRs/ O/lKovAnzlMDWt1vB8oW2p20mKixHIf0lkYS4KY0ZHHv7mhE8HaTjfHR88yIG928OlrOMMhAWbfHM ZAIF0YctjU0gh7aPTOf1jIzVycMU7dpP8chVP/UQYI3bsePNXLFqccZUnTNKtllgs2/ICiL43WCoX pBY9WmQLmlSQ8h5AvTxNcrJtnaENXuja5O51JUbEYBeSgd+imA0VvMNvtPffC6BrAtFmiPdIMGdw9 s5iS5tgRzBdSzqzWPqQY6jlOR/kXgD4NB0JYZ88FOFxY4f+ShSQfV0Wsgr9GwduiOYaABzUvF6Av+ PgYlRAUg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQCY-0004TO-P7; Fri, 19 Apr 2019 09:52:58 +0000 Received: from conuserg-08.nifty.com ([210.131.2.75]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQ8w-00074J-0q; Fri, 19 Apr 2019 09:49:30 +0000 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id x3J9mDiW012304; Fri, 19 Apr 2019 18:48:29 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com x3J9mDiW012304 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1555667311; bh=DZH3ndX+jwPMXyZB1kQ4OHEY2QeZuXlzmLdAIaBcM6M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PydnGSjiKyIo14J4fAKaV6koaZeZ0EuTcw4Tq4V8uwNBifRf97/8NMU4AZxYotm6W h/czkyZ7MDVZ2xZhy6Byuv6Z4Ztq0jvEL+1rHQtL3Fe/LMX4RBELdDA3ZegwXjdj4m UqJDwhBzKD/pptPsi5aw/KnB/EONfPoQF8eebdfHJaMgBG170Y/dNM8a4ryp4EVyLX Js9Op5+csNk9r2v3z6G8n18zKMuFlHT/YDZazi9Kv9zGOPV9qNMg9QJWzNAvml8NMc aNwXmMoinYdq9Px4fC8i7300TKOZmLWc7fLIBYNhAM/kMZlHf9tWKsM00pZIZMM8B/ CMFiRyUCM3+HA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Andrew Morton , linux-arch Subject: [PATCH v2 11/11] compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING Date: Fri, 19 Apr 2019 18:47:54 +0900 Message-Id: <20190419094754.24667-12-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190419094754.24667-1-yamada.masahiro@socionext.com> References: <20190419094754.24667-1-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190419_024914_935637_53971AB8 X-CRM114-Status: GOOD ( 12.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christophe Leroy , linux-s390@vger.kernel.org, Arnd Bergmann , x86@kernel.org, Heiko Carstens , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Ingo Molnar , linux-mtd@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 60a3cdd06394 ("x86: add optimized inlining") introduced CONFIG_OPTIMIZE_INLINING, but it has been available only for x86. The idea is obviously arch-agnostic. This commit moves the config entry from arch/x86/Kconfig.debug to lib/Kconfig.debug so that all architectures can benefit from it. This can make a huge difference in kernel image size especially when CONFIG_OPTIMIZE_FOR_SIZE is enabled. For example, I got 3.5% smaller arm64 kernel for v5.1-rc1. dec file 18983424 arch/arm64/boot/Image.before 18321920 arch/arm64/boot/Image.after This also slightly improves the "Kernel hacking" Kconfig menu as e61aca5158a8 ("Merge branch 'kconfig-diet' from Dave Hansen') suggested; this config option would be a good fit in the "compiler option" menu. Signed-off-by: Masahiro Yamada Acked-by: Borislav Petkov --- Changes in v2: - split into a separate patch arch/x86/Kconfig | 3 --- arch/x86/Kconfig.debug | 14 -------------- include/linux/compiler_types.h | 3 +-- lib/Kconfig.debug | 14 ++++++++++++++ 4 files changed, 15 insertions(+), 19 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 5ad92419be19..9e93d109a6cb 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -310,9 +310,6 @@ config ZONE_DMA32 config AUDIT_ARCH def_bool y if X86_64 -config ARCH_SUPPORTS_OPTIMIZED_INLINING - def_bool y - config ARCH_SUPPORTS_DEBUG_PAGEALLOC def_bool y diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index 15d0fbe27872..f730680dc818 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug @@ -266,20 +266,6 @@ config CPA_DEBUG ---help--- Do change_page_attr() self-tests every 30 seconds. -config OPTIMIZE_INLINING - bool "Allow gcc to uninline functions marked 'inline'" - ---help--- - This option determines if the kernel forces gcc to inline the functions - developers have marked 'inline'. Doing so takes away freedom from gcc to - do what it thinks is best, which is desirable for the gcc 3.x series of - compilers. The gcc 4.x series have a rewritten inlining algorithm and - enabling this option will generate a smaller kernel there. Hopefully - this algorithm is so good that allowing gcc 4.x and above to make the - decision will become the default in the future. Until then this option - is there to test gcc for this. - - If unsure, say N. - config DEBUG_ENTRY bool "Debug low-level entry code" depends on DEBUG_KERNEL diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index ba814f18cb4c..19e58b9138a0 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h @@ -140,8 +140,7 @@ struct ftrace_likely_data { * Do not use __always_inline here, since currently it expands to inline again * (which would break users of __always_inline). */ -#if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ - !defined(CONFIG_OPTIMIZE_INLINING) +#if !defined(CONFIG_OPTIMIZE_INLINING) #define inline inline __attribute__((__always_inline__)) __gnu_inline \ __maybe_unused notrace #else diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 0d9e81779e37..f8f284f46c85 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -310,6 +310,20 @@ config HEADERS_CHECK exported to $(INSTALL_HDR_PATH) (usually 'usr/include' in your build tree), to make sure they're suitable. +config OPTIMIZE_INLINING + bool "Allow compiler to uninline functions marked 'inline'" + help + This option determines if the kernel forces gcc to inline the functions + developers have marked 'inline'. Doing so takes away freedom from gcc to + do what it thinks is best, which is desirable for the gcc 3.x series of + compilers. The gcc 4.x series have a rewritten inlining algorithm and + enabling this option will generate a smaller kernel there. Hopefully + this algorithm is so good that allowing gcc 4.x and above to make the + decision will become the default in the future. Until then this option + is there to test gcc for this. + + If unsure, say N. + config DEBUG_SECTION_MISMATCH bool "Enable full Section mismatch analysis" help