Skip to content

Commit

Permalink
NOMMU: is_vmalloc_addr() won't compile if !MMU
Browse files Browse the repository at this point in the history
Make is_vmalloc_addr() contingent on CONFIG_MMU=y, as it won't compile
in !MMU mode.

[ Bug introduced in commit 9e2779f:
  "is_vmalloc_addr(): Check if an address is within the vmalloc
  boundaries" ].

Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Greg Ungerer <gerg@snapgear.com>
Cc: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
David Howells authored and Linus Torvalds committed Feb 24, 2008
1 parent 0400b69 commit 8ca3ed8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/linux/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,15 @@ static inline int get_page_unless_zero(struct page *page)
struct page *vmalloc_to_page(const void *addr);
unsigned long vmalloc_to_pfn(const void *addr);

#ifdef CONFIG_MMU
/* Determine if an address is within the vmalloc range */
static inline int is_vmalloc_addr(const void *x)
{
unsigned long addr = (unsigned long)x;

return addr >= VMALLOC_START && addr < VMALLOC_END;
}
#endif

static inline struct page *compound_head(struct page *page)
{
Expand Down

0 comments on commit 8ca3ed8

Please sign in to comment.