arch/arm64/include/asm/vmalloc.h
Source file repositories/reference/linux-study-clean/arch/arm64/include/asm/vmalloc.h
File Facts
- System
- Linux kernel
- Corpus path
arch/arm64/include/asm/vmalloc.h- Extension
.h- Size
- 1869 bytes
- Lines
- 75
- 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.
Dependency Surface
asm/page.hasm/pgtable.h
Detected Declarations
function arch_vmap_pud_supportedfunction arch_vmap_pmd_supportedfunction arch_vmap_pte_range_map_sizefunction arch_vmap_pte_range_unmap_sizefunction arch_vmap_pte_supported_shiftfunction arch_vmap_pgprot_tagged
Annotated Snippet
#ifndef _ASM_ARM64_VMALLOC_H
#define _ASM_ARM64_VMALLOC_H
#include <asm/page.h>
#include <asm/pgtable.h>
#ifdef CONFIG_HAVE_ARCH_HUGE_VMAP
#define arch_vmap_pud_supported arch_vmap_pud_supported
static inline bool arch_vmap_pud_supported(pgprot_t prot)
{
return pud_sect_supported();
}
#define arch_vmap_pmd_supported arch_vmap_pmd_supported
static inline bool arch_vmap_pmd_supported(pgprot_t prot)
{
return true;
}
#define arch_vmap_pte_range_map_size arch_vmap_pte_range_map_size
static inline unsigned long arch_vmap_pte_range_map_size(unsigned long addr,
unsigned long end, u64 pfn,
unsigned int max_page_shift)
{
/*
* If the block is at least CONT_PTE_SIZE in size, and is naturally
* aligned in both virtual and physical space, then we can pte-map the
* block using the PTE_CONT bit for more efficient use of the TLB.
*/
if (max_page_shift < CONT_PTE_SHIFT)
return PAGE_SIZE;
if (end - addr < CONT_PTE_SIZE)
return PAGE_SIZE;
if (!IS_ALIGNED(addr, CONT_PTE_SIZE))
return PAGE_SIZE;
if (!IS_ALIGNED(PFN_PHYS(pfn), CONT_PTE_SIZE))
return PAGE_SIZE;
return CONT_PTE_SIZE;
}
#define arch_vmap_pte_range_unmap_size arch_vmap_pte_range_unmap_size
static inline unsigned long arch_vmap_pte_range_unmap_size(unsigned long addr,
pte_t *ptep)
{
/*
* The caller handles alignment so it's sufficient just to check
* PTE_CONT.
*/
return pte_valid_cont(__ptep_get(ptep)) ? CONT_PTE_SIZE : PAGE_SIZE;
}
#define arch_vmap_pte_supported_shift arch_vmap_pte_supported_shift
static inline int arch_vmap_pte_supported_shift(unsigned long size)
{
if (size >= CONT_PTE_SIZE)
return CONT_PTE_SHIFT;
return PAGE_SHIFT;
}
#endif
#define arch_vmap_pgprot_tagged arch_vmap_pgprot_tagged
static inline pgprot_t arch_vmap_pgprot_tagged(pgprot_t prot)
{
return pgprot_tagged(prot);
}
#endif /* _ASM_ARM64_VMALLOC_H */
Annotation
- Immediate include surface: `asm/page.h`, `asm/pgtable.h`.
- Detected declarations: `function arch_vmap_pud_supported`, `function arch_vmap_pmd_supported`, `function arch_vmap_pte_range_map_size`, `function arch_vmap_pte_range_unmap_size`, `function arch_vmap_pte_supported_shift`, `function arch_vmap_pgprot_tagged`.
- 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.