Re: [RFC][PATCH 0/3] Process events biarch bug: Intro

From: Evgeniy Polyakov
Date: Wed Jun 28 2006 - 01:51:26 EST


On Tue, Jun 27, 2006 at 02:39:51PM -0700, Matt Helsley (matthltc@xxxxxxxxxx) wrote:
> > Btw, __u64 is not the best choice for some arches too due to it's
> > alignment (64bit code requires u64 to be aligned to 64 bit, while 32bit
> > code will only align it to 32 bits), so you will need
> > attribute ((aligned(8)))) for your own ___u64.
>
> Fixing the alignment would be a good idea. Though setting it to 8 would
> introduce 4 unused bytes at the end of the structure.

Otherwise your code will not work, although u64 is supposed to be fixed
size, due to it's alignment problems it can not be used as is.
Split timestamp into two 32bit values and everything will be ok.

> Cheers,
> -Matt Helsley

--
Evgeniy Polyakov
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/