linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Andrew Morton <akpm@linux-foundation.org>,
	Hugh Dickins <hughd@google.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Vlastimil Babka <vbabka@suse.cz>,
	Michal Hocko <mhocko@suse.com>, Christoph Lameter <cl@linux.com>,
	Mel Gorman <mgorman@techsingularity.net>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH] mm: unhide vmstat_text definition for CONFIG_SMP
Date: Wed, 11 May 2016 16:54:55 +0200	[thread overview]
Message-ID: <1462978517-2972312-1-git-send-email-arnd@arndb.de> (raw)

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

             reply	other threads:[~2016-05-11 14:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-11 14:54 Arnd Bergmann [this message]
2016-05-11 15:32 ` [PATCH] mm: unhide vmstat_text definition for CONFIG_SMP 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1462978517-2972312-1-git-send-email-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=hughd@google.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@suse.com \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).