Lines Matching refs:user_dma_pkt
3340 struct packet_lin_dma *user_dma_pkt, in goya_pin_memory_before_cs() argument
3346 if (hl_userptr_is_pinned(hdev, addr, le32_to_cpu(user_dma_pkt->tsize), in goya_pin_memory_before_cs()
3354 rc = hl_pin_host_memory(hdev, addr, le32_to_cpu(user_dma_pkt->tsize), in goya_pin_memory_before_cs()
3386 struct packet_lin_dma *user_dma_pkt) in goya_validate_dma_pkt_host() argument
3397 ctl = le32_to_cpu(user_dma_pkt->ctl); in goya_validate_dma_pkt_host()
3410 addr = le64_to_cpu(user_dma_pkt->src_addr); in goya_validate_dma_pkt_host()
3411 device_memory_addr = le64_to_cpu(user_dma_pkt->dst_addr); in goya_validate_dma_pkt_host()
3420 addr = le64_to_cpu(user_dma_pkt->dst_addr); in goya_validate_dma_pkt_host()
3421 device_memory_addr = le64_to_cpu(user_dma_pkt->src_addr); in goya_validate_dma_pkt_host()
3427 addr = le64_to_cpu(user_dma_pkt->src_addr); in goya_validate_dma_pkt_host()
3428 device_memory_addr = le64_to_cpu(user_dma_pkt->dst_addr); in goya_validate_dma_pkt_host()
3436 addr = le64_to_cpu(user_dma_pkt->dst_addr); in goya_validate_dma_pkt_host()
3437 device_memory_addr = le64_to_cpu(user_dma_pkt->src_addr); in goya_validate_dma_pkt_host()
3446 le32_to_cpu(user_dma_pkt->tsize), in goya_validate_dma_pkt_host()
3453 user_dma_pkt->tsize); in goya_validate_dma_pkt_host()
3458 le32_to_cpu(user_dma_pkt->tsize), in goya_validate_dma_pkt_host()
3465 user_dma_pkt->tsize); in goya_validate_dma_pkt_host()
3471 parser->patched_cb_size += sizeof(*user_dma_pkt); in goya_validate_dma_pkt_host()
3480 rc = goya_pin_memory_before_cs(hdev, parser, user_dma_pkt, in goya_validate_dma_pkt_host()
3489 struct packet_lin_dma *user_dma_pkt) in goya_validate_dma_pkt_no_host() argument
3495 ctl = le32_to_cpu(user_dma_pkt->ctl); in goya_validate_dma_pkt_no_host()
3501 dram_memory_addr = le64_to_cpu(user_dma_pkt->src_addr); in goya_validate_dma_pkt_no_host()
3502 sram_memory_addr = le64_to_cpu(user_dma_pkt->dst_addr); in goya_validate_dma_pkt_no_host()
3505 sram_memory_addr = le64_to_cpu(user_dma_pkt->src_addr); in goya_validate_dma_pkt_no_host()
3506 dram_memory_addr = le64_to_cpu(user_dma_pkt->dst_addr); in goya_validate_dma_pkt_no_host()
3510 le32_to_cpu(user_dma_pkt->tsize), in goya_validate_dma_pkt_no_host()
3514 sram_memory_addr, user_dma_pkt->tsize); in goya_validate_dma_pkt_no_host()
3519 le32_to_cpu(user_dma_pkt->tsize), in goya_validate_dma_pkt_no_host()
3523 dram_memory_addr, user_dma_pkt->tsize); in goya_validate_dma_pkt_no_host()
3527 parser->patched_cb_size += sizeof(*user_dma_pkt); in goya_validate_dma_pkt_no_host()
3534 struct packet_lin_dma *user_dma_pkt) in goya_validate_dma_pkt_no_mmu() argument
3542 le64_to_cpu(user_dma_pkt->src_addr)); in goya_validate_dma_pkt_no_mmu()
3544 le64_to_cpu(user_dma_pkt->dst_addr)); in goya_validate_dma_pkt_no_mmu()
3545 dev_dbg(hdev->dev, "size == %u\n", le32_to_cpu(user_dma_pkt->tsize)); in goya_validate_dma_pkt_no_mmu()
3547 ctl = le32_to_cpu(user_dma_pkt->ctl); in goya_validate_dma_pkt_no_mmu()
3555 if (user_dma_pkt->tsize == 0) { in goya_validate_dma_pkt_no_mmu()
3562 rc = goya_validate_dma_pkt_no_host(hdev, parser, user_dma_pkt); in goya_validate_dma_pkt_no_mmu()
3564 rc = goya_validate_dma_pkt_host(hdev, parser, user_dma_pkt); in goya_validate_dma_pkt_no_mmu()
3571 struct packet_lin_dma *user_dma_pkt) in goya_validate_dma_pkt_mmu() argument
3575 le64_to_cpu(user_dma_pkt->src_addr)); in goya_validate_dma_pkt_mmu()
3577 le64_to_cpu(user_dma_pkt->dst_addr)); in goya_validate_dma_pkt_mmu()
3578 dev_dbg(hdev->dev, "size == %u\n", le32_to_cpu(user_dma_pkt->tsize)); in goya_validate_dma_pkt_mmu()
3586 hl_mem_area_inside_range(le64_to_cpu(user_dma_pkt->src_addr), in goya_validate_dma_pkt_mmu()
3587 le32_to_cpu(user_dma_pkt->tsize), in goya_validate_dma_pkt_mmu()
3595 if (user_dma_pkt->tsize == 0) { in goya_validate_dma_pkt_mmu()
3601 parser->patched_cb_size += sizeof(*user_dma_pkt); in goya_validate_dma_pkt_mmu()
3759 struct packet_lin_dma *user_dma_pkt, in goya_patch_dma_packet() argument
3776 ctl = le32_to_cpu(user_dma_pkt->ctl); in goya_patch_dma_packet()
3785 (user_dma_pkt->tsize == 0)) { in goya_patch_dma_packet()
3786 memcpy(new_dma_pkt, user_dma_pkt, sizeof(*new_dma_pkt)); in goya_patch_dma_packet()
3792 addr = le64_to_cpu(user_dma_pkt->src_addr); in goya_patch_dma_packet()
3793 device_memory_addr = le64_to_cpu(user_dma_pkt->dst_addr); in goya_patch_dma_packet()
3798 addr = le64_to_cpu(user_dma_pkt->dst_addr); in goya_patch_dma_packet()
3799 device_memory_addr = le64_to_cpu(user_dma_pkt->src_addr); in goya_patch_dma_packet()
3805 le32_to_cpu(user_dma_pkt->tsize), in goya_patch_dma_packet()
3808 addr, user_dma_pkt->tsize); in goya_patch_dma_packet()
3813 memcpy(new_dma_pkt, user_dma_pkt, sizeof(*user_dma_pkt)); in goya_patch_dma_packet()
3814 *new_dma_pkt_size = sizeof(*user_dma_pkt); in goya_patch_dma_packet()
3850 ctl = le32_to_cpu(user_dma_pkt->ctl); in goya_patch_dma_packet()