[PATCH][1/3] ppc32: add 440ep support

Paul Mackerras paulus at samba.org
Thu Jul 28 08:56:55 EST 2005


Andrew Morton writes:

> Matt Porter <mporter at kernel.crashing.org> wrote:
> >
> > +static u64 dma_mask = 0xffffffffULL;
> 
> I'm sure you're totally uninterested in this, but the above will probably
> generate warnings on (say) ppc64, where u64 is implemented as unsigned
> long.
> 
> I usually chuck a simple `-1' in there and the compiler always gets it
> right, regardless of signedness and size and architecture.

Umm, I think we actually want 2^32-1 not -1, don't we?  In which case
I think Matt's code is what we have to have.

I tried a little test compile with gcc 4.0 with -m64 -Wall and it
didn't generate a warning with the 0xffffffffULL constant.

Paul.



More information about the Linuxppc-embedded mailing list