The transaction types are defined in General Media Event Record/DRAM Event per CXL rev 3.0 Section 8.2.9.2.1.1; Table 8-43 and Section 8.2.9.2.1.2; Table 8-44. Add them for Event Record handler use.
Signed-off-by: Shiyang Ruan <ruansy.f...@fujitsu.com> --- include/linux/cxl-event.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/include/linux/cxl-event.h b/include/linux/cxl-event.h index 03fa6d50d46f..0a50754fc330 100644 --- a/include/linux/cxl-event.h +++ b/include/linux/cxl-event.h @@ -23,6 +23,19 @@ struct cxl_event_generic { u8 data[CXL_EVENT_RECORD_DATA_LENGTH]; } __packed; +/* + * CXL rev 3.0 Section 8.2.9.2.1.1; Table 8-43 + */ +enum cxl_event_transaction_type { + CXL_EVENT_TRANSACTION_UNKNOWN = 0X00, + CXL_EVENT_TRANSACTION_READ, + CXL_EVENT_TRANSACTION_WRITE, + CXL_EVENT_TRANSACTION_SCAN_MEDIA, + CXL_EVENT_TRANSACTION_INJECT_POISON, + CXL_EVENT_TRANSACTION_MEDIA_SCRUB, + CXL_EVENT_TRANSACTION_MEDIA_MANAGEMENT, +}; + /* * General Media Event Record * CXL rev 3.0 Section 8.2.9.2.1.1; Table 8-43 @@ -33,7 +46,7 @@ struct cxl_event_gen_media { __le64 phys_addr; u8 descriptor; u8 type; - u8 transaction_type; + u8 transaction_type; /* enum cxl_event_transaction_type */ u8 validity_flags[2]; u8 channel; u8 rank; @@ -52,7 +65,7 @@ struct cxl_event_dram { __le64 phys_addr; u8 descriptor; u8 type; - u8 transaction_type; + u8 transaction_type; /* enum cxl_event_transaction_type */ u8 validity_flags[2]; u8 channel; u8 rank; -- 2.34.1