Skip to contentSkip to conversation

mm: avoid CONFIG_MMU=n build failure in pmd_none_or_trans_huge_or_clear_bad

PATCH In review Andrea Arcangeli 2 participants 2 messages Mar 21, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: avoid CONFIG_MMU=n build failure in pmd_none_or_trans_huge_or_clear_bad

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.

---
 include/asm-generic/pgtable.h |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
include/asm-generic/pgtable.h +5 -1
index 10f8291..a03c098 100644
@@ -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 [email protected]. 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:"[email protected]"> [email protected] </a>

Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Andrea Arcangeli

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.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. 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:"[email protected]"> [email protected] </a>