Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2742095pxb; Tue, 21 Sep 2021 06:45:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPVlR2gWf4NI1Yw01XPN8758uCZcCqxjR/cxVbNSkkYr8dpptt2iGupdppQdOoLVJ1jQuK X-Received: by 2002:aa7:d785:: with SMTP id s5mr35555286edq.214.1632231942021; Tue, 21 Sep 2021 06:45:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632231942; cv=none; d=google.com; s=arc-20160816; b=SFQv67NsBTYIFrk7472Cl37aTzFZ99as8GV4YabLFaGlKfNUSENi62UcetTVHRz30L D3LU0dtSWSb816OUa9rKjPTxTN8Etj+FlUFs9VkBG+5iJFz0LXroGyT58NduoXH1D/MW NSStYnr400z/yBdgYOO4Qw7mbdmp0Uk9uTaIxiBy+gBl69c/osQ0mvD/01K1WtygEash Reo+MaDJmoc1sR4rQobQQ4mfOcTHSGNnaaGSV8ZiYKfttarHxeBKNYOzXREdoI1+397o 8GZMHceSz3ZCEpFJsrBSy7en5BnYvWeKEghcUljrwxncSzPdD+3KNwEi4BBAujwQwEUr Bywg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=OnCsCeiUFYNre6s3/5Iv4OTbBg1+UkYfLYWdQcZU1eE=; b=gIx666ZDGNdgTqWVm2H/lEwz7ELQk1T1tqNLlKn8mH8LLE5eOG7VYT3baIXQ8Dk3H8 6/onqAu8TAR2AStLcCoBAM5fGTuDmzvXUl7CIMZ1Hj85xnVlqWAI/0zxBwylQoPsvJHy OkTEchbjtk5f7x7hwiR/n7ZFa2Yzx2WeO9dkAgvQrzDqPH0kHAZfqgU4eHRBWEkeK7pq 3NRp+hfM1b/zU2pmqFhev9vqlzKSePom5/y35Js1w1d5OGnGVtI2crAazm4dX5toeUEV 8UVNhiKsHaCVX7LtGretdo2Jhep6oSH8/biY71+SkSNuKsG4MFFj/FZ7wiILKQtR+hUc DATg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i18si470531edc.159.2021.09.21.06.45.11; Tue, 21 Sep 2021 06:45:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233572AbhIUNns (ORCPT + 99 others); Tue, 21 Sep 2021 09:43:48 -0400 Received: from foss.arm.com ([217.140.110.172]:33956 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233460AbhIUNnc (ORCPT ); Tue, 21 Sep 2021 09:43:32 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A9B6B106F; Tue, 21 Sep 2021 06:42:03 -0700 (PDT) Received: from ewhatever.cambridge.arm.com (ewhatever.cambridge.arm.com [10.1.197.1]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E1F033F40C; Tue, 21 Sep 2021 06:42:01 -0700 (PDT) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, maz@kernel.org, catalin.marinas@arm.com, mark.rutland@arm.com, james.morse@arm.com, anshuman.khandual@arm.com, leo.yan@linaro.org, mike.leach@linaro.org, mathieu.poirier@linaro.org, will@kernel.org, lcherian@marvell.com, coresight@lists.linaro.org, Suzuki K Poulose Subject: [PATCH v2 17/17] arm64: Advertise TRBE erratum workaround for write to out-of-range address Date: Tue, 21 Sep 2021 14:41:21 +0100 Message-Id: <20210921134121.2423546-18-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20210921134121.2423546-1-suzuki.poulose@arm.com> References: <20210921134121.2423546-1-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add Kconfig entries for the errata workarounds for TRBE writing to an out-of-range address. Cc: Mathieu Poirier Cc: Anshuman Khandual Cc: Mike Leach Cc: Leo Yan Signed-off-by: Suzuki K Poulose --- Documentation/arm64/silicon-errata.rst | 4 +++ arch/arm64/Kconfig | 39 ++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/Documentation/arm64/silicon-errata.rst b/Documentation/arm64/silicon-errata.rst index 569a92411dcd..5342e895fb60 100644 --- a/Documentation/arm64/silicon-errata.rst +++ b/Documentation/arm64/silicon-errata.rst @@ -96,6 +96,8 @@ stable kernels. +----------------+-----------------+-----------------+-----------------------------+ | ARM | Cortex-A710 | #2054223 | ARM64_ERRATUM_2054223 | +----------------+-----------------+-----------------+-----------------------------+ +| ARM | Cortex-A710 | #2224489 | ARM64_ERRATUM_2224489 | ++----------------+-----------------+-----------------+-----------------------------+ | ARM | Neoverse-N1 | #1188873,1418040| ARM64_ERRATUM_1418040 | +----------------+-----------------+-----------------+-----------------------------+ | ARM | Neoverse-N1 | #1349291 | N/A | @@ -106,6 +108,8 @@ stable kernels. +----------------+-----------------+-----------------+-----------------------------+ | ARM | Neoverse-N2 | #2067961 | ARM64_ERRATUM_2067961 | +----------------+-----------------+-----------------+-----------------------------+ +| ARM | Neoverse-N2 | #2253138 | ARM64_ERRATUM_2253138 | ++----------------+-----------------+-----------------+-----------------------------+ | ARM | MMU-500 | #841119,826419 | N/A | +----------------+-----------------+-----------------+-----------------------------+ +----------------+-----------------+-----------------+-----------------------------+ diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 0764774e12bb..611ae02aabbd 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -736,6 +736,45 @@ config ARM64_ERRATUM_2067961 If unsure, say Y. +config ARM64_WORKAROUND_TRBE_WRITE_OUT_OF_RANGE + bool + +config ARM64_ERRATUM_2253138 + bool "Neoverse-N2: 2253138: workaround TRBE writing to address out-of-range" + depends on CORESIGHT_TRBE + default y + select ARM64_WORKAROUND_TRBE_WRITE_OUT_OF_RANGE + help + This option adds the workaround for ARM Neoverse-N2 erratum 2253138. + + Affected Neoverse-N2 cores might write to an out-of-range address, not reserved + for TRBE. Under some conditions, the TRBE might generate a write to the next + virtually addressed page following the last page of the TRBE address space + (i.e, the TRBLIMITR_EL1.LIMIT), instead of wrapping around to the base. + + We work around this in the driver by, always making sure that there is a + page beyond the TRBLIMITR_EL1.LIMIT, within the space allowed for the TRBE. + + If unsure, say Y. + +config ARM64_ERRATUM_2224489 + bool "Cortex-A710: 2224489: workaround TRBE writing to address out-of-range" + depends on CORESIGHT_TRBE + default y + select ARM64_WORKAROUND_TRBE_WRITE_OUT_OF_RANGE + help + This option adds the workaround for ARM Cortex-A710 erratum 2224489. + + Affected Cortex-A710 cores might write to an out-of-range address, not reserved + for TRBE. Under some conditions, the TRBE might generate a write to the next + virtually addressed page following the last page of the TRBE address space + (i.e, the TRBLIMITR_EL1.LIMIT), instead of wrapping around to the base. + + We work around this in the driver by, always making sure that there is a + page beyond the TRBLIMITR_EL1.LIMIT, within the space allowed for the TRBE. + + If unsure, say Y. + config CAVIUM_ERRATUM_22375 bool "Cavium erratum 22375, 24313" default y -- 2.24.1