[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1324316288-2367-1-git-send-email-ddaney.cavm@gmail.com>
Date: Mon, 19 Dec 2011 09:38:08 -0800
From: David Daney <ddaney.cavm@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Paul Mundt <lethal@...ux-sh.org>
Cc: linux-kernel@...r.kernel.org, David Rientjes <rientjes@...gle.com>,
David Daney <david.daney@...ium.com>
Subject: [PATCH] mm: Fix BUILD_BUG assertion in pmdp_clear_flush_young()
From: David Daney <david.daney@...ium.com>
It has been reported that when building for sh:
mm/pgtable-generic.c: In function 'pmdp_clear_flush_young':
mm/pgtable-generic.c:76: error: call to '__build_bug_failed' declared with attribute error: BUILD_BUG failed
Adding some ugle #ifdeffery will probably fix this issue.
Signed-off-by: David Daney <david.daney@...ium.com>
---
This is completely untested, but may be the best fix for this. Linus
and others have expressed a dislike for using BUG() to detect what
should be dead code paths at runtime, but it seems to be the state of
the art here.
mm/pgtable-generic.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mm/pgtable-generic.c b/mm/pgtable-generic.c
index eb663fb..73784c8 100644
--- a/mm/pgtable-generic.c
+++ b/mm/pgtable-generic.c
@@ -70,7 +70,7 @@ int pmdp_clear_flush_young(struct vm_area_struct *vma,
unsigned long address, pmd_t *pmdp)
{
int young;
-#ifndef CONFIG_TRANSPARENT_HUGEPAGE
+#if !defined(CONFIG_HUGETLB_PAGE) || !defined(CONFIG_TRANSPARENT_HUGEPAGE)
BUG();
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
VM_BUG_ON(address & ~HPAGE_PMD_MASK);
--
1.7.2.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists