drivers/gpu/drm/i915/gt/intel_tlb.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/gt/intel_tlb.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/gt/intel_tlb.c- Extension
.c- Size
- 4458 bytes
- Lines
- 174
- Domain
- Driver Families
- Bucket
- drivers/gpu
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
i915_drv.hi915_perf_oa_regs.hintel_engine_pm.hintel_gt.hintel_gt_mcr.hintel_gt_pm.hintel_gt_print.hintel_gt_regs.hintel_tlb.huc/intel_guc.hselftest_tlb.c
Detected Declarations
function wait_for_invalidatefunction mmio_invalidate_fullfunction for_each_engine_maskedfunction tlb_seqno_passedfunction intel_gt_invalidate_tlb_fullfunction with_intel_gt_pm_if_awakefunction intel_gt_init_tlbfunction intel_gt_fini_tlb
Annotated Snippet
if (HAS_GUC_TLB_INVALIDATION(gt->i915)) {
/*
* Only perform GuC TLB invalidation if GuC is ready.
* The only time GuC could not be ready is on GT reset,
* which would clobber all the TLBs anyways, making
* any TLB invalidation path here unnecessary.
*/
if (intel_guc_is_ready(guc))
intel_guc_invalidate_tlb_engines(guc);
} else {
mmio_invalidate_full(gt);
}
write_seqcount_invalidate(>->tlb.seqno);
unlock:
mutex_unlock(>->tlb.invalidate_lock);
}
}
void intel_gt_init_tlb(struct intel_gt *gt)
{
mutex_init(>->tlb.invalidate_lock);
seqcount_mutex_init(>->tlb.seqno, >->tlb.invalidate_lock);
}
void intel_gt_fini_tlb(struct intel_gt *gt)
{
mutex_destroy(>->tlb.invalidate_lock);
}
#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
#include "selftest_tlb.c"
#endif
Annotation
- Immediate include surface: `i915_drv.h`, `i915_perf_oa_regs.h`, `intel_engine_pm.h`, `intel_gt.h`, `intel_gt_mcr.h`, `intel_gt_pm.h`, `intel_gt_print.h`, `intel_gt_regs.h`.
- Detected declarations: `function wait_for_invalidate`, `function mmio_invalidate_full`, `function for_each_engine_masked`, `function tlb_seqno_passed`, `function intel_gt_invalidate_tlb_full`, `function with_intel_gt_pm_if_awake`, `function intel_gt_init_tlb`, `function intel_gt_fini_tlb`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.