lkml.org 
[lkml]   [2012]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: OpenRISC: BUG: failure at mm/page_alloc.c:2467/free_pages()!
From
Date
On Fri, 2012-03-02 at 02:12 +0100, Richard Weinberger wrote:
> Hi!
>
> CONFIG_DEBUG_VM exposes this splat:
> BUG: failure at mm/page_alloc.c:2467/free_pages()!
>
> addr is 0xc100c000, but memory_end is 0x02000000.

virt_addr_valid() is broken (asm/page.h) as it's trying to compare to a
phys_addr_t.

Something like the following looks better:

diff --git a/arch/openrisc/include/asm/page.h
b/arch/openrisc/include/asm/page.h
index b041b34..c4ffaee 100644
--- a/arch/openrisc/include/asm/page.h
+++ b/arch/openrisc/include/asm/page.h
@@ -94,8 +94,7 @@ extern unsigned long memory_end;

#define pfn_valid(pfn) ((pfn) < max_mapnr)

-#define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void
*)PAGE_OFFSET) && \
- ((void *)(kaddr) < (void *)memory_end))
+#define virt_addr_valid(kaddr) (pfn_valid(virt_to_pfn(kaddr)))

#endif /* __ASSEMBLY__ */
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2012-03-02 07:39    [W:0.033 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site