patch-2.4.9 linux/Documentation/DMA-mapping.txt
Next file: linux/Documentation/SubmittingDrivers
Previous file: linux/Documentation/Configure.help
Back to the patch index
Back to the overall index
- Lines: 20
- Date:
Wed Aug 15 01:54:44 2001
- Orig file:
v2.4.8/linux/Documentation/DMA-mapping.txt
- Orig date:
Sat May 19 17:43:05 2001
diff -u --recursive --new-file v2.4.8/linux/Documentation/DMA-mapping.txt linux/Documentation/DMA-mapping.txt
@@ -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.
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)