Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1296540pxb; Wed, 6 Apr 2022 14:06:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpVtXNxL5sw74UZbUsz/vnL5wNt7MD5ufgXI8pxfleMDubz9DLjsBOSXb9EhynZLs6po8S X-Received: by 2002:a63:6a0a:0:b0:398:6fb4:33c2 with SMTP id f10-20020a636a0a000000b003986fb433c2mr8770345pgc.151.1649279208705; Wed, 06 Apr 2022 14:06:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649279208; cv=none; d=google.com; s=arc-20160816; b=U9/TMuWOhFuhiq3RItonXeNX+DGlnfLsnUR5QdWbMMNu771oMhNTfvDVp1zTCTGSt3 sCp0Ign9gkL68XEZU9BlRptICzURx9saG4cRLHKtEpEOz//FTSbLsbsA/csu+cEWmXE2 l08CeVbpJUy1nVFCWKDOy7isxVe9JtbLotX3JK1kqZHZqseQXsmDg5ujg3JvXRnqw1mz Mp3O1h1SDjnhy8naFyA35b/jj9pDF/u9FqO6/8LMu31+55Ip3kSZpsR7y4TSJeK5oCNc xxx911gKLm8wH/VQhJaH0nzmLOTJ3dTRiBoPchZBSojkOBKOCmjrEDBwJF1H0vEFoRCz SI1Q== 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=AAICPly/uoJPhxCZTS3mrIF0UYzTUVWWD+0JcB274mA=; b=fLc0gkvSTtdPOSmoreWWDK2AMOHSt8+Q4gGyeK2YHQFSY5yBh8ErFFW9m7qgRbmeFN rFqgNexIdo93YlDGHOD/YHyvUnXAjWUQIzr+MEiFkmV1YRn/hjdRhIA30Ulhbqs1OT5n oeg4W7SRK4Ts5LtbPrcSzbRkgLKijlBLJk+MoWeHZgI4C+qOZyHupRVE7vs3GKfI+Pm9 7+7kZ+OQkbvaJRjFSTDo919v9H9ho9XCWGS10kkkcHLCKVQBghgbf7NAfUs0/EO6Uaw9 K07nRlu3Fvh/ISEPJDIzDFYXbx/C7LYbWFvbxiyGsiB5MBdozsdT9vIb+0h+Rd0FZ4Ww dNGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TG0+vkYg; 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 d37-20020a631d65000000b003816043ee58si16962354pgm.77.2022.04.06.14.06.32; Wed, 06 Apr 2022 14:06:48 -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=TG0+vkYg; 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 S234226AbiDFUO4 (ORCPT + 99 others); Wed, 6 Apr 2022 16:14:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237033AbiDFUN4 (ORCPT ); Wed, 6 Apr 2022 16:13:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C137E1B60F3; Wed, 6 Apr 2022 11:28:02 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 5F27B61C57; Wed, 6 Apr 2022 18:28:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 702AFC385A3; Wed, 6 Apr 2022 18:28:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649269681; bh=Ar6wQxHGUgKLPgy00kKXXw91vno3jB1Vdh5h58ZAXlg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TG0+vkYgKTOWNP3oEE1kylw2RVQY6wuVgz6CdB43FhNN64zU9eogAo1GA3maucujA 5Xbok/TkpSrz1PZ17FOVKlOWOE1attGQ8/3vMh06bGdH2WmNpZkN8yCQvrREMqU+UG 1TP3f+myFnvtxQUkyVUNxrr+rVy/X+fKhM7mqISY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Will Deacon , Catalin Marinas , Mark Rutland , Dave Martin , Suzuki K Poulose , Ard Biesheuvel , James Morse Subject: [PATCH 4.9 05/43] arm64: capabilities: Move errata work around check on boot CPU Date: Wed, 6 Apr 2022 20:26:14 +0200 Message-Id: <20220406182436.835640694@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220406182436.675069715@linuxfoundation.org> References: <20220406182436.675069715@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=-7.1 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: Suzuki K Poulose [ Upstream commit 5e91107b06811f0ca147cebbedce53626c9c4443 ] We trigger CPU errata work around check on the boot CPU from smp_prepare_boot_cpu() to make sure that we run the checks only after the CPU feature infrastructure is initialised. While this is correct, we can also do this from init_cpu_features() which initilises the infrastructure, and is called only on the Boot CPU. This helps to consolidate the CPU capability handling to cpufeature.c. No functional changes. Cc: Will Deacon Cc: Catalin Marinas Cc: Mark Rutland Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon Signed-off-by: Ard Biesheuvel Signed-off-by: Greg Kroah-Hartman Signed-off-by: James Morse Signed-off-by: Greg Kroah-Hartman --- arch/arm64/kernel/cpufeature.c | 5 +++++ arch/arm64/kernel/smp.c | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -476,6 +476,11 @@ void __init init_cpu_features(struct cpu init_cpu_ftr_reg(SYS_MVFR2_EL1, info->reg_mvfr2); } + /* + * Run the errata work around checks on the boot CPU, once we have + * initialised the cpu feature infrastructure. + */ + update_cpu_errata_workarounds(); } static void update_cpu_ftr_reg(struct arm64_ftr_reg *reg, u64 new) --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -444,12 +444,6 @@ void __init smp_prepare_boot_cpu(void) jump_label_init(); cpuinfo_store_boot_cpu(); save_boot_cpu_run_el(); - /* - * Run the errata work around checks on the boot CPU, once we have - * initialised the cpu feature infrastructure from - * cpuinfo_store_boot_cpu() above. - */ - update_cpu_errata_workarounds(); } static u64 __init of_get_cpu_mpidr(struct device_node *dn)