aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2010-03-02 09:25:38 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-03-19 01:38:16 -0400
commit191aee58b6568cf8143901bfa3f57a9b8faa6f1c (patch)
tree296e0a4815c59e0289d88cbec8bfe6d02b50bb85
parenta93272969c6b1d59883fcbb04845420bd72c9a20 (diff)
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: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--arch/powerpc/Kconfig13
-rw-r--r--arch/powerpc/kernel/iommu.c7
2 files changed, 1 insertions, 19 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 8a54eb8e3768..2e19500921f9 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -313,19 +313,6 @@ config 8XX_MINIMAL_FPEMU
313 313
314 It is recommended that you build a soft-float userspace instead. 314 It is recommended that you build a soft-float userspace instead.
315 315
316config IOMMU_VMERGE
317 bool "Enable IOMMU virtual merging"
318 depends on PPC64
319 default y
320 help
321 Cause IO segments sent to a device for DMA to be merged virtually
322 by the IOMMU when they happen to have been allocated contiguously.
323 This doesn't add pressure to the IOMMU allocator. However, some
324 drivers don't support getting large merged segments coming back
325 from *_map_sg().
326
327 Most drivers don't have this problem; it is safe to say Y here.
328
329config IOMMU_HELPER 316config IOMMU_HELPER
330 def_bool PPC64 317 def_bool PPC64
331 318
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index 5547ae6e6b0b..ec94f906ea43 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -42,12 +42,7 @@
42 42
43#define DBG(...) 43#define DBG(...)
44 44
45#ifdef CONFIG_IOMMU_VMERGE 45static int novmerge;
46static int novmerge = 0;
47#else
48static int novmerge = 1;
49#endif
50
51static int protect4gb = 1; 46static int protect4gb = 1;
52 47
53static void __iommu_free(struct iommu_table *, dma_addr_t, unsigned int); 48static void __iommu_free(struct iommu_table *, dma_addr_t, unsigned int);