On Mon, May 12, 2014 at 04:10:02PM +1000, Benjamin Herrenschmidt wrote: > On Mon, 2014-05-12 at 16:00 +1000, David Gibson wrote: > > I'm not all that impressed by this translation code - in particular > > the per-bus-type hooks don't make sense to me. AFAIK the > > interpretation of ranges is not bus specific. I think it will also > > fail in some cases with #address-cells > 2, which is unfortunate. > > > > I'm about to post my own implementation of address translation. > > Well, I came up with the original code which did per-bus type hooks. > There are cases where it is needed. > > Take PCI. The top word can contain completely unrelated stuff such > as the "prefetchable" attribute. > > It's perfectly legal to put a prefetchable BAR under a non-prefetchable > bridge window. > > However a translation scheme that doesn't know to know that bit > will fail. > > It's not far fetched, it happens on our machines today. > > And that's just one of the problems I had back then...
Ah. Bother.
I supposed it's arguable that a PCI ranges property really should have
windows for both prefetchable and non-prefetchable areas, but since
that's not done in practice, it's pretty much moot.
Ok, I'll need to rethink.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
pgp2xP5_vaJgV.pgp
Description: PGP signature
