ia64/xen-unstable

changeset 32:a773afec0089

bitkeeper revision 1.7.3.11 (3dfdc82aMb4af9kOnOn54t0qhnQjzA)

even more debugging
author lynx@idefix.cl.cam.ac.uk
date Mon Dec 16 12:33:46 2002 +0000 (2002-12-16)
parents 7938de91fd32
children b885abd8e863
files xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_core.c
line diff
     1.1 --- a/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_core.c	Mon Dec 16 12:23:20 2002 +0000
     1.2 +++ b/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_core.c	Mon Dec 16 12:33:46 2002 +0000
     1.3 @@ -146,24 +146,6 @@ static void create_proc_dom_entries(int 
     1.4      }
     1.5  }
     1.6  
     1.7 -static int dom_mem_mmap(struct file *file, struct vm_area_struct *vma)
     1.8 -{
     1.9 -    proc_memdata_t * mem_data = (proc_memdata_t *)((struct proc_dir_entry *)file->f_dentry->d_inode->u.generic_ip)->data;
    1.10 -
    1.11 -    /*
    1.12 -     * do not dump contents to core file,
    1.13 -     * do not swap out.
    1.14 -     */
    1.15 -    vma->vm_flags |= VM_IO;
    1.16 -    vma->vm_flags |= VM_RESERVED;
    1.17 -
    1.18 -    if(direct_remap_disc_page_range(vma->vm_start, mem_data->pfn, mem_data->tot_pages, 
    1.19 -                            vma->vm_page_prot))
    1.20 -        return -EAGAIN;
    1.21 -    
    1.22 -    return 0;
    1.23 -}
    1.24 -
    1.25  static ssize_t dom_mem_write(struct file * file, const char * buff, 
    1.26  	size_t size , loff_t * off)
    1.27  {
    1.28 @@ -188,6 +170,8 @@ static ssize_t dom_mem_read(struct file 
    1.29      prot = PAGE_SHARED; 
    1.30  
    1.31      /* remap the range using xen specific routines */
    1.32 +	printk(KERN_ALERT "bd240 debug: mem_read: mem_data %lx\n", mem_data);
    1.33 +
    1.34      addr = direct_mmap(mem_data->pfn << PAGE_SHIFT, mem_data->tot_pages << PAGE_SHIFT, prot, 0, 0);
    1.35      //addr = direct_mmap(mem_data->pfn, mem_data->tot_pages << PAGE_SHIFT, prot, 1, 
    1.36      //                mem_data->tot_pages);
    1.37 @@ -232,6 +216,8 @@ static int dom_map_mem(unsigned int dom,
    1.38                  memdata->tot_pages = tot_pages;
    1.39                  file->data = memdata;
    1.40  
    1.41 +				printk(KERN_ALERT "bd240 debug: associated memdata with proc, memdata %lx, pfn %lx, tot_pages %lx\n", file->data, memdata->pfn, memdata->tot_pages);
    1.42 +
    1.43                  ret = 0;
    1.44                  break;
    1.45              }