From: Madalin Bucur <madalin.bucur@nxp.com>
To: leoyang.li@nxp.com
Cc: roy.pledge@nxp.com, claudiu.manoil@nxp.com,
catalin.marinas@arm.com, oss@buserror.net,
linux-arm-kernel@lists.infradead.org,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
Madalin Bucur <madalin.bucur@nxp.com>
Subject: [PATCH v2 2/5] soc/fsl/qbman: replace CPU 0 with any online CPU in hotplug handlers
Date: Fri, 28 Sep 2018 11:43:21 +0300 [thread overview]
Message-ID: <1538124204-31406-3-git-send-email-madalin.bucur@nxp.com> (raw)
In-Reply-To: <1538124204-31406-1-git-send-email-madalin.bucur@nxp.com>
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>
---
drivers/soc/fsl/qbman/bman_portal.c | 4 +++-
drivers/soc/fsl/qbman/qman_portal.c | 6 ++++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/soc/fsl/qbman/bman_portal.c b/drivers/soc/fsl/qbman/bman_portal.c
index 2f71f7df3465..088cdfa7c034 100644
--- a/drivers/soc/fsl/qbman/bman_portal.c
+++ b/drivers/soc/fsl/qbman/bman_portal.c
@@ -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;
}
diff --git a/drivers/soc/fsl/qbman/qman_portal.c b/drivers/soc/fsl/qbman/qman_portal.c
index a120002b630e..4efd6ea598b1 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;
--
2.1.0
next prev parent reply other threads:[~2018-09-28 8:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-28 8:43 [PATCH v2 0/5] soc/fsl/qbman: DPAA QBMan fixes and additions Madalin Bucur
2018-09-28 8:43 ` [PATCH v2 1/5] soc/fsl/qbman: Check if CPU is offline when initializing portals Madalin Bucur
2018-09-28 8:43 ` Madalin Bucur [this message]
2018-09-28 8:43 ` [PATCH v2 3/5] soc/fsl/qbman: Add 64 bit DMA addressing requirement to QBMan Madalin Bucur
2018-09-28 8:43 ` [PATCH v2 4/5] soc/fsl/qbman: Use last response to determine valid bit Madalin Bucur
2018-09-28 8:43 ` [PATCH v2 5/5] soc/fsl_qbman: export coalesce change API Madalin Bucur
2018-10-01 21:50 ` Li Yang
2018-10-02 6:07 ` Madalin-cristian Bucur
2018-10-02 20:07 ` Li Yang
2018-10-01 22:29 ` [PATCH v2 0/5] soc/fsl/qbman: DPAA QBMan fixes and additions Li Yang
2018-10-02 6:28 ` Madalin-cristian Bucur
2018-10-02 19:45 ` Li Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1538124204-31406-3-git-send-email-madalin.bucur@nxp.com \
--to=madalin.bucur@nxp.com \
--cc=catalin.marinas@arm.com \
--cc=claudiu.manoil@nxp.com \
--cc=leoyang.li@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=oss@buserror.net \
--cc=roy.pledge@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).