Commit adb81933 authored by David Howells's avatar David Howells Committed by Linus Torvalds

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

This makes the general pud_alloc() and pmd_alloc() inline functions
unavailable if CONFIG_MMU is not defined. 
Signed-Off-By: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 13768e75
...@@ -659,6 +659,7 @@ extern void remove_shrinker(struct shrinker *shrinker); ...@@ -659,6 +659,7 @@ extern void remove_shrinker(struct shrinker *shrinker);
* The following ifdef needed to get the 4level-fixup.h header to work. * The following ifdef needed to get the 4level-fixup.h header to work.
* Remove it when 4level-fixup.h has been removed. * Remove it when 4level-fixup.h has been removed.
*/ */
#ifdef CONFIG_MMU
#ifndef __ARCH_HAS_4LEVEL_HACK #ifndef __ARCH_HAS_4LEVEL_HACK
static inline pud_t *pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address) 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_struct *mm, pud_t *pud, unsigned long a ...@@ -674,6 +675,7 @@ static inline pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long a
return pmd_offset(pud, address); return pmd_offset(pud, address);
} }
#endif #endif
#endif /* CONFIG_MMU */
extern void free_area_init(unsigned long * zones_size); extern void free_area_init(unsigned long * zones_size);
extern void free_area_init_node(int nid, pg_data_t *pgdat, extern void free_area_init_node(int nid, pg_data_t *pgdat,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment