arch/loongarch/include/asm/mmu_context.h

Source file repositories/reference/linux-study-clean/arch/loongarch/include/asm/mmu_context.h

File Facts

System
Linux kernel
Corpus path
arch/loongarch/include/asm/mmu_context.h
Extension
.h
Size
4131 bytes
Lines
172
Domain
Architecture Layer
Bucket
arch/loongarch
Inferred role
Architecture Layer: implementation source
Status
source 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.

Dependency Surface

Detected Declarations

Annotated Snippet

if (!current->mm || (current->mm == mm)) {
			get_new_mmu_context(mm, cpu, &need_flush);

			write_csr_asid(cpu_asid(cpu, mm));
			if (need_flush)
				local_flush_tlb_user(); /* Flush tlb after update ASID */

			goto out;
		}
	}

	/* Will get a new context next time */
	cpu_context(cpu, mm) = 0;
	cpumask_clear_cpu(cpu, mm_cpumask(mm));
out:
	local_irq_restore(flags);
}

#endif /* _ASM_MMU_CONTEXT_H */

Annotation

Implementation Notes