Skip to contentSkip to conversation

Make pud_alloc() and pmd_alloc() non-existant on !MMU

PATCH New David Howells 1 participant 1 message Jan 5, 2005 MM core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make pud_alloc() and pmd_alloc() non-existant on !MMU

The attached patch makes the general pud_alloc() and pmd_alloc() inline functions unavailable if CONFIG_MMU is not defined.

---
warthog>diffstat nommu-pudpmd-alloc-2610bk8.diff

 mm.h |    2 ++
 1 files changed, 2 insertions(+)
include/linux/mm.h renamed from warthog/kernels/linux-2.6.10-bk8/include/linux/mm.h +2 -0
diff -uNrp /warthog/kernels/linux-2.6.10-bk8/include/linux/mm.h linux-2.6.10-bk8-frv/include/linux/mm.h
@@ -659,6 +659,7 @@ extern void remove_shrinker(struct shrin
  * The following ifdef needed to get the 4level-fixup.h header to work.
  * Remove it when 4level-fixup.h has been removed.
  */
+#ifdef CONFIG_MMU
 #ifndef __ARCH_HAS_4LEVEL_HACK 
 static inline pud_t *pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
 {
@@ -674,6 +675,7 @@ static inline pmd_t *pmd_alloc(struct mm
 	return pmd_offset(pud, address);
 }
 #endif
+#endif /* CONFIG_MMU */
 
 extern void free_area_init(unsigned long * zones_size);
 extern void free_area_init_node(int nid, pg_data_t *pgdat,