ia64/xen-unstable

changeset 550:9b6ba16a7e32

bitkeeper revision 1.304.1.1 (3f0ada3dy1hCToaW0oVc9Hv1u6YBIQ)

Merge labyrinth.cl.cam.ac.uk:/auto/groups/xeno/BK/xeno.bk
into labyrinth.cl.cam.ac.uk:/auto/groups/xeno/users/rac61/xeno.bk
author rac61@labyrinth.cl.cam.ac.uk
date Tue Jul 08 14:50:37 2003 +0000 (2003-07-08)
parents 6361e72ebf4c e381bd125a43
children e923951ada95 bd3c746eb8ca
files xenolinux-2.4.21-sparse/arch/xeno/drivers/dom0/dom0_core.c xenolinux-2.4.21-sparse/arch/xeno/drivers/dom0/dom0_memory.c xenolinux-2.4.21-sparse/arch/xeno/mm/get_unmapped_area.c
line diff
     1.1 --- a/xenolinux-2.4.21-sparse/arch/xeno/drivers/dom0/dom0_core.c	Tue Jul 08 14:28:33 2003 +0000
     1.2 +++ b/xenolinux-2.4.21-sparse/arch/xeno/drivers/dom0/dom0_core.c	Tue Jul 08 14:50:37 2003 +0000
     1.3 @@ -52,7 +52,7 @@ static struct proc_dir_entry *dom0_cmd_i
     1.4  static struct proc_dir_entry *dom_list_intf;
     1.5  
     1.6  unsigned long direct_mmap(unsigned long, unsigned long, pgprot_t, int, int);
     1.7 -int direct_unmap(unsigned long, unsigned long);
     1.8 +int direct_unmap(struct mm_struct *, unsigned long, unsigned long);
     1.9  
    1.10  static ssize_t dom_usage_read(struct file * file, char * buff, size_t size, loff_t * off)
    1.11  {
    1.12 @@ -160,7 +160,7 @@ static ssize_t dom_mem_write(struct file
    1.13  
    1.14      copy_from_user(&mem_data, (dom_mem_t *)buff, sizeof(dom_mem_t));
    1.15      
    1.16 -    if ( direct_unmap(mem_data.vaddr, 
    1.17 +    if ( direct_unmap(current->mm, mem_data.vaddr, 
    1.18                        mem_data.tot_pages << PAGE_SHIFT) == 0 ) {
    1.19          return sizeof(sizeof(dom_mem_t));
    1.20      } else {
     2.1 --- a/xenolinux-2.4.21-sparse/arch/xeno/drivers/dom0/dom0_memory.c	Tue Jul 08 14:28:33 2003 +0000
     2.2 +++ b/xenolinux-2.4.21-sparse/arch/xeno/drivers/dom0/dom0_memory.c	Tue Jul 08 14:50:37 2003 +0000
     2.3 @@ -311,12 +311,12 @@ void direct_zap_page_range(struct mm_str
     2.4  }
     2.5  
     2.6  
     2.7 -int direct_unmap(unsigned long addr, unsigned long size)
     2.8 +int direct_unmap(struct mm_struct *mm, unsigned long addr, unsigned long size)
     2.9  {
    2.10      int count = 0, tot_pages = (size+PAGE_SIZE-1) >> PAGE_SHIFT;
    2.11      direct_mmap_node_t * node;
    2.12      struct list_head * curr;
    2.13 -    struct list_head * direct_list = &current->mm->context.direct_list;    
    2.14 +    struct list_head * direct_list = &mm->context.direct_list;    
    2.15  
    2.16      curr = direct_list->next;
    2.17      while ( curr != direct_list )
    2.18 @@ -335,7 +335,7 @@ int direct_unmap(unsigned long addr, uns
    2.19  
    2.20      while ( count < tot_pages )
    2.21      {
    2.22 -        direct_zap_page_range(current->mm, addr, PAGE_SIZE);
    2.23 +        direct_zap_page_range(mm, addr, PAGE_SIZE);
    2.24          addr += PAGE_SIZE;
    2.25          count++;
    2.26      }
     3.1 --- a/xenolinux-2.4.21-sparse/arch/xeno/mm/get_unmapped_area.c	Tue Jul 08 14:28:33 2003 +0000
     3.2 +++ b/xenolinux-2.4.21-sparse/arch/xeno/mm/get_unmapped_area.c	Tue Jul 08 14:50:37 2003 +0000
     3.3 @@ -14,8 +14,7 @@
     3.4  #include <asm/uaccess.h>
     3.5  #include <asm/pgalloc.h>
     3.6  
     3.7 -extern int direct_unmap(unsigned long, unsigned long);
     3.8 -
     3.9 +extern int direct_unmap(struct mm_struct *, unsigned long, unsigned long);
    3.10  
    3.11  int init_direct_list(struct mm_struct *mm)
    3.12  {
    3.13 @@ -30,7 +29,7 @@ void destroy_direct_list(struct mm_struc
    3.14      while ( (curr = direct_list->next) != direct_list )
    3.15      {
    3.16          direct_mmap_node_t *node = list_entry(curr, direct_mmap_node_t, list);
    3.17 -        if ( direct_unmap(node->vm_start, node->vm_end - node->vm_start) != 0 )
    3.18 +        if ( direct_unmap(mm, node->vm_start, node->vm_end - node->vm_start) )
    3.19              BUG();
    3.20      }
    3.21  }