Crosscompiler broken ?

2 messages, 2 authors, 2000-09-27 · open the first message on its own page

Crosscompiler broken ?

From: Dag Nygren <hidden>
Date: 2000-09-27 12:19:38

Hi again,

tracing down a severe probem I am seeing when
porting Linux to a PPC-board.

The  compilation of the kernel is done with a crosscompiler
on an Intel x86 system and strange things are happening:

This is the part of the code from fs/dcache.c:

==================== Code =============
    do {
        unsigned long tmp;

        nr_hash = (1UL << order) * PAGE_SIZE /
            sizeof(struct list_head);
        d_hash_mask = (nr_hash - 1);

        tmp = nr_hash;
        d_hash_shift = 0;
        while ((tmp >>= 1UL) != 0UL)
            d_hash_shift++;

        dentry_hashtable = (struct list_head *)
            __get_free_pages(GFP_ATOMIC, order);
printk("dentry_hashtable(0.5)(addr = 0x%lx) = 0x%lx\n", &dentry_hashtable,
dentry_hashtable);   /* DEB
UG */
    } while (dentry_hashtable == NULL && --order >= 0);
printk("dentry_hashtable(0.7)(addr = 0x%lx) = 0x%lx\n", &dentry_hashtable,
dentry_hashtable);   /* DEB
UG */

==================== Code  end =============

here is the output:

__get_free_pages(): page = 0xC024A000, page_address = 0xC0240000
&dentry_hashtable = 0xc01cf0d4, stack = 0xc018af68
__get_free_pages(): page = 0xC0274000, page_address = 0xC0CC0000
dentry_hashtable(0.5)(addr = 0xc01cf0d4) = 0xc0cc0000
dentry_hashtable(0.7)(addr = 0xc01cf0d4) = 0x5


The last line is really strange, who the %&¤&%¤/ is messing around
with the contents of dentry_hashtable ?

Compiler bug ?


--
Dag Nygren                               email: dag@newtech.fi
Oy NewTech Ab                            phone: +358 9 8024910
Trasktorpet 3                              fax: +358 9 8024916
02360 ESBO                                 GSM: 0400-426312
FINLAND


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

Re: Crosscompiler broken ?

From: Graham Stoney <hidden>
Date: 2000-09-27 23:58:28

Dag Nygren writes:
The  compilation of the kernel is done with a crosscompiler
on an Intel x86 system and strange things are happening:
What version of the compiler and kernel are you using?
printk("dentry_hashtable(0.5)(addr = 0x%lx) = 0x%lx\n", &dentry_hashtable,
dentry_hashtable);   /* DEBUG */
I couldn't reproduce this problem.  However, you might want to get into the
habit of using the correct format specifiers.  It doesn't make a difference in
this instance, but it will trip you up eventually.  Use %p to print pointers,
not %lx.

Regards,
Graham
--
Graham Stoney
Principal Hardware/Software Engineer
Canon Information Systems Research Australia
Ph: +61 2 9805 2909  Fax: +61 2 9805 2929

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help