Re: [PATCH v8 1/2] arm: introduce psci_smp_ops

2013-04-26 Thread Will Deacon
On Fri, Apr 26, 2013 at 04:36:26PM +0100, Stefano Stabellini wrote: > On Thu, 25 Apr 2013, Nicolas Pitre wrote: > > On Thu, 25 Apr 2013, Will Deacon wrote: > > > I disagree. You're explicitly stating that we pass the `cpuid of target > > > CPU, > > > as from MPIDR'. That's simply not true -- the

Re: [PATCH v8 1/2] arm: introduce psci_smp_ops

2013-04-26 Thread Stefano Stabellini
On Thu, 25 Apr 2013, Nicolas Pitre wrote: > On Thu, 25 Apr 2013, Will Deacon wrote: > > > On Thu, Apr 25, 2013 at 11:12:54AM +0100, Stefano Stabellini wrote: > > > On Thu, 25 Apr 2013, Will Deacon wrote: > > > > > +/* > > > > > + * cpu_suspend Suspend the execution on a CPU > > > > > + * @state

Re: [PATCH v8 1/2] arm: introduce psci_smp_ops

2013-04-26 Thread Stefano Stabellini
On Thu, 25 Apr 2013, Nicolas Pitre wrote: On Thu, 25 Apr 2013, Will Deacon wrote: On Thu, Apr 25, 2013 at 11:12:54AM +0100, Stefano Stabellini wrote: On Thu, 25 Apr 2013, Will Deacon wrote: +/* + * cpu_suspend Suspend the execution on a CPU + * @statewe don't

Re: [PATCH v8 1/2] arm: introduce psci_smp_ops

2013-04-26 Thread Will Deacon
On Fri, Apr 26, 2013 at 04:36:26PM +0100, Stefano Stabellini wrote: On Thu, 25 Apr 2013, Nicolas Pitre wrote: On Thu, 25 Apr 2013, Will Deacon wrote: I disagree. You're explicitly stating that we pass the `cpuid of target CPU, as from MPIDR'. That's simply not true -- the firmware

Re: [PATCH v8 1/2] arm: introduce psci_smp_ops

2013-04-25 Thread Nicolas Pitre
On Thu, 25 Apr 2013, Will Deacon wrote: > On Thu, Apr 25, 2013 at 11:12:54AM +0100, Stefano Stabellini wrote: > > On Thu, 25 Apr 2013, Will Deacon wrote: > > > > +/* > > > > + * cpu_suspend Suspend the execution on a CPU > > > > + * @statewe don't currently describe affinity levels, so

Re: [PATCH v8 1/2] arm: introduce psci_smp_ops

2013-04-25 Thread Stefano Stabellini
On Thu, 25 Apr 2013, Will Deacon wrote: > On Thu, Apr 25, 2013 at 12:08:02PM +0100, Stefano Stabellini wrote: > > On Thu, 25 Apr 2013, Will Deacon wrote: > > > On Thu, Apr 25, 2013 at 11:12:54AM +0100, Stefano Stabellini wrote: > > > > However from the Linux POV these comments should regard the

Re: [PATCH v8 1/2] arm: introduce psci_smp_ops

2013-04-25 Thread Will Deacon
On Thu, Apr 25, 2013 at 12:08:02PM +0100, Stefano Stabellini wrote: > On Thu, 25 Apr 2013, Will Deacon wrote: > > On Thu, Apr 25, 2013 at 11:12:54AM +0100, Stefano Stabellini wrote: > > > However from the Linux POV these comments should regard the functions > > > exported by psci_operations, not

Re: [PATCH v8 1/2] arm: introduce psci_smp_ops

2013-04-25 Thread Stefano Stabellini
On Thu, 25 Apr 2013, Will Deacon wrote: > On Thu, Apr 25, 2013 at 11:12:54AM +0100, Stefano Stabellini wrote: > > On Thu, 25 Apr 2013, Will Deacon wrote: > > > > +/* > > > > + * cpu_suspend Suspend the execution on a CPU > > > > + * @statewe don't currently describe affinity levels, so

Re: [PATCH v8 1/2] arm: introduce psci_smp_ops

2013-04-25 Thread Will Deacon
On Thu, Apr 25, 2013 at 11:12:54AM +0100, Stefano Stabellini wrote: > On Thu, 25 Apr 2013, Will Deacon wrote: > > > +/* > > > + * cpu_suspend Suspend the execution on a CPU > > > + * @statewe don't currently describe affinity levels, so just > > > pass 0. > > > + * @entry_point the

Re: [PATCH v8 1/2] arm: introduce psci_smp_ops

2013-04-25 Thread Stefano Stabellini
On Thu, 25 Apr 2013, Will Deacon wrote: > > +/* > > + * cpu_suspend Suspend the execution on a CPU > > + * @statewe don't currently describe affinity levels, so just pass > > 0. > > + * @entry_point the first instruction to be executed on return > > + * returns 0 success, < 0 on

Re: [PATCH v8 1/2] arm: introduce psci_smp_ops

2013-04-25 Thread Will Deacon
Hi Stefano, On Wed, Apr 24, 2013 at 07:40:18PM +0100, Stefano Stabellini wrote: > Rename virt_smp_ops to psci_smp_ops and move them to > arch/arm/kernel/psci_smp.c. > Remove mach-virt/platsmp.c, now unused. > Compile psci_smp if CONFIG_ARM_PSCI and CONFIG_SMP. > > Add a cpu_die smp_op based on

Re: [PATCH v8 1/2] arm: introduce psci_smp_ops

2013-04-25 Thread Will Deacon
Hi Stefano, On Wed, Apr 24, 2013 at 07:40:18PM +0100, Stefano Stabellini wrote: Rename virt_smp_ops to psci_smp_ops and move them to arch/arm/kernel/psci_smp.c. Remove mach-virt/platsmp.c, now unused. Compile psci_smp if CONFIG_ARM_PSCI and CONFIG_SMP. Add a cpu_die smp_op based on

Re: [PATCH v8 1/2] arm: introduce psci_smp_ops

2013-04-25 Thread Stefano Stabellini
On Thu, 25 Apr 2013, Will Deacon wrote: +/* + * cpu_suspend Suspend the execution on a CPU + * @statewe don't currently describe affinity levels, so just pass 0. + * @entry_point the first instruction to be executed on return + * returns 0 success, 0 on failure + * +

Re: [PATCH v8 1/2] arm: introduce psci_smp_ops

2013-04-25 Thread Will Deacon
On Thu, Apr 25, 2013 at 11:12:54AM +0100, Stefano Stabellini wrote: On Thu, 25 Apr 2013, Will Deacon wrote: +/* + * cpu_suspend Suspend the execution on a CPU + * @statewe don't currently describe affinity levels, so just pass 0. + * @entry_point the first instruction

Re: [PATCH v8 1/2] arm: introduce psci_smp_ops

2013-04-25 Thread Stefano Stabellini
On Thu, 25 Apr 2013, Will Deacon wrote: On Thu, Apr 25, 2013 at 11:12:54AM +0100, Stefano Stabellini wrote: On Thu, 25 Apr 2013, Will Deacon wrote: +/* + * cpu_suspend Suspend the execution on a CPU + * @statewe don't currently describe affinity levels, so just pass

Re: [PATCH v8 1/2] arm: introduce psci_smp_ops

2013-04-25 Thread Will Deacon
On Thu, Apr 25, 2013 at 12:08:02PM +0100, Stefano Stabellini wrote: On Thu, 25 Apr 2013, Will Deacon wrote: On Thu, Apr 25, 2013 at 11:12:54AM +0100, Stefano Stabellini wrote: However from the Linux POV these comments should regard the functions exported by psci_operations, not the

Re: [PATCH v8 1/2] arm: introduce psci_smp_ops

2013-04-25 Thread Stefano Stabellini
On Thu, 25 Apr 2013, Will Deacon wrote: On Thu, Apr 25, 2013 at 12:08:02PM +0100, Stefano Stabellini wrote: On Thu, 25 Apr 2013, Will Deacon wrote: On Thu, Apr 25, 2013 at 11:12:54AM +0100, Stefano Stabellini wrote: However from the Linux POV these comments should regard the functions

Re: [PATCH v8 1/2] arm: introduce psci_smp_ops

2013-04-25 Thread Nicolas Pitre
On Thu, 25 Apr 2013, Will Deacon wrote: On Thu, Apr 25, 2013 at 11:12:54AM +0100, Stefano Stabellini wrote: On Thu, 25 Apr 2013, Will Deacon wrote: +/* + * cpu_suspend Suspend the execution on a CPU + * @statewe don't currently describe affinity levels, so just pass

[PATCH v8 1/2] arm: introduce psci_smp_ops

2013-04-24 Thread Stefano Stabellini
Rename virt_smp_ops to psci_smp_ops and move them to arch/arm/kernel/psci_smp.c. Remove mach-virt/platsmp.c, now unused. Compile psci_smp if CONFIG_ARM_PSCI and CONFIG_SMP. Add a cpu_die smp_op based on psci_ops.cpu_off. Initialize PSCI before setting smp_ops in setup_arch. Use psci_smp_ops if

[PATCH v8 1/2] arm: introduce psci_smp_ops

2013-04-24 Thread Stefano Stabellini
Rename virt_smp_ops to psci_smp_ops and move them to arch/arm/kernel/psci_smp.c. Remove mach-virt/platsmp.c, now unused. Compile psci_smp if CONFIG_ARM_PSCI and CONFIG_SMP. Add a cpu_die smp_op based on psci_ops.cpu_off. Initialize PSCI before setting smp_ops in setup_arch. Use psci_smp_ops if