From: Jerome Brunet <jbrunet@baylibre.com>
To: "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>,
"Jon Mason" <jdmason@kudzu.us>,
"Dave Jiang" <dave.jiang@intel.com>,
"Allen Hubbe" <allenbh@gmail.com>,
"Christoph Hellwig" <hch@lst.de>,
"Sagi Grimberg" <sagi@grimberg.me>,
"Chaitanya Kulkarni" <kch@nvidia.com>
Cc: Marek Vasut <marek.vasut+renesas@gmail.com>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
Yuya Hamamachi <yuya.hamamachi.sx@renesas.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
ntb@lists.linux.dev, linux-nvme@lists.infradead.org,
Jerome Brunet <jbrunet@baylibre.com>,
Niklas Cassel <cassel@kernel.org>
Subject: [PATCH v5 0/2] PCI: endpoint: space allocation fixups
Date: Thu, 24 Apr 2025 10:34:03 +0200 [thread overview]
Message-ID: <20250424-pci-ep-size-alignment-v5-0-2d4ec2af23f5@baylibre.com> (raw)
This patchset fixes problems while trying to allocate space for PCI
endpoint function.
The problems, and related fixups, have been found while trying to link two
renesas rcar-gen4 r8a779f0-spider devices with the vNTB endpoint
function. This platform has 2 configurable BAR0 and BAR2, with an alignment
of 1MB, and fairly small fixed BAR4 of 256B.
This was tested with
* BAR0 (1MB): CTRL+SPAD
* BAR2 (1MB): MW0
* BAR4 (256B): Doorbell
This setup is currently not supported by the vNTB EP driver and requires a
small hack. I'm working on that too.
Changes in v5:
- Collect Reviewed-by trailer
- Fix nit full stop comment
- Link to v4: https://lore.kernel.org/r/20250422-pci-ep-size-alignment-v4-0-6bd58443fee9@baylibre.com
Changes in v4:
- Drop patch 1 of v3 and add new .aligned_size in struct pci_epf_bar
instead re-computing the aligned size on the path freeing the memory
- Link to v3: https://lore.kernel.org/r/20250407-pci-ep-size-alignment-v3-0-865878e68cc8@baylibre.com
Changes in v3:
- Rebased on v6.15-rc1
- Fix build issue with newly introduced nvme endpoint function
- Link to v2: https://lore.kernel.org/r/20250404-pci-ep-size-alignment-v2-0-c3a0db4cfc57@baylibre.com
Changes in v2:
- Allocate space that match the iATU alignment requirement, as previously
done.
- Chose not to add a new member in struct pci_epf_bar, as initially
discussed. After reworking the code, that did not seem necessary.
- Make sure SPAD registers are 4 bytes aligned in the vNTB endpoint function
- Link to v1: https://lore.kernel.org/r/20250328-pci-ep-size-alignment-v1-0-ee5b78b15a9a@baylibre.com
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
Jerome Brunet (2):
PCI: endpoint: improve fixed_size bar handling when allocating space
PCI: endpoint: pci-epf-vntb: simplify ctrl/spad space allocation
drivers/pci/endpoint/functions/pci-epf-vntb.c | 26 +++-----------------------
drivers/pci/endpoint/pci-epf-core.c | 21 ++++++++++++++-------
include/linux/pci-epf.h | 3 +++
3 files changed, 20 insertions(+), 30 deletions(-)
---
base-commit: 92713f0ea620bbe923eb4e7bda408e5c79597cd4
change-id: 20250328-pci-ep-size-alignment-9d85b28b8050
Best regards,
--
Jerome
next reply other threads:[~2025-04-24 8:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-24 8:34 Jerome Brunet [this message]
2025-04-24 8:34 ` [PATCH v5 1/2] PCI: endpoint: improve fixed_size bar handling when allocating space Jerome Brunet
2025-04-24 8:34 ` [PATCH v5 2/2] PCI: endpoint: pci-epf-vntb: simplify ctrl/spad space allocation Jerome Brunet
2025-04-27 17:17 ` [PATCH v5 0/2] PCI: endpoint: space allocation fixups Manivannan Sadhasivam
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=20250424-pci-ep-size-alignment-v5-0-2d4ec2af23f5@baylibre.com \
--to=jbrunet@baylibre.com \
--cc=allenbh@gmail.com \
--cc=bhelgaas@google.com \
--cc=cassel@kernel.org \
--cc=dave.jiang@intel.com \
--cc=hch@lst.de \
--cc=jdmason@kudzu.us \
--cc=kch@nvidia.com \
--cc=kishon@kernel.org \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=marek.vasut+renesas@gmail.com \
--cc=ntb@lists.linux.dev \
--cc=sagi@grimberg.me \
--cc=yoshihiro.shimoda.uh@renesas.com \
--cc=yuya.hamamachi.sx@renesas.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
all inboxes | Powered by JetHome®