[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170314233029.478a7294@roar.ozlabs.ibm.com>
Date: Tue, 14 Mar 2017 23:30:29 +1000
From: Nicholas Piggin <npiggin@...il.com>
To: "Gautham R. Shenoy" <ego@...ux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@...erman.id.au>,
Michael Neuling <mikey@...ling.org>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
"Shreyas B. Prabhu" <shreyasbp@...il.com>,
Shilpasri G Bhat <shilpa.bhat@...ux.vnet.ibm.com>,
Vaidyanathan Srinivasan <svaidy@...ux.vnet.ibm.com>,
Anton Blanchard <anton@...ba.org>,
Balbir Singh <bsingharora@...il.com>,
Akshay Adiga <akshay.adiga@...ux.vnet.ibm.com>,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] powernv:smp: Add busy-wait loop as fall back for
CPU-Hotplug
On Mon, 13 Mar 2017 11:31:26 +0530
"Gautham R. Shenoy" <ego@...ux.vnet.ibm.com> wrote:
> [Changelog written with inputs from svaidy@...ux.vnet.ibm.com]
> Signed-off-by: Gautham R. Shenoy <ego@...ux.vnet.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@...il.com>
> ---
> arch/powerpc/platforms/powernv/smp.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/platforms/powernv/smp.c b/arch/powerpc/platforms/powernv/smp.c
> index e39e6c4..8d5b99e 100644
> --- a/arch/powerpc/platforms/powernv/smp.c
> +++ b/arch/powerpc/platforms/powernv/smp.c
> @@ -192,8 +192,16 @@ static void pnv_smp_cpu_kill_self(void)
> } else if ((idle_states & OPAL_PM_SLEEP_ENABLED) ||
> (idle_states & OPAL_PM_SLEEP_ENABLED_ER1)) {
> srr1 = power7_sleep();
> - } else {
> + } else if (idle_states & OPAL_PM_NAP_ENABLED) {
> srr1 = power7_nap(1);
> + } else {
> + /* This is the fallback method. We emulate snooze */
> + while (!generic_check_cpu_restart(cpu)) {
> + HMT_low();
> + HMT_very_low();
> + }
> + srr1 = 0;
> + HMT_medium();
> }
>
> ppc64_runlatch_on();
Powered by blists - more mailing lists