Ar Sul, 2006-07-09 am 16:53 +0200, ysgrifennodd Stefan Richter:
> My question: Do I need wmb() within the following code?
>
> dma_sync_single_for_cpu(..., DMA_TO_DEVICE);
> area->a = new_val_a;
> wmb(); /* necessary? */
> area->b = new_val_b;
Yes. Otherwise on some processors the I/O may be re-ordered
> dma_sync_single_for_device(..., DMA_TO_DEVICE);
>
> Or are all changes to the area hidden from the device between
> dma_sync_single_for_cpu and _for_device, thereby making the write order
> a non-issue? Thanks,
Depends on the processor and setup. On x86-32 for example dma_sync_.. is
generally a NOP. In other environments nothing will be visible until the
sync.
Alan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]