]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - include/linux/mmzone.h
mm/page_alloc.c: broken deferred calculation
[mirror_ubuntu-artful-kernel.git] / include / linux / mmzone.h
index fc14b8b3f6ce8a7cdd2a70ef89906c22d52f3b55..6ea3b443d4ae0b33f0894bd25ffc07e7d2389c2c 100644 (file)
@@ -532,22 +532,6 @@ static inline bool zone_is_empty(struct zone *zone)
        return zone->spanned_pages == 0;
 }
 
-/*
- * Return true if [start_pfn, start_pfn + nr_pages) range has a non-empty
- * intersection with the given zone
- */
-static inline bool zone_intersects(struct zone *zone,
-               unsigned long start_pfn, unsigned long nr_pages)
-{
-       if (zone_is_empty(zone))
-               return false;
-       if (start_pfn >= zone_end_pfn(zone) ||
-           start_pfn + nr_pages <= zone->zone_start_pfn)
-               return false;
-
-       return true;
-}
-
 /*
  * The "priority" of VM scanning is how much of the queues we will scan in one
  * go. A value of 12 for DEF_PRIORITY implies that we will scan 1/4096th of the
@@ -691,7 +675,8 @@ typedef struct pglist_data {
         * is the first PFN that needs to be initialised.
         */
        unsigned long first_deferred_pfn;
-       unsigned long static_init_size;
+       /* Number of non-deferred pages */
+       unsigned long static_init_pgcnt;
 #endif /* CONFIG_DEFERRED_STRUCT_PAGE_INIT */
 
 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
@@ -1137,13 +1122,17 @@ struct mem_section {
 #define SECTION_ROOT_MASK      (SECTIONS_PER_ROOT - 1)
 
 #ifdef CONFIG_SPARSEMEM_EXTREME
-extern struct mem_section *mem_section[NR_SECTION_ROOTS];
+extern struct mem_section **mem_section;
 #else
 extern struct mem_section mem_section[NR_SECTION_ROOTS][SECTIONS_PER_ROOT];
 #endif
 
 static inline struct mem_section *__nr_to_section(unsigned long nr)
 {
+#ifdef CONFIG_SPARSEMEM_EXTREME
+       if (!mem_section)
+               return NULL;
+#endif
        if (!mem_section[SECTION_NR_TO_ROOT(nr)])
                return NULL;
        return &mem_section[SECTION_NR_TO_ROOT(nr)][nr & SECTION_ROOT_MASK];