Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-08-16 22:01:45 +0200
committerJiri Slaby <jslaby@suse.cz>2019-08-16 22:25:10 +0200
commitfc241b69a89d1a0e4263a0b877d08093b6474260 (patch)
tree1c451215b3989b36537b2a17d65a78f94888dc2a
parent45fa7c15b2debc5fd112778133525dafff33d2eb (diff)
s390/dma: provide proper ARCH_ZONE_DMA_BITS value (bnc#1012628).
-rw-r--r--patches.kernel.org/5.2.9-116-s390-dma-provide-proper-ARCH_ZONE_DMA_BITS-valu.patch41
-rw-r--r--series.conf1
2 files changed, 42 insertions, 0 deletions
diff --git a/patches.kernel.org/5.2.9-116-s390-dma-provide-proper-ARCH_ZONE_DMA_BITS-valu.patch b/patches.kernel.org/5.2.9-116-s390-dma-provide-proper-ARCH_ZONE_DMA_BITS-valu.patch
new file mode 100644
index 0000000000..c0b351e9b3
--- /dev/null
+++ b/patches.kernel.org/5.2.9-116-s390-dma-provide-proper-ARCH_ZONE_DMA_BITS-valu.patch
@@ -0,0 +1,41 @@
+From: Halil Pasic <pasic@linux.ibm.com>
+Date: Wed, 24 Jul 2019 00:51:55 +0200
+Subject: [PATCH] s390/dma: provide proper ARCH_ZONE_DMA_BITS value
+References: bnc#1012628
+Patch-mainline: 5.2.9
+Git-commit: 1a2dcff881059dedc14fafc8a442664c8dbd60f1
+
+[ Upstream commit 1a2dcff881059dedc14fafc8a442664c8dbd60f1 ]
+
+On s390 ZONE_DMA is up to 2G, i.e. ARCH_ZONE_DMA_BITS should be 31 bits.
+The current value is 24 and makes __dma_direct_alloc_pages() take a
+wrong turn first (but __dma_direct_alloc_pages() recovers then).
+
+Let's correct ARCH_ZONE_DMA_BITS value and avoid wrong turns.
+
+Signed-off-by: Halil Pasic <pasic@linux.ibm.com>
+Reported-by: Petr Tesarik <ptesarik@suse.cz>
+Fixes: c61e9637340e ("dma-direct: add support for allocation from ZONE_DMA and ZONE_DMA32")
+Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ arch/s390/include/asm/page.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/arch/s390/include/asm/page.h b/arch/s390/include/asm/page.h
+index a4d38092530a..823578c6b9e2 100644
+--- a/arch/s390/include/asm/page.h
++++ b/arch/s390/include/asm/page.h
+@@ -177,6 +177,8 @@ static inline int devmem_is_allowed(unsigned long pfn)
+ #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \
+ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
+
++#define ARCH_ZONE_DMA_BITS 31
++
+ #include <asm-generic/memory_model.h>
+ #include <asm-generic/getorder.h>
+
+--
+2.22.0
+
diff --git a/series.conf b/series.conf
index b91c4e8f89..0a34b1ce6a 100644
--- a/series.conf
+++ b/series.conf
@@ -1136,6 +1136,7 @@
patches.kernel.org/5.2.9-113-perf-x86-intel-Fix-invalid-Bit-13-for-Icelake-M.patch
patches.kernel.org/5.2.9-114-perf-x86-Apply-more-accurate-check-on-hyperviso.patch
patches.kernel.org/5.2.9-115-perf-core-Fix-creating-kernel-counters-for-PMUs.patch
+ patches.kernel.org/5.2.9-116-s390-dma-provide-proper-ARCH_ZONE_DMA_BITS-valu.patch
########################################################
# Build fixes that apply to the vanilla kernel too.