summaryrefslogtreecommitdiffstats
path: root/include/linux/bootmem.h
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2015-06-24 19:56:28 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-06-24 20:49:41 -0400
commita9919c79359df9a706ff9e14fc0a93cd15791c9b (patch)
tree32bb182bd88f0fb58bfe891b26290bf53b5a6d37 /include/linux/bootmem.h
parenta67a31fa308a9032ead31b0501dafdb44ccf5a12 (diff)
mm: only define hashdist variable when needed
For !CONFIG_NUMA, hashdist will always be 0, since it's setter is otherwise compiled out. So we can save 4 bytes of data and some .text (although mostly in __init functions) by only defining it for CONFIG_NUMA. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Acked-by: David Rientjes <rientjes@google.com> Reviewed-by: Michal Hocko <mhocko@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/bootmem.h')
-rw-r--r--include/linux/bootmem.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h
index 0995c2de8162..f589222bfa87 100644
--- a/include/linux/bootmem.h
+++ b/include/linux/bootmem.h
@@ -357,12 +357,12 @@ extern void *alloc_large_system_hash(const char *tablename,
357/* Only NUMA needs hash distribution. 64bit NUMA architectures have 357/* Only NUMA needs hash distribution. 64bit NUMA architectures have
358 * sufficient vmalloc space. 358 * sufficient vmalloc space.
359 */ 359 */
360#if defined(CONFIG_NUMA) && defined(CONFIG_64BIT) 360#ifdef CONFIG_NUMA
361#define HASHDIST_DEFAULT 1 361#define HASHDIST_DEFAULT IS_ENABLED(CONFIG_64BIT)
362extern int hashdist; /* Distribute hashes across NUMA nodes? */
362#else 363#else
363#define HASHDIST_DEFAULT 0 364#define hashdist (0)
364#endif 365#endif
365extern int hashdist; /* Distribute hashes across NUMA nodes? */
366 366
367 367
368#endif /* _LINUX_BOOTMEM_H */ 368#endif /* _LINUX_BOOTMEM_H */