linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [patch 06/18] powerpc: Adjust system_state check
       [not found] <20170514182716.347236777@linutronix.de>
@ 2017-05-14 18:27 ` Thomas Gleixner
  2017-05-15  9:19   ` Michael Ellerman
  2017-05-14 18:27 ` [patch 09/18] cpufreq/pasemi: " Thomas Gleixner
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Gleixner @ 2017-05-14 18:27 UTC (permalink / raw)
  To: LKML
  Cc: Peter Zijlstra, Ingo Molnar, Steven Rostedt, Mark Rutland,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	linuxppc-dev

To enable smp_processor_id() and might_sleep() debug checks earlier, it's
required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING.

Adjust the system_state check in smp_generic_cpu_bootable() to handle the
extra states.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
---
 arch/powerpc/kernel/smp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -97,7 +97,7 @@ int smp_generic_cpu_bootable(unsigned in
 	/* Special case - we inhibit secondary thread startup
 	 * during boot if the user requests it.
 	 */
-	if (system_state == SYSTEM_BOOTING && cpu_has_feature(CPU_FTR_SMT)) {
+	if (system_state < SYSTEM_RUNNING && cpu_has_feature(CPU_FTR_SMT)) {
 		if (!smt_enabled_at_boot && cpu_thread_in_core(nr) != 0)
 			return 0;
 		if (smt_enabled_at_boot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [patch 09/18] cpufreq/pasemi: Adjust system_state check
       [not found] <20170514182716.347236777@linutronix.de>
  2017-05-14 18:27 ` [patch 06/18] powerpc: Adjust system_state check Thomas Gleixner
@ 2017-05-14 18:27 ` Thomas Gleixner
  2017-05-15  5:24   ` Viresh Kumar
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Gleixner @ 2017-05-14 18:27 UTC (permalink / raw)
  To: LKML
  Cc: Peter Zijlstra, Ingo Molnar, Steven Rostedt, Mark Rutland,
	Rafael J. Wysocki, Viresh Kumar, linuxppc-dev

To enable smp_processor_id() and might_sleep() debug checks earlier, it's
required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING.

Adjust the system_state check in pas_cpufreq_cpu_exit() to handle the extra
states.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linuxppc-dev@lists.ozlabs.org
---
 drivers/cpufreq/pasemi-cpufreq.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/cpufreq/pasemi-cpufreq.c
+++ b/drivers/cpufreq/pasemi-cpufreq.c
@@ -226,7 +226,7 @@ static int pas_cpufreq_cpu_exit(struct c
 	 * We don't support CPU hotplug. Don't unmap after the system
 	 * has already made it to a running state.
 	 */
-	if (system_state != SYSTEM_BOOTING)
+	if (system_state >= SYSTEM_RUNNING)
 		return 0;
 
 	if (sdcasr_mapbase)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch 09/18] cpufreq/pasemi: Adjust system_state check
  2017-05-14 18:27 ` [patch 09/18] cpufreq/pasemi: " Thomas Gleixner
@ 2017-05-15  5:24   ` Viresh Kumar
  2017-05-15 14:34     ` Steven Rostedt
  0 siblings, 1 reply; 5+ messages in thread
From: Viresh Kumar @ 2017-05-15  5:24 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Peter Zijlstra, Ingo Molnar, Steven Rostedt, Mark Rutland,
	Rafael J. Wysocki, linuxppc-dev

On 14-05-17, 20:27, Thomas Gleixner wrote:
> To enable smp_processor_id() and might_sleep() debug checks earlier, it's
> required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING.
> 
> Adjust the system_state check in pas_cpufreq_cpu_exit() to handle the extra
> states.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: linuxppc-dev@lists.ozlabs.org
> ---
>  drivers/cpufreq/pasemi-cpufreq.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/drivers/cpufreq/pasemi-cpufreq.c
> +++ b/drivers/cpufreq/pasemi-cpufreq.c
> @@ -226,7 +226,7 @@ static int pas_cpufreq_cpu_exit(struct c
>  	 * We don't support CPU hotplug. Don't unmap after the system
>  	 * has already made it to a running state.
>  	 */
> -	if (system_state != SYSTEM_BOOTING)
> +	if (system_state >= SYSTEM_RUNNING)
>  		return 0;
>  
>  	if (sdcasr_mapbase)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch 06/18] powerpc: Adjust system_state check
  2017-05-14 18:27 ` [patch 06/18] powerpc: Adjust system_state check Thomas Gleixner
@ 2017-05-15  9:19   ` Michael Ellerman
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2017-05-15  9:19 UTC (permalink / raw)
  To: Thomas Gleixner, LKML
  Cc: Peter Zijlstra, Ingo Molnar, Steven Rostedt, Mark Rutland,
	Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev

Thomas Gleixner <tglx@linutronix.de> writes:

> To enable smp_processor_id() and might_sleep() debug checks earlier, it's
> required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING.
>
> Adjust the system_state check in smp_generic_cpu_bootable() to handle the
> extra states.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: linuxppc-dev@lists.ozlabs.org
> ---
>  arch/powerpc/kernel/smp.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Michael Ellerman <mpe@ellerman.id.au>

cheers

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch 09/18] cpufreq/pasemi: Adjust system_state check
  2017-05-15  5:24   ` Viresh Kumar
@ 2017-05-15 14:34     ` Steven Rostedt
  0 siblings, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2017-05-15 14:34 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Thomas Gleixner, LKML, Peter Zijlstra, Ingo Molnar, Mark Rutland,
	Rafael J. Wysocki, linuxppc-dev, Olof Johansson

On Mon, 15 May 2017 10:54:03 +0530
Viresh Kumar <viresh.kumar@linaro.org> wrote:

> On 14-05-17, 20:27, Thomas Gleixner wrote:
> > To enable smp_processor_id() and might_sleep() debug checks earlier, it's
> > required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING.
> > 
> > Adjust the system_state check in pas_cpufreq_cpu_exit() to handle the extra
> > states.
> > 
> > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> > Cc: Viresh Kumar <viresh.kumar@linaro.org>
> > Cc: linuxppc-dev@lists.ozlabs.org
> > ---
> >  drivers/cpufreq/pasemi-cpufreq.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > --- a/drivers/cpufreq/pasemi-cpufreq.c
> > +++ b/drivers/cpufreq/pasemi-cpufreq.c
> > @@ -226,7 +226,7 @@ static int pas_cpufreq_cpu_exit(struct c
> >  	 * We don't support CPU hotplug. Don't unmap after the system
> >  	 * has already made it to a running state.
> >  	 */
> > -	if (system_state != SYSTEM_BOOTING)
> > +	if (system_state >= SYSTEM_RUNNING)
> >  		return 0;
> >  
> >  	if (sdcasr_mapbase)  
> 
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> 

This reminds me. My pasemi died. I was trying to see if anyone had an
extra one they could send me ;-)

-- Steve

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-05-15 14:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20170514182716.347236777@linutronix.de>
2017-05-14 18:27 ` [patch 06/18] powerpc: Adjust system_state check Thomas Gleixner
2017-05-15  9:19   ` Michael Ellerman
2017-05-14 18:27 ` [patch 09/18] cpufreq/pasemi: " Thomas Gleixner
2017-05-15  5:24   ` Viresh Kumar
2017-05-15 14:34     ` Steven Rostedt

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).