accel/habanalabs: fixes for unexpected error interrupt
authorOfir Bitton <obitton@habana.ai>
Tue, 28 Mar 2023 07:59:43 +0000 (10:59 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Sat, 8 Apr 2023 07:39:34 +0000 (10:39 +0300)
Removing redundant asic prop variable as we don't need to expose this
to common code. In addition, fix some typos.

Signed-off-by: Ofir Bitton <obitton@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/accel/habanalabs/common/habanalabs.h
drivers/accel/habanalabs/gaudi2/gaudi2.c

index 8c3bcc5..eaae69a 100644 (file)
@@ -663,7 +663,6 @@ struct hl_hints_range {
  * @user_dec_intr_count: number of decoder interrupts exposed to user.
  * @tpc_interrupt_id: interrupt id for TPC to use in order to raise events towards the host.
  * @eq_interrupt_id: interrupt id for EQ, uses to synchronize EQ interrupts in hard-reset.
- * @unexpected_user_error_interrupt_id: interrupt id used to indicate an unexpected user error.
  * @cache_line_size: device cache line size.
  * @server_type: Server type that the ASIC is currently installed in.
  *               The value is according to enum hl_server_type in uapi file.
@@ -795,7 +794,6 @@ struct asic_fixed_properties {
        u16                             user_dec_intr_count;
        u16                             tpc_interrupt_id;
        u16                             eq_interrupt_id;
-       u16                             unexpected_user_error_interrupt_id;
        u16                             cache_line_size;
        u16                             server_type;
        u8                              completion_queues_count;
index 5540200..da1b2e6 100644 (file)
@@ -2440,7 +2440,6 @@ static int gaudi2_set_fixed_properties(struct hl_device *hdev)
        prop->first_available_user_interrupt = GAUDI2_IRQ_NUM_USER_FIRST;
        prop->tpc_interrupt_id = GAUDI2_IRQ_NUM_TPC_ASSERT;
        prop->eq_interrupt_id = GAUDI2_IRQ_NUM_EVENT_QUEUE;
-       prop->unexpected_user_error_interrupt_id = GAUDI2_IRQ_NUM_UNEXPECTED_ERROR;
 
        prop->first_available_cq[0] = GAUDI2_RESERVED_CQ_NUMBER;
 
@@ -3351,7 +3350,7 @@ static void gaudi2_user_interrupt_setup(struct hl_device *hdev)
        /* Initialize TPC interrupt */
        HL_USR_INTR_STRUCT_INIT(hdev->tpc_interrupt, hdev, 0, HL_USR_INTERRUPT_TPC);
 
-       /* Initialize general purpose interrupt */
+       /* Initialize unexpected error interrupt */
        HL_USR_INTR_STRUCT_INIT(hdev->unexpected_error_interrupt, hdev, 0,
                                                HL_USR_INTERRUPT_UNEXPECTED);
 
@@ -4015,7 +4014,7 @@ static const char *gaudi2_irq_name(u16 irq_number)
        case GAUDI2_IRQ_NUM_TPC_ASSERT:
                return "gaudi2 tpc assert";
        case GAUDI2_IRQ_NUM_UNEXPECTED_ERROR:
-               return "gaudi2 tpc assert";
+               return "gaudi2 unexpected error";
        case GAUDI2_IRQ_NUM_USER_FIRST ... GAUDI2_IRQ_NUM_USER_LAST:
                return "gaudi2 user completion";
        default: