linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* "alloc_area_pte: page already exists"
@ 2003-07-22  1:06 Xupei Liang
  2003-07-22  1:28 ` Matt Porter
  0 siblings, 1 reply; 8+ messages in thread
From: Xupei Liang @ 2003-07-22  1:06 UTC (permalink / raw)
  To: linuxppc-embedded@lists.linuxppc.org


Hi,

I am working on a PPC440 board running 2.4.19 kernel.
I am seeing this message when I try to boot up the
system. "alloc_area_pte: page already exists". I
am able to get a stack trace to show where it
comes from. The stack trace is shown as follows.

======= Stack trace begins =============

>>NIP; c002e474 <__vmalloc+0x164/0x234 [kernel]>
<=====
Trace; c002e474 <__vmalloc+0x164/0x234 [kernel]>
Trace; c019422c <copy_entries_to_user+0x40/0x2f0
[kernel]>
Trace; c019453c <get_entries+0x60/0xac [kernel]>
Trace; c0195148 <do_ipt_get_ctl+0x2a4/0x2cc [kernel]>
Trace; c0158190 <nf_sockopt+0x150/0x210 [kernel]>
Trace; c0158290 <nf_getsockopt+0x14/0x24 [kernel]>
Trace; c0168380 <ip_getsockopt+0x6f4/0x9ec [kernel]>
Trace; c01829fc <raw_getsockopt+0x1c/0x160 [kernel]>
Trace; c0189a8c <inet_getsockopt+0x20/0x30 [kernel]>
Trace; c01496f0 <sys_getsockopt+0x78/0x9c [kernel]>
Trace; c0149d9c <sys_socketcall+0x1ac/0x1e0 [kernel]>
Trace; c000353c <ret_from_syscall_1+0x0/0xb4 [kernel]>
Trace; 7fffccb8 <Unknown (0x7fffccb8)>
Trace; 10006de4 <Unknown (0x10006de4)>
Trace; 100018f4 <Unknown (0x100018f4)>
Trace; 10001d1c <Unknown (0x10001d1c)>
Trace; 0fefe7f8 <Unknown (0xfefe7f8)>
Trace; 00000000 <Unknown (0x0)>

============ Stack trace ends ================

It seems to me it is from vmalloc(). Has anybody
seen this problem before?

Thank you in advanced for your reply.

Regards,

Terry L.

Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: "alloc_area_pte: page already exists"
@ 2003-07-29  6:23 Kalpesh Jasapara
  2003-07-29 15:15 ` Matt Porter
  0 siblings, 1 reply; 8+ messages in thread
From: Kalpesh Jasapara @ 2003-07-29  6:23 UTC (permalink / raw)
  To: tliang; +Cc: Matt Porter, linuxppc-embedded@lists.linuxppc.org


Hello,

>From the code it appears that iounmap() or vfree() of
any virtual address that maps physical address beyond
the 32 bit address space, especially in case of PPC
440 (where pte_t is defined as unsigned long long ),
free_area_pte() will return without completely
clearing out the pte.

If the pte has not completely been cleaned up (all 64
bits) during the iounmap(or vfree) is it possible that
pte_none() would complain and you see the messages ?

Matt, do you think it is a bug ?
the FIXME suggests that this needs to be cleaned up.

File: pgtable.h
<..snip..>
#else /* CONFIG_440 */
/* FIXME: Clean this up */
static inline unsigned long pte_update(pte_t *p,
unsigned long clr,
                                       unsigned long
set)
{
        unsigned long old, tmp, offset;

        __asm__ __volatile__("\
1:      li      %0,4\n\
        lwarx   %2,%0,%4\n\
        andc    %1,%2,%5\n\
        or      %1,%1,%6\n"
"       stwcx.  %1,%0,%4\n\
        bne-    1b"
        : "=&r" (offset), "=&r" (tmp), "=&r" (old),
"=m" (*p)
        : "r" (p), "r" (clr), "r" (set), "m" (*p)
        : "cc" );
        return old;
}
#endif /* CONFIG_440 */
<...snip...>

Regards,
-Kalpesh

>
> Matt,
>
> It is a custom board with 256MB of memory.

Ahh, ok. So, what you've done is misconfigured a
mapping in
your custom board port. It's reporting that you
already have
a pte allocated in the vmalloc area which must be
untouched
so the VM can allocate memory at runtime.

Usually, this is the result of an errant io_block_map
entry
which overlaps the vmalloc area. Examine the
VMALLOC_START
macro to see how the start of vmalloc space is
calculated.
In your case, (256MB of RAM) the start of vmalloc
space will
be at 0xd1000000 assuming a standard PAGE_OFFSET of
0xc0000000.
If you've mapped something near that virtual address
or somewhere
close above that address then you need to move it. How
much
vmalloc space you need to reserve depends solely on
your specific
application.

In most cases, it's smarter to never use io_block_map
and to
let ioremap() create mappings dynamically so this sort
of thing
doesn't happen. Most modern in-kernel ports try to not
use
io_block_map if at all possible.

Regards,
--
Matt Porter


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~2003-07-31 18:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-22  1:06 "alloc_area_pte: page already exists" Xupei Liang
2003-07-22  1:28 ` Matt Porter
2003-07-22  2:01   ` Xupei Liang
2003-07-22  3:10     ` Matt Porter
2003-07-23  1:18       ` Xupei Liang
  -- strict thread matches above, loose matches on Subject: below --
2003-07-29  6:23 Kalpesh Jasapara
2003-07-29 15:15 ` Matt Porter
2003-07-31 18:48   ` Xupei Liang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).