Lines Matching refs:gaudi2

2630 	struct gaudi2_device *gaudi2 = hdev->asic_specific;  in gaudi2_set_hbm_bar_base()  local
2635 if ((gaudi2) && (gaudi2->dram_bar_cur_addr == addr)) in gaudi2_set_hbm_bar_base()
2649 if (gaudi2) { in gaudi2_set_hbm_bar_base()
2650 old_addr = gaudi2->dram_bar_cur_addr; in gaudi2_set_hbm_bar_base()
2651 gaudi2->dram_bar_cur_addr = addr; in gaudi2_set_hbm_bar_base()
2995 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_cpucp_info_get() local
3001 if (!(gaudi2->hw_cap_initialized & HW_CAP_CPU_Q)) in gaudi2_cpucp_info_get()
3068 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_fetch_psoc_frequency() local
3072 if (!(gaudi2->hw_cap_initialized & HW_CAP_CPU_Q)) in gaudi2_fetch_psoc_frequency()
3086 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_mmu_clear_pgt_range() local
3090 if (!(gaudi2->hw_cap_initialized & HW_CAP_MMU_MASK)) in gaudi2_mmu_clear_pgt_range()
3207 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_init_arcs() local
3230 if (gaudi2_is_arc_tpc_owned(arc_id) && !(gaudi2->tpc_hw_cap_initialized & in gaudi2_init_arcs()
3310 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_late_init() local
3314 gaudi2->virt_msix_db_dma_addr); in gaudi2_late_init()
3353 static void gaudi2_user_mapped_dec_init(struct gaudi2_device *gaudi2, u32 start_idx) in gaudi2_user_mapped_dec_init() argument
3355 struct user_mapped_block *blocks = gaudi2->mapped_blocks; in gaudi2_user_mapped_dec_init()
3371 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_user_mapped_blocks_init() local
3372 struct user_mapped_block *blocks = gaudi2->mapped_blocks; in gaudi2_user_mapped_blocks_init()
3427 gaudi2_user_mapped_dec_init(gaudi2, USR_MAPPED_BLK_DEC_START_IDX); in gaudi2_user_mapped_blocks_init()
3656 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_test_queues_msgs_free() local
3657 struct gaudi2_queues_test_info *msg_info = gaudi2->queues_test_info; in gaudi2_test_queues_msgs_free()
3672 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_test_queues_msgs_alloc() local
3673 struct gaudi2_queues_test_info *msg_info = gaudi2->queues_test_info; in gaudi2_test_queues_msgs_alloc()
3699 struct gaudi2_device *gaudi2; in gaudi2_sw_init() local
3703 gaudi2 = kzalloc(sizeof(*gaudi2), GFP_KERNEL); in gaudi2_sw_init()
3704 if (!gaudi2) in gaudi2_sw_init()
3711 if (gaudi2->num_of_valid_hw_events == GAUDI2_EVENT_SIZE) { in gaudi2_sw_init()
3718 gaudi2->hw_events[gaudi2->num_of_valid_hw_events++] = gaudi2_irq_map_table[i].fc_id; in gaudi2_sw_init()
3722 gaudi2->lfsr_rand_seeds[i] = gaudi2_get_non_zero_random_int(); in gaudi2_sw_init()
3724 gaudi2->cpucp_info_get = gaudi2_cpucp_info_get; in gaudi2_sw_init()
3726 hdev->asic_specific = gaudi2; in gaudi2_sw_init()
3759 gaudi2->virt_msix_db_cpu_addr = hl_cpu_accessible_dma_pool_alloc(hdev, prop->pmmu.page_size, in gaudi2_sw_init()
3760 &gaudi2->virt_msix_db_dma_addr); in gaudi2_sw_init()
3761 if (!gaudi2->virt_msix_db_cpu_addr) { in gaudi2_sw_init()
3767 spin_lock_init(&gaudi2->hw_queues_lock); in gaudi2_sw_init()
3769 gaudi2->scratchpad_bus_address = prop->mmu_pgt_addr + HMMU_PAGE_TABLES_SIZE + EDMA_PQS_SIZE; in gaudi2_sw_init()
3806 hl_cpu_accessible_dma_pool_free(hdev, prop->pmmu.page_size, gaudi2->virt_msix_db_cpu_addr); in gaudi2_sw_init()
3815 kfree(gaudi2); in gaudi2_sw_init()
3822 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_sw_fini() local
3828 hl_cpu_accessible_dma_pool_free(hdev, prop->pmmu.page_size, gaudi2->virt_msix_db_cpu_addr); in gaudi2_sw_fini()
3837 kfree(gaudi2); in gaudi2_sw_fini()
3905 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_stop_dma_qmans() local
3908 if (!(gaudi2->hw_cap_initialized & HW_CAP_PDMA_MASK)) in gaudi2_stop_dma_qmans()
3916 if (!(gaudi2->hw_cap_initialized & HW_CAP_EDMA_MASK)) in gaudi2_stop_dma_qmans()
3924 if (!(gaudi2->hw_cap_initialized & BIT_ULL(HW_CAP_EDMA_SHIFT + seq))) in gaudi2_stop_dma_qmans()
3938 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_stop_mme_qmans() local
3944 if (!(gaudi2->hw_cap_initialized & BIT_ULL(HW_CAP_MME_SHIFT + i))) in gaudi2_stop_mme_qmans()
3953 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_stop_tpc_qmans() local
3957 if (!(gaudi2->tpc_hw_cap_initialized & HW_CAP_TPC_MASK)) in gaudi2_stop_tpc_qmans()
3961 if (!(gaudi2->tpc_hw_cap_initialized & BIT_ULL(HW_CAP_TPC_SHIFT + i))) in gaudi2_stop_tpc_qmans()
3971 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_stop_rot_qmans() local
3975 if (!(gaudi2->hw_cap_initialized & HW_CAP_ROT_MASK)) in gaudi2_stop_rot_qmans()
3979 if (!(gaudi2->hw_cap_initialized & BIT_ULL(HW_CAP_ROT_SHIFT + i))) in gaudi2_stop_rot_qmans()
3989 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_stop_nic_qmans() local
3993 if (!(gaudi2->nic_hw_cap_initialized & HW_CAP_NIC_MASK)) in gaudi2_stop_nic_qmans()
4017 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_dma_stall() local
4020 if (!(gaudi2->hw_cap_initialized & HW_CAP_PDMA_MASK)) in gaudi2_dma_stall()
4027 if (!(gaudi2->hw_cap_initialized & HW_CAP_EDMA_MASK)) in gaudi2_dma_stall()
4035 if (!(gaudi2->hw_cap_initialized & BIT_ULL(HW_CAP_EDMA_SHIFT + seq))) in gaudi2_dma_stall()
4049 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_mme_stall() local
4055 if (gaudi2->hw_cap_initialized & BIT_ULL(HW_CAP_MME_SHIFT + i)) in gaudi2_mme_stall()
4061 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_tpc_stall() local
4065 if (!(gaudi2->tpc_hw_cap_initialized & HW_CAP_TPC_MASK)) in gaudi2_tpc_stall()
4069 if (!(gaudi2->tpc_hw_cap_initialized & BIT_ULL(HW_CAP_TPC_SHIFT + i))) in gaudi2_tpc_stall()
4079 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_rotator_stall() local
4083 if (!(gaudi2->hw_cap_initialized & HW_CAP_ROT_MASK)) in gaudi2_rotator_stall()
4091 if (!(gaudi2->hw_cap_initialized & BIT_ULL(HW_CAP_ROT_SHIFT + i))) in gaudi2_rotator_stall()
4105 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_disable_dma_qmans() local
4108 if (!(gaudi2->hw_cap_initialized & HW_CAP_PDMA_MASK)) in gaudi2_disable_dma_qmans()
4115 if (!(gaudi2->hw_cap_initialized & HW_CAP_EDMA_MASK)) in gaudi2_disable_dma_qmans()
4123 if (!(gaudi2->hw_cap_initialized & BIT_ULL(HW_CAP_EDMA_SHIFT + seq))) in gaudi2_disable_dma_qmans()
4137 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_disable_mme_qmans() local
4143 if (gaudi2->hw_cap_initialized & BIT_ULL(HW_CAP_MME_SHIFT + i)) in gaudi2_disable_mme_qmans()
4149 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_disable_tpc_qmans() local
4153 if (!(gaudi2->tpc_hw_cap_initialized & HW_CAP_TPC_MASK)) in gaudi2_disable_tpc_qmans()
4157 if (!(gaudi2->tpc_hw_cap_initialized & BIT_ULL(HW_CAP_TPC_SHIFT + i))) in gaudi2_disable_tpc_qmans()
4167 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_disable_rot_qmans() local
4171 if (!(gaudi2->hw_cap_initialized & HW_CAP_ROT_MASK)) in gaudi2_disable_rot_qmans()
4175 if (!(gaudi2->hw_cap_initialized & BIT_ULL(HW_CAP_ROT_SHIFT + i))) in gaudi2_disable_rot_qmans()
4185 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_disable_nic_qmans() local
4189 if (!(gaudi2->nic_hw_cap_initialized & HW_CAP_NIC_MASK)) in gaudi2_disable_nic_qmans()
4309 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_enable_msix() local
4313 if (gaudi2->hw_cap_initialized & HW_CAP_MSIX) in gaudi2_enable_msix()
4389 gaudi2->hw_cap_initialized |= HW_CAP_MSIX; in gaudi2_enable_msix()
4424 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_sync_irqs() local
4428 if (!(gaudi2->hw_cap_initialized & HW_CAP_MSIX)) in gaudi2_sync_irqs()
4455 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_disable_msix() local
4459 if (!(gaudi2->hw_cap_initialized & HW_CAP_MSIX)) in gaudi2_disable_msix()
4492 gaudi2->hw_cap_initialized &= ~HW_CAP_MSIX; in gaudi2_disable_msix()
4577 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_stop_dec() local
4580 if ((gaudi2->dec_hw_cap_initialized & HW_CAP_DEC_MASK) == 0) in gaudi2_stop_dec()
4641 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_reset_arcs() local
4644 if (!gaudi2) in gaudi2_reset_arcs()
4654 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_nic_qmans_manual_flush() local
4658 if (!(gaudi2->nic_hw_cap_initialized & HW_CAP_NIC_MASK)) in gaudi2_nic_qmans_manual_flush()
4699 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_set_tpc_engine_mode() local
4702 if (!(gaudi2->tpc_hw_cap_initialized & HW_CAP_TPC_MASK)) in gaudi2_set_tpc_engine_mode()
4706 if (!(gaudi2->tpc_hw_cap_initialized & BIT_ULL(HW_CAP_TPC_SHIFT + tpc_id))) in gaudi2_set_tpc_engine_mode()
4726 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_set_mme_engine_mode() local
4730 if (!(gaudi2->hw_cap_initialized & BIT_ULL(HW_CAP_MME_SHIFT + mme_id))) in gaudi2_set_mme_engine_mode()
4744 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_set_edma_engine_mode() local
4747 if (!(gaudi2->hw_cap_initialized & HW_CAP_EDMA_MASK)) in gaudi2_set_edma_engine_mode()
4751 if (!(gaudi2->hw_cap_initialized & BIT_ULL(HW_CAP_EDMA_SHIFT + edma_id))) in gaudi2_set_edma_engine_mode()
4927 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_init_cpu() local
4933 if (gaudi2->hw_cap_initialized & HW_CAP_CPU) in gaudi2_init_cpu()
4940 gaudi2->hw_cap_initialized |= HW_CAP_CPU; in gaudi2_init_cpu()
4949 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_init_cpu_queues() local
4958 if (gaudi2->hw_cap_initialized & HW_CAP_CPU_Q) in gaudi2_init_cpu_queues()
5010 gaudi2->hw_cap_initialized |= HW_CAP_CPU_Q; in gaudi2_init_cpu_queues()
5066 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_init_qman_pqc() local
5077 lower_32_bits(gaudi2->scratchpad_bus_address)); in gaudi2_init_qman_pqc()
5079 upper_32_bits(gaudi2->scratchpad_bus_address)); in gaudi2_init_qman_pqc()
5224 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_init_kdma() local
5227 if ((gaudi2->hw_cap_initialized & HW_CAP_KDMA) == HW_CAP_KDMA) in gaudi2_init_kdma()
5234 gaudi2->hw_cap_initialized |= HW_CAP_KDMA; in gaudi2_init_kdma()
5239 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_init_pdma() local
5242 if ((gaudi2->hw_cap_initialized & HW_CAP_PDMA_MASK) == HW_CAP_PDMA_MASK) in gaudi2_init_pdma()
5257 gaudi2->hw_cap_initialized |= HW_CAP_PDMA_MASK; in gaudi2_init_pdma()
5277 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_init_edma() local
5280 if ((gaudi2->hw_cap_initialized & HW_CAP_EDMA_MASK) == HW_CAP_EDMA_MASK) in gaudi2_init_edma()
5292 gaudi2->hw_cap_initialized |= BIT_ULL(HW_CAP_EDMA_SHIFT + seq); in gaudi2_init_edma()
5316 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_arm_monitors_for_virt_msix_db() local
5368 addr = gaudi2->virt_msix_db_dma_addr; in gaudi2_arm_monitors_for_virt_msix_db()
5402 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_init_sm() local
5419 WREG32(mmDCORE0_SYNC_MNGR_GLBL_LBW_ADDR_L_0, lower_32_bits(gaudi2->virt_msix_db_dma_addr)); in gaudi2_init_sm()
5420 WREG32(mmDCORE0_SYNC_MNGR_GLBL_LBW_ADDR_H_0, upper_32_bits(gaudi2->virt_msix_db_dma_addr)); in gaudi2_init_sm()
5445 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_init_mme_acc() local
5461 WREG32(reg_base + MME_ACC_AP_LFSR_SEED_WDATA_OFFSET, gaudi2->lfsr_rand_seeds[i]); in gaudi2_init_mme_acc()
5499 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_init_mme() local
5502 if ((gaudi2->hw_cap_initialized & HW_CAP_MME_MASK) == HW_CAP_MME_MASK) in gaudi2_init_mme()
5508 gaudi2->hw_cap_initialized |= BIT_ULL(HW_CAP_MME_SHIFT + i); in gaudi2_init_mme()
5529 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_init_tpc_config() local
5545 gaudi2->tpc_hw_cap_initialized |= BIT_ULL(HW_CAP_TPC_SHIFT + seq); in gaudi2_init_tpc_config()
5550 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_init_tpc() local
5557 if ((gaudi2->tpc_hw_cap_initialized & HW_CAP_TPC_MASK) == HW_CAP_TPC_MASK) in gaudi2_init_tpc()
5571 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_init_rotator() local
5580 gaudi2->hw_cap_initialized |= BIT_ULL(HW_CAP_ROT_SHIFT + i); in gaudi2_init_rotator()
5603 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_init_dec() local
5610 if ((gaudi2->dec_hw_cap_initialized & HW_CAP_DEC_MASK) == HW_CAP_DEC_MASK) in gaudi2_init_dec()
5627 gaudi2->dec_hw_cap_initialized |= BIT_ULL(HW_CAP_DEC_SHIFT + dec_bit); in gaudi2_init_dec()
5640 gaudi2->dec_hw_cap_initialized |= BIT_ULL(HW_CAP_DEC_SHIFT + dec_bit); in gaudi2_init_dec()
5738 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_is_hmmu_enabled() local
5743 if (gaudi2->hw_cap_initialized & hw_cap) in gaudi2_is_hmmu_enabled()
5846 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_mmu_invalidate_cache() local
5856 if ((flags & MMU_OP_USERPTR) && (gaudi2->hw_cap_initialized & HW_CAP_PMMU)) { in gaudi2_mmu_invalidate_cache()
5873 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_mmu_invalidate_cache_range() local
5887 if ((flags & MMU_OP_USERPTR) && (gaudi2->hw_cap_initialized & HW_CAP_PMMU)) { in gaudi2_mmu_invalidate_cache_range()
5998 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_pci_mmu_init() local
6002 if (gaudi2->hw_cap_initialized & HW_CAP_PMMU) in gaudi2_pci_mmu_init()
6041 gaudi2->hw_cap_initialized |= HW_CAP_PMMU; in gaudi2_pci_mmu_init()
6050 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_dcore_hmmu_init() local
6062 if ((gaudi2->hw_cap_initialized & hw_cap) || !(prop->hmmu_hif_enabled_mask & BIT(dmmu_seq))) in gaudi2_dcore_hmmu_init()
6093 gaudi2->hw_cap_initialized |= hw_cap; in gaudi2_dcore_hmmu_init()
6129 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_hw_init() local
6147 gaudi2->dram_bar_cur_addr = DRAM_PHYS_BASE; in gaudi2_hw_init()
6173 rc = gaudi2->cpucp_info_get(hdev); in gaudi2_hw_init()
6229 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_send_hard_reset_cmd() local
6248 if (gaudi2 && (gaudi2->hw_cap_initialized & HW_CAP_CPU) && in gaudi2_send_hard_reset_cmd()
6370 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_hw_fini() local
6437 if (!gaudi2) in gaudi2_hw_fini()
6440 gaudi2->dec_hw_cap_initialized &= ~(HW_CAP_DEC_MASK); in gaudi2_hw_fini()
6441 gaudi2->tpc_hw_cap_initialized &= ~(HW_CAP_TPC_MASK); in gaudi2_hw_fini()
6448 gaudi2->nic_hw_cap_initialized &= ~(HW_CAP_NIC_MASK); in gaudi2_hw_fini()
6451 gaudi2->hw_cap_initialized &= in gaudi2_hw_fini()
6458 memset(gaudi2->events_stat, 0, sizeof(gaudi2->events_stat)); in gaudi2_hw_fini()
6460 gaudi2->hw_cap_initialized &= in gaudi2_hw_fini()
6507 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_is_queue_enabled() local
6558 return !!(gaudi2->tpc_hw_cap_initialized & BIT_ULL(0)); in gaudi2_is_queue_enabled()
6589 return !!(gaudi2->nic_hw_cap_initialized & BIT_ULL(0)); in gaudi2_is_queue_enabled()
6593 return !!(gaudi2->hw_cap_initialized & HW_CAP_CPU_Q); in gaudi2_is_queue_enabled()
6600 return !!(gaudi2->tpc_hw_cap_initialized & BIT_ULL(hw_tpc_cap_bit)); in gaudi2_is_queue_enabled()
6603 return !!(gaudi2->nic_hw_cap_initialized & BIT_ULL(hw_nic_cap_bit)); in gaudi2_is_queue_enabled()
6608 return !!(gaudi2->hw_cap_initialized & hw_cap_mask); in gaudi2_is_queue_enabled()
6613 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_is_arc_enabled() local
6618 return !!(gaudi2->active_hw_arc & BIT_ULL(arc_id)); in gaudi2_is_arc_enabled()
6621 return !!(gaudi2->active_tpc_arc & BIT_ULL(arc_id - CPU_ID_TPC_QMAN_ARC0)); in gaudi2_is_arc_enabled()
6624 return !!(gaudi2->active_nic_arc & BIT_ULL(arc_id - CPU_ID_NIC_QMAN_ARC0)); in gaudi2_is_arc_enabled()
6633 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_clr_arc_id_cap() local
6638 gaudi2->active_hw_arc &= ~(BIT_ULL(arc_id)); in gaudi2_clr_arc_id_cap()
6642 gaudi2->active_tpc_arc &= ~(BIT_ULL(arc_id - CPU_ID_TPC_QMAN_ARC0)); in gaudi2_clr_arc_id_cap()
6646 gaudi2->active_nic_arc &= ~(BIT_ULL(arc_id - CPU_ID_NIC_QMAN_ARC0)); in gaudi2_clr_arc_id_cap()
6656 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_set_arc_id_cap() local
6661 gaudi2->active_hw_arc |= BIT_ULL(arc_id); in gaudi2_set_arc_id_cap()
6665 gaudi2->active_tpc_arc |= BIT_ULL(arc_id - CPU_ID_TPC_QMAN_ARC0); in gaudi2_set_arc_id_cap()
6669 gaudi2->active_nic_arc |= BIT_ULL(arc_id - CPU_ID_NIC_QMAN_ARC0); in gaudi2_set_arc_id_cap()
6732 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_send_cpu_message() local
6734 if (!(gaudi2->hw_cap_initialized & HW_CAP_CPU_Q)) { in gaudi2_send_cpu_message()
6774 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_validate_cb_address() local
6795 if ((gaudi2->hw_cap_initialized & HW_CAP_DMMU_MASK) && in gaudi2_validate_cb_address()
6802 if (gaudi2->hw_cap_initialized & HW_CAP_PMMU) { in gaudi2_validate_cb_address()
6830 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_cs_parser() local
6835 if (!(gaudi2->hw_cap_initialized & HW_CAP_PMMU)) { in gaudi2_cs_parser()
6845 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_send_heartbeat() local
6847 if (!(gaudi2->hw_cap_initialized & HW_CAP_CPU_Q)) in gaudi2_send_heartbeat()
7065 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_test_cpu_queue() local
7071 if (!(gaudi2->hw_cap_initialized & HW_CAP_CPU_Q)) in gaudi2_test_cpu_queue()
7079 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_test_queues() local
7089 msg_info = &gaudi2->queues_test_info[i - GAUDI2_QUEUE_ID_PDMA_0_0]; in gaudi2_test_queues()
7121 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_compute_reset_late_init() local
7136 irq_arr_size = gaudi2->num_of_valid_hw_events * sizeof(gaudi2->hw_events[0]); in gaudi2_compute_reset_late_init()
7137 return hl_fw_unmask_irq_arr(hdev, gaudi2->hw_events, irq_arr_size); in gaudi2_compute_reset_late_init()
7504 __acquires(&gaudi2->hw_queues_lock) in gaudi2_hw_queues_lock()
7506 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_hw_queues_lock() local
7508 spin_lock(&gaudi2->hw_queues_lock); in gaudi2_hw_queues_lock()
7512 __releases(&gaudi2->hw_queues_lock) in gaudi2_hw_queues_unlock()
7514 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_hw_queues_unlock() local
7516 spin_unlock(&gaudi2->hw_queues_lock); in gaudi2_hw_queues_unlock()
7526 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_get_eeprom_data() local
7528 if (!(gaudi2->hw_cap_initialized & HW_CAP_CPU_Q)) in gaudi2_get_eeprom_data()
7541 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_get_events_stat() local
7544 *size = (u32) sizeof(gaudi2->events_stat_aggregate); in gaudi2_get_events_stat()
7545 return gaudi2->events_stat_aggregate; in gaudi2_get_events_stat()
7548 *size = (u32) sizeof(gaudi2->events_stat); in gaudi2_get_events_stat()
7549 return gaudi2->events_stat; in gaudi2_get_events_stat()
7798 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_mmu_prepare() local
7811 if (!(gaudi2->hw_cap_initialized & HW_CAP_MMU_MASK)) in gaudi2_mmu_prepare()
9782 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_handle_eqe() local
9797 gaudi2->events_stat[event_type]++; in gaudi2_handle_eqe()
9798 gaudi2->events_stat_aggregate[event_type]++; in gaudi2_handle_eqe()
10765 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_internal_cb_pool_init() local
10768 if (!(gaudi2->hw_cap_initialized & HW_CAP_PMMU)) in gaudi2_internal_cb_pool_init()
10836 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_internal_cb_pool_fini() local
10838 if (!(gaudi2->hw_cap_initialized & HW_CAP_PMMU)) in gaudi2_internal_cb_pool_fini()
10863 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_map_virtual_msix_doorbell_memory() local
10867 gaudi2->virt_msix_db_dma_addr, prop->pmmu.page_size, true); in gaudi2_map_virtual_msix_doorbell_memory()
11224 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_get_hw_block_id() local
11228 if (block_addr == CFG_BASE + gaudi2->mapped_blocks[i].address) { in gaudi2_get_hw_block_id()
11231 *block_size = gaudi2->mapped_blocks[i].size; in gaudi2_get_hw_block_id()
11244 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_block_mmap() local
11255 if (block_size != gaudi2->mapped_blocks[block_id].size) { in gaudi2_block_mmap()
11260 offset_in_bar = CFG_BASE + gaudi2->mapped_blocks[block_id].address - STM_FLASH_BASE_ADDR; in gaudi2_block_mmap()
11277 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_enable_events_from_fw() local
11282 if (gaudi2->hw_cap_initialized & HW_CAP_CPU_Q) in gaudi2_enable_events_from_fw()
11351 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_ack_mmu_error() local
11354 if (!(gaudi2->hw_cap_initialized & mmu_id)) in gaudi2_ack_mmu_error()
11510 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_send_device_activity() local
11512 if (!(gaudi2->hw_cap_initialized & HW_CAP_CPU_Q)) in gaudi2_send_device_activity()
11520 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_read_pte() local
11526 val = readq(hdev->pcie_bar[DRAM_BAR_ID] + (addr - gaudi2->dram_bar_cur_addr)); in gaudi2_read_pte()
11533 struct gaudi2_device *gaudi2 = hdev->asic_specific; in gaudi2_write_pte() local
11538 writeq(val, hdev->pcie_bar[DRAM_BAR_ID] + (addr - gaudi2->dram_bar_cur_addr)); in gaudi2_write_pte()