diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-02-04 10:21:04 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-02-04 10:21:04 +0300 |
commit | 9717c1cea16e3eae81ca226f4c3670bb799b61ad (patch) | |
tree | 80137d0ab55ed25cce3d7ccb8dde8dc841ee7bdb /include/linux | |
parent | 79703e014ba02ad86af4bcdf0c16e4b208cca406 (diff) | |
parent | b45f1b3b585e195a7daead16d914e164310b1df6 (diff) | |
download | linux-9717c1cea16e3eae81ca226f4c3670bb799b61ad.tar.xz |
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/linux')
-rw-r--r-- | include/linux/mm.h | 2 | ||||
-rw-r--r-- | include/linux/mm_types.h | 7 |
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. */ /* |