arch/powerpc/mm/book3s32/tlb.c
Source file repositories/reference/linux-study-clean/arch/powerpc/mm/book3s32/tlb.c
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/mm/book3s32/tlb.c- Extension
.c- Size
- 3139 bytes
- Lines
- 117
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/mm.hlinux/init.hlinux/highmem.hlinux/pagemap.hlinux/export.hasm/tlbflush.hasm/tlb.hmm/mmu_decl.h
Detected Declarations
function hash__flush_rangefunction thefunction hash__flush_tlb_pagefunction hash__flush_gatherexport hash__flush_rangeexport hash__flush_tlb_mmexport hash__flush_tlb_pageexport hash__flush_gather
Annotated Snippet
if (!pmd_none(*pmd)) {
count = ((pmd_end - start) >> PAGE_SHIFT) + 1;
flush_hash_pages(ctx, start, pmd_val(*pmd), count);
}
if (pmd_end == end)
break;
start = pmd_end + 1;
++pmd;
}
}
EXPORT_SYMBOL(hash__flush_range);
/*
* Flush all the (user) entries for the address space described by mm.
*/
void hash__flush_tlb_mm(struct mm_struct *mm)
{
struct vm_area_struct *mp;
VMA_ITERATOR(vmi, mm, 0);
/*
* It is safe to iterate the vmas when called from dup_mmap,
* holding mmap_lock. It would also be safe from unmap_region
* or exit_mmap, but not from vmtruncate on SMP - but it seems
* dup_mmap is the only SMP case which gets here.
*/
for_each_vma(vmi, mp)
hash__flush_range(mp->vm_mm, mp->vm_start, mp->vm_end);
}
EXPORT_SYMBOL(hash__flush_tlb_mm);
void hash__flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr)
{
struct mm_struct *mm;
pmd_t *pmd;
mm = (vmaddr < TASK_SIZE)? vma->vm_mm: &init_mm;
pmd = pmd_off(mm, vmaddr);
if (!pmd_none(*pmd))
flush_hash_pages(mm->context.id, vmaddr, pmd_val(*pmd), 1);
}
EXPORT_SYMBOL(hash__flush_tlb_page);
void hash__flush_gather(struct mmu_gather *tlb)
{
if (tlb->fullmm || tlb->need_flush_all)
hash__flush_tlb_mm(tlb->mm);
else
hash__flush_range(tlb->mm, tlb->start, tlb->end);
}
EXPORT_SYMBOL(hash__flush_gather);
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/mm.h`, `linux/init.h`, `linux/highmem.h`, `linux/pagemap.h`, `linux/export.h`, `asm/tlbflush.h`, `asm/tlb.h`.
- Detected declarations: `function hash__flush_range`, `function the`, `function hash__flush_tlb_page`, `function hash__flush_gather`, `export hash__flush_range`, `export hash__flush_tlb_mm`, `export hash__flush_tlb_page`, `export hash__flush_gather`.
- Atlas domain: Architecture Layer / arch/powerpc.
- 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.