summaryrefslogtreecommitdiffstats
path: root/include/linux/swiotlb.h
diff options
context:
space:
mode:
authorClaire Chang <tientzu@chromium.org>2021-06-19 11:40:41 +0800
committerKonrad Rzeszutek Wilk <konrad@kernel.org>2021-07-13 20:04:50 -0400
commit0b84e4f8b793eb4045fd64f6f514165a7974cd16 (patch)
tree321b1f2c11eb5088fb8df9d9033fd37abb9cad41 /include/linux/swiotlb.h
parentf4111e39a52aa5d5136d890bbd1aa87c1c8fe3bc (diff)
downloadlinux-0b84e4f8b793eb4045fd64f6f514165a7974cd16.tar.bz2
swiotlb: Add restricted DMA pool initialization
Add the initialization function to create restricted DMA pools from matching reserved-memory nodes. Regardless of swiotlb setting, the restricted DMA pool is preferred if available. The restricted DMA pools provide a basic level of protection against the DMA overwriting buffer contents at unexpected times. However, to protect against general data leakage and system memory corruption, the system needs to provide a way to lock down the memory access, e.g., MPU. Signed-off-by: Claire Chang <tientzu@chromium.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Stefano Stabellini <sstabellini@kernel.org> Tested-by: Will Deacon <will@kernel.org> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'include/linux/swiotlb.h')
-rw-r--r--include/linux/swiotlb.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h
index 3b9454d1e498..39284ff2a6cd 100644
--- a/include/linux/swiotlb.h
+++ b/include/linux/swiotlb.h
@@ -73,7 +73,8 @@ extern enum swiotlb_force swiotlb_force;
* range check to see if the memory was in fact allocated by this
* API.
* @nslabs: The number of IO TLB blocks (in groups of 64) between @start and
- * @end. This is command line adjustable via setup_io_tlb_npages.
+ * @end. For default swiotlb, this is command line adjustable via
+ * setup_io_tlb_npages.
* @used: The number of used IO TLB block.
* @list: The free list describing the number of free entries available
* from each index.