From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 1/3] powerpc/xive: Fix trying to "push" an already active pool VP
Date: Wed, 11 Apr 2018 15:20:31 +1000 [thread overview]
Message-ID: <1523424031.11062.128.camel@kernel.crashing.org> (raw)
In-Reply-To: <20180411051801.30194-1-benh@kernel.crashing.org>
On Wed, 2018-04-11 at 15:17 +1000, Benjamin Herrenschmidt wrote:
> When setting up a CPU, we "push" (activate) a pool VP for it.
>
> However it's an error to do so if it already has an active
> pool VP.
>
> This happens when doing soft CPU hotplug on powernv since we
> don't tear down the CPU on unplug. The HW flags the error which
> gets captured by the diagnostics.
>
> Fix this by making sure to "pull" out any already active pool
> first.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: stable@vger.kernel.org...
> ---
> arch/powerpc/sysdev/xive/native.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/powerpc/sysdev/xive/native.c b/arch/powerpc/sysdev/xive/native.c
> index d22aeb0b69e1..b48454be5b98 100644
> --- a/arch/powerpc/sysdev/xive/native.c
> +++ b/arch/powerpc/sysdev/xive/native.c
> @@ -389,6 +389,10 @@ static void xive_native_setup_cpu(unsigned int cpu, struct xive_cpu *xc)
> if (xive_pool_vps == XIVE_INVALID_VP)
> return;
>
> + /* Check if pool VP already active, if it is, pull it */
> + if (in_be32(xive_tima + TM_QW2_HV_POOL + TM_WORD2) & TM_QW2W2_VP)
> + in_be64(xive_tima + TM_SPC_PULL_POOL_CTX);
> +
> /* Enable the pool VP */
> vp = xive_pool_vps + cpu;
> pr_debug("CPU %d setting up pool VP 0x%x\n", cpu, vp);
next prev parent reply other threads:[~2018-04-11 5:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-11 5:17 [PATCH 1/3] powerpc/xive: Fix trying to "push" an already active pool VP Benjamin Herrenschmidt
2018-04-11 5:18 ` [PATCH 2/3] powerpc/xive: Remove now useless pr_debug statements Benjamin Herrenschmidt
2018-08-08 14:25 ` [2/3] " Michael Ellerman
2018-04-11 5:18 ` [PATCH 3/3] powerpc/xive: Remove xive_kexec_teardown_cpu() Benjamin Herrenschmidt
2018-08-08 14:25 ` [3/3] " Michael Ellerman
2018-04-11 5:20 ` Benjamin Herrenschmidt [this message]
2018-04-19 13:42 ` [1/3] powerpc/xive: Fix trying to "push" an already active pool VP Michael Ellerman
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=1523424031.11062.128.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/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).