diff options
author | Madalin Bucur <madalin.bucur@nxp.com> | 2018-09-28 11:43:21 +0300 |
---|---|---|
committer | Li Yang <leoyang.li@nxp.com> | 2018-10-05 14:01:46 -0500 |
commit | d8bac81ed144cc5928efcbbf5f1f6301954e9e9b (patch) | |
tree | b423fce7b8669fcc80961cabad77e420ac2f4f47 /drivers/soc/fsl/qbman/qman_portal.c | |
parent | 9beaf661d6a72b7c05efb4b33d228032c7152f34 (diff) |
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>
Diffstat (limited to 'drivers/soc/fsl/qbman/qman_portal.c')
-rw-r--r-- | drivers/soc/fsl/qbman/qman_portal.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/soc/fsl/qbman/qman_portal.c b/drivers/soc/fsl/qbman/qman_portal.c index 3e9391d117c5..661c9b234d32 100644 --- a/drivers/soc/fsl/qbman/qman_portal.c +++ b/drivers/soc/fsl/qbman/qman_portal.c @@ -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; |