]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - include/linux/mm_types.h
ACPI: fix acpi_find_child_device() invocation in acpi_preset_companion()
[mirror_ubuntu-bionic-kernel.git] / include / linux / mm_types.h
index c85f11dafd56064c5c77a4e39cd4ad7a74f65755..ed4c7a653fd7633cfb19b5b486678103b3c7b740 100644 (file)
@@ -48,8 +48,10 @@ struct page {
                                                 * inode address_space, or NULL.
                                                 * If page mapped as anonymous
                                                 * memory, low bit is set, and
-                                                * it points to anon_vma object:
-                                                * see PAGE_MAPPING_ANON below.
+                                                * it points to anon_vma object
+                                                * or KSM private structure. See
+                                                * PAGE_MAPPING_ANON and
+                                                * PAGE_MAPPING_KSM.
                                                 */
                void *s_mem;                    /* slab first object */
                atomic_t compound_mapcount;     /* first tail page */
@@ -207,14 +209,6 @@ struct page {
                                           not kmapped, ie. highmem) */
 #endif /* WANT_PAGE_VIRTUAL */
 
-#ifdef CONFIG_KMEMCHECK
-       /*
-        * kmemcheck wants to track the status of each byte in a page; this
-        * is a pointer to such a status block. NULL if not tracked.
-        */
-       void *shadow;
-#endif
-
 #ifdef LAST_CPUPID_NOT_IN_PAGE_FLAGS
        int _last_cpupid;
 #endif
@@ -248,6 +242,11 @@ struct page_frag_cache {
 
 typedef unsigned long vm_flags_t;
 
+static inline atomic_t *compound_mapcount_ptr(struct page *page)
+{
+       return &page[1].compound_mapcount;
+}
+
 /*
  * 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
@@ -261,6 +260,7 @@ struct vm_region {
        unsigned long   vm_top;         /* region allocated to here */
        unsigned long   vm_pgoff;       /* the offset in vm_file corresponding to vm_start */
        struct file     *vm_file;       /* the backing file or NULL */
+       struct file     *vm_prfile;     /* the virtual backing file or NULL */
 
        int             vm_usage;       /* region usage count (access under nommu_region_sem) */
        bool            vm_icache_flushed : 1; /* true if the icache has been flushed for
@@ -335,6 +335,7 @@ struct vm_area_struct {
        unsigned long vm_pgoff;         /* Offset (within vm_file) in PAGE_SIZE
                                           units */
        struct file * vm_file;          /* File we map to (can be NULL). */
+       struct file *vm_prfile;         /* shadow of vm_file */
        void * vm_private_data;         /* was vm_pte (shared mem) */
 
        atomic_long_t swap_readahead_info;
@@ -362,7 +363,7 @@ struct kioctx_table;
 struct mm_struct {
        struct vm_area_struct *mmap;            /* list of VMAs */
        struct rb_root mm_rb;
-       u32 vmacache_seqnum;                   /* per-thread vmacache */
+       u64 vmacache_seqnum;                   /* per-thread vmacache */
 #ifdef CONFIG_MMU
        unsigned long (*get_unmapped_area) (struct file *filp,
                                unsigned long addr, unsigned long len,
@@ -399,9 +400,8 @@ struct mm_struct {
         */
        atomic_t mm_count;
 
-       atomic_long_t nr_ptes;                  /* PTE page table pages */
-#if CONFIG_PGTABLE_LEVELS > 2
-       atomic_long_t nr_pmds;                  /* PMD page table pages */
+#ifdef CONFIG_MMU
+       atomic_long_t pgtables_bytes;           /* PTE page table pages */
 #endif
        int map_count;                          /* number of VMAs */