[PATCH] powerpc: Remove unnecessary CONFIG_SMP #ifdefs

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE3805d

2 messages, 2 authors, 2016-05-04 · open the first message on its own page

[PATCH] powerpc: Remove unnecessary CONFIG_SMP #ifdefs

From: Chris Smart <hidden>
Date: 2016-05-02 06:01:10

The code in machine_restart/power_off/halt() includes #ifdefs around
calls to smp_send_stop(), however these are not required as
include/linux/smp.h includes an empty version of this function for
CONFIG_SMP=n builds.

Signed-off-by: Chris Smart <redacted>
---
arch/powerpc/kernel/setup-common.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 44c8d03558ac..8ca79b7503d8 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -128,9 +128,7 @@ void machine_restart(char *cmd)
	machine_shutdown();
	if (ppc_md.restart)
		ppc_md.restart(cmd);
-#ifdef CONFIG_SMP
	smp_send_stop();
-#endif
	printk(KERN_EMERG "System Halted, OK to turn off power\n");
	local_irq_disable();
	while (1) ;
@@ -141,9 +139,7 @@ void machine_power_off(void)
	machine_shutdown();
	if (pm_power_off)
		pm_power_off();
-#ifdef CONFIG_SMP
	smp_send_stop();
-#endif
	printk(KERN_EMERG "System Halted, OK to turn off power\n");
	local_irq_disable();
	while (1) ;
@@ -159,9 +155,7 @@ void machine_halt(void)
	machine_shutdown();
	if (ppc_md.halt)
		ppc_md.halt();
-#ifdef CONFIG_SMP
	smp_send_stop();
-#endif
	printk(KERN_EMERG "System Halted, OK to turn off power\n");
	local_irq_disable();
	while (1) ;
-- 
2.5.5

Re: powerpc: Remove unnecessary CONFIG_SMP #ifdefs

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2016-05-04 22:40:28

On Mon, 2016-02-05 at 06:00:58 UTC, Chris Smart wrote:
The code in machine_restart/power_off/halt() includes #ifdefs around
calls to smp_send_stop(), however these are not required as
include/linux/smp.h includes an empty version of this function for
CONFIG_SMP=n builds.

Signed-off-by: Chris Smart <redacted>
Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/44bd82e613778f5de3fad11ed7

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help