From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-182.mta1.migadu.com (out-182.mta1.migadu.com [95.215.58.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 55516369D71 for ; Thu, 11 Jun 2026 23:26:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781220381; cv=none; b=NXUl9NMZE8xMNJaFzPYenJ1NQzZp+Jq4IxYW23n+y31NKITJET2I5FmuwJHvJ4bU7eBmalPvgsa8WTypBELbFOQhwekfwaG/McfE9mYWZy0tNLJguwQarJrbEA65BzsUKz7UWQ4DITShjmCgtEvdY5iFa+zJG8nhKiORi3CB9wA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781220381; c=relaxed/simple; bh=gO78kdY4oleCRCBxKsBnxCt2/CamXdZinh+7pvRDRZ8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ZijY16CXs+xFJG/A2W3XmfdSl259gwH4/xAY9rsNYYxsu+v7dQKICv8HY1gRxQ7+ejxaW/ma1xBkB5exjcVfddgZc8nFshJEyht1PRteaozhYGH4DjGQSdVfbJfW9cAdSHFnrrum4/AzrwwvX3UmF0FbXRcjbuo3tbrV20tt8Wg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=SGV6ycUJ; arc=none smtp.client-ip=95.215.58.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="SGV6ycUJ" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1781220377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=5Yd28g4SiRg2xPsC8zN5lDlc0ahw7nl+2+Gb1R8bsEY=; b=SGV6ycUJGWxlQ7WXiHMyt0RYzpVe2+PH/wrtXcUnZc38UQl6L1dMPnpHuLIOfsNMtg/jP8 CrSUBiA1ipaQuRkyuhrVSGHcDLIVG5gACaqKeFQCACrQCLOgwuEMdqhbhPFHUuUpmRbWce vkSpOQAm6t6JYcJJz12Hlzg8rccZbY0= From: Thorsten Blum To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Vivian Wang , Atish Patra , Anup Patel Cc: Thorsten Blum , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] riscv: smp: use secs_to_jiffies in __cpu_up Date: Fri, 12 Jun 2026 01:25:38 +0200 Message-ID: <20260611232537.467398-3-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=959; i=thorsten.blum@linux.dev; h=from:subject; bh=gO78kdY4oleCRCBxKsBnxCt2/CamXdZinh+7pvRDRZ8=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDFnazh/PXVFTeMJx/XBNyR9J9aXyaz3E9T4KSnUoT0vuf 7Lq33X2jlIWBjEuBlkxRZYHs37M8C2tqdxkErETZg4rE8gQBi5OAZiIyHaGP/y/32+z6kpq2ae4 U3D+zu/Zd1R3iOvLBpX7XGgLDdgqqc3I0PBCetbaBo8qmwTNrQVNOZwenx8wvNf7nHfHpODJ3Oo lDAA= X-Developer-Key: i=thorsten.blum@linux.dev; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Use secs_to_jiffies() to simplify the code. Drop the redundant zero initialization while at it. Signed-off-by: Thorsten Blum --- arch/riscv/kernel/smpboot.c | 5 ++--- 1 file 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);