Skip to content

Commit 9a8f320

Browse files
arndbolofj
authored andcommitted
ARM: milbeaut: fix build with !CONFIG_HOTPLUG_CPU
When HOTPLUG_CPU is disabled, some fields in the smp operations are not available or needed: arch/arm/mach-milbeaut/platsmp.c:90:3: error: field designator 'cpu_die' does not refer to any field in type 'struct smp_operations' .cpu_die = m10v_cpu_die, ^ arch/arm/mach-milbeaut/platsmp.c:91:3: error: field designator 'cpu_kill' does not refer to any field in type 'struct smp_operations' .cpu_kill = m10v_cpu_kill, ^ Hide them in an #ifdef like the other platforms do. Fixes: 9fb29c7 ("ARM: milbeaut: Add basic support for Milbeaut m10v SoC") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Olof Johansson <[email protected]>
1 parent 2125801 commit 9a8f320

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/arm/mach-milbeaut/platsmp.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ static void m10v_smp_init(unsigned int max_cpus)
6565
writel(KERNEL_UNBOOT_FLAG, m10v_smp_base + cpu * 4);
6666
}
6767

68+
#ifdef CONFIG_HOTPLUG_CPU
6869
static void m10v_cpu_die(unsigned int l_cpu)
6970
{
7071
gic_cpu_if_down(0);
@@ -83,12 +84,15 @@ static int m10v_cpu_kill(unsigned int l_cpu)
8384

8485
return 1;
8586
}
87+
#endif
8688

8789
static struct smp_operations m10v_smp_ops __initdata = {
8890
.smp_prepare_cpus = m10v_smp_init,
8991
.smp_boot_secondary = m10v_boot_secondary,
92+
#ifdef CONFIG_HOTPLUG_CPU
9093
.cpu_die = m10v_cpu_die,
9194
.cpu_kill = m10v_cpu_kill,
95+
#endif
9296
};
9397
CPU_METHOD_OF_DECLARE(m10v_smp, "socionext,milbeaut-m10v-smp", &m10v_smp_ops);
9498

0 commit comments

Comments
 (0)