mbox series

[0/3] Add RC-to-EP doorbell with platform MSI controller

Message ID 20230426203436.1277307-1-Frank.Li@nxp.com (mailing list archive)
Headers show
Series Add RC-to-EP doorbell with platform MSI controller | expand

Message

Frank Li April 26, 2023, 8:34 p.m. UTC
┌────────────┐   ┌───────────────────────────────────┐   ┌────────────────┐
│            │   │                                   │   │                │
│            │   │ PCI Endpoint                      │   │ PCI Host       │
│            │   │                                   │   │                │
│            │◄──┤ 1.platform_msi_domain_alloc_irqs()│   │                │
│            │   │                                   │   │                │
│ MSI        ├──►│ 2.write_msi_msg()                 ├──►├─BAR<n>         │
│ Controller │   │   update doorbell register address│   │                │
│            │   │   for BAR                         │   │                │
│            │   │                                   │   │ 3. Write BAR<n>│
│            │◄──┼───────────────────────────────────┼───┤                │
│            │   │                                   │   │                │
│            ├──►│ 4.Irq Handle                      │   │                │
│            │   │                                   │   │                │
│            │   │                                   │   │                │
└────────────┘   └───────────────────────────────────┘   └────────────────┘

This patches based on old https://lore.kernel.org/imx/20221124055036.1630573-1-Frank.Li@nxp.com/

Original patch only target to vntb driver. But actually it is common
method. 

This patches add new API to pci-epf-core, so any EP driver can use it. 

The key point is comments from Thomas Gleixner, who suggest use new
PCI/IMS. But arm platform change still not be merged yet.

git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git devmsi-v2-arm

So I still use existed method implement RC to EP doorbell.

If Thomas Gleixner want to continue work on devmsi-v2-arm, I can help test
and update this patch.

Frank Li (3):
  PCI: endpoint: Add RC-to-EP doorbell support using platform MSI
    controller
  misc: pci_endpoint_test: Add doorbell test case
  tools: PCI: Add 'B' option for test doorbell

 drivers/misc/pci_endpoint_test.c    |  41 +++++++++++
 drivers/pci/endpoint/pci-epf-core.c | 109 ++++++++++++++++++++++++++++
 include/linux/pci-epf.h             |  16 ++++
 include/uapi/linux/pcitest.h        |   1 +
 tools/pci/pcitest.c                 |  16 +++-
 5 files changed, 182 insertions(+), 1 deletion(-)

Comments

Frank Li May 12, 2023, 2:45 p.m. UTC | #1
> 
> This patches add new API to pci-epf-core, so any EP driver can use it.
> 
> The key point is comments from Thomas Gleixner, who suggest use new
> PCI/IMS. But arm platform change still not be merged yet.
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git devmsi-v2-arm
> 
> So I still use existed method implement RC to EP doorbell.
> 
> If Thomas Gleixner want to continue work on devmsi-v2-arm, I can help test
> and update this patch.
> 

Ping?

> Frank Li (3):
>   PCI: endpoint: Add RC-to-EP doorbell support using platform MSI
>     controller
>   misc: pci_endpoint_test: Add doorbell test case
>   tools: PCI: Add 'B' option for test doorbell
> 
>  drivers/misc/pci_endpoint_test.c    |  41 +++++++++++
>  drivers/pci/endpoint/pci-epf-core.c | 109
> ++++++++++++++++++++++++++++
>  include/linux/pci-epf.h             |  16 ++++
>  include/uapi/linux/pcitest.h        |   1 +
>  tools/pci/pcitest.c                 |  16 +++-
>  5 files changed, 182 insertions(+), 1 deletion(-)
> 
> --
> 2.34.1
Frank Li June 12, 2023, 4:17 p.m. UTC | #2
On Fri, May 12, 2023 at 02:45:12PM +0000, Frank Li wrote:
> > 
> > This patches add new API to pci-epf-core, so any EP driver can use it.
> > 
> > The key point is comments from Thomas Gleixner, who suggest use new
> > PCI/IMS. But arm platform change still not be merged yet.
> > 
> > git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git devmsi-v2-arm
> > 
> > So I still use existed method implement RC to EP doorbell.
> > 
> > If Thomas Gleixner want to continue work on devmsi-v2-arm, I can help test
> > and update this patch.
> > 
> 
> Ping?

Ping? 

> 
> > Frank Li (3):
> >   PCI: endpoint: Add RC-to-EP doorbell support using platform MSI
> >     controller
> >   misc: pci_endpoint_test: Add doorbell test case
> >   tools: PCI: Add 'B' option for test doorbell
> > 
> >  drivers/misc/pci_endpoint_test.c    |  41 +++++++++++
> >  drivers/pci/endpoint/pci-epf-core.c | 109
> > ++++++++++++++++++++++++++++
> >  include/linux/pci-epf.h             |  16 ++++
> >  include/uapi/linux/pcitest.h        |   1 +
> >  tools/pci/pcitest.c                 |  16 +++-
> >  5 files changed, 182 insertions(+), 1 deletion(-)
> > 
> > --
> > 2.34.1
>
Frank Li July 17, 2023, 2:06 p.m. UTC | #3
On Mon, Jun 12, 2023 at 12:17:25PM -0400, Frank Li wrote:
> On Fri, May 12, 2023 at 02:45:12PM +0000, Frank Li wrote:
> > > 
> > > This patches add new API to pci-epf-core, so any EP driver can use it.
> > > 
> > > The key point is comments from Thomas Gleixner, who suggest use new
> > > PCI/IMS. But arm platform change still not be merged yet.
> > > 
> > > git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git devmsi-v2-arm
> > > 
> > > So I still use existed method implement RC to EP doorbell.
> > > 
> > > If Thomas Gleixner want to continue work on devmsi-v2-arm, I can help test
> > > and update this patch.
> > > 
> > 
> > Ping?
> 
> Ping? 

ping? 

> 
> > 
> > > Frank Li (3):
> > >   PCI: endpoint: Add RC-to-EP doorbell support using platform MSI
> > >     controller
> > >   misc: pci_endpoint_test: Add doorbell test case
> > >   tools: PCI: Add 'B' option for test doorbell
> > > 
> > >  drivers/misc/pci_endpoint_test.c    |  41 +++++++++++
> > >  drivers/pci/endpoint/pci-epf-core.c | 109
> > > ++++++++++++++++++++++++++++
> > >  include/linux/pci-epf.h             |  16 ++++
> > >  include/uapi/linux/pcitest.h        |   1 +
> > >  tools/pci/pcitest.c                 |  16 +++-
> > >  5 files changed, 182 insertions(+), 1 deletion(-)
> > > 
> > > --
> > > 2.34.1
> >
Frank Li Aug. 24, 2023, 7:01 p.m. UTC | #4
On Mon, Jul 17, 2023 at 10:06:39AM -0400, Frank Li wrote:
> On Mon, Jun 12, 2023 at 12:17:25PM -0400, Frank Li wrote:
> > On Fri, May 12, 2023 at 02:45:12PM +0000, Frank Li wrote:
> > > > 
> > > > This patches add new API to pci-epf-core, so any EP driver can use it.
> > > > 
> > > > The key point is comments from Thomas Gleixner, who suggest use new
> > > > PCI/IMS. But arm platform change still not be merged yet.
> > > > 
> > > > git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git devmsi-v2-arm
> > > > 
> > > > So I still use existed method implement RC to EP doorbell.
> > > > 
> > > > If Thomas Gleixner want to continue work on devmsi-v2-arm, I can help test
> > > > and update this patch.
> > > > 
> > > 
> > > Ping?
> > 
> > Ping? 
> 
> ping? 

@Mani
     Do you have chance to review these patches? It provide a common
method with GIC ITS to implement notification from RC to EP.

Frank

> 
> > 
> > > 
> > > > Frank Li (3):
> > > >   PCI: endpoint: Add RC-to-EP doorbell support using platform MSI
> > > >     controller
> > > >   misc: pci_endpoint_test: Add doorbell test case
> > > >   tools: PCI: Add 'B' option for test doorbell
> > > > 
> > > >  drivers/misc/pci_endpoint_test.c    |  41 +++++++++++
> > > >  drivers/pci/endpoint/pci-epf-core.c | 109
> > > > ++++++++++++++++++++++++++++
> > > >  include/linux/pci-epf.h             |  16 ++++
> > > >  include/uapi/linux/pcitest.h        |   1 +
> > > >  tools/pci/pcitest.c                 |  16 +++-
> > > >  5 files changed, 182 insertions(+), 1 deletion(-)
> > > > 
> > > > --
> > > > 2.34.1
> > >
Manivannan Sadhasivam Aug. 25, 2023, 8:34 a.m. UTC | #5
On Thu, Aug 24, 2023 at 03:01:30PM -0400, Frank Li wrote:
> On Mon, Jul 17, 2023 at 10:06:39AM -0400, Frank Li wrote:
> > On Mon, Jun 12, 2023 at 12:17:25PM -0400, Frank Li wrote:
> > > On Fri, May 12, 2023 at 02:45:12PM +0000, Frank Li wrote:
> > > > > 
> > > > > This patches add new API to pci-epf-core, so any EP driver can use it.
> > > > > 
> > > > > The key point is comments from Thomas Gleixner, who suggest use new
> > > > > PCI/IMS. But arm platform change still not be merged yet.
> > > > > 
> > > > > git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git devmsi-v2-arm
> > > > > 
> > > > > So I still use existed method implement RC to EP doorbell.
> > > > > 
> > > > > If Thomas Gleixner want to continue work on devmsi-v2-arm, I can help test
> > > > > and update this patch.
> > > > > 
> > > > 
> > > > Ping?
> > > 
> > > Ping? 
> > 
> > ping? 
> 
> @Mani
>      Do you have chance to review these patches? It provide a common
> method with GIC ITS to implement notification from RC to EP.
> 

Sorry for the delay. I was wating for a review from Thomas. But since this
series hasn't caught his attention, I'll provide my review next week.

- Mani

> Frank
> 
> > 
> > > 
> > > > 
> > > > > Frank Li (3):
> > > > >   PCI: endpoint: Add RC-to-EP doorbell support using platform MSI
> > > > >     controller
> > > > >   misc: pci_endpoint_test: Add doorbell test case
> > > > >   tools: PCI: Add 'B' option for test doorbell
> > > > > 
> > > > >  drivers/misc/pci_endpoint_test.c    |  41 +++++++++++
> > > > >  drivers/pci/endpoint/pci-epf-core.c | 109
> > > > > ++++++++++++++++++++++++++++
> > > > >  include/linux/pci-epf.h             |  16 ++++
> > > > >  include/uapi/linux/pcitest.h        |   1 +
> > > > >  tools/pci/pcitest.c                 |  16 +++-
> > > > >  5 files changed, 182 insertions(+), 1 deletion(-)
> > > > > 
> > > > > --
> > > > > 2.34.1
> > > >
Li Chen Aug. 30, 2023, 7:36 a.m. UTC | #6
Hi Frank,

Frank Li <Frank.Li@nxp.com> writes:

> drivers/misc/pci_endpoint_test.c | 41 +++++++++++
> drivers/pci/endpoint/pci-epf-core.c | 109 ++++++++++++++++++++++++++++
> include/linux/pci-epf.h | 16 ++++
> include/uapi/linux/pcitest.h | 1 +
> tools/pci/pcitest.c | 16 +++-
> 5 files changed, 182 insertions(+), 1 deletion(-)

It seems that you forgot to add changes to drivers/pci/endpoint/functions/pci-epf-test.c.

Regards,
Li
Frank Li Aug. 30, 2023, 6:27 p.m. UTC | #7
On Wed, Aug 30, 2023 at 03:36:05PM +0800, Li Chen wrote:
> 
> Hi Frank,
> 
> Frank Li <Frank.Li@nxp.com> writes:
> 
> > drivers/misc/pci_endpoint_test.c | 41 +++++++++++
> > drivers/pci/endpoint/pci-epf-core.c | 109 ++++++++++++++++++++++++++++
> > include/linux/pci-epf.h | 16 ++++
> > include/uapi/linux/pcitest.h | 1 +
> > tools/pci/pcitest.c | 16 +++-
> > 5 files changed, 182 insertions(+), 1 deletion(-)
> 
> It seems that you forgot to add changes to drivers/pci/endpoint/functions/pci-epf-test.c.

Yes, let us wait for mani's feedback and Update together.

Frank

> 
> Regards,
> Li