[PATCH] ARM: V6 MPCore v6_dma_inv_range RWFO fix
Valentine Barshak
vbarshak at mvista.com
Wed Nov 24 12:40:43 EST 2010
Russell King - ARM Linux wrote:
> On Wed, Nov 24, 2010 at 01:28:06AM +0300, Valentine Barshak wrote:
>
>> Cache ownership must be acqired by reading/writing data from the
>> cache line to make cache operation have the desired effect on the
>> SMP MPCore CPU. However, the ownership is never aquired in the
>> v6_dma_inv_range function when cleaning the first line and
>> flushing the last one, in case the address is not aligned
>> to D_CACHE_LINE_SIZE boundary.
>> Fix this by reading/writing data if needed, before performing
>> cache operations.
>>
>
> You should do this on the data _inside_ the requested buffer. We don't
> know if the overlapping cache line shares itself with some atomic
> variable, and doing a read-write on it could undo other updates to it.
>
The same problem could hit us in v6_dma_flush_range as well, when we do
r/w after bic.
Thanks,
Val.
More information about the linux-arm-kernel
mailing list