mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Daney <ddaney.cavm@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Paul Mundt <lethal@linux-sh.org>
Cc: linux-kernel@vger.kernel.org,
	David Rientjes <rientjes@google.com>,
	David Daney <david.daney@cavium.com>
Subject: [PATCH] mm: Fix BUILD_BUG assertion in pmdp_clear_flush_young()
Date: Mon, 19 Dec 2011 09:38:08 -0800	[thread overview]
Message-ID: <1324316288-2367-1-git-send-email-ddaney.cavm@gmail.com> (raw)
In-Reply-To: <20111217152253.1aedda0936cd5d1d98be5e76@canb.auug.org.au>

From: David Daney <david.daney@cavium.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@cavium.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


  parent reply	other threads:[~2011-12-19 17:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-17  4:22 linux-next: build failure after merge of the final tree Stephen Rothwell
2011-12-17  4:27 ` Stephen Rothwell
2011-12-19 17:38 ` David Daney [this message]
2011-12-19 19:29   ` [PATCH] mm: Fix BUILD_BUG assertion in pmdp_clear_flush_young() David Rientjes
2011-12-19 19:52     ` David Daney
2011-12-19 20:34       ` David Rientjes

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=1324316288-2367-1-git-send-email-ddaney.cavm@gmail.com \
    --to=ddaney.cavm@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=david.daney@cavium.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rientjes@google.com \
    --cc=sfr@canb.auug.org.au \
    /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

all inboxes | Powered by JetHome®