pmap_activate(struct proc *p)
pmap_activate(p) struct proc *p;
pmap_activate(struct proc *p){	pmap_t pmap = p->p_vmspace->vm_map.pmap;	int s;	/*	 * This is essentially the same thing that happens in cpu_switch()	 * when the newly selected process is about to run, except that we	 * have to make sure to clean the windows before we set	 * the new context.	 */	s = splvm();	if (p == curproc) {		write_user_windows();		if (pmap->pm_ctx == NULL) {			ctx_alloc(pmap);	/* performs setcontext() */		} else {			/* Do any cache flush needed on context switch */			(*cpuinfo.pure_vcache_flush)();			setcontext(pmap->pm_ctxnum);		}	}	splx(s);}