Lines Matching refs:mem
583 mr->attr.max_pages * sizeof *mr->mem.arbel.mtts > PAGE_SIZE) in mthca_fmr_alloc()
601 mr->mem.arbel.mpt = mthca_table_find(dev->mr_table.mpt_table, key, NULL); in mthca_fmr_alloc()
602 BUG_ON(!mr->mem.arbel.mpt); in mthca_fmr_alloc()
604 mr->mem.tavor.mpt = dev->mr_table.tavor_fmr.mpt_base + in mthca_fmr_alloc()
605 sizeof *(mr->mem.tavor.mpt) * idx; in mthca_fmr_alloc()
616 mr->mem.arbel.mtts = mthca_table_find(dev->mr_table.mtt_table, in mthca_fmr_alloc()
618 &mr->mem.arbel.dma_handle); in mthca_fmr_alloc()
619 BUG_ON(!mr->mem.arbel.mtts); in mthca_fmr_alloc()
621 mr->mem.tavor.mtts = dev->mr_table.tavor_fmr.mtt_base + mtt_seg; in mthca_fmr_alloc()
736 writeb(MTHCA_MPT_STATUS_SW, fmr->mem.tavor.mpt); in mthca_tavor_map_phys_fmr()
741 mthca_write64_raw(mtt_entry, fmr->mem.tavor.mtts + i); in mthca_tavor_map_phys_fmr()
748 __raw_writel((__force u32) mpt_entry.lkey, &fmr->mem.tavor.mpt->key); in mthca_tavor_map_phys_fmr()
749 memcpy_toio(&fmr->mem.tavor.mpt->start, &mpt_entry.start, in mthca_tavor_map_phys_fmr()
753 writeb(MTHCA_MPT_STATUS_HW, fmr->mem.tavor.mpt); in mthca_tavor_map_phys_fmr()
779 *(u8 *) fmr->mem.arbel.mpt = MTHCA_MPT_STATUS_SW; in mthca_arbel_map_phys_fmr()
783 dma_sync_single_for_cpu(&dev->pdev->dev, fmr->mem.arbel.dma_handle, in mthca_arbel_map_phys_fmr()
787 fmr->mem.arbel.mtts[i] = cpu_to_be64(page_list[i] | in mthca_arbel_map_phys_fmr()
790 dma_sync_single_for_device(&dev->pdev->dev, fmr->mem.arbel.dma_handle, in mthca_arbel_map_phys_fmr()
793 fmr->mem.arbel.mpt->key = cpu_to_be32(key); in mthca_arbel_map_phys_fmr()
794 fmr->mem.arbel.mpt->lkey = cpu_to_be32(key); in mthca_arbel_map_phys_fmr()
795 fmr->mem.arbel.mpt->length = cpu_to_be64(list_len * (1ull << fmr->attr.page_shift)); in mthca_arbel_map_phys_fmr()
796 fmr->mem.arbel.mpt->start = cpu_to_be64(iova); in mthca_arbel_map_phys_fmr()
800 *(u8 *) fmr->mem.arbel.mpt = MTHCA_MPT_STATUS_HW; in mthca_arbel_map_phys_fmr()
814 writeb(MTHCA_MPT_STATUS_SW, fmr->mem.tavor.mpt); in mthca_tavor_fmr_unmap()
824 *(u8 *) fmr->mem.arbel.mpt = MTHCA_MPT_STATUS_SW; in mthca_arbel_fmr_unmap()