All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] Deal with alignment restriction on EP side
@ 2023-01-13  9:03 Shunsuke Mie
  2023-01-13  9:03 ` [RFC PATCH 1/3] PCI: endpoint: support an alignment aware map/unmaping Shunsuke Mie
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Shunsuke Mie @ 2023-01-13  9:03 UTC (permalink / raw)
  To: Jingoo Han
  Cc: Gustavo Pimentel, Lorenzo Pieralisi, Rob Herring,
	Krzysztof Wilczyński, Bjorn Helgaas, Manivannan Sadhasivam,
	Kishon Vijay Abraham I, Shunsuke Mie, Kunihiko Hayashi,
	Hou Zhiqiang, Frank Li, Li Chen, linux-pci, linux-kernel

Some PCIe EPC controllers have restriction to map PCIe address space to the
local memory space. The mapping is needed to access memory of other side.
On epf test, RC module prepares an aligned memory, and EP module maps the
region. However, a EP module which emulate a device (e.g. VirtIO, NVMe and
etc) cannot expect that a driver for the device prepares an aligned memory.
So, a EP side should deal with the alignment restriction.

This patchset addresses with the alignment restriction on EP size. A
content as follows:
1. Improve a pci epc unmap/map functions to cover the alignment restriction
with adding epc driver support as EPC ops.
2. Implement the support function for DWC EPC driver.
3. Adapt the pci-epf-test to the map/unmap function updated at first patch.

I tested this changes on RENESAS board has DWC PCIeC.

This is a RFC, and it has patches for testing only. Following changes are
not included yet:
1. Removing alignment codes on RC side completely
2. Adapting map/unmap() changes to pci-epf-ntb/vntb

Best,
Shunsuke

Shunsuke Mie (3):
  PCI: endpoint: support an alignment aware map/unmaping
  PCI: dwc: support align_mem() callback for pci_epc_epc
  PCI: endpoint: support pci_epc_mem_map/unmap API changes

 .../pci/controller/dwc/pcie-designware-ep.c   | 13 +++
 drivers/pci/endpoint/functions/pci-epf-test.c | 89 +++++--------------
 drivers/pci/endpoint/pci-epc-core.c           | 57 +++++++++---
 include/linux/pci-epc.h                       | 10 ++-
 4 files changed, 90 insertions(+), 79 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2023-06-05 10:35 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13  9:03 [RFC PATCH 0/3] Deal with alignment restriction on EP side Shunsuke Mie
2023-01-13  9:03 ` [RFC PATCH 1/3] PCI: endpoint: support an alignment aware map/unmaping Shunsuke Mie
2023-01-13 11:29   ` kernel test robot
2023-01-13 11:49   ` kernel test robot
2023-01-13 11:59   ` kernel test robot
2023-01-13 11:59   ` kernel test robot
2023-01-17 20:41   ` Bjorn Helgaas
2023-01-18 10:33     ` Shunsuke Mie
2023-06-01 15:06   ` Kishon Vijay Abraham I
2023-06-01 23:43     ` Damien Le Moal
2023-06-02  9:42       ` Shunsuke Mie
2023-06-02 12:21         ` Damien Le Moal
2023-06-05 10:34           ` Shunsuke Mie
2023-06-02 11:39       ` Kishon Vijay Abraham I
2023-06-02 12:10         ` Damien Le Moal
2023-06-05  7:54           ` Manivannan Sadhasivam
2023-01-13  9:03 ` [RFC PATCH 2/3] PCI: dwc: support align_mem() callback for pci_epc_epc Shunsuke Mie
2023-01-13  9:03 ` [RFC PATCH 3/3] PCI: endpoint: support pci_epc_mem_map/unmap API changes Shunsuke Mie
2023-01-17 20:32 ` [RFC PATCH 0/3] Deal with alignment restriction on EP side Bjorn Helgaas
2023-01-18 10:17   ` Shunsuke Mie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.