Messages in this thread | | | Date | Sun, 30 Aug 2009 13:05:24 -0000 | From | Thomas Gleixner <> | Subject | [RFC patch 0/4] x86: Convert PCI init to x86_init to simplify Moorestown support |
| |
While reviewing the Moorestown patches I noticed weird modifications to the PCI code. The main point seems to be to use pcibios_irq_init but override pci_enable_irq. This is currently not possible by overriding pci_enable_irq before that function is called as pcibios_irq_init returns when pci_enable_irq is set. Jacop proposed a function pointer in x86_init to transport that information into pcibios_irq_init but its just a another hack. I looked at the init code in pci_subsys_init which calls various platform specific setup functions which may or may not override pci_enable_irq. The most confusing thing in that series of calls is the global variable pcibios_scanned which is used to signal the functions in that call chain that the should return. The visws pci quirk does not touch pcibios_scanned so that pci_legacy_init is called to scan the bus. Pretty non obvious. :)
In order to allow a cleaner override of pci_enable_irq while still being able to call pcibios_irq_init I converted the code to use the new x86_init infrastructure.
Aside of this MRST needs another hook close to the existing #ifdef'ed OLPC pci arch init call according to the moorestown support patch in pci-2.6.git. I added a x86_init function for this as well.
The series applies on top of the x86/platform branch in git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git
It's a bit painful to puzzle the bits and pieces for MRST together. Is there some big patch which contains all of the evil hacks which are necessary to get this puppies up and running. I don't care if they are ugly but I'd really like to get the full picture of it.
Thanks,
tglx
| |