[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20130816161119.2192be96e63d98aaf6714954@canb.auug.org.au>
Date: Fri, 16 Aug 2013 16:11:19 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
Andi Kleen <ak@...ux.intel.com>
Subject: linux-next: build failure after merge of the akpm-current tree
Hi Andrew,
After merging the akpm-current tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:
mm/built-in.o: In function `.__offline_pages.constprop.10':
memory_hotplug.c:(.ref.text+0x10ec): undefined reference to `.is_hugepage_active'
Caused by commit 9a9137504d7c ("mm: memory-hotplug: enable memory hotplug
to handle hugepage").
This build has CONFIG_HUGETLB_PAGE (which exposes the declaration of
is_hugepage_active() in include/linux/hugetlb.h, but
CONFIG_MEMORY_FAILURE unset (which hides the definition of
is_hugepage_active() in mm/hugetlb.c.
The single caller (in mm/memory_hotplug.c) is protected by
CONFIG_MEMORY_HOTREMOVE.
I have applied this patch for today (which may also not work in every
case):
From: Stephen Rothwell <sfr@...b.auug.org.au>
Date: Fri, 16 Aug 2013 16:06:19 +1000
Subject: [PATCH] mm: move is_hugepage_active() outside protecting ifdef
Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
---
mm/hugetlb.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 0dc8ef9..38bc25b 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -3434,22 +3434,6 @@ follow_huge_pud(struct mm_struct *mm, unsigned long address,
#endif /* CONFIG_ARCH_WANT_GENERAL_HUGETLB */
-#ifdef CONFIG_MEMORY_FAILURE
-
-/* Should be called in hugetlb_lock */
-static int is_hugepage_on_freelist(struct page *hpage)
-{
- struct page *page;
- struct page *tmp;
- struct hstate *h = page_hstate(hpage);
- int nid = page_to_nid(hpage);
-
- list_for_each_entry_safe(page, tmp, &h->hugepage_freelists[nid], lru)
- if (page == hpage)
- return 1;
- return 0;
-}
-
bool is_hugepage_active(struct page *page)
{
VM_BUG_ON(!PageHuge(page));
@@ -3472,6 +3456,22 @@ bool is_hugepage_active(struct page *page)
return page_count(page) > 0;
}
+#ifdef CONFIG_MEMORY_FAILURE
+
+/* Should be called in hugetlb_lock */
+static int is_hugepage_on_freelist(struct page *hpage)
+{
+ struct page *page;
+ struct page *tmp;
+ struct hstate *h = page_hstate(hpage);
+ int nid = page_to_nid(hpage);
+
+ list_for_each_entry_safe(page, tmp, &h->hugepage_freelists[nid], lru)
+ if (page == hpage)
+ return 1;
+ return 0;
+}
+
/*
* This function is called from memory failure code.
* Assume the caller holds page lock of the head page.
--
1.8.4.rc0
--
Cheers,
Stephen Rothwell sfr@...b.auug.org.au
http://www.canb.auug.org.au/~sfr/
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists