Skip to content

Commit

Permalink
riscv: remove cpu_stop()
Browse files Browse the repository at this point in the history
Except arch_cpu_idle_dead(), no users of this function. So remove
cpu_stop() and fold its code into arch_cpu_idle_dead().

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
  • Loading branch information
Jisheng Zhang authored and Palmer Dabbelt committed Jan 9, 2022
1 parent decf89f commit 7f3de1a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 0 additions & 2 deletions arch/riscv/include/asm/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ asmlinkage void smp_callin(void);
#if defined CONFIG_HOTPLUG_CPU
int __cpu_disable(void);
void __cpu_die(unsigned int cpu);
void cpu_stop(void);
#else
#endif /* CONFIG_HOTPLUG_CPU */

#else
Expand Down
8 changes: 1 addition & 7 deletions arch/riscv/kernel/cpu-hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@
#include <asm/cpu_ops.h>
#include <asm/sbi.h>

void cpu_stop(void);
void arch_cpu_idle_dead(void)
{
cpu_stop();
}

bool cpu_has_hotplug(unsigned int cpu)
{
if (cpu_ops[cpu]->cpu_stop)
Expand Down Expand Up @@ -75,7 +69,7 @@ void __cpu_die(unsigned int cpu)
/*
* Called from the idle thread for the CPU which has been shutdown.
*/
void cpu_stop(void)
void arch_cpu_idle_dead(void)
{
idle_task_exit();

Expand Down

0 comments on commit 7f3de1a

Please sign in to comment.