If you use IORD_32DIRECT or IOWR_32DIRECT you have to be careful of caching. For example if you use malloc to allocate a buffer and then access it using those cache bypassing macro you might have a coherency issue. Memory allocated from the heap might have already been cached and still persistent in the cache so if you perform a cache bypass to a location that is already cached then you'll have a coherency issue. To avoid this issue you should invalidate the cache for the address range that malloc returns to you to ensure you don't run into this corner case.