summaryrefslogtreecommitdiff
path: root/arch/riscv/kernel/cpu-hotplug.c
diff options
context:
space:
mode:
authorSamuel Holland <samuel.holland@sifive.com>2023-11-21 15:47:25 -0800
committerPalmer Dabbelt <palmer@rivosinc.com>2024-01-04 15:03:06 -0800
commit79093f3ec39c90edf4bd1a532d922ee6163441ec (patch)
treef315ff1e67240925d7a6abed0ce717103f9f7ba9 /arch/riscv/kernel/cpu-hotplug.c
parenta4166aec11309d24e650e74cf8191a6d25a97fcf (diff)
riscv: Remove unused members from struct cpu_operations
name is not used anywhere at all. cpu_prepare and cpu_disable do nothing and always return 0 if implemented. Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20231121234736.3489608-3-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/kernel/cpu-hotplug.c')
-rw-r--r--arch/riscv/kernel/cpu-hotplug.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/arch/riscv/kernel/cpu-hotplug.c b/arch/riscv/kernel/cpu-hotplug.c
index 457a18efcb11..934eb64da0d0 100644
--- a/arch/riscv/kernel/cpu-hotplug.c
+++ b/arch/riscv/kernel/cpu-hotplug.c
@@ -29,25 +29,18 @@ bool cpu_has_hotplug(unsigned int cpu)
*/
int __cpu_disable(void)
{
- int ret = 0;
unsigned int cpu = smp_processor_id();
if (!cpu_ops[cpu] || !cpu_ops[cpu]->cpu_stop)
return -EOPNOTSUPP;
- if (cpu_ops[cpu]->cpu_disable)
- ret = cpu_ops[cpu]->cpu_disable(cpu);
-
- if (ret)
- return ret;
-
remove_cpu_topology(cpu);
numa_remove_cpu(cpu);
set_cpu_online(cpu, false);
riscv_ipi_disable();
irq_migrate_all_off_this_cpu();
- return ret;
+ return 0;
}
#ifdef CONFIG_HOTPLUG_CPU