提交 191aee58 编写于 作者: F FUJITA Tomonori 提交者: Benjamin Herrenschmidt

powerpc: Remove IOMMU_VMERGE config option

The description says:

 Cause IO segments sent to a device for DMA to be merged virtually
 by the IOMMU when they happen to have been allocated contiguously.
 This doesn't add pressure to the IOMMU allocator. However, some
 drivers don't support getting large merged segments coming back
 from *_map_sg().

 Most drivers don't have this problem; it is safe to say Y here.

It's out of date. Long ago, drivers didn't have a way to tell IOMMUs
about their segment length limit (that is, the maximum segment length
that they can handle). So IOMMUs merged as many segments as possible
and gave too large segments to drivers.

dma_get_max_seg_size() was introduced to solve the above
problem. Device drives can use the API to tell IOMMU about the maximum
segment length that they can handle. In addition, the default limit
(64K) should be safe for everyone.

So this config option seems to be unnecessary.

Note that this config option just enables users to disable the virtual
merging by default. Users can still disable the virtual merging by the
boot parameter.
Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 a9327296
...@@ -313,19 +313,6 @@ config 8XX_MINIMAL_FPEMU ...@@ -313,19 +313,6 @@ config 8XX_MINIMAL_FPEMU
It is recommended that you build a soft-float userspace instead. It is recommended that you build a soft-float userspace instead.
config IOMMU_VMERGE
bool "Enable IOMMU virtual merging"
depends on PPC64
default y
help
Cause IO segments sent to a device for DMA to be merged virtually
by the IOMMU when they happen to have been allocated contiguously.
This doesn't add pressure to the IOMMU allocator. However, some
drivers don't support getting large merged segments coming back
from *_map_sg().
Most drivers don't have this problem; it is safe to say Y here.
config IOMMU_HELPER config IOMMU_HELPER
def_bool PPC64 def_bool PPC64
......
...@@ -42,12 +42,7 @@ ...@@ -42,12 +42,7 @@
#define DBG(...) #define DBG(...)
#ifdef CONFIG_IOMMU_VMERGE static int novmerge;
static int novmerge = 0;
#else
static int novmerge = 1;
#endif
static int protect4gb = 1; static int protect4gb = 1;
static void __iommu_free(struct iommu_table *, dma_addr_t, unsigned int); static void __iommu_free(struct iommu_table *, dma_addr_t, unsigned int);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册