drivers/misc/sgi-gru/grulib.h
Source file repositories/reference/linux-study-clean/drivers/misc/sgi-gru/grulib.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/misc/sgi-gru/grulib.h- Extension
.h- Size
- 4008 bytes
- Lines
- 154
- Domain
- Driver Families
- Bucket
- drivers/misc
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct gru_get_gseg_statistics_reqstruct gru_create_context_reqstruct gru_unload_context_reqstruct gru_set_context_option_reqstruct gru_flush_tlb_reqstruct gru_dump_chiplet_state_reqstruct gru_dump_context_headerstruct gru_config_info
Annotated Snippet
struct gru_get_gseg_statistics_req {
unsigned long gseg;
struct gru_gseg_statistics stats;
};
/*
* Structure used to pass TLB flush parameters to the driver
*/
struct gru_create_context_req {
unsigned long gseg;
unsigned int data_segment_bytes;
unsigned int control_blocks;
unsigned int maximum_thread_count;
unsigned int options;
unsigned char tlb_preload_count;
};
/*
* Structure used to pass unload context parameters to the driver
*/
struct gru_unload_context_req {
unsigned long gseg;
};
/*
* Structure used to set context options
*/
enum {sco_gseg_owner, sco_cch_req_slice, sco_blade_chiplet};
struct gru_set_context_option_req {
unsigned long gseg;
int op;
int val0;
long val1;
};
/*
* Structure used to pass TLB flush parameters to the driver
*/
struct gru_flush_tlb_req {
unsigned long gseg;
unsigned long vaddr;
size_t len;
};
/*
* Structure used to pass TLB flush parameters to the driver
*/
enum {dcs_pid, dcs_gid};
struct gru_dump_chiplet_state_req {
unsigned int op;
unsigned int gid;
int ctxnum;
char data_opt;
char lock_cch;
char flush_cbrs;
char fill[10];
pid_t pid;
void *buf;
size_t buflen;
/* ---- output --- */
unsigned int num_contexts;
};
#define GRU_DUMP_MAGIC 0x3474ab6c
struct gru_dump_context_header {
unsigned int magic;
unsigned int gid;
unsigned char ctxnum;
unsigned char cbrcnt;
unsigned char dsrcnt;
pid_t pid;
unsigned long vaddr;
int cch_locked;
unsigned long data[];
};
/*
* GRU configuration info (temp - for testing)
*/
struct gru_config_info {
int cpus;
int blades;
int nodes;
int chiplets;
int fill[16];
};
#endif /* __GRULIB_H__ */
Annotation
- Detected declarations: `struct gru_get_gseg_statistics_req`, `struct gru_create_context_req`, `struct gru_unload_context_req`, `struct gru_set_context_option_req`, `struct gru_flush_tlb_req`, `struct gru_dump_chiplet_state_req`, `struct gru_dump_context_header`, `struct gru_config_info`.
- Atlas domain: Driver Families / drivers/misc.
- 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.