• Home
  • Raw
  • Download

Lines Matching full:buffer

7 swiotlb is a memory buffer allocator used by the Linux kernel DMA layer. It is
9 buffer because of hardware limitations or other requirements. In such a case,
10 the DMA layer calls swiotlb to allocate a temporary memory buffer that conforms
11 to the limitations. The DMA is done to/from this temporary memory buffer, and
12 the CPU copies the data between the temporary buffer and the original target
13 memory buffer. This approach is generically called "bounce buffering", and the
14 temporary memory buffer is called a "bounce buffer".
24 Because the CPU copies data between the bounce buffer and the original target
25 memory buffer, doing bounce buffering is slower than doing DMA directly to the
26 original memory buffer, and it consumes more CPU resources. So it is used only
33 only provide 32-bit DMA addresses. By allocating bounce buffer memory below
41 to force all DMA I/O to use bounce buffers, and the bounce buffer memory is set
42 up as unencrypted. The host does DMA I/O to/from the bounce buffer memory, and
44 data to/from the original target memory buffer. The CPU copying bridges between
62 swiotlb_tbl_unmap_single(). The "map" API allocates a bounce buffer of a
63 specified size in bytes and returns the physical address of the buffer. The
64 buffer memory is physically contiguous. The expectation is that the DMA layer
67 multiple memory buffer segments, a separate bounce buffer must be allocated for
69 CPU copy) to initialize the bounce buffer to match the contents of the original
70 buffer.
73 updated the bounce buffer memory and DMA_ATTR_SKIP_CPU_SYNC is not set, the
75 buffer back to the original buffer. Then the bounce buffer memory is freed.
78 a driver may use when control of a buffer transitions between the CPU and the
80 original buffer and the bounce buffer. Like the dma_sync_*() APIs, the swiotlb
82 buffer is copied to/from the original buffer.
94 The pool should be large enough to ensure that bounce buffer requests can
117 bounce buffer match the same bits in the address of the original buffer. When
119 of the bounce buffer that slightly reduces the maximum size of an allocation.
128 parameter specifies the allocation of bounce buffer space must start at a
130 bounce buffer might start at a larger address if min_align_mask is non-zero.
132 the bounce buffer. Similarly, the end of the bounce buffer is rounded up to an
136 devices. It is set to the granule size - 1 so that the bounce buffer is
155 what might be called a "slot set". When a bounce buffer is allocated, it
157 bounce buffers. Furthermore, a bounce buffer must be allocated from a single
158 slot set, which leads to the maximum bounce buffer size being IO_TLB_SIZE *
171 When allocating a bounce buffer, if the area associated with the calling CPU
186 Because a bounce buffer allocation can't cross a slot set boundary, eliminating
187 those initial slots effectively reduces the max size of a bounce buffer.
197 buffer request fails due to lack of available space, an asynchronous background
202 buffer request creates a "transient pool" to avoid returning an "swiotlb full"
203 error. A transient pool has the size of the bounce buffer request, and is
204 deleted when the bounce buffer is freed. Memory for this transient pool comes
257 index computed from the bounce buffer address relative to the starting memory
262 APIs and the corresponding swiotlb APIs use the bounce buffer address as the
263 identifier for a bounce buffer. This address is returned by
266 memory buffer address obviously must be passed as an argument to
268 swiotlb data structures must save the original memory buffer address so that it
274 buffer but an address somewhere in the middle of the bounce buffer, and the
275 address of the start of the bounce buffer isn't known to swiotlb code. But
276 swiotlb code must be able to calculate the corresponding original memory buffer
278 memory buffer address is populated into the struct io_tlb_slot for each slot
279 occupied by the bounce buffer. An adjusted "alloc_size" of the bounce buffer is
291 available slots to use for a new bounce buffer. They are updated when allocating
292 a new bounce buffer and when freeing a bounce buffer. At pool creation time, the
298 swiotlb_tlb_map_single() allocates bounce buffer space to meet alloc_align_mask
300 when swiotbl_tlb_unmap_single() is called with the bounce buffer address, the
305 to the bounce buffer.