Skip to content

Commit bf886e1

Browse files
Nitesh Narayan LalKAGA-KOKO
authored andcommitted
mailbox: Use irq_update_affinity_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 6ac17fe ("mailbox: bcm-flexrm-mailbox: Set IRQ affinity hint for FlexRM ring IRQs") the latter is done to ensure that the FlexRM ring interrupts are evenly spread across all available CPUs. However, since commit a0c9259 ("irq/matrix: Spread interrupts on allocation") the spreading of interrupts is dynamically performed at the time of allocation. Hence, there is no need for the drivers to enforce their own affinity for the spreading of interrupts. Also, 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_update_affinity_hint() that only sets the affinity_hint pointer. Signed-off-by: Nitesh Narayan Lal <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Jassi Brar <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent cc49326 commit bf886e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/mailbox/bcm-flexrm-mailbox.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,7 @@ static int flexrm_startup(struct mbox_chan *chan)
12981298
val = (num_online_cpus() < val) ? val / num_online_cpus() : 1;
12991299
cpumask_set_cpu((ring->num / val) % num_online_cpus(),
13001300
&ring->irq_aff_hint);
1301-
ret = irq_set_affinity_hint(ring->irq, &ring->irq_aff_hint);
1301+
ret = irq_update_affinity_hint(ring->irq, &ring->irq_aff_hint);
13021302
if (ret) {
13031303
dev_err(ring->mbox->dev,
13041304
"failed to set IRQ affinity hint for ring%d\n",
@@ -1425,7 +1425,7 @@ static void flexrm_shutdown(struct mbox_chan *chan)
14251425

14261426
/* Release IRQ */
14271427
if (ring->irq_requested) {
1428-
irq_set_affinity_hint(ring->irq, NULL);
1428+
irq_update_affinity_hint(ring->irq, NULL);
14291429
free_irq(ring->irq, ring);
14301430
ring->irq_requested = false;
14311431
}

0 commit comments

Comments
 (0)