From patchwork Tue Jan 16 14:23:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 124718 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp1031474lje; Tue, 16 Jan 2018 06:26:05 -0800 (PST) X-Google-Smtp-Source: ACJfBosZCccj5FDzantMFxr2a/Jfo3UvjKimME9Qx3q6jK/BGNYXN2qNPYPgOvjeY44ki6ksKTcQ X-Received: by 10.107.24.195 with SMTP id 186mr35897539ioy.185.1516112765262; Tue, 16 Jan 2018 06:26:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516112765; cv=none; d=google.com; s=arc-20160816; b=OzHgO9uCbkuutfDDMec8nbMtnl38wO2/gAWS5Hfoztue0pGej9u3cx7BqZVxJFY/RO 6pmr8Jnl4S4HgRH58aoDqNs1C3L26yghlvhZzatrmLgcarwqBfPahacPh/zKlyvYcNvx RgjWoXA+E55zikMxHadktOWYAg93YUUj7eI4oLPCH1q2bGgnvefMjaKyqYHjOaerpfd9 9wok8ZDBxnlMqfl9ki0VRBMl9WHdJ+emI9lCDcpV+uNzfPQP/uFhsd1AO+rEC4M183gF Qm/WWPa3QHVTICRzjeUaJJsNeZcAv17kqedH/YjCgMaDy4fPaPW2l7bPK2n8ndbUItxN fkmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:references:in-reply-to:message-id:date:to :from:dkim-signature:arc-authentication-results; bh=YNnZj+bD1DNNAIeQ4ktbCz/j0ducO3XCd9Ir+M+fMWg=; b=kcGIlvdJctLRdEfZ7xtY8HE32vZbXDNzuAJAUsKRdh6XT0WMmSfwDBoNIZ2F2/Ghus jQmcWRTcXHF/Q9bynyimNuO2uMaTqPIrezYNgEbOl07AsNzfad0UK0bLSnRrqDd8u3QX dtKq5mPnOvtez4lYCKuOpQ3QspSYHG21D8X3qhSBHf6YbuamnUDy6BNXWrKqvDLM6kPR tktrZOVqT1VPNp0xbgku2NvNjdHKclSfreRBDmeGhdJKn8vodGIBVY7LoiYM9EqgZyPt R4jEjjvn38N8YfJ/E7fMishIyp4QMG/brJEpY3hOC+v2bPdDsECQzevML+DktlZxSRfO qwMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ZVjVpaZ4; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id p36si2398563ioo.210.2018.01.16.06.26.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jan 2018 06:26:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ZVjVpaZ4; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ebS9T-0002D7-DR; Tue, 16 Jan 2018 14:23:47 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ebS9S-0002Bt-E3 for xen-devel@lists.xen.org; Tue, 16 Jan 2018 14:23:46 +0000 X-Inumbo-ID: a6c10863-fac8-11e7-b4a6-bc764e045a96 Received: from mail-wr0-x242.google.com (unknown [2a00:1450:400c:c0c::242]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id a6c10863-fac8-11e7-b4a6-bc764e045a96; Tue, 16 Jan 2018 15:22:16 +0100 (CET) Received: by mail-wr0-x242.google.com with SMTP id p6so15392032wrd.0 for ; Tue, 16 Jan 2018 06:23:45 -0800 (PST) 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; bh=aaPbjjfF4h4zTTt0bbZObyPXY/NzJIAgx43hpdCABw8=; b=ZVjVpaZ4iYVNGwohGdaJbp0ibXt9Hk57NZz5cB6NzCZutzQHtcc0FCxFO8PlFsm+Xp YJ8rJWCL/BDdyMD0TRmc34Vv3f6QGrnn/lWdadH1a7e8rXhloeYtxroqW1/Hwo8HcrO8 l8MbUSWZwoghhJKim0+k2dyLI630yD6RKa8EA= 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; bh=aaPbjjfF4h4zTTt0bbZObyPXY/NzJIAgx43hpdCABw8=; b=DbnON4c/v8071Yt6bju4iIzDz+KoAwyrYy0leogkn7U84e0Ct0OX0VnYjioMnDHCnZ 2ugFPg/XBTcFyKSX+fXQ3PcBbA2oZ5Oq7fTN36a/g3ernbQaxoTn/DvRIaTJcRYclGuj KhlRH/doEI3UhtjWUq4NKHEfRPdN58JllXT2gdhENPXEDxp8Dy8cAH3lty4Sigpjd/qI RBxrCwAKO7gBmJU+9jd49qIJR1UOsdKvH8sBfKv88DMdXA36O7kaoM0uYK8w7gML7z7j 7Gu9uo4EYH6CaOQWzoVHtoLej2m0AgjeL8qRmP/9TC9ChmttKQhAn6NOch0DGN1DO4ZY KiaQ== X-Gm-Message-State: AKwxytfpMTreSemeqZgSgH5mEfgOdFCCjI5tu2xjyYhrl5bu9lUsYkiK kR1+xOexg33gFTYWTpKAs8CTGTwoRdU= X-Received: by 10.223.172.6 with SMTP id v6mr3032714wrc.269.1516112624439; Tue, 16 Jan 2018 06:23:44 -0800 (PST) Received: from e108454-lin.cambridge.arm.com ([2001:41d0:1:6c23::1]) by smtp.gmail.com with ESMTPSA id m201sm1686886wma.13.2018.01.16.06.23.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jan 2018 06:23:43 -0800 (PST) From: Julien Grall To: xen-devel@lists.xen.org Date: Tue, 16 Jan 2018 14:23:35 +0000 Message-Id: <20180116142337.24942-4-julien.grall@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180116142337.24942-1-julien.grall@linaro.org> References: <20180116142337.24942-1-julien.grall@linaro.org> Cc: sstabellini@kernel.org, Julien Grall , andre.przywara@linaro.org Subject: [Xen-devel] [PATCH 3/5] xen/arm: cpuerrata: Add MIDR_ALL_VERSIONS X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Introduce a new macro MIDR_ALL_VERSIONS to match all variant/revision of a given CPU model. This is part of XSA-254. Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini --- xen/arch/arm/cpuerrata.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c index 772587c05a..c50d3331f2 100644 --- a/xen/arch/arm/cpuerrata.c +++ b/xen/arch/arm/cpuerrata.c @@ -7,6 +7,12 @@ .midr_range_min = min, \ .midr_range_max = max +#define MIDR_ALL_VERSIONS(model) \ + .matches = is_affected_midr_range, \ + .midr_model = model, \ + .midr_range_min = 0, \ + .midr_range_max = (MIDR_VARIANT_MASK | MIDR_REVISION_MASK) + static bool __maybe_unused is_affected_midr_range(const struct arm_cpu_capabilities *entry) {