Hello, > 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 Applied to misc, thank you! [1/1] misc: pci_endpoint_test: Use memcpy_toio()/memcpy_fromio() for BAR tests https://git.kernel.org/pci/pci/c/9ff0a8cdf12e Krzysztof