All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	Russell King <linux@arm.linux.org.uk>,
	Will Deacon <Will.Deacon@arm.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] arm64: Use include/asm-generic/io.h
Date: Thu, 10 Jul 2014 15:14:16 +0200	[thread overview]
Message-ID: <201407101514.16530.arnd@arndb.de> (raw)
In-Reply-To: <20140710110034.GI16137@arm.com>

On Thursday 10 July 2014, Catalin Marinas wrote:
> > @@ -235,8 +155,7 @@ extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size);
> >  #define ioremap_wc(addr, size)               __ioremap((addr), (size), __pgprot(PROT_NORMAL_NC))
> >  #define iounmap                              __iounmap
> >  
> > -#define ARCH_HAS_IOREMAP_WC
> > -#include <asm-generic/iomap.h>
> > +#include <asm-generic/io.h>
> 
> We don't currently have PCIe support in mainline for arm64 but what I
> had in mind with the generic iomap is that functions like ioread32_rep
> first check whether the address is an IO address or a memory one and
> calls the insl or mmio_insl accordingly. With your generic
> implementation, this check disappears.
> 
> The question is whether this functionality would still be needed.

I think it's much better not to have that check on architectures that have a memory
mapped I/O space like arm64. The main advantage is that ioread32() is just a trivial
alias for readl(). The only reason for needing generic_iomap is architectures that
do something very different for I/O ports.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] arm64: Use include/asm-generic/io.h
Date: Thu, 10 Jul 2014 15:14:16 +0200	[thread overview]
Message-ID: <201407101514.16530.arnd@arndb.de> (raw)
In-Reply-To: <20140710110034.GI16137@arm.com>

On Thursday 10 July 2014, Catalin Marinas wrote:
> > @@ -235,8 +155,7 @@ extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size);
> >  #define ioremap_wc(addr, size)               __ioremap((addr), (size), __pgprot(PROT_NORMAL_NC))
> >  #define iounmap                              __iounmap
> >  
> > -#define ARCH_HAS_IOREMAP_WC
> > -#include <asm-generic/iomap.h>
> > +#include <asm-generic/io.h>
> 
> We don't currently have PCIe support in mainline for arm64 but what I
> had in mind with the generic iomap is that functions like ioread32_rep
> first check whether the address is an IO address or a memory one and
> calls the insl or mmio_insl accordingly. With your generic
> implementation, this check disappears.
> 
> The question is whether this functionality would still be needed.

I think it's much better not to have that check on architectures that have a memory
mapped I/O space like arm64. The main advantage is that ioread32() is just a trivial
alias for readl(). The only reason for needing generic_iomap is architectures that
do something very different for I/O ports.

	Arnd

  reply	other threads:[~2014-07-10 13:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-09 15:11 [PATCH 1/3] asm-generic/io.h: Implement generic {read,write}s*() Thierry Reding
2014-07-09 15:11 ` Thierry Reding
2014-07-09 15:11 ` [PATCH 2/3] ARM: Use include/asm-generic/io.h Thierry Reding
2014-07-09 15:11   ` Thierry Reding
2014-07-09 15:11 ` [PATCH 3/3] arm64: " Thierry Reding
2014-07-09 15:11   ` Thierry Reding
2014-07-10 11:00   ` Catalin Marinas
2014-07-10 11:00     ` Catalin Marinas
2014-07-10 13:14     ` Arnd Bergmann [this message]
2014-07-10 13:14       ` Arnd Bergmann
2014-07-11 12:19       ` Catalin Marinas
2014-07-11 12:19         ` Catalin Marinas
2014-07-11 12:58         ` Arnd Bergmann
2014-07-11 12:58           ` Arnd Bergmann
2014-07-11 13:01           ` Thierry Reding
2014-07-11 13:01             ` Thierry Reding
2014-07-11 14:00             ` Catalin Marinas
2014-07-11 14:00               ` Catalin Marinas
2014-07-09 17:38 ` [PATCH 1/3] asm-generic/io.h: Implement generic {read,write}s*() Sam Ravnborg
2014-07-09 17:38   ` Sam Ravnborg
2014-07-10 10:38 ` Arnd Bergmann
2014-07-10 10:38   ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201407101514.16530.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=Will.Deacon@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.