From patchwork Tue Apr 23 03:49: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: 162641 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3322341jan; Mon, 22 Apr 2019 20:51:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqzP5cSqaDKaGed9fbES7qa4ni5EA3ReGPeFTmPzfhIXjEP7QKxr8QPs81I2F7tADJRAEROU X-Received: by 2002:a65:6259:: with SMTP id q25mr22453853pgv.103.1555991492991; Mon, 22 Apr 2019 20:51:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555991492; cv=none; d=google.com; s=arc-20160816; b=xluvX4MN0uSyuU4u4Tk2l+JqGTiQm7CNl1F5ZnAJsFT+9/dKjFC7xNz/mfx+dkDzDw stqA6YhMC8zCacaaJv/Vf0uXYrWxKr0zTP9GggMCrwR37ddsBGI56VMeOxZnaQWtJt3N BUTmbuF2Wnzxk2vlmVb2JiUt9/iJhMjhhOiW9ZQLo3QT96WC5x5WTpI6ucK4o3conEYc +HsjIfc6GFa3AjYkVtVm+xYpjBEC9D66xoV/6uGsWUs0n6+mcRIDX6ryQ2yGG+BB01Aj 6SvBnIWqrApD0V19DcoPDCrUGoaKDrzPIqyLMSqGz1uXMbf4hT5OseUB+8dWLD1EiBUD LaEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=bSpCfUAcyt+UjPMgYyZQmseLNPkdMgHIhxbhwQzsBmI=; b=R1KUNdMAQKkyYB16tTMCEdCbDLguE28quAi17EyEyBSUE5dfCzM4+SJgPhqGFi3yBX JIZfsm3fxahcy9uz+i1xhgg5JYsa6PYV3f4zYt3o+4dFCOzJjApxE9ZhPRfswB7i3MGj zgfczYm+SWXx44mSElKzbA1VMRa2CU9/JPIYPP59DFZa+bR5cVEhfEnd52LsocOADfhJ peZDAiJLPhULrSN3XN3xUmK3icTHBlvqNbQUCXX0S2Jcdgk6lwWRIQZ8S6bY32QtLnWy e2CM7NzcRvF0CwPSkZ2aNdjji/r5W+ZUUDaw0RS1KUv/CXqkeupXcVt1yfixM3PhUIJ6 YzGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=qQonU7ZJ; 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 r75si15528021pfa.10.2019.04.22.20.51.32; Mon, 22 Apr 2019 20:51:32 -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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=qQonU7ZJ; 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 S1730415AbfDWDvb (ORCPT + 30 others); Mon, 22 Apr 2019 23:51:31 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:38312 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730182AbfDWDv1 (ORCPT ); Mon, 22 Apr 2019 23:51:27 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id x3N3o2cA023044; Tue, 23 Apr 2019 12:50:04 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com x3N3o2cA023044 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1555991405; bh=bSpCfUAcyt+UjPMgYyZQmseLNPkdMgHIhxbhwQzsBmI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qQonU7ZJ8JQuK/yYFMxbIUEgpGk8t0atMGb/Xg6wfixcHjJS4ZUo9nyW+pQqWbV8T OxvALrGC8d/ErgshgANG1OAY+TcpQpCqnaavYGTgwqrgaUitAzgyE/9JOFwv4BsBdG wbeykQA6/Q04egSC+2R80XMzpSETZsYTxdB0oHI0xSH/b0z6nhabFnafw6cY5n9tKs 0f2/DWceDLDknEENgje4LV91UluDtdJv9N5kvqx6b3GklMOHRjgjlpHvwKHOkoiQvj F7yiwswgn7WygwK4jBgoIws8Okj6DQ9vW0zIHi+Rcqbu1FlYnNlSg+X3RQo8mdEc/b gz8IOWt3SAfsQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Andrew Morton , linux-arch Cc: linux-s390@vger.kernel.org, Heiko Carstens , Arnd Bergmann , linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Christophe Leroy , Mathieu Malaterre , Masahiro Yamada Subject: [RESEND PATCH v3 02/11] arm64: mark (__)cpus_have_const_cap as __always_inline Date: Tue, 23 Apr 2019 12:49:50 +0900 Message-Id: <20190423034959.13525-3-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190423034959.13525-1-yamada.masahiro@socionext.com> References: <20190423034959.13525-1-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 v3: None Changes in v2: - split into a separate patch arch/arm64/include/asm/cpufeature.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 Tested-by: Mark Rutland 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);