Skip to contentSkip to conversation

ARM: psci: fix building without HOTPLUG_CPU

PATCH New Arnd Bergmann 2 participants 2 messages Jun 3, 2013 – Jun 4, 2013 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: psci: fix building without HOTPLUG_CPU

The cpu_die field in smp_operations is not valid with CONFIG_HOTPLUG_CPU, so we must enclose it in #ifdef, but at least that lets us remove two other lines.

Cc Stefano Stabellini <[email protected]>
Cc Will Deacon <[email protected]>
Cc Russell King <[email protected]>

---
KernelVersion: devel-stable

arch/arm/kernel/psci_smp.c +2 -2
index 23a1142..219f1d7 100644
@@ -68,8 +68,6 @@ void __ref psci_cpu_die(unsigned int cpu)
        /* We should never return */
        panic("psci: cpu %d failed to shutdown\n", cpu);
 }
-#else
-#define psci_cpu_die NULL
 #endif
 
 bool __init psci_smp_available(void)
@@ -80,5 +78,7 @@ bool __init psci_smp_available(void)
 
 struct smp_operations __initdata psci_smp_ops = {
 	.smp_boot_secondary	= psci_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
 	.cpu_die		= psci_cpu_die,
+#endif
 };
#1 lore raw

PATCH 1/1 ARM: psci: fix building without HOTPLUG_CPU

Quoted 8 lines · Arnd Bergmann

The cpu_die field in smp_operations is not valid with CONFIG_HOTPLUG_CPU, so we must enclose it in #ifdef, but at least that lets us remove two other lines.

Cc Stefano Stabellini <[email protected]>
Cc Will Deacon <[email protected]>
Cc Russell King <[email protected]>
Quoted 24 lines

KernelVersion: devel-stable

arch/arm/kernel/psci_smp.c +2 -2
index 23a1142..219f1d7 100644
@@ -68,8 +68,6 @@ void __ref psci_cpu_die(unsigned int cpu)
        /* We should never return */
        panic("psci: cpu %d failed to shutdown\n", cpu);
 }
-#else
-#define psci_cpu_die NULL
 #endif
 
 bool __init psci_smp_available(void)
@@ -80,5 +78,7 @@ bool __init psci_smp_available(void)
 
 struct smp_operations __initdata psci_smp_ops = {
 	.smp_boot_secondary	= psci_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
 	.cpu_die		= psci_cpu_die,
+#endif
 };