summaryrefslogtreecommitdiff
path: root/tools/perf/perf.c
diff options
context:
space:
mode:
authorJiasen Lin <linjiasen@hygon.cn>2019-11-21 05:28:44 +0300
committerJon Mason <jdmason@kudzu.us>2020-03-13 17:03:49 +0300
commit99a06056124dcf5cfc4c95278b86c6ff96aaa1ec (patch)
treed70de1d5a382452eeaebda8a1ccec768f3ac17e6 /tools/perf/perf.c
parentbb81bf62151031df004864eabee0431c8b8e9064 (diff)
downloadlinux-99a06056124dcf5cfc4c95278b86c6ff96aaa1ec.tar.xz
NTB: ntb_perf: Fix address err in perf_copy_chunk
peer->outbuf is a virtual address which is get by ioremap, it can not be converted to a physical address by virt_to_page and page_to_phys. This conversion will result in DMA error, because the destination address which is converted by page_to_phys is invalid. This patch save the MMIO address of NTB BARx in perf_setup_peer_mw, and map the BAR space to DMA address after we assign the DMA channel. Then fill the destination address of DMA descriptor with this DMA address to guarantee that the address of memory write requests fall into memory window of NBT BARx with IOMMU enabled and disabled. Fixes: 5648e56d03fa ("NTB: ntb_perf: Add full multi-port NTB API support") Signed-off-by: Jiasen Lin <linjiasen@hygon.cn> Reviewed-by: Logan Gunthorpe <logang@deltatee.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'tools/perf/perf.c')
0 files changed, 0 insertions, 0 deletions