* OpenRISC: BUG: failure at mm/page_alloc.c:2467/free_pages()!
@ 2012-03-02 1:12 Richard Weinberger
2012-03-02 6:36 ` Jonas Bonn
0 siblings, 1 reply; 2+ messages in thread
From: Richard Weinberger @ 2012-03-02 1:12 UTC (permalink / raw)
To: Jonas Bonn, linux, linux-kernel@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 173 bytes --]
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.
Thanks,
//richard
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: OpenRISC: BUG: failure at mm/page_alloc.c:2467/free_pages()!
2012-03-02 1:12 OpenRISC: BUG: failure at mm/page_alloc.c:2467/free_pages()! Richard Weinberger
@ 2012-03-02 6:36 ` Jonas Bonn
0 siblings, 0 replies; 2+ messages in thread
From: Jonas Bonn @ 2012-03-02 6:36 UTC (permalink / raw)
To: Richard Weinberger; +Cc: linux, linux-kernel@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 919 bytes --]
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__ */
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-02 6:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-02 1:12 OpenRISC: BUG: failure at mm/page_alloc.c:2467/free_pages()! Richard Weinberger
2012-03-02 6:36 ` Jonas Bonn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox