Commit 5dd48a23 authored by steve@digidescorp.com's avatar steve@digidescorp.com Committed by Michal Simek

microblaze: Fix pfn_valid() for noMMU

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: default avatarSteven J. Magnani <steve@digidescorp.com>
Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
parent 4f911b0d
......@@ -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)
......
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