From: kaf24@firebug.cl.cam.ac.uk Date: Fri, 28 Apr 2006 13:42:53 +0000 (+0100) Subject: xen/ia64 with dom0 vp model needs direct_remap_pfn_range() to be called X-Git-Tag: 3.0.3-branched~855^2~52 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=1de2453162256395730e7cd1a06c77728be034ff;p=xen.git xen/ia64 with dom0 vp model needs direct_remap_pfn_range() to be called for IOCTL_PRIVCMD_MMAPBATCH. Signed-off-by: Isaku Yamahata --- diff --git a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c index e572fa7c79..5b51e3271d 100644 --- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c +++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c @@ -159,12 +159,14 @@ static int privcmd_ioctl(struct inode *inode, struct file *file, break; case IOCTL_PRIVCMD_MMAPBATCH: { +#ifndef __ia64__ mmu_update_t u; + uint64_t ptep; +#endif privcmd_mmapbatch_t m; struct vm_area_struct *vma = NULL; unsigned long __user *p; unsigned long addr, mfn; - uint64_t ptep; int i; if (copy_from_user(&m, udata, sizeof(m))) { @@ -199,11 +201,9 @@ static int privcmd_ioctl(struct inode *inode, struct file *file, if (get_user(mfn, p)) return -EFAULT; #ifdef __ia64__ - ret = remap_pfn_range(vma, - addr&PAGE_MASK, - mfn, - 1<vm_page_prot); + ret = direct_remap_pfn_range(vma, addr & PAGE_MASK, + mfn, 1 << PAGE_SHIFT, + vma->vm_page_prot, m.dom); if (ret < 0) goto batch_err; #else