Received: by 10.192.165.156 with SMTP id m28csp245284imm; Tue, 17 Apr 2018 09:25:50 -0700 (PDT) X-Google-Smtp-Source: AIpwx48OeYfEnBs7x7zc+7fYFJRreIdh9GeAQHbWPle5jEhCldHeIzwNfNkur46XzJQQ4vRU0/1r X-Received: by 2002:a17:902:6e8f:: with SMTP id v15-v6mr2703264plk.245.1523982350585; Tue, 17 Apr 2018 09:25:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523982350; cv=none; d=google.com; s=arc-20160816; b=MwvP+LHX1XEZ3KO2QIU5vczK7E7fRUTrWLrsWVnk6HqckmL4JwTxu9YfE2ili0ct+Z 10QZ2fdj29CMb3o63jAv0V62dyB4ogXOzNwgXP3LWgSkkOIrnOSKG7zhZtaS79dSac0+ q1wQhftE9CkmyktpjYvvphMqFl9K6SUJ6Iy9qVuEFDGfhWERq3Tjp3T+NrBujXZhJnAl BUXTeRIB1baxOlGCH7TBaNvddPhApL7g6uUXiSlhPQhXBBfGhmCim8BKxUxmG8ErBsiE 2MUDFNtwQr5I2g6YEYGipJoJIyIDPKRoC7NDFtRcsK+GiIBI/D0tTFl3EWNKDOIX+mX5 flRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=DmE9V5T9gCmqelhiR67sG40sHBIMkRzKeszWEGRc5Kc=; b=HlcXHWPhN0dcKPOwUaN1btN/VGzUirWwXlVjp7dsjFUMfKGbgLu8ooyLPxs3HeY7XH fxm6Q3cLnYcNeeFwWUuzj60trC2S9u2j6513IDHfLdt61lUVDxen4WnnLM6okzw/pO87 f+UswfRxXG2fdw6ftCOWit8Z+eAY+AGoXxtFJRXVneSRWTNIrpYW5Ora7Zh1bIYSjIPl RuDaAlBxVY/kVTstwK7mI1V5GIrZXRagLmSTQduWLvkzmMjUOa7MV+TyW4JoDFSNzZAl xClFj/bPPy8PIApujGbuW9nbcj8cDso4LbwwjuZE/1UrdBUo/JUN8hPokP4fmnpGrn86 vz3w== ARC-Authentication-Results: i=1; mx.google.com; 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 n1-v6si14653146pld.238.2018.04.17.09.25.36; Tue, 17 Apr 2018 09:25:50 -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; 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 S932119AbeDQQJa (ORCPT + 99 others); Tue, 17 Apr 2018 12:09:30 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36116 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932107AbeDQQJ2 (ORCPT ); Tue, 17 Apr 2018 12:09:28 -0400 Received: from localhost (unknown [46.44.180.42]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id C55EAD0B; Tue, 17 Apr 2018 16:09:27 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Thomas Gleixner , Mark Rutland , Daniel Lezcano , Suzuki K Poulose , Marc Zyngier , Greg Hackmann Subject: [PATCH 4.9 32/66] arm64: cpu_errata: Allow an erratum to be match for all revisions of a core Date: Tue, 17 Apr 2018 17:59:05 +0200 Message-Id: <20180417155647.267387199@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180417155645.868055442@linuxfoundation.org> References: <20180417155645.868055442@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mark Rutland From: Marc Zyngier commit 06f1494f837da8997d670a1ba87add7963b08922 upstream. Some minor erratum may not be fixed in further revisions of a core, leading to a situation where the workaround needs to be updated each time an updated core is released. Introduce a MIDR_ALL_VERSIONS match helper that will work for all versions of that MIDR, once and for all. Acked-by: Thomas Gleixner Acked-by: Mark Rutland Acked-by: Daniel Lezcano Reviewed-by: Suzuki K Poulose Signed-off-by: Marc Zyngier Signed-off-by: Mark Rutland [v4.9 backport] Tested-by: Greg Hackmann Signed-off-by: Greg Kroah-Hartman --- arch/arm64/kernel/cpu_errata.c | 7 +++++++ 1 file changed, 7 insertions(+) --- a/arch/arm64/kernel/cpu_errata.c +++ b/arch/arm64/kernel/cpu_errata.c @@ -127,6 +127,13 @@ static void install_bp_hardening_cb(con .midr_range_min = min, \ .midr_range_max = max +#define MIDR_ALL_VERSIONS(model) \ + .def_scope = SCOPE_LOCAL_CPU, \ + .matches = is_affected_midr_range, \ + .midr_model = model, \ + .midr_range_min = 0, \ + .midr_range_max = (MIDR_VARIANT_MASK | MIDR_REVISION_MASK) + const struct arm64_cpu_capabilities arm64_errata[] = { #if defined(CONFIG_ARM64_ERRATUM_826319) || \ defined(CONFIG_ARM64_ERRATUM_827319) || \