include/ras/ras_event.h

Source file repositories/reference/linux-study-clean/include/ras/ras_event.h

File Facts

System
Linux kernel
Corpus path
include/ras/ras_event.h
Extension
.h
Size
11341 bytes
Lines
388
Domain
Repository Root And Misc
Bucket
include
Inferred role
Repository Root And Misc: implementation source
Status
source implementation candidate

Why This File Exists

Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.

Dependency Surface

Detected Declarations

Annotated Snippet

if (proc->validation_bits & CPER_ARM_VALID_RUNNING_STATE) {
			__entry->running_state = proc->running_state;
			__entry->psci_state = proc->psci_state;
		} else {
			__entry->running_state = ~0;
			__entry->psci_state = ~0;
		}
		__entry->pei_len = pei_len;
		memcpy(__get_dynamic_array(pei_buf), pei_err, pei_len);
		__entry->ctx_len = ctx_len;
		memcpy(__get_dynamic_array(ctx_buf), ctx_err, ctx_len);
		__entry->oem_len = oem_len;
		memcpy(__get_dynamic_array(oem_buf), oem, oem_len);
		__entry->sev = sev;
		__entry->cpu = cpu;
	),

	TP_printk("cpu: %d; error: %d; affinity level: %d; MPIDR: %016llx; MIDR: %016llx; "
		  "running state: %d; PSCI state: %d; "
		  "%s: %d; %s: %s; %s: %d; %s: %s; %s: %d; %s: %s",
		  __entry->cpu,
		  __entry->sev,
		  __entry->affinity, __entry->mpidr, __entry->midr,
		  __entry->running_state, __entry->psci_state,
		  APEIL, __entry->pei_len, APEID,
		  __print_hex(__get_dynamic_array(pei_buf), __entry->pei_len),
		  APECIL, __entry->ctx_len, APECID,
		  __print_hex(__get_dynamic_array(ctx_buf), __entry->ctx_len),
		  VSEIL, __entry->oem_len, VSEID,
		  __print_hex(__get_dynamic_array(oem_buf), __entry->oem_len))
);

/*
 * Non-Standard Section Report
 *
 * This event is generated when hardware detected a hardware
 * error event, which may be of non-standard section as defined
 * in UEFI spec appendix "Common Platform Error Record", or may
 * be of sections for which TRACE_EVENT is not defined.
 *
 */
TRACE_EVENT(non_standard_event,

	TP_PROTO(const guid_t *sec_type,
		 const guid_t *fru_id,
		 const char *fru_text,
		 const u8 sev,
		 const u8 *err,
		 const u32 len),

	TP_ARGS(sec_type, fru_id, fru_text, sev, err, len),

	TP_STRUCT__entry(
		__array(char, sec_type, UUID_SIZE)
		__array(char, fru_id, UUID_SIZE)
		__string(fru_text, fru_text)
		__field(u8, sev)
		__field(u32, len)
		__dynamic_array(u8, buf, len)
	),

	TP_fast_assign(
		memcpy(__entry->sec_type, sec_type, UUID_SIZE);
		memcpy(__entry->fru_id, fru_id, UUID_SIZE);
		__assign_str(fru_text);
		__entry->sev = sev;
		__entry->len = len;
		memcpy(__get_dynamic_array(buf), err, len);
	),

	TP_printk("severity: %d; sec type:%pU; FRU: %pU %s; data len:%d; raw data:%s",
		  __entry->sev, __entry->sec_type,
		  __entry->fru_id, __get_str(fru_text),
		  __entry->len,
		  __print_hex(__get_dynamic_array(buf), __entry->len))
);

#ifdef CONFIG_PCIEAER
/*
 * PCIe AER Trace event
 *
 * These events are generated when hardware detects a corrected or
 * uncorrected event on a PCIe device. The event report has
 * the following structure:
 *
 * char * dev_name -	The name of the slot where the device resides
 *			([domain:]bus:device.function).
 * u32 status -		Either the correctable or uncorrectable register
 *			indicating what error or errors have been seen
 * u8 severity -	error severity 0:NONFATAL 1:FATAL 2:CORRECTED

Annotation

Implementation Notes