drivers/accel/qaic/qaic_ras.c

Source file repositories/reference/linux-study-clean/drivers/accel/qaic/qaic_ras.c

File Facts

System
Linux kernel
Corpus path
drivers/accel/qaic/qaic_ras.c
Extension
.c
Size
18668 bytes
Lines
642
Domain
Driver Families
Bucket
drivers/accel
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct ras_data {
	/* header start */
	/* Magic number to validate the message */
	u16 magic;
	/* RAS version number */
	u16 ver;
	u32 seq_num;
	/* RAS message type */
	u8  type;
	u8  id;
	/* Size of RAS message without the header in byte */
	u16 len;
	/* header end */
	s32 result;
	/*
	 * Error source
	 * 0 : SoC Memory
	 * 1 : PCIE
	 * 2 : DDR
	 * 3 : System Bus source 1
	 * 4 : System Bus source 2
	 * 5 : NSP Memory
	 * 6 : Temperature Sensors
	 */
	u32 source;
	/*
	 * Stores the error type, there are three types of error in RAS
	 * 0 : correctable error (CE)
	 * 1 : uncorrectable error (UE)
	 * 2 : uncorrectable error that is non-fatal (UE_NF)
	 */
	u32 err_type;
	u32 err_threshold;
	u32 ce_count;
	u32 ue_count;
	u32 intr_num;
	/* Data specific to error source */
	u8  syndrome[64];
} __packed;

struct soc_mem_syndrome {
	u64 error_address[8];
} __packed;

struct nsp_mem_syndrome {
	u32 error_address[8];
	u8 nsp_id;
} __packed;

struct ddr_syndrome {
	u32 count;
	u32 irq_status;
	u32 data_31_0[2];
	u32 data_63_32[2];
	u32 data_95_64[2];
	u32 data_127_96[2];
	u32 addr_lsb;
	u16 addr_msb;
	u16 parity_bits;
	u16 instance;
	u16 err_type;
} __packed;

struct tsens_syndrome {
	u32 threshold_type;
	s32 temp;
} __packed;

struct sysbus1_syndrome {
	u32 slave;
	u32 err_type;
	u16 addr[8];
	u8  instance;
} __packed;

struct sysbus2_syndrome {
	u32 lsb3;
	u32 msb3;
	u32 lsb2;
	u32 msb2;
	u32 ext_id;
	u16 path;
	u16 op_type;
	u16 len;
	u16 redirect;
	u8  valid;
	u8  word_error;
	u8  non_secure;
	u8  opc;
	u8  error_code;

Annotation

Implementation Notes