accel/habanalabs: remove call to deprecated function
authorDani Liberman <dliberman@habana.ai>
Mon, 1 Jan 2024 20:37:43 +0000 (22:37 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 26 Feb 2024 07:30:40 +0000 (09:30 +0200)
In newer kernel versions, irq_set_affinity_hint() is deprecated.
Instead, use the newer version which is irq_set_affinity_and_hint().

Signed-off-by: Dani Liberman <dliberman@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/accel/habanalabs/common/device.c
drivers/accel/habanalabs/gaudi2/gaudi2.c

index cf004baf5e6213fbe28f784194208d0e9c550759..3b9e8a21d7df8b80bed261843b04af332a98a948 100644 (file)
@@ -2833,6 +2833,6 @@ void hl_set_irq_affinity(struct hl_device *hdev, int irq)
                return;
        }
 
-       if (irq_set_affinity_hint(irq, &hdev->irq_affinity_mask))
+       if (irq_set_affinity_and_hint(irq, &hdev->irq_affinity_mask))
                dev_err(hdev->dev, "Failed setting irq %d affinity\n", irq);
 }
index 5863c904913433c6b81e60bce1fdd675e6edea3d..05e2170c815e6b6a6d9cc5d5fc30eb200f3aa3ba 100644 (file)
@@ -4395,7 +4395,7 @@ free_user_irq:
                        i < GAUDI2_IRQ_NUM_USER_FIRST + user_irq_init_cnt ; i++, j++) {
 
                irq = pci_irq_vector(hdev->pdev, i);
-               irq_set_affinity_hint(irq, NULL);
+               irq_set_affinity_and_hint(irq, NULL);
                free_irq(irq, &hdev->user_interrupt[j]);
        }
        irq = pci_irq_vector(hdev->pdev, GAUDI2_IRQ_NUM_UNEXPECTED_ERROR);
@@ -4476,7 +4476,7 @@ static void gaudi2_disable_msix(struct hl_device *hdev)
                        k < hdev->asic_prop.user_interrupt_count ; i++, j++, k++) {
 
                irq = pci_irq_vector(hdev->pdev, i);
-               irq_set_affinity_hint(irq, NULL);
+               irq_set_affinity_and_hint(irq, NULL);
                free_irq(irq, &hdev->user_interrupt[j]);
        }