[Intel-gfx] [PATCH 1/2] mm: Handle prefault for size >= 2GB
Sagar Arun Kamble
sagar.a.kamble at intel.com
Mon Feb 13 06:44:14 UTC 2017
From: "sagar.a.kamble at intel.com" <sagar.a.kamble at intel.com>
i915 gem_exec_reloc subtests *-31 exercise relocation entries object
that is of size >=2GB. This patch will allow prefaulting >=2GB size.
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Sagar Arun Kamble <sagar.a.kamble at intel.com>
---
include/linux/pagemap.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 324c8dba..ec27ba2 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -538,7 +538,8 @@ static inline void wait_on_page_writeback(struct page *page)
/*
* Fault everything in given userspace address range in.
*/
-static inline int fault_in_pages_writeable(char __user *uaddr, int size)
+static inline int fault_in_pages_writeable(char __user *uaddr,
+ unsigned long size)
{
char __user *end = uaddr + size - 1;
@@ -565,7 +566,8 @@ static inline int fault_in_pages_writeable(char __user *uaddr, int size)
return 0;
}
-static inline int fault_in_pages_readable(const char __user *uaddr, int size)
+static inline int fault_in_pages_readable(const char __user *uaddr,
+ unsigned long size)
{
volatile char c;
const char __user *end = uaddr + size - 1;
--
1.9.1
More information about the Intel-gfx
mailing list