Skip to content

RFC x86: Convert PCI init to x86_init to simplify Moorestown support

Thomas Gleixner lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4x86: Move pci init function to x86_initarch/x86/include/asm/numaq.h arch/x86/include/asm/pci.h arch/x86/include/asm/pci_x86.h +12 more+52 -450 replies
2/4x86: Add pci_init_irq to x86_initarch/x86/include/asm/pci_x86.h arch/x86/include/asm/x86_init.h arch/x86/kernel/visws_quirks.c +4 more+13 -100 replies
3/4x86: Add pcibios_fixup_irqs to x86_initarch/x86/include/asm/pci_x86.h arch/x86/include/asm/x86_init.h arch/x86/kernel/x86_init.c +1 more+8 -20 replies
4/4x86: Add pci subarch init to x86_initarch/x86/include/asm/olpc.h arch/x86/include/asm/pci_x86.h arch/x86/include/asm/x86_init.h +3 more+13 -301 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [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