Home Home > GIT Browse > SLE15-SP1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Tesarik <ptesarik@suse.cz>2019-07-19 15:20:39 +0200
committerPetr Tesarik <ptesarik@suse.cz>2019-07-19 15:20:39 +0200
commit3e1ca7952ff5b1a2bb63ebd9ae0c3d45933f24ab (patch)
treedc70d94d79810744aada25cb68594696e9df44b0
parent3df0a1d662c7c03e52ddf921ba45d671286a17f9 (diff)
- iommu-helper: mark iommu_is_span_boundary as inline
(jsc#SLE-6197 FATE#327012 bsc#1140559 LTC#173150). - Update config files. suse-commit: 7b4c9830d3dc1ff97f126718221a2b25ba9a3ca4
-rw-r--r--arch/alpha/Kconfig3
-rw-r--r--arch/arm/Kconfig3
-rw-r--r--arch/arm64/Kconfig3
-rw-r--r--arch/ia64/Kconfig3
-rw-r--r--arch/mips/cavium-octeon/Kconfig4
-rw-r--r--arch/mips/loongson64/Kconfig4
-rw-r--r--arch/mips/netlogic/Kconfig3
-rw-r--r--arch/powerpc/Kconfig1
-rw-r--r--arch/unicore32/mm/Kconfig3
-rw-r--r--arch/x86/Kconfig2
-rw-r--r--drivers/parisc/Kconfig5
-rw-r--r--include/linux/iommu-helper.h13
-rw-r--r--lib/iommu-helper.c12
13 files changed, 12 insertions, 47 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 0e49d39ea74a..972237fff488 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -342,9 +342,6 @@ config PCI_DOMAINS
config PCI_SYSCALL
def_bool PCI
-config IOMMU_HELPER
- def_bool PCI
-
config ALPHA_NONAME
bool
depends on ALPHA_BOOK1 || ALPHA_NONAME_CH
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index d0e971b8374a..ae2de16d0479 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1783,9 +1783,6 @@ config SECCOMP
config SWIOTLB
def_bool y
-config IOMMU_HELPER
- def_bool SWIOTLB
-
config PARAVIRT
bool "Enable paravirtualization code"
help
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 0d9e54032325..71b5cc0dbb95 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -230,9 +230,6 @@ config SMP
config SWIOTLB
def_bool y
-config IOMMU_HELPER
- def_bool SWIOTLB
-
config KERNEL_MODE_NEON
def_bool y
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 01242cc029ea..a5bfbf87a787 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -608,6 +608,3 @@ source "security/Kconfig"
source "crypto/Kconfig"
source "lib/Kconfig"
-
-config IOMMU_HELPER
- def_bool (IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB || IA64_GENERIC || SWIOTLB)
diff --git a/arch/mips/cavium-octeon/Kconfig b/arch/mips/cavium-octeon/Kconfig
index 5c0b56203bae..f4ee86a9620b 100644
--- a/arch/mips/cavium-octeon/Kconfig
+++ b/arch/mips/cavium-octeon/Kconfig
@@ -66,15 +66,11 @@ config CAVIUM_OCTEON_LOCK_L2_MEMCPY
help
Lock the kernel's implementation of memcpy() into L2.
-config IOMMU_HELPER
- bool
-
config NEED_SG_DMA_LENGTH
bool
config SWIOTLB
def_bool y
- select IOMMU_HELPER
select NEED_SG_DMA_LENGTH
config OCTEON_ILM
diff --git a/arch/mips/loongson64/Kconfig b/arch/mips/loongson64/Kconfig
index 8e6e292675b2..0dee8923a6e9 100644
--- a/arch/mips/loongson64/Kconfig
+++ b/arch/mips/loongson64/Kconfig
@@ -125,9 +125,6 @@ config LOONGSON_UART_BASE
default y
depends on EARLY_PRINTK || SERIAL_8250
-config IOMMU_HELPER
- bool
-
config NEED_SG_DMA_LENGTH
bool
@@ -135,7 +132,6 @@ config SWIOTLB
bool "Soft IOMMU Support for All-Memory DMA"
default y
depends on CPU_LOONGSON3
- select IOMMU_HELPER
select NEED_SG_DMA_LENGTH
select NEED_DMA_MAP_STATE
diff --git a/arch/mips/netlogic/Kconfig b/arch/mips/netlogic/Kconfig
index fb00606e352d..55c9a86ffd0e 100644
--- a/arch/mips/netlogic/Kconfig
+++ b/arch/mips/netlogic/Kconfig
@@ -82,9 +82,6 @@ endif
config NLM_COMMON
bool
-config IOMMU_HELPER
- bool
-
config NEED_SG_DMA_LENGTH
bool
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 8d31481864be..57b7bbde478e 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -476,7 +476,6 @@ config IOMMU_HELPER
config SWIOTLB
bool "SWIOTLB support"
default n
- select IOMMU_HELPER
---help---
Support for IO bounce buffering for systems without an IOMMU.
This allows us to DMA to the full physical address space on
diff --git a/arch/unicore32/mm/Kconfig b/arch/unicore32/mm/Kconfig
index 5f77fb3c63be..a9bc45656fe2 100644
--- a/arch/unicore32/mm/Kconfig
+++ b/arch/unicore32/mm/Kconfig
@@ -42,9 +42,6 @@ config CPU_TLB_SINGLE_ENTRY_DISABLE
config SWIOTLB
def_bool y
-config IOMMU_HELPER
- def_bool SWIOTLB
-
config NEED_SG_DMA_LENGTH
def_bool SWIOTLB
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 9ae0c7c31af0..27f25a95b86d 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -918,7 +918,7 @@ config SWIOTLB
config IOMMU_HELPER
def_bool y
- depends on CALGARY_IOMMU || GART_IOMMU || SWIOTLB || AMD_IOMMU
+ depends on CALGARY_IOMMU || GART_IOMMU
config MAXSMP
bool "Enable Maximum number of SMP Processors and NUMA Nodes"
diff --git a/drivers/parisc/Kconfig b/drivers/parisc/Kconfig
index 3a102a84d637..5a48b5606110 100644
--- a/drivers/parisc/Kconfig
+++ b/drivers/parisc/Kconfig
@@ -103,11 +103,6 @@ config IOMMU_SBA
depends on PCI_LBA
default PCI_LBA
-config IOMMU_HELPER
- bool
- depends on IOMMU_SBA || IOMMU_CCIO
- default y
-
source "drivers/pcmcia/Kconfig"
endmenu
diff --git a/include/linux/iommu-helper.h b/include/linux/iommu-helper.h
index 86bdeffe43ad..63552b5e60d5 100644
--- a/include/linux/iommu-helper.h
+++ b/include/linux/iommu-helper.h
@@ -1,6 +1,7 @@
#ifndef _LINUX_IOMMU_HELPER_H
#define _LINUX_IOMMU_HELPER_H
+#include <linux/bug.h>
#include <linux/kernel.h>
static inline unsigned long iommu_device_max_index(unsigned long size,
@@ -13,9 +14,15 @@ static inline unsigned long iommu_device_max_index(unsigned long size,
return size;
}
-extern int iommu_is_span_boundary(unsigned int index, unsigned int nr,
- unsigned long shift,
- unsigned long boundary_size);
+static inline int iommu_is_span_boundary(unsigned int index, unsigned int nr,
+ unsigned long shift, unsigned long boundary_size)
+{
+ BUG_ON(!is_power_of_2(boundary_size));
+
+ shift = (shift + index) & (boundary_size - 1);
+ return shift + nr > boundary_size;
+}
+
extern unsigned long iommu_area_alloc(unsigned long *map, unsigned long size,
unsigned long start, unsigned int nr,
unsigned long shift,
diff --git a/lib/iommu-helper.c b/lib/iommu-helper.c
index a816f3a80625..ad21c13085fc 100644
--- a/lib/iommu-helper.c
+++ b/lib/iommu-helper.c
@@ -4,17 +4,7 @@
#include <linux/export.h>
#include <linux/bitmap.h>
-#include <linux/bug.h>
-
-int iommu_is_span_boundary(unsigned int index, unsigned int nr,
- unsigned long shift,
- unsigned long boundary_size)
-{
- BUG_ON(!is_power_of_2(boundary_size));
-
- shift = (shift + index) & (boundary_size - 1);
- return shift + nr > boundary_size;
-}
+#include <linux/iommu-helper.h>
unsigned long iommu_area_alloc(unsigned long *map, unsigned long size,
unsigned long start, unsigned int nr,