aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-02-04 07:21:04 +0000
committerLinus Torvalds <torvalds@linux-foundation.org>2020-02-04 07:21:04 +0000
commit9717c1cea16e3eae81ca226f4c3670bb799b61ad (patch)
tree80137d0ab55ed25cce3d7ccb8dde8dc841ee7bdb /include
parentMerge tag 'tag-chrome-platform-for-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux (diff)
parentMerge branch 'ttm-prot-fix' of git://people.freedesktop.org/~thomash/linux into drm-next (diff)
downloadlinux-dev-9717c1cea16e3eae81ca226f4c3670bb799b61ad.tar.xz
linux-dev-9717c1cea16e3eae81ca226f4c3670bb799b61ad.zip
Merge tag 'drm-next-2020-02-04' of git://anongit.freedesktop.org/drm/drm
Pull drm ttm/mm updates from Dave Airlie: "Thomas Hellstrom has some more changes to the TTM layer that needed a patch to the mm subsystem. This adds a new mm API vmf_insert_mixed_prot to avoid an ugly hack that has limitations in the TTM layer" * tag 'drm-next-2020-02-04' of git://anongit.freedesktop.org/drm/drm: mm, drm/ttm: Fix vm page protection handling mm: Add a vmf_insert_mixed_prot() function
Diffstat (limited to 'include')
-rw-r--r--include/linux/mm.h2
-rw-r--r--include/linux/mm_types.h7
2 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 73a044ed6981..faa3bb5fe633 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -2535,6 +2535,8 @@ vm_fault_t vmf_insert_pfn_prot(struct vm_area_struct *vma, unsigned long addr,
unsigned long pfn, pgprot_t pgprot);
vm_fault_t vmf_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
pfn_t pfn);
+vm_fault_t vmf_insert_mixed_prot(struct vm_area_struct *vma, unsigned long addr,
+ pfn_t pfn, pgprot_t pgprot);
vm_fault_t vmf_insert_mixed_mkwrite(struct vm_area_struct *vma,
unsigned long addr, pfn_t pfn);
int vm_iomap_memory(struct vm_area_struct *vma, phys_addr_t start, unsigned long len);
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index e87bb864bdb2..c28911c3afa8 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -312,7 +312,12 @@ struct vm_area_struct {
/* Second cache line starts here. */
struct mm_struct *vm_mm; /* The address space we belong to. */
- pgprot_t vm_page_prot; /* Access permissions of this VMA. */
+
+ /*
+ * Access permissions of this VMA.
+ * See vmf_insert_mixed_prot() for discussion.
+ */
+ pgprot_t vm_page_prot;
unsigned long vm_flags; /* Flags, see mm.h. */
/*