diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2026-06-12 01:25:38 +0200 |
|---|---|---|
| committer | Paul Walmsley <pjw@kernel.org> | 2026-06-25 12:24:25 -0600 |
| commit | 68fb3c026bec6f5dbd8ed5f2e57ef6535ec13341 (patch) | |
| tree | 2b103aac3594dd4e1bc9d0041aa5a4265f2234aa | |
| parent | b8f62414fa05144924257db283c5c35f74d21121 (diff) | |
riscv: smp: use secs_to_jiffies in __cpu_up
Use secs_to_jiffies() to simplify the code. Drop the redundant zero
initialization while at it.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260611232537.467398-3-thorsten.blum@linux.dev
Signed-off-by: Paul Walmsley <pjw@kernel.org>
| -rw-r--r-- | arch/riscv/kernel/smpboot.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c index 8b628580fe11..f6ef57930b50 100644 --- a/arch/riscv/kernel/smpboot.c +++ b/arch/riscv/kernel/smpboot.c @@ -189,13 +189,12 @@ int arch_cpuhp_kick_ap_alive(unsigned int cpu, struct task_struct *tidle) #else int __cpu_up(unsigned int cpu, struct task_struct *tidle) { - int ret = 0; + int ret; tidle->thread_info.cpu = cpu; ret = start_secondary_cpu(cpu, tidle); if (!ret) { - wait_for_completion_timeout(&cpu_running, - msecs_to_jiffies(1000)); + wait_for_completion_timeout(&cpu_running, secs_to_jiffies(1)); if (!cpu_online(cpu)) { pr_crit("CPU%u: failed to come online\n", cpu); |
