public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] microblaze: Fix pfn_valid() for noMMU
@ 2009-11-13 22:08 steve
  2009-11-16 10:12 ` Michal Simek
  2009-11-16 22:14 ` Andrew Morton
  0 siblings, 2 replies; 5+ messages in thread
From: steve @ 2009-11-13 22:08 UTC (permalink / raw)
  To: microblaze-uclinux; +Cc: monstr, linux-kernel, Steven J. Magnani

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>
---
diff -uprN a/arch/microblaze/include/asm/page.h b/arch/microblaze/include/asm/page.h
--- a/arch/microblaze/include/asm/page.h	2009-09-09 17:13:59.000000000 -0500
+++ b/arch/microblaze/include/asm/page.h	2009-11-13 15:20:26.000000000 -0600
@@ -161,7 +161,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)


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-11-18  1:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-13 22:08 [PATCH] microblaze: Fix pfn_valid() for noMMU steve
2009-11-16 10:12 ` Michal Simek
2009-11-16 22:14 ` Andrew Morton
2009-11-17 14:27   ` Steven J. Magnani
2009-11-18  1:37     ` liqin.chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox