From nobody Wed Apr 1 11:26:51 2026 Received: from lf-1-131.ptr.blmpb.com (lf-1-131.ptr.blmpb.com [103.149.242.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46B053DC4CF for ; Tue, 31 Mar 2026 11:34:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.149.242.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774956871; cv=none; b=J7dvLDGmInfGxVHkjrTFPSdoRBrE8T46FgE0U6gsyzrr+2LIDDEIZYXD9cm3OJZLQcYq7tdLqiPOdF9yF1ixap3NKOK83vg5en0GTW7IWtl/3NtATlnSEnBC0kB0BdD59xEZtJteH390Az3ku7O9wYYvsPzX/j/nUibDLb6F9XI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774956871; c=relaxed/simple; bh=nm7x+iIZFVBhl7GqtPAn/49VgtSnzaofyxXgrQlkx2s=; h=References:Subject:Date:In-Reply-To:To:Cc:Mime-Version: Content-Type:From:Message-Id; b=MySz6ww1NRWCem5JosNSoGsw10iHqPhJH3o0R9cmMJo9tILQo5fcv/+LIaqLL6+gl7nrbPU6Ha7SEwxfhAlN6vPm7oqPkJG5Te+aetA17LOXLcuYPVlb94uL1hVebAtAHuv1F3XWPLRkgxYTfTfiL/qKn219KkH30Ai7mAhLd2k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=Ozpe6WZG; arc=none smtp.client-ip=103.149.242.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="Ozpe6WZG" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=2212171451; d=bytedance.com; t=1774956781; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=vKnsPKGYkLl1GrWNoYcVaiglQIwu2WZFC7HWdwidkRo=; b=Ozpe6WZGsoy4Zs+FNmpFblGiXQcX3LNxVqVR9DlaLl+LwYtuL9pBvHXpGqG9U8gUrngAJr aU8l5J6BCQfr6XoXELDUkKxAjisNtCj0rcYJu4mqsw21hkudoEZDRcEVI48gFD0V0R/mAs 4SwDkl2OQDcpsBahLvb7YZQGxaiQe+HjxWiP1xfXHQ5ZFAB+BKQLksc7VGhM3jSsLSV0Xk DcVRz9A5CW8kNgyVzIWO4eSdcFNklQOvMG3Xc/g9uRGUe9c9rD02huryc1MvOKk5bTYCVa HRoQzbGA2mym/wDWUyK2vpwSq0Cr/Cs/PXN5DquKGjjOhDcDTMljLgXE4FB5Xw== References: <20260331113103.2197007-1-zhouchuyi@bytedance.com> Subject: [PATCH v4 07/12] smp: Remove preempt_disable from smp_call_function Date: Tue, 31 Mar 2026 19:30:58 +0800 X-Mailer: git-send-email 2.20.1 In-Reply-To: <20260331113103.2197007-1-zhouchuyi@bytedance.com> X-Original-From: Chuyi Zhou To: , , , , , , , , , , , , Cc: , "Chuyi Zhou" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Lms-Return-Path: Content-Transfer-Encoding: quoted-printable From: "Chuyi Zhou" Message-Id: <20260331113103.2197007-8-zhouchuyi@bytedance.com> Content-Type: text/plain; charset="utf-8" Now smp_call_function_many_cond() internally handles the preemption logic, so smp_call_function() does not need to explicitly disable preemption. Remove preempt_{enable, disable} from smp_call_function(). Signed-off-by: Chuyi Zhou Reviewed-by: Muchun Song --- kernel/smp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/smp.c b/kernel/smp.c index 4ddb1ec1e43e..9b658362aa02 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -1002,9 +1002,8 @@ EXPORT_SYMBOL(smp_call_function_many); */ void smp_call_function(smp_call_func_t func, void *info, int wait) { - preempt_disable(); - smp_call_function_many(cpu_online_mask, func, info, wait); - preempt_enable(); + smp_call_function_many_cond(cpu_online_mask, func, info, + wait ? SCF_WAIT : 0, NULL); } EXPORT_SYMBOL(smp_call_function); =20 --=20 2.20.1