linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Li Yang-R58472 <r58472@freescale.com>
Cc: Wood Scott-B07421 <B07421@freescale.com>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	Zhao Chenhui-B35336 <B35336@freescale.com>
Subject: Re: [PATCH v2 2/7] powerpc/85xx: add HOTPLUG_CPU support
Date: Thu, 17 Nov 2011 13:44:43 -0600	[thread overview]
Message-ID: <20111117194443.GA14587@schlenkerla.am.freescale.net> (raw)
In-Reply-To: <3F607A5180246847A760FD34122A1E052D4486@039-SN1MPN1-003.039d.mgd.msft.net>

On Thu, Nov 17, 2011 at 05:16:09AM -0600, Li Yang-R58472 wrote:
> 
> 
> >Cc: linuxppc-dev@lists.ozlabs.org; Li Yang-R58472
> >Subject: Re: [PATCH v2 2/7] powerpc/85xx: add HOTPLUG_CPU support
> >
> >On 11/16/2011 03:55 AM, Zhao Chenhui wrote:
> >> +static void __cpuinit smp_85xx_mach_cpu_die(void) {
> >> +	unsigned int cpu = smp_processor_id();
> >> +	register u32 tmp;
> >> +
> >> +	local_irq_disable();
> >> +	idle_task_exit();
> >> +	generic_set_cpu_dead(cpu);
> >> +	mb();
> >> +
> >> +	mtspr(SPRN_TCR, 0);
> >> +	mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS);
> >
> >Clearing these bits in TSR should be unnecessary since we clear TCR -- and
> >doesn't really accomplish anything since the TSR bits can continue to be
> >set.
> 
> I also recommend setting the CORE_IRQ_MASK and CORE_CI_MASK in the
> POWMGTCSR register so that no interrupt will wakeup the core from NAP.

Any interrupt that we don't want to use as a wakeup source should already
be disabled at the MPIC.  Won't disabling IRQs in POWMGTCSR prevent us
from being woken by devices that we want to use as a wakeup source?

> >If watchdog is in use, we need to set the period to the highest possible
> >to effectively disable it.
> 
> Setting it to the highest timeout doesn't really disable the watchdog. 

It means the watchdog won't expire for thousands of years, which is
beyond any reasonable design parameter for uptime.

We already do this in Topaz when entering nap.

> >> +static int __cpuinit smp_85xx_kick_cpu(int nr)
> >> +
> >>  {
> >>  	unsigned long flags;
> >>  	const u64 *cpu_rel_addr;
> >> -	__iomem u32 *bptr_vaddr;
> >> +	__iomem struct epapr_spin_table *epapr;
> >
> >Please don't call this just "epapr".  That's like calling a reference to
> >any powerpc-specific struct "powerpc".
> >
> >How about "spin_table"?
> 
> You mean the name of the variable not the structure, right?  I agree.

Right, the variable name.

> >>  struct smp_ops_t smp_85xx_ops = {
> >>  	.kick_cpu = smp_85xx_kick_cpu,
> >> +	.setup_cpu	= smp_85xx_setup_cpu,
> >> +#ifdef CONFIG_HOTPLUG_CPU
> >> +	.cpu_disable	= generic_cpu_disable,
> >> +	.cpu_die	= generic_cpu_die,
> >> +#endif
> >
> >Only fill these fields in on e500v1/v2, until we properly support e500mc.
> >Likewise in ppc_md.cpu_die and anywhere else we advertise this
> >functionality.
> 
> Is there a standard function call that can tell that it is an e500mc not legacy e500?

Use CONFIG_E500MC -- we don't support combined e500v2/e500mc kernels for
other reasons.

If that ever changes, we'll need to do something based on the cpu table.

-Scott

  reply	other threads:[~2011-11-17 19:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-16  9:55 [PATCH v2 1/7] powerpc/85xx: re-enable timebase sync disabled by KEXEC patch Zhao Chenhui
2011-11-16  9:55 ` [PATCH v2 2/7] powerpc/85xx: add HOTPLUG_CPU support Zhao Chenhui
2011-11-16 19:02   ` Scott Wood
2011-11-17 11:16     ` Li Yang-R58472
2011-11-17 19:44       ` Scott Wood [this message]
2011-11-16  9:55 ` [PATCH v2 3/7] powerpc/85xx: add sleep and deep sleep support Zhao Chenhui
2011-11-16 21:42   ` Scott Wood
2011-11-16  9:55 ` [PATCH v2 4/7] powerpc/85xx: add support to JOG feature using cpufreq interface Zhao Chenhui
2011-11-17  0:17   ` Scott Wood
2011-11-17 11:53     ` Zhao Chenhui
2011-11-17 19:54       ` Scott Wood
2011-11-16  9:55 ` [PATCH v2 5/7] fsl_pmc: update device bindings Zhao Chenhui
2011-11-16  9:55 ` [PATCH v2 6/7] fsl_pmc: Add API to enable device as wakeup event source Zhao Chenhui
2011-11-16 18:42 ` [PATCH v2 1/7] powerpc/85xx: re-enable timebase sync disabled by KEXEC patch Scott Wood
2011-11-18 10:12   ` Zhao Chenhui
2011-11-18 14:35   ` Kumar Gala
2011-11-18 18:01     ` Scott Wood
2011-11-20 16:46       ` Kumar Gala
2011-11-22  9:29       ` Li Yang-R58472
2011-11-22 16:05         ` Kumar Gala

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=20111117194443.GA14587@schlenkerla.am.freescale.net \
    --to=scottwood@freescale.com \
    --cc=B07421@freescale.com \
    --cc=B35336@freescale.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=r58472@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).