[PATCH] ppc64: Workaround PCI issue on g5

Benjamin Herrenschmidt benh at kernel.crashing.org
Thu Dec 9 08:22:26 EST 2004


Hi !

ppc64 has a global called "pci_probe_only" which, when set, prevents the arch PCI
code from calling pci_assign_unassigned_resources(). This was cleared by pmac so
far, but a bug in the definition of the variable make that ineffective until 2.6.10,
and so we never called pci_assign_unassigned_resources(). With 2.6.10, that bug
was fixed and so we now call it, which results in some problems. Some devices who
have perfectly valid assigned addresses by firmware end up beeing moved around
anyway, which is a BAD thing can can break boot on some machines since it breaks
the relationship between addresses in Open Firmware device-tree and actual location
of PCI devices. (Some low level things like the PIC are ioremap'ed based on their
OF address, way before the PCI based ASIC hosting them has been found). This also
break the "offb" default framebuffer driver since the video card ends up beeing
moved around as well.

For now, the fix is to set pci_probe_only on pmac, thus reverting to the old
behaviour. In the long run, it would be interesting to "fix"
pci_assign_unassigned_resources() so that it does what it's name claims, and
only assigns things that have been left unassigned instead of moving things around
gratuituously...

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

Index: linux-work/arch/ppc64/kernel/pmac_pci.c
===================================================================
--- linux-work.orig/arch/ppc64/kernel/pmac_pci.c	2004-11-22 11:49:24.000000000 +1100
+++ linux-work/arch/ppc64/kernel/pmac_pci.c	2004-12-08 13:04:42.607006832 +1100
@@ -739,8 +739,8 @@
 
 	pmac_check_ht_link();
 
-	/* Tell pci.c to use the common resource allocation mecanism */
-	pci_probe_only = 0;
+	/* Tell pci.c to not use the common resource allocation mecanism */
+	pci_probe_only = 1;
 	
 	/* Allow all IO */
 	io_page_mask = -1;





More information about the Linuxppc64-dev mailing list