Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp382345img; Wed, 20 Mar 2019 02:41:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqzmKSgAc/YARAFjShwTUCJiXdnLgkE25llbBdP2RQ1+wsM8s0nWJNAhGNUe8UDjlYDCy5HT X-Received: by 2002:a65:518b:: with SMTP id h11mr6846225pgq.41.1553074866709; Wed, 20 Mar 2019 02:41:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553074866; cv=none; d=google.com; s=arc-20160816; b=c5IG+i363zMb4jl3+5/W9TDKcTQQzn6m2P6YekoUzvNWFRRd3PYYGylbKl/piQ80L9 5Dz1gIdd9yI3zFJimvfvPvgOHvEXtrc/pDKYtUi6Y1I+B62c7QVoWf9HufQVbPFymmek YQGBYn8H2DQaGXiow938TrIT4s5Aiasex0S+YQgSZ1JuhuhQpHGhnI+D5ylQ+BXZihix rQHCcOmQyjlGTYyO+hUpVcH4YgCBJQ/Hh0ctQjJKKkqkmkHpCmfgQ/Al5bbsWAXwziIk YSmVaQ4ESS2WdmCo6X0kkwcUggP9dSFvZ/M6DW98MfqczgQKbvFjBSfF6Cl+V2J6ip69 xHKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=baqznmx5SEUGlKXy0XWhrYbi7y7TbN73HabOIUzlc9g=; b=NwMBg32dIF9qZ1H+PXul9M+dr3mib17HEChWdvG1mALK86A5DO1m9V5k3Ooh7xNEwY 0w37tEJmCDPKy7A5M2qBSp1lpfg6wKXaFDLz6qajC/UoC8yyah3+7nCAxswD94oE/OVC LeH3neUavaQu3tpZXjXKcdrLBwLHXEMNMM/aix1ByUHZZ9ZTYnitKs/WSJ75PLhy4lTs iCSsNq1K5cwCuu1g4IkkH6BK+rloF6FCBluTjzVJjrpV15Eqnz2W/qGs1DNoNZpOd6XA 1YqmyFwhaAvSB1+41jN+WloZxbUBHPnOOuRXPXimk22tE/42AIbMuB/t+z9S6PLXczAs WpZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t15si1228745pgv.503.2019.03.20.02.40.51; Wed, 20 Mar 2019 02:41:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727413AbfCTJi5 (ORCPT + 99 others); Wed, 20 Mar 2019 05:38:57 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:39192 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725905AbfCTJi5 (ORCPT ); Wed, 20 Mar 2019 05:38:57 -0400 Received: by mail-qt1-f193.google.com with SMTP id t28so1679275qte.6; Wed, 20 Mar 2019 02:38:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=baqznmx5SEUGlKXy0XWhrYbi7y7TbN73HabOIUzlc9g=; b=AV8xLCAlOfLApJ983+esKs6J5QuAr+q1ZD3b0+rANLQvkPqYBBCL6LrLwUGRNK/pfm 6jkehnnbe28T/hFkSRkiv8lJhoE26bVxg0UjzyIQCYVdGe4aJNkLJFWWHTkUfqWfLoqO 1S/2+IZUucvLu8/yvNqhqNNjhUARttjzEzZeu5TajmJaIEJOKqKrs7f8la9MoDeIIk6b SzAoKQpjOgWhDrrzQNDIVvnE2ZWYJ+5YuqrM1eeRHxmZXjt7AhBF3cTJJPtX34iQ21Gt pUMh87uNuGWbKO0aAWC3pNkTBAAispPAWQrsxrYKGdNpC+zMpgKAyuy3EeVtMVY3rA1J ieZg== X-Gm-Message-State: APjAAAXKVFOlcaEhSRnCeMa5jmREsWvYm93EFAzJuLLqAejQJ+Tu8L83 CM6rnmUtTjHDPx+W404jiEbQt0JEp36vsAhkxMZFlyf2 X-Received: by 2002:ac8:276b:: with SMTP id h40mr6073731qth.319.1553074735819; Wed, 20 Mar 2019 02:38:55 -0700 (PDT) MIME-Version: 1.0 References: <1553062828-27798-1-git-send-email-yamada.masahiro@socionext.com> In-Reply-To: From: Arnd Bergmann Date: Wed, 20 Mar 2019 10:38:38 +0100 Message-ID: Subject: Re: [PATCH] compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING To: Masahiro Yamada Cc: Andrew Morton , linux-arch , linux-s390 , Dave Hansen , Michael Ellerman , X86 ML , linux-mips@vger.kernel.org, Linux Kernel Mailing List , Paul Burton , Ingo Molnar , linux-mtd , linuxppc-dev , linux-arm-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 20, 2019 at 7:41 AM Masahiro Yamada wrote: > It is unclear to me how to fix it. > That's why I ended up with "depends on !MIPS". > > > MODPOST vmlinux.o > 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' > > > Perhaps, MIPS folks may know how to fix it. I would guess like this: diff --git a/arch/mips/include/asm/mips-cm.h b/arch/mips/include/asm/mips-cm.h index 8bc5df49b0e1..a27483fedb7d 100644 --- a/arch/mips/include/asm/mips-cm.h +++ b/arch/mips/include/asm/mips-cm.h @@ -79,7 +79,7 @@ static inline int mips_cm_probe(void) * * Returns true if a CM is present in the system, else false. */ -static inline bool mips_cm_present(void) +static __always_inline bool mips_cm_present(void) { #ifdef CONFIG_MIPS_CM return mips_gcr_base != NULL; @@ -93,7 +93,7 @@ static inline bool mips_cm_present(void) * * Returns true if the system implements an L2-only sync region, else false. */ -static inline bool mips_cm_has_l2sync(void) +static __always_inline bool mips_cm_has_l2sync(void) { #ifdef CONFIG_MIPS_CM return mips_cm_l2sync_base != NULL;