Skip to content

Commit 2d1e72f

Browse files
Nitesh Narayan LalKAGA-KOKO
authored andcommitted
hinic: Use irq_set_affinity_and_hint()
The driver uses irq_set_affinity_hint() to: - Set the affinity_hint which is consumed by the userspace for distributing the interrupts - Enforce affinity As per commit 352f58b ("net-next/hinic: Set Rxq irq to specific cpu for NUMA"), the hinic driver enforces its own affinity to bind IRQs to the local NUMA node. However, irq_set_affinity_hint() applying the provided cpumask as an affinity for the interrupt is an undocumented side effect. To remove this side effect irq_set_affinity_hint() has been marked as deprecated and new interfaces have been introduced. Hence, replace the irq_set_affinity_hint() with the new interface irq_set_affinity_and_hint() where the provided mask needs to be applied as the affinity and affinity_hint pointer needs to be set and replace with irq_update_affinity_hint() where only affinity_hint needs to be updated. Signed-off-by: Nitesh Narayan Lal <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent ce5a58a commit 2d1e72f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/huawei/hinic/hinic_rx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ static int rx_request_irq(struct hinic_rxq *rxq)
548548
goto err_req_irq;
549549

550550
cpumask_set_cpu(qp->q_id % num_online_cpus(), &rq->affinity_mask);
551-
err = irq_set_affinity_hint(rq->irq, &rq->affinity_mask);
551+
err = irq_set_affinity_and_hint(rq->irq, &rq->affinity_mask);
552552
if (err)
553553
goto err_irq_affinity;
554554

@@ -565,7 +565,7 @@ static void rx_free_irq(struct hinic_rxq *rxq)
565565
{
566566
struct hinic_rq *rq = rxq->rq;
567567

568-
irq_set_affinity_hint(rq->irq, NULL);
568+
irq_update_affinity_hint(rq->irq, NULL);
569569
free_irq(rq->irq, rxq);
570570
rx_del_napi(rxq);
571571
}

0 commit comments

Comments
 (0)