ia64/xen-unstable

changeset 9892:fb3d073b1cdf

xen/ia64 with dom0 vp model needs direct_remap_pfn_range() to be called
for IOCTL_PRIVCMD_MMAPBATCH.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author kaf24@firebug.cl.cam.ac.uk
date Fri Apr 28 14:42:53 2006 +0100 (2006-04-28)
parents 84780e2ea775
children eba707397410
files linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c	Fri Apr 28 14:38:39 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c	Fri Apr 28 14:42:53 2006 +0100
     1.3 @@ -159,12 +159,14 @@ static int privcmd_ioctl(struct inode *i
     1.4  	break;
     1.5  
     1.6  	case IOCTL_PRIVCMD_MMAPBATCH: {
     1.7 +#ifndef __ia64__
     1.8  		mmu_update_t u;
     1.9 +		uint64_t ptep;
    1.10 +#endif
    1.11  		privcmd_mmapbatch_t m;
    1.12  		struct vm_area_struct *vma = NULL;
    1.13  		unsigned long __user *p;
    1.14  		unsigned long addr, mfn; 
    1.15 -		uint64_t ptep;
    1.16  		int i;
    1.17  
    1.18  		if (copy_from_user(&m, udata, sizeof(m))) {
    1.19 @@ -199,11 +201,9 @@ static int privcmd_ioctl(struct inode *i
    1.20  			if (get_user(mfn, p))
    1.21  				return -EFAULT;
    1.22  #ifdef __ia64__
    1.23 -			ret = remap_pfn_range(vma,
    1.24 -					      addr&PAGE_MASK,
    1.25 -					      mfn,
    1.26 -					      1<<PAGE_SHIFT,
    1.27 -					      vma->vm_page_prot);
    1.28 +			ret = direct_remap_pfn_range(vma, addr & PAGE_MASK,
    1.29 +						     mfn, 1 << PAGE_SHIFT,
    1.30 +						     vma->vm_page_prot, m.dom);
    1.31  			if (ret < 0)
    1.32  			    goto batch_err;
    1.33  #else