From: Arnd Bergmann <arnd@arndb.de>
To: Pavel Fedin <p.fedin@samsung.com>
Cc: 'Lorenzo Pieralisi' <lorenzo.pieralisi@arm.com>,
'Jayachandran C' <jchandra@broadcom.com>,
'Will Deacon' <Will.Deacon@arm.com>,
'Bjorn Helgaas' <bhelgaas@google.com>,
linux-pci@vger.kernel.org, 'Liviu Dudau' <Liviu.Dudau@arm.com>,
'Sergey Dyasly' <s.dyasly@samsung.com>
Subject: Re: [RFC PATCH 1/2] PCI: generic: remove dependency on hw_pci
Date: Thu, 30 Apr 2015 09:55 +0200 [thread overview]
Message-ID: <2123326.va7nY6tTq7@wuerfel> (raw)
In-Reply-To: <"00b001d08310$82022b40$860681c0$@fedin"@samsung.com>
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
next prev parent reply other threads:[~2015-04-30 7:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-29 11:39 [RFC PATCH 1/2] PCI: generic: remove dependency on hw_pci Jayachandran C
2015-04-29 11:39 ` [RFC PATCH 2/2] PCI: generic: add arm64 support Jayachandran C
2015-04-29 12:14 ` [RFC PATCH 1/2] PCI: generic: remove dependency on hw_pci Will Deacon
2015-04-29 12:34 ` Arnd Bergmann
[not found] ` <20150429142554.GI2992@jayachandranc.netlogicmicro.com>
2015-04-29 14:42 ` Arnd Bergmann
2015-04-29 17:43 ` Lorenzo Pieralisi
2015-04-30 6:40 ` Pavel Fedin
2015-04-30 7:55 ` Arnd Bergmann [this message]
[not found] ` <20150430095949.GJ2992@jayachandranc.netlogicmicro.com>
2015-05-01 8:40 ` Lorenzo Pieralisi
2015-05-03 21:06 ` Suravee Suthikulpanit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2123326.va7nY6tTq7@wuerfel \
--to=arnd@arndb.de \
--cc=Liviu.Dudau@arm.com \
--cc=Will.Deacon@arm.com \
--cc=bhelgaas@google.com \
--cc=jchandra@broadcom.com \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=p.fedin@samsung.com \
--cc=s.dyasly@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).