Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 1/7] pci: Introduce pci_register_io_range() helper function.
Date: Mon, 10 Mar 2014 16:57:42 +0100	[thread overview]
Message-ID: <1852456.hNkOzqVe7y@wuerfel> (raw)
In-Reply-To: <20140310144519.GU6457@e106497-lin.cambridge.arm.com>

On Monday 10 March 2014 14:45:19 Liviu Dudau wrote:
> 
> So, if I understand you correctly, you would prefer to fail here and hence stop the
> parsing for the x86, rather than pretending everything is OK and going through the
> motions?

Yes, on x86 it is clearly a bug if we end up calling this function.

> That was not my original thinking when I've introduced this function here. The main
> purpose of the function is to help the correct translation of IO addresses in
> pci_address_to_pio(). As Jason has explained very nicely, we have 3 types of
> architectures here that we try to support:
>   - the ones that have separate IO address space (x86)
>   - the ones that have 1:1 mapping between physical IO addresses and logical ports

Still not convinced this second one actually exists.

>   - the architectures that memory map the IO addresses in virtual address space
>     and then translate the logical addresses into virtual based on a given offset.
> 
> For the first two types we don't want to do anything special. Architectures that
> fall in the last category will have to provide their own version of this function,
> with the arm64 version being generic enough to be used as de facto?

The page flags might be different across architectures: arm32 currently uses
MT_DEVICE, which only exists on arm32 and derived architectures (unicore32,
arm64).

> But I can see your point of view as well. I just don't know if that is good enough
> for powerpc and microblaze. With the way things are in my patch, they should be able
> to switch to of_create_pci_host_bridge() easily*, with your suggestion they will
> have to provide their implementation for pci_register_io_range().

I think there would still be a lot to do have powerpc switch over to
of_create_pci_host_bridge(), the more likely thing to happen is to have
that architecture implement its own copy that calls the same internal helpers
and does some more things that we may not want on other architectures.

Microblaze can probably be changed to use of_create_pci_host_bridge()
and need no custom code at all, it should need only a subset of what
we need for arm64.

> We really need to get another architecture converted. If there are no other takers I
> will make a stab once the current push towards upstreaming AArch64 hardware support
> slows down.

Moving over microblaze I think would be a good start. It has rather
specific requirements since there is only one host driver, but then again
that PCI host implementation might be shared with zynq (or synthesizable
there). I also wonder whether it's actually related to the X-gene PCI,
since I know some of the ppc4xx use Xilinx PCI and X-gene is also
based on those.

	Arnd

  reply	other threads:[~2014-03-10 15:57 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-04 15:49 [PATCH v5 0/7] [RFC] Support for creating generic host_bridge from device tree Liviu Dudau
2014-03-04 15:49 ` [PATCH v5 1/7] pci: Introduce pci_register_io_range() helper function Liviu Dudau
2014-03-04 22:30   ` Arnd Bergmann
2014-03-06 16:04     ` Liviu Dudau
2014-03-07  0:24       ` Arnd Bergmann
2014-03-07  0:58         ` Liviu Dudau
2014-03-10 14:45         ` Liviu Dudau
2014-03-10 15:57           ` Arnd Bergmann [this message]
2014-03-04 15:49 ` [PATCH v5 2/7] pci: OF: Fix the conversion of IO ranges into IO resources Liviu Dudau
2014-03-04 15:50 ` [PATCH v5 3/7] pci: Create pci_host_bridge before its associated bus in pci_create_root_bus Liviu Dudau
2014-03-05  3:48   ` Yijing Wang
2014-03-05  4:41     ` Jingoo Han
2014-03-05  8:19       ` Liviu Dudau
2014-03-04 15:50 ` [PATCH v5 4/7] pci: Introduce a domain number for pci_host_bridge Liviu Dudau
2014-03-04 15:50 ` [PATCH v5 5/7] pci: Use parent domain number when allocating child busses Liviu Dudau
2014-03-05  1:49   ` Tanmay Inamdar
2014-03-05  8:16     ` Liviu Dudau
2014-03-04 15:50 ` [PATCH v5 6/7] pci: Export find_pci_host_bridge() function Liviu Dudau
2014-03-04 15:50 ` [PATCH v5 7/7] pci: Add support for creating a generic host_bridge from device tree Liviu Dudau
2014-03-05  1:20   ` Jingoo Han
2014-03-05  8:33     ` Liviu Dudau
2014-03-05  8:58       ` Jingoo Han
2014-03-05  1:53 ` [PATCH v5 0/7] [RFC] Support for creating " Tanmay Inamdar
2014-03-05  8:18   ` Liviu Dudau
2014-03-05 17:51     ` Tanmay Inamdar
2014-03-05 11:40   ` Liviu Dudau
2014-03-05 17:49     ` Tanmay Inamdar

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=1852456.hNkOzqVe7y@wuerfel \
    --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