Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1199244

Re: [PATCH 1/3] Powerpc: mpc85xx: refactor the PM operations

From Scott Wood <scottwood@freescale.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/3] Powerpc: mpc85xx: refactor the PM operations
Date 2015-08-03 22:30 +0200
Message-ID <pTuwW-5lZ-5@gated-at.bofh.it> (permalink)
References <pSf6W-1KB-19@gated-at.bofh.it> <pSsnv-4oj-3@gated-at.bofh.it> <pTmg2-1ME-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 2015-08-03 at 19:32 +0800, Chenhui Zhao wrote:
> > 

> On Sat, Aug 1, 2015 at 7:59 AM, Scott Wood <scottwood@freescale.com> 
> wrote:

> >
> > Could you explain irq_mask()?  Why would there still be IRQs destined 
> > for
> > this CPU at this point?
> 
> This function just masks irq by setting the registers in RCPM (for 
> example, RCPM_CPMIMR, RCPM_CPMCIMR). Actually, all irqs to this CPU 
> have been migrated to other CPUs.

So why do we need to set those bits in RCPM?  Is it just caution?

> > @@ -431,21 +415,9 @@ void __init mpc85xx_smp_init(void)
> > >                smp_85xx_ops.probe = NULL;
> > >        }
> > > 
> > >  -     np = of_find_matching_node(NULL, mpc85xx_smp_guts_ids);
> > >  -     if (np) {
> > >  -             guts = of_iomap(np, 0);
> > >  -             of_node_put(np);
> > >  -             if (!guts) {
> > >  -                     pr_err("%s: Could not map guts node 
> > > address\n",
> > >  -                                                             
> > > __func__);
> > >  -                     return;
> > >  -             }
> > >  -             smp_85xx_ops.give_timebase = mpc85xx_give_timebase;
> > >  -             smp_85xx_ops.take_timebase = mpc85xx_take_timebase;
> > >   #ifdef CONFIG_HOTPLUG_CPU
> > >  -             ppc_md.cpu_die = smp_85xx_mach_cpu_die;
> > >  +     ppc_md.cpu_die = qoriq_cpu_dying;
> > >   #endif
> > 
> > Shouldn't you make sure there's a valid qoriq_pm_ops before setting
> > cpu_die()?  Or make sure that qoriq_cpu_dying() works regardless.
> > 
> > -Scott
> 
> This patch is just for e500v2. The following patches will handle the 
> case of e500mc, e5500 and e6500.

What stops a user from trying to use cpu hotplug on unsupported cpus, or in a 
virtualized environment, and crashing here?

-Scott

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH 1/3] Powerpc: mpc85xx: refactor the PM operations Chenhui Zhao <chenhui.zhao@freescale.com> - 2015-08-03 13:40 +0200
  Re: [PATCH 1/3] Powerpc: mpc85xx: refactor the PM operations Scott Wood <scottwood@freescale.com> - 2015-08-03 22:30 +0200

csiph-web