diff options
author | steve@digidescorp.com <steve@digidescorp.com> | 2009-11-13 16:08:29 -0600 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2009-12-14 08:44:55 +0100 |
commit | 5dd48a235c3f78620e582ebb253d64d02747d173 (patch) | |
tree | aafc080ef1b07362d56551a8df09fa0220b4c909 /arch/microblaze/include | |
parent | 4f911b0daf0f7028a4fe792b701a48d10da36d84 (diff) |
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>
Diffstat (limited to 'arch/microblaze/include')
-rw-r--r-- | arch/microblaze/include/asm/page.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/microblaze/include/asm/page.h b/arch/microblaze/include/asm/page.h index 880c988c2237..9b66c0fa9a32 100644 --- a/arch/microblaze/include/asm/page.h +++ b/arch/microblaze/include/asm/page.h @@ -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) |