Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3095824pxp; Mon, 14 Mar 2022 10:43:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHqDA06wgEfYUkUoaiqopvlGzJTKYE+UHLVZvpQ/ITUtcxnOfk0hAPyEftECzJC5ErS9TL X-Received: by 2002:a17:907:948b:b0:6d8:27f8:ab4a with SMTP id dm11-20020a170907948b00b006d827f8ab4amr19210647ejc.39.1647279795207; Mon, 14 Mar 2022 10:43:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647279795; cv=none; d=google.com; s=arc-20160816; b=qbp7z1TzDqzKwl7sTVJZnjQzTp8AY4sHO+jM2peDPEKMV4tJ56bWRB9K3wgc+DQkzn 6EexcTPvVxBv8g7DEGGv5/Wlw6cjNrtKQSq1H0PlcXV+1L4N0PRv9GyBm6IcTJkwVLoO Stgje2GZrTUlQR5Wq+g70nM++exkJUdGx+PnxQIc6wN3YiU6m6633UhYQWDKe1cb3NiV EBE0hS13nHeYc8aItuSpD22cDAyrE7UmX+BcGHKO03fJ/uqAspvRTfrdwkN7quBpplEA aGm7n6NiN8VPgglLMl52V+A+tNB3kPRwn481iGVOYz8pMEW88I2NUpWNj10/S9bOmRaL wzMg== 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=lDeXrQVVAeyhqfNs7IpA8m0CEWfAoQIR9z1ka2MZZD8=; b=fgPfI66ultbQSG4e+28/Ejp/kuWHsOnSZYYIV1GN/gNyrwdqCbluZi9hIht9cOeVC1 doZdJH07KhstqJPqY5FI+HxEXmFzSriT1eBDt/hYf4DiOI0ml+xk1s7TdlO8h84pzuj8 TLkBa2sTlddahzRLzjsgkpp8xRfgPhrgN+npHkzMEqCp5voZYNNBy6Tip+TGEJ+e82Gg 6LYjLb59fwjMoWgYTcHZAZKbET3+7szcFqd/Y/JVK0DiVBzAThv79yLwSGTD3P3pyTTy 7Y/dNV+jzdYdQSRqoMWal0P+Jb2lAzAET/lQM3RGoMFyyi/GjyEimLkt/OkTj5CLHvP2 Zs4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MdepRaIf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ky20-20020a170907779400b006cf9cdc2a35si9688834ejc.479.2022.03.14.10.42.48; Mon, 14 Mar 2022 10:43:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MdepRaIf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S239487AbiCNLla (ORCPT + 99 others); Mon, 14 Mar 2022 07:41:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239237AbiCNLkv (ORCPT ); Mon, 14 Mar 2022 07:40:51 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B85DC488B5; Mon, 14 Mar 2022 04:38:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2CF49B80DC9; Mon, 14 Mar 2022 11:38:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D13EC340E9; Mon, 14 Mar 2022 11:38:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647257911; bh=boM+X7Jtz7xEMxABclzXsyS0I01CPMFAo2H06POull4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MdepRaIf0O2jCKEu5IpNWgJNL82mCYJSq0N4+b2JiWaEhUVSENevhKT7ThzQVyLTq qT3ApsN1HVGHl4z8pFTUMhbbNQRzhz1F4TwpBGm7B+j2vSU0p2cp/hAIxRdqnGAaYA nYdCXNMMVlYuvpyl0OCwNZDKAfgdapI65OMjK/MY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Randy Dunlap , kernel test robot , Russell King , Catalin Marinas , linux-arm-kernel@lists.infradead.org, patches@armlinux.org.uk, Linus Torvalds Subject: [PATCH 4.19 18/30] ARM: Spectre-BHB: provide empty stub for non-config Date: Mon, 14 Mar 2022 12:34:36 +0100 Message-Id: <20220314112732.302323192@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220314112731.785042288@linuxfoundation.org> References: <20220314112731.785042288@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy Dunlap commit 68453767131a5deec1e8f9ac92a9042f929e585d upstream. When CONFIG_GENERIC_CPU_VULNERABILITIES is not set, references to spectre_v2_update_state() cause a build error, so provide an empty stub for that function when the Kconfig option is not set. Fixes this build error: arm-linux-gnueabi-ld: arch/arm/mm/proc-v7-bugs.o: in function `cpu_v7_bugs_init': proc-v7-bugs.c:(.text+0x52): undefined reference to `spectre_v2_update_state' arm-linux-gnueabi-ld: proc-v7-bugs.c:(.text+0x82): undefined reference to `spectre_v2_update_state' Fixes: b9baf5c8c5c3 ("ARM: Spectre-BHB workaround") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Russell King Cc: Catalin Marinas Cc: linux-arm-kernel@lists.infradead.org Cc: patches@armlinux.org.uk Acked-by: Russell King (Oracle) Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- arch/arm/include/asm/spectre.h | 6 ++++++ 1 file changed, 6 insertions(+) --- a/arch/arm/include/asm/spectre.h +++ b/arch/arm/include/asm/spectre.h @@ -25,7 +25,13 @@ enum { SPECTRE_V2_METHOD_LOOP8 = BIT(__SPECTRE_V2_METHOD_LOOP8), }; +#ifdef CONFIG_GENERIC_CPU_VULNERABILITIES void spectre_v2_update_state(unsigned int state, unsigned int methods); +#else +static inline void spectre_v2_update_state(unsigned int state, + unsigned int methods) +{} +#endif int spectre_bhb_update_vectors(unsigned int method);