habanalabs: rename non_hard_reset to compute_reset
authorOfir Bitton <obitton@habana.ai>
Wed, 13 Jul 2022 12:08:09 +0000 (15:08 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Sun, 18 Sep 2022 10:29:49 +0000 (13:29 +0300)
In order to be more explicit we should use the term compute_reset
for describing the reset in which only the compute engines gets
reset.

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

index b30aeb1c657f1149e58b68dbfaea55c793d8df75..90e346727a7cb2661362089fae9be00982a790bd 100644 (file)
@@ -1556,7 +1556,7 @@ kill_processes:
                if (!hdev->asic_prop.fw_security_enabled)
                        hl_fw_set_max_power(hdev);
        } else {
-               rc = hdev->asic_funcs->non_hard_reset_late_init(hdev);
+               rc = hdev->asic_funcs->compute_reset_late_init(hdev);
                if (rc) {
                        if (reset_upon_device_release)
                                dev_err(hdev->dev,
index 440e154dbe314c8449d8c37efbe6244000779b67..6d7b66cd50f12ead675ca4bd934827f7c7389f30 100644 (file)
@@ -1446,7 +1446,7 @@ struct engines_data {
  * @send_heartbeat: send is-alive packet to CPU-CP and verify response.
  * @debug_coresight: perform certain actions on Coresight for debugging.
  * @is_device_idle: return true if device is idle, false otherwise.
- * @non_hard_reset_late_init: perform certain actions needed after a reset which is not hard-reset
+ * @compute_reset_late_init: perform certain actions needed after a compute reset
  * @hw_queues_lock: acquire H/W queues lock.
  * @hw_queues_unlock: release H/W queues lock.
  * @kdma_lock: acquire H/W queues lock. Relevant from GRECO ASIC
@@ -1584,7 +1584,7 @@ struct hl_asic_funcs {
        int (*debug_coresight)(struct hl_device *hdev, struct hl_ctx *ctx, void *data);
        bool (*is_device_idle)(struct hl_device *hdev, u64 *mask_arr, u8 mask_len,
                                struct engines_data *e);
-       int (*non_hard_reset_late_init)(struct hl_device *hdev);
+       int (*compute_reset_late_init)(struct hl_device *hdev);
        void (*hw_queues_lock)(struct hl_device *hdev);
        void (*hw_queues_unlock)(struct hl_device *hdev);
        void (*kdma_lock)(struct hl_device *hdev, int dcore_id);
index a7923960fce11d58106251caebd9ec51a2d6a081..20f62730be0224b1c9c50af037b4dfb57cc8b854 100644 (file)
@@ -7427,7 +7427,7 @@ static void gaudi_print_nic_axi_irq_info(struct hl_device *hdev, u16 event_type,
                event_type, desc);
 }
 
-static int gaudi_non_hard_reset_late_init(struct hl_device *hdev)
+static int gaudi_compute_reset_late_init(struct hl_device *hdev)
 {
        /* GAUDI doesn't support any reset except hard-reset */
        return -EPERM;
@@ -9193,7 +9193,7 @@ static const struct hl_asic_funcs gaudi_funcs = {
        .send_heartbeat = gaudi_send_heartbeat,
        .debug_coresight = gaudi_debug_coresight,
        .is_device_idle = gaudi_is_device_idle,
-       .non_hard_reset_late_init = gaudi_non_hard_reset_late_init,
+       .compute_reset_late_init = gaudi_compute_reset_late_init,
        .hw_queues_lock = gaudi_hw_queues_lock,
        .hw_queues_unlock = gaudi_hw_queues_unlock,
        .kdma_lock = NULL,
index fd917e837075090a02ee519ec7d6b6c4796347cf..ab6ad06cec03ca278fca33d438a7e73da2aa3d9f 100644 (file)
@@ -6129,7 +6129,7 @@ done:
        return ret_val;
 }
 
-static int gaudi2_non_hard_reset_late_init(struct hl_device *hdev)
+static int gaudi2_compute_reset_late_init(struct hl_device *hdev)
 {
        struct gaudi2_device *gaudi2 = hdev->asic_specific;
        size_t irq_arr_size;
@@ -9930,7 +9930,7 @@ static const struct hl_asic_funcs gaudi2_funcs = {
        .send_heartbeat = gaudi2_send_heartbeat,
        .debug_coresight = gaudi2_debug_coresight,
        .is_device_idle = gaudi2_is_device_idle,
-       .non_hard_reset_late_init = gaudi2_non_hard_reset_late_init,
+       .compute_reset_late_init = gaudi2_compute_reset_late_init,
        .hw_queues_lock = gaudi2_hw_queues_lock,
        .hw_queues_unlock = gaudi2_hw_queues_unlock,
        .kdma_lock = gaudi2_kdma_lock,
index 7b9f7f8b51f4eb5f629f4511b00658d4f1e03ca2..d4459c290ea8bbd9a8e7cbf750ce8b3751f6faa4 100644 (file)
@@ -4559,7 +4559,7 @@ static int goya_unmask_irq_arr(struct hl_device *hdev, u32 *irq_arr,
        return rc;
 }
 
-static int goya_non_hard_reset_late_init(struct hl_device *hdev)
+static int goya_compute_reset_late_init(struct hl_device *hdev)
 {
        /*
         * Unmask all IRQs since some could have been received
@@ -5478,7 +5478,7 @@ static const struct hl_asic_funcs goya_funcs = {
        .send_heartbeat = goya_send_heartbeat,
        .debug_coresight = goya_debug_coresight,
        .is_device_idle = goya_is_device_idle,
-       .non_hard_reset_late_init = goya_non_hard_reset_late_init,
+       .compute_reset_late_init = goya_compute_reset_late_init,
        .hw_queues_lock = goya_hw_queues_lock,
        .hw_queues_unlock = goya_hw_queues_unlock,
        .kdma_lock = NULL,