All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] PCI endpoint test: Add support for capabilities
@ 2024-11-20 15:57 Niklas Cassel
  2024-11-20 15:57 ` [PATCH 1/2] PCI: endpoint: pci-epf-test: " Niklas Cassel
  2024-11-20 15:57 ` [PATCH 2/2] misc: pci_endpoint_test: " Niklas Cassel
  0 siblings, 2 replies; 10+ messages in thread
From: Niklas Cassel @ 2024-11-20 15:57 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Krzysztof Wilczyński,
	Kishon Vijay Abraham I
  Cc: Damien Le Moal, linux-pci, Frank Li, Niklas Cassel

Hello all,

The pci-epf-test driver recently moved to the pci_epc_mem_map() API.
This API call handle unaligned addresses seamlessly, if the EPC driver
being used has implemented the .align_addr callback.

This means that pci-epf-test does no longer need any special padding
to the buffers that is allocated on the host side. (This was only done
in order to satisfy EPC's alignment requirements.)

In fact, to test that the pci_epc_mem_map() API is working as intended,
it is important that the host side does not allocate only give us buffers
that are nicely aligned.

However, since not all EPC drivers have implemented .align_addr,
add support for capabilities in pci-epf-test, and if .align_addr is
implemented, set a new align_addr capability. If this new align_addr
is set, do not allocate overly sized buffers on the host side.

EPC drivers that have not implemented .align_addr will behave just as
they did before.


Kind regards,
Niklas


Niklas Cassel (2):
  PCI: endpoint: pci-epf-test: Add support for capabilities
  misc: pci_endpoint_test: Add support for capabilities

 drivers/misc/pci_endpoint_test.c              | 21 +++++++++++++++++++
 drivers/pci/endpoint/functions/pci-epf-test.c | 19 +++++++++++++++++
 2 files changed, 40 insertions(+)

-- 
2.47.0


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

end of thread, other threads:[~2024-11-21 12:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-20 15:57 [PATCH 0/2] PCI endpoint test: Add support for capabilities Niklas Cassel
2024-11-20 15:57 ` [PATCH 1/2] PCI: endpoint: pci-epf-test: " Niklas Cassel
2024-11-20 15:57 ` [PATCH 2/2] misc: pci_endpoint_test: " Niklas Cassel
2024-11-20 16:53   ` Frank Li
2024-11-20 17:05     ` Niklas Cassel
2024-11-20 17:12       ` Frank Li
2024-11-20 17:17         ` Niklas Cassel
2024-11-21  2:54   ` Damien Le Moal
2024-11-21 12:09     ` Niklas Cassel
2024-11-21 12:25       ` Damien Le Moal

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.