soc: fsl: qbman: replace CPU 0 with any online CPU in hotplug handlers
The existing code sets portal IRQ affinity to CPU 0 in the offline hotplug handler. If CPU 0 is offline this is invalid. Use a different online CPU instead. Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: Li Yang <leoyang.li@nxp.com>
This commit is contained in:
parent
9beaf661d6
commit
d8bac81ed1
|
@ -65,7 +65,9 @@ static int bman_offline_cpu(unsigned int cpu)
|
|||
if (!pcfg)
|
||||
return 0;
|
||||
|
||||
irq_set_affinity(pcfg->irq, cpumask_of(0));
|
||||
/* use any other online CPU */
|
||||
cpu = cpumask_any_but(cpu_online_mask, cpu);
|
||||
irq_set_affinity(pcfg->irq, cpumask_of(cpu));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -195,8 +195,10 @@ static int qman_offline_cpu(unsigned int cpu)
|
|||
if (p) {
|
||||
pcfg = qman_get_qm_portal_config(p);
|
||||
if (pcfg) {
|
||||
irq_set_affinity(pcfg->irq, cpumask_of(0));
|
||||
qman_portal_update_sdest(pcfg, 0);
|
||||
/* select any other online CPU */
|
||||
cpu = cpumask_any_but(cpu_online_mask, cpu);
|
||||
irq_set_affinity(pcfg->irq, cpumask_of(cpu));
|
||||
qman_portal_update_sdest(pcfg, cpu);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue