diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-01-15 19:56:43 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-15 20:56:32 -0500 |
commit | f25748e3c34eb8bb54853e9adba2d3dcf030503c (patch) | |
tree | 1305448a2cc3c7f4bf0b0f7eb4bd9f9176fe8eca /arch/x86/mm | |
parent | 01c8f1c44b83a0825b573e7c723b033cece37b86 (diff) |
mm, dax: convert vmf_insert_pfn_pmd() to pfn_t
Similar to the conversion of vm_insert_mixed() use pfn_t in the
vmf_insert_pfn_pmd() to tag the resulting pte with _PAGE_DEVICE when the
pfn is backed by a devm_memremap_pages() mapping.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Hansen <dave@sr71.net>
Cc: Matthew Wilcox <willy@linux.intel.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r-- | arch/x86/mm/pat.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c index 031782e74231..f4ae536b0914 100644 --- a/arch/x86/mm/pat.c +++ b/arch/x86/mm/pat.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/debugfs.h> | 12 | #include <linux/debugfs.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/pfn_t.h> | ||
15 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
16 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
17 | #include <linux/fs.h> | 18 | #include <linux/fs.h> |
@@ -949,7 +950,7 @@ int track_pfn_remap(struct vm_area_struct *vma, pgprot_t *prot, | |||
949 | } | 950 | } |
950 | 951 | ||
951 | int track_pfn_insert(struct vm_area_struct *vma, pgprot_t *prot, | 952 | int track_pfn_insert(struct vm_area_struct *vma, pgprot_t *prot, |
952 | unsigned long pfn) | 953 | pfn_t pfn) |
953 | { | 954 | { |
954 | enum page_cache_mode pcm; | 955 | enum page_cache_mode pcm; |
955 | 956 | ||
@@ -957,7 +958,7 @@ int track_pfn_insert(struct vm_area_struct *vma, pgprot_t *prot, | |||
957 | return 0; | 958 | return 0; |
958 | 959 | ||
959 | /* Set prot based on lookup */ | 960 | /* Set prot based on lookup */ |
960 | pcm = lookup_memtype((resource_size_t)pfn << PAGE_SHIFT); | 961 | pcm = lookup_memtype(pfn_t_to_phys(pfn)); |
961 | *prot = __pgprot((pgprot_val(vma->vm_page_prot) & (~_PAGE_CACHE_MASK)) | | 962 | *prot = __pgprot((pgprot_val(vma->vm_page_prot) & (~_PAGE_CACHE_MASK)) | |
962 | cachemode2protval(pcm)); | 963 | cachemode2protval(pcm)); |
963 | 964 | ||