arch/microblaze/mm/pgtable.c
Source file repositories/reference/linux-study-clean/arch/microblaze/mm/pgtable.c
File Facts
- System
- Linux kernel
- Corpus path
arch/microblaze/mm/pgtable.c- Extension
.c- Size
- 6450 bytes
- Lines
- 265
- Domain
- Architecture Layer
- Bucket
- arch/microblaze
- Inferred role
- Architecture Layer: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/export.hlinux/kernel.hlinux/types.hlinux/vmalloc.hlinux/init.hlinux/mm_types.hlinux/pgtable.hlinux/memblock.hlinux/kallsyms.hasm/pgalloc.hlinux/io.hasm/mmu.hasm/sections.hasm/fixmap.h
Detected Declarations
function mem_initfunction addressfunction iounmapfunction map_pagefunction mapin_ramfunction truefunction iopafunction __set_fixmapexport ioremap_botexport ioremapexport iounmap
Annotated Snippet
if (pmd_present(*pmd)) {
pte = pte_offset_kernel(pmd, addr & PAGE_MASK);
if (pte) {
retval = 1;
*ptep = pte;
}
}
}
return retval;
}
/* Find physical address for this virtual address. Normally used by
* I/O functions, but anyone can call it.
*/
unsigned long iopa(unsigned long addr)
{
unsigned long pa;
pte_t *pte;
struct mm_struct *mm;
/* Allow mapping of user addresses (within the thread)
* for DMA if necessary.
*/
if (addr < TASK_SIZE)
mm = current->mm;
else
mm = &init_mm;
pa = 0;
if (get_pteptr(mm, addr, &pte))
pa = (pte_val(*pte) & PAGE_MASK) | (addr & ~PAGE_MASK);
return pa;
}
__ref pte_t *pte_alloc_one_kernel(struct mm_struct *mm)
{
if (mem_init_done)
return __pte_alloc_one_kernel(mm);
else
return memblock_alloc_try_nid(PAGE_SIZE, PAGE_SIZE,
MEMBLOCK_LOW_LIMIT,
memory_start + kernel_tlb,
NUMA_NO_NODE);
}
void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t flags)
{
unsigned long address = __fix_to_virt(idx);
if (idx >= __end_of_fixed_addresses)
BUG();
map_page(address, phys, pgprot_val(flags));
}
Annotation
- Immediate include surface: `linux/export.h`, `linux/kernel.h`, `linux/types.h`, `linux/vmalloc.h`, `linux/init.h`, `linux/mm_types.h`, `linux/pgtable.h`, `linux/memblock.h`.
- Detected declarations: `function mem_init`, `function address`, `function iounmap`, `function map_page`, `function mapin_ram`, `function true`, `function iopa`, `function __set_fixmap`, `export ioremap_bot`, `export ioremap`.
- Atlas domain: Architecture Layer / arch/microblaze.
- Implementation status: integration 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.