drivers/misc/sgi-gru/grutables.h
Source file repositories/reference/linux-study-clean/drivers/misc/sgi-gru/grutables.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/misc/sgi-gru/grutables.h- Extension
.h- Size
- 22543 bytes
- Lines
- 660
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/refcount.hlinux/rmap.hlinux/interrupt.hlinux/mutex.hlinux/wait.hlinux/mmu_notifier.hlinux/mm_types.hgru.hgrulib.hgruhandles.h
Detected Declarations
struct gru_stats_sstruct mcs_op_statisticstruct gru_statestruct gru_mm_trackerstruct gru_mm_structstruct gru_vma_datastruct gru_thread_statestruct gru_statestruct gru_blade_statestruct gru_unload_context_reqenum mcs_opfunction __trylock_handlefunction __lock_handlefunction __unlock_handlefunction trylock_cch_handlefunction lock_cch_handlefunction unlock_cch_handlefunction lock_tgh_handlefunction unlock_tgh_handlefunction is_kernel_context
Annotated Snippet
struct gru_stats_s {
atomic_long_t vdata_alloc;
atomic_long_t vdata_free;
atomic_long_t gts_alloc;
atomic_long_t gts_free;
atomic_long_t gms_alloc;
atomic_long_t gms_free;
atomic_long_t gts_double_allocate;
atomic_long_t assign_context;
atomic_long_t assign_context_failed;
atomic_long_t free_context;
atomic_long_t load_user_context;
atomic_long_t load_kernel_context;
atomic_long_t lock_kernel_context;
atomic_long_t unlock_kernel_context;
atomic_long_t steal_user_context;
atomic_long_t steal_kernel_context;
atomic_long_t steal_context_failed;
atomic_long_t nopfn;
atomic_long_t asid_new;
atomic_long_t asid_next;
atomic_long_t asid_wrap;
atomic_long_t asid_reuse;
atomic_long_t intr;
atomic_long_t intr_cbr;
atomic_long_t intr_tfh;
atomic_long_t intr_spurious;
atomic_long_t intr_mm_lock_failed;
atomic_long_t call_os;
atomic_long_t call_os_wait_queue;
atomic_long_t user_flush_tlb;
atomic_long_t user_unload_context;
atomic_long_t user_exception;
atomic_long_t set_context_option;
atomic_long_t check_context_retarget_intr;
atomic_long_t check_context_unload;
atomic_long_t tlb_dropin;
atomic_long_t tlb_preload_page;
atomic_long_t tlb_dropin_fail_no_asid;
atomic_long_t tlb_dropin_fail_upm;
atomic_long_t tlb_dropin_fail_invalid;
atomic_long_t tlb_dropin_fail_range_active;
atomic_long_t tlb_dropin_fail_idle;
atomic_long_t tlb_dropin_fail_fmm;
atomic_long_t tlb_dropin_fail_no_exception;
atomic_long_t tfh_stale_on_fault;
atomic_long_t mmu_invalidate_range;
atomic_long_t mmu_invalidate_page;
atomic_long_t flush_tlb;
atomic_long_t flush_tlb_gru;
atomic_long_t flush_tlb_gru_tgh;
atomic_long_t flush_tlb_gru_zero_asid;
atomic_long_t copy_gpa;
atomic_long_t read_gpa;
atomic_long_t mesq_receive;
atomic_long_t mesq_receive_none;
atomic_long_t mesq_send;
atomic_long_t mesq_send_failed;
atomic_long_t mesq_noop;
atomic_long_t mesq_send_unexpected_error;
atomic_long_t mesq_send_lb_overflow;
atomic_long_t mesq_send_qlimit_reached;
atomic_long_t mesq_send_amo_nacked;
atomic_long_t mesq_send_put_nacked;
atomic_long_t mesq_page_overflow;
atomic_long_t mesq_qf_locked;
atomic_long_t mesq_qf_noop_not_full;
atomic_long_t mesq_qf_switch_head_failed;
atomic_long_t mesq_qf_unexpected_error;
atomic_long_t mesq_noop_unexpected_error;
atomic_long_t mesq_noop_lb_overflow;
atomic_long_t mesq_noop_qlimit_reached;
atomic_long_t mesq_noop_amo_nacked;
atomic_long_t mesq_noop_put_nacked;
atomic_long_t mesq_noop_page_overflow;
};
enum mcs_op {cchop_allocate, cchop_start, cchop_interrupt, cchop_interrupt_sync,
cchop_deallocate, tfhop_write_only, tfhop_write_restart,
tghop_invalidate, mcsop_last};
struct mcs_op_statistic {
atomic_long_t count;
atomic_long_t total;
unsigned long max;
};
Annotation
- Immediate include surface: `linux/refcount.h`, `linux/rmap.h`, `linux/interrupt.h`, `linux/mutex.h`, `linux/wait.h`, `linux/mmu_notifier.h`, `linux/mm_types.h`, `gru.h`.
- Detected declarations: `struct gru_stats_s`, `struct mcs_op_statistic`, `struct gru_state`, `struct gru_mm_tracker`, `struct gru_mm_struct`, `struct gru_vma_data`, `struct gru_thread_state`, `struct gru_state`, `struct gru_blade_state`, `struct gru_unload_context_req`.
- Atlas domain: Driver Families / drivers/misc.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.