/* The only subtle point is that another CPU may be still using the pagetable because of lazy tlb flushing. This means we need need to switch all CPUs off this pagetable before we can unpin it.  */
void xen_exit_mmap(struct mm_struct *mm)
/* The only subtle point is that another CPU may be still using the pagetable because of lazy tlb flushing. This means we need need to switch all CPUs off this pagetable before we can unpin it.  */
void xen_exit_mmap(struct mm_struct *mm)
{
	get_cpu();
	xen_drop_mm_ref(mm);
	put_cpu();
	spin_lock(&mm->page_table_lock);
	if (xen_page_pinned(mm->pgd))
		xen_pgd_unpin(mm);
	spin_unlock(&mm->page_table_lock);
}