in include/asm/mmu_context.h [29:46]
static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
struct task_struct *tsk)
{
int l1;
/*
* For virtual machine, we have to update system map if it's been
* touched.
*/
if (next->context.generation < prev->context.generation) {
for (l1 = MIN_KERNEL_SEG; l1 <= max_kernel_seg; l1++)
next->pgd[l1] = init_mm.pgd[l1];
next->context.generation = prev->context.generation;
}
__vmnewmap((void *)next->context.ptbase);
}