Message ID | 0022a5059adb91ea87175fb215ddd19440bed555.1567077734.git.viresh.kumar@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp2091893ily; Thu, 29 Aug 2019 04:35:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwwdwOy6XHYGORq/POOlZ1jsQS3palpp1W7AOC+BVcY/G0+NFhXSHDiPrWSHOgj/NSkKo+w X-Received: by 2002:a63:e213:: with SMTP id q19mr7822510pgh.180.1567078548174; Thu, 29 Aug 2019 04:35:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567078548; cv=none; d=google.com; s=arc-20160816; b=x2UtGhh+bFb6QPaAqsFw3HCSEMBT7VhjgB/lH6VwrL5jNutE+I7oHmYXxG808reJNt buAbCatR9MHTPIbimWExgqH9Kdlc416qSseRfVA8rSvZzgPtsEkVk6G7CwGwLYzzmrUN Pk9JUT/raOgCdq8g4HiqPIj1lVOkqgXMt85Btz7AXnCO1lsztl7CDfCq/lH87Htv+2Bq BtSOaf8Dm1DFSJUESjRVLMjHKnjH8uv+jfKAKX27tnYufbjgN4ViWDwGwdlpNSg93WRQ FSWjxuvY4WSAlSYjFpUCq52stktpYCN1/5vGIjxQOFVluw1it613Ap99i13ZNYoKfju8 YkXQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=j1PYP8TRl6+XUUI1RLnfOfH8okdoaEeO+GZk5UMu4vo=; b=ieGs7tBwWz/lHUWRGeRNXX3Hejn/VtiNI8ogAv24dkm5si1JSOUlOEhSce0/GS7mll EFZPR9eS75aZKWRYOSbLXMVDsqoWBsz4fHSOD0EusNZaOifGVBEUsJJ2xEHuKSGi2wQX 6HvzsnqBr1eEu4mBi2USY9+xlR7W3l7CG5Tv/GBqW2Nbe1a8onhK+1o11fvOWvIoKfpt JhO3j+xRUwJ7ob2v1gSCg4iuh0C4v9c1hlVs4uDlWpuMEPU2aJmtVTNjf847/XZ94Tk9 hooE4y4LcMruOxqJn+Wg+EcKZE9L/Q57siA766CtsyyYh4tscP6BIO2jnGxNUpjLqF6N T4Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ip6B9wM3; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <stable-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b30si1720301pla.299.2019.08.29.04.35.47; Thu, 29 Aug 2019 04:35:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org header.s=google header.b=ip6B9wM3; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727474AbfH2Lfr (ORCPT <rfc822;naresh.kamboju@linaro.org> + 14 others); Thu, 29 Aug 2019 07:35:47 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:33227 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727122AbfH2Lfr (ORCPT <rfc822;stable@vger.kernel.org>); Thu, 29 Aug 2019 07:35:47 -0400 Received: by mail-pl1-f196.google.com with SMTP id go14so1457579plb.0 for <stable@vger.kernel.org>; Thu, 29 Aug 2019 04:35:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=j1PYP8TRl6+XUUI1RLnfOfH8okdoaEeO+GZk5UMu4vo=; b=ip6B9wM3ozT5CT1rKsg2Sx1YA1l7zbcAgXEfTHR261lT39mZNG5TpiKTz9bDHVjWF/ MhPxnm5U803S8RYlcg+msMGad2IdyLt5YMVzPJ289jnrjReXJym3hbxs3Q0WhVuK/qtm /DwZ4q8yg+0JBX18qJEvbeaM40xU4/tbRRruNn7a7pLOcd8TEP2pZ9DdfE5rwE7u9CI2 CBVPFXZAPY9xmM13w3m6rRpK0LlCV0OBWY2x4d0MsCYxX3gK13I52wFCfVKnnllBRB8R bV1M+7Sn8TJmVTh920gC5luu4Ixg8dZJjKZaEYg5xbQ2FB4N3QmIuViy85Jy8FYMpCzW Frkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=j1PYP8TRl6+XUUI1RLnfOfH8okdoaEeO+GZk5UMu4vo=; b=k7+virurx3AWG91mwJmpzTbtgThealeL6Iq3AOEj65Wzsug2GoZtFyrt+RhDH0M780 gqueNBMvAqHl48J0re4/Rsm9l7flrfjyX/rCQBdK0Wv/rrXhG3IyStsxMjvwmjbBJadp DR23S2J1MN0gMJ/CdAhfKLrnMnOJJmE/OyZeQJADOdBOlJi7jWWoWSDTXw1Bjz2uLojc iHCi8x+EBOtjIXeXGzCkueFIU+s6jTuw/z871Tcm/LpToL21/9/rb+OuY/O01NoLidPA +TqQiiz2D//Q2gpUAPGDj3Aw7P6LO8KubDi5pvwXce4pEu3g02ZtSSbTwps8JJzrGXVM j0AQ== X-Gm-Message-State: APjAAAUtYQ1vAg2k+WmtaW3c/ZNlq72Yp/4HC2LTXcjBnF5Y/xOsnF2j 3dIfklBrjkvusEtYt9/BV/RgJWYw7vM= X-Received: by 2002:a17:902:2bc7:: with SMTP id l65mr8972172plb.119.1567078546059; Thu, 29 Aug 2019 04:35:46 -0700 (PDT) Received: from localhost ([122.167.132.221]) by smtp.gmail.com with ESMTPSA id j11sm2356521pjb.11.2019.08.29.04.35.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Aug 2019 04:35:45 -0700 (PDT) From: Viresh Kumar <viresh.kumar@linaro.org> To: stable@vger.kernel.org, Julien Thierry <Julien.Thierry@arm.com>, Mark Rutland <mark.rutland@arm.com> Cc: Viresh Kumar <viresh.kumar@linaro.org>, linux-arm-kernel@lists.infradead.org, Catalin Marinas <catalin.marinas@arm.com>, Marc Zyngier <marc.zyngier@arm.com>, Will Deacon <will.deacon@arm.com>, Russell King <rmk+kernel@arm.linux.org.uk>, Vincent Guittot <vincent.guittot@linaro.org>, mark.brown@arm.com Subject: [PATCH ARM64 v4.4 V3 20/44] arm64: Run enable method for errata work arounds on late CPUs Date: Thu, 29 Aug 2019 17:04:05 +0530 Message-Id: <0022a5059adb91ea87175fb215ddd19440bed555.1567077734.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.21.0.rc0.269.g1a574e7a288b In-Reply-To: <cover.1567077734.git.viresh.kumar@linaro.org> References: <cover.1567077734.git.viresh.kumar@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
V4.4 backport of arm64 Spectre patches
|
expand
|
diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c index d9f095439011..047f1da59cb1 100644 --- a/arch/arm64/kernel/cpu_errata.c +++ b/arch/arm64/kernel/cpu_errata.c @@ -125,15 +125,18 @@ void verify_local_cpu_errata(void) { const struct arm64_cpu_capabilities *caps = arm64_errata; - for (; caps->matches; caps++) - if (!cpus_have_cap(caps->capability) && - caps->matches(caps, SCOPE_LOCAL_CPU)) { + for (; caps->matches; caps++) { + if (cpus_have_cap(caps->capability)) { + if (caps->enable) + caps->enable((void *)caps); + } else if (caps->matches(caps, SCOPE_LOCAL_CPU)) { pr_crit("CPU%d: Requires work around for %s, not detected" " at boot time\n", smp_processor_id(), caps->desc ? : "an erratum"); cpu_die_early(); } + } } void check_local_cpu_errata(void)