On Thursday 30 April 2015 09:40:10 Pavel Fedin wrote: > > The other bit missing is MSI handling, that should still be implemented. > > Hello! I decided to have a voice here. > I am currently working on a virtualization project, and i have made some > experimental additions to PCI-Generic code which enable PCI-X support. I > wanted to upstream this, but as far as i can see, you are refactoring > everything here. > Personally i think that pci_common_init_dev() is a good thing and it should > not be removed. Even more, perhaps it needs to be expanded with PCI-X > support. My current code adds a piece very similar to > mvebu_pcie_msi_enable(), which reads "msi-parent" property and then calls > of_pci_find_msi_chip_by_node(). > MVEBU driver then fills in hw.msi_ctrl with the obtained pointer and calls > pci_common_init(), which is the same as pci_common_init_dev(NULL, hw). My > modified Generic driver now does the same. So, the question is - may be we > should extract "msi-parent" handling from MVEBU and move it into > pci_common_init_dev() ? > Just IMHO copy-pasting this function over and over again in all drivers is > a bad idea. > > And one more. pci_common_init_dev() currently does not assign bus->msi, > therefore IRQ domain operations do not work. I have fixed this too, but > perhaps it's another story... Hi Pavel, There are a few problems with pci_common_init_dev() that we are solving by not calling it: - The interface is ARM specific, and not easily extended to other architectures that have requirements it does not handle today, and we definitely want to share host drivers between arm, arm64, mips and microblaze at least, probably most others in the long run. - The lack of return code and error handling means it is not good for pci host drivers in loadable modules. - The way that the interface registers multiple host bridges at the same time means that implementing that error handling is not possible without major changes. The plan forward at this point is to move over all drivers in drivers/pci/host to one of the architecture-independent interfaces. There is a lot of work going on at the moment to improve those interfaces to reduce code duplication and to make it as easy as possible to bring up a PCI host controller though, and there are probably more things that could be included there. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html