ia64/xen-unstable

changeset 4797:c0463989fca8

bitkeeper revision 1.1389.5.34 (427df40e93QBBJSf6UjtUfrHOApBXA)

Fix process destruction: we should clear the LDT before calling
destroy_context().
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Sun May 08 11:12:14 2005 +0000 (2005-05-08)
parents 4ce7020ef1ba
children 979aa5d4764e
files linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c
line diff
     1.1 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c	Sun May 08 08:39:54 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c	Sun May 08 11:12:14 2005 +0000
     1.3 @@ -361,6 +361,7 @@ static void __init pagetable_init (void)
     1.4  	make_page_writable(old_pgd);
     1.5  	__flush_tlb_all();
     1.6  	free_bootmem(__pa(old_pgd), PAGE_SIZE);
     1.7 +	init_mm.context.pinned = 1;
     1.8  
     1.9  	kernel_physical_mapping_init(pgd_base);
    1.10  	remap_numa_kva();
     2.1 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c	Sun May 08 08:39:54 2005 +0000
     2.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c	Sun May 08 11:12:14 2005 +0000
     2.3 @@ -22,6 +22,7 @@
     2.4  #include <asm/tlb.h>
     2.5  #include <asm/tlbflush.h>
     2.6  #include <asm/io.h>
     2.7 +#include <asm/mmu_context.h>
     2.8  
     2.9  #include <asm-xen/foreign_page.h>
    2.10  
    2.11 @@ -480,7 +481,6 @@ void mm_unpin(struct mm_struct *mm)
    2.12  
    2.13  void _arch_exit_mmap(struct mm_struct *mm)
    2.14  {
    2.15 -    unsigned int cpu = smp_processor_id();
    2.16      struct task_struct *tsk = current;
    2.17  
    2.18      task_lock(tsk);
    2.19 @@ -494,9 +494,7 @@ void _arch_exit_mmap(struct mm_struct *m
    2.20          tsk->active_mm = &init_mm;
    2.21          atomic_inc(&init_mm.mm_count);
    2.22  
    2.23 -        cpu_set(cpu, init_mm.cpu_vm_mask);
    2.24 -        load_cr3(swapper_pg_dir);
    2.25 -        cpu_clear(cpu, mm->cpu_vm_mask);
    2.26 +        switch_mm(mm, &init_mm, tsk);
    2.27  
    2.28          atomic_dec(&mm->mm_count);
    2.29          BUG_ON(atomic_read(&mm->mm_count) == 0);