Lines Matching refs:gaudi

728 	struct gaudi_device *gaudi = hdev->asic_specific;  in gaudi_set_hbm_bar_base()  local
733 if ((gaudi) && (gaudi->hbm_bar_cur_addr == addr)) in gaudi_set_hbm_bar_base()
747 if (gaudi) { in gaudi_set_hbm_bar_base()
748 old_addr = gaudi->hbm_bar_cur_addr; in gaudi_set_hbm_bar_base()
749 gaudi->hbm_bar_cur_addr = addr; in gaudi_set_hbm_bar_base()
917 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_fetch_psoc_frequency() local
919 if (!(gaudi->hw_cap_initialized & HW_CAP_CPU_Q)) in gaudi_fetch_psoc_frequency()
1094 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_collective_map_sobs() local
1095 struct gaudi_collective_properties *prop = &gaudi->collective_props; in gaudi_collective_map_sobs()
1149 static void gaudi_collective_mstr_sob_mask_set(struct gaudi_device *gaudi) in gaudi_collective_mstr_sob_mask_set() argument
1154 prop = &gaudi->collective_props; in gaudi_collective_mstr_sob_mask_set()
1159 if (gaudi->hw_cap_initialized & BIT(HW_CAP_NIC_SHIFT + i)) in gaudi_collective_mstr_sob_mask_set()
1171 struct gaudi_device *gaudi; in gaudi_collective_init() local
1173 gaudi = hdev->asic_specific; in gaudi_collective_init()
1174 prop = &gaudi->collective_props; in gaudi_collective_init()
1195 gaudi_collective_mstr_sob_mask_set(gaudi); in gaudi_collective_init()
1202 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_reset_sob_group() local
1203 struct gaudi_collective_properties *cprop = &gaudi->collective_props; in gaudi_reset_sob_group()
1216 struct gaudi_device *gaudi; in gaudi_collective_master_init_job() local
1218 gaudi = hdev->asic_specific; in gaudi_collective_master_init_job()
1219 cprop = &gaudi->collective_props; in gaudi_collective_master_init_job()
1317 struct gaudi_device *gaudi; in gaudi_collective_wait_init_cs() local
1324 gaudi = hdev->asic_specific; in gaudi_collective_wait_init_cs()
1325 cprop = &gaudi->collective_props; in gaudi_collective_wait_init_cs()
1529 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_collective_wait_create_jobs() local
1581 if (gaudi->hw_cap_initialized & in gaudi_collective_wait_create_jobs()
1611 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_late_init() local
1614 rc = gaudi->cpucp_info_get(hdev); in gaudi_late_init()
1638 gaudi->hw_cap_initialized &= ~(HW_CAP_NIC0 | HW_CAP_NIC1); in gaudi_late_init()
1749 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_free_internal_qmans_pq_mem() local
1754 q = &gaudi->internal_qmans[i]; in gaudi_free_internal_qmans_pq_mem()
1763 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_alloc_internal_qmans_pq_mem() local
1771 q = &gaudi->internal_qmans[i]; in gaudi_alloc_internal_qmans_pq_mem()
1851 struct gaudi_device *gaudi; in gaudi_sw_init() local
1856 gaudi = kzalloc(sizeof(*gaudi), GFP_KERNEL); in gaudi_sw_init()
1857 if (!gaudi) in gaudi_sw_init()
1870 gaudi->events[event_id++] = in gaudi_sw_init()
1875 gaudi->cpucp_info_get = gaudi_cpucp_info_get; in gaudi_sw_init()
1877 hdev->asic_specific = gaudi; in gaudi_sw_init()
1914 spin_lock_init(&gaudi->hw_queues_lock); in gaudi_sw_init()
1939 kfree(gaudi); in gaudi_sw_init()
1945 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_sw_fini() local
1960 kfree(gaudi); in gaudi_sw_fini()
2018 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_enable_msi() local
2021 if (gaudi->hw_cap_initialized & HW_CAP_MSI) in gaudi_enable_msi()
2034 gaudi->hw_cap_initialized |= HW_CAP_MSI; in gaudi_enable_msi()
2045 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_sync_irqs() local
2047 if (!(gaudi->hw_cap_initialized & HW_CAP_MSI)) in gaudi_sync_irqs()
2056 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_disable_msi() local
2058 if (!(gaudi->hw_cap_initialized & HW_CAP_MSI)) in gaudi_disable_msi()
2065 gaudi->hw_cap_initialized &= ~HW_CAP_MSI; in gaudi_disable_msi()
2070 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_init_scrambler_sram() local
2079 if (gaudi->hw_cap_initialized & HW_CAP_SRAM_SCRAMBLER) in gaudi_init_scrambler_sram()
2133 gaudi->hw_cap_initialized |= HW_CAP_SRAM_SCRAMBLER; in gaudi_init_scrambler_sram()
2138 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_init_scrambler_hbm() local
2147 if (gaudi->hw_cap_initialized & HW_CAP_HBM_SCRAMBLER) in gaudi_init_scrambler_hbm()
2201 gaudi->hw_cap_initialized |= HW_CAP_HBM_SCRAMBLER; in gaudi_init_scrambler_hbm()
2686 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_init_pci_dma_qmans() local
2690 if (gaudi->hw_cap_initialized & HW_CAP_PCI_DMA) in gaudi_init_pci_dma_qmans()
2722 gaudi->hw_cap_initialized |= HW_CAP_PCI_DMA; in gaudi_init_pci_dma_qmans()
2832 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_init_hbm_dma_qmans() local
2837 if (gaudi->hw_cap_initialized & HW_CAP_HBM_DMA) in gaudi_init_hbm_dma_qmans()
2850 q = &gaudi->internal_qmans[internal_q_index]; in gaudi_init_hbm_dma_qmans()
2864 gaudi->hw_cap_initialized |= HW_CAP_HBM_DMA; in gaudi_init_hbm_dma_qmans()
2956 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_init_mme_qmans() local
2962 if (gaudi->hw_cap_initialized & HW_CAP_MME) in gaudi_init_mme_qmans()
2974 q = &gaudi->internal_qmans[internal_q_index]; in gaudi_init_mme_qmans()
2990 gaudi->hw_cap_initialized |= HW_CAP_MME; in gaudi_init_mme_qmans()
3101 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_init_tpc_qmans() local
3109 if (gaudi->hw_cap_initialized & HW_CAP_TPC_MASK) in gaudi_init_tpc_qmans()
3119 q = &gaudi->internal_qmans[internal_q_index]; in gaudi_init_tpc_qmans()
3139 gaudi->hw_cap_initialized |= in gaudi_init_tpc_qmans()
3234 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_init_nic_qmans() local
3247 if (gaudi->hw_cap_initialized & HW_CAP_NIC_MASK) in gaudi_init_nic_qmans()
3265 q = &gaudi->internal_qmans[internal_q_index]; in gaudi_init_nic_qmans()
3280 gaudi->hw_cap_initialized |= 1 << (HW_CAP_NIC_SHIFT + nic_id); in gaudi_init_nic_qmans()
3286 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_disable_pci_dma_qmans() local
3288 if (!(gaudi->hw_cap_initialized & HW_CAP_PCI_DMA)) in gaudi_disable_pci_dma_qmans()
3298 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_disable_hbm_dma_qmans() local
3300 if (!(gaudi->hw_cap_initialized & HW_CAP_HBM_DMA)) in gaudi_disable_hbm_dma_qmans()
3312 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_disable_mme_qmans() local
3314 if (!(gaudi->hw_cap_initialized & HW_CAP_MME)) in gaudi_disable_mme_qmans()
3323 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_disable_tpc_qmans() local
3327 if (!(gaudi->hw_cap_initialized & HW_CAP_TPC_MASK)) in gaudi_disable_tpc_qmans()
3338 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_disable_nic_qmans() local
3349 if (gaudi->hw_cap_initialized & nic_mask) in gaudi_disable_nic_qmans()
3362 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_stop_pci_dma_qmans() local
3364 if (!(gaudi->hw_cap_initialized & HW_CAP_PCI_DMA)) in gaudi_stop_pci_dma_qmans()
3375 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_stop_hbm_dma_qmans() local
3377 if (!(gaudi->hw_cap_initialized & HW_CAP_HBM_DMA)) in gaudi_stop_hbm_dma_qmans()
3391 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_stop_mme_qmans() local
3393 if (!(gaudi->hw_cap_initialized & HW_CAP_MME)) in gaudi_stop_mme_qmans()
3403 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_stop_tpc_qmans() local
3405 if (!(gaudi->hw_cap_initialized & HW_CAP_TPC_MASK)) in gaudi_stop_tpc_qmans()
3420 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_stop_nic_qmans() local
3424 if (gaudi->hw_cap_initialized & HW_CAP_NIC0) in gaudi_stop_nic_qmans()
3430 if (gaudi->hw_cap_initialized & HW_CAP_NIC1) in gaudi_stop_nic_qmans()
3436 if (gaudi->hw_cap_initialized & HW_CAP_NIC2) in gaudi_stop_nic_qmans()
3442 if (gaudi->hw_cap_initialized & HW_CAP_NIC3) in gaudi_stop_nic_qmans()
3448 if (gaudi->hw_cap_initialized & HW_CAP_NIC4) in gaudi_stop_nic_qmans()
3454 if (gaudi->hw_cap_initialized & HW_CAP_NIC5) in gaudi_stop_nic_qmans()
3460 if (gaudi->hw_cap_initialized & HW_CAP_NIC6) in gaudi_stop_nic_qmans()
3466 if (gaudi->hw_cap_initialized & HW_CAP_NIC7) in gaudi_stop_nic_qmans()
3472 if (gaudi->hw_cap_initialized & HW_CAP_NIC8) in gaudi_stop_nic_qmans()
3478 if (gaudi->hw_cap_initialized & HW_CAP_NIC9) in gaudi_stop_nic_qmans()
3487 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_pci_dma_stall() local
3489 if (!(gaudi->hw_cap_initialized & HW_CAP_PCI_DMA)) in gaudi_pci_dma_stall()
3499 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_hbm_dma_stall() local
3501 if (!(gaudi->hw_cap_initialized & HW_CAP_HBM_DMA)) in gaudi_hbm_dma_stall()
3513 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_mme_stall() local
3515 if (!(gaudi->hw_cap_initialized & HW_CAP_MME)) in gaudi_mme_stall()
3539 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_tpc_stall() local
3541 if (!(gaudi->hw_cap_initialized & HW_CAP_TPC_MASK)) in gaudi_tpc_stall()
3643 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_mmu_init() local
3647 if (gaudi->hw_cap_initialized & HW_CAP_MMU) in gaudi_mmu_init()
3682 gaudi->mmu_cache_inv_pi = 1; in gaudi_mmu_init()
3684 gaudi->hw_cap_initialized |= HW_CAP_MMU; in gaudi_mmu_init()
3788 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_init_cpu() local
3794 if (gaudi->hw_cap_initialized & HW_CAP_CPU) in gaudi_init_cpu()
3809 gaudi->hw_cap_initialized |= HW_CAP_CPU; in gaudi_init_cpu()
3819 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_init_cpu_queues() local
3829 if (gaudi->hw_cap_initialized & HW_CAP_CPU_Q) in gaudi_init_cpu_queues()
3883 gaudi->hw_cap_initialized |= HW_CAP_CPU_Q; in gaudi_init_cpu_queues()
3917 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_hw_init() local
3927 gaudi->hbm_bar_cur_addr = DRAM_PHYS_BASE; in gaudi_hw_init()
4008 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_hw_fini() local
4139 if (gaudi) { in gaudi_hw_fini()
4140 gaudi->hw_cap_initialized &= ~(HW_CAP_CPU | HW_CAP_CPU_Q | HW_CAP_HBM | in gaudi_hw_fini()
4146 memset(gaudi->events_stat, 0, sizeof(gaudi->events_stat)); in gaudi_hw_fini()
4184 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_ring_doorbell() local
4246 if (gaudi->hw_cap_initialized & HW_CAP_CPU_Q) in gaudi_ring_doorbell()
4413 if (!(gaudi->hw_cap_initialized & HW_CAP_NIC0)) in gaudi_ring_doorbell()
4421 if (!(gaudi->hw_cap_initialized & HW_CAP_NIC1)) in gaudi_ring_doorbell()
4429 if (!(gaudi->hw_cap_initialized & HW_CAP_NIC2)) in gaudi_ring_doorbell()
4437 if (!(gaudi->hw_cap_initialized & HW_CAP_NIC3)) in gaudi_ring_doorbell()
4445 if (!(gaudi->hw_cap_initialized & HW_CAP_NIC4)) in gaudi_ring_doorbell()
4453 if (!(gaudi->hw_cap_initialized & HW_CAP_NIC5)) in gaudi_ring_doorbell()
4461 if (!(gaudi->hw_cap_initialized & HW_CAP_NIC6)) in gaudi_ring_doorbell()
4469 if (!(gaudi->hw_cap_initialized & HW_CAP_NIC7)) in gaudi_ring_doorbell()
4477 if (!(gaudi->hw_cap_initialized & HW_CAP_NIC8)) in gaudi_ring_doorbell()
4485 if (!(gaudi->hw_cap_initialized & HW_CAP_NIC9)) in gaudi_ring_doorbell()
4660 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_get_int_queue_base() local
4669 q = &gaudi->internal_qmans[queue_id]; in gaudi_get_int_queue_base()
4679 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_send_cpu_message() local
4681 if (!(gaudi->hw_cap_initialized & HW_CAP_CPU_Q)) { in gaudi_send_cpu_message()
4769 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_test_cpu_queue() local
4775 if (!(gaudi->hw_cap_initialized & HW_CAP_CPU_Q)) in gaudi_test_cpu_queue()
5466 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_parse_cb_no_ext_queue() local
5474 if (!(gaudi->hw_cap_initialized & nic_mask_q_id)) { in gaudi_parse_cb_no_ext_queue()
5509 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_cs_parser() local
5514 if (gaudi->hw_cap_initialized & HW_CAP_MMU) in gaudi_cs_parser()
5856 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_mmu_clear_pgt_range() local
5859 if (!(gaudi->hw_cap_initialized & HW_CAP_MMU)) in gaudi_mmu_clear_pgt_range()
6024 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_read_pte() local
6030 (addr - gaudi->hbm_bar_cur_addr)); in gaudi_read_pte()
6035 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_write_pte() local
6041 (addr - gaudi->hbm_bar_cur_addr)); in gaudi_write_pte()
6053 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_mmu_prepare() local
6055 if (!(gaudi->hw_cap_initialized & HW_CAP_MMU)) in gaudi_mmu_prepare()
6208 if (gaudi->hw_cap_initialized & HW_CAP_NIC0) { in gaudi_mmu_prepare()
6221 if (gaudi->hw_cap_initialized & HW_CAP_NIC1) { in gaudi_mmu_prepare()
6234 if (gaudi->hw_cap_initialized & HW_CAP_NIC2) { in gaudi_mmu_prepare()
6247 if (gaudi->hw_cap_initialized & HW_CAP_NIC3) { in gaudi_mmu_prepare()
6260 if (gaudi->hw_cap_initialized & HW_CAP_NIC4) { in gaudi_mmu_prepare()
6273 if (gaudi->hw_cap_initialized & HW_CAP_NIC5) { in gaudi_mmu_prepare()
6286 if (gaudi->hw_cap_initialized & HW_CAP_NIC6) { in gaudi_mmu_prepare()
6299 if (gaudi->hw_cap_initialized & HW_CAP_NIC7) { in gaudi_mmu_prepare()
6312 if (gaudi->hw_cap_initialized & HW_CAP_NIC8) { in gaudi_mmu_prepare()
6325 if (gaudi->hw_cap_initialized & HW_CAP_NIC9) { in gaudi_mmu_prepare()
6661 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_print_and_get_mmu_error_info() local
6664 if (!(gaudi->hw_cap_initialized & HW_CAP_MMU)) in gaudi_print_and_get_mmu_error_info()
7556 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_handle_eqe() local
7573 gaudi->events_stat[event_type]++; in gaudi_handle_eqe()
7574 gaudi->events_stat_aggregate[event_type]++; in gaudi_handle_eqe()
7885 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_get_events_stat() local
7888 *size = (u32) sizeof(gaudi->events_stat_aggregate); in gaudi_get_events_stat()
7889 return gaudi->events_stat_aggregate; in gaudi_get_events_stat()
7892 *size = (u32) sizeof(gaudi->events_stat); in gaudi_get_events_stat()
7893 return gaudi->events_stat; in gaudi_get_events_stat()
7898 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_mmu_invalidate_cache() local
7902 if (!(gaudi->hw_cap_initialized & HW_CAP_MMU) || in gaudi_mmu_invalidate_cache()
7913 WREG32(mmSTLB_CACHE_INV, gaudi->mmu_cache_inv_pi++); in gaudi_mmu_invalidate_cache()
7973 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_send_heartbeat() local
7975 if (!(gaudi->hw_cap_initialized & HW_CAP_CPU_Q)) in gaudi_send_heartbeat()
7983 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_cpucp_info_get() local
7987 if (!(gaudi->hw_cap_initialized & HW_CAP_CPU_Q)) in gaudi_cpucp_info_get()
8010 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_is_device_idle() local
8108 if (gaudi->hw_cap_initialized & BIT(HW_CAP_NIC_SHIFT + port)) { in gaudi_is_device_idle()
8123 if (gaudi->hw_cap_initialized & BIT(HW_CAP_NIC_SHIFT + port)) { in gaudi_is_device_idle()
8145 __acquires(&gaudi->hw_queues_lock) in gaudi_hw_queues_lock()
8147 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_hw_queues_lock() local
8149 spin_lock(&gaudi->hw_queues_lock); in gaudi_hw_queues_lock()
8153 __releases(&gaudi->hw_queues_lock) in gaudi_hw_queues_unlock()
8155 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_hw_queues_unlock() local
8157 spin_unlock(&gaudi->hw_queues_lock); in gaudi_hw_queues_unlock()
8168 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_get_eeprom_data() local
8170 if (!(gaudi->hw_cap_initialized & HW_CAP_CPU_Q)) in gaudi_get_eeprom_data()
8178 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_get_monitor_dump() local
8180 if (!(gaudi->hw_cap_initialized & HW_CAP_CPU_Q)) in gaudi_get_monitor_dump()
8289 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_internal_cb_pool_init() local
8292 if (!(gaudi->hw_cap_initialized & HW_CAP_MMU)) in gaudi_internal_cb_pool_init()
8369 struct gaudi_device *gaudi = hdev->asic_specific; in gaudi_internal_cb_pool_fini() local
8371 if (!(gaudi->hw_cap_initialized & HW_CAP_MMU)) in gaudi_internal_cb_pool_fini()