diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2016-12-16 14:28:42 +0100 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2016-12-19 09:05:20 -0500 |
commit | fff5d99225107f5f13fe4a9805adc2a1c4b5fb00 (patch) | |
tree | 0b9748236ea4580bc44f9a24ec27c215cb46ed9b /include | |
parent | ae7871be189cb41184f1e05742b4a99e2c59774d (diff) | |
download | linux-stable-fff5d99225107f5f13fe4a9805adc2a1c4b5fb00.tar.gz linux-stable-fff5d99225107f5f13fe4a9805adc2a1c4b5fb00.tar.bz2 linux-stable-fff5d99225107f5f13fe4a9805adc2a1c4b5fb00.zip |
swiotlb: Add swiotlb=noforce debug option
On architectures like arm64, swiotlb is tied intimately to the core
architecture DMA support. In addition, ZONE_DMA cannot be disabled.
To aid debugging and catch devices not supporting DMA to memory outside
the 32-bit address space, add a kernel command line option
"swiotlb=noforce", which disables the use of bounce buffers.
If specified, trying to map memory that cannot be used with DMA will
fail, and a rate-limited warning will be printed.
Note that io_tlb_nslabs is set to 1, which is the minimal supported
value.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/swiotlb.h | 1 | ||||
-rw-r--r-- | include/trace/events/swiotlb.h | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h index 71d104e4c849..d9c84a9cde3d 100644 --- a/include/linux/swiotlb.h +++ b/include/linux/swiotlb.h @@ -12,6 +12,7 @@ struct scatterlist; enum swiotlb_force { SWIOTLB_NORMAL, /* Default - depending on HW DMA mask etc. */ SWIOTLB_FORCE, /* swiotlb=force */ + SWIOTLB_NO_FORCE, /* swiotlb=noforce */ }; extern enum swiotlb_force swiotlb_force; diff --git a/include/trace/events/swiotlb.h b/include/trace/events/swiotlb.h index 5e2e30a7efce..288c0c54a2b4 100644 --- a/include/trace/events/swiotlb.h +++ b/include/trace/events/swiotlb.h @@ -39,7 +39,8 @@ TRACE_EVENT(swiotlb_bounced, __entry->size, __print_symbolic(__entry->swiotlb_force, { SWIOTLB_NORMAL, "NORMAL" }, - { SWIOTLB_FORCE, "FORCE" })) + { SWIOTLB_FORCE, "FORCE" }, + { SWIOTLB_NO_FORCE, "NO_FORCE" })) ); #endif /* _TRACE_SWIOTLB_H */ |