From nobody Fri Jul 24 21:53:41 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 9865E43802F; Thu, 23 Jul 2026 10:21:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784802083; cv=none; b=e9qxyvogt0n7tRkDlLyySp0nh1jKp5p21TnxN4906hmhvkz04d/2FvgNKm8vLBY7L76T9g/2wmmR0c7EJBIj63wBW5+W83RjkXnn5NYKZE6bW3uuKe+DgEVECWGQsYeoLBxo/yyW8SK37TscKI3mEuachY9Yu2q0sU9/w7LcPmI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784802083; c=relaxed/simple; bh=vVhLZbCL11CqNqVsuWqk80zApV6cf41Xxis2daesN+g=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=oegoJsVaY6Gy/c0TtjtrLRPB+is5Y0fVeKWS1RqBLfr65uH+FQKVukw6mB9ez4WNHnt6p/JDBbwgx/OeFrbHwlF1pFag6xiM6Ex8MkqqPBHnrSmxI/C+WNkwZJgXoDjITWmcGtbzp00O3+aFTxzXTKRxRHaXo+s5Mow3hyQUbnw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=X8sTgQ4L; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=HhQ1Hp0W; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="X8sTgQ4L"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="HhQ1Hp0W" Date: Thu, 23 Jul 2026 10:21:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1784802079; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ioUqpLkNi3xHyLiscfaXhxJuBIhG2eBuDRLWehxNQ8s=; b=X8sTgQ4L21jHMn3katDVx3LPzSdiK3Fqipr+a+qECjLIrdRg3lZyDhcL4Fh4caxiSPmsMX tbltE5MBHCNMcXlkKJzpCDMYkp6O2j0EKdfZlgRsaR4nBEg6sXiUNTizA2uysfbNLks45S zdyQbVfRURpr6z2mOUT9H5NAKLei9ungedTt55Jbr5AVVYxeODlVzmUlFOQzEbN+/Zpb0F BSTMQ+BQNV8dzrZXY1M8PYCAkUpBEh5H0C1UT5QS8L7d1T5xv7yfYHhEgC42XG8+zGyQgq 4Y+AeFfxqcEa7g4iSTrCBINNY3LKayuDVBXTbM87TE6JIDLJc3s6kJT+hJf5wA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1784802079; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ioUqpLkNi3xHyLiscfaXhxJuBIhG2eBuDRLWehxNQ8s=; b=HhQ1Hp0Wfb/tKKDKMA8MJot0hmlUTGD8Y78NOeZ1wZrYDCcLL5H5Efg6X9lniQKt0aGpfP BxyOc3tiWuK7uyCA== From: "tip-bot2 for Chuyi Zhou" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: smp/core] smp: Remove preempt_disable() from smp_call_function() Cc: Chuyi Zhou , Thomas Gleixner , "Paul E. McKenney" , Muchun Song , Sebastian Andrzej Siewior , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260709122933.4021501-8-zhouchuyi@bytedance.com> References: <20260709122933.4021501-8-zhouchuyi@bytedance.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178480207769.2943223.1838090084521656332.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the smp/core branch of tip: Commit-ID: 66344732b058e75f7ef25dcd0fbb483f9c000633 Gitweb: https://git.kernel.org/tip/66344732b058e75f7ef25dcd0fbb483f9= c000633 Author: Chuyi Zhou AuthorDate: Thu, 09 Jul 2026 20:29:26 +08:00 Committer: Thomas Gleixner CommitterDate: Thu, 16 Jul 2026 09:24:55 +02:00 smp: Remove preempt_disable() from smp_call_function() smp_call_function_many_cond() handles the preemption and CPU pinning requirements internally. smp_call_function() only forwards the request to that helper for cpu_online_mask and does not access CPU-local state on its own. Remove the outer preempt_disable() and preempt_enable() pair from smp_call_function(). Signed-off-by: Chuyi Zhou Signed-off-by: Thomas Gleixner Tested-by: Paul E. McKenney Reviewed-by: Muchun Song Reviewed-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20260709122933.4021501-8-zhouchuyi@bytedance= .com --- kernel/smp.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/kernel/smp.c b/kernel/smp.c index f6f8529..6c4c93e 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -1007,10 +1007,10 @@ EXPORT_SYMBOL(smp_call_function_many); =20 /** * smp_call_function() - Run a function on all other CPUs. - * @func: The function to run. This must be fast and non-blocking. - * @info: An arbitrary pointer to pass to the function. - * @wait: If true, wait (atomically) until function has completed - * on other CPUs. + * @func: The function to run. This must be fast and non-blocking. + * @info: An arbitrary pointer to pass to the function. + * @wait: If true, wait (atomically) until function has completed + * on other CPUs. * * If @wait is true, then returns once @func has returned; otherwise * it returns just before the target cpu calls @func. @@ -1020,9 +1020,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