Message ID | 20180412111138.40990-13-mark.rutland@arm.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp1571616ljb; Thu, 12 Apr 2018 04:12:34 -0700 (PDT) X-Google-Smtp-Source: AIpwx48nryVRDwT6ArR3q+guGhD29ZhToo59EWCJCnNuBUoM8ApkYflfIp6sDzb87ejrEfI75nxv X-Received: by 2002:a17:902:1744:: with SMTP id i62-v6mr570486pli.62.1523531554674; Thu, 12 Apr 2018 04:12:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523531554; cv=none; d=google.com; s=arc-20160816; b=olS8/oydGJ8XSYLSFt1tiQYrM4lCT0UABsj7Lh5mLYU8DFBNSnPiqgl7sk/3+1wDCV isDtUHUWy/edCxvFm5KSUjAdoE0ON5CK5IvySDvvphsLF83Lak9MWT9063O8cUt1sMIJ CqwReSwgPe7wqlJ0TECC541b2zWgfG4g39ej611JDjwXl13+e5Q52Z3Umuqo6SWhcr9Z /ZuFBNVXWqKK7dG5mgEMKvTKaMHXcS9QciVOX/tc4X60JZRh5MValZrRCTrw+GAeMqJK q9GKfjpIqtP5BC2Dk3dHxh8u8j9JFX2V8nfMr65YQVvkOjmaaoyGdqxe36DRENRiuxlz K+fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=FTMD0Wb8bNJmvHkft84i+DH2ecD3TR9bA30pdhgSsek=; b=AF0VvDgWie9WbCWglFAkLItBu6gH9eBQFJz6S1MK39oGT3PThEv2mgzCACrKs8lxED PUnrViJFXW7yPjkelae5Q8yyAG2Ja392SPUybOzE3Md62FO5oJmgaR4FbPPt2NLUfRi0 kZJVYrV3bEl0J3+nPVFJGMyiNWr6cRCv8iE7azt/XlhE0X9P1GG/mh2T2G9iUviuyXtS WUZzamirYN31w1YL9QZekzZKnEowVFPwX18q2dps/2ci+AgwG4tRVzUtFPAn4IariQO+ 6lYVd5MtdICJfURjZWN0w3v/8M7GqpdevbBp8ErmOdvFr5uwCE/iCAe/ABWJPJbUHkQF Ui1g== ARC-Authentication-Results: i=1; mx.google.com; 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 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 bg3-v6si3001807plb.118.2018.04.12.04.12.34; Thu, 12 Apr 2018 04:12:34 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752901AbeDLLMd (ORCPT <rfc822;semen.protsenko@linaro.org> + 11 others); Thu, 12 Apr 2018 07:12:33 -0400 Received: from foss.arm.com ([217.140.101.70]:59406 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752428AbeDLLMd (ORCPT <rfc822;stable@vger.kernel.org>); Thu, 12 Apr 2018 07:12:33 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5485380D; Thu, 12 Apr 2018 04:12:33 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A9F6C3F24A; Thu, 12 Apr 2018 04:12:31 -0700 (PDT) From: Mark Rutland <mark.rutland@arm.com> To: stable@vger.kernel.org Cc: mark.brown@linaro.org, ard.biesheuvel@linaro.org, marc.zyngier@arm.com, will.deacon@arm.com, catalin.marinas@arm.com, ghackmann@google.com, shankerd@codeaurora.org Subject: [PATCH v4.9.y 12/42] arm64: Run enable method for errata work arounds on late CPUs Date: Thu, 12 Apr 2018 12:11:08 +0100 Message-Id: <20180412111138.40990-13-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180412111138.40990-1-mark.rutland@arm.com> References: <20180412111138.40990-1-mark.rutland@arm.com> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
arm64 spectre patches
|
expand
|
diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c index b75e917aac46..b866df79bb83 100644 --- a/arch/arm64/kernel/cpu_errata.c +++ b/arch/arm64/kernel/cpu_errata.c @@ -143,15 +143,18 @@ void verify_local_cpu_errata_workarounds(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 update_cpu_errata_workarounds(void)