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

Richard Purdie richard.purdie at linuxfoundation.org
Wed Oct 5 17:00:11 UTC 2011


On Wed, 2011-10-05 at 16:53 +0000, McClintock Matthew-B29882 wrote:
> On Wed, Oct 5, 2011 at 6:34 AM, Richard Purdie
> <richard.purdie at linuxfoundation.org> wrote:
> > 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.
> 
> Sorry, I'm missing if you are suggesting a solution here... do I need
> to take an alternate approach? The alternative is to patch the
> printfs?

That is the alternative that could probably make it upstream.

I did this mainly to understand what the difference between x86_64 and
ppc64 was so in future I can better spot problem areas and perhaps
others can too.

I'll take the patch but I'd like to include more information about the
reason for the problem in the commit message and strongly hint that it
would be great to get these issues fixed upstream, properly.

Cheers,

Richard





More information about the Openembedded-core mailing list