drivers/accel/qaic/qaic_ssr.c
Source file repositories/reference/linux-study-clean/drivers/accel/qaic/qaic_ssr.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/accel/qaic/qaic_ssr.c- Extension
.c- Size
- 21473 bytes
- Lines
- 816
- 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.hdrm/drm_file.hdrm/drm_managed.hlinux/devcoredump.hlinux/device.hlinux/kernel.hlinux/mhi.hlinux/workqueue.hqaic.hqaic_ssr.h
Detected Declarations
struct debug_info_tablestruct _ssr_hdrstruct ssr_hdrstruct ssr_debug_transfer_infostruct ssr_debug_transfer_info_rspstruct ssr_memory_readstruct ssr_memory_read_rspstruct ssr_debug_transfer_donestruct ssr_debug_transfer_done_rspstruct ssr_eventstruct ssr_event_rspstruct ssr_respstruct ssr_dump_infostruct ssr_crashdumpstruct dump_file_metafunction free_ssr_dump_infofunction qaic_clean_up_ssrfunction alloc_dumpfunction send_xfer_donefunction mem_read_reqfunction ssr_copy_tablefunction ssr_copy_dumpfunction segmentfunction ssr_dump_workerfunction dbg_xfer_info_rspfunction dbg_xfer_done_rspfunction ssr_workerfunction qaic_ssr_mhi_probefunction qaic_ssr_mhi_removefunction qaic_ssr_mhi_ul_xfer_cbfunction kmallocfunction qaic_ssr_mhi_dl_xfer_cbfunction qaic_ssr_initfunction qaic_ssr_registerfunction qaic_ssr_unregister
Annotated Snippet
struct debug_info_table {
/* Save preferences. Default is mandatory */
u64 save_perf;
/* Base address of the debug region */
u64 mem_base;
/* Size of debug region in bytes */
u64 len;
/* Description */
char desc[20];
/* Filename of debug region */
char filename[20];
};
struct _ssr_hdr {
__le32 cmd;
__le32 len;
__le32 dbc_id;
};
struct ssr_hdr {
u32 cmd;
u32 len;
u32 dbc_id;
};
struct ssr_debug_transfer_info {
struct ssr_hdr hdr;
u32 resv;
u64 tbl_addr;
u64 tbl_len;
} __packed;
struct ssr_debug_transfer_info_rsp {
struct _ssr_hdr hdr;
__le32 ret;
} __packed;
struct ssr_memory_read {
struct _ssr_hdr hdr;
__le32 resv;
__le64 addr;
__le64 len;
} __packed;
struct ssr_memory_read_rsp {
struct _ssr_hdr hdr;
__le32 resv;
u8 data[];
} __packed;
struct ssr_debug_transfer_done {
struct _ssr_hdr hdr;
__le32 resv;
} __packed;
struct ssr_debug_transfer_done_rsp {
struct _ssr_hdr hdr;
__le32 ret;
} __packed;
struct ssr_event {
struct ssr_hdr hdr;
u32 event;
} __packed;
struct ssr_event_rsp {
struct _ssr_hdr hdr;
__le32 event;
} __packed;
struct ssr_resp {
/* Work struct to schedule work coming on QAIC_SSR channel */
struct work_struct work;
/* Root struct of device, used to access device resources */
struct qaic_device *qdev;
/* Buffer used by MHI for transfer requests */
u8 data[] __aligned(8);
};
/* SSR crashdump book keeping structure */
struct ssr_dump_info {
/* DBC associated with this SSR crashdump */
struct dma_bridge_chan *dbc;
/*
* It will be used when we complete the crashdump download and switch
* to waiting on SSR events
*/
struct ssr_resp *resp;
/* MEMORY READ request MHI buffer.*/
struct ssr_memory_read *read_buf_req;
Annotation
- Immediate include surface: `asm/byteorder.h`, `drm/drm_file.h`, `drm/drm_managed.h`, `linux/devcoredump.h`, `linux/device.h`, `linux/kernel.h`, `linux/mhi.h`, `linux/workqueue.h`.
- Detected declarations: `struct debug_info_table`, `struct _ssr_hdr`, `struct ssr_hdr`, `struct ssr_debug_transfer_info`, `struct ssr_debug_transfer_info_rsp`, `struct ssr_memory_read`, `struct ssr_memory_read_rsp`, `struct ssr_debug_transfer_done`, `struct ssr_debug_transfer_done_rsp`, `struct ssr_event`.
- 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.