Re: clean way to support >32bit addr on 32bit CPU

Roland Dreier
2005-01-11T00:58:22Z

Dave> I have this ARM (XScale) based platform that supports 36bit
Dave> physical addressing. Due to the way the ATU is designed, the
Dave> outbound memory translation window is fixed outside the
Dave> first 4GB of memory space, and thus the need to use 64bit
Dave> addressing in order to access the PCI bus. After all said
Dave> and done, the struct resource members start and end must
Dave> support 64bit integer values in order to work. On a 64bit
Dave> arch that would be fine since unsigned long is
Dave> 64bit. However on a 32bit arch one must use unsigned long
Dave> long to get 64bit. However, if we do that then it would make
Dave> the 64bit archs to have 128bit start and end and probably
Dave> wouldn't be something we'd want. What would be a nice clean
Dave> way to support this that's acceptable to Linux? I guess this
Dave> issue would be similar to x86-32 PAE would have?

Actually unsigned long long is still 64 bits even on 64-bit Linux
architectures. However it might make more sense to use an explicit
size for the resource addresses, namely u64.

This XScale architecture seems similar to the PowerPC 440, which also
uses 36-bit addressing for various buses including PCI. You might
want to take a look at arch/ppc for inspiration.

- Roland