diff options
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 4dee5082d3d7..805f30dd1c26 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -7313,18 +7313,17 @@ void *__init alloc_large_system_hash(const char *tablename, | |||
7313 | 7313 | ||
7314 | log2qty = ilog2(numentries); | 7314 | log2qty = ilog2(numentries); |
7315 | 7315 | ||
7316 | /* | ||
7317 | * memblock allocator returns zeroed memory already, so HASH_ZERO is | ||
7318 | * currently not used when HASH_EARLY is specified. | ||
7319 | */ | ||
7320 | gfp_flags = (flags & HASH_ZERO) ? GFP_ATOMIC | __GFP_ZERO : GFP_ATOMIC; | 7316 | gfp_flags = (flags & HASH_ZERO) ? GFP_ATOMIC | __GFP_ZERO : GFP_ATOMIC; |
7321 | do { | 7317 | do { |
7322 | size = bucketsize << log2qty; | 7318 | size = bucketsize << log2qty; |
7323 | if (flags & HASH_EARLY) | 7319 | if (flags & HASH_EARLY) { |
7324 | table = memblock_virt_alloc_nopanic(size, 0); | 7320 | if (flags & HASH_ZERO) |
7325 | else if (hashdist) | 7321 | table = memblock_virt_alloc_nopanic(size, 0); |
7322 | else | ||
7323 | table = memblock_virt_alloc_raw(size, 0); | ||
7324 | } else if (hashdist) { | ||
7326 | table = __vmalloc(size, gfp_flags, PAGE_KERNEL); | 7325 | table = __vmalloc(size, gfp_flags, PAGE_KERNEL); |
7327 | else { | 7326 | } else { |
7328 | /* | 7327 | /* |
7329 | * If bucketsize is not a power-of-two, we may free | 7328 | * If bucketsize is not a power-of-two, we may free |
7330 | * some pages at the end of hash table which | 7329 | * some pages at the end of hash table which |