Skip to content

Commit 2f9237d

Browse files
author
Christoph Hellwig
committed
dma-mapping: make support for dma ops optional
Avoid the overhead of the dma ops support for tiny builds that only use the direct mapping. Signed-off-by: Christoph Hellwig <[email protected]> Tested-by: Alexey Kardashevskiy <[email protected]> Reviewed-by: Alexey Kardashevskiy <[email protected]>
1 parent b417417 commit 2f9237d

File tree

19 files changed

+43
-6
lines changed

19 files changed

+43
-6
lines changed

arch/alpha/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ config ALPHA
77
select ARCH_NO_PREEMPT
88
select ARCH_NO_SG_CHAIN
99
select ARCH_USE_CMPXCHG_LOCKREF
10+
select DMA_OPS if PCI
1011
select FORCE_PCI if !ALPHA_JENSEN
1112
select PCI_DOMAINS if PCI
1213
select PCI_SYSCALL if PCI

arch/arm/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ config ARM
4141
select CPU_PM if SUSPEND || CPU_IDLE
4242
select DCACHE_WORD_ACCESS if HAVE_EFFICIENT_UNALIGNED_ACCESS
4343
select DMA_DECLARE_COHERENT
44+
select DMA_OPS
4445
select DMA_REMAP if MMU
4546
select EDAC_SUPPORT
4647
select EDAC_ATOMIC_SCRUB

arch/ia64/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ config IA64_SGI_UV
192192

193193
config IA64_HP_SBA_IOMMU
194194
bool "HP SBA IOMMU support"
195+
select DMA_OPS
195196
default y
196197
help
197198
Say Y here to add support for the SBA IOMMU found on HP zx1 and

arch/mips/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ config MACH_JAZZ
367367
select ARC_PROMLIB
368368
select ARCH_MIGHT_HAVE_PC_PARPORT
369369
select ARCH_MIGHT_HAVE_PC_SERIO
370+
select DMA_OPS
370371
select FW_ARC
371372
select FW_ARC32
372373
select ARCH_MAY_HAVE_PC_FDC

arch/parisc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ config PARISC
1414
select ARCH_HAS_UBSAN_SANITIZE_ALL
1515
select ARCH_NO_SG_CHAIN
1616
select ARCH_SUPPORTS_MEMORY_FAILURE
17+
select DMA_OPS
1718
select RTC_CLASS
1819
select RTC_DRV_GENERIC
1920
select INIT_ALL_POSSIBLE

arch/powerpc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ config PPC
151151
select BUILDTIME_TABLE_SORT
152152
select CLONE_BACKWARDS
153153
select DCACHE_WORD_ACCESS if PPC64 && CPU_LITTLE_ENDIAN
154+
select DMA_OPS if PPC64
154155
select DYNAMIC_FTRACE if FUNCTION_TRACER
155156
select EDAC_ATOMIC_SCRUB
156157
select EDAC_SUPPORT

arch/s390/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ config S390
113113
select ARCH_WANT_IPC_PARSE_VERSION
114114
select BUILDTIME_TABLE_SORT
115115
select CLONE_BACKWARDS2
116+
select DMA_OPS if PCI
116117
select DYNAMIC_FTRACE if FUNCTION_TRACER
117118
select GENERIC_CLOCKEVENTS
118119
select GENERIC_CPU_AUTOPROBE

arch/sparc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ config SPARC
1515
default y
1616
select ARCH_MIGHT_HAVE_PC_PARPORT if SPARC64 && PCI
1717
select ARCH_MIGHT_HAVE_PC_SERIO
18+
select DMA_OPS
1819
select OF
1920
select OF_PROMTREE
2021
select HAVE_ASM_MODVERSIONS

arch/x86/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,7 @@ config DMI
909909

910910
config GART_IOMMU
911911
bool "Old AMD GART IOMMU support"
912+
select DMA_OPS
912913
select IOMMU_HELPER
913914
select SWIOTLB
914915
depends on X86_64 && PCI && AMD_NB

drivers/infiniband/core/device.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1183,6 +1183,8 @@ static void setup_dma_device(struct ib_device *device)
11831183
struct device *parent = device->dev.parent;
11841184

11851185
WARN_ON_ONCE(device->dma_device);
1186+
1187+
#ifdef CONFIG_DMA_OPS
11861188
if (device->dev.dma_ops) {
11871189
/*
11881190
* The caller provided custom DMA operations. Copy the
@@ -1203,7 +1205,9 @@ static void setup_dma_device(struct ib_device *device)
12031205
else
12041206
WARN_ON_ONCE(true);
12051207
}
1206-
} else {
1208+
} else
1209+
#endif /* CONFIG_DMA_OPS */
1210+
{
12071211
/*
12081212
* The caller did not provide custom DMA operations. Use the
12091213
* DMA mapping operations of the parent device.

0 commit comments

Comments
 (0)