/*
* Common Event Record Format
- * CXL 3.0 section 8.2.9.2.1; Table 8-42
+ * CXL 3.1 section 8.2.9.2.1; Table 8-43
*/
#define CXL_EVENT_RECORD_FLAG_PERMANENT BIT(2)
#define CXL_EVENT_RECORD_FLAG_MAINT_NEEDED BIT(3)
#define CXL_EVENT_RECORD_FLAG_PERF_DEGRADED BIT(4)
#define CXL_EVENT_RECORD_FLAG_HW_REPLACE BIT(5)
+#define CXL_EVENT_RECORD_FLAG_MAINT_OP_SUB_CLASS_VALID BIT(6)
static const struct cxl_event_flags cxl_hdr_flags[] = {
{ .bit = CXL_EVENT_RECORD_FLAG_PERMANENT, .flag = "PERMANENT_CONDITION" },
{ .bit = CXL_EVENT_RECORD_FLAG_MAINT_NEEDED, .flag = "MAINTENANCE_NEEDED" },
{ .bit = CXL_EVENT_RECORD_FLAG_PERF_DEGRADED, .flag = "PERFORMANCE_DEGRADED" },
{ .bit = CXL_EVENT_RECORD_FLAG_HW_REPLACE, .flag = "HARDWARE_REPLACEMENT_NEEDED" },
+ { .bit = CXL_EVENT_RECORD_FLAG_MAINT_OP_SUB_CLASS_VALID, .flag = "MAINT_OP_SUB_CLASS_VALID" },
};
static int handle_ras_cxl_common_hdr(struct trace_seq *s,
if (trace_seq_printf(s, "hdr_maint_op_class:%u ", hdr->hdr_maint_op_class) <= 0)
return -1;
+ if (tep_get_field_val(s, event, "hdr_maint_op_sub_class", record, &val, 1) < 0)
+ return -1;
+ hdr->hdr_maint_op_sub_class = val;
+ if (trace_seq_printf(s, "hdr_maint_op_sub_class:%u ", hdr->hdr_maint_op_sub_class) <= 0)
+ return -1;
+
return 0;
}
sqlite3_bind_text(stmt, idx++, hdr->hdr_timestamp, -1, NULL);
sqlite3_bind_int(stmt, idx++, hdr->hdr_length);
sqlite3_bind_int(stmt, idx++, hdr->hdr_maint_op_class);
+ sqlite3_bind_int(stmt, idx++, hdr->hdr_maint_op_sub_class);
return idx;
}
{ .name = "hdr_ts", .type = "TEXT" },
{ .name = "hdr_length", .type = "INTEGER" },
{ .name = "hdr_maint_op_class", .type = "INTEGER" },
+ { .name = "hdr_maint_op_sub_class", .type = "INTEGER" },
{ .name = "data", .type = "BLOB" },
};
{ .name = "hdr_ts", .type = "TEXT" },
{ .name = "hdr_length", .type = "INTEGER" },
{ .name = "hdr_maint_op_class", .type = "INTEGER" },
+ { .name = "hdr_maint_op_sub_class", .type = "INTEGER" },
{ .name = "dpa", .type = "INTEGER" },
{ .name = "dpa_flags", .type = "INTEGER" },
{ .name = "descriptor", .type = "INTEGER" },
{ .name = "hdr_ts", .type = "TEXT" },
{ .name = "hdr_length", .type = "INTEGER" },
{ .name = "hdr_maint_op_class", .type = "INTEGER" },
+ { .name = "hdr_maint_op_sub_class", .type = "INTEGER" },
{ .name = "dpa", .type = "INTEGER" },
{ .name = "dpa_flags", .type = "INTEGER" },
{ .name = "descriptor", .type = "INTEGER" },
{ .name = "hdr_ts", .type = "TEXT" },
{ .name = "hdr_length", .type = "INTEGER" },
{ .name = "hdr_maint_op_class", .type = "INTEGER" },
+ { .name = "hdr_maint_op_sub_class", .type = "INTEGER" },
{ .name = "event_type", .type = "INTEGER" },
{ .name = "health_status", .type = "INTEGER" },
{ .name = "media_status", .type = "INTEGER" },