Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp230659pxb; Wed, 22 Sep 2021 00:24:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4FxOLsbhJRxNaQ1OO2Y/0k/rOTykPARv2KNZpzFoGAlIzDPmE5rDKepj4JLO9uGN2yDfS X-Received: by 2002:a17:906:f11:: with SMTP id z17mr40759489eji.385.1632295458456; Wed, 22 Sep 2021 00:24:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632295458; cv=none; d=google.com; s=arc-20160816; b=q0rEP5visQlevz9N54Ov/7x8aASMZWcjNXUQO7k+T8CUq4YQR/fYJLCbnC1X107c1f R7I+XqFpa6vgAA+pcIvSzTV6fxA0Bmfpk2OhBJX5toE7PUae8/UworQoQtqh9wR2Ai9E gkQxexMm2qtH/jVwRcEQMIA+x+o4B7zsZQH9HMq3SahhGvfZ1UaPV0Hcy+wt+g1vn3vK b22633+G1yv5BIuVTk6c6/hNgNwF4sV3U5EKMLSgWlY4DnNW3hW4K4Ejp+6+n/RBu5Dv 5TKOAzjCvmbTkUcVmATTUN3uarfYdUuGmcU91EC7SOHp66LBxXnSomYQS9xe/xY7GeAN XaHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=1f8oBE0/EmFX7gAWZkeyQFl6KJUmzYHOyokLj+6kUlE=; b=wkdahcB3NRDEyfdogr8mLG3Gym9aFLCxNKIDzWfoGmcaWDF86AkMzJF+rseJdas6K4 6/shDHyiJKYIQroFU1/BHD7YTwfMYH5HiGwHAcidoNTEl/L3P3ApyATLgQxdlRHfqW4+ EAH9FsY8UBddgyCFcu8sfGWn/h9affoDa0k14i+3rwCjLGQvP/flka28pkNGFJe8fqn/ vHjL+p53cNdkRzW8wK3fAtnN53NyanCaGyxCLStSoVQYhyd3HIhLNkfCxXGsT+13KPJr SUbNeiTfRw6gJj6CSdzrFqPJ2wuq64glHuk8Mk1emd3r2jwIblKqENEDkhFTgO/9eQpe G2GQ== 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 25si1636074ejh.607.2021.09.22.00.23.32; Wed, 22 Sep 2021 00:24:18 -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 S231429AbhIVHX1 (ORCPT + 99 others); Wed, 22 Sep 2021 03:23:27 -0400 Received: from foss.arm.com ([217.140.110.172]:44236 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229697AbhIVHX0 (ORCPT ); Wed, 22 Sep 2021 03:23:26 -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 25372113E; Wed, 22 Sep 2021 00:21:57 -0700 (PDT) Received: from [10.163.73.113] (unknown [10.163.73.113]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 435B83F40C; Wed, 22 Sep 2021 00:21:53 -0700 (PDT) Subject: Re: [PATCH v2 10/17] arm64: Enable workaround for TRBE overwrite in FILL mode To: Suzuki K Poulose , 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, leo.yan@linaro.org, mike.leach@linaro.org, mathieu.poirier@linaro.org, will@kernel.org, lcherian@marvell.com, coresight@lists.linaro.org References: <20210921134121.2423546-1-suzuki.poulose@arm.com> <20210921134121.2423546-11-suzuki.poulose@arm.com> From: Anshuman Khandual Message-ID: <8b23470b-da5c-c624-dc98-d30ab7c1be5d@arm.com> Date: Wed, 22 Sep 2021 12:53:00 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210921134121.2423546-11-suzuki.poulose@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/21/21 7:11 PM, Suzuki K Poulose wrote: > Now that we have the work around implmented in the TRBE > driver, add the Kconfig entries and document the errata. > > Cc: Mark Rutland > Cc: Will Deacon > Cc: Catalin Marinas > Cc: Anshuman Khandual > Cc: Mathieu Poirier > 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 d410a47ffa57..2f99229d993c 100644 > --- a/Documentation/arm64/silicon-errata.rst > +++ b/Documentation/arm64/silicon-errata.rst > @@ -92,12 +92,16 @@ stable kernels. > +----------------+-----------------+-----------------+-----------------------------+ > | ARM | Cortex-A77 | #1508412 | ARM64_ERRATUM_1508412 | > +----------------+-----------------+-----------------+-----------------------------+ > +| ARM | Cortex-A710 | #2119858 | ARM64_ERRATUM_2119858 | > ++----------------+-----------------+-----------------+-----------------------------+ > | ARM | Neoverse-N1 | #1188873,1418040| ARM64_ERRATUM_1418040 | > +----------------+-----------------+-----------------+-----------------------------+ > | ARM | Neoverse-N1 | #1349291 | N/A | > +----------------+-----------------+-----------------+-----------------------------+ > | ARM | Neoverse-N1 | #1542419 | ARM64_ERRATUM_1542419 | > +----------------+-----------------+-----------------+-----------------------------+ > +| ARM | Neoverse-N2 | #2139208 | ARM64_ERRATUM_2139208 | > ++----------------+-----------------+-----------------+-----------------------------+ > | ARM | MMU-500 | #841119,826419 | N/A | > +----------------+-----------------+-----------------+-----------------------------+ > +----------------+-----------------+-----------------+-----------------------------+ > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 077f2ec4eeb2..eac4030322df 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -666,6 +666,45 @@ config ARM64_ERRATUM_1508412 > > If unsure, say Y. > > +config ARM64_WORKAROUND_TRBE_OVERWRITE_FILL_MODE > + bool > + > +config ARM64_ERRATUM_2119858 > + bool "Cortex-A710: 2119858: workaround TRBE overwriting trace data in FILL mode" > + default y > + depends on CORESIGHT_TRBE > + select ARM64_WORKAROUND_TRBE_OVERWRITE_FILL_MODE > + help > + This option adds the workaround for ARM Cortex-A710 erratum 2119858. > + > + Affected Cortex-A710 cores could overwrite upto 3 cache lines of trace > + data at the base of the buffer (ponited by TRBASER_EL1) in FILL mode in > + the event of a WRAP event. > + > + Work around the issue by always making sure we move the TRBPTR_EL1 by > + 256bytes before enabling the buffer and filling the first 256bytes of > + the buffer with ETM ignore packets upon disabling. > + > + If unsure, say Y. > + > +config ARM64_ERRATUM_2139208 > + bool "Neoverse-N2: 2139208: workaround TRBE overwriting trace data in FILL mode" > + default y > + depends on CORESIGHT_TRBE > + select ARM64_WORKAROUND_TRBE_OVERWRITE_FILL_MODE > + help > + This option adds the workaround for ARM Neoverse-N2 erratum 2139208. > + > + Affected Neoverse-N2 cores could overwrite upto 3 cache lines of trace > + data at the base of the buffer (ponited by TRBASER_EL1) in FILL mode in s/ponited/pointed > + the event of a WRAP event. > + > + Work around the issue by always making sure we move the TRBPTR_EL1 by > + 256bytes before enabling the buffer and filling the first 256bytes of > + the buffer with ETM ignore packets upon disabling. > + > + If unsure, say Y. > + > config CAVIUM_ERRATUM_22375 > bool "Cavium erratum 22375, 24313" > default y > The real errata problem description for both these erratums are exactly the same. Rather a more generalized description should be included for the ARM64_WORKAROUND_TRBE_OVERWRITE_FILL_MODE, which abstracts out the problem and a corresponding solution that is implemented in the driver. This should also help us reduce current redundancy. ---------------------------------------------------------------------- Affected cores could overwrite upto 3 cache lines of trace data at the base of the buffer (pointed by TRBASER_EL1) in FILL mode in the event of a WRAP event. Work around the issue by always making sure we move the TRBPTR_EL1 by 256bytes before enabling the buffer and filling the first 256bytes of the buffer with ETM ignore packets upon disabling. ----------------------------------------------------------------------