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
601601 start_idx = (io_virt - (mr->mmkey.iova & page_mask)) >> page_shift;
602602 access_mask = ODP_READ_ALLOWED_BIT;
603603
604− if (prefetch && !downgrade && !mr->umem->writable) {
604+ if (prefetch && !downgrade && !odp->umem.writable) {
605605 /* prefetch with write-access must
606606 * be supported by the MR
607607 */
@@ -609,7 +609,7 @@ next_mr: · 1 unmodified line
609609 goto out;
610610 }
611611
612− if (mr->umem->writable && !downgrade)
612+ if (odp->umem.writable && !downgrade)
613613 access_mask |= ODP_WRITE_ALLOWED_BIT;
614614
615615 current_seq = READ_ONCE(odp->notifiers_seq);
@@ -619,8 +619,8 @@ next_mr: · 3 unmodified lines
619619 */
620620 smp_rmb();
621621
622− ret = ib_umem_odp_map_dma_pages(to_ib_umem_odp(mr->umem), io_virt, size,
623− access_mask, current_seq);
622+ ret = ib_umem_odp_map_dma_pages(odp, io_virt, size, access_mask,
623+ current_seq);
624624
625625 if (ret < 0)
626626 goto out;
@@ -628,8 +628,7 @@ next_mr: · 1 unmodified line
628628 np = ret;
629629
630630 mutex_lock(&odp->umem_mutex);
631− if (!ib_umem_mmu_notifier_retry(to_ib_umem_odp(mr->umem),
632− current_seq)) {
631+ if (!ib_umem_mmu_notifier_retry(odp, current_seq)) {
633632 /*
634633 * No need to check whether the MTTs really belong to
635634 * 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