Thread (27 messages) 27 messages, 3 authors, 2025-12-04

Re: [PATCH 4/7] perf cs-etm: Don't use hard coded config bits when setting up ETMCR

From: Leo Yan <leo.yan@arm.com>
Date: 2025-12-02 11:43:03
Also in: linux-perf-users, lkml

On Mon, Dec 01, 2025 at 04:41:07PM +0000, Coresight ML wrote:

[...]
quoted hunk ↗ jump to hunk
@@ -746,7 +779,7 @@ static void cs_etm_get_metadata(struct perf_cpu cpu, u32 *offset,
 	case CS_ETMV3:
 		magic = __perf_cs_etmv3_magic;
 		/* Get configuration register */
-		info->priv[*offset + CS_ETM_ETMCR] = cs_etm_get_config(itr);
+		info->priv[*offset + CS_ETM_ETMCR] = cs_etm_guess_etmcr(itr);
I still think cs_etm_get_config() is better than cs_etm_guess_etmcr().

For ETMv3, we directly pass CONFIG to the kernel, and after validation
in the dirver, then the value will be set to ETMCR.  If we already know
the config value is consistent between user space and kernel, why
introduce a redundant "guess" operation here?

Thanks,
Leo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help