Skip to contentSkip to conversation

: fix xen_swiotlb_dma_mmap prototype

PATCH Applied Arnd Bergmann 3 participants 7 messages Oct 4, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : fix xen_swiotlb_dma_mmap prototype

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 2f0b82b1b830 ("swiotlb-xen: implement xen_swiotlb_dma_mmap callback")
---
 drivers/xen/swiotlb-xen.c | 2 +-
 include/xen/swiotlb-xen.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/xen/swiotlb-xen.c +1 -1
index 622f805fb382..f7b19c25c3a4 100644
@@ -689,7 +689,7 @@ EXPORT_SYMBOL_GPL(xen_swiotlb_set_dma_mask);
 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)
include/xen/swiotlb-xen.h +1 -1
index fab4fb9c6442..4d7fdbf20eff 100644
@@ -62,5 +62,5 @@ xen_swiotlb_set_dma_mask(struct device *dev, u64 dma_mask);
 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 */
Signature · 1 line
2.9.0
maintainer Applied
#1 lore raw

Patch "fix xen_swiotlb_dma_mmap prototype" has been added to the 3.18-stable tree

This is a note to let you know that I've just added the patch titled

fix xen_swiotlb_dma_mmap prototype

to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
fix-xen_swiotlb_dma_mmap-prototype.patch
and it can be found in the queue-3.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From [email protected] Wed Oct 4 16:35:39 2017

From: Arnd Bergmann <[email protected]>
Date: Wed, 4 Oct 2017 15:51:29 +0200
Subject: fix xen_swiotlb_dma_mmap prototype
To: [email protected]
Cc: [email protected], Boris Ostrovsky <[email protected]>, [email protected], [email protected], [email protected], Arnd Bergmann <[email protected]>, Konrad Rzeszutek Wilk <[email protected]>, David Vrabel <[email protected]>, Stefano Stabellini <[email protected]>, Andrii Anisov <[email protected]>, Oleksandr Dmytryshyn <[email protected]>, [email protected]
Message-ID: <[email protected]>

From: Arnd Bergmann <[email protected]>

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"
---
 drivers/xen/swiotlb-xen.c |    2 +-
 include/xen/swiotlb-xen.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/xen/swiotlb-xen.c +1 -1
@@ -693,7 +693,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)
include/xen/swiotlb-xen.h +1 -1
@@ -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 */

Patches currently in stable-queue which might be from [email protected] are

queue-3.18/fix-xen_swiotlb_dma_mmap-prototype.patch

maintainer Applied
#2 lore raw

Patch "fix xen_swiotlb_dma_mmap prototype" has been added to the 4.4-stable tree

In reply to Arnd Bergmann

This is a note to let you know that I've just added the patch titled

fix xen_swiotlb_dma_mmap prototype

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
fix-xen_swiotlb_dma_mmap-prototype.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From [email protected] Wed Oct 4 16:35:39 2017

From: Arnd Bergmann <[email protected]>
Date: Wed, 4 Oct 2017 15:51:29 +0200
Subject: fix xen_swiotlb_dma_mmap prototype
To: [email protected]
Cc: [email protected], Boris Ostrovsky <[email protected]>, [email protected], [email protected], [email protected], Arnd Bergmann <[email protected]>, Konrad Rzeszutek Wilk <[email protected]>, David Vrabel <[email protected]>, Stefano Stabellini <[email protected]>, Andrii Anisov <[email protected]>, Oleksandr Dmytryshyn <[email protected]>, [email protected]
Message-ID: <[email protected]>

From: Arnd Bergmann <[email protected]>

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"
---
 drivers/xen/swiotlb-xen.c |    2 +-
 include/xen/swiotlb-xen.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/xen/swiotlb-xen.c +1 -1
@@ -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)
include/xen/swiotlb-xen.h +1 -1
@@ -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 */

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/fix-xen_swiotlb_dma_mmap-prototype.patch

maintainer Reviewed-by on v1 1/1
#3 lore raw
In reply to Arnd Bergmann
Quoted 6 lines · Arnd Bergmann

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,

Quoted 7 lines
          ^~~~~~~~~~~~~~~~~~~~

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 2f0b82b1b830 ("swiotlb-xen: implement xen_swiotlb_dma_mmap callback")
Quoted 32 lines
---
 drivers/xen/swiotlb-xen.c | 2 +-
 include/xen/swiotlb-xen.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/xen/swiotlb-xen.c +1 -1
index 622f805fb382..f7b19c25c3a4 100644
@@ -689,7 +689,7 @@ EXPORT_SYMBOL_GPL(xen_swiotlb_set_dma_mask);
 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)
include/xen/swiotlb-xen.h +1 -1
index fab4fb9c6442..4d7fdbf20eff 100644
@@ -62,5 +62,5 @@ xen_swiotlb_set_dma_mask(struct device *dev, u64 dma_mask);
 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 */
Signature · 1 line
2.9.0
maintainer
#4 lore raw
Quoted 10 lines · Stefano Stabellini
Quoted 9 lines · Arnd Bergmann

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')

Quoted 6 lines
Quoted 4 lines

This adapts the patch to the old calling conventions.

Fixes 2f0b82b1b830 ("swiotlb-xen: implement xen_swiotlb_dma_mmap callback")

Thanks, I've added this tag to the patch.

greg k-h

maintainer
#5 lore raw
In reply to Stefano Stabellini
Quoted 10 lines · Stefano Stabellini
Quoted 9 lines · Arnd Bergmann

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')

Quoted 6 lines
Quoted 4 lines

This adapts the patch to the old calling conventions.

Fixes 2f0b82b1b830 ("swiotlb-xen: implement xen_swiotlb_dma_mmap callback")

Thanks, I've added this tag to the patch.

greg k-h

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

maintainer Reviewed-by on v1 1/1
#6 lore raw
In reply to Arnd Bergmann
Quoted 6 lines · Arnd Bergmann

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,

Quoted 7 lines
          ^~~~~~~~~~~~~~~~~~~~

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 2f0b82b1b830 ("swiotlb-xen: implement xen_swiotlb_dma_mmap callback")
Quoted 32 lines
---
 drivers/xen/swiotlb-xen.c | 2 +-
 include/xen/swiotlb-xen.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/xen/swiotlb-xen.c +1 -1
index 622f805fb382..f7b19c25c3a4 100644
@@ -689,7 +689,7 @@ EXPORT_SYMBOL_GPL(xen_swiotlb_set_dma_mask);
 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)
include/xen/swiotlb-xen.h +1 -1
index fab4fb9c6442..4d7fdbf20eff 100644
@@ -62,5 +62,5 @@ xen_swiotlb_set_dma_mask(struct device *dev, u64 dma_mask);
 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 */
Signature · 1 line
2.9.0

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel