Skip to contentSkip to conversation

linux-next: build failure after merge of the tip tree

PATCH Stephen Rothwell 4 participants 5 messages Mar 26, 2020 – Apr 3, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the tip tree, today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/power/reset/sc27xx-poweroff.c: In function 'sc27xx_poweroff_shutdown':
drivers/power/reset/sc27xx-poweroff.c:38:4: error: implicit declaration of function 'cpu_down' [-Werror=implicit-function-declaration]

   38 |    cpu_down(cpu);
      |    ^~~~~~~~

Caused by commit

33c3736ec888 ("cpu/hotplug: Hide cpu_up/down()")

interacting with commit

274afbc3ad33 ("power: reset: sc27xx: Change to use cpu_down()")

from the battery tree.

I have added the following merge fix patch:

From: Stephen Rothwell <[email protected]>
Date: Thu, 26 Mar 2020 13:42:00 +1100
Subject: [PATCH] power: reset: sc27xx: use remove_cpu instead of cpu_down

---
 drivers/power/reset/sc27xx-poweroff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/reset/sc27xx-poweroff.c +1 -1
index 69863074daf6..90287c31992c 100644
@@ -35,7 +35,7 @@ static void sc27xx_poweroff_shutdown(void)
 
 	for_each_online_cpu(cpu) {
 		if (cpu != smp_processor_id())
-			cpu_down(cpu);
+			remove_cpu(cpu);
 	}
 #endif
 }
Signature · 5 lines
2.25.0

-- 
Cheers,
Stephen Rothwell
#1 lore raw

Hi Stephen

Quoted 14 lines · Stephen Rothwell

Hi all,

After merging the tip tree, today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/power/reset/sc27xx-poweroff.c: In function 'sc27xx_poweroff_shutdown':
drivers/power/reset/sc27xx-poweroff.c:38:4: error: implicit declaration of function 'cpu_down' [-Werror=implicit-function-declaration]

   38 |    cpu_down(cpu);
      |    ^~~~~~~~

Caused by commit

33c3736ec888 ("cpu/hotplug: Hide cpu_up/down()")

Quoted 7 lines

interacting with commit

274afbc3ad33 ("power: reset: sc27xx: Change to use cpu_down()")

from the battery tree.

I have added the following merge fix patch:

Your merge fix looks correct.

Though the original code is missing error handling if offlining the cpu failed for one reason or another.

I don't know the details, but something feels off about the driver having to bring cpus down.

Thanks

--
Qais Yousef

Quoted 29 lines

From: Stephen Rothwell <[email protected]>
Date: Thu, 26 Mar 2020 13:42:00 +1100
Subject: [PATCH] power: reset: sc27xx: use remove_cpu instead of cpu_down

---
 drivers/power/reset/sc27xx-poweroff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/reset/sc27xx-poweroff.c +1 -1
index 69863074daf6..90287c31992c 100644
@@ -35,7 +35,7 @@ static void sc27xx_poweroff_shutdown(void)
 
 	for_each_online_cpu(cpu) {
 		if (cpu != smp_processor_id())
-			cpu_down(cpu);
+			remove_cpu(cpu);
 	}
 #endif
 }
Signature · 5 lines
2.25.0

-- 
Cheers,
Stephen Rothwell
#2 lore raw
In reply to Stephen Rothwell

Hi all,

Quoted 47 lines · On Thu, 26 Mar 2020 13:52:58 +1100 Stephen Rothwell <[email protected]>…

Hi all,

After merging the tip tree, today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/power/reset/sc27xx-poweroff.c: In function 'sc27xx_poweroff_shutdown':
drivers/power/reset/sc27xx-poweroff.c:38:4: error: implicit declaration of function 'cpu_down' [-Werror=implicit-function-declaration]

   38 |    cpu_down(cpu);
      |    ^~~~~~~~

Caused by commit

33c3736ec888 ("cpu/hotplug: Hide cpu_up/down()")

interacting with commit

274afbc3ad33 ("power: reset: sc27xx: Change to use cpu_down()")

from the battery tree.

I have added the following merge fix patch:

From: Stephen Rothwell <[email protected]>
Date: Thu, 26 Mar 2020 13:42:00 +1100
Subject: [PATCH] power: reset: sc27xx: use remove_cpu instead of cpu_down

---
 drivers/power/reset/sc27xx-poweroff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/reset/sc27xx-poweroff.c +1 -1
index 69863074daf6..90287c31992c 100644
@@ -35,7 +35,7 @@ static void sc27xx_poweroff_shutdown(void)
 
 	for_each_online_cpu(cpu) {
 		if (cpu != smp_processor_id())
-			cpu_down(cpu);
+			remove_cpu(cpu);
 	}
 #endif
 }
Signature · 1 line
2.25.0

This fixup is now needed when the battery tree is merged into Linus' tree.

Signature · 2 lines
Cheers,
Stephen Rothwell
maintainer
#3 lore raw
Quoted 42 lines · Stephen Rothwell

Hi all,

Quoted 38 lines · On Thu, 26 Mar 2020 13:52:58 +1100 Stephen Rothwell <[email protected]>…

Hi all,

After merging the tip tree, today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/power/reset/sc27xx-poweroff.c: In function 'sc27xx_poweroff_shutdown':
drivers/power/reset/sc27xx-poweroff.c:38:4: error: implicit declaration of function 'cpu_down' [-Werror=implicit-function-declaration]

   38 |    cpu_down(cpu);
      |    ^~~~~~~~

Caused by commit

33c3736ec888 ("cpu/hotplug: Hide cpu_up/down()")

interacting with commit

274afbc3ad33 ("power: reset: sc27xx: Change to use cpu_down()")

from the battery tree.

I have added the following merge fix patch:

From: Stephen Rothwell <[email protected]>
Date: Thu, 26 Mar 2020 13:42:00 +1100
Subject: [PATCH] power: reset: sc27xx: use remove_cpu instead of cpu_down

---
 drivers/power/reset/sc27xx-poweroff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/reset/sc27xx-poweroff.c +0 -0
index 69863074daf6..90287c31992c 100644
@@ -35,7 +35,7 @@ static void sc27xx_poweroff_shutdown(void)
 
Quoted 11 lines
Quoted 9 lines
drivers/power/reset/sc27xx-poweroff.c +1 -2
      for_each_online_cpu(cpu) {
              if (cpu != smp_processor_id())
-                     cpu_down(cpu);
+                     remove_cpu(cpu);
      }
 #endif
 }
--

2.25.0

This fixup is now needed when the battery tree is merged into Linus' tree.

Thanks Stephen.

Sebastian, could you pick up this patch to avoid the compiling issue? Thanks.

Signature · 1 line
Baolin Wang
#4 lore raw

Hi,

Quoted 40 lines · Baolin Wang
Quoted 39 lines · Stephen Rothwell
Quoted 38 lines · On Thu, 26 Mar 2020 13:52:58 +1100 Stephen Rothwell <[email protected]>…

Hi all,

After merging the tip tree, today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/power/reset/sc27xx-poweroff.c: In function 'sc27xx_poweroff_shutdown':
drivers/power/reset/sc27xx-poweroff.c:38:4: error: implicit declaration of function 'cpu_down' [-Werror=implicit-function-declaration]

   38 |    cpu_down(cpu);
      |    ^~~~~~~~

Caused by commit

33c3736ec888 ("cpu/hotplug: Hide cpu_up/down()")

interacting with commit

274afbc3ad33 ("power: reset: sc27xx: Change to use cpu_down()")

from the battery tree.

I have added the following merge fix patch:

From: Stephen Rothwell <[email protected]>
Date: Thu, 26 Mar 2020 13:42:00 +1100
Subject: [PATCH] power: reset: sc27xx: use remove_cpu instead of cpu_down

---
 drivers/power/reset/sc27xx-poweroff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/reset/sc27xx-poweroff.c +0 -0
index 69863074daf6..90287c31992c 100644
@@ -35,7 +35,7 @@ static void sc27xx_poweroff_shutdown(void)
 
Quoted 11 lines
Quoted 11 lines
Quoted 9 lines
drivers/power/reset/sc27xx-poweroff.c +1 -2
      for_each_online_cpu(cpu) {
              if (cpu != smp_processor_id())
-                     cpu_down(cpu);
+                     remove_cpu(cpu);
      }
 #endif
 }
--

2.25.0

This fixup is now needed when the battery tree is merged into Linus' tree.

Thanks for the reminder.

Quoted 3 lines

Thanks Stephen.

Sebastian, could you pick up this patch to avoid the compiling issue? Thanks.

I will point Linus to this patch when I send my pull request.

-- Sebastian