Thread (34 messages) 34 messages, 2 authors, 2006-11-07

[PATCH 17/31] powerpc: Resolve the parent address of a PCI bus range

flat view
STALE7296d

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2006-11-07 07:22:49
Subsystem: the rest · Maintainer: Linus Torvalds

When parsing the OF "ranges" properties of PCI host busses to determine
the mapping of a PCI bus, we need to translate the "parent" address using
the prom_parse.c routines in order to obtain a CPU physical address.

This wasn't necessary while PCI busses were always at the root of the
device-tree but this is no longer the case on Cell where they can be
anywhere in the tree.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

 arch/powerpc/kernel/pci_64.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Index: linux-cell/arch/powerpc/kernel/pci_64.c
===================================================================
--- linux-cell.orig/arch/powerpc/kernel/pci_64.c	2006-10-26 17:23:09.000000000 +1000
+++ linux-cell/arch/powerpc/kernel/pci_64.c	2006-10-26 17:23:29.000000000 +1000
@@ -1002,11 +1002,7 @@ void __devinit pci_process_bridge_OF_ran
 		res = NULL;
 		pci_space = ranges[0];
 		pci_addr = ((unsigned long)ranges[1] << 32) | ranges[2];
-
-		cpu_phys_addr = ranges[3];
-		if (na >= 2)
-			cpu_phys_addr = (cpu_phys_addr << 32) | ranges[4];
-
+		cpu_phys_addr = of_translate_address(dev, &ranges[3]);
 		size = ((unsigned long)ranges[na+3] << 32) | ranges[na+4];
 		ranges += np;
 		if (size == 0)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help