[OE-core] [PATCH v2 10/16] Fix mdadm for powerpc64

Richard Purdie richard.purdie at linuxfoundation.org
Wed Oct 5 11:34:37 UTC 2011


On Tue, 2011-10-04 at 21:52 +0000, McClintock Matthew-B29882 wrote:
> On Mon, Oct 3, 2011 at 4:17 PM, Khem Raj <raj.khem at gmail.com> wrote:
> >> I can't find a log of this anywhere, it's probably the default
> >> compiler warnings for our platform are different?
> >
> > It would be handy to understand them since I dont see gcc differentiating
> > formats between ppc64 and x86_64 which both are 64bit hosts. But obviously
> > there is something missing.
> 
> I finally got around to rerunning this without my patch and the errors
> are below.

I dug into this a bit. To quote asm/types.h:

/*
 * This is here because we used to use l64 for 64bit powerpc
 * and we don't want to impact user mode with our change to ll64
 * in the kernel.
 */
#if defined(__powerpc64__) && !defined(__KERNEL__)
# include <asm-generic/int-l64.h>
#else
# include <asm-generic/int-ll64.h>
#endif

So ppc64 kernel space uses ll64 and userspace uses l64.

This means __u64 is a long for ppc64 but a long long for x86_64. The
format errors occurs rightly because a ull is being printed from a ul
variable. This will happen to work but its messy.

Cheers,

Richard







More information about the Openembedded-core mailing list