ia64/xen-unstable

changeset 9168:142a3eec56bd

[IA64] Remove unused and unwritten active_mm field of vcpu and domain.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author awilliam@xenbuild.aw
date Fri Mar 10 10:00:31 2006 -0700 (2006-03-10)
parents cb5abeaabd1a
children 8a551ec13d93
files xen/arch/ia64/asm-offsets.c xen/arch/ia64/linux-xen/setup.c xen/arch/ia64/linux-xen/smp.c xen/include/asm-ia64/domain.h xen/include/asm-ia64/linux-xen/asm/tlbflush.h
line diff
     1.1 --- a/xen/arch/ia64/asm-offsets.c	Fri Mar 10 09:19:54 2006 -0700
     1.2 +++ b/xen/arch/ia64/asm-offsets.c	Fri Mar 10 10:00:31 2006 -0700
     1.3 @@ -84,7 +84,6 @@ void foo(void)
     1.4  	//DEFINE(IA64_TASK_SIGHAND_OFFSET,offsetof (struct task_struct, sighand));
     1.5  	//DEFINE(IA64_TASK_SIGNAL_OFFSET,offsetof (struct task_struct, signal));
     1.6  	//DEFINE(IA64_TASK_TGID_OFFSET, offsetof (struct task_struct, tgid));
     1.7 -	DEFINE(IA64_PGD, offsetof(struct domain, arch.mm));
     1.8  	DEFINE(IA64_TASK_THREAD_KSP_OFFSET, offsetof (struct vcpu, arch._thread.ksp));
     1.9  	DEFINE(IA64_TASK_THREAD_ON_USTACK_OFFSET, offsetof (struct vcpu, arch._thread.on_ustack));
    1.10  
     2.1 --- a/xen/arch/ia64/linux-xen/setup.c	Fri Mar 10 09:19:54 2006 -0700
     2.2 +++ b/xen/arch/ia64/linux-xen/setup.c	Fri Mar 10 10:00:31 2006 -0700
     2.3 @@ -842,7 +842,9 @@ cpu_init (void)
     2.4  					| IA64_DCR_DA | IA64_DCR_DD | IA64_DCR_LC));
     2.5  #endif
     2.6  	atomic_inc(&init_mm.mm_count);
     2.7 +#ifndef XEN
     2.8  	current->active_mm = &init_mm;
     2.9 +#endif
    2.10  #ifdef XEN
    2.11  	if (current->domain->arch.mm)
    2.12  #else
     3.1 --- a/xen/arch/ia64/linux-xen/smp.c	Fri Mar 10 09:19:54 2006 -0700
     3.2 +++ b/xen/arch/ia64/linux-xen/smp.c	Fri Mar 10 10:00:31 2006 -0700
     3.3 @@ -296,7 +296,12 @@ smp_flush_tlb_mm (struct mm_struct *mm)
     3.4  {
     3.5  	preempt_disable();
     3.6  	/* this happens for the common case of a single-threaded fork():  */
     3.7 +#ifdef XEN
     3.8 +	if (likely(mm == current->domain->arch.mm
     3.9 +		   && atomic_read(&mm->mm_users) == 1))
    3.10 +#else
    3.11  	if (likely(mm == current->active_mm && atomic_read(&mm->mm_users) == 1))
    3.12 +#endif
    3.13  	{
    3.14  		local_finish_flush_tlb_mm(mm);
    3.15  		preempt_enable();
     4.1 --- a/xen/include/asm-ia64/domain.h	Fri Mar 10 09:19:54 2006 -0700
     4.2 +++ b/xen/include/asm-ia64/domain.h	Fri Mar 10 10:00:31 2006 -0700
     4.3 @@ -14,7 +14,6 @@
     4.4  extern void domain_relinquish_resources(struct domain *);
     4.5  
     4.6  struct arch_domain {
     4.7 -    struct mm_struct *active_mm;
     4.8      struct mm_struct *mm;
     4.9      unsigned long metaphysical_rr0;
    4.10      unsigned long metaphysical_rr4;
    4.11 @@ -68,7 +67,6 @@ struct arch_vcpu {
    4.12      int breakimm;			// from arch_domain (so is pinned)
    4.13      int starting_rid;		/* first RID assigned to domain */
    4.14      int ending_rid;		/* one beyond highest RID assigned to domain */
    4.15 -    struct mm_struct *active_mm;
    4.16      struct thread_struct _thread;	// this must be last
    4.17  
    4.18      thash_cb_t *vtlb;
    4.19 @@ -81,7 +79,6 @@ struct arch_vcpu {
    4.20      struct arch_vmx_struct arch_vmx; /* Virtual Machine Extensions */
    4.21  };
    4.22  
    4.23 -#define active_mm arch.active_mm
    4.24  //#define thread arch._thread
    4.25  
    4.26  // FOLLOWING FROM linux-2.6.7/include/sched.h
     5.1 --- a/xen/include/asm-ia64/linux-xen/asm/tlbflush.h	Fri Mar 10 09:19:54 2006 -0700
     5.2 +++ b/xen/include/asm-ia64/linux-xen/asm/tlbflush.h	Fri Mar 10 10:00:31 2006 -0700
     5.3 @@ -80,7 +80,11 @@ flush_tlb_page (struct vm_area_struct *v
     5.4  #ifdef CONFIG_SMP
     5.5  	flush_tlb_range(vma, (addr & PAGE_MASK), (addr & PAGE_MASK) + PAGE_SIZE);
     5.6  #else
     5.7 +#ifdef XEN
     5.8 +	if (vma->vm_mm == current->domain->arch.mm)
     5.9 +#else
    5.10  	if (vma->vm_mm == current->active_mm)
    5.11 +#endif
    5.12  		ia64_ptcl(addr, (PAGE_SHIFT << 2));
    5.13  #ifndef XEN
    5.14  // FIXME SMP?