RFC: Changing sizeof(MemType) to be greater than sizeof(void *)

Jesse Barnes jbarnes at virtuousgeek.org
Fri Jul 7 15:43:47 PDT 2006


On Wednesday, July 5, 2006 7:43 pm, Ian Romanick wrote:
> My proposal is to change the current typedef of memType to something
> like:
>
> #if NEED_BIG_MEMTYPE
> typedef uint64_t memType;
> #else
> #include <inttypes.h>
> typedef intptr_t memType;
> #endif
>
> IMO, memType is actually used for two different purposes.  One of
> those purposes seem to be as an integer big enough to hold a pointer. 
> The other use seems to be an integer big enough to hold a bus address.
>  On most platforms those are the same size, but there are some
> platforms (e.g., 32-bit binaries on 64-bit PowerPC) where they are
> not.  In an idea world (ha!) I'd like to see the former uses converted
> to intptr_t, and the later uses converted to a new type called
> bus_addr_t or similar.
>
> Thoughts / opinions?

So it either holds a pointer to the actual mmap'd MMIO space or the BAR 
value for MMIO space?  I think your ideal world scenario is the one we 
should shoot for, though unfortunately this will require both driver and 
platform code changes.  I'm willing to help with that though (sorry I've 
been slacking on helping you convert drivers to the new PCI API, 
hopefully I'll get some time to hack on it soon).

Thanks,
Jesse



More information about the xorg mailing list