# HG changeset patch # User tristan.gingold@xxxxxxxx # Node ID 5d20c84681d0469a4ce96527370b5e12d9a66033 # Parent e39ccf78a8bed93d1b3f14543e40508f3ed453f5 Remove unused and unwritten active_mm field of vcpu and domain. Signed-off-by: Tristan Gingold diff -r e39ccf78a8be -r 5d20c84681d0 xen/arch/ia64/asm-offsets.c --- a/xen/arch/ia64/asm-offsets.c Thu Mar 9 12:19:54 2006 +++ b/xen/arch/ia64/asm-offsets.c Thu Mar 9 12:38:14 2006 @@ -84,7 +84,6 @@ //DEFINE(IA64_TASK_SIGHAND_OFFSET,offsetof (struct task_struct, sighand)); //DEFINE(IA64_TASK_SIGNAL_OFFSET,offsetof (struct task_struct, signal)); //DEFINE(IA64_TASK_TGID_OFFSET, offsetof (struct task_struct, tgid)); - DEFINE(IA64_PGD, offsetof(struct domain, arch.mm)); DEFINE(IA64_TASK_THREAD_KSP_OFFSET, offsetof (struct vcpu, arch._thread.ksp)); DEFINE(IA64_TASK_THREAD_ON_USTACK_OFFSET, offsetof (struct vcpu, arch._thread.on_ustack)); diff -r e39ccf78a8be -r 5d20c84681d0 xen/arch/ia64/linux-xen/setup.c --- a/xen/arch/ia64/linux-xen/setup.c Thu Mar 9 12:19:54 2006 +++ b/xen/arch/ia64/linux-xen/setup.c Thu Mar 9 12:38:14 2006 @@ -842,7 +842,9 @@ | IA64_DCR_DA | IA64_DCR_DD | IA64_DCR_LC)); #endif atomic_inc(&init_mm.mm_count); +#ifndef XEN current->active_mm = &init_mm; +#endif #ifdef XEN if (current->domain->arch.mm) #else diff -r e39ccf78a8be -r 5d20c84681d0 xen/arch/ia64/linux-xen/smp.c --- a/xen/arch/ia64/linux-xen/smp.c Thu Mar 9 12:19:54 2006 +++ b/xen/arch/ia64/linux-xen/smp.c Thu Mar 9 12:38:14 2006 @@ -296,7 +296,12 @@ { preempt_disable(); /* this happens for the common case of a single-threaded fork(): */ +#ifdef XEN + if (likely(mm == current->domain->arch.mm + && atomic_read(&mm->mm_users) == 1)) +#else if (likely(mm == current->active_mm && atomic_read(&mm->mm_users) == 1)) +#endif { local_finish_flush_tlb_mm(mm); preempt_enable(); diff -r e39ccf78a8be -r 5d20c84681d0 xen/include/asm-ia64/domain.h --- a/xen/include/asm-ia64/domain.h Thu Mar 9 12:19:54 2006 +++ b/xen/include/asm-ia64/domain.h Thu Mar 9 12:38:14 2006 @@ -14,7 +14,6 @@ extern void domain_relinquish_resources(struct domain *); struct arch_domain { - struct mm_struct *active_mm; struct mm_struct *mm; unsigned long metaphysical_rr0; unsigned long metaphysical_rr4; @@ -68,7 +67,6 @@ int breakimm; // from arch_domain (so is pinned) int starting_rid; /* first RID assigned to domain */ int ending_rid; /* one beyond highest RID assigned to domain */ - struct mm_struct *active_mm; struct thread_struct _thread; // this must be last thash_cb_t *vtlb; @@ -81,7 +79,6 @@ struct arch_vmx_struct arch_vmx; /* Virtual Machine Extensions */ }; -#define active_mm arch.active_mm //#define thread arch._thread // FOLLOWING FROM linux-2.6.7/include/sched.h diff -r e39ccf78a8be -r 5d20c84681d0 xen/include/asm-ia64/linux-xen/asm/tlbflush.h --- a/xen/include/asm-ia64/linux-xen/asm/tlbflush.h Thu Mar 9 12:19:54 2006 +++ b/xen/include/asm-ia64/linux-xen/asm/tlbflush.h Thu Mar 9 12:38:14 2006 @@ -80,7 +80,11 @@ #ifdef CONFIG_SMP flush_tlb_range(vma, (addr & PAGE_MASK), (addr & PAGE_MASK) + PAGE_SIZE); #else +#ifdef XEN + if (vma->vm_mm == current->domain->arch.mm) +#else if (vma->vm_mm == current->active_mm) +#endif ia64_ptcl(addr, (PAGE_SHIFT << 2)); #ifndef XEN // FIXME SMP?