linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: "Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Kishon Vijay Abraham I" <kishon@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Jingoo Han" <jingoohan1@gmail.com>,
	linux-pci@vger.kernel.org,
	"Rick Wertenbroek" <rick.wertenbroek@gmail.com>
Subject: Re: [PATCH v3 5/7] PCI: endpoint: Update documentation
Date: Fri, 4 Oct 2024 13:51:15 +0200	[thread overview]
Message-ID: <Zv_Ws1_eiM6ihTu_@ryzen.lan> (raw)
In-Reply-To: <20241004050742.140664-6-dlemoal@kernel.org>

On Fri, Oct 04, 2024 at 02:07:40PM +0900, Damien Le Moal wrote:
> Document the new functions pci_epc_map_align(), pci_epc_mem_map() and
> pci_epc_mem_unmap(). Also add the documentation for the functions
> pci_epc_map_addr() and pci_epc_unmap_addr() that were missing.
> 
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> ---
>  Documentation/PCI/endpoint/pci-endpoint.rst | 33 +++++++++++++++++++++
>  1 file changed, 33 insertions(+)
> 
> diff --git a/Documentation/PCI/endpoint/pci-endpoint.rst b/Documentation/PCI/endpoint/pci-endpoint.rst
> index 21507e3cc238..80061110441d 100644
> --- a/Documentation/PCI/endpoint/pci-endpoint.rst
> +++ b/Documentation/PCI/endpoint/pci-endpoint.rst
> @@ -117,6 +117,39 @@ by the PCI endpoint function driver.
>     The PCI endpoint function driver should use pci_epc_mem_free_addr() to
>     free the memory space allocated using pci_epc_mem_alloc_addr().
>  
> +* pci_epc_map_align()
> +
> +   The PCI endpoint controller may impose constraints on the RC PCI addresses
> +   that can be mapped. The function pci_epc_map_align() allows endpoint drivers
> +   to discover and handle such constraint by providing the size of the memory

Nit: s/constraint/constraints/


> +   that must be allocated with pci_epc_mem_alloc_addr() for successfully mapping
> +   any RC PCI address. This function will also indicate the offset into the
> +   allocated memory to use for accessing the target RC PCI address.

Should probably also mention that it might map less memory than requested.


> +
> +* pci_epc_map_addr()
> +
> +  A PCI endpoint function driver should use pci_epc_map_addr() to map to a RC
> +  PCI address the CPU address of local memory obtained with
> +  pci_epc_mem_alloc_addr().
> +
> +* pci_epc_unmap_addr()
> +
> +  A PCI endpoint function driver should use pci_epc_unmap_addr() to unmap the
> +  CPU address of local memory mapped to a RC address with pci_epc_map_addr().
> +
> +* pci_epc_mem_map()
> +
> +  A PCI endpoint function driver can use pci_epc_mem_map() to allocate and map
> +  a RC PCI address range. This function combines calls to pci_epc_map_align(),
> +  pci_epc_mem_alloc_addr() and pci_epc_mem_alloc_addr() into a single function
> +  to simplify the PCI address mapping handling in endpoitn function drivers.

s/endpoitn/endpoint/


> +
> +* pci_epc_mem_unmap()
> +
> +  A PCI endpoint function driver can use pci_epc_mem_unmap() to unmap and free
> +  memory that was allocated and mapped using pci_epc_mem_map().
> +
> +
>  Other EPC APIs
>  ~~~~~~~~~~~~~~
>  
> -- 
> 2.46.2
> 

I think that it would make more sense if you squashed the doc updates for
each function into the respective commit that add the new function(s).

Sure, you would still need a commit that adds the documentation for the
functions that was missing, but that is expected.


Regardless:
Reviewed-by: Niklas Cassel <cassel@kernel.org>

  reply	other threads:[~2024-10-04 11:51 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-04  5:07 [PATCH v3 0/7] Improve PCI memory mapping API Damien Le Moal
2024-10-04  5:07 ` [PATCH v3 1/7] PCI: endpoint: Introduce pci_epc_function_is_valid() Damien Le Moal
2024-10-04  5:07 ` [PATCH v3 2/7] PCI: endpoint: Improve pci_epc_mem_alloc_addr() Damien Le Moal
2024-10-04 11:45   ` Niklas Cassel
2024-10-04  5:07 ` [PATCH v3 3/7] PCI: endpoint: Introduce pci_epc_map_align() Damien Le Moal
2024-10-04 11:45   ` Niklas Cassel
2024-10-04  5:07 ` [PATCH v3 4/7] PCI: endpoint: Introduce pci_epc_mem_map()/unmap() Damien Le Moal
2024-10-04 11:47   ` Niklas Cassel
2024-10-04 13:29     ` Damien Le Moal
2024-10-07  2:01   ` kernel test robot
2024-10-04  5:07 ` [PATCH v3 5/7] PCI: endpoint: Update documentation Damien Le Moal
2024-10-04 11:51   ` Niklas Cassel [this message]
2024-10-04  5:07 ` [PATCH v3 6/7] PCI: endpoint: test: Use pci_epc_mem_map/unmap() Damien Le Moal
2024-10-04 12:11   ` Niklas Cassel
2024-10-04 13:47     ` Damien Le Moal
2024-10-06 11:48       ` Niklas Cassel
2024-10-06 22:15         ` Damien Le Moal
2024-10-04  5:07 ` [PATCH v3 7/7] PCI: dwc: endpoint: Define the .map_align() controller operation Damien Le Moal
2024-10-04 12:12   ` Niklas Cassel
2024-10-04 11:45 ` [PATCH v3 0/7] Improve PCI memory mapping API Niklas Cassel
2024-10-04 13:13 ` Niklas Cassel
2024-10-04 13:25   ` Damien Le Moal
2024-10-06 11:46     ` Niklas Cassel

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=Zv_Ws1_eiM6ihTu_@ryzen.lan \
    --to=cassel@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=corbet@lwn.net \
    --cc=dlemoal@kernel.org \
    --cc=jingoohan1@gmail.com \
    --cc=kishon@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=rick.wertenbroek@gmail.com \
    --cc=robh@kernel.org \
    /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).