]> git.baikalelectronics.ru Git - kernel.git/commit
IB/core: Ensure we map P2P memory correctly in rdma_rw_ctx_[init|destroy]()
authorLogan Gunthorpe <logang@deltatee.com>
Thu, 4 Oct 2018 21:27:42 +0000 (15:27 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 17 Oct 2018 17:18:20 +0000 (12:18 -0500)
commit2e5b9fd5caade20a355804a03f281e397d6661c0
treeb803fb76711af7c26ec22bde8f9cea71f1f22fa9
parent4dd3032d8646da305a52f67b2c6991bd3669e4a0
IB/core: Ensure we map P2P memory correctly in rdma_rw_ctx_[init|destroy]()

In order to use PCI P2P memory the pci_p2pmem_map_sg() function must be
called to map the correct PCI bus address.

To do this, check the first page in the scatter list to see if it is P2P
memory or not.  At the moment, scatter lists that contain P2P memory must
be homogeneous so if the first page is P2P the entire SGL should be P2P.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
drivers/infiniband/core/rw.c