Skip to contentSkip to conversation

Revert "kernel/stop_machine.c: remove CONFIG_SMP dependencies"

PATCH In review Sudip Mukherjee 4 participants 6 messages Dec 18, 2015 – Dec 22, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "kernel/stop_machine.c: remove CONFIG_SMP dependencies"

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 <[email protected]>
Cc Ingo Molnar <[email protected]>

---

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(-)
kernel/stop_machine.c +2 -2
index b07adef..edb6de4 100644
@@ -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 */
Signature · 1 line
1.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 14 lines · Sudip Mukherjee

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 <[email protected]>
Cc Ingo Molnar <[email protected]>

---

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

Quoted 8 lines

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(-)
Signature · 2 lines
Chris Metcalf, EZChip Semiconductor
http://www.ezchip.com
#2 lore raw
In reply to Sudip Mukherjee
Quoted 5 lines · On Fri, 18 Dec 2015 15:35:55 +0530 Sudip Mukherjee…

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:

kernel/stop_machine.c renamed from kernel/stop_machine.c~kernel-stop_machinec-remove-config_smp-dependencies-fix +0 -4
@@ -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.

#3 lore raw
Quoted 30 lines · Andrew Morton
Quoted 5 lines · On Fri, 18 Dec 2015 15:35:55 +0530 Sudip Mukherjee…

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:

kernel/stop_machine.c renamed from kernel/stop_machine.c~kernel-stop_machinec-remove-config_smp-dependencies-fix +0 -4
@@ -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 */

_

Quoted 7 lines

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

#4 lore raw
Quoted 6 lines · On Tue, 22 Dec 2015 11:30:51 +0530 Sudip Mukherjee…
Quoted 6 lines

Rationale:

stop_machine.o is only built when CONFIG_SMP=y so

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

Quoted 7 lines
Quoted 1 line

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 <[email protected]>
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 <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Valentin Rothberg <[email protected]>

---

 kernel/stop_machine.c |    4 ----
 1 file changed, 4 deletions(-)
kernel/stop_machine.c renamed from kernel/stop_machine.c~kernel-stop_machinec-remove-config_smp-dependencies-fix +0 -4
diff -puN kernel/stop_machine.c~kernel-stop_machinec-remove-config_smp-dependencies-fix 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 */

_

#5 lore raw

Hi Andrew,

Quoted 11 lines · On Mon, 21 Dec 2015 22:59:45 -0800 Andrew Morton <[email protected]>…
Quoted 8 lines · On Tue, 22 Dec 2015 11:30:51 +0530 Sudip Mukherjee…
Quoted 7 lines

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.

Quoted 7 lines
Quoted 5 lines

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.

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]