From: Niklas Cassel <cassel@kernel.org>
To: Frank Li <Frank.Li@nxp.com>
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>,
"Arnd Bergmann" <arnd@arndb.de>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
imx@lists.linux.dev, dlemoal@kernel.org, maz@kernel.org,
tglx@linutronix.de, jdmason@kudzu.us
Subject: Re: [PATCH v6 3/5] PCI: endpoint: pci-epf-test: Add doorbell test support
Date: Tue, 12 Nov 2024 21:14:49 +0100 [thread overview]
Message-ID: <ZzO3OcCNtHUfm867@x1-carbon> (raw)
In-Reply-To: <20241112-ep-msi-v6-3-45f9722e3c2a@nxp.com>
Hello Frank,
On Tue, Nov 12, 2024 at 12:48:16PM -0500, Frank Li wrote:
> Add three registers: doorbell_bar, doorbell_addr, and doorbell_data,
> along with doorbell_done. Use pci_epf_alloc_doorbell() to allocate a
> doorbell address space.
>
> Enable the Root Complex (RC) side driver to trigger pci-epc-test's doorbell
> callback handler by writing doorbell_data to the mapped doorbell_bar's
> address space.
>
> Set doorbell_done in the doorbell callback to indicate completion.
>
> To avoid broken compatibility, add new command COMMAND_ENABLE_DOORBELL
> and COMMAND_DISABLE_DOORBELL. Host side need send COMMAND_ENABLE_DOORBELL
> to map one bar's inbound address to MSI space. the command
> COMMAND_DISABLE_DOORBELL to recovery original inbound address mapping.
>
> Host side new driver Host side old driver
>
> EP: new driver S F
> EP: old driver F F
>
> S: If EP side support MSI, 'pcitest -B' return success.
> If EP side doesn't support MSI, the same to 'F'.
>
> F: 'pcitest -B' return failure, other case as usual.
>
> Tested-by: Niklas Cassel <cassel@kernel.org>
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> Change from v5 to v6
> - rename doorbell_addr to doorbell_offset
Is there a reason why you chose to not incorporate the helper function
that I suggested here:
https://lore.kernel.org/linux-pci/ZzMtKUFi30_o6SwL@ryzen/
I didn't see any reply from you to that message.
Personally I think that it is nice to have the alignment code in a single
function, rather than duplicating the code. The helper also looks quite
similar to how we do outbound address translation alignment:
https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/commit/?h=endpoint&id=e73ea1c2d4d8f7ba5daaf7aa51171f63cf79bcd8
so that people will recognize the pattern more easily.
But I guess you didn't like my suggestion?
(Which is fine, but I would have expected some motivation.)
Kind regards,
Niklas
next prev parent reply other threads:[~2024-11-12 20:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-12 17:48 [PATCH v6 0/5] PCI: EP: Add RC-to-EP doorbell with platform MSI controller Frank Li
2024-11-12 17:48 ` [PATCH v6 1/5] PCI: endpoint: Add pci_epc_get_fn() API for customizable filtering Frank Li
2024-11-12 17:48 ` [PATCH v6 2/5] PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controller Frank Li
2024-11-12 17:48 ` [PATCH v6 3/5] PCI: endpoint: pci-epf-test: Add doorbell test support Frank Li
2024-11-12 20:14 ` Niklas Cassel [this message]
2024-11-12 20:37 ` Frank Li
2024-11-13 9:02 ` Niklas Cassel
2024-11-12 17:48 ` [PATCH v6 4/5] misc: pci_endpoint_test: Add doorbell test case Frank Li
2024-11-12 17:48 ` [PATCH v6 5/5] tools: PCI: Add 'B' option for test doorbell Frank Li
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=ZzO3OcCNtHUfm867@x1-carbon \
--to=cassel@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=dlemoal@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=imx@lists.linux.dev \
--cc=jdmason@kudzu.us \
--cc=kishon@kernel.org \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=maz@kernel.org \
--cc=tglx@linutronix.de \
/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