From patchwork Sun Oct 27 21:00:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 177835 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp2531392ill; Sun, 27 Oct 2019 14:09:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqyB13U/qIynWsZgo7oHBxLnXNs21RtRUnMQP330HZ4Lihve++zcKN/7haY5twT+ZMxDQPbP X-Received: by 2002:a50:b536:: with SMTP id y51mr16142665edd.271.1572210543179; Sun, 27 Oct 2019 14:09:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572210543; cv=none; d=google.com; s=arc-20160816; b=cOc/HgxA91eI05q/m6xjc7gYwsb/vmD2Ee/ptBl3o5Aw6pIPBXmcS/Jbzb5YegF+O8 7exXgs3/IfwJOVVI4pB00o59dAjCngPnIch7TQrsQnRgAF4stjuCPWBDllPn0oHB4VY2 CoJKgpDjbuQr2JUwNMzuElpnAxQoPkUdG4piEdM4vjyXoZdHR8yXwSp8iUcRMweBPZNZ wFjmbb41zk2ybg/UM1OKGwQWVH2MrRQuom42q2iK65kRX2ia0a4Px4mgVbj4M4RC3Eko c/NsQAz4v9qxjDnC1L2jHF3rgEyJbxvdECv9DKUzB9lkIxFTEA9A+ZPLQJ38wUji/x3r V/Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LdH52yAaFKPLfGekuZ780DQKuFoulbDtRwG2UCYlJAs=; b=tbrvbsDL1U7+848uJQ+hBYhkkGcoH7jnNrvFOZtytrqhTBph+eIMGKzn9XDw/tvKwU 5x1M2gvMWfw9/b8UF6VM691bp9Mu7tccjXr3L74b4QTYmNFC5W73E1y9J8KS7FWr5kZx QzFaTCZwhCKt5xjMEyi8/2QK1qILc7GH3m7SqeeDBCLxwVsVHEunjNePj00CbiXz3YJc TjSYKVF71R/Ne0xTTf7O39QFAooXqBecPJ0Pk835Y3VkT+d5CaMGM3H/IO5iCdoy9KS/ da4GeC5eVv5G+yluEn0gKsKIH6PJdrShlhR57eTNfbD7LfVD6nnoDJxlYFHKCbJFiKJa gvkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TsaPJxHP; 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 d10si6595307edn.266.2019.10.27.14.09.02; Sun, 27 Oct 2019 14:09:03 -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=@kernel.org header.s=default header.b=TsaPJxHP; 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 S1729456AbfJ0VJA (ORCPT + 26 others); Sun, 27 Oct 2019 17:09:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:55298 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729436AbfJ0VI5 (ORCPT ); Sun, 27 Oct 2019 17:08:57 -0400 Received: from localhost (100.50.158.77.rev.sfr.net [77.158.50.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B506D2064A; Sun, 27 Oct 2019 21:08:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572210537; bh=nFXKwce1i2BiC5oc42Bk3p8PO8k77yfLZ0nJhiJfJYk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TsaPJxHPnUu7fekHghbh04WtOHtl5eC2frzHP7FLvLxqf4fYACzH6wUVY5i1eAJ0o nHoXkgVrfdQetvfmTErzNUBDB1KdfwmQHU/pL8TSX1gwZC/aIjHe9TmYSf5WRSlUwX 2o6ztKsfS0wBNOgRHI5lqBcnYsGOlFSetucxYcxQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Will Deacon , Catalin Marinas , Mark Rutland , Dave Martin , Suzuki K Poulose , Ard Biesheuvel Subject: [PATCH 4.14 047/119] arm64: capabilities: Move errata work around check on boot CPU Date: Sun, 27 Oct 2019 22:00:24 +0100 Message-Id: <20191027203318.941105623@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191027203259.948006506@linuxfoundation.org> References: <20191027203259.948006506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org 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 --- 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 @@ -521,6 +521,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 @@ -449,12 +449,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)