From 6e3eac7406c353213b1470ca80f16c319d24aa33 Mon Sep 17 00:00:00 2001 From: William Lee Irwin III Date: Tue, 19 Oct 2004 18:29:04 -0700 Subject: [PATCH] [PATCH] vm: convert users of remap_page_range() under sound/ to use remap_pfn_range() This patch converts all users of remap_page_range() under sound/ to use remap_pfn_range(), with the exception of maestro3 changelogs, which are likely expected to be preserved intact apart from additions (as most changelogs are), regardless of API changes. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- sound/oss/ali5455.c | 6 ++++-- sound/oss/au1000.c | 5 +++-- sound/oss/cmpci.c | 6 ++++-- sound/oss/cs4281/cs4281m.c | 11 ++++++----- sound/oss/cs46xx.c | 7 ++++--- sound/oss/es1370.c | 10 +++++++--- sound/oss/es1371.c | 10 +++++++--- sound/oss/esssolo1.c | 6 ++++-- sound/oss/forte.c | 3 ++- sound/oss/i810_audio.c | 5 +++-- sound/oss/ite8172.c | 5 +++-- sound/oss/maestro.c | 6 ++++-- sound/oss/maestro3.c | 4 +++- sound/oss/rme96xx.c | 4 ++-- sound/oss/sonicvibes.c | 6 ++++-- sound/oss/soundcard.c | 6 +++--- sound/oss/trident.c | 5 +++-- sound/oss/ymfpci.c | 5 +++-- 18 files changed, 69 insertions(+), 41 deletions(-) diff --git a/sound/oss/ali5455.c b/sound/oss/ali5455.c index 9a371a565e84c..a331e87112fca 100644 --- a/sound/oss/ali5455.c +++ b/sound/oss/ali5455.c @@ -933,7 +933,7 @@ static int alloc_dmabuf(struct ali_state *state) dmabuf->rawbuf = rawbuf; dmabuf->buforder = order; - /* now mark the pages as reserved; otherwise remap_page_range doesn't do what we want */ + /* now mark the pages as reserved; otherwise remap_pfn_range doesn't do what we want */ pend = virt_to_page(rawbuf + (PAGE_SIZE << order) - 1); for (page = virt_to_page(rawbuf); page <= pend; page++) SetPageReserved(page); @@ -1954,7 +1954,9 @@ static int ali_mmap(struct file *file, struct vm_area_struct *vma) if (size > (PAGE_SIZE << dmabuf->buforder)) goto out; ret = -EAGAIN; - if (remap_page_range(vma, vma->vm_start, virt_to_phys(dmabuf->rawbuf), size, vma->vm_page_prot)) + if (remap_pfn_range(vma, vma->vm_start, + virt_to_phys(dmabuf->rawbuf) >> PAGE_SHIFT, + size, vma->vm_page_prot)) goto out; dmabuf->mapped = 1; dmabuf->trigger = 0; diff --git a/sound/oss/au1000.c b/sound/oss/au1000.c index c5d220e366dbd..9b2d8ed6510cc 100644 --- a/sound/oss/au1000.c +++ b/sound/oss/au1000.c @@ -629,7 +629,7 @@ static int prog_dmabuf(struct au1000_state *s, struct dmabuf *db) return -ENOMEM; db->buforder = order; /* now mark the pages as reserved; - otherwise remap_page_range doesn't do what we want */ + otherwise remap_pfn_range doesn't do what we want */ pend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1); for (page = virt_to_page(db->rawbuf); page <= pend; page++) @@ -1338,7 +1338,8 @@ static int au1000_mmap(struct file *file, struct vm_area_struct *vma) ret = -EINVAL; goto out; } - if (remap_page_range(vma->vm_start, virt_to_phys(db->rawbuf), + if (remap_pfn_range(vma->vm_start, + virt_to_phys(db->rawbuf) >> PAGE_SHIFT, size, vma->vm_page_prot)) { ret = -EAGAIN; goto out; diff --git a/sound/oss/cmpci.c b/sound/oss/cmpci.c index a862958ac4d2a..16ff7f094c200 100644 --- a/sound/oss/cmpci.c +++ b/sound/oss/cmpci.c @@ -1393,7 +1393,7 @@ static int prog_dmabuf(struct cm_state *s, unsigned rec) if (!db->rawbuf || !db->dmaaddr) return -ENOMEM; db->buforder = order; - /* now mark the pages as reserved; otherwise remap_page_range doesn't do what we want */ + /* now mark the pages as reserved; otherwise remap_pfn_range doesn't do what we want */ pend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1); for (pstart = virt_to_page(db->rawbuf); pstart <= pend; pstart++) SetPageReserved(pstart); @@ -2301,7 +2301,9 @@ static int cm_mmap(struct file *file, struct vm_area_struct *vma) if (size > (PAGE_SIZE << db->buforder)) goto out; ret = -EINVAL; - if (remap_page_range(vma, vma->vm_start, virt_to_phys(db->rawbuf), size, vma->vm_page_prot)) + if (remap_pfn_range(vma, vma->vm_start, + virt_to_phys(db->rawbuf) >> PAGE_SHIFT, + size, vma->vm_page_prot)) goto out; db->mapped = 1; ret = 0; diff --git a/sound/oss/cs4281/cs4281m.c b/sound/oss/cs4281/cs4281m.c index a6f09cc63c46a..dca843bba94b6 100644 --- a/sound/oss/cs4281/cs4281m.c +++ b/sound/oss/cs4281/cs4281m.c @@ -1755,7 +1755,7 @@ static int prog_dmabuf(struct cs4281_state *s, struct dmabuf *db) } db->buforder = order; // Now mark the pages as reserved; otherwise the - // remap_page_range() in cs4281_mmap doesn't work. + // remap_pfn_range() in cs4281_mmap doesn't work. // 1. get index to last page in mem_map array for rawbuf. mapend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1); @@ -1778,7 +1778,7 @@ static int prog_dmabuf(struct cs4281_state *s, struct dmabuf *db) } s->buforder_tmpbuff = order; // Now mark the pages as reserved; otherwise the - // remap_page_range() in cs4281_mmap doesn't work. + // remap_pfn_range() in cs4281_mmap doesn't work. // 1. get index to last page in mem_map array for rawbuf. mapend = virt_to_page(s->tmpbuff + (PAGE_SIZE << s->buforder_tmpbuff) - 1); @@ -3135,9 +3135,10 @@ static int cs4281_mmap(struct file *file, struct vm_area_struct *vma) size = vma->vm_end - vma->vm_start; if (size > (PAGE_SIZE << db->buforder)) return -EINVAL; - if (remap_page_range - (vma, vma->vm_start, virt_to_phys(db->rawbuf), size, - vma->vm_page_prot)) return -EAGAIN; + if (remap_pfn_range(vma, vma->vm_start, + virt_to_phys(db->rawbuf) >> PAGE_SHIFT, + size, vma->vm_page_prot)) + return -EAGAIN; db->mapped = 1; CS_DBGOUT(CS_FUNCTION | CS_PARMS | CS_OPEN, 4, diff --git a/sound/oss/cs46xx.c b/sound/oss/cs46xx.c index c212b948c423c..0d8f799bf73cc 100644 --- a/sound/oss/cs46xx.c +++ b/sound/oss/cs46xx.c @@ -1190,7 +1190,7 @@ static int alloc_dmabuf(struct cs_state *state) dmabuf->buforder = order; dmabuf->rawbuf = rawbuf; // Now mark the pages as reserved; otherwise the - // remap_page_range() in cs46xx_mmap doesn't work. + // remap_pfn_range() in cs46xx_mmap doesn't work. // 1. get index to last page in mem_map array for rawbuf. mapend = virt_to_page(dmabuf->rawbuf + (PAGE_SIZE << dmabuf->buforder) - 1); @@ -1227,7 +1227,7 @@ static int alloc_dmabuf(struct cs_state *state) dmabuf->buforder_tmpbuff = order; // Now mark the pages as reserved; otherwise the - // remap_page_range() in cs46xx_mmap doesn't work. + // remap_pfn_range() in cs46xx_mmap doesn't work. // 1. get index to last page in mem_map array for rawbuf. mapend = virt_to_page(dmabuf->tmpbuff + (PAGE_SIZE << dmabuf->buforder_tmpbuff) - 1); @@ -2452,7 +2452,8 @@ static int cs_mmap(struct file *file, struct vm_area_struct *vma) ret = -EINVAL; goto out; } - if (remap_page_range(vma, vma->vm_start, virt_to_phys(dmabuf->rawbuf), + if (remap_pfn_range(vma, vma->vm_start, + virt_to_phys(dmabuf->rawbuf) >> PAGE_SHIFT, size, vma->vm_page_prot)) { ret = -EAGAIN; diff --git a/sound/oss/es1370.c b/sound/oss/es1370.c index 57f9bc147699f..df8f0e334ffce 100644 --- a/sound/oss/es1370.c +++ b/sound/oss/es1370.c @@ -573,7 +573,7 @@ static int prog_dmabuf(struct es1370_state *s, struct dmabuf *db, unsigned rate, if (!db->rawbuf) return -ENOMEM; db->buforder = order; - /* now mark the pages as reserved; otherwise remap_page_range doesn't do what we want */ + /* now mark the pages as reserved; otherwise remap_pfn_range doesn't do what we want */ pend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1); for (page = virt_to_page(db->rawbuf); page <= pend; page++) SetPageReserved(page); @@ -1364,7 +1364,9 @@ static int es1370_mmap(struct file *file, struct vm_area_struct *vma) ret = -EINVAL; goto out; } - if (remap_page_range(vma, vma->vm_start, virt_to_phys(db->rawbuf), size, vma->vm_page_prot)) { + if (remap_pfn_range(vma, vma->vm_start, + virt_to_phys(db->rawbuf) >> PAGE_SHIFT, + size, vma->vm_page_prot)) { ret = -EAGAIN; goto out; } @@ -1940,7 +1942,9 @@ static int es1370_mmap_dac(struct file *file, struct vm_area_struct *vma) if (size > (PAGE_SIZE << s->dma_dac1.buforder)) goto out; ret = -EAGAIN; - if (remap_page_range(vma, vma->vm_start, virt_to_phys(s->dma_dac1.rawbuf), size, vma->vm_page_prot)) + if (remap_pfn_range(vma, vma->vm_start, + virt_to_phys(s->dma_dac1.rawbuf) >> PAGE_SHIFT, + size, vma->vm_page_prot)) goto out; s->dma_dac1.mapped = 1; ret = 0; diff --git a/sound/oss/es1371.c b/sound/oss/es1371.c index d6b59fbe5ad3c..ab40e1d876ea8 100644 --- a/sound/oss/es1371.c +++ b/sound/oss/es1371.c @@ -910,7 +910,7 @@ static int prog_dmabuf(struct es1371_state *s, struct dmabuf *db, unsigned rate, if (!db->rawbuf) return -ENOMEM; db->buforder = order; - /* now mark the pages as reserved; otherwise remap_page_range doesn't do what we want */ + /* now mark the pages as reserved; otherwise remap_pfn_range doesn't do what we want */ pend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1); for (page = virt_to_page(db->rawbuf); page <= pend; page++) SetPageReserved(page); @@ -1555,7 +1555,9 @@ static int es1371_mmap(struct file *file, struct vm_area_struct *vma) ret = -EINVAL; goto out; } - if (remap_page_range(vma, vma->vm_start, virt_to_phys(db->rawbuf), size, vma->vm_page_prot)) { + if (remap_pfn_range(vma, vma->vm_start, + virt_to_phys(db->rawbuf) >> PAGE_SHIFT, + size, vma->vm_page_prot)) { ret = -EAGAIN; goto out; } @@ -2128,7 +2130,9 @@ static int es1371_mmap_dac(struct file *file, struct vm_area_struct *vma) if (size > (PAGE_SIZE << s->dma_dac1.buforder)) goto out; ret = -EAGAIN; - if (remap_page_range(vma, vma->vm_start, virt_to_phys(s->dma_dac1.rawbuf), size, vma->vm_page_prot)) + if (remap_pfn_range(vma, vma->vm_start, + virt_to_phys(s->dma_dac1.rawbuf) >> PAGE_SHIFT, + size, vma->vm_page_prot)) goto out; s->dma_dac1.mapped = 1; ret = 0; diff --git a/sound/oss/esssolo1.c b/sound/oss/esssolo1.c index 6fca0663d0dba..3e73405b3d45e 100644 --- a/sound/oss/esssolo1.c +++ b/sound/oss/esssolo1.c @@ -445,7 +445,7 @@ static int prog_dmabuf(struct solo1_state *s, struct dmabuf *db) if (!db->rawbuf) return -ENOMEM; db->buforder = order; - /* now mark the pages as reserved; otherwise remap_page_range doesn't do what we want */ + /* now mark the pages as reserved; otherwise remap_pfn_range doesn't do what we want */ pend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1); for (page = virt_to_page(db->rawbuf); page <= pend; page++) SetPageReserved(page); @@ -1242,7 +1242,9 @@ static int solo1_mmap(struct file *file, struct vm_area_struct *vma) if (size > (PAGE_SIZE << db->buforder)) goto out; ret = -EAGAIN; - if (remap_page_range(vma, vma->vm_start, virt_to_phys(db->rawbuf), size, vma->vm_page_prot)) + if (remap_pfn_range(vma, vma->vm_start, + virt_to_phys(db->rawbuf) >> PAGE_SHIFT, + size, vma->vm_page_prot)) goto out; db->mapped = 1; ret = 0; diff --git a/sound/oss/forte.c b/sound/oss/forte.c index a4cd8418cc529..9f15f305fcf8f 100644 --- a/sound/oss/forte.c +++ b/sound/oss/forte.c @@ -1409,7 +1409,8 @@ forte_dsp_mmap (struct file *file, struct vm_area_struct *vma) goto out; } - if (remap_page_range (vma, vma->vm_start, virt_to_phys (channel->buf), + if (remap_pfn_range(vma, vma->vm_start, + virt_to_phys(channel->buf) >> PAGE_SHIFT, size, vma->vm_page_prot)) { DPRINTK ("%s: remap el a no worko\n", __FUNCTION__); ret = -EAGAIN; diff --git a/sound/oss/i810_audio.c b/sound/oss/i810_audio.c index d5ee1e3d790f8..f49a80b8b337a 100644 --- a/sound/oss/i810_audio.c +++ b/sound/oss/i810_audio.c @@ -916,7 +916,7 @@ static int alloc_dmabuf(struct i810_state *state) dmabuf->rawbuf = rawbuf; dmabuf->buforder = order; - /* now mark the pages as reserved; otherwise remap_page_range doesn't do what we want */ + /* now mark the pages as reserved; otherwise remap_pfn_range doesn't do what we want */ pend = virt_to_page(rawbuf + (PAGE_SIZE << order) - 1); for (page = virt_to_page(rawbuf); page <= pend; page++) SetPageReserved(page); @@ -1749,7 +1749,8 @@ static int i810_mmap(struct file *file, struct vm_area_struct *vma) if (size > (PAGE_SIZE << dmabuf->buforder)) goto out; ret = -EAGAIN; - if (remap_page_range(vma, vma->vm_start, virt_to_phys(dmabuf->rawbuf), + if (remap_pfn_range(vma, vma->vm_start, + virt_to_phys(dmabuf->rawbuf) >> PAGE_SHIFT, size, vma->vm_page_prot)) goto out; dmabuf->mapped = 1; diff --git a/sound/oss/ite8172.c b/sound/oss/ite8172.c index f98413314733c..57718fe9961cc 100644 --- a/sound/oss/ite8172.c +++ b/sound/oss/ite8172.c @@ -693,7 +693,7 @@ static int prog_dmabuf(struct it8172_state *s, struct dmabuf *db, return -ENOMEM; db->buforder = order; /* now mark the pages as reserved; - otherwise remap_page_range doesn't do what we want */ + otherwise remap_pfn_range doesn't do what we want */ pend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1); for (page = virt_to_page(db->rawbuf); page <= pend; page++) @@ -1311,7 +1311,8 @@ static int it8172_mmap(struct file *file, struct vm_area_struct *vma) unlock_kernel(); return -EINVAL; } - if (remap_page_range(vma, vma->vm_start, virt_to_phys(db->rawbuf), + if (remap_pfn_range(vma, vma->vm_start, + virt_to_phys(db->rawbuf) >> PAGE_SHIFT, size, vma->vm_page_prot)) { unlock_kernel(); return -EAGAIN; diff --git a/sound/oss/maestro.c b/sound/oss/maestro.c index 66456dbb27272..84fe23d8270cc 100644 --- a/sound/oss/maestro.c +++ b/sound/oss/maestro.c @@ -2520,7 +2520,9 @@ static int ess_mmap(struct file *file, struct vm_area_struct *vma) if (size > (PAGE_SIZE << db->buforder)) goto out; ret = -EAGAIN; - if (remap_page_range(vma, vma->vm_start, virt_to_phys(db->rawbuf), size, vma->vm_page_prot)) + if (remap_pfn_range(vma, vma->vm_start, + virt_to_phys(db->rawbuf) >> PAGE_SHIFT, + size, vma->vm_page_prot)) goto out; db->mapped = 1; ret = 0; @@ -2953,7 +2955,7 @@ allocate_buffers(struct ess_state *s) } - /* now mark the pages as reserved; otherwise remap_page_range doesn't do what we want */ + /* now mark the pages as reserved; otherwise remap_pfn_range doesn't do what we want */ pend = virt_to_page(rawbuf + (PAGE_SIZE << order) - 1); for (page = virt_to_page(rawbuf); page <= pend; page++) SetPageReserved(page); diff --git a/sound/oss/maestro3.c b/sound/oss/maestro3.c index 6157b1dadcd4d..d2573bb0b4d1f 100644 --- a/sound/oss/maestro3.c +++ b/sound/oss/maestro3.c @@ -1557,7 +1557,9 @@ static int m3_mmap(struct file *file, struct vm_area_struct *vma) * ask Jeff what the hell I'm doing wrong. */ ret = -EAGAIN; - if (remap_page_range(vma, vma->vm_start, virt_to_phys(db->rawbuf), size, vma->vm_page_prot)) + if (remap_pfn_range(vma, vma->vm_start, + virt_to_phys(db->rawbuf) >> PAGE_SHIFT, + size, vma->vm_page_prot)) goto out; db->mapped = 1; diff --git a/sound/oss/rme96xx.c b/sound/oss/rme96xx.c index c770137f78806..1bb31b4d7c427 100644 --- a/sound/oss/rme96xx.c +++ b/sound/oss/rme96xx.c @@ -1685,14 +1685,14 @@ static int rm96xx_mmap(struct file *file, struct vm_area_struct *vma) { if (vma->vm_flags & VM_WRITE) { if (!s->started) rme96xx_startcard(s,1); - if (remap_page_range(vma, vma->vm_start, virt_to_phys(s->playbuf + dma->outoffset*RME96xx_DMA_MAX_SIZE), size, vma->vm_page_prot)) { + if (remap_pfn_range(vma, vma->vm_start, virt_to_phys(s->playbuf + dma->outoffset*RME96xx_DMA_MAX_SIZE) >> PAGE_SHIFT, size, vma->vm_page_prot)) { unlock_kernel(); return -EAGAIN; } } else if (vma->vm_flags & VM_READ) { if (!s->started) rme96xx_startcard(s,1); - if (remap_page_range(vma, vma->vm_start, virt_to_phys(s->playbuf + dma->inoffset*RME96xx_DMA_MAX_SIZE), size, vma->vm_page_prot)) { + if (remap_pfn_range(vma, vma->vm_start, virt_to_phys(s->playbuf + dma->inoffset*RME96xx_DMA_MAX_SIZE) >> PAGE_SHIFT, size, vma->vm_page_prot)) { unlock_kernel(); return -EAGAIN; } diff --git a/sound/oss/sonicvibes.c b/sound/oss/sonicvibes.c index 8bb6deaad0358..70c91ddd4d761 100644 --- a/sound/oss/sonicvibes.c +++ b/sound/oss/sonicvibes.c @@ -756,7 +756,7 @@ static int prog_dmabuf(struct sv_state *s, unsigned rec) if ((virt_to_bus(db->rawbuf) + (PAGE_SIZE << db->buforder) - 1) & ~0xffffff) printk(KERN_DEBUG "sv: DMA buffer beyond 16MB: busaddr 0x%lx size %ld\n", virt_to_bus(db->rawbuf), PAGE_SIZE << db->buforder); - /* now mark the pages as reserved; otherwise remap_page_range doesn't do what we want */ + /* now mark the pages as reserved; otherwise remap_pfn_range doesn't do what we want */ pend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1); for (page = virt_to_page(db->rawbuf); page <= pend; page++) SetPageReserved(page); @@ -1549,7 +1549,9 @@ static int sv_mmap(struct file *file, struct vm_area_struct *vma) if (size > (PAGE_SIZE << db->buforder)) goto out; ret = -EAGAIN; - if (remap_page_range(vma, vma->vm_start, virt_to_phys(db->rawbuf), size, vma->vm_page_prot)) + if (remap_pfn_range(vma, vma->vm_start, + virt_to_phys(db->rawbuf) >> PAGE_SHIFT, + size, vma->vm_page_prot)) goto out; db->mapped = 1; ret = 0; diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c index 7e228966eca92..8d6c95fa90477 100644 --- a/sound/oss/soundcard.c +++ b/sound/oss/soundcard.c @@ -463,9 +463,9 @@ static int sound_mmap(struct file *file, struct vm_area_struct *vma) if (size != dmap->bytes_in_use) { printk(KERN_WARNING "Sound: mmap() size = %ld. Should be %d\n", size, dmap->bytes_in_use); } - if (remap_page_range(vma, vma->vm_start, virt_to_phys(dmap->raw_buf), - vma->vm_end - vma->vm_start, - vma->vm_page_prot)) { + if (remap_pfn_range(vma, vma->vm_start, + virt_to_phys(dmap->raw_buf) >> PAGE_SHIFT, + vma->vm_end - vma->vm_start, vma->vm_page_prot)) { unlock_kernel(); return -EAGAIN; } diff --git a/sound/oss/trident.c b/sound/oss/trident.c index 77100b1ca08d6..47b129f3abf12 100644 --- a/sound/oss/trident.c +++ b/sound/oss/trident.c @@ -1281,7 +1281,7 @@ alloc_dmabuf(struct dmabuf *dmabuf, struct pci_dev *pci_dev, int order) dmabuf->buforder = order; /* now mark the pages as reserved; otherwise */ - /* remap_page_range doesn't do what we want */ + /* remap_pfn_range doesn't do what we want */ pend = virt_to_page(rawbuf + (PAGE_SIZE << order) - 1); for (page = virt_to_page(rawbuf); page <= pend; page++) SetPageReserved(page); @@ -2223,7 +2223,8 @@ trident_mmap(struct file *file, struct vm_area_struct *vma) if (size > (PAGE_SIZE << dmabuf->buforder)) goto out; ret = -EAGAIN; - if (remap_page_range(vma, vma->vm_start, virt_to_phys(dmabuf->rawbuf), + if (remap_pfn_range(vma, vma->vm_start, + virt_to_phys(dmabuf->rawbuf) >> PAGE_SHIFT, size, vma->vm_page_prot)) goto out; dmabuf->mapped = 1; diff --git a/sound/oss/ymfpci.c b/sound/oss/ymfpci.c index 13bcc7621cf8d..f552f304ae788 100644 --- a/sound/oss/ymfpci.c +++ b/sound/oss/ymfpci.c @@ -334,7 +334,7 @@ static int alloc_dmabuf(ymfpci_t *unit, struct ymf_dmabuf *dmabuf) dmabuf->dma_addr = dma_addr; dmabuf->buforder = order; - /* now mark the pages as reserved; otherwise remap_page_range doesn't do what we want */ + /* now mark the pages as reserved; otherwise remap_pfn_range doesn't do what we want */ mapend = virt_to_page(rawbuf + (PAGE_SIZE << order) - 1); for (map = virt_to_page(rawbuf); map <= mapend; map++) set_bit(PG_reserved, &map->flags); @@ -1545,7 +1545,8 @@ static int ymf_mmap(struct file *file, struct vm_area_struct *vma) size = vma->vm_end - vma->vm_start; if (size > (PAGE_SIZE << dmabuf->buforder)) return -EINVAL; - if (remap_page_range(vma, vma->vm_start, virt_to_phys(dmabuf->rawbuf), + if (remap_pfn_range(vma, vma->vm_start, + virt_to_phys(dmabuf->rawbuf) >> PAGE_SHIFT, size, vma->vm_page_prot)) return -EAGAIN; dmabuf->mapped = 1; -- 2.53.0