ARM: shmobile: Remove redundant cpu_disable implementation
PATCH 1/1 ARM: shmobile: Remove redundant cpu_disable implementation
By default only the non-boot CPUs can be hotplugged if the smp_operations structure doesn't have the cpu_disable function pointer set. r8a7779_cpu_disable() implements the same logic, only non-boot CPUs can be hotplugged, so it's redundant to override the default behavior.
--- arch/arm/mach-shmobile/smp-r8a7779.c | 7 ------- 1 file changed, 7 deletions(-)
arch/arm/mach-shmobile/smp-r8a7779.c +0 -7
@@ -124,19 +124,12 @@ static int r8a7779_cpu_kill(unsigned int cpu)return 0 ; } - -static int r8a7779_cpu_disable (unsigned int cpu) -{ -/* only CPU1->3 have power domains, do not allow hotplug of CPU0 */ -return cpu ==0 ? -EPERM :0 ; -}#endif /* CONFIG_HOTPLUG_CPU */ struct smp_operations r8a7779_smp_ops__initdata = { .smp_prepare_cpus = r8a7779_smp_prepare_cpus, .smp_boot_secondary = r8a7779_boot_secondary, #ifdef CONFIG_HOTPLUG_CPU - .cpu_disable = r8a7779_cpu_disable, .cpu_die = shmobile_smp_scu_cpu_die, .cpu_kill = r8a7779_cpu_kill, #endif
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Hi Stephen,
Quoted 10 lines · Stephen Boyd
By default only the non-boot CPUs can be hotplugged if the
smp_operationsstructure doesn't have thecpu_disablefunction pointer set.r8a7779_cpu_disable()implements the same logic, only non-boot CPUs can be hotplugged, so it's redundant to override the default behavior.Signed-off-by Stephen Boyd <[email protected]>--- arch/arm/mach-shmobile/smp-r8a7779.c | 7 ------- 1 file changed, 7 deletions(-)
Thanks for breaking out this change. It looks good to me!
Cheers,
/ magnus
Quoted 9 lines · Magnus Damm
Hi Stephen,
Quoted 6 lines · Stephen Boyd
By default only the non-boot CPUs can be hotplugged if the
smp_operationsstructure doesn't have thecpu_disablefunction pointer set.r8a7779_cpu_disable()implements the same logic, only non-boot CPUs can be hotplugged, so it's redundant to override the default behavior.
Quoted 8 lines
Quoted 4 lines
Signed-off-by Stephen Boyd <[email protected]>--- arch/arm/mach-shmobile/smp-r8a7779.c | 7 ------- 1 file changed, 7 deletions(-)Thanks for breaking out this change. It looks good to me!
Acked-by Magnus Damm <[email protected]>
Thanks,
I have queued this up with the following slightly updated subject
'ARM: shmobile: r8a7779: Remove redundant cpu_disable implementation'