diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-01-15 19:56:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-15 20:56:32 -0500 |
commit | 01c8f1c44b83a0825b573e7c723b033cece37b86 (patch) | |
tree | 5900d53e74db4515aa6aa760dd120122171fdaa0 /drivers/gpu/drm/gma500/framebuffer.c | |
parent | 69660fd797c3e52f7f20478a27687f293d1a41be (diff) |
mm, dax, gpu: convert vm_insert_mixed to pfn_t
Convert the raw unsigned long 'pfn' argument to pfn_t for the purpose of
evaluating the PFN_MAP and PFN_DEV flags. When both are set it triggers
_PAGE_DEVMAP to be set in the resulting pte.
There are no functional changes to the gpu drivers as a result of this
conversion.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Hansen <dave@sr71.net>
Cc: David Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/gpu/drm/gma500/framebuffer.c')
-rw-r--r-- | drivers/gpu/drm/gma500/framebuffer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c index 2eaf1b31c7bd..72bc979fa0dc 100644 --- a/drivers/gpu/drm/gma500/framebuffer.c +++ b/drivers/gpu/drm/gma500/framebuffer.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
23 | #include <linux/string.h> | 23 | #include <linux/string.h> |
24 | #include <linux/pfn_t.h> | ||
24 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
25 | #include <linux/tty.h> | 26 | #include <linux/tty.h> |
26 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
@@ -132,7 +133,8 @@ static int psbfb_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf) | |||
132 | for (i = 0; i < page_num; i++) { | 133 | for (i = 0; i < page_num; i++) { |
133 | pfn = (phys_addr >> PAGE_SHIFT); | 134 | pfn = (phys_addr >> PAGE_SHIFT); |
134 | 135 | ||
135 | ret = vm_insert_mixed(vma, address, pfn); | 136 | ret = vm_insert_mixed(vma, address, |
137 | __pfn_to_pfn_t(pfn, PFN_DEV)); | ||
136 | if (unlikely((ret == -EBUSY) || (ret != 0 && i > 0))) | 138 | if (unlikely((ret == -EBUSY) || (ret != 0 && i > 0))) |
137 | break; | 139 | break; |
138 | else if (unlikely(ret != 0)) { | 140 | else if (unlikely(ret != 0)) { |