diff options
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index ea818ff739cd..ad06d42adb1a 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1312,8 +1312,6 @@ void free_pgd_range(struct mmu_gather *tlb, unsigned long addr, | |||
1312 | unsigned long end, unsigned long floor, unsigned long ceiling); | 1312 | unsigned long end, unsigned long floor, unsigned long ceiling); |
1313 | int copy_page_range(struct mm_struct *dst, struct mm_struct *src, | 1313 | int copy_page_range(struct mm_struct *dst, struct mm_struct *src, |
1314 | struct vm_area_struct *vma); | 1314 | struct vm_area_struct *vma); |
1315 | void unmap_mapping_range(struct address_space *mapping, | ||
1316 | loff_t const holebegin, loff_t const holelen, int even_cows); | ||
1317 | int follow_pte_pmd(struct mm_struct *mm, unsigned long address, | 1315 | int follow_pte_pmd(struct mm_struct *mm, unsigned long address, |
1318 | unsigned long *start, unsigned long *end, | 1316 | unsigned long *start, unsigned long *end, |
1319 | pte_t **ptepp, pmd_t **pmdpp, spinlock_t **ptlp); | 1317 | pte_t **ptepp, pmd_t **pmdpp, spinlock_t **ptlp); |
@@ -1324,12 +1322,6 @@ int follow_phys(struct vm_area_struct *vma, unsigned long address, | |||
1324 | int generic_access_phys(struct vm_area_struct *vma, unsigned long addr, | 1322 | int generic_access_phys(struct vm_area_struct *vma, unsigned long addr, |
1325 | void *buf, int len, int write); | 1323 | void *buf, int len, int write); |
1326 | 1324 | ||
1327 | static inline void unmap_shared_mapping_range(struct address_space *mapping, | ||
1328 | loff_t const holebegin, loff_t const holelen) | ||
1329 | { | ||
1330 | unmap_mapping_range(mapping, holebegin, holelen, 0); | ||
1331 | } | ||
1332 | |||
1333 | extern void truncate_pagecache(struct inode *inode, loff_t new); | 1325 | extern void truncate_pagecache(struct inode *inode, loff_t new); |
1334 | extern void truncate_setsize(struct inode *inode, loff_t newsize); | 1326 | extern void truncate_setsize(struct inode *inode, loff_t newsize); |
1335 | void pagecache_isize_extended(struct inode *inode, loff_t from, loff_t to); | 1327 | void pagecache_isize_extended(struct inode *inode, loff_t from, loff_t to); |
@@ -1344,6 +1336,10 @@ extern int handle_mm_fault(struct vm_area_struct *vma, unsigned long address, | |||
1344 | extern int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm, | 1336 | extern int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm, |
1345 | unsigned long address, unsigned int fault_flags, | 1337 | unsigned long address, unsigned int fault_flags, |
1346 | bool *unlocked); | 1338 | bool *unlocked); |
1339 | void unmap_mapping_pages(struct address_space *mapping, | ||
1340 | pgoff_t start, pgoff_t nr, bool even_cows); | ||
1341 | void unmap_mapping_range(struct address_space *mapping, | ||
1342 | loff_t const holebegin, loff_t const holelen, int even_cows); | ||
1347 | #else | 1343 | #else |
1348 | static inline int handle_mm_fault(struct vm_area_struct *vma, | 1344 | static inline int handle_mm_fault(struct vm_area_struct *vma, |
1349 | unsigned long address, unsigned int flags) | 1345 | unsigned long address, unsigned int flags) |
@@ -1360,10 +1356,20 @@ static inline int fixup_user_fault(struct task_struct *tsk, | |||
1360 | BUG(); | 1356 | BUG(); |
1361 | return -EFAULT; | 1357 | return -EFAULT; |
1362 | } | 1358 | } |
1359 | static inline void unmap_mapping_pages(struct address_space *mapping, | ||
1360 | pgoff_t start, pgoff_t nr, bool even_cows) { } | ||
1361 | static inline void unmap_mapping_range(struct address_space *mapping, | ||
1362 | loff_t const holebegin, loff_t const holelen, int even_cows) { } | ||
1363 | #endif | 1363 | #endif |
1364 | 1364 | ||
1365 | extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, | 1365 | static inline void unmap_shared_mapping_range(struct address_space *mapping, |
1366 | unsigned int gup_flags); | 1366 | loff_t const holebegin, loff_t const holelen) |
1367 | { | ||
1368 | unmap_mapping_range(mapping, holebegin, holelen, 0); | ||
1369 | } | ||
1370 | |||
1371 | extern int access_process_vm(struct task_struct *tsk, unsigned long addr, | ||
1372 | void *buf, int len, unsigned int gup_flags); | ||
1367 | extern int access_remote_vm(struct mm_struct *mm, unsigned long addr, | 1373 | extern int access_remote_vm(struct mm_struct *mm, unsigned long addr, |
1368 | void *buf, int len, unsigned int gup_flags); | 1374 | void *buf, int len, unsigned int gup_flags); |
1369 | extern int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm, | 1375 | extern int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm, |
@@ -2069,8 +2075,8 @@ static inline void zero_resv_unavail(void) {} | |||
2069 | #endif | 2075 | #endif |
2070 | 2076 | ||
2071 | extern void set_dma_reserve(unsigned long new_dma_reserve); | 2077 | extern void set_dma_reserve(unsigned long new_dma_reserve); |
2072 | extern void memmap_init_zone(unsigned long, int, unsigned long, | 2078 | extern void memmap_init_zone(unsigned long, int, unsigned long, unsigned long, |
2073 | unsigned long, enum memmap_context); | 2079 | enum memmap_context, struct vmem_altmap *); |
2074 | extern void setup_per_zone_wmarks(void); | 2080 | extern void setup_per_zone_wmarks(void); |
2075 | extern int __meminit init_per_zone_wmark_min(void); | 2081 | extern int __meminit init_per_zone_wmark_min(void); |
2076 | extern void mem_init(void); | 2082 | extern void mem_init(void); |
@@ -2538,7 +2544,8 @@ void sparse_mem_maps_populate_node(struct page **map_map, | |||
2538 | unsigned long map_count, | 2544 | unsigned long map_count, |
2539 | int nodeid); | 2545 | int nodeid); |
2540 | 2546 | ||
2541 | struct page *sparse_mem_map_populate(unsigned long pnum, int nid); | 2547 | struct page *sparse_mem_map_populate(unsigned long pnum, int nid, |
2548 | struct vmem_altmap *altmap); | ||
2542 | pgd_t *vmemmap_pgd_populate(unsigned long addr, int node); | 2549 | pgd_t *vmemmap_pgd_populate(unsigned long addr, int node); |
2543 | p4d_t *vmemmap_p4d_populate(pgd_t *pgd, unsigned long addr, int node); | 2550 | p4d_t *vmemmap_p4d_populate(pgd_t *pgd, unsigned long addr, int node); |
2544 | pud_t *vmemmap_pud_populate(p4d_t *p4d, unsigned long addr, int node); | 2551 | pud_t *vmemmap_pud_populate(p4d_t *p4d, unsigned long addr, int node); |
@@ -2546,20 +2553,17 @@ pmd_t *vmemmap_pmd_populate(pud_t *pud, unsigned long addr, int node); | |||
2546 | pte_t *vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node); | 2553 | pte_t *vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node); |
2547 | void *vmemmap_alloc_block(unsigned long size, int node); | 2554 | void *vmemmap_alloc_block(unsigned long size, int node); |
2548 | struct vmem_altmap; | 2555 | struct vmem_altmap; |
2549 | void *__vmemmap_alloc_block_buf(unsigned long size, int node, | 2556 | void *vmemmap_alloc_block_buf(unsigned long size, int node); |
2550 | struct vmem_altmap *altmap); | 2557 | void *altmap_alloc_block_buf(unsigned long size, struct vmem_altmap *altmap); |
2551 | static inline void *vmemmap_alloc_block_buf(unsigned long size, int node) | ||
2552 | { | ||
2553 | return __vmemmap_alloc_block_buf(size, node, NULL); | ||
2554 | } | ||
2555 | |||
2556 | void vmemmap_verify(pte_t *, int, unsigned long, unsigned long); | 2558 | void vmemmap_verify(pte_t *, int, unsigned long, unsigned long); |
2557 | int vmemmap_populate_basepages(unsigned long start, unsigned long end, | 2559 | int vmemmap_populate_basepages(unsigned long start, unsigned long end, |
2558 | int node); | 2560 | int node); |
2559 | int vmemmap_populate(unsigned long start, unsigned long end, int node); | 2561 | int vmemmap_populate(unsigned long start, unsigned long end, int node, |
2562 | struct vmem_altmap *altmap); | ||
2560 | void vmemmap_populate_print_last(void); | 2563 | void vmemmap_populate_print_last(void); |
2561 | #ifdef CONFIG_MEMORY_HOTPLUG | 2564 | #ifdef CONFIG_MEMORY_HOTPLUG |
2562 | void vmemmap_free(unsigned long start, unsigned long end); | 2565 | void vmemmap_free(unsigned long start, unsigned long end, |
2566 | struct vmem_altmap *altmap); | ||
2563 | #endif | 2567 | #endif |
2564 | void register_page_bootmem_memmap(unsigned long section_nr, struct page *map, | 2568 | void register_page_bootmem_memmap(unsigned long section_nr, struct page *map, |
2565 | unsigned long nr_pages); | 2569 | unsigned long nr_pages); |
@@ -2570,8 +2574,8 @@ enum mf_flags { | |||
2570 | MF_MUST_KILL = 1 << 2, | 2574 | MF_MUST_KILL = 1 << 2, |
2571 | MF_SOFT_OFFLINE = 1 << 3, | 2575 | MF_SOFT_OFFLINE = 1 << 3, |
2572 | }; | 2576 | }; |
2573 | extern int memory_failure(unsigned long pfn, int trapno, int flags); | 2577 | extern int memory_failure(unsigned long pfn, int flags); |
2574 | extern void memory_failure_queue(unsigned long pfn, int trapno, int flags); | 2578 | extern void memory_failure_queue(unsigned long pfn, int flags); |
2575 | extern int unpoison_memory(unsigned long pfn); | 2579 | extern int unpoison_memory(unsigned long pfn); |
2576 | extern int get_hwpoison_page(struct page *page); | 2580 | extern int get_hwpoison_page(struct page *page); |
2577 | #define put_hwpoison_page(page) put_page(page) | 2581 | #define put_hwpoison_page(page) put_page(page) |