Re: [PATCH v5 3/6] cxl/events: Update General Media Event Record to CXL spec rev 3.1

Ira Weiny
2025-01-10T18:31:24Z

shiju.jose@ wrote:
> From: Shiju Jose <shiju.jose@huawei.com>
>

[snip]

>
> TRACE_EVENT(cxl_general_media,
> @@ -353,6 +402,7 @@ TRACE_EVENT(cxl_general_media,
> __field(u64, dpa)
> __field(u8, descriptor)
> __field(u8, type)
> + __field(u8, sub_type)
> __field(u8, transaction_type)
> __field(u8, channel)
> __field(u32, device)
> @@ -364,6 +414,8 @@ TRACE_EVENT(cxl_general_media,
> __field(u8, rank)
> __field(u8, dpa_flags)
> __string(region_name, cxlr ? dev_name(&cxlr->dev) : "")
> + __field(u8, cme_threshold_ev_flags)
> + __field(u32, cme_count)
> ),
>

Reorder these as well to pack the record.

Ira

diff --git a/drivers/cxl/core/trace.h b/drivers/cxl/core/trace.h
index 241c10596f4d..39e83b8543f3 100644
--- a/drivers/cxl/core/trace.h
+++ b/drivers/cxl/core/trace.h
@@ -402,7 +402,6 @@ TRACE_EVENT(cxl_general_media,
__field(u64, dpa)
__field(u8, descriptor)
__field(u8, type)
- __field(u8, sub_type)
__field(u8, transaction_type)
__field(u8, channel)
__field(u32, device)
@@ -413,9 +412,10 @@ TRACE_EVENT(cxl_general_media,
__field(u16, validity_flags)
__field(u8, rank)
__field(u8, dpa_flags)
- __string(region_name, cxlr ? dev_name(&cxlr->dev) : "")
- __field(u8, cme_threshold_ev_flags)
__field(u32, cme_count)
+ __field(u8, sub_type)
+ __field(u8, cme_threshold_ev_flags)
+ __string(region_name, cxlr ? dev_name(&cxlr->dev) : "")
),

TP_fast_assign(