Commit 6ed2288c authored by Al Viro's avatar Al Viro

vchiq_2835_arm: switch to get_user_pages_fast()

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 2bd6bf03
...@@ -92,8 +92,7 @@ static irqreturn_t ...@@ -92,8 +92,7 @@ static irqreturn_t
vchiq_doorbell_irq(int irq, void *dev_id); vchiq_doorbell_irq(int irq, void *dev_id);
static struct vchiq_pagelist_info * static struct vchiq_pagelist_info *
create_pagelist(char __user *buf, size_t count, unsigned short type, create_pagelist(char __user *buf, size_t count, unsigned short type);
struct task_struct *task);
static void static void
free_pagelist(struct vchiq_pagelist_info *pagelistinfo, free_pagelist(struct vchiq_pagelist_info *pagelistinfo,
...@@ -251,8 +250,7 @@ vchiq_prepare_bulk_data(VCHIQ_BULK_T *bulk, VCHI_MEM_HANDLE_T memhandle, ...@@ -251,8 +250,7 @@ vchiq_prepare_bulk_data(VCHIQ_BULK_T *bulk, VCHI_MEM_HANDLE_T memhandle,
pagelistinfo = create_pagelist((char __user *)offset, size, pagelistinfo = create_pagelist((char __user *)offset, size,
(dir == VCHIQ_BULK_RECEIVE) (dir == VCHIQ_BULK_RECEIVE)
? PAGELIST_READ ? PAGELIST_READ
: PAGELIST_WRITE, : PAGELIST_WRITE);
current);
if (!pagelistinfo) if (!pagelistinfo)
return VCHIQ_ERROR; return VCHIQ_ERROR;
...@@ -391,8 +389,7 @@ cleanup_pagelistinfo(struct vchiq_pagelist_info *pagelistinfo) ...@@ -391,8 +389,7 @@ cleanup_pagelistinfo(struct vchiq_pagelist_info *pagelistinfo)
*/ */
static struct vchiq_pagelist_info * static struct vchiq_pagelist_info *
create_pagelist(char __user *buf, size_t count, unsigned short type, create_pagelist(char __user *buf, size_t count, unsigned short type)
struct task_struct *task)
{ {
PAGELIST_T *pagelist; PAGELIST_T *pagelist;
struct vchiq_pagelist_info *pagelistinfo; struct vchiq_pagelist_info *pagelistinfo;
...@@ -472,14 +469,11 @@ create_pagelist(char __user *buf, size_t count, unsigned short type, ...@@ -472,14 +469,11 @@ create_pagelist(char __user *buf, size_t count, unsigned short type,
} }
/* do not try and release vmalloc pages */ /* do not try and release vmalloc pages */
} else { } else {
down_read(&task->mm->mmap_sem); actual_pages = get_user_pages_fast(
actual_pages = get_user_pages( (unsigned long)buf & PAGE_MASK,
(unsigned long)buf & PAGE_MASK,
num_pages, num_pages,
(type == PAGELIST_READ) ? FOLL_WRITE : 0, type == PAGELIST_READ,
pages, pages);
NULL /*vmas */);
up_read(&task->mm->mmap_sem);
if (actual_pages != num_pages) { if (actual_pages != num_pages) {
vchiq_log_info(vchiq_arm_log_level, vchiq_log_info(vchiq_arm_log_level,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment