arch/arm64/kvm/hyp/nvhe/early_alloc.c
Source file repositories/reference/linux-study-clean/arch/arm64/kvm/hyp/nvhe/early_alloc.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm64/kvm/hyp/nvhe/early_alloc.c- Extension
.c- Size
- 1331 bytes
- Lines
- 60
- Domain
- Architecture Layer
- Bucket
- arch/arm64
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
asm/kvm_pgtable.hnvhe/early_alloc.hnvhe/memory.h
Detected Declarations
function hyp_early_alloc_nr_used_pagesfunction hyp_early_alloc_get_page
Annotated Snippet
static void hyp_early_alloc_get_page(void *addr) { }
static void hyp_early_alloc_put_page(void *addr) { }
void hyp_early_alloc_init(void *virt, unsigned long size)
{
base = cur = (unsigned long)virt;
end = base + size;
hyp_early_alloc_mm_ops.zalloc_page = hyp_early_alloc_page;
hyp_early_alloc_mm_ops.phys_to_virt = hyp_phys_to_virt;
hyp_early_alloc_mm_ops.virt_to_phys = hyp_virt_to_phys;
hyp_early_alloc_mm_ops.get_page = hyp_early_alloc_get_page;
hyp_early_alloc_mm_ops.put_page = hyp_early_alloc_put_page;
}
Annotation
- Immediate include surface: `asm/kvm_pgtable.h`, `nvhe/early_alloc.h`, `nvhe/memory.h`.
- Detected declarations: `function hyp_early_alloc_nr_used_pages`, `function hyp_early_alloc_get_page`.
- Atlas domain: Architecture Layer / arch/arm64.
- 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.