2022-11-11 14:25:04

by Thomas Gleixner

[permalink] [raw]
Subject: [patch 31/39] Documentation: PCI: Add reference to PCI/MSI device driver APIs

From: Ahmed S. Darwish <[email protected]>

All exported device-driver MSI APIs are now grouped in one place at
drivers/pci/msi/api.c with comprehensive kernel-docs added.

Reference these kernel-docs in the official PCI/MSI howto.

Signed-off-by: Ahmed S. Darwish <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>

---
Documentation/PCI/msi-howto.rst | 10 ++++++++++
1 file changed, 10 insertions(+)
---
--- a/Documentation/PCI/msi-howto.rst
+++ b/Documentation/PCI/msi-howto.rst
@@ -285,3 +285,13 @@ to bridges between the PCI root and the
It is also worth checking the device driver to see whether it supports MSIs.
For example, it may contain calls to pci_alloc_irq_vectors() with the
PCI_IRQ_MSI or PCI_IRQ_MSIX flags.
+
+
+List of device drivers MSI(-X) APIs
+===================================
+
+The PCI/MSI subystem has a dedicated C file for its exported device driver
+APIs — `drivers/pci/msi/api.c`. The following functions are exported:
+
+.. kernel-doc:: drivers/pci/msi/api.c
+ :export:


2022-11-16 16:52:58

by Bjorn Helgaas

[permalink] [raw]
Subject: Re: [patch 31/39] Documentation: PCI: Add reference to PCI/MSI device driver APIs

On Fri, Nov 11, 2022 at 02:55:04PM +0100, Thomas Gleixner wrote:
> From: Ahmed S. Darwish <[email protected]>
>
> All exported device-driver MSI APIs are now grouped in one place at
> drivers/pci/msi/api.c with comprehensive kernel-docs added.
>
> Reference these kernel-docs in the official PCI/MSI howto.
>
> Signed-off-by: Ahmed S. Darwish <[email protected]>
> Signed-off-by: Thomas Gleixner <[email protected]>

Acked-by: Bjorn Helgaas <[email protected]>

> ---
> Documentation/PCI/msi-howto.rst | 10 ++++++++++
> 1 file changed, 10 insertions(+)
> ---
> --- a/Documentation/PCI/msi-howto.rst
> +++ b/Documentation/PCI/msi-howto.rst
> @@ -285,3 +285,13 @@ to bridges between the PCI root and the
> It is also worth checking the device driver to see whether it supports MSIs.
> For example, it may contain calls to pci_alloc_irq_vectors() with the
> PCI_IRQ_MSI or PCI_IRQ_MSIX flags.
> +
> +
> +List of device drivers MSI(-X) APIs
> +===================================
> +
> +The PCI/MSI subystem has a dedicated C file for its exported device driver
> +APIs — `drivers/pci/msi/api.c`. The following functions are exported:
> +
> +.. kernel-doc:: drivers/pci/msi/api.c
> + :export:
>

2022-11-16 17:44:19

by Jason Gunthorpe

[permalink] [raw]
Subject: Re: [patch 31/39] Documentation: PCI: Add reference to PCI/MSI device driver APIs

On Fri, Nov 11, 2022 at 02:55:04PM +0100, Thomas Gleixner wrote:
> From: Ahmed S. Darwish <[email protected]>
>
> All exported device-driver MSI APIs are now grouped in one place at
> drivers/pci/msi/api.c with comprehensive kernel-docs added.
>
> Reference these kernel-docs in the official PCI/MSI howto.
>
> Signed-off-by: Ahmed S. Darwish <[email protected]>
> Signed-off-by: Thomas Gleixner <[email protected]>
>
> ---
> Documentation/PCI/msi-howto.rst | 10 ++++++++++
> 1 file changed, 10 insertions(+)

I was wondering what the payoff was for moving everything to api.c,
this seems pretty good.

Though, in some regards it might be cleaner to teach ":export:" about
how to process symbol namespaces and put all the architecture facing
exports in some PCI_MSI_ARCH/IRQCHIP namespace which could achieve the
same effect for kdoc as moving all the code around and have the bonus
of discouraging people from mis-using the APIs inside inappropriate
drivers.

But, I like the idea, and the outcome is great so

Reviewed-by: Jason Gunthorpe <[email protected]>

Jason

Subject: [tip: irq/core] Documentation: PCI: Add reference to PCI/MSI device driver APIs

The following commit has been merged into the irq/core branch of tip:

Commit-ID: 88614075a952b1af50f5fb10c958e311f6b4f68a
Gitweb: https://git.kernel.org/tip/88614075a952b1af50f5fb10c958e311f6b4f68a
Author: Ahmed S. Darwish <[email protected]>
AuthorDate: Fri, 11 Nov 2022 14:55:04 +01:00
Committer: Thomas Gleixner <[email protected]>
CommitterDate: Thu, 17 Nov 2022 15:15:21 +01:00

Documentation: PCI: Add reference to PCI/MSI device driver APIs

All exported device-driver MSI APIs are now grouped in one place at
drivers/pci/msi/api.c with comprehensive kernel-docs added.

Reference these kernel-docs in the official PCI/MSI howto.

Signed-off-by: Ahmed S. Darwish <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Acked-by: Bjorn Helgaas <[email protected]>
Link: https://lore.kernel.org/r/[email protected]


---
Documentation/PCI/msi-howto.rst | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/Documentation/PCI/msi-howto.rst b/Documentation/PCI/msi-howto.rst
index aa2046a..8ae461e 100644
--- a/Documentation/PCI/msi-howto.rst
+++ b/Documentation/PCI/msi-howto.rst
@@ -285,3 +285,13 @@ to bridges between the PCI root and the device, MSIs are disabled.
It is also worth checking the device driver to see whether it supports MSIs.
For example, it may contain calls to pci_alloc_irq_vectors() with the
PCI_IRQ_MSI or PCI_IRQ_MSIX flags.
+
+
+List of device drivers MSI(-X) APIs
+===================================
+
+The PCI/MSI subystem has a dedicated C file for its exported device driver
+APIs — `drivers/pci/msi/api.c`. The following functions are exported:
+
+.. kernel-doc:: drivers/pci/msi/api.c
+ :export: