linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: Add architecture support for PCI
Date: Tue, 4 Feb 2014 17:18:41 +0100	[thread overview]
Message-ID: <201402041718.41931.arnd@arndb.de> (raw)
In-Reply-To: <CAPcvp5HN4pBysOdS5_ep_3Lp7GDDKw4YrgmKjYzBet7PtaOLUg@mail.gmail.com>

On Tuesday 04 February 2014, Andrew Murray wrote:
> On 4 February 2014 12:29, Liviu Dudau <Liviu.Dudau@arm.com> wrote:
> > On Mon, Feb 03, 2014 at 10:34:40PM +0000, Andrew Murray wrote:
> >> On 3 February 2014 18:43, Liviu Dudau <Liviu.Dudau@arm.com> wrote:
> >> > diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h
> >> > index 4cc813e..ce5bad2 100644
> >> > --- a/arch/arm64/include/asm/io.h
> >> > +++ b/arch/arm64/include/asm/io.h
> >> > @@ -120,9 +120,13 @@ static inline u64 __raw_readq(const volatile void __iomem *addr)
> >> >  /*
> >> >   *  I/O port access primitives.
> >> >   */
> >> > +#define arch_has_dev_port()    (0)
> >> >  #define IO_SPACE_LIMIT         0xffff
> >> >  #define PCI_IOBASE             ((void __iomem *)(MODULES_VADDR - SZ_2M))
> >> >
> >> > +#define ioport_map(port, nr)   (PCI_IOBASE + ((port) & IO_SPACE_LIMIT))
> >> > +#define ioport_unmap(addr)
> >>
> >> I'm not sure that this will work. The in[bwl], out[bwl] macros in
> >> arch/arm64/include/asm/io.h already add the PCI_IOBASE offset.
> >>
> >> Instead of these two #defines, why not just enforce that
> >> GENERIC_PCI_IOMAP is enabled? Or at least wrap these defines with 'if
> >> (!config_enabled(CONFIG_GENERIC_PCI_IOMAP))' or similar.
> >
> > GENERIC_PCI_IOMAP is enabled for AArch64. We have select GENERIC_IOMAP in
> > arch/arm64/Kconfig which in turn selects GENERIC_PCI_IOMAP in lib/Kconfig.
> 
> Sorry, it was intent to suggest using the ioport_[map|unmap] functions
> in lib/iomap.c instead of defining something similar here. I guess you
> will also need to also define CONFIG_HAS_IOPORT for this to happen.

We do want CONFIG_HAS_IOPORT, but I would say that we should not use
CONFIG_GENERIC_IOMAP. As I explained in another reply, enabling this
was probably a simple mistake, and we only need this if we want I/O
spaces that are /not/ memory mapped. IMHO any ARM64 system that doesn't
map its PCI I/O space into MMIO space can live without I/O port
access.

	Arnd

  reply	other threads:[~2014-02-04 16:18 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-03 18:43 [PATCH] [RFC] Add AArch64 support for PCI Liviu Dudau
2014-02-03 18:43 ` [PATCH] arm64: Add architecture " Liviu Dudau
2014-02-03 18:58   ` Arnd Bergmann
2014-02-03 19:18     ` Liviu Dudau
2014-02-03 20:05       ` Arnd Bergmann
2014-02-03 21:36         ` Liviu Dudau
2014-02-04  8:44           ` Arnd Bergmann
2014-02-04 11:09             ` Liviu Dudau
2014-02-04 11:54               ` Arnd Bergmann
2014-02-04 16:41             ` Catalin Marinas
2014-02-03 23:07         ` Rob Herring
2014-02-03 23:31           ` Jason Gunthorpe
2014-02-04  9:44             ` Arnd Bergmann
2014-02-04 13:57               ` Rob Herring
2014-02-04 19:50                 ` Arnd Bergmann
2014-02-04 18:15               ` Jason Gunthorpe
2014-02-04 18:34                 ` Arnd Bergmann
2014-02-04 19:10                   ` Jason Gunthorpe
2014-02-04 19:21                     ` Arnd Bergmann
2014-02-04  9:01           ` Arnd Bergmann
2014-02-03 22:34   ` Andrew Murray
2014-02-04 12:29     ` Liviu Dudau
2014-02-04 13:23       ` Andrew Murray
2014-02-04 16:18         ` Arnd Bergmann [this message]
2014-02-18  6:33   ` Yijing Wang
2014-02-20 14:38     ` Liviu Dudau

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=201402041718.41931.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 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).