linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: unhide vmstat_text definition for CONFIG_SMP
@ 2016-05-11 14:54 Arnd Bergmann
  2016-05-11 15:32 ` Christoph Lameter
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Arnd Bergmann @ 2016-05-11 14:54 UTC (permalink / raw)
  To: Andrew Morton, Hugh Dickins
  Cc: Arnd Bergmann, Vlastimil Babka, Michal Hocko, Christoph Lameter,
	Mel Gorman, Joonsoo Kim, linux-mm, linux-kernel

In randconfig builds with sysfs, procfs and numa all disabled,
but SMP enabled, we now get a link error in the newly introduced
vmstat_refresh function:

mm/built-in.o: In function `vmstat_refresh':
:(.text+0x15c78): undefined reference to `vmstat_text'

This modifes the already elaborate #ifdef to also cover that
configuration.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: mmotm ("mm: /proc/sys/vm/stat_refresh to force vmstat update")
---
 mm/vmstat.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/mm/vmstat.c b/mm/vmstat.c
index 57a24e919907..5367eb9b858b 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -678,7 +678,8 @@ int fragmentation_index(struct zone *zone, unsigned int order)
 }
 #endif
 
-#if defined(CONFIG_PROC_FS) || defined(CONFIG_SYSFS) || defined(CONFIG_NUMA)
+#if defined(CONFIG_PROC_FS) || defined(CONFIG_SYSFS) || \
+    defined(CONFIG_NUMA) || defined(CONFIG_SMP)
 #ifdef CONFIG_ZONE_DMA
 #define TEXT_FOR_DMA(xx) xx "_dma",
 #else
@@ -857,7 +858,7 @@ const char * const vmstat_text[] = {
 #endif
 #endif /* CONFIG_VM_EVENTS_COUNTERS */
 };
-#endif /* CONFIG_PROC_FS || CONFIG_SYSFS || CONFIG_NUMA */
+#endif /* CONFIG_PROC_FS || CONFIG_SYSFS || CONFIG_NUMA || CONFIG_SMP */
 
 
 #if (defined(CONFIG_DEBUG_FS) && defined(CONFIG_COMPACTION)) || \
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-05-18  1:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-11 14:54 [PATCH] mm: unhide vmstat_text definition for CONFIG_SMP Arnd Bergmann
2016-05-11 15:32 ` Christoph Lameter
2016-05-16  7:31   ` Michal Hocko
2016-05-17  5:31   ` Do not build vmstat_refresh if there is no procfs support kbuild test robot
2016-05-16  7:37 ` [PATCH] mm: unhide vmstat_text definition for CONFIG_SMP Michal Hocko
2016-05-16 13:54   ` Christoph Lameter
2016-05-16 14:23 ` Michal Hocko
2016-05-16 22:36   ` Andrew Morton
2016-05-17  7:05     ` Michal Hocko
2016-05-18  1:02       ` Hugh Dickins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).