public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: Fix build with CMA && !CONFIG_COMPACTION
@ 2012-09-26 12:13 Mark Brown
  2012-09-26 12:31 ` Mel Gorman
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2012-09-26 12:13 UTC (permalink / raw)
  To: Andrew Morton, Rik van Riel, Rafael Aquini, Mel Gorman
  Cc: linux-kernel, Mark Brown

In -next 20120926 "mm: compaction: cache if a pageblock was scanned and
no pages were isolated" adds pageblock skipping operations used when CMA
is enabled but only provides them if CONFIG_COMPACTION is defined, breaking
the build. Fix this by also providing them when only CONFIG_CMA is enabled.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 include/linux/pageblock-flags.h |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/pageblock-flags.h b/include/linux/pageblock-flags.h
index eed27f4..8d67f30 100644
--- a/include/linux/pageblock-flags.h
+++ b/include/linux/pageblock-flags.h
@@ -30,9 +30,9 @@ enum pageblock_bits {
 	PB_migrate,
 	PB_migrate_end = PB_migrate + 3 - 1,
 			/* 3 bits required for migrate types */
-#ifdef CONFIG_COMPACTION
+#if defined(CONFIG_COMPACTION) || defined(CONFIG_CMA)
 	PB_migrate_skip,/* If set the block is skipped by compaction */
-#endif /* CONFIG_COMPACTION */
+#endif /* CONFIG_COMPACTION || CONFIG_CMA */
 	NR_PAGEBLOCK_BITS
 };
 
@@ -68,7 +68,7 @@ unsigned long get_pageblock_flags_group(struct page *page,
 void set_pageblock_flags_group(struct page *page, unsigned long flags,
 					int start_bitidx, int end_bitidx);
 
-#ifdef CONFIG_COMPACTION
+#if defined(CONFIG_COMPACTION) || defined(CONFIG_CMA)
 #define get_pageblock_skip(page) \
 			get_pageblock_flags_group(page, PB_migrate_skip,     \
 							PB_migrate_skip + 1)
@@ -78,7 +78,7 @@ void set_pageblock_flags_group(struct page *page, unsigned long flags,
 #define set_pageblock_skip(page) \
 			set_pageblock_flags_group(page, 1, PB_migrate_skip,  \
 							PB_migrate_skip + 1)
-#endif /* CONFIG_COMPACTION */
+#endif /* CONFIG_COMPACTION || CONFIG_CMA */
 
 #define get_pageblock_flags(page) \
 			get_pageblock_flags_group(page, 0, PB_migrate_end)
-- 
1.7.10.4


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

end of thread, other threads:[~2012-09-26 12:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-26 12:13 [PATCH] mm: Fix build with CMA && !CONFIG_COMPACTION Mark Brown
2012-09-26 12:31 ` Mel Gorman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox