Commit b1893318 authored by Paul Mackerras's avatar Paul Mackerras Committed by Linus Torvalds

[PATCH] ppc64: addresses from OF getting truncated to 32-bits

This patch is from Jake Moilanen <moilanen@austin.ibm.com>,
reformatted by me.

The `assigned-addresses' property in the Open Firmware device tree
nodes for PCI devices has 64 bits of PCI bus address, but we were only
using 32.  This patch fixes it so we use all 64.
Signed-off-by: default avatarJake Moilanen <moilanen@austin.ibm.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 5f766a95
......@@ -335,7 +335,8 @@ static unsigned long __init interpret_pci_props(struct device_node *np,
while ((l -= sizeof(struct pci_reg_property)) >= 0) {
if (!measure_only) {
adr[i].space = pci_addrs[i].addr.a_hi;
adr[i].address = pci_addrs[i].addr.a_lo;
adr[i].address = pci_addrs[i].addr.a_lo |
((u64)pci_addrs[i].addr.a_mid << 32);
adr[i].size = pci_addrs[i].size_lo;
}
++i;
......@@ -1721,7 +1722,8 @@ static int of_finish_dynamic_node(struct device_node *node)
}
while ((l -= sizeof(struct pci_reg_property)) >= 0) {
adr[i].space = pci_addrs[i].addr.a_hi;
adr[i].address = pci_addrs[i].addr.a_lo;
adr[i].address = pci_addrs[i].addr.a_lo |
((u64)pci_addrs[i].addr.a_mid << 32);
adr[i].size = pci_addrs[i].size_lo;
++i;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment