Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2742085pxb; Tue, 21 Sep 2021 06:45:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPN1EtsLLBvp7EwwaPS10nC4jB4AdmD17E4ElL9hjA+aMHaq/ek+FTtvcgSzhGiDFpsF9G X-Received: by 2002:a17:906:63ca:: with SMTP id u10mr33752988ejk.411.1632231941101; Tue, 21 Sep 2021 06:45:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632231941; cv=none; d=google.com; s=arc-20160816; b=tMrwj5IH6p35NAgS0Ae8xqsLJZovbbyzdShf9wxvngUG9A2J2rz6ciGDp3nodDa1XX oWHwrNH7q6bkS4RPcfCYAj0st9xNdGW1DsdKtsT0wGEQctsVUXg+SxKwN2uD4uKsaA8q AT85SUMC+2vLTVnMT0sowZq3UFajgN3wSt5d2oEtEVK1cGUYFt0YbVf//EflnCW+aV9z 7oZmC4PF9LnMd9E1DPz77k8cioL1ejLVzrEo4KfL9XRtqpywqU64b+yELpniZslhGRnz 6BCAziy7i71ThSLj7yuGt6iXrIS/cK6QFI/lXPYZ051NivrYdm6b2gP3kusOrnZrrBCg /cKg== 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 :message-id:date:subject:cc:to:from; bh=wjwwYMzPcCoOY/wAZfb+50iMun71tvV8dBvyUd7tNbE=; b=mss4GofvJWHSUQRKqmw+NdASUczHdpmMIgxCs7f8KNjUHpMpJKNll+IBSJTzOWRAjo WJFWciiinJTd9jv7mCQLXAKUkyrBiT20TjI2ni7ET/SB7k5cBVMXbWahvkcBEivML0p2 UWTBdrBhBoqK/3zCoulfsOMhBq38HBGA9KVl2a0ZW+SgjdEU+xjNLCUwiWB/oCS7agxK WeChczz9JY/DJSMtP7+uHA5B6kEW2aIMStNYdqurlyrk0QMmd7/oOJplB8NGHRx+WDdP euEZFS4Urss/mlAneg0JhFDzs54D2N0beD5FGKxJcUiXfwqgjo4+7+qHoWAs/HT8hi/j tWAA== 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 t5si18606630edj.607.2021.09.21.06.45.10; Tue, 21 Sep 2021 06:45:41 -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 S233042AbhIUNnB (ORCPT + 99 others); Tue, 21 Sep 2021 09:43:01 -0400 Received: from foss.arm.com ([217.140.110.172]:33734 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232953AbhIUNm6 (ORCPT ); Tue, 21 Sep 2021 09:42:58 -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 126B36D; Tue, 21 Sep 2021 06:41:30 -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 4A7C53F59C; Tue, 21 Sep 2021 06:41:28 -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 00/17] arm64: Self-hosted trace related errata workarounds Date: Tue, 21 Sep 2021 14:41:04 +0100 Message-Id: <20210921134121.2423546-1-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series adds CPU erratum work arounds related to the self-hosted tracing. The list of affected errata handled in this series are : * TRBE may overwrite trace in FILL mode - Arm Neoverse-N2 #2139208 - Cortex-A710 #211985 * A TSB instruction may not flush the trace completely when executed in trace prohibited region. - Arm Neoverse-N2 #2067961 - Cortex-A710 #2054223 * TRBE may write to out-of-range address - Arm Neoverse-N2 #2253138 - Cortex-A710 #2224489 The series applies on the self-hosted/trbe fixes posted here [0]. A tree containing both the series is available here [1] [0] https://lkml.kernel.org/r/20210914102641.1852544-1-suzuki.poulose@arm.com [1] git@git.gitlab.arm.com:linux-arm/linux-skp.git coresight/errata/trbe-tsb-n2-a710/v2 Changes since v1: https://lkml.kernel.org/r/20210728135217.591173-1-suzuki.poulose@arm.com - Added a fix to the TRBE driver handling of sink_specific data - Added more description and ASCII art for overwrite in FILL mode work around - Added another TRBE erratum to the list. "TRBE may write to out-of-range address" Patches from 12-17 - Added comment to list the expectations around TSB erratum workaround. Suzuki K Poulose (17): coresight: trbe: Fix incorrect access of the sink specific data coresight: trbe: Add infrastructure for Errata handling coresight: trbe: Add a helper to calculate the trace generated coresight: trbe: Add a helper to pad a given buffer area coresight: trbe: Decouple buffer base from the hardware base coresight: trbe: Allow driver to choose a different alignment arm64: Add Neoverse-N2, Cortex-A710 CPU part definition arm64: Add erratum detection for TRBE overwrite in FILL mode coresight: trbe: Workaround TRBE errata overwrite in FILL mode arm64: Enable workaround for TRBE overwrite in FILL mode arm64: errata: Add workaround for TSB flush failures coresight: trbe: Add a helper to fetch cpudata from perf handle coresight: trbe: Add a helper to determine the minimum buffer size coresight: trbe: Make sure we have enough space arm64: Add erratum detection for TRBE write to out-of-range coresight: trbe: Work around write to out of range arm64: Advertise TRBE erratum workaround for write to out-of-range address Documentation/arm64/silicon-errata.rst | 12 + arch/arm64/Kconfig | 109 ++++++ arch/arm64/include/asm/barrier.h | 16 +- arch/arm64/include/asm/cputype.h | 4 + arch/arm64/kernel/cpu_errata.c | 64 ++++ arch/arm64/tools/cpucaps | 3 + drivers/hwtracing/coresight/coresight-trbe.c | 339 +++++++++++++++++-- 7 files changed, 510 insertions(+), 37 deletions(-) -- 2.24.1