Lines Matching +full:architecturally +full:- +full:defined
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* include/asm-generic/tlb.h
32 * Generic MMU-gather implementation.
49 * - tlb_gather_mmu() / tlb_gather_mmu_fullmm() / tlb_finish_mmu()
56 * - tlb_start_vma() / tlb_end_vma(); marks the start / end of a VMA
61 * - tlb_remove_table()
63 * tlb_remove_table() is the basic primitive to free page-table directories
70 * - tlb_remove_page() / __tlb_remove_page()
71 * - tlb_remove_page_size() / __tlb_remove_page_size()
72 * - __tlb_remove_folio_pages()
87 * - tlb_change_page_size()
89 * call before __tlb_remove_page*() to set the current page-size; implies a
92 * - tlb_flush_mmu() / tlb_flush_mmu_tlbonly()
94 * tlb_flush_mmu_tlbonly() - does the TLB invalidate (and resets
97 * tlb_flush_mmu() - in addition to the above TLB invalidate, also frees
100 * - mmu_gather::fullmm
105 * - We can ignore tlb_{start,end}_vma(); because we don't
108 * - (RISC) architectures that use ASIDs can cycle to a new ASID
111 * - mmu_gather::need_flush_all
115 * x86-PAE needs this when changing top-level entries.
122 * - mmu_gather::start / mmu_gather::end
127 * - mmu_gather::freed_tables
131 * - tlb_get_unmap_shift() / tlb_get_unmap_size()
139 * Additionally there are a few opt-in features:
154 * Useful if your architecture has non-page page directories.
162 * Like MMU_GATHER_TABLE_FREE, and adds semi-RCU semantics to the free (see
166 * and therefore doesn't naturally serialize with software page-table walkers.
209 ((PAGE_SIZE - sizeof(struct mmu_table_batch)) / sizeof(void *))
240 * This allows an architecture that does not use the linux page-tables for
263 * to work on, then just handle a few from the on-stack structure.
275 ((PAGE_SIZE - sizeof(struct mmu_gather_batch)) / sizeof(void *))
279 * lockups for non-preemptible kernels on huge machines when a lot of memory
295 #define tlb_delay_rmap(tlb) (((tlb)->delayed_rmap = 1), true)
302 * We have a no-op version of the rmap removal that doesn't
382 tlb->start = min(tlb->start, address);
383 tlb->end = max(tlb->end, address + range_size);
388 if (tlb->fullmm) {
389 tlb->start = tlb->end = ~0;
391 tlb->start = TASK_SIZE;
392 tlb->end = 0;
394 tlb->freed_tables = 0;
395 tlb->cleared_ptes = 0;
396 tlb->cleared_pmds = 0;
397 tlb->cleared_puds = 0;
398 tlb->cleared_p4ds = 0;
408 #if defined(tlb_flush)
422 if (tlb->end)
423 flush_tlb_mm(tlb->mm);
436 if (tlb->fullmm || tlb->need_flush_all) {
437 flush_tlb_mm(tlb->mm);
438 } else if (tlb->end) {
440 .vm_mm = tlb->mm,
441 .vm_flags = (tlb->vma_exec ? VM_EXEC : 0) |
442 (tlb->vma_huge ? VM_HUGETLB : 0),
445 flush_tlb_range(&vma, tlb->start, tlb->end);
457 * mips-4k) flush only large pages.
459 * flush_tlb_range() implementations that flush I-TLB also flush D-TLB
466 tlb->vma_huge = is_vm_hugetlb_page(vma);
467 tlb->vma_exec = !!(vma->vm_flags & VM_EXEC);
468 tlb->vma_pfn = !!(vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP));
477 if (!(tlb->freed_tables || tlb->cleared_ptes || tlb->cleared_pmds ||
478 tlb->cleared_puds || tlb->cleared_p4ds))
512 /* Like tlb_remove_ptdesc, but for page-like page directories. */
522 if (tlb->page_size && tlb->page_size != page_size) {
523 if (!tlb->fullmm && !tlb->need_flush_all)
527 tlb->page_size = page_size;
533 if (tlb->cleared_ptes)
535 if (tlb->cleared_pmds)
537 if (tlb->cleared_puds)
539 if (tlb->cleared_p4ds)
557 if (tlb->fullmm)
562 flush_cache_range(vma, vma->vm_start, vma->vm_end);
568 if (tlb->fullmm)
573 * page mapcount -- there might not be page-frames for these PFNs after
577 if (tlb->vma_pfn || !IS_ENABLED(CONFIG_MMU_GATHER_MERGE_VMAS)) {
587 * tlb_flush_{pte|pmd|pud|p4d}_range() adjust the tlb->start and tlb->end,
594 tlb->cleared_ptes = 1;
601 tlb->cleared_pmds = 1;
608 tlb->cleared_puds = 1;
615 tlb->cleared_p4ds = 1;
625 * tlb_remove_tlb_entry - remember a pte unmapping for later tlb invalidation.
629 * userspace is unmapping already-unmapped pages, which happens quite a lot.
638 * tlb_remove_tlb_entries - remember unmapping of multiple consecutive ptes for
650 if (--nr == 0)
672 * tlb_remove_pmd_tlb_entry - remember a pmd mapping for later tlb invalidation
686 * tlb_remove_pud_tlb_entry - remember a pud mapping for later tlb
704 * architected non-legacy page table cache (which I'm not aware of
705 * anybody actually doing), you're going to have some architecturally
721 tlb->freed_tables = 1; \
730 tlb->freed_tables = 1; \
739 tlb->freed_tables = 1; \
748 tlb->freed_tables = 1; \