]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Oct 2017 14:37:03 +0000 (16:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Oct 2017 14:37:03 +0000 (16:37 +0200)
added patches:
fix-xen_swiotlb_dma_mmap-prototype.patch

queue-4.4/fix-xen_swiotlb_dma_mmap-prototype.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/fix-xen_swiotlb_dma_mmap-prototype.patch b/queue-4.4/fix-xen_swiotlb_dma_mmap-prototype.patch
new file mode 100644 (file)
index 0000000..4bce0cf
--- /dev/null
@@ -0,0 +1,49 @@
+From arnd@arndb.de  Wed Oct  4 16:35:39 2017
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Wed,  4 Oct 2017 15:51:29 +0200
+Subject: fix xen_swiotlb_dma_mmap prototype
+To: gregkh@linuxfoundation.org
+Cc: stable@vger.kernel.org, Boris Ostrovsky <boris.ostrovsky@oracle.com>, xen-devel@lists.xenproject.org, jgross@suse.com, krzk@kernel.org, Arnd Bergmann <arnd@arndb.de>, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>, David Vrabel <david.vrabel@citrix.com>, Stefano Stabellini <stefano.stabellini@eu.citrix.com>, Andrii Anisov <andrii_anisov@epam.com>, Oleksandr Dmytryshyn <oleksandr.dmytryshyn@globallogic.com>, linux-kernel@vger.kernel.org
+Message-ID: <20171004135140.3720000-1-arnd@arndb.de>
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+xen_swiotlb_dma_mmap was backported from v4.10, but older
+kernels before commit 00085f1efa38 ("dma-mapping: use unsigned long
+for dma_attrs") use a different signature:
+
+arm/xen/mm.c:202:10: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
+  .mmap = xen_swiotlb_dma_mmap,
+          ^~~~~~~~~~~~~~~~~~~~
+arm/xen/mm.c:202:10: note: (near initialization for 'xen_swiotlb_dma_ops.mmap')
+
+This adapts the patch to the old calling conventions.
+
+Fixes: "swiotlb-xen: implement xen_swiotlb_dma_mmap callback"
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/xen/swiotlb-xen.c |    2 +-
+ include/xen/swiotlb-xen.h |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/xen/swiotlb-xen.c
++++ b/drivers/xen/swiotlb-xen.c
+@@ -689,7 +689,7 @@ EXPORT_SYMBOL_GPL(xen_swiotlb_set_dma_ma
+ int
+ xen_swiotlb_dma_mmap(struct device *dev, struct vm_area_struct *vma,
+                    void *cpu_addr, dma_addr_t dma_addr, size_t size,
+-                   unsigned long attrs)
++                   struct dma_attrs *attrs)
+ {
+ #if defined(CONFIG_ARM) || defined(CONFIG_ARM64)
+       if (__generic_dma_ops(dev)->mmap)
+--- a/include/xen/swiotlb-xen.h
++++ b/include/xen/swiotlb-xen.h
+@@ -62,5 +62,5 @@ xen_swiotlb_set_dma_mask(struct device *
+ extern int
+ xen_swiotlb_dma_mmap(struct device *dev, struct vm_area_struct *vma,
+                    void *cpu_addr, dma_addr_t dma_addr, size_t size,
+-                   unsigned long attrs);
++                   struct dma_attrs *attrs);
+ #endif /* __LINUX_SWIOTLB_XEN_H */
index cf5036c59d91ab1f7aabb48433ed54f6c7713475..b946750e59d4306a4136562d5cc90ff8ec21b1a9 100644 (file)
@@ -39,3 +39,4 @@ arm-pxa-fix-the-number-of-dma-requestor-lines.patch
 kvm-vmx-use-cmpxchg64.patch
 video-fbdev-aty-do-not-leak-uninitialized-padding-in-clk-to-userspace.patch
 swiotlb-xen-implement-xen_swiotlb_dma_mmap-callback.patch
+fix-xen_swiotlb_dma_mmap-prototype.patch