From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sg-1-100.ptr.blmpb.com (sg-1-100.ptr.blmpb.com [118.26.132.100]) (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 E95E43859FD for ; Mon, 2 Mar 2026 07:54:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=118.26.132.100 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772438074; cv=none; b=Qjco1BMgLrF2vjSi18eb9zRtl7wDyfFz62abO2nBDvXtRov9ODKbvnCzOtyJte/CPNSksVUrV/Fu9dDROR2ax+c7BepQqHMRaftjFZrzcWN4HrSg5szExv25TewUOqwck912sIK4tv+UJKMHuPDcvh5Gy14F9JVgSrIdXXTMJuw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772438074; c=relaxed/simple; bh=b6PSKk8e2yfcMAkK4wgQK3M55nkpZOsRu/LRUYkwesk=; h=From:Date:Mime-Version:Content-Type:In-Reply-To:To:Cc:References: Subject:Message-Id; b=OkhcZeFvun3jmTupNuC66Gzu+cjiSPdZ/VkA3eHhPlltWVrfpzVo6+otzNIWkRFcCwPD1woE0rYbKIp8aR4R5wM7ZxuDrlTzjutz4jflFxi5TBPdZjdw+oW23DbQFCQM9UdTQJJKvmTQ1ILEzjn7h413k+Wc6t6dek+YwT0P2i4= 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=cFJ46ZIO; arc=none smtp.client-ip=118.26.132.100 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="cFJ46ZIO" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=2212171451; d=bytedance.com; t=1772438061; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=jNeEoePrKFoQvzxrKQCLn2y/j5HaRLKhAxm7LGABlMo=; b=cFJ46ZIOwesQ3bgvLiJqf5+n37tABvih1WIlJjlEHpmQcZhGLEtX+8nwnTcAzOBFRtZIy1 2k2ji5y0UnZwSvtcIiPO58zqKc/v2kvOx8LU9iosm2sgbF8Dw80Muwrugz5w5xqVW2tniU O2N9CX5SBSpSgABE+05Pwhxq/WIcO968rtoXJx2VSQqo5uwgOoe1ONgTsfkn12QwcxYOAK tH/Y8//3ps9pqOSkrGPdZGpsZPFJV3+vwgcVDPflfCShGuLiLeMYJh0hVfaggDdlnRQ41B KuYTnjwudwljoDzSzDd7sVy41jkJuH0PDeisY3DQ0xzy63xn0fRB+G++15Sayw== From: "Chuyi Zhou" Date: Mon, 2 Mar 2026 15:52:11 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.20.1 X-Original-From: Chuyi Zhou Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Lms-Return-Path: In-Reply-To: <20260302075216.2170675-1-zhouchuyi@bytedance.com> To: , , , , , , , , , , , Cc: , "Chuyi Zhou" References: <20260302075216.2170675-1-zhouchuyi@bytedance.com> Subject: [PATCH v2 07/12] smp: Remove preempt_disable from smp_call_function Message-Id: <20260302075216.2170675-8-zhouchuyi@bytedance.com> 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 --- kernel/smp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/smp.c b/kernel/smp.c index 18e7e4a8f1b6..f9c0028968ef 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -966,9 +966,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); -- 2.20.1