Do ioread32/iowrite32 assume volatile pointer?
I'm trying to convert all my driver references from using pointer dereferencing to read/write PCI device memory, to using ioread/iowrite functions as recommended elsewhere.
I have a memory test, which does what memory tests do... the memory pointer in the function is defined as volatile u32*, because otherwise the optimizer just removes all the loops (thinking a write followed by read at same address has an obvious result). However, when I pass the volatile pointer to ioread32/iowrite32, I get compiler warnings because those functions don't take volatile pointers. I could cast away the volatiles, of course, but then I may still have the same problem with the compiler.
So I'm hoping that ioread()/iowrite(), by their nature, assume that they are dealing with external memory which is inherently volatile. Is this a reliable assumption? If not, how do I solve this problem?