History

RDMA/mlx5: Use odp instead of mr->umem in pagefault_mr

These are the same thing since mr always comes from odp->private. It is confusing to reference the same memory via two names.

Jason Gunthorpe committed 7 years ago

Commit fba0e441 parent a705f3e1 file · +5 −6Browse files

Unified · Split

drivers/infiniband/hw/mlx5/odp.c+5−6
@@ -601,7 +601,7 @@ next_mr: · 600 unmodified lines
601 start_idx = (io_virt - (mr->mmkey.iova & page_mask)) >> page_shift;601 start_idx = (io_virt - (mr->mmkey.iova & page_mask)) >> page_shift;
602 access_mask = ODP_READ_ALLOWED_BIT;602 access_mask = ODP_READ_ALLOWED_BIT;
603 603
604 if (prefetch && !downgrade && !mr->umem->writable) {604 if (prefetch && !downgrade && !odp->umem.writable) {
605 /* prefetch with write-access must605 /* prefetch with write-access must
606 * be supported by the MR606 * be supported by the MR
607 */607 */
@@ -609,7 +609,7 @@ next_mr: · 1 unmodified line
609 goto out;609 goto out;
610 }610 }
611 611
612 if (mr->umem->writable && !downgrade)612 if (odp->umem.writable && !downgrade)
613 access_mask |= ODP_WRITE_ALLOWED_BIT;613 access_mask |= ODP_WRITE_ALLOWED_BIT;
614 614
615 current_seq = READ_ONCE(odp->notifiers_seq);615 current_seq = READ_ONCE(odp->notifiers_seq);
@@ -619,8 +619,8 @@ next_mr: · 3 unmodified lines
619 */619 */
620 smp_rmb();620 smp_rmb();
621 621
622 ret = ib_umem_odp_map_dma_pages(to_ib_umem_odp(mr->umem), io_virt, size,622 ret = ib_umem_odp_map_dma_pages(odp, io_virt, size, access_mask,
623 access_mask, current_seq);623 current_seq);
624 624
625 if (ret < 0)625 if (ret < 0)
626 goto out;626 goto out;
@@ -628,8 +628,7 @@ next_mr: · 1 unmodified line
628 np = ret;628 np = ret;
629 629
630 mutex_lock(&odp->umem_mutex);630 mutex_lock(&odp->umem_mutex);
631 if (!ib_umem_mmu_notifier_retry(to_ib_umem_odp(mr->umem),631 if (!ib_umem_mmu_notifier_retry(odp, current_seq)) {
632 current_seq)) {
633 /*632 /*
634 * No need to check whether the MTTs really belong to633 * No need to check whether the MTTs really belong to
635 * this MR, since ib_umem_odp_map_dma_pages already634 * this MR, since ib_umem_odp_map_dma_pages already

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t