pci in arch/powerpc vs arch/ppc

Scott Wood scottwood at freescale.com
Wed Aug 8 01:20:12 EST 2007


Alexandros Kostopoulos wrote:
> Except from some macros arch/powerpc/include/asm/io.h / mpc8260_pci9.h, 
> I  can seem to find anywhere the code regarding PCI Erratum 9. The 
> defined  macros(in io.h) for read/write are sufficient as a workaround 
> for PCI9?  Who does DMA and register initialization for this (it used to 
> be done in  arch/ppc/syslib/m8260_pci_erratum9.c in arc/ppc). Maybe 
> u-boot or the  bootwrapper?

I don't think the workaround exists yet in arch/powerpc, despite the 
config option.

> Another question regarding resource allocation: when  
> alloc_resource(pci_32.c), called from pcibios_allocate_resources(), 
> during  pcibios init, attempts to allocate resources using 
> request_resource(), the  request fails. This seems to happen because the 
> previously scanned PCI  devices request resources in the form, e.g. 
> 00000- 0000f (i.e. starting  from zero), and this should be mapped 
> somewhere else in cpu mem space. My  question (in order to find my bug) 
> is, who performs this mapping, from PCI  space to CPU space, the kernel 
> (and if yes, where?) or the host bridge (in  which case, I've probably 
> failed to configure it properly).

If the error message is the one I'm thinking of (it always helps to post 
the actual messages), that's normal for when the PCI bus hasn't been 
probed by the firmware.  Linux first tries to use the BARs as they're 
already set, which will obviously fail because they haven't been set, 
and then it will properly allocated them.  It's harmless verbosity, 
though it'd be nice to have a flag to tell the PCI layer to not bother 
trying to preserve any existing BARs.

-Scott



More information about the Linuxppc-dev mailing list