@@ -8807,13 +8807,13 @@ static int gaudi2_handle_kdma_core_event(struct hl_device *hdev, u16 event_type,
8807
8807
return error_count ;
8808
8808
}
8809
8809
8810
- static int gaudi2_handle_dma_core_event (struct hl_device * hdev , u16 event_type , int sts_addr )
8810
+ static int gaudi2_handle_dma_core_event (struct hl_device * hdev , u16 event_type , u64 intr_cause )
8811
8811
{
8812
- u32 error_count = 0 , sts_val = RREG32 ( sts_addr ) ;
8812
+ u32 error_count = 0 ;
8813
8813
int i ;
8814
8814
8815
8815
for (i = 0 ; i < GAUDI2_NUM_OF_DMA_CORE_INTR_CAUSE ; i ++ )
8816
- if (sts_val & BIT (i )) {
8816
+ if (intr_cause & BIT (i )) {
8817
8817
gaudi2_print_event (hdev , event_type , true,
8818
8818
"err cause: %s" , gaudi2_dma_core_interrupts_cause [i ]);
8819
8819
error_count ++ ;
@@ -8824,27 +8824,6 @@ static int gaudi2_handle_dma_core_event(struct hl_device *hdev, u16 event_type,
8824
8824
return error_count ;
8825
8825
}
8826
8826
8827
- static int gaudi2_handle_pdma_core_event (struct hl_device * hdev , u16 event_type , int pdma_idx )
8828
- {
8829
- u32 sts_addr ;
8830
-
8831
- sts_addr = mmPDMA0_CORE_ERR_CAUSE + pdma_idx * PDMA_OFFSET ;
8832
- return gaudi2_handle_dma_core_event (hdev , event_type , sts_addr );
8833
- }
8834
-
8835
- static int gaudi2_handle_edma_core_event (struct hl_device * hdev , u16 event_type , int edma_idx )
8836
- {
8837
- static const int edma_event_index_map [] = {2 , 3 , 0 , 1 , 6 , 7 , 4 , 5 };
8838
- u32 sts_addr , index ;
8839
-
8840
- index = edma_event_index_map [edma_idx ];
8841
-
8842
- sts_addr = mmDCORE0_EDMA0_CORE_ERR_CAUSE +
8843
- DCORE_OFFSET * (index / NUM_OF_EDMA_PER_DCORE ) +
8844
- DCORE_EDMA_OFFSET * (index % NUM_OF_EDMA_PER_DCORE );
8845
- return gaudi2_handle_dma_core_event (hdev , event_type , sts_addr );
8846
- }
8847
-
8848
8827
static void gaudi2_print_pcie_mstr_rr_mstr_if_razwi_info (struct hl_device * hdev , u64 * event_mask )
8849
8828
{
8850
8829
u32 mstr_if_base_addr = mmPCIE_MSTR_RR_MSTR_IF_RR_SHRD_HBW_BASE , razwi_happened_addr ;
@@ -9725,19 +9704,19 @@ static void gaudi2_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_ent
9725
9704
case GAUDI2_EVENT_KDMA_CH0_AXI_ERR_RSP :
9726
9705
case GAUDI2_EVENT_KDMA0_CORE :
9727
9706
error_count = gaudi2_handle_kdma_core_event (hdev , event_type ,
9728
- le64_to_cpu (eq_entry -> intr_cause .intr_cause_data ));
9707
+ le64_to_cpu (eq_entry -> intr_cause .intr_cause_data ));
9729
9708
event_mask |= HL_NOTIFIER_EVENT_GENERAL_HW_ERR ;
9730
9709
break ;
9731
9710
9732
9711
case GAUDI2_EVENT_HDMA2_CORE ... GAUDI2_EVENT_HDMA5_CORE :
9733
- index = event_type - GAUDI2_EVENT_HDMA2_CORE ;
9734
- error_count = gaudi2_handle_edma_core_event ( hdev , event_type , index );
9712
+ error_count = gaudi2_handle_dma_core_event ( hdev , event_type ,
9713
+ le64_to_cpu ( eq_entry -> intr_cause . intr_cause_data ) );
9735
9714
event_mask |= HL_NOTIFIER_EVENT_USER_ENGINE_ERR ;
9736
9715
break ;
9737
9716
9738
9717
case GAUDI2_EVENT_PDMA0_CORE ... GAUDI2_EVENT_PDMA1_CORE :
9739
- index = event_type - GAUDI2_EVENT_PDMA0_CORE ;
9740
- error_count = gaudi2_handle_pdma_core_event ( hdev , event_type , index );
9718
+ error_count = gaudi2_handle_dma_core_event ( hdev , event_type ,
9719
+ le64_to_cpu ( eq_entry -> intr_cause . intr_cause_data ) );
9741
9720
event_mask |= HL_NOTIFIER_EVENT_USER_ENGINE_ERR ;
9742
9721
break ;
9743
9722
0 commit comments