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.
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
asm/byteorder.hlinux/device.hlinux/kernel.hlinux/mhi.hqaic.hqaic_ras.h
Detected Declarations
struct ras_datastruct soc_mem_syndromestruct nsp_mem_syndromestruct ddr_syndromestruct tsens_syndromestruct sysbus1_syndromestruct sysbus2_syndromestruct pcie_syndromeenum msg_typeenum err_typeenum err_sourcefunction ras_msg_to_cpufunction decode_ras_msgfunction ce_count_showfunction ue_count_showfunction ue_nonfatal_count_showfunction qaic_ras_mhi_probefunction qaic_ras_mhi_removefunction qaic_ras_mhi_ul_xfer_cbfunction qaic_ras_registerfunction qaic_ras_unregister
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
- Immediate include surface: `asm/byteorder.h`, `linux/device.h`, `linux/kernel.h`, `linux/mhi.h`, `qaic.h`, `qaic_ras.h`.
- Detected declarations: `struct ras_data`, `struct soc_mem_syndrome`, `struct nsp_mem_syndrome`, `struct ddr_syndrome`, `struct tsens_syndrome`, `struct sysbus1_syndrome`, `struct sysbus2_syndrome`, `struct pcie_syndrome`, `enum msg_type`, `enum err_type`.
- Atlas domain: Driver Families / drivers/accel.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.