stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [STABLE-4.4, 3.18]: fix xen_swiotlb_dma_mmap prototype
@ 2017-10-04 13:51 Arnd Bergmann
  2017-10-04 14:36 ` Patch "fix xen_swiotlb_dma_mmap prototype" has been added to the 3.18-stable tree gregkh
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Arnd Bergmann @ 2017-10-04 13:51 UTC (permalink / raw)
  To: gregkh
  Cc: stable, Boris Ostrovsky, xen-devel, jgross, krzk, Arnd Bergmann,
	Konrad Rzeszutek Wilk, David Vrabel, Stefano Stabellini,
	Andrii Anisov, Oleksandr Dmytryshyn, linux-kernel

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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/xen/swiotlb-xen.c | 2 +-
 include/xen/swiotlb-xen.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
index 622f805fb382..f7b19c25c3a4 100644
--- a/drivers/xen/swiotlb-xen.c
+++ b/drivers/xen/swiotlb-xen.c
@@ -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)
diff --git a/include/xen/swiotlb-xen.h b/include/xen/swiotlb-xen.h
index fab4fb9c6442..4d7fdbf20eff 100644
--- a/include/xen/swiotlb-xen.h
+++ b/include/xen/swiotlb-xen.h
@@ -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 */
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Patch "fix xen_swiotlb_dma_mmap prototype" has been added to the 3.18-stable tree
  2017-10-04 13:51 [PATCH] [STABLE-4.4, 3.18]: fix xen_swiotlb_dma_mmap prototype Arnd Bergmann
@ 2017-10-04 14:36 ` gregkh
  2017-10-04 14:37 ` Patch "fix xen_swiotlb_dma_mmap prototype" has been added to the 4.4-stable tree gregkh
  2017-10-04 17:01 ` [PATCH] [STABLE-4.4, 3.18]: fix xen_swiotlb_dma_mmap prototype Stefano Stabellini
  2 siblings, 0 replies; 5+ messages in thread
From: gregkh @ 2017-10-04 14:36 UTC (permalink / raw)
  To: arnd, andrii_anisov, boris.ostrovsky, david.vrabel, gregkh,
	konrad.wilk, oleksandr.dmytryshyn, stefano.stabellini
  Cc: stable, stable-commits


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 <stable@vger.kernel.org> know about it.


>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
@@ -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)
--- 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 */


Patches currently in stable-queue which might be from arnd@arndb.de are

queue-3.18/fix-xen_swiotlb_dma_mmap-prototype.patch

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Patch "fix xen_swiotlb_dma_mmap prototype" has been added to the 4.4-stable tree
  2017-10-04 13:51 [PATCH] [STABLE-4.4, 3.18]: fix xen_swiotlb_dma_mmap prototype Arnd Bergmann
  2017-10-04 14:36 ` Patch "fix xen_swiotlb_dma_mmap prototype" has been added to the 3.18-stable tree gregkh
@ 2017-10-04 14:37 ` gregkh
  2017-10-04 17:01 ` [PATCH] [STABLE-4.4, 3.18]: fix xen_swiotlb_dma_mmap prototype Stefano Stabellini
  2 siblings, 0 replies; 5+ messages in thread
From: gregkh @ 2017-10-04 14:37 UTC (permalink / raw)
  To: arnd, andrii_anisov, boris.ostrovsky, david.vrabel, gregkh,
	konrad.wilk, oleksandr.dmytryshyn, stefano.stabellini
  Cc: stable, stable-commits


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 <stable@vger.kernel.org> know about it.


>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 */


Patches currently in stable-queue which might be from arnd@arndb.de are

queue-4.4/fix-xen_swiotlb_dma_mmap-prototype.patch

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] [STABLE-4.4, 3.18]: fix xen_swiotlb_dma_mmap prototype
  2017-10-04 13:51 [PATCH] [STABLE-4.4, 3.18]: fix xen_swiotlb_dma_mmap prototype Arnd Bergmann
  2017-10-04 14:36 ` Patch "fix xen_swiotlb_dma_mmap prototype" has been added to the 3.18-stable tree gregkh
  2017-10-04 14:37 ` Patch "fix xen_swiotlb_dma_mmap prototype" has been added to the 4.4-stable tree gregkh
@ 2017-10-04 17:01 ` Stefano Stabellini
  2017-10-04 20:15   ` Greg KH
  2 siblings, 1 reply; 5+ messages in thread
From: Stefano Stabellini @ 2017-10-04 17:01 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: gregkh, stable, Boris Ostrovsky, xen-devel, jgross, krzk,
	Konrad Rzeszutek Wilk, David Vrabel, Stefano Stabellini,
	Andrii Anisov, Oleksandr Dmytryshyn, linux-kernel

On Wed, 4 Oct 2017, Arnd Bergmann wrote:
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


> ---
>  drivers/xen/swiotlb-xen.c | 2 +-
>  include/xen/swiotlb-xen.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
> index 622f805fb382..f7b19c25c3a4 100644
> --- a/drivers/xen/swiotlb-xen.c
> +++ b/drivers/xen/swiotlb-xen.c
> @@ -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)
> diff --git a/include/xen/swiotlb-xen.h b/include/xen/swiotlb-xen.h
> index fab4fb9c6442..4d7fdbf20eff 100644
> --- a/include/xen/swiotlb-xen.h
> +++ b/include/xen/swiotlb-xen.h
> @@ -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 */
> -- 
> 2.9.0
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] [STABLE-4.4, 3.18]: fix xen_swiotlb_dma_mmap prototype
  2017-10-04 17:01 ` [PATCH] [STABLE-4.4, 3.18]: fix xen_swiotlb_dma_mmap prototype Stefano Stabellini
@ 2017-10-04 20:15   ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2017-10-04 20:15 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Arnd Bergmann, stable, Boris Ostrovsky, xen-devel, jgross, krzk,
	Konrad Rzeszutek Wilk, David Vrabel, Stefano Stabellini,
	Andrii Anisov, Oleksandr Dmytryshyn, linux-kernel

On Wed, Oct 04, 2017 at 10:01:26AM -0700, Stefano Stabellini wrote:
> On Wed, 4 Oct 2017, Arnd Bergmann wrote:
> > 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")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>

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

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-10-04 20:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-04 13:51 [PATCH] [STABLE-4.4, 3.18]: fix xen_swiotlb_dma_mmap prototype Arnd Bergmann
2017-10-04 14:36 ` Patch "fix xen_swiotlb_dma_mmap prototype" has been added to the 3.18-stable tree gregkh
2017-10-04 14:37 ` Patch "fix xen_swiotlb_dma_mmap prototype" has been added to the 4.4-stable tree gregkh
2017-10-04 17:01 ` [PATCH] [STABLE-4.4, 3.18]: fix xen_swiotlb_dma_mmap prototype Stefano Stabellini
2017-10-04 20:15   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).