diff options
author | Niklas Cassel <[email protected]> | 2024-03-22 17:41:38 +0100 |
---|---|---|
committer | Bjorn Helgaas <[email protected]> | 2024-07-09 17:57:27 -0500 |
commit | 2a35703a6a00e87bf65d61e70516ae2524f70ec7 (patch) | |
tree | 941430be5b3c11ac186460a864b73bb59262578a /drivers/pci/controller/dwc/pci-keystone.c | |
parent | 199b03db86b9d9e263cb136d6c8902d443725ca3 (diff) |
misc: pci_endpoint_test: Use memcpy_toio()/memcpy_fromio() for BAR tests
The current code uses writel()/readl(), which has an implicit memory
barrier for every single readl()/writel().
Additionally, reading 4 bytes at a time over the PCI bus is not really
optimal, considering that this code is running in an ioctl handler.
Use memcpy_toio()/memcpy_fromio() for BAR tests.
Before patch with a 4MB BAR:
$ time /usr/bin/pcitest -b 1
BAR1: OKAY
real 0m 1.56s
After patch with a 4MB BAR:
$ time /usr/bin/pcitest -b 1
BAR1: OKAY
real 0m 0.54s
Link: https://lore.kernel.org/linux-pci/[email protected]
Signed-off-by: Niklas Cassel <[email protected]>
Signed-off-by: Krzysztof WilczyĆski <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Manivannan Sadhasivam <[email protected]>
Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]>
Diffstat (limited to 'drivers/pci/controller/dwc/pci-keystone.c')
0 files changed, 0 insertions, 0 deletions