From 1de2453162256395730e7cd1a06c77728be034ff Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Fri, 28 Apr 2006 14:42:53 +0100 Subject: [PATCH] xen/ia64 with dom0 vp model needs direct_remap_pfn_range() to be called for IOCTL_PRIVCMD_MMAPBATCH. Signed-off-by: Isaku Yamahata --- linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 -- 2.39.5