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: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
This commit is contained in:
parent
4f911b0daf
commit
5dd48a235c
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue