[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1330670192.19557.96.camel@satguru>
Date: Fri, 02 Mar 2012 07:36:32 +0100
From: Jonas Bonn <jonas@...thpole.se>
To: Richard Weinberger <richard@....at>
Cc: linux@...ts.openrisc.net,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: OpenRISC: BUG: failure at mm/page_alloc.c:2467/free_pages()!
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__ */
Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)
Powered by blists - more mailing lists