]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - include/linux/mm_types.h
Merge git://git.infradead.org/battery-2.6
[mirror_ubuntu-zesty-kernel.git] / include / linux / mm_types.h
index 02aa5619709b9bab0a40d183fc3b0b017b8bd50c..2a78aae78c690b7897a6fbe835201a023a579a3c 100644 (file)
@@ -102,6 +102,8 @@ struct page {
 #endif
 };
 
+typedef unsigned long __nocast vm_flags_t;
+
 /*
  * A region containing a mapping of a non-memory backed file under NOMMU
  * conditions.  These are held in a global tree and are pinned by the VMAs that
@@ -109,7 +111,7 @@ struct page {
  */
 struct vm_region {
        struct rb_node  vm_rb;          /* link in global region tree */
-       unsigned long   vm_flags;       /* VMA vm_flags */
+       vm_flags_t      vm_flags;       /* VMA vm_flags */
        unsigned long   vm_start;       /* start address of region */
        unsigned long   vm_end;         /* region initialised to here */
        unsigned long   vm_top;         /* region allocated to here */
@@ -175,7 +177,6 @@ struct vm_area_struct {
                                           units, *not* PAGE_CACHE_SIZE */
        struct file * vm_file;          /* File we map to (can be NULL). */
        void * vm_private_data;         /* was vm_pte (shared mem) */
-       unsigned long vm_truncate_count;/* truncate_count or restart_addr */
 
 #ifndef CONFIG_MMU
        struct vm_region *vm_region;    /* NOMMU mapping region */
@@ -205,19 +206,16 @@ enum {
 
 #if USE_SPLIT_PTLOCKS && defined(CONFIG_MMU)
 #define SPLIT_RSS_COUNTING
-struct mm_rss_stat {
-       atomic_long_t count[NR_MM_COUNTERS];
-};
 /* per-thread cached information, */
 struct task_rss_stat {
        int events;     /* for synchronization threshold */
        int count[NR_MM_COUNTERS];
 };
-#else  /* !USE_SPLIT_PTLOCKS */
+#endif /* USE_SPLIT_PTLOCKS */
+
 struct mm_rss_stat {
-       unsigned long count[NR_MM_COUNTERS];
+       atomic_long_t count[NR_MM_COUNTERS];
 };
-#endif /* !USE_SPLIT_PTLOCKS */
 
 struct mm_struct {
        struct vm_area_struct * mmap;           /* list of VMAs */
@@ -266,8 +264,6 @@ struct mm_struct {
 
        struct linux_binfmt *binfmt;
 
-       cpumask_t cpu_vm_mask;
-
        /* Architecture-specific MM context */
        mm_context_t context;
 
@@ -306,20 +302,23 @@ struct mm_struct {
        struct task_struct __rcu *owner;
 #endif
 
-#ifdef CONFIG_PROC_FS
        /* store ref to file /proc/<pid>/exe symlink points to */
        struct file *exe_file;
        unsigned long num_exe_file_vmas;
-#endif
 #ifdef CONFIG_MMU_NOTIFIER
        struct mmu_notifier_mm *mmu_notifier_mm;
 #endif
 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
        pgtable_t pmd_huge_pte; /* protected by page_table_lock */
 #endif
+
+       cpumask_var_t cpu_vm_mask_var;
 };
 
 /* Future-safe accessor for struct mm_struct's cpu_vm_mask. */
-#define mm_cpumask(mm) (&(mm)->cpu_vm_mask)
+static inline cpumask_t *mm_cpumask(struct mm_struct *mm)
+{
+       return mm->cpu_vm_mask_var;
+}
 
 #endif /* _LINUX_MM_TYPES_H */