linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv4 4/6] arm64: add CPU_HOTPLUG infrastructure
Date: Mon, 14 Oct 2013 14:20:38 +0100	[thread overview]
Message-ID: <20131014132037.GC31708@e106331-lin.cambridge.arm.com> (raw)
In-Reply-To: <52587A9C.9070503@codeaurora.org>

On Fri, Oct 11, 2013 at 11:24:28PM +0100, Stephen Boyd wrote:
> On 10/11/13 11:24, Mark Rutland wrote:
> > diff --git a/arch/arm64/include/asm/cpu_ops.h b/arch/arm64/include/asm/cpu_ops.h
> > index 1720be6..f4a11a3 100644
> > --- a/arch/arm64/include/asm/cpu_ops.h
> > +++ b/arch/arm64/include/asm/cpu_ops.h
> > @@ -34,6 +34,11 @@ struct device_node;
> >   * @cpu_boot:	Boots a cpu into the kernel.
> >   * @cpu_postboot: Optionally, perform any post-boot cleanup or necesary
> >   *		synchronisation. Called from the cpu being booted.
> > + * @cpu_disable: Prepares a cpu to die. May fail for some mechanism-specific
> > + * 		reason, which will cause the hot unplug to be aborted. Called
> > + * 		from the cpu to be killed.
> > + * @cpu_die:	Makes the a leave the kernel. Must not fail. Called from the
> 
> Makes the cpu? Makes a cpu?

Whoops. I've fixed this to "Makes a cpu".

> 
> > + *		cpu being killed.
> >   */
> >  struct cpu_operations {
> >  	const char	*name;
> > @@ -41,6 +46,10 @@ struct cpu_operations {
> >  	int		(*cpu_prepare)(unsigned int);
> >  	int		(*cpu_boot)(unsigned int);
> >  	void		(*cpu_postboot)(void);
> > +#ifdef CONFIG_HOTPLUG_CPU
> > +	int		(*cpu_disable)(unsigned int cpu);
> > +	void		(*cpu_die)(unsigned int cpu);
> > +#endif
> >  };
> >  
> >  extern const struct cpu_operations *cpu_ops[NR_CPUS];
> > diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> > index 6806bc4..888776e 100644
> > --- a/arch/arm64/kernel/smp.c
> > +++ b/arch/arm64/kernel/smp.c
> [snip]
> > +
> > +/*
> > + * Called from the idle thread for the CPU which has been shutdown.
> > + *
> > + * Note that we disable IRQs here, but do not re-enable them
> > + * before returning to the caller. This is also the behaviour
> > + * of the other hotplug-cpu capable cores, so presumably coming
> > + * out of idle fixes this.
> > + */
> > +void __ref cpu_die(void)
> 
> __ref is unnecessary now that __cpuinit is gone. I see arm32 needs the
> same treatment.

Good point. Removed.

> 
> > +{
> > +	unsigned int cpu = smp_processor_id();
> > +
> > +	idle_task_exit();
> > +
> > +	local_irq_disable();
> > +	mb();
> 
> Can you please comment this mb().

It looks like the mb is a holdover from an earlier version, and is
superfluous. Removed.

Cheers,
Mark.

  reply	other threads:[~2013-10-14 13:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-11 18:24 [PATCHv4 0/6] arm64: initial CPU hotplug support Mark Rutland
2013-10-11 18:24 ` [PATCHv4 1/6] arm64: unify smp_psci.c and psci.c Mark Rutland
2013-10-11 18:24 ` [PATCHv4 2/6] arm64: reorganise smp_enable_ops Mark Rutland
2013-10-11 18:24 ` [PATCHv4 3/6] arm64: factor out spin-table boot method Mark Rutland
2013-10-11 18:24 ` [PATCHv4 4/6] arm64: add CPU_HOTPLUG infrastructure Mark Rutland
2013-10-11 22:24   ` Stephen Boyd
2013-10-14 13:20     ` Mark Rutland [this message]
2013-10-11 18:24 ` [PATCHv4 5/6] arm64: add PSCI CPU_OFF-based hotplug support Mark Rutland
2013-10-11 18:24 ` [PATCHv4 6/6] arm64: read enable-method for CPU0 Mark Rutland

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=20131014132037.GC31708@e106331-lin.cambridge.arm.com \
    --to=mark.rutland@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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).