From: Scott Wood <scottwood@freescale.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org, Ben Collins <ben.c@servergy.com>
Subject: Re: [PATCH] PPC: PCI: Fix pcibios_io_space_offset() so it works for 32-bit ptr/64-bit rsrcs
Date: Wed, 6 Jun 2012 19:37:08 -0500 [thread overview]
Message-ID: <4FCFF7B4.7070608@freescale.com> (raw)
In-Reply-To: <1339021310.7150.181.camel@pasglop>
On 06/06/2012 05:21 PM, Benjamin Herrenschmidt wrote:
> Now that means that we can end up with funky arithmetic in a couple of
> cases:
>
> - If the bus address of the IO space is larger than the virtual address
> returned by ioremap (it's a bit silly to use large IO addresses but it's
> technically possible, normally IO windows start at 0 bus-side though).
> In fact I wouldn't be surprised if we have various other bugs if IO
> windows don't start at 0 (you may want to double check your dts setup
> here).
The dts does show the I/O beginning at bus address zero:
ranges = <0x2000000 0x0 0xc0000000 0xc0000000 0x0
0x20000000
0x1000000 0x0 0x0 0xe1000000 0x0 0x10000>;
> - If the ioremap'ed address of the IO space of another domain is lower
> than the ioremap'ed address of the first domain, in which case the
> calculation:
>
> host->io_base_virt - _IO_BASE
>
> results in a negative offset.
There should have been only one PCI domain in the QEMU case.
-Scott
next prev parent reply other threads:[~2012-06-07 0:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-06 3:50 [PATCH] PPC: PCI: Fix pcibios_io_space_offset() so it works for 32-bit ptr/64-bit rsrcs Ben Collins
2012-06-06 5:15 ` Benjamin Herrenschmidt
2012-06-18 15:23 ` Bjorn Helgaas
2012-06-18 20:39 ` Benjamin Herrenschmidt
2012-06-18 21:04 ` Ben Collins
2012-06-18 22:45 ` Benjamin Herrenschmidt
2012-06-21 0:20 ` Bjorn Helgaas
2012-06-06 21:15 ` Scott Wood
2012-06-06 22:21 ` Benjamin Herrenschmidt
2012-06-07 0:37 ` Scott Wood [this message]
2012-06-06 23:35 ` Ben Collins
2012-06-07 9:30 ` Benjamin Herrenschmidt
2012-06-07 15:38 ` Ben Collins
2012-06-07 21:32 ` Benjamin Herrenschmidt
2012-06-08 18:38 ` Ben Collins
2012-06-08 22:48 ` Benjamin Herrenschmidt
2012-06-21 2:46 ` Benjamin Herrenschmidt
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=4FCFF7B4.7070608@freescale.com \
--to=scottwood@freescale.com \
--cc=ben.c@servergy.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.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).