From: Chenhui Zhao <chenhui.zhao@freescale.com>
To: Scott Wood <scottwood@freescale.com>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
Jason.Jin@freescale.com
Subject: Re: [PATCH 4/9] powerpc/85xx: support CPU hotplug for e500mc and e5500
Date: Wed, 12 Mar 2014 12:34:07 +0800 [thread overview]
Message-ID: <20140312043407.GC4706@localhost.localdomain> (raw)
In-Reply-To: <1394581693.13761.66.camel@snotra.buserror.net>
On Tue, Mar 11, 2014 at 06:48:13PM -0500, Scott Wood wrote:
> On Fri, 2014-03-07 at 12:58 +0800, Chenhui Zhao wrote:
> > diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
> > index ac2621a..f3f4401 100644
> > --- a/arch/powerpc/kernel/smp.c
> > +++ b/arch/powerpc/kernel/smp.c
> > @@ -405,8 +405,12 @@ void generic_cpu_die(unsigned int cpu)
> >
> > for (i = 0; i < 100; i++) {
> > smp_rmb();
> > - if (per_cpu(cpu_state, cpu) == CPU_DEAD)
> > + if (per_cpu(cpu_state, cpu) == CPU_DEAD) {
> > +#ifdef CONFIG_PPC64
> > + paca[cpu].cpu_start = 0;
> > +#endif
>
> Why wasn't this needed by previous ppc64 machines?
If not clear, cpu can't start in the case of cpu hotpolug.
The function pseries_cpu_die() in arch/powerpc/platforms/pseries/hotplug-cpu.c
also clears the flag.
>
> > diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c
> > index 2e5911e..0047883 100644
> > --- a/arch/powerpc/platforms/85xx/smp.c
> > +++ b/arch/powerpc/platforms/85xx/smp.c
> > @@ -19,6 +19,7 @@
> > #include <linux/kexec.h>
> > #include <linux/highmem.h>
> > #include <linux/cpu.h>
> > +#include <linux/smp.h>
> >
> > #include <asm/machdep.h>
> > #include <asm/pgtable.h>
> > @@ -46,6 +47,17 @@ static u64 timebase;
> > static int tb_req;
> > static int tb_valid;
> >
> > +#ifdef CONFIG_PPC_E500MC
> > +/* specify the cpu PM state when cpu dies, PH15/NAP is the default */
> > +int qoriq_cpu_die_state = E500_PM_PH15;
> > +#endif
>
> static? Is there any way to modify this other than modifying source
> code?
>
> BTW, QorIQ doesn't imply an e500mc derivative.
Will support e500, but for now these code support e500mc derivative in
advance.
Supposed qoriq_cpu_die_state can be changed by platform init code
if the default value is not proper for a specific platform.
>
> > @@ -125,6 +138,34 @@ static void mpc85xx_take_timebase(void)
> > }
> >
> > #ifdef CONFIG_HOTPLUG_CPU
> > +#ifdef CONFIG_PPC_E500MC
> > +static void qoriq_cpu_die(void)
> > +{
> > + unsigned int cpu = smp_processor_id();
> > +
> > + local_irq_disable();
> > +#ifdef CONFIG_PPC64
> > + __hard_irq_disable();
> > +#endif
>
> Why this instead of one call to hard_irq_disable() (no leading
> underscores)?
>
> -Scott
hard_irq_disable() will clear soft_enabled again. local_irq_disable()
has cleared it.
Will use hard_irq_disable() to replace these lines.
local_irq_disable();
#ifdef CONFIG_PPC64
__hard_irq_disable();
#endif
-Chenhui
next prev parent reply other threads:[~2014-03-12 4:34 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-07 4:57 [PATCH 1/9] powerpc/fsl: add PVR definition for E500MC and E5500 Chenhui Zhao
2014-03-07 4:57 ` [PATCH 2/9] powerpc/cache: add cache flush operation for various e500 Chenhui Zhao
2014-03-07 4:57 ` [PATCH 3/9] powerpc/rcpm: add RCPM driver Chenhui Zhao
2014-03-11 23:42 ` Scott Wood
2014-03-12 3:59 ` Chenhui Zhao
2014-03-14 22:34 ` Scott Wood
2014-03-07 4:58 ` [PATCH 4/9] powerpc/85xx: support CPU hotplug for e500mc and e5500 Chenhui Zhao
2014-03-11 23:48 ` Scott Wood
2014-03-12 4:34 ` Chenhui Zhao [this message]
2014-03-07 4:58 ` [PATCH 5/9] powerpc/85xx: disable irq by hardware when suspend for 64-bit Chenhui Zhao
2014-03-11 23:51 ` Scott Wood
2014-03-12 7:46 ` Chenhui Zhao
2014-03-14 22:41 ` Scott Wood
2014-03-17 9:37 ` Chenhui Zhao
2014-03-07 4:58 ` [PATCH 6/9] powerpc/85xx: support sleep feature on QorIQ SoCs with RCPM Chenhui Zhao
2014-03-12 0:00 ` Scott Wood
2014-03-12 8:08 ` Chenhui Zhao
2014-03-14 22:46 ` Scott Wood
2014-03-07 4:58 ` [PATCH 7/9] fsl: add EPU FSM configuration for deep sleep Chenhui Zhao
2014-03-12 0:08 ` Scott Wood
2014-03-12 8:34 ` Chenhui Zhao
2014-03-14 22:51 ` Scott Wood
2014-03-17 10:27 ` Chenhui Zhao
2014-03-18 23:21 ` Scott Wood
2014-03-19 0:08 ` Chenhui Zhao
2014-03-07 4:58 ` [PATCH 8/9] powerpc/85xx: add save/restore functions for core registers Chenhui Zhao
2014-03-12 0:45 ` Scott Wood
2014-03-12 9:42 ` Chenhui Zhao
2014-03-14 23:01 ` Scott Wood
2014-03-17 10:50 ` Chenhui Zhao
2014-03-07 4:58 ` [PATCH 9/9] powerpc/pm: support deep sleep feature on T1040 Chenhui Zhao
2014-03-12 1:10 ` Scott Wood
2014-03-12 5:57 ` Kevin Hao
2014-03-12 17:43 ` Scott Wood
2014-03-13 7:46 ` Kevin Hao
2014-03-14 22:26 ` Scott Wood
2014-03-16 4:58 ` Kevin Hao
2014-03-18 23:18 ` Scott Wood
2014-03-20 11:47 ` Kevin Hao
2014-03-20 11:59 ` David Laight
2014-03-20 22:07 ` Scott Wood
2014-03-21 9:21 ` David Laight
2014-03-21 21:16 ` Scott Wood
2014-03-20 22:17 ` Scott Wood
2014-03-12 10:40 ` Chenhui Zhao
2014-03-14 23:18 ` Scott Wood
2014-03-17 11:19 ` Chenhui Zhao
2014-03-18 22:42 ` Scott Wood
2014-03-19 0:56 ` Chenhui Zhao
2014-03-20 23:33 ` Scott Wood
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=20140312043407.GC4706@localhost.localdomain \
--to=chenhui.zhao@freescale.com \
--cc=Jason.Jin@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=scottwood@freescale.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).