Lines Matching +full:- +full:single +full:- +full:end
1 // SPDX-License-Identifier: GPL-2.0-only
33 * Unfold any partially covered contpte block at the beginning and end in contpte_try_unfold_partial()
41 unsigned long last_addr = addr + PAGE_SIZE * (nr - 1); in contpte_try_unfold_partial()
42 pte_t *last_ptep = ptep + nr - 1; in contpte_try_unfold_partial()
83 * covered by a single folio, and ensure that all the ptes are valid in __contpte_try_fold()
86 * range; the folding process will generate a single contpte entry which in __contpte_try_fold()
87 * has a single access and dirty bit. Those 2 bits are the logical OR of in __contpte_try_fold()
89 * ensure the contpte range is covered by a single folio, we must in __contpte_try_fold()
92 * that the pte is not special - we never try to fold special mappings. in __contpte_try_fold()
113 folio_start = addr - (page - &folio->page) * PAGE_SIZE; in __contpte_try_fold()
187 * so that it is self-consistent, without the PTL held, so we may be in contpte_ptep_get_lockless()
218 pfn = pte_pfn(orig_pte) - (orig_ptep - ptep); in contpte_ptep_get_lockless()
244 unsigned long end; in contpte_set_ptes() local
250 * all ptes is not-present. Therefore we never need to unfold or in contpte_set_ptes()
259 end = addr + (nr << PAGE_SHIFT); in contpte_set_ptes()
264 next = pte_cont_addr_end(addr, end); in contpte_set_ptes()
265 nr = (next - addr) >> PAGE_SHIFT; in contpte_set_ptes()
279 } while (addr != end); in contpte_set_ptes()
305 * flag for a _single_ pte. However, the core-mm code actually tracks in contpte_ptep_test_and_clear_young()
307 * contig range when the range is covered by a single folio, we can get in contpte_ptep_test_and_clear_young()
373 * exactly what the core-mm asked for, it tracks access/dirty per in contpte_clear_young_dirty_ptes()
375 * when it is covered by a single folio, we can get away with in contpte_clear_young_dirty_ptes()
379 unsigned long end = start + nr * PAGE_SIZE; in contpte_clear_young_dirty_ptes() local
381 if (pte_cont(__ptep_get(ptep + nr - 1))) in contpte_clear_young_dirty_ptes()
382 end = ALIGN(end, CONT_PTE_SIZE); in contpte_clear_young_dirty_ptes()
389 __clear_young_dirty_ptes(vma, start, ptep, (end - start) / PAGE_SIZE, flags); in contpte_clear_young_dirty_ptes()
416 * the flag on a single pte in the range. But for SW access in contpte_ptep_set_access_flags()
418 * faults. Avoid per-page tlb flush in __ptep_set_access_flags() in contpte_ptep_set_access_flags()
419 * and instead flush the whole range at the end. in contpte_ptep_set_access_flags()
437 __contpte_try_unfold(vma->vm_mm, addr, ptep, orig_pte); in contpte_ptep_set_access_flags()