Lines Matching +full:first +full:- +full:generation

1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
6 * -Refactored get_new_mmu_context( ) to only handle live-mm.
7 * retiring-mm handled in other hooks
10 * -Major rewrite of Core ASID allocation routine get_new_mmu_context
21 #include <asm-generic/mm_hooks.h>
25 * MMU tags TLBs with an 8-bit ASID, avoiding need to flush the TLB on
26 * context-switch.
32 * Each task is assigned unique ASID, with a simple round-robin allocator
33 * tracked in @asid_cpu. When 8-bit value rolls over,a new cycle is started
38 * The 32 bit @asid_cpu (and mm->asid) have 8 bits MMU PID and rest 24 bits
39 * serve as cycle/generation indicator and natural 32 bit unsigned math
40 * automagically increments the generation when lower 8 bits rollover.
49 #define asid_mm(mm, cpu) mm->context.asid[cpu]
67 * Move to new ASID if it was not from current alloc-cycle/generation. in get_new_mmu_context()
68 * This is done by ensuring that the generation bits in both mm->ASID in get_new_mmu_context()
72 * generation, e.g. local_flush_tlb_mm() for forking parent, in get_new_mmu_context()
73 * first need to destroy the context, setting it to invalid in get_new_mmu_context()
87 * "generation" to distinguish from no context in get_new_mmu_context()
139 * for the switched-out task, unlike some other arches. in switch_mm()
141 * it to CPUs where a task once ran-on, could cause stale TLB entry in switch_mm()
142 * re-use, specially for a multi-threaded task. in switch_mm()
144 * For a non-aggregating mm_cpumask, IPI not sent C1, and if T1 in switch_mm()
145 * were to re-migrate to C1, it could access the unmapped region in switch_mm()
150 mmu_setup_pgd(next, next->pgd); in switch_mm()
156 * activate_mm defaults (in asm-generic) to switch_mm and is called at the
164 /* it seemed that deactivate_mm( ) is a reasonable place to do book-keeping
165 * for retiring-mm. However destroy_context( ) still needs to do that because
168 * there is a good chance that task gets sched-out/in, making it's ASID valid
172 #include <asm-generic/mmu_context.h>