linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] perf/cxlpmu: Support missing events in 3.1 spec
@ 2024-10-10  2:52 Davidlohr Bueso
  2024-10-11 14:35 ` Ira Weiny
  2024-10-24 12:25 ` Will Deacon
  0 siblings, 2 replies; 5+ messages in thread
From: Davidlohr Bueso @ 2024-10-10  2:52 UTC (permalink / raw)
  To: jonathan.cameron, will, mark.rutland
  Cc: dave.jiang, alison.schofield, dan.j.williams, ira.weiny, fan.ni,
	a.manzanares, linux-cxl, linux-arm-kernel, dave, Jonathan Cameron

Update the CXL PMU driver to support the new events introduced
in the latest revision. These are:

- read/write accesses with TEE constraints.
- S2M indicating Modified state.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
---
 drivers/perf/cxl_pmu.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/perf/cxl_pmu.c b/drivers/perf/cxl_pmu.c
index 43d68b69e630..bee4b5b52ec6 100644
--- a/drivers/perf/cxl_pmu.c
+++ b/drivers/perf/cxl_pmu.c
@@ -354,7 +354,7 @@ static struct attribute *cxl_pmu_event_attrs[] = {
 	CXL_PMU_EVENT_CXL_ATTR(d2h_req_wowrinvf,		CXL_PMU_GID_D2H_REQ, BIT(13)),
 	CXL_PMU_EVENT_CXL_ATTR(d2h_req_wrinv,			CXL_PMU_GID_D2H_REQ, BIT(14)),
 	CXL_PMU_EVENT_CXL_ATTR(d2h_req_cacheflushed,		CXL_PMU_GID_D2H_REQ, BIT(16)),
-	/* CXL rev 3.0 Table 3-20 - D2H Repsonse Encodings */
+	/* CXL rev 3.0 Table 3-20 - D2H Response Encodings */
 	CXL_PMU_EVENT_CXL_ATTR(d2h_rsp_rspihiti,		CXL_PMU_GID_D2H_RSP, BIT(4)),
 	CXL_PMU_EVENT_CXL_ATTR(d2h_rsp_rspvhitv,		CXL_PMU_GID_D2H_RSP, BIT(6)),
 	CXL_PMU_EVENT_CXL_ATTR(d2h_rsp_rspihitse,		CXL_PMU_GID_D2H_RSP, BIT(5)),
@@ -377,12 +377,14 @@ static struct attribute *cxl_pmu_event_attrs[] = {
 	/* CXL rev 3.0 Table 13-5 directly lists these */
 	CXL_PMU_EVENT_CXL_ATTR(cachedata_d2h_data,		CXL_PMU_GID_CACHE_DATA, BIT(0)),
 	CXL_PMU_EVENT_CXL_ATTR(cachedata_h2d_data,		CXL_PMU_GID_CACHE_DATA, BIT(1)),
-	/* CXL rev 3.0 Table 3-29 M2S Req Memory Opcodes */
+	/* CXL rev 3.1 Table 3-35 M2S Req Memory Opcodes */
 	CXL_PMU_EVENT_CXL_ATTR(m2s_req_meminv,			CXL_PMU_GID_M2S_REQ, BIT(0)),
 	CXL_PMU_EVENT_CXL_ATTR(m2s_req_memrd,			CXL_PMU_GID_M2S_REQ, BIT(1)),
 	CXL_PMU_EVENT_CXL_ATTR(m2s_req_memrddata,		CXL_PMU_GID_M2S_REQ, BIT(2)),
 	CXL_PMU_EVENT_CXL_ATTR(m2s_req_memrdfwd,		CXL_PMU_GID_M2S_REQ, BIT(3)),
 	CXL_PMU_EVENT_CXL_ATTR(m2s_req_memwrfwd,		CXL_PMU_GID_M2S_REQ, BIT(4)),
+	CXL_PMU_EVENT_CXL_ATTR(m2s_req_memrdtee,		CXL_PMU_GID_M2S_REQ, BIT(5)),
+	CXL_PMU_EVENT_CXL_ATTR(m2s_req_memrddatatee,		CXL_PMU_GID_M2S_REQ, BIT(6)),
 	CXL_PMU_EVENT_CXL_ATTR(m2s_req_memspecrd,		CXL_PMU_GID_M2S_REQ, BIT(8)),
 	CXL_PMU_EVENT_CXL_ATTR(m2s_req_meminvnt,		CXL_PMU_GID_M2S_REQ, BIT(9)),
 	CXL_PMU_EVENT_CXL_ATTR(m2s_req_memcleanevict,		CXL_PMU_GID_M2S_REQ, BIT(10)),
@@ -404,10 +406,11 @@ static struct attribute *cxl_pmu_event_attrs[] = {
 	CXL_PMU_EVENT_CXL_ATTR(s2m_bisnp_curblk,		CXL_PMU_GID_S2M_BISNP, BIT(4)),
 	CXL_PMU_EVENT_CXL_ATTR(s2m_bisnp_datblk,		CXL_PMU_GID_S2M_BISNP, BIT(5)),
 	CXL_PMU_EVENT_CXL_ATTR(s2m_bisnp_invblk,		CXL_PMU_GID_S2M_BISNP, BIT(6)),
-	/* CXL rev 3.0 Table 3-43 S2M NDR Opcopdes */
+	/* CXL rev 3.1 Table 3-50 S2M NDR Opcopdes */
 	CXL_PMU_EVENT_CXL_ATTR(s2m_ndr_cmp,			CXL_PMU_GID_S2M_NDR, BIT(0)),
 	CXL_PMU_EVENT_CXL_ATTR(s2m_ndr_cmps,			CXL_PMU_GID_S2M_NDR, BIT(1)),
 	CXL_PMU_EVENT_CXL_ATTR(s2m_ndr_cmpe,			CXL_PMU_GID_S2M_NDR, BIT(2)),
+	CXL_PMU_EVENT_CXL_ATTR(s2m_ndr_cmpm,			CXL_PMU_GID_S2M_NDR, BIT(3)),
 	CXL_PMU_EVENT_CXL_ATTR(s2m_ndr_biconflictack,		CXL_PMU_GID_S2M_NDR, BIT(4)),
 	/* CXL rev 3.0 Table 3-46 S2M DRS opcodes */
 	CXL_PMU_EVENT_CXL_ATTR(s2m_drs_memdata,			CXL_PMU_GID_S2M_DRS, BIT(0)),
-- 
2.46.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] perf/cxlpmu: Support missing events in 3.1 spec
  2024-10-10  2:52 [PATCH v3] perf/cxlpmu: Support missing events in 3.1 spec Davidlohr Bueso
@ 2024-10-11 14:35 ` Ira Weiny
  2024-10-14 14:15   ` Will Deacon
  2024-10-24 12:25 ` Will Deacon
  1 sibling, 1 reply; 5+ messages in thread
From: Ira Weiny @ 2024-10-11 14:35 UTC (permalink / raw)
  To: Davidlohr Bueso, jonathan.cameron, will, mark.rutland
  Cc: dave.jiang, alison.schofield, dan.j.williams, ira.weiny, fan.ni,
	a.manzanares, linux-cxl, linux-arm-kernel, dave, Jonathan Cameron

Davidlohr Bueso wrote:
> Update the CXL PMU driver to support the new events introduced
> in the latest revision. These are:
> 
> - read/write accesses with TEE constraints.
> - S2M indicating Modified state.
> 
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Just to be sure: Jonathan you are taking this through CPMU correct?

Ira


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] perf/cxlpmu: Support missing events in 3.1 spec
  2024-10-11 14:35 ` Ira Weiny
@ 2024-10-14 14:15   ` Will Deacon
  2024-10-15 16:55     ` Jonathan Cameron
  0 siblings, 1 reply; 5+ messages in thread
From: Will Deacon @ 2024-10-14 14:15 UTC (permalink / raw)
  To: Ira Weiny
  Cc: Davidlohr Bueso, jonathan.cameron, mark.rutland, dave.jiang,
	alison.schofield, dan.j.williams, fan.ni, a.manzanares, linux-cxl,
	linux-arm-kernel

On Fri, Oct 11, 2024 at 09:35:58AM -0500, Ira Weiny wrote:
> Davidlohr Bueso wrote:
> > Update the CXL PMU driver to support the new events introduced
> > in the latest revision. These are:
> > 
> > - read/write accesses with TEE constraints.
> > - S2M indicating Modified state.
> > 
> > Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Just to be sure: Jonathan you are taking this through CPMU correct?

I was about to pick it up via the perf tree, so I'll hold fire until we
hear back from Jonathan.

Will


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] perf/cxlpmu: Support missing events in 3.1 spec
  2024-10-14 14:15   ` Will Deacon
@ 2024-10-15 16:55     ` Jonathan Cameron
  0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Cameron @ 2024-10-15 16:55 UTC (permalink / raw)
  To: Will Deacon
  Cc: Ira Weiny, Davidlohr Bueso, mark.rutland, dave.jiang,
	alison.schofield, dan.j.williams, fan.ni, a.manzanares, linux-cxl,
	linux-arm-kernel

On Mon, 14 Oct 2024 15:15:52 +0100
Will Deacon <will@kernel.org> wrote:

> On Fri, Oct 11, 2024 at 09:35:58AM -0500, Ira Weiny wrote:
> > Davidlohr Bueso wrote:  
> > > Update the CXL PMU driver to support the new events introduced
> > > in the latest revision. These are:
> > > 
> > > - read/write accesses with TEE constraints.
> > > - S2M indicating Modified state.
> > > 
> > > Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>  
> > 
> > Just to be sure: Jonathan you are taking this through CPMU correct?  
> 
> I was about to pick it up via the perf tree, so I'll hold fire until we
> hear back from Jonathan.
> 
> Will
> 

Hi Will,

Please pick it up via the perf tree. That driver isn't big enough to warrant
separate handling and this stuff won't impact the CXL tree.

Thanks,

Jonathan


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] perf/cxlpmu: Support missing events in 3.1 spec
  2024-10-10  2:52 [PATCH v3] perf/cxlpmu: Support missing events in 3.1 spec Davidlohr Bueso
  2024-10-11 14:35 ` Ira Weiny
@ 2024-10-24 12:25 ` Will Deacon
  1 sibling, 0 replies; 5+ messages in thread
From: Will Deacon @ 2024-10-24 12:25 UTC (permalink / raw)
  To: jonathan.cameron, mark.rutland, Davidlohr Bueso
  Cc: catalin.marinas, kernel-team, Will Deacon, dave.jiang,
	alison.schofield, dan.j.williams, ira.weiny, fan.ni, a.manzanares,
	linux-cxl, linux-arm-kernel, Jonathan Cameron

On Wed, 09 Oct 2024 19:52:08 -0700, Davidlohr Bueso wrote:
> Update the CXL PMU driver to support the new events introduced
> in the latest revision. These are:
> 
> - read/write accesses with TEE constraints.
> - S2M indicating Modified state.
> 
> 
> [...]

Applied to will (for-next/perf), thanks!

[1/1] perf/cxlpmu: Support missing events in 3.1 spec
      https://git.kernel.org/will/c/48545b3eff6b

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-10-24 12:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-10  2:52 [PATCH v3] perf/cxlpmu: Support missing events in 3.1 spec Davidlohr Bueso
2024-10-11 14:35 ` Ira Weiny
2024-10-14 14:15   ` Will Deacon
2024-10-15 16:55     ` Jonathan Cameron
2024-10-24 12:25 ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).