linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrea Arcangeli <aarcange@redhat.com>
To: linux-mm@kvack.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mgorman@suse.de>, Hugh Dickins <hughd@google.com>,
	Larry Woodman <lwoodman@redhat.com>,
	Ulrich Obergfell <uobergfe@redhat.com>,
	Rik van Riel <riel@redhat.com>, Mark Salter <msalter@redhat.com>
Subject: [PATCH] mm: avoid CONFIG_MMU=n build failure in pmd_none_or_trans_huge_or_clear_bad
Date: Wed, 21 Mar 2012 21:28:31 +0100	[thread overview]
Message-ID: <1332361711-26612-1-git-send-email-aarcange@redhat.com> (raw)

pmd_none_or_trans_huge_or_clear_bad must be defined after
pmd_trans_huge, so add #ifdef CONFIG_MMU around the whole block that
shall not be needed for archs without pagetables.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Reported-by: Mark Salter <msalter@redhat.com>
---
 include/asm-generic/pgtable.h |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index 10f8291..a03c098 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -425,6 +425,8 @@ extern void untrack_pfn_vma(struct vm_area_struct *vma, unsigned long pfn,
 				unsigned long size);
 #endif
 
+#ifdef CONFIG_MMU
+
 #ifndef CONFIG_TRANSPARENT_HUGEPAGE
 static inline int pmd_trans_huge(pmd_t pmd)
 {
@@ -441,7 +443,7 @@ static inline int pmd_write(pmd_t pmd)
 	return 0;
 }
 #endif /* __HAVE_ARCH_PMD_WRITE */
-#endif
+#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
 
 /*
  * This function is meant to be used by sites walking pagetables with
@@ -500,6 +502,8 @@ static inline int pmd_trans_unstable(pmd_t *pmd)
 #endif
 }
 
+#endif /* CONFIG_MMU */
+
 #endif /* !__ASSEMBLY__ */
 
 #endif /* _ASM_GENERIC_PGTABLE_H */

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2012-03-21 20:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-21 20:28 Andrea Arcangeli [this message]
2012-03-21 20:58 ` [PATCH] mm: avoid CONFIG_MMU=n build failure in pmd_none_or_trans_huge_or_clear_bad Rik van Riel

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=1332361711-26612-1-git-send-email-aarcange@redhat.com \
    --to=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=linux-mm@kvack.org \
    --cc=lwoodman@redhat.com \
    --cc=mgorman@suse.de \
    --cc=msalter@redhat.com \
    --cc=riel@redhat.com \
    --cc=uobergfe@redhat.com \
    /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).