Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1132355rdd; Wed, 10 Jan 2024 09:30:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJAYY8j1cimnL24uzHe/e3k2+h0p7c4qdDOoHHL2L6JrfYoVa13q9V8mHjvR7Ga5sloOwv X-Received: by 2002:a05:620a:55aa:b0:783:339b:2c37 with SMTP id vr10-20020a05620a55aa00b00783339b2c37mr1329983qkn.116.1704907814293; Wed, 10 Jan 2024 09:30:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704907814; cv=none; d=google.com; s=arc-20160816; b=CwiCcszAKFqOhDFqdCcmvyGUzRsglEG1DzWebqokIOmR/8h+BvN30S3AfSe+jrT8qh YdsDk/D9A96sYpP3C4y3xsUvt75vJuOAF6WqjyCU/xLH6FHcKkXjlQcWoWwPv0Vyg1oT PZ2tuVn8jAHBEgxsWhfzKbwHcoGA0m3bsVhrjKHUAnTfycL8pdxsvEOZ1J/kyZTyqUG6 xam0Bwj13meMR5IK2DJsfB8dT3eCRlpAz05JPGNHlE1hWV4K70ydiy6SG0341JRYwksV 8QWmXHNGeHYSCNhUDQtS3Wt6EDfZ8lTZDtuYtDSi9kE4d5eU2e/EMMX+Fl+QPrYwixzv v/4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=TtlGnzl9+dZMUPQdCUXK8MbztDEYRkTL9zxQixG/ngo=; fh=BtiBzfyGCXG0105aiYJfh9JjVYJ0Lc+4+J30WZyrfGs=; b=pXEOVCiBNYnbIa12109rCcCR1RCEdUW0IAd4YndGDs/9cGEUERU1Hr5OiVrCBfoPUA 5Llp93jjQshtzqQ5Altnji+iXG9KxHLGiuOv2jefXsb/8rLWezH/h73HdBTkCVL2O+pg spOWYsk/mWalaLz552QVtIRv8XbURigNw79e2mzpphS2QuOhS7g2eXnOYOR7tdf5Fgk4 cteNNw9ATW6nsmnVaTacPZYe0NCPksQM3p61OO3cnzgrFkftr+xtxfZe4jmxSgbwsRar ousfNbJHjl+mg6UbnVECmgbpsJBjCy+XhLox+H4e06YZLrDbmnDdluL5knXOBKtoV+PV 6B2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jqsKVvY6; spf=pass (google.com: domain of linux-kernel+bounces-22537-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22537-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x22-20020a05620a14b600b007815fec57b8si4164695qkj.3.2024.01.10.09.30.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 09:30:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22537-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jqsKVvY6; spf=pass (google.com: domain of linux-kernel+bounces-22537-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22537-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D68B61C2406D for ; Wed, 10 Jan 2024 17:30:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 837994D126; Wed, 10 Jan 2024 17:29:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jqsKVvY6" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B468C4D107 for ; Wed, 10 Jan 2024 17:29:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 221ACC43399; Wed, 10 Jan 2024 17:29:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704907791; bh=7wbCjMM7tjumNzK49XR6Y/BSBSyJJnYiOaEyOvr+9gs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=jqsKVvY6TAox8wLuIntNXB+DGU9AJBF/cBVBK9ErMZqAggEfYeZKFW5jQ2BLMU3QH 9LicJocbmgS90Jtww5IXQWt7iUmEnDQJIQul2uKxgNNXO3T3Ikl1/wf5t7RAlA4JfA 4ZORrA9D6xj5cd+0r9HwNdQtRkiYwNblmg+W50AJ29aFG5Yr11DNbnFQaI9VQfKr2r TiSCnURh8Tdur0KavaCN7Q5AIvo117S9/OHOHc518dPhKlrVLroZX5d1SBJ/vyLOB4 +Ocu5ah2Qtr5Uek7bltuR6mjBFhbXL1mBwH95GKUL4yrfOAM381dygWRlY9ljpwaLB F1iYvqYzg4wlg== Received: (nullmailer pid 2134037 invoked by uid 1000); Wed, 10 Jan 2024 17:29:48 -0000 From: Rob Herring Date: Wed, 10 Jan 2024 11:29:20 -0600 Subject: [PATCH 1/2] arm64: Rename ARM64_WORKAROUND_2966298 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240110-arm-errata-a510-v1-1-d02bc51aeeee@kernel.org> References: <20240110-arm-errata-a510-v1-0-d02bc51aeeee@kernel.org> In-Reply-To: <20240110-arm-errata-a510-v1-0-d02bc51aeeee@kernel.org> To: Catalin Marinas , Will Deacon Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.13-dev In preparation to apply ARM64_WORKAROUND_2966298 for multiple errata, rename the kconfig and capability. No functional change. Cc: stable@vger.kernel.org Signed-off-by: Rob Herring --- arch/arm64/Kconfig | 4 ++++ arch/arm64/kernel/cpu_errata.c | 4 ++-- arch/arm64/kernel/entry.S | 2 +- arch/arm64/tools/cpucaps | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 7b071a00425d..ba9f6ceddbbe 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1037,8 +1037,12 @@ config ARM64_ERRATUM_2645198 If unsure, say Y. +config ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD + bool + config ARM64_ERRATUM_2966298 bool "Cortex-A520: 2966298: workaround for speculatively executed unprivileged load" + select ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD default y help This option adds the workaround for ARM Cortex-A520 erratum 2966298. diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c index e29e0fea63fb..cb5e0622168d 100644 --- a/arch/arm64/kernel/cpu_errata.c +++ b/arch/arm64/kernel/cpu_errata.c @@ -713,10 +713,10 @@ const struct arm64_cpu_capabilities arm64_errata[] = { MIDR_FIXED(MIDR_CPU_VAR_REV(1,1), BIT(25)), }, #endif -#ifdef CONFIG_ARM64_ERRATUM_2966298 +#ifdef CONFIG_ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD { .desc = "ARM erratum 2966298", - .capability = ARM64_WORKAROUND_2966298, + .capability = ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD, /* Cortex-A520 r0p0 - r0p1 */ ERRATA_MIDR_REV_RANGE(MIDR_CORTEX_A520, 0, 0, 1), }, diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index a6030913cd58..544ab46649f3 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -428,7 +428,7 @@ alternative_else_nop_endif ldp x28, x29, [sp, #16 * 14] .if \el == 0 -alternative_if ARM64_WORKAROUND_2966298 +alternative_if ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD tlbi vale1, xzr dsb nsh alternative_else_nop_endif diff --git a/arch/arm64/tools/cpucaps b/arch/arm64/tools/cpucaps index b98c38288a9d..3781ad1d0b26 100644 --- a/arch/arm64/tools/cpucaps +++ b/arch/arm64/tools/cpucaps @@ -84,7 +84,6 @@ WORKAROUND_2077057 WORKAROUND_2457168 WORKAROUND_2645198 WORKAROUND_2658417 -WORKAROUND_2966298 WORKAROUND_AMPERE_AC03_CPU_38 WORKAROUND_TRBE_OVERWRITE_FILL_MODE WORKAROUND_TSB_FLUSH_FAILURE @@ -100,3 +99,4 @@ WORKAROUND_NVIDIA_CARMEL_CNP WORKAROUND_QCOM_FALKOR_E1003 WORKAROUND_REPEAT_TLBI WORKAROUND_SPECULATIVE_AT +WORKAROUND_SPECULATIVE_UNPRIV_LOAD -- 2.43.0