aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h27
1 files changed, 21 insertions, 6 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 581703d86fbd..7606d7db96c9 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -151,6 +151,7 @@ extern pgprot_t protection_map[16];
151#define FAULT_FLAG_NONLINEAR 0x02 /* Fault was via a nonlinear mapping */ 151#define FAULT_FLAG_NONLINEAR 0x02 /* Fault was via a nonlinear mapping */
152#define FAULT_FLAG_MKWRITE 0x04 /* Fault was mkwrite of existing pte */ 152#define FAULT_FLAG_MKWRITE 0x04 /* Fault was mkwrite of existing pte */
153#define FAULT_FLAG_ALLOW_RETRY 0x08 /* Retry fault if blocking */ 153#define FAULT_FLAG_ALLOW_RETRY 0x08 /* Retry fault if blocking */
154#define FAULT_FLAG_RETRY_NOWAIT 0x10 /* Don't drop mmap_sem and wait when retrying */
154 155
155/* 156/*
156 * This interface is used by x86 PAT code to identify a pfn mapping that is 157 * This interface is used by x86 PAT code to identify a pfn mapping that is
@@ -859,7 +860,14 @@ extern void pagefault_out_of_memory(void);
859 860
860#define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK) 861#define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK)
861 862
863/*
864 * Flags passed to show_mem() and __show_free_areas() to suppress output in
865 * various contexts.
866 */
867#define SHOW_MEM_FILTER_NODES (0x0001u) /* filter disallowed nodes */
868
862extern void show_free_areas(void); 869extern void show_free_areas(void);
870extern void __show_free_areas(unsigned int flags);
863 871
864int shmem_lock(struct file *file, int lock, struct user_struct *user); 872int shmem_lock(struct file *file, int lock, struct user_struct *user);
865struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags); 873struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags);
@@ -906,6 +914,9 @@ unsigned long unmap_vmas(struct mmu_gather **tlb,
906 * @pgd_entry: if set, called for each non-empty PGD (top-level) entry 914 * @pgd_entry: if set, called for each non-empty PGD (top-level) entry
907 * @pud_entry: if set, called for each non-empty PUD (2nd-level) entry 915 * @pud_entry: if set, called for each non-empty PUD (2nd-level) entry
908 * @pmd_entry: if set, called for each non-empty PMD (3rd-level) entry 916 * @pmd_entry: if set, called for each non-empty PMD (3rd-level) entry
917 * this handler is required to be able to handle
918 * pmd_trans_huge() pmds. They may simply choose to
919 * split_huge_page() instead of handling it explicitly.
909 * @pte_entry: if set, called for each non-empty PTE (4th-level) entry 920 * @pte_entry: if set, called for each non-empty PTE (4th-level) entry
910 * @pte_hole: if set, called for each hole at all levels 921 * @pte_hole: if set, called for each hole at all levels
911 * @hugetlb_entry: if set, called for each hugetlb entry 922 * @hugetlb_entry: if set, called for each hugetlb entry
@@ -971,6 +982,8 @@ static inline int handle_mm_fault(struct mm_struct *mm,
971 982
972extern int make_pages_present(unsigned long addr, unsigned long end); 983extern int make_pages_present(unsigned long addr, unsigned long end);
973extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); 984extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);
985extern int access_remote_vm(struct mm_struct *mm, unsigned long addr,
986 void *buf, int len, int write);
974 987
975int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, 988int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
976 unsigned long start, int len, unsigned int foll_flags, 989 unsigned long start, int len, unsigned int foll_flags,
@@ -1347,7 +1360,7 @@ extern void setup_per_zone_wmarks(void);
1347extern void calculate_zone_inactive_ratio(struct zone *zone); 1360extern void calculate_zone_inactive_ratio(struct zone *zone);
1348extern void mem_init(void); 1361extern void mem_init(void);
1349extern void __init mmap_init(void); 1362extern void __init mmap_init(void);
1350extern void show_mem(void); 1363extern void show_mem(unsigned int flags);
1351extern void si_meminfo(struct sysinfo * val); 1364extern void si_meminfo(struct sysinfo * val);
1352extern void si_meminfo_node(struct sysinfo *val, int nid); 1365extern void si_meminfo_node(struct sysinfo *val, int nid);
1353extern int after_bootmem; 1366extern int after_bootmem;
@@ -1537,6 +1550,8 @@ struct page *follow_page(struct vm_area_struct *, unsigned long address,
1537#define FOLL_GET 0x04 /* do get_page on page */ 1550#define FOLL_GET 0x04 /* do get_page on page */
1538#define FOLL_DUMP 0x08 /* give error on hole if it would be zero */ 1551#define FOLL_DUMP 0x08 /* give error on hole if it would be zero */
1539#define FOLL_FORCE 0x10 /* get_user_pages read/write w/o permission */ 1552#define FOLL_FORCE 0x10 /* get_user_pages read/write w/o permission */
1553#define FOLL_NOWAIT 0x20 /* if a disk transfer is needed, start the IO
1554 * and return without waiting upon it */
1540#define FOLL_MLOCK 0x40 /* mark page as mlocked */ 1555#define FOLL_MLOCK 0x40 /* mark page as mlocked */
1541#define FOLL_SPLIT 0x80 /* don't return transhuge pages, split them */ 1556#define FOLL_SPLIT 0x80 /* don't return transhuge pages, split them */
1542#define FOLL_HWPOISON 0x100 /* check page is hwpoisoned */ 1557#define FOLL_HWPOISON 0x100 /* check page is hwpoisoned */
@@ -1578,13 +1593,13 @@ static inline bool kernel_page_present(struct page *page) { return true; }
1578#endif /* CONFIG_HIBERNATION */ 1593#endif /* CONFIG_HIBERNATION */
1579#endif 1594#endif
1580 1595
1581extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk); 1596extern struct vm_area_struct *get_gate_vma(struct mm_struct *mm);
1582#ifdef __HAVE_ARCH_GATE_AREA 1597#ifdef __HAVE_ARCH_GATE_AREA
1583int in_gate_area_no_task(unsigned long addr); 1598int in_gate_area_no_mm(unsigned long addr);
1584int in_gate_area(struct task_struct *task, unsigned long addr); 1599int in_gate_area(struct mm_struct *mm, unsigned long addr);
1585#else 1600#else
1586int in_gate_area_no_task(unsigned long addr); 1601int in_gate_area_no_mm(unsigned long addr);
1587#define in_gate_area(task, addr) ({(void)task; in_gate_area_no_task(addr);}) 1602#define in_gate_area(mm, addr) ({(void)mm; in_gate_area_no_mm(addr);})
1588#endif /* __HAVE_ARCH_GATE_AREA */ 1603#endif /* __HAVE_ARCH_GATE_AREA */
1589 1604
1590int drop_caches_sysctl_handler(struct ctl_table *, int, 1605int drop_caches_sysctl_handler(struct ctl_table *, int,