Skip to content

Commit

Permalink
microblaze: Fix pfn_valid() for noMMU
Browse files Browse the repository at this point in the history
Configuring DEBUG_SLAB causes a noMMU kernel to die during initialization
with an invalid virtual address panic in kfree_debugcheck().
The panic is due to an improper definition of pfn_valid().

Signed-off-by: Steven J. Magnani <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
  • Loading branch information
smagnani authored and michalsimek committed Dec 14, 2009
1 parent 4f911b0 commit 5dd48a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/microblaze/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ extern int page_is_ram(unsigned long pfn);
# endif /* CONFIG_MMU */

# ifndef CONFIG_MMU
# define pfn_valid(pfn) ((pfn) >= min_low_pfn && (pfn) <= max_mapnr)
# define pfn_valid(pfn) (((pfn) >= min_low_pfn) && \
((pfn) <= (min_low_pfn + max_mapnr)))
# define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT)
# else /* CONFIG_MMU */
# define ARCH_PFN_OFFSET (memory_start >> PAGE_SHIFT)
Expand Down

0 comments on commit 5dd48a2

Please sign in to comment.