Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3063715pxf; Mon, 5 Apr 2021 02:07:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDIQ1/qoNsqgOtWg1AC1wi1S8z9S+7ol+EWixDbHplPzSQ+8E8KY1XXTMV4kRC4UGbZ0HM X-Received: by 2002:a05:6638:2044:: with SMTP id t4mr23548809jaj.12.1617613628980; Mon, 05 Apr 2021 02:07:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617613628; cv=none; d=google.com; s=arc-20160816; b=ieXLPQ+SNjQvFUMsOTi8jAi7bHU0kF5oajITMJJ70expqtboi2qGJldVPoAnLIZHR5 YiPfefS+vZF+SyOsJYKfxBRWjRN98mlTcfB6Wg+1kjpo538acyoGBkA5LnJjngUAuMx9 I16/Akz/VUhCggBhT/Xnk6myJlb4vRn810+HIzySDTLJJBhFmbmeadERbU3kv4CZ3rgi fhDEMj8UrW/yKT87O+NdgNz36xSoVh1oHrNJhIWjRt4mNVVJ1SQku6ceIrd7ClLOgzTg pZ37swLSLU7sgVqn2WNftpyjdAUy/bIdbw6hBgByfo4++Mkqz+DIA8fEmnmVn71/hHNt IT1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZyWkYtzwPhNUY3YJVdCFML9iP6u0HHIyJvxybO0kSrI=; b=jTWKIA6hcrbwB90m2JTvvKGJETpaK+QM2HunfIaTHD5HGT0M/cy34DOH5U2nx3utrl D/2Ufxqugz9N/GWZ0M+qpAGJcBySYbT0SXDjOGBXz1EMR6mp341lEIFuTxFBvmJdfIxL KvmII48WVi91RkadI0/98C9XiA8GsdgZmFM5pKbgRkKWtgsH06KpxJxQ9sj7wxbxCGZv hrLYTQ1uyCFI9Cc0ilyFR55yMc5g1Y3dUkZu6uBZox2WDN/T+bXCbJtimPJpnmXhC9o+ hdtH6dMMO2dF1btk7wBKj3PSSvMCRRqte3brnN9oeY0GY/I750x1Vr02vnkgNqSUPON6 Q6RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YU1CfGcl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k12si14087140ilo.151.2021.04.05.02.06.57; Mon, 05 Apr 2021 02:07:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YU1CfGcl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238132AbhDEJE3 (ORCPT + 99 others); Mon, 5 Apr 2021 05:04:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:46214 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237624AbhDEJDS (ORCPT ); Mon, 5 Apr 2021 05:03:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 58E8461002; Mon, 5 Apr 2021 09:03:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617613392; bh=MvspNmx/BQ2U6lxFhhm7YQJAvRh6QOInlWJfeIGGQP8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YU1CfGclx1Ljpk60jPwG6Kb2U3IlbvKpu8OmUUMxpgAl9IbB6vFmIhhKJkobovFPc 5vcx2axzZ4H/uI0yL9D3cfL0KYLFblr+p0k7fXBCXvvNjIElc76wUPrpe8NpsfLXVS vopmSXiQrN4ZJgs69fVByakIE2K/Ux/Pcv4dfLQo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe Leroy , Michael Ellerman , Sasha Levin Subject: [PATCH 5.4 20/74] powerpc: Force inlining of cpu_has_feature() to avoid build failure Date: Mon, 5 Apr 2021 10:53:44 +0200 Message-Id: <20210405085025.380053276@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210405085024.703004126@linuxfoundation.org> References: <20210405085024.703004126@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe Leroy [ Upstream commit eed5fae00593ab9d261a0c1ffc1bdb786a87a55a ] The code relies on constant folding of cpu_has_feature() based on possible and always true values as defined per CPU_FTRS_ALWAYS and CPU_FTRS_POSSIBLE. Build failure is encountered with for instance book3e_all_defconfig on kisskb in the AMDGPU driver which uses cpu_has_feature(CPU_FTR_VSX_COMP) to decide whether calling kernel_enable_vsx() or not. The failure is due to cpu_has_feature() not being inlined with that configuration with gcc 4.9. In the same way as commit acdad8fb4a15 ("powerpc: Force inlining of mmu_has_feature to fix build failure"), for inlining of cpu_has_feature(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b231dfa040ce4cc37f702f5c3a595fdeabfe0462.1615378209.git.christophe.leroy@csgroup.eu Signed-off-by: Sasha Levin --- arch/powerpc/include/asm/cpu_has_feature.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/cpu_has_feature.h b/arch/powerpc/include/asm/cpu_has_feature.h index 7897d16e0990..727d4b321937 100644 --- a/arch/powerpc/include/asm/cpu_has_feature.h +++ b/arch/powerpc/include/asm/cpu_has_feature.h @@ -7,7 +7,7 @@ #include #include -static inline bool early_cpu_has_feature(unsigned long feature) +static __always_inline bool early_cpu_has_feature(unsigned long feature) { return !!((CPU_FTRS_ALWAYS & feature) || (CPU_FTRS_POSSIBLE & cur_cpu_spec->cpu_features & feature)); @@ -46,7 +46,7 @@ static __always_inline bool cpu_has_feature(unsigned long feature) return static_branch_likely(&cpu_feature_keys[i]); } #else -static inline bool cpu_has_feature(unsigned long feature) +static __always_inline bool cpu_has_feature(unsigned long feature) { return early_cpu_has_feature(feature); } -- 2.30.1