|
48 | 48 | { CXL_RAS_UC_IDE_RX_ERR, "IDE Rx Error" } \
|
49 | 49 | )
|
50 | 50 |
|
| 51 | +TRACE_EVENT(cxl_port_aer_uncorrectable_error, |
| 52 | + TP_PROTO(struct device *dev, u32 status, u32 fe, u32 *hl), |
| 53 | + TP_ARGS(dev, status, fe, hl), |
| 54 | + TP_STRUCT__entry( |
| 55 | + __string(device, dev_name(dev)) |
| 56 | + __string(host, dev_name(dev->parent)) |
| 57 | + __field(u32, status) |
| 58 | + __field(u32, first_error) |
| 59 | + __array(u32, header_log, CXL_HEADERLOG_SIZE_U32) |
| 60 | + ), |
| 61 | + TP_fast_assign( |
| 62 | + __assign_str(device); |
| 63 | + __assign_str(host); |
| 64 | + __entry->status = status; |
| 65 | + __entry->first_error = fe; |
| 66 | + /* |
| 67 | + * Embed the 512B headerlog data for user app retrieval and |
| 68 | + * parsing, but no need to print this in the trace buffer. |
| 69 | + */ |
| 70 | + memcpy(__entry->header_log, hl, CXL_HEADERLOG_SIZE); |
| 71 | + ), |
| 72 | + TP_printk("device=%s host=%s status: '%s' first_error: '%s'", |
| 73 | + __get_str(device), __get_str(host), |
| 74 | + show_uc_errs(__entry->status), |
| 75 | + show_uc_errs(__entry->first_error) |
| 76 | + ) |
| 77 | +); |
| 78 | + |
51 | 79 | TRACE_EVENT(cxl_aer_uncorrectable_error,
|
52 | 80 | TP_PROTO(const struct cxl_memdev *cxlmd, u32 status, u32 fe, u32 *hl),
|
53 | 81 | TP_ARGS(cxlmd, status, fe, hl),
|
@@ -96,6 +124,25 @@ TRACE_EVENT(cxl_aer_uncorrectable_error,
|
96 | 124 | { CXL_RAS_CE_PHYS_LAYER_ERR, "Received Error From Physical Layer" } \
|
97 | 125 | )
|
98 | 126 |
|
| 127 | +TRACE_EVENT(cxl_port_aer_correctable_error, |
| 128 | + TP_PROTO(struct device *dev, u32 status), |
| 129 | + TP_ARGS(dev, status), |
| 130 | + TP_STRUCT__entry( |
| 131 | + __string(device, dev_name(dev)) |
| 132 | + __string(host, dev_name(dev->parent)) |
| 133 | + __field(u32, status) |
| 134 | + ), |
| 135 | + TP_fast_assign( |
| 136 | + __assign_str(device); |
| 137 | + __assign_str(host); |
| 138 | + __entry->status = status; |
| 139 | + ), |
| 140 | + TP_printk("device=%s host=%s status='%s'", |
| 141 | + __get_str(device), __get_str(host), |
| 142 | + show_ce_errs(__entry->status) |
| 143 | + ) |
| 144 | +); |
| 145 | + |
99 | 146 | TRACE_EVENT(cxl_aer_correctable_error,
|
100 | 147 | TP_PROTO(const struct cxl_memdev *cxlmd, u32 status),
|
101 | 148 | TP_ARGS(cxlmd, status),
|
|
0 commit comments