Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1652690 > unrolled thread

[PATCH v2] s390: provide default ioremap and iounmap declaration

Started byLogan Gunthorpe <logang@deltatee.com>
First post2017-05-29 21:20 +0200
Last post2017-05-30 14:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] s390: provide default ioremap and iounmap declaration Logan Gunthorpe <logang@deltatee.com> - 2017-05-29 21:20 +0200
    Re: [PATCH v2] s390: provide default ioremap and iounmap  declaration Sebastian Ott <sebott@linux.vnet.ibm.com> - 2017-05-30 14:30 +0200

#1652690 — [PATCH v2] s390: provide default ioremap and iounmap declaration

FromLogan Gunthorpe <logang@deltatee.com>
Date2017-05-29 21:20 +0200
Subject[PATCH v2] s390: provide default ioremap and iounmap declaration
Message-ID<tMymR-4nB-1@gated-at.bofh.it>
Move the CONFIG_PCI device so that ioremap and iounmap are always
available. This looks safe as there's nothing PCI specific in the
implementation of these functions.

I have designs to use these functions in scatterlist.c where they'd likely
never be called without CONFIG_PCI set, but this is needed to compile
such changes.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
---

v2 of this patch is changed to simply move the CONFIG_PCI #ifdef
to expose only a single set of functions as suggested by Heiko
Carstens.

 arch/s390/include/asm/io.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/s390/include/asm/io.h b/arch/s390/include/asm/io.h
index 437e9af96688..904e4b3af95d 100644
--- a/arch/s390/include/asm/io.h
+++ b/arch/s390/include/asm/io.h
@@ -25,8 +25,6 @@ void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr);

 #define IO_SPACE_LIMIT 0

-#ifdef CONFIG_PCI
-
 #define ioremap_nocache(addr, size)	ioremap(addr, size)
 #define ioremap_wc			ioremap_nocache
 #define ioremap_wt			ioremap_nocache
@@ -49,6 +47,8 @@ static inline void ioport_unmap(void __iomem *p)
 {
 }

+#ifdef CONFIG_PCI
+
 /*
  * s390 needs a private implementation of pci_iomap since ioremap with its
  * offset parameter isn't sufficient. That's because BAR spaces are not
--
2.11.0

[toc] | [next] | [standalone]


#1653182 — Re: [PATCH v2] s390: provide default ioremap and iounmap declaration

FromSebastian Ott <sebott@linux.vnet.ibm.com>
Date2017-05-30 14:30 +0200
SubjectRe: [PATCH v2] s390: provide default ioremap and iounmap declaration
Message-ID<tMOrE-7i1-23@gated-at.bofh.it>
In reply to#1652690
On Mon, 29 May 2017, Logan Gunthorpe wrote:
> Move the CONFIG_PCI device so that ioremap and iounmap are always
> available. This looks safe as there's nothing PCI specific in the
> implementation of these functions.
> 
> I have designs to use these functions in scatterlist.c where they'd likely
> never be called without CONFIG_PCI set, but this is needed to compile
> such changes.
> 
> Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
> Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
> cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
> Cc: Al Viro <viro@ZenIV.linux.org.uk>
> ---
> 
> v2 of this patch is changed to simply move the CONFIG_PCI #ifdef
> to expose only a single set of functions as suggested by Heiko
> Carstens.
> 
>  arch/s390/include/asm/io.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/s390/include/asm/io.h b/arch/s390/include/asm/io.h
> index 437e9af96688..904e4b3af95d 100644
> --- a/arch/s390/include/asm/io.h
> +++ b/arch/s390/include/asm/io.h
> @@ -25,8 +25,6 @@ void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr);
> 
>  #define IO_SPACE_LIMIT 0
> 
> -#ifdef CONFIG_PCI
> -
>  #define ioremap_nocache(addr, size)	ioremap(addr, size)
>  #define ioremap_wc			ioremap_nocache
>  #define ioremap_wt			ioremap_nocache
> @@ -49,6 +47,8 @@ static inline void ioport_unmap(void __iomem *p)
>  {
>  }
> 
> +#ifdef CONFIG_PCI
> +
>  /*
>   * s390 needs a private implementation of pci_iomap since ioremap with its
>   * offset parameter isn't sufficient. That's because BAR spaces are not
> --
> 2.11.0
> 
> 

Applied. The patch will go upstream via Martin's tree.

Thanks!
Sebastian

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web