aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/bootmem.h3
-rw-r--r--mm/page_alloc.c2
2 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h
index 31e9abb6d977..2275f2748708 100644
--- a/include/linux/bootmem.h
+++ b/include/linux/bootmem.h
@@ -119,8 +119,7 @@ extern void *alloc_large_system_hash(const char *tablename,
119 unsigned int *_hash_mask, 119 unsigned int *_hash_mask,
120 unsigned long limit); 120 unsigned long limit);
121 121
122#define HASH_HIGHMEM 0x00000001 /* Consider highmem? */ 122#define HASH_EARLY 0x00000001 /* Allocating during early boot? */
123#define HASH_EARLY 0x00000002 /* Allocating during early boot? */
124 123
125/* Only NUMA needs hash distribution. 124/* Only NUMA needs hash distribution.
126 * IA64 is known to have sufficient vmalloc space. 125 * IA64 is known to have sufficient vmalloc space.
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index d539f83c62b6..2273952300d4 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3226,7 +3226,7 @@ void *__init alloc_large_system_hash(const char *tablename,
3226 /* allow the kernel cmdline to have a say */ 3226 /* allow the kernel cmdline to have a say */
3227 if (!numentries) { 3227 if (!numentries) {
3228 /* round applicable memory size up to nearest megabyte */ 3228 /* round applicable memory size up to nearest megabyte */
3229 numentries = (flags & HASH_HIGHMEM) ? nr_all_pages : nr_kernel_pages; 3229 numentries = nr_kernel_pages;
3230 numentries += (1UL << (20 - PAGE_SHIFT)) - 1; 3230 numentries += (1UL << (20 - PAGE_SHIFT)) - 1;
3231 numentries >>= 20 - PAGE_SHIFT; 3231 numentries >>= 20 - PAGE_SHIFT;
3232 numentries <<= 20 - PAGE_SHIFT; 3232 numentries <<= 20 - PAGE_SHIFT;