* [PATCH] ARM: milbeaut: fix build with !CONFIG_HOTPLUG_CPU
@ 2019-03-13 21:19 ` Arnd Bergmann
0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2019-03-13 21:19 UTC (permalink / raw)
To: arm, Sugaya Taichi; +Cc: Arnd Bergmann, linux-arm-kernel, linux-kernel
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: 9fb29c734f9e ("ARM: milbeaut: Add basic support for Milbeaut m10v SoC")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/mach-milbeaut/platsmp.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/mach-milbeaut/platsmp.c b/arch/arm/mach-milbeaut/platsmp.c
index 591543c81399..3ea880f5fcb7 100644
--- a/arch/arm/mach-milbeaut/platsmp.c
+++ b/arch/arm/mach-milbeaut/platsmp.c
@@ -65,6 +65,7 @@ static void m10v_smp_init(unsigned int max_cpus)
writel(KERNEL_UNBOOT_FLAG, m10v_smp_base + cpu * 4);
}
+#ifdef CONFIG_HOTPLUG_CPU
static void m10v_cpu_die(unsigned int l_cpu)
{
gic_cpu_if_down(0);
@@ -83,12 +84,15 @@ static int m10v_cpu_kill(unsigned int l_cpu)
return 1;
}
+#endif
static struct smp_operations m10v_smp_ops __initdata = {
.smp_prepare_cpus = m10v_smp_init,
.smp_boot_secondary = m10v_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
.cpu_die = m10v_cpu_die,
.cpu_kill = m10v_cpu_kill,
+#endif
};
CPU_METHOD_OF_DECLARE(m10v_smp, "socionext,milbeaut-m10v-smp", &m10v_smp_ops);
--
2.20.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] ARM: milbeaut: fix build with !CONFIG_HOTPLUG_CPU
@ 2019-03-13 21:19 ` Arnd Bergmann
0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2019-03-13 21:19 UTC (permalink / raw)
To: arm, Sugaya Taichi; +Cc: linux-arm-kernel, Arnd Bergmann, linux-kernel
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: 9fb29c734f9e ("ARM: milbeaut: Add basic support for Milbeaut m10v SoC")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/mach-milbeaut/platsmp.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/mach-milbeaut/platsmp.c b/arch/arm/mach-milbeaut/platsmp.c
index 591543c81399..3ea880f5fcb7 100644
--- a/arch/arm/mach-milbeaut/platsmp.c
+++ b/arch/arm/mach-milbeaut/platsmp.c
@@ -65,6 +65,7 @@ static void m10v_smp_init(unsigned int max_cpus)
writel(KERNEL_UNBOOT_FLAG, m10v_smp_base + cpu * 4);
}
+#ifdef CONFIG_HOTPLUG_CPU
static void m10v_cpu_die(unsigned int l_cpu)
{
gic_cpu_if_down(0);
@@ -83,12 +84,15 @@ static int m10v_cpu_kill(unsigned int l_cpu)
return 1;
}
+#endif
static struct smp_operations m10v_smp_ops __initdata = {
.smp_prepare_cpus = m10v_smp_init,
.smp_boot_secondary = m10v_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
.cpu_die = m10v_cpu_die,
.cpu_kill = m10v_cpu_kill,
+#endif
};
CPU_METHOD_OF_DECLARE(m10v_smp, "socionext,milbeaut-m10v-smp", &m10v_smp_ops);
--
2.20.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: milbeaut: fix build with !CONFIG_HOTPLUG_CPU
2019-03-13 21:19 ` Arnd Bergmann
@ 2019-04-07 22:30 ` Olof Johansson
-1 siblings, 0 replies; 4+ messages in thread
From: Olof Johansson @ 2019-04-07 22:30 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: arm, Sugaya Taichi, linux-arm-kernel, linux-kernel
On Wed, Mar 13, 2019 at 10:19:16PM +0100, Arnd Bergmann wrote:
> 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: 9fb29c734f9e ("ARM: milbeaut: Add basic support for Milbeaut m10v SoC")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied to fixes.
-Olof
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: milbeaut: fix build with !CONFIG_HOTPLUG_CPU
@ 2019-04-07 22:30 ` Olof Johansson
0 siblings, 0 replies; 4+ messages in thread
From: Olof Johansson @ 2019-04-07 22:30 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Sugaya Taichi, arm, linux-kernel, linux-arm-kernel
On Wed, Mar 13, 2019 at 10:19:16PM +0100, Arnd Bergmann wrote:
> 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: 9fb29c734f9e ("ARM: milbeaut: Add basic support for Milbeaut m10v SoC")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied to fixes.
-Olof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-04-07 22:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-13 21:19 [PATCH] ARM: milbeaut: fix build with !CONFIG_HOTPLUG_CPU Arnd Bergmann
2019-03-13 21:19 ` Arnd Bergmann
2019-04-07 22:30 ` Olof Johansson
2019-04-07 22:30 ` Olof Johansson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.