Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-16 Thread Mark Rutland
On Fri, Feb 13, 2015 at 11:01:37PM +, Russell King - ARM Linux wrote: > On Fri, Feb 13, 2015 at 09:44:50PM +, Magnus Damm wrote: > > Also, based on the comment in mcpm_cpu_can_disable() it looks like the > > PSCI hook may be executed once only with your change in place? > > Hopefully PSCI

Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-16 Thread Mark Rutland
On Fri, Feb 13, 2015 at 11:01:37PM +, Russell King - ARM Linux wrote: On Fri, Feb 13, 2015 at 09:44:50PM +, Magnus Damm wrote: Also, based on the comment in mcpm_cpu_can_disable() it looks like the PSCI hook may be executed once only with your change in place? Hopefully PSCI is OK

Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-14 Thread Magnus Damm
Hi Russell, On Fri, Feb 13, 2015 at 11:01 PM, Russell King - ARM Linux wrote: > On Fri, Feb 13, 2015 at 09:44:50PM +, Magnus Damm wrote: >> Also, based on the comment in mcpm_cpu_can_disable() it looks like the >> PSCI hook may be executed once only with your change in place? >> Hopefully

Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-14 Thread Magnus Damm
Hi Russell, On Fri, Feb 13, 2015 at 11:01 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Fri, Feb 13, 2015 at 09:44:50PM +, Magnus Damm wrote: Also, based on the comment in mcpm_cpu_can_disable() it looks like the PSCI hook may be executed once only with your change in

Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-13 Thread Stephen Boyd
On 02/13/15 15:01, Russell King - ARM Linux wrote: > On Fri, Feb 13, 2015 at 09:44:50PM +, Magnus Damm wrote: >> Also, based on the comment in mcpm_cpu_can_disable() it looks like the >> PSCI hook may be executed once only with your change in place? >> Hopefully PSCI is OK not being invoked

Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-13 Thread Simon Horman
On Fri, Feb 13, 2015 at 10:57:04PM +, Russell King - ARM Linux wrote: > On Fri, Feb 13, 2015 at 03:20:04PM -0500, Simon Horman wrote: > > > -static int r8a7779_cpu_disable(unsigned int cpu) > > > -{ > > > - /* only CPU1->3 have power domains, do not allow hotplug of CPU0 */ > > > - return cpu

Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-13 Thread Russell King - ARM Linux
On Fri, Feb 13, 2015 at 09:44:50PM +, Magnus Damm wrote: > Also, based on the comment in mcpm_cpu_can_disable() it looks like the > PSCI hook may be executed once only with your change in place? > Hopefully PSCI is OK not being invoked for every CPU shutdown. This is why I've said (in the

Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-13 Thread Russell King - ARM Linux
On Fri, Feb 13, 2015 at 08:54:22PM +, Magnus Damm wrote: > Thanks for your efforts. Can you please tell me where that limitation > is located? I'm quite sure I've brought CPU cores up and down > including CPU0, but maybe something is missing? If you don't provide a cpu_disable function, by

Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-13 Thread Russell King - ARM Linux
On Fri, Feb 13, 2015 at 03:20:04PM -0500, Simon Horman wrote: > > -static int r8a7779_cpu_disable(unsigned int cpu) > > -{ > > - /* only CPU1->3 have power domains, do not allow hotplug of CPU0 */ > > - return cpu == 0 ? -EPERM : 0; > > -} ... > Its not clear to me why r8a7779_cpu_disable()

Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-13 Thread Magnus Damm
Hi Stephen, On Fri, Feb 13, 2015 at 8:59 PM, Stephen Boyd wrote: > On 02/13/15 12:54, Magnus Damm wrote: >> Hi Stephen, >> >> On Fri, Feb 13, 2015 at 8:23 PM, Stephen Boyd wrote: >>> On 02/13/15 12:20, Simon Horman wrote: Hi Stephen, On Fri, Feb 13, 2015 at 10:06:39AM -0800,

Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-13 Thread Stephen Boyd
On 02/13/15 12:54, Magnus Damm wrote: > Hi Stephen, > > On Fri, Feb 13, 2015 at 8:23 PM, Stephen Boyd wrote: >> On 02/13/15 12:20, Simon Horman wrote: >>> Hi Stephen, >>> >>> On Fri, Feb 13, 2015 at 10:06:39AM -0800, Stephen Boyd wrote: diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c

Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-13 Thread Magnus Damm
Hi Stephen, On Fri, Feb 13, 2015 at 8:23 PM, Stephen Boyd wrote: > On 02/13/15 12:20, Simon Horman wrote: >> Hi Stephen, >> >> On Fri, Feb 13, 2015 at 10:06:39AM -0800, Stephen Boyd wrote: >>> diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c >>> b/arch/arm/mach-shmobile/smp-r8a7779.c >>> index

Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-13 Thread Stephen Boyd
On 02/13/15 12:20, Simon Horman wrote: > Hi Stephen, > > On Fri, Feb 13, 2015 at 10:06:39AM -0800, Stephen Boyd wrote: >> diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c >> b/arch/arm/mach-shmobile/smp-r8a7779.c >> index 3f761f839043..b45206f93ddf 100644 >> ---

Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-13 Thread Simon Horman
Hi Stephen, On Fri, Feb 13, 2015 at 10:06:39AM -0800, Stephen Boyd wrote: > Writes to /sys/.../cpuX/online fail if we determine the platform > doesn't support hotplug for that CPU. Furthermore, if the cpu_die > op isn't specified the system hangs when we try to offline a CPU > and it comes right

[PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-13 Thread Stephen Boyd
Writes to /sys/.../cpuX/online fail if we determine the platform doesn't support hotplug for that CPU. Furthermore, if the cpu_die op isn't specified the system hangs when we try to offline a CPU and it comes right back online unexpectedly. Let's figure this stuff out before we make the sysfs

[PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-13 Thread Stephen Boyd
Writes to /sys/.../cpuX/online fail if we determine the platform doesn't support hotplug for that CPU. Furthermore, if the cpu_die op isn't specified the system hangs when we try to offline a CPU and it comes right back online unexpectedly. Let's figure this stuff out before we make the sysfs

Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-13 Thread Stephen Boyd
On 02/13/15 12:20, Simon Horman wrote: Hi Stephen, On Fri, Feb 13, 2015 at 10:06:39AM -0800, Stephen Boyd wrote: diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c index 3f761f839043..b45206f93ddf 100644 --- a/arch/arm/mach-shmobile/smp-r8a7779.c +++

Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-13 Thread Russell King - ARM Linux
On Fri, Feb 13, 2015 at 08:54:22PM +, Magnus Damm wrote: Thanks for your efforts. Can you please tell me where that limitation is located? I'm quite sure I've brought CPU cores up and down including CPU0, but maybe something is missing? If you don't provide a cpu_disable function, by

Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-13 Thread Simon Horman
Hi Stephen, On Fri, Feb 13, 2015 at 10:06:39AM -0800, Stephen Boyd wrote: Writes to /sys/.../cpuX/online fail if we determine the platform doesn't support hotplug for that CPU. Furthermore, if the cpu_die op isn't specified the system hangs when we try to offline a CPU and it comes right back

Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-13 Thread Russell King - ARM Linux
On Fri, Feb 13, 2015 at 03:20:04PM -0500, Simon Horman wrote: -static int r8a7779_cpu_disable(unsigned int cpu) -{ - /* only CPU1-3 have power domains, do not allow hotplug of CPU0 */ - return cpu == 0 ? -EPERM : 0; -} ... Its not clear to me why r8a7779_cpu_disable() has been

Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-13 Thread Simon Horman
On Fri, Feb 13, 2015 at 10:57:04PM +, Russell King - ARM Linux wrote: On Fri, Feb 13, 2015 at 03:20:04PM -0500, Simon Horman wrote: -static int r8a7779_cpu_disable(unsigned int cpu) -{ - /* only CPU1-3 have power domains, do not allow hotplug of CPU0 */ - return cpu == 0 ? -EPERM

Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-13 Thread Russell King - ARM Linux
On Fri, Feb 13, 2015 at 09:44:50PM +, Magnus Damm wrote: Also, based on the comment in mcpm_cpu_can_disable() it looks like the PSCI hook may be executed once only with your change in place? Hopefully PSCI is OK not being invoked for every CPU shutdown. This is why I've said (in the parent

Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-13 Thread Stephen Boyd
On 02/13/15 12:54, Magnus Damm wrote: Hi Stephen, On Fri, Feb 13, 2015 at 8:23 PM, Stephen Boyd sb...@codeaurora.org wrote: On 02/13/15 12:20, Simon Horman wrote: Hi Stephen, On Fri, Feb 13, 2015 at 10:06:39AM -0800, Stephen Boyd wrote: diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c

Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-13 Thread Magnus Damm
Hi Stephen, On Fri, Feb 13, 2015 at 8:23 PM, Stephen Boyd sb...@codeaurora.org wrote: On 02/13/15 12:20, Simon Horman wrote: Hi Stephen, On Fri, Feb 13, 2015 at 10:06:39AM -0800, Stephen Boyd wrote: diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c

Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-13 Thread Magnus Damm
Hi Stephen, On Fri, Feb 13, 2015 at 8:59 PM, Stephen Boyd sb...@codeaurora.org wrote: On 02/13/15 12:54, Magnus Damm wrote: Hi Stephen, On Fri, Feb 13, 2015 at 8:23 PM, Stephen Boyd sb...@codeaurora.org wrote: On 02/13/15 12:20, Simon Horman wrote: Hi Stephen, On Fri, Feb 13, 2015 at

Re: [PATCH v2] ARM: smp: Only expose /sys/.../cpuX/online if hotpluggable

2015-02-13 Thread Stephen Boyd
On 02/13/15 15:01, Russell King - ARM Linux wrote: On Fri, Feb 13, 2015 at 09:44:50PM +, Magnus Damm wrote: Also, based on the comment in mcpm_cpu_can_disable() it looks like the PSCI hook may be executed once only with your change in place? Hopefully PSCI is OK not being invoked for every