]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/mm.h
Merge tag 'metag-v3.9-rc1-v4' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan...
[karo-tx-linux.git] / include / linux / mm.h
index 97da0302cf5149c89aa88433f92e06d3e712f039..7acc9dc73c9f272bda990e741041a1b5c1237cc5 100644 (file)
@@ -115,6 +115,8 @@ extern unsigned int kobjsize(const void *objp);
 # define VM_SAO                VM_ARCH_1       /* Strong Access Ordering (powerpc) */
 #elif defined(CONFIG_PARISC)
 # define VM_GROWSUP    VM_ARCH_1
+#elif defined(CONFIG_METAG)
+# define VM_GROWSUP    VM_ARCH_1
 #elif defined(CONFIG_IA64)
 # define VM_GROWSUP    VM_ARCH_1
 #elif !defined(CONFIG_MMU)
@@ -1013,13 +1015,14 @@ extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *
 extern int access_remote_vm(struct mm_struct *mm, unsigned long addr,
                void *buf, int len, int write);
 
-int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
-                    unsigned long start, int len, unsigned int foll_flags,
-                    struct page **pages, struct vm_area_struct **vmas,
-                    int *nonblocking);
-int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
-                       unsigned long start, int nr_pages, int write, int force,
-                       struct page **pages, struct vm_area_struct **vmas);
+long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
+                     unsigned long start, unsigned long nr_pages,
+                     unsigned int foll_flags, struct page **pages,
+                     struct vm_area_struct **vmas, int *nonblocking);
+long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
+                   unsigned long start, unsigned long nr_pages,
+                   int write, int force, struct page **pages,
+                   struct vm_area_struct **vmas);
 int get_user_pages_fast(unsigned long start, int nr_pages, int write,
                        struct page **pages);
 struct kvec;
@@ -1332,24 +1335,6 @@ extern void free_bootmem_with_active_regions(int nid,
                                                unsigned long max_low_pfn);
 extern void sparse_memory_present_with_active_regions(int nid);
 
-#define MOVABLEMEM_MAP_MAX MAX_NUMNODES
-struct movablemem_entry {
-       unsigned long start_pfn;    /* start pfn of memory segment */
-       unsigned long end_pfn;      /* end pfn of memory segment (exclusive) */
-};
-
-struct movablemem_map {
-       bool acpi;      /* true if using SRAT info */
-       int nr_map;
-       struct movablemem_entry map[MOVABLEMEM_MAP_MAX];
-       nodemask_t numa_nodes_hotplug;  /* on which nodes we specify memory */
-       nodemask_t numa_nodes_kernel;   /* on which nodes kernel resides in */
-};
-
-extern void __init insert_movablemem_map(unsigned long start_pfn,
-                                        unsigned long end_pfn);
-extern int __init movablemem_map_overlap(unsigned long start_pfn,
-                                        unsigned long end_pfn);
 #endif /* CONFIG_HAVE_MEMBLOCK_NODE_MAP */
 
 #if !defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) && \
@@ -1628,8 +1613,17 @@ int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr,
 int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
                        unsigned long pfn);
 
-struct page *follow_page(struct vm_area_struct *, unsigned long address,
-                       unsigned int foll_flags);
+struct page *follow_page_mask(struct vm_area_struct *vma,
+                             unsigned long address, unsigned int foll_flags,
+                             unsigned int *page_mask);
+
+static inline struct page *follow_page(struct vm_area_struct *vma,
+               unsigned long address, unsigned int foll_flags)
+{
+       unsigned int unused_page_mask;
+       return follow_page_mask(vma, address, foll_flags, &unused_page_mask);
+}
+
 #define FOLL_WRITE     0x01    /* check pte is writable */
 #define FOLL_TOUCH     0x02    /* mark page accessed */
 #define FOLL_GET       0x04    /* do get_page on page */
@@ -1641,6 +1635,7 @@ struct page *follow_page(struct vm_area_struct *, unsigned long address,
 #define FOLL_SPLIT     0x80    /* don't return transhuge pages, split them */
 #define FOLL_HWPOISON  0x100   /* check page is hwpoisoned */
 #define FOLL_NUMA      0x200   /* force NUMA hinting page fault */
+#define FOLL_MIGRATION 0x400   /* wait for page to replace migration entry */
 
 typedef int (*pte_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr,
                        void *data);