From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2FA2530C63B for ; Tue, 17 Mar 2026 18:17:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773771433; cv=none; b=XebxovhYLbk7lIs0YLZfqPUb8BQfRghXaudYcbMHBBlNjbSw0vVSUzjO6UmtryETpjgXz76HNmWVtKzZ3UWED3HCfQY/SGeOeZTx9gbSVla/smMrXWRgxGpo1d6gByZtRFvVgxFiEhspJK6gkXKhwmVBP4Q/UeJ2KbzEQCfIYfQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773771433; c=relaxed/simple; bh=nEap4tK1QyieCfPg7edhSHhMbua5SiDGUfFWoPSBsxA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=QQNpk32G3e4pfED5wxrPiwpcpgBfAdcVN7QssExguf1sEfeSausmZ15+Zzhle72teAXlJwRrYGusnVhUNC3K194l0Vz/fPj2lNWf8he188mgitgykw39e8SxHdEqRzPQrRlEAyALgWsUI3xEH9bCrPaKYBzoyr74vV2lcgKjj/8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 352BB1477; Tue, 17 Mar 2026 11:17:04 -0700 (PDT) Received: from e129823.cambridge.arm.com (e129823.arm.com [10.1.197.6]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2414C3F7BD; Tue, 17 Mar 2026 11:17:09 -0700 (PDT) From: Yeoreum Yun To: coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: suzuki.poulose@arm.com, mike.leach@linaro.org, james.clark@linaro.org, alexander.shishkin@linux.intel.com, leo.yan@arm.com, Yeoreum Yun Subject: [PATCH 0/2] fix inconsistencies with sysfs configuration in etm Date: Tue, 17 Mar 2026 18:17:03 +0000 Message-Id: <20260317181705.2456271-1-yeoreum.yun@arm.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The current ETMx configuration via sysfs can lead to the following inconsistencies: - If a configuration is modified via sysfs while a perf session is active, the running configuration may differ between before a sched-out and after a subsequent sched-in. - Once a perf session is enabled, some read-only register fields (e.g., TRCSSCSR) may not be reported correctly, because drvdata->config is cleared while enabling with perf mode, even though the information was previously read. To resolve these inconsistencies, the configuration should be separated into: - active_config, which represents the currently applied configuration - config, which stores the settings configured via sysfs. This patch based on v7.0-rc4 Yeoreum Yun (2): coresight: etm4x: fix inconsistencies with sysfs configration coresight: etm3x: fix inconsistencies with sysfs configration drivers/hwtracing/coresight/coresight-etm.h | 2 + .../coresight/coresight-etm3x-core.c | 11 +++-- .../hwtracing/coresight/coresight-etm4x-cfg.c | 2 +- .../coresight/coresight-etm4x-core.c | 45 +++++++++++-------- drivers/hwtracing/coresight/coresight-etm4x.h | 2 + 5 files changed, 39 insertions(+), 23 deletions(-) -- LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}