| Kernel v2.4.9 /Documentation/DMA-mapping.txt |
|---|
 2.4.9
 Documentation
 DMA-mapping.txt
diff -u --recursive --new-file v2.4.8/linux/Documentation/DMA-mapping.txt linux/Documentation/DMA-mapping.txt
--- v2.4.8/linux/Documentation/DMA-mapping.txt Sat May 19 17:43:05 2001
+++ linux/Documentation/DMA-mapping.txt Wed Aug 15 01:54:44 2001
@@ -180,6 +180,19 @@
to memory is immediately visible to the device, and vice
versa. Consistent mappings guarantee this.
+ IMPORTANT: Consistent DMA memory does not preclude the usage of
+ proper memory barriers. The cpu may reorder stores to
+ consistent memory just as it may normal memory. Example:
+ if it is important for the device to see the first word
+ of a descriptor updated before the second, you must do
+ something like:
+
+ desc->word0 = address;
+ wmb();
+ desc->word1 = DESC_VALID;
+
+ in order to get correct behavior on all platforms.
+
- Streaming DMA mappings which are usually mapped for one DMA transfer,
unmapped right after it (unless you use pci_dma_sync below) and for which
hardware can optimize for sequential accesses.
|