All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Revert "kernel/stop_machine.c: remove CONFIG_SMP dependencies"
@ 2015-12-18 10:05 Sudip Mukherjee
  2015-12-18 14:59 ` Chris Metcalf
  2015-12-18 23:07 ` Andrew Morton
  0 siblings, 2 replies; 6+ messages in thread
From: Sudip Mukherjee @ 2015-12-18 10:05 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Sudip Mukherjee, Chris Wilson, Ingo Molnar

This reverts commit 64dab25b058c12f935794cb239089303bda7dbc1.

CONFIG_SMP dependency is needed for some arch like tile, tilegx and
m32r. They use stop_machine() but they donot have HOTPLUG_CPU and as a
result their builds are failing with "undefined symbol 'stop_machine'".

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---

tile build at:
https://travis-ci.org/sudipm-mukherjee/parport/jobs/97618549

tilegx build at:
https://travis-ci.org/sudipm-mukherjee/parport/jobs/97618550

m32r build at:
https://travis-ci.org/sudipm-mukherjee/parport/jobs/97618542

 kernel/stop_machine.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
index b07adef..edb6de4 100644
--- a/kernel/stop_machine.c
+++ b/kernel/stop_machine.c
@@ -529,7 +529,7 @@ static int __init cpu_stop_init(void)
 }
 early_initcall(cpu_stop_init);
 
-#ifdef CONFIG_HOTPLUG_CPU
+#if defined(CONFIG_SMP) || defined(CONFIG_HOTPLUG_CPU)
 
 static int __stop_machine(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus)
 {
@@ -629,4 +629,4 @@ int stop_machine_from_inactive_cpu(cpu_stop_fn_t fn, void *data,
 	return ret ?: done.ret;
 }
 
-#endif	/* CONFIG_HOTPLUG_CPU */
+#endif	/* CONFIG_SMP || CONFIG_HOTPLUG_CPU */
-- 
1.9.1


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

* Re: [PATCH] Revert "kernel/stop_machine.c: remove CONFIG_SMP dependencies"
  2015-12-18 10:05 [PATCH] Revert "kernel/stop_machine.c: remove CONFIG_SMP dependencies" Sudip Mukherjee
@ 2015-12-18 14:59 ` Chris Metcalf
  2015-12-18 23:07 ` Andrew Morton
  1 sibling, 0 replies; 6+ messages in thread
From: Chris Metcalf @ 2015-12-18 14:59 UTC (permalink / raw)
  To: Sudip Mukherjee, Andrew Morton; +Cc: linux-kernel, Chris Wilson, Ingo Molnar

On 12/18/2015 05:05 AM, Sudip Mukherjee wrote:
> This reverts commit 64dab25b058c12f935794cb239089303bda7dbc1.
>
> CONFIG_SMP dependency is needed for some arch like tile, tilegx and
> m32r. They use stop_machine() but they donot have HOTPLUG_CPU and as a
> result their builds are failing with "undefined symbol 'stop_machine'".
>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Ingo Molnar <mingo@kernel.org>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
>
> tile build at:
> https://travis-ci.org/sudipm-mukherjee/parport/jobs/97618549
>
> tilegx build at:
> https://travis-ci.org/sudipm-mukherjee/parport/jobs/97618550
>
> m32r build at:
> https://travis-ci.org/sudipm-mukherjee/parport/jobs/97618542
>
>   kernel/stop_machine.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Chris Metcalf <cmetcalf@ezchip.com> [for tile]

-- 
Chris Metcalf, EZChip Semiconductor
http://www.ezchip.com

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

* Re: [PATCH] Revert "kernel/stop_machine.c: remove CONFIG_SMP dependencies"
  2015-12-18 10:05 [PATCH] Revert "kernel/stop_machine.c: remove CONFIG_SMP dependencies" Sudip Mukherjee
  2015-12-18 14:59 ` Chris Metcalf
@ 2015-12-18 23:07 ` Andrew Morton
  2015-12-22  6:00   ` Sudip Mukherjee
  1 sibling, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2015-12-18 23:07 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: linux-kernel, Chris Wilson, Ingo Molnar, Stephen Rothwell

On Fri, 18 Dec 2015 15:35:55 +0530 Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:

> This reverts commit 64dab25b058c12f935794cb239089303bda7dbc1.
> 
> CONFIG_SMP dependency is needed for some arch like tile, tilegx and
> m32r. They use stop_machine() but they donot have HOTPLUG_CPU and as a
> result their builds are failing with "undefined symbol 'stop_machine'".

Thanks.  I had my &&'s and ||'s mixed up.   I did this:

--- a/kernel/stop_machine.c~kernel-stop_machinec-remove-config_smp-dependencies-fix
+++ a/kernel/stop_machine.c
@@ -531,8 +531,6 @@ static int __init cpu_stop_init(void)
 }
 early_initcall(cpu_stop_init);
 
-#ifdef CONFIG_HOTPLUG_CPU
-
 static int __stop_machine(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus)
 {
 	struct multi_stop_data msdata = {
@@ -630,5 +628,3 @@ int stop_machine_from_inactive_cpu(cpu_s
 	mutex_unlock(&stop_cpus_mutex);
 	return ret ?: done.ret;
 }
-
-#endif	/* CONFIG_HOTPLUG_CPU */
_


Rationale:

stop_machine.o is only built when CONFIG_SMP=y so

#if defined(CONFIG_SMP) || defined(CONFIG_HOTPLUG_CPU)

always evaluates to true, so remove it.



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

* Re: [PATCH] Revert "kernel/stop_machine.c: remove CONFIG_SMP dependencies"
  2015-12-18 23:07 ` Andrew Morton
@ 2015-12-22  6:00   ` Sudip Mukherjee
  2015-12-22  6:59     ` Andrew Morton
  0 siblings, 1 reply; 6+ messages in thread
From: Sudip Mukherjee @ 2015-12-22  6:00 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Chris Wilson, Ingo Molnar, Stephen Rothwell

On Fri, Dec 18, 2015 at 03:07:53PM -0800, Andrew Morton wrote:
> On Fri, 18 Dec 2015 15:35:55 +0530 Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:
> 
> > This reverts commit 64dab25b058c12f935794cb239089303bda7dbc1.
> > 
> > CONFIG_SMP dependency is needed for some arch like tile, tilegx and
> > m32r. They use stop_machine() but they donot have HOTPLUG_CPU and as a
> > result their builds are failing with "undefined symbol 'stop_machine'".
> 
> Thanks.  I had my &&'s and ||'s mixed up.   I did this:
> 
> --- a/kernel/stop_machine.c~kernel-stop_machinec-remove-config_smp-dependencies-fix
> +++ a/kernel/stop_machine.c
> @@ -531,8 +531,6 @@ static int __init cpu_stop_init(void)
>  }
>  early_initcall(cpu_stop_init);
>  
> -#ifdef CONFIG_HOTPLUG_CPU
> -
>  static int __stop_machine(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus)
>  {
>  	struct multi_stop_data msdata = {
> @@ -630,5 +628,3 @@ int stop_machine_from_inactive_cpu(cpu_s
>  	mutex_unlock(&stop_cpus_mutex);
>  	return ret ?: done.ret;
>  }
> -
> -#endif	/* CONFIG_HOTPLUG_CPU */
> _
> 
> 
> Rationale:
> 
> stop_machine.o is only built when CONFIG_SMP=y so
> 
> #if defined(CONFIG_SMP) || defined(CONFIG_HOTPLUG_CPU)
> 
> always evaluates to true, so remove it.

Hi Andrew,
The error is still there. I guess you have been busy. :)

next-20151222 fails with the same error. You can see the m32r defconfig
at https://travis-ci.org/sudipm-mukherjee/parport/jobs/98258267

do you want me to send the patch to you for it?

regards
sudip

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

* Re: [PATCH] Revert "kernel/stop_machine.c: remove CONFIG_SMP dependencies"
  2015-12-22  6:00   ` Sudip Mukherjee
@ 2015-12-22  6:59     ` Andrew Morton
  2015-12-22 20:02       ` Stephen Rothwell
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2015-12-22  6:59 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: linux-kernel, Chris Wilson, Ingo Molnar, Stephen Rothwell

On Tue, 22 Dec 2015 11:30:51 +0530 Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:

> > Rationale:
> > 
> > stop_machine.o is only built when CONFIG_SMP=y so
> > 
> > #if defined(CONFIG_SMP) || defined(CONFIG_HOTPLUG_CPU)
> > 
> > always evaluates to true, so remove it.
> 
> Hi Andrew,
> The error is still there. I guess you have been busy. :)
> 
> next-20151222 fails with the same error. You can see the m32r defconfig
> at https://travis-ci.org/sudipm-mukherjee/parport/jobs/98258267

I forgot to Cc Stephen :(

From: Andrew Morton <akpm@linux-foundation.org>
Subject: kernel-stop_machinec-remove-config_smp-dependencies-fix

stop_machine.o is only built if CONFIG_SMP=y, so this ifdef always
evaluates to true.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Valentin Rothberg <valentinrothberg@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 kernel/stop_machine.c |    4 ----
 1 file changed, 4 deletions(-)

diff -puN kernel/stop_machine.c~kernel-stop_machinec-remove-config_smp-dependencies-fix kernel/stop_machine.c
--- a/kernel/stop_machine.c~kernel-stop_machinec-remove-config_smp-dependencies-fix
+++ a/kernel/stop_machine.c
@@ -531,8 +531,6 @@ static int __init cpu_stop_init(void)
 }
 early_initcall(cpu_stop_init);
 
-#ifdef CONFIG_HOTPLUG_CPU
-
 static int __stop_machine(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus)
 {
 	struct multi_stop_data msdata = {
@@ -630,5 +628,3 @@ int stop_machine_from_inactive_cpu(cpu_s
 	mutex_unlock(&stop_cpus_mutex);
 	return ret ?: done.ret;
 }
-
-#endif	/* CONFIG_HOTPLUG_CPU */
_


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

* Re: [PATCH] Revert "kernel/stop_machine.c: remove CONFIG_SMP dependencies"
  2015-12-22  6:59     ` Andrew Morton
@ 2015-12-22 20:02       ` Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2015-12-22 20:02 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Sudip Mukherjee, linux-kernel, Chris Wilson, Ingo Molnar

Hi Andrew,

On Mon, 21 Dec 2015 22:59:45 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Tue, 22 Dec 2015 11:30:51 +0530 Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:
> 
> > > Rationale:
> > > 
> > > stop_machine.o is only built when CONFIG_SMP=y so
> > > 
> > > #if defined(CONFIG_SMP) || defined(CONFIG_HOTPLUG_CPU)
> > > 
> > > always evaluates to true, so remove it.  
> > 
> > Hi Andrew,
> > The error is still there. I guess you have been busy. :)
> > 
> > next-20151222 fails with the same error. You can see the m32r defconfig
> > at https://travis-ci.org/sudipm-mukherjee/parport/jobs/98258267  
> 
> I forgot to Cc Stephen :(

I wish I had figured this out earlier - last nights build were a blood bath :-(

Anyway, I applied it for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

end of thread, other threads:[~2015-12-22 20:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-18 10:05 [PATCH] Revert "kernel/stop_machine.c: remove CONFIG_SMP dependencies" Sudip Mukherjee
2015-12-18 14:59 ` Chris Metcalf
2015-12-18 23:07 ` Andrew Morton
2015-12-22  6:00   ` Sudip Mukherjee
2015-12-22  6:59     ` Andrew Morton
2015-12-22 20:02       ` Stephen Rothwell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.