drivers/accel/habanalabs/include/hw_ip/mmu/mmu_general.h
Source file repositories/reference/linux-study-clean/drivers/accel/habanalabs/include/hw_ip/mmu/mmu_general.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/accel/habanalabs/include/hw_ip/mmu/mmu_general.h- Extension
.h- Size
- 1527 bytes
- Lines
- 60
- 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.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
enum mmu_hop_num
Annotated Snippet
#ifndef INCLUDE_MMU_GENERAL_H_
#define INCLUDE_MMU_GENERAL_H_
#define PAGE_SHIFT_4KB 12
#define PAGE_SHIFT_64KB 16
#define PAGE_SHIFT_2MB 21
#define PAGE_SHIFT_16MB 24
#define PAGE_SHIFT_64MB 26
#define PAGE_SHIFT_1GB 30
#define PAGE_SIZE_4KB _BITUL(PAGE_SHIFT_4KB)
#define PAGE_SIZE_64KB _BITUL(PAGE_SHIFT_64KB)
#define PAGE_SIZE_2MB _BITUL(PAGE_SHIFT_2MB)
#define PAGE_SIZE_16MB _BITUL(PAGE_SHIFT_16MB)
#define PAGE_SIZE_64MB _BITUL(PAGE_SHIFT_64MB)
#define PAGE_SIZE_1GB _BITUL(PAGE_SHIFT_1GB)
#define PAGE_PRESENT_MASK 0x0000000000001ull
#define SWAP_OUT_MASK 0x0000000000004ull
#define LAST_MASK 0x0000000000800ull
#define FLAGS_MASK 0x0000000000FFFull
#define MMU_ARCH_3_HOPS 3
#define MMU_ARCH_4_HOPS 4
#define MMU_ARCH_5_HOPS 5
#define MMU_ARCH_6_HOPS 6
#define HOP_PHYS_ADDR_MASK (~FLAGS_MASK)
#define HL_PTE_SIZE sizeof(u64)
/* definitions for HOP with 512 PTE entries */
#define HOP_PTE_ENTRIES_512 512
#define HOP_TABLE_SIZE_512_PTE (HOP_PTE_ENTRIES_512 * HL_PTE_SIZE)
#define HOP0_512_PTE_TABLES_TOTAL_SIZE (HOP_TABLE_SIZE_512_PTE * MAX_ASID)
#define MMU_HOP0_PA43_12_SHIFT 12
#define MMU_HOP0_PA49_44_SHIFT (12 + 32)
#define MMU_HOP0_PA63_44_SHIFT (12 + 32)
#define MMU_CONFIG_TIMEOUT_USEC 2000 /* 2 ms */
enum mmu_hop_num {
MMU_HOP0,
MMU_HOP1,
MMU_HOP2,
MMU_HOP3,
MMU_HOP4,
MMU_HOP5,
MMU_HOP_MAX,
};
#endif /* INCLUDE_MMU_GENERAL_H_ */
Annotation
- Detected declarations: `enum mmu_hop_num`.
- 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.