mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: will.deacon@arm.com, linux@arm.linux.org.uk,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, mingo@kernel.org
Subject: Re: [PATCH arm 1/2] arm64: Use common outgoing-CPU-notification code
Date: Fri, 1 May 2015 17:29:15 +0100	[thread overview]
Message-ID: <20150501162915.GI27755@e104818-lin.cambridge.arm.com> (raw)
In-Reply-To: <20150501150848.GC5381@linux.vnet.ibm.com>

On Fri, May 01, 2015 at 08:08:48AM -0700, Paul E. McKenney wrote:
> On Thu, Apr 30, 2015 at 10:50:55AM +0100, Catalin Marinas wrote:
> > On Thu, Apr 23, 2015 at 01:07:33PM -0700, Paul E. McKenney wrote:
> > > diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> > > index 328b8ce4b007..6dc727a6e73e 100644
> > > --- a/arch/arm64/kernel/smp.c
> > > +++ b/arch/arm64/kernel/smp.c
> > > @@ -252,15 +252,13 @@ static int op_cpu_kill(unsigned int cpu)
> > >  	return cpu_ops[cpu]->cpu_kill(cpu);
> > >  }
> > >  
> > > -static DECLARE_COMPLETION(cpu_died);
> > > -
> > >  /*
> > >   * called on the thread which is asking for a CPU to be shutdown -
> > >   * waits until shutdown has completed, or it is timed out.
> > >   */
> > >  void __cpu_die(unsigned int cpu)
> > >  {
> > > -	if (!wait_for_completion_timeout(&cpu_died, msecs_to_jiffies(5000))) {
> > > +	if (!cpu_wait_death(cpu, 5)) {
> > >  		pr_crit("CPU%u: cpu didn't die\n", cpu);
> > >  		return;
> > >  	}
> > > @@ -293,7 +291,7 @@ void cpu_die(void)
> > >  	local_irq_disable();
> > >  
> > >  	/* Tell __cpu_die() that this CPU is now safe to dispose of */
> > > -	complete(&cpu_died);
> > > +	(void)cpu_report_death();
> > >  
> > >  	/*
> > >  	 * Actually shutdown the CPU. This must never fail. The specific hotplug
> > 
> > Are these functions are only defined when HOTPLUG_CPU is enabled? On
> > arm64 we can end up with this option disabled if SUSPEND is disabled.
> 
> Yep, only with HOTPLUG_CPU.  And yes, both SUSPEND and HIBERNATION can
> force HOTPLUG_CPU, so if you have neiter SUSPEND nor HIBERNATION, you
> won't have HOTPLUG_CPU.  This -should- be OK, because you should also
> not have __cpu_die() if !HOTPLUG_CPU.

Ah, you are right. I got myself confused.

So is this patch ready for upstreaming or just for our information?

-- 
Catalin

  reply	other threads:[~2015-05-01 16:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-23 20:06 [PATCH arm 0/2] Fixes for ARM use of scheduler when offline Paul E. McKenney
2015-04-23 20:07 ` [PATCH arm 1/2] arm64: Use common outgoing-CPU-notification code Paul E. McKenney
2015-04-23 20:07   ` [PATCH arm 2/2] arm: " Paul E. McKenney
2015-04-30  9:50   ` [PATCH arm 1/2] arm64: " Catalin Marinas
2015-05-01 15:08     ` Paul E. McKenney
2015-05-01 16:29       ` Catalin Marinas [this message]
2015-05-01 19:18         ` Paul E. McKenney

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=20150501162915.GI27755@e104818-lin.cambridge.arm.com \
    --to=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=will.deacon@arm.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

all inboxes | Powered by JetHome®