Thread (5 messages) 5 messages, 5 authors, 2014-01-03

Re: commit e38c0a1f breaks powerpc boards with uli1575 chip

From: Nikita Yushchenko <hidden>
Date: 2013-12-19 04:42:11
Also in: linuxppc-dev, lkml

quoted hunk ↗ jump to hunk
Reverting would break Tegra PCIe, but you should not have to change the
DT either. So we need a solution.

Is this something like this sufficient to fix it?
diff --git a/drivers/of/address.c b/drivers/of/address.c
index 4b9317b..378aebd 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -74,7 +74,7 @@ static u64 of_bus_default_map(__be32 *addr, const
__be32 *range,
         * mapping doesn't specify a physical address. Rather, the
address * specifies an identifier that must match exactly.
         */
-       if (na > 2 && memcmp(range, addr, na * 4) != 0)
+       if (na > 2 && memcmp(range, addr, (na - 2) * 4) != 0)
                return OF_BAD_ADDR;

        if (da < cp || da >= (cp + s))

No, this does not help.

I've dumped the actual content of 'range' and 'addr' at the failure point 
(i.e. ar point that returns error with e38c0a1f but passes without 
e38c0a1f ):

OF: default map, cp=0, s=10000, da=70
range:  01 00 00 00 00 00 00 00 00 00 00 00
 addr:  00 00 00 00 00 00 00 00 00 00 00 70

Nikita
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help