Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2385767rdb; Thu, 21 Sep 2023 18:06:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGRuKCgFZQ4GEtOGcG83mR04K1MHoxg67x2n2ZzJNwvcCdtH/SC79d3Uo1NatYKKqMog+7V X-Received: by 2002:a25:6b01:0:b0:d81:5436:9893 with SMTP id g1-20020a256b01000000b00d8154369893mr6840638ybc.21.1695344762303; Thu, 21 Sep 2023 18:06:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695344762; cv=none; d=google.com; s=arc-20160816; b=km2rxntni0FoJ8q6yAD4uCVcWcj6qGUZCzJt0hDXBqnoO5Xmo1EBPUFkt/OkqtBZOy DStRqgGG41IUKCNOHKj+cFEA4expRvIIAKyDG/Cae3qLsHK1ZeC/cbz/PH93a5P5Q7m5 qtkeDW2G1kumEJCSFbPCyKMbLTe7C9+honl6jEZTAhMmgsO5Tyn2yN20+l8RPW0t3T60 izRoCyj0BZZBDCjnT1/cculDTPQNArRJr5AQ+GCaR6enQ+cf94/Rp8W5yVSqZuY+c7Ce GBwciC8JzHXRikbWxBkBOXuHFxVYinJq3UkzRUtX+VDSF3NYKoe5KimBNNd/36uG6bNk jJog== 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=o0X0IO3Jl4Kwe5uY2CWqwNQGf850Ayz9Hq3wRPGtC3U=; fh=1B1+mkCYVeZZz1DAsIIoOA2jU5pSNu/8Q01YDfzUzC8=; b=PtOSbDlOfwPq/YY1kfLSpBzxzsPEXeMFWJlA1v3wvuhPhj/X13V06tTNVECJG1B/bd tbsY/Sz77vTXC3Vd6MfaCcXwMJMbiNMyuKz957K3+PP1xtkFanKrT1QRyrSVpk1fc/rU Sp9xrQdrFRgsybbW/KkMzQy7w3a37ZvyBzlcaVV4RdZdMStOgrav4hRCWsyPaSZsKwmz gj6RDa2FNkrU3Kflrc7uUEOTa82fcSfquZ++jK/siMkmwQkLT8S28vP+HVamwo4A1iLo M3A0s5ooGwAYJ3BAx/QfTkKOOMTZiZ1Jcp86QKVD+FfvPLu+muflepKPghOtj7I24iJ3 vr7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id u71-20020a63854a000000b0053fb354c191si2639534pgd.861.2023.09.21.18.06.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 18:06:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id A106284DB7B8; Thu, 21 Sep 2023 16:01:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230133AbjIUXAs (ORCPT + 99 others); Thu, 21 Sep 2023 19:00:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230198AbjIUXAg (ORCPT ); Thu, 21 Sep 2023 19:00:36 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3217E8C63B; Thu, 21 Sep 2023 10:42:37 -0700 (PDT) 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 613451FB; Wed, 20 Sep 2023 20:37:17 -0700 (PDT) Received: from a077893.arm.com (unknown [10.163.32.120]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 730A73F59C; Wed, 20 Sep 2023 20:36:36 -0700 (PDT) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org, suzuki.poulose@arm.com Cc: Anshuman Khandual , Catalin Marinas , Will Deacon , Mike Leach , James Clark , Leo Yan , Jonathan Corbet , linux-doc@vger.kernel.org, coresight@lists.linaro.org, linux-kernel@vger.kernel.org Subject: [PATCH V7 0/3] coresight: etm: Make cycle count threshold user configurable Date: Thu, 21 Sep 2023 09:06:28 +0530 Message-Id: <20230921033631.1298723-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 21 Sep 2023 16:01:04 -0700 (PDT) This series makes ETM TRCCCCTRL based 'cc_threshold' user configurable via the perf event attribute. But first, this implements an errata work around affecting ETM TRCIDR3.CCITMIN value on certain cpus, overriding the field. This series applies on coresight/for-next/queue. Cc: Catalin Marinas Cc: Will Deacon Cc: Suzuki K Poulose Cc: Mike Leach Cc: James Clark Cc: Leo Yan Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Changes in V7: - Changed commit message for the second patch adding cc_threshold Changes in V6: https://lore.kernel.org/all/20230920095443.1126617-1-anshuman.khandual@arm.com/ - Renamed etm4_core_reads_wrong_ccitmin() as etm4_fixup_wrong_ccitmin() - Moved drvdata->ccitmin fixup inside etm4_fixup_wrong_ccitmin() Changes in V5: https://lore.kernel.org/all/20230821045216.641499-1-anshuman.khandual@arm.com/ https://lore.kernel.org/all/20230915093649.435163-1-anshuman.khandual@arm.com/ - Replaced 'where as' with single word 'whereas' - Reworked 'cc_threshold' fallback to ETM_CYC_THRESHOLD_DEFAULT Changes in V4: https://lore.kernel.org/all/20230818112051.594986-1-anshuman.khandual@arm.com/ - Fixed a typo s/rangess/ranges, - Renamed etm4_work_around_wrong_ccitmin() as etm4_core_reads_wrong_ccitmin() - Moved drvdata->ccitmin value check for 256 inside etm4_core_reads_wrong_ccitmin() - Moved the comment inside etm4_core_reads_wrong_ccitmin() Changes in V3: https://lore.kernel.org/all/20230811034600.944386-1-anshuman.khandual@arm.com/ - Added errata work around affecting TRCIDR3.CCITMIN - Split the document update into a separate patch Changes in V2: https://lore.kernel.org/all/20230808074533.380537-1-anshuman.khandual@arm.com/ - s/treshhold/threshold Changes in V1: https://lore.kernel.org/all/20230804044720.1478900-1-anshuman.khandual@arm.com/ Anshuman Khandual (3): coresight: etm: Override TRCIDR3.CCITMIN on errata affected cpus coresight: etm: Make cycle count threshold user configurable Documentation: coresight: Add cc_threshold tunable Documentation/arch/arm64/silicon-errata.rst | 10 ++++ Documentation/trace/coresight/coresight.rst | 4 ++ .../hwtracing/coresight/coresight-etm-perf.c | 2 + .../coresight/coresight-etm4x-core.c | 46 ++++++++++++++++++- 4 files changed, 60 insertions(+), 2 deletions(-) -- 2.25.1