[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v2 5/6] cxl: add definition for transaction types
From: |
Shiyang Ruan |
Subject: |
[RFC PATCH v2 5/6] cxl: add definition for transaction types |
Date: |
Fri, 29 Mar 2024 14:36:13 +0800 |
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.fnst@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
- [RFC PATCH v2 0/6] cxl: add poison event handler, Shiyang Ruan, 2024/03/29
- [RFC PATCH v2 2/6] cxl/core: introduce cxl_mem_report_poison(), Shiyang Ruan, 2024/03/29
- [RFC PATCH v2 4/6] cxl/core: report poison when injecting from debugfs, Shiyang Ruan, 2024/03/29
- [RFC PATCH v2 3/6] cxl/core: add report option for cxl_mem_get_poison(), Shiyang Ruan, 2024/03/29
- [RFC PATCH v2 1/6] cxl/core: correct length of DPA field masks, Shiyang Ruan, 2024/03/29
- [RFC PATCH v2 5/6] cxl: add definition for transaction types,
Shiyang Ruan <=
- [RFC PATCH v2 6/6] cxl/core: add poison injection event handler, Shiyang Ruan, 2024/03/29
- Re: [RFC PATCH v2 0/6] cxl: add poison event handler, Alison Schofield, 2024/03/29