diff options
author | Roy Pledge <roy.pledge@nxp.com> | 2018-09-28 11:43:20 +0300 |
---|---|---|
committer | Li Yang <leoyang.li@nxp.com> | 2018-10-05 22:01:46 +0300 |
commit | 9beaf661d6a72b7c05efb4b33d228032c7152f34 (patch) | |
tree | 1b70ad14038759d6e9e833616fa4ec55fb9e0894 /drivers/soc/fsl/qbman/bman.c | |
parent | 56740a7167cbbbda99ebfd3e8b4e4d51ae39bd06 (diff) | |
download | linux-9beaf661d6a72b7c05efb4b33d228032c7152f34.tar.xz |
soc: fsl: qbman: Check if CPU is offline when initializing portals
If the CPU to affine the portal interrupt is offline at boot time
affine the portal interrupt to another online CPU. If the CPU is later
brought online the hotplug handler will correctly adjust the affinity.
Moved common code in a function.
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
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/bman.c')
-rw-r--r-- | drivers/soc/fsl/qbman/bman.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/soc/fsl/qbman/bman.c b/drivers/soc/fsl/qbman/bman.c index f9485cedc648..f84ab596bde8 100644 --- a/drivers/soc/fsl/qbman/bman.c +++ b/drivers/soc/fsl/qbman/bman.c @@ -562,11 +562,9 @@ static int bman_create_portal(struct bman_portal *portal, dev_err(c->dev, "request_irq() failed\n"); goto fail_irq; } - if (c->cpu != -1 && irq_can_set_affinity(c->irq) && - irq_set_affinity(c->irq, cpumask_of(c->cpu))) { - dev_err(c->dev, "irq_set_affinity() failed\n"); + + if (dpaa_set_portal_irq_affinity(c->dev, c->irq, c->cpu)) goto fail_affinity; - } /* Need RCR to be empty before continuing */ ret = bm_rcr_get_fill(p); |