From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from va-1-115.ptr.blmpb.com (va-1-115.ptr.blmpb.com [209.127.230.115]) (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 A98CF289E13 for ; Wed, 13 May 2026 12:47:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.127.230.115 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778676451; cv=none; b=cbvvhse0lYiocXPvvxn2q1IOPxo1af97C9PVeUpeEZR7vtADM6hsA68FTteeD8LDWhy8/NAod/EcfuRBTGS5QSbCs7cz3ODVhTni+Yh2BGxy3mEzgA3EYnGMc7O7e5NHccR7WenI/GKmS8reFHDVePx06WCo8b+lxEGxm7oX7ms= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778676451; c=relaxed/simple; bh=+xc6B2ARcpxzfjvdfu52u9M+OGCrqIv+iyguFipkTkw=; h=To:Subject:Mime-Version:In-Reply-To:From:Date:References: Content-Type:Cc:Message-Id; b=SZPuVNb6FqsPbUhQuhL3fYwmgttElK3u7rFPq9NXF3pAeNNcrBA5e18RYAxzRcrkl4XGEjaNvE29ub5Co8ZLMA0j4nd6q1c1FQJdsTdF9vveRBINGWr6Y/0VuInxZ3c6fbnEDApHccL0v85MHmvw/j822TTR4T1paNvxY5pddm4= 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=mrD5fxVZ; arc=none smtp.client-ip=209.127.230.115 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="mrD5fxVZ" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=2212171451; d=bytedance.com; t=1778676446; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=83sW+8PHtjtFZakm04qQMgkHX/OimsM0Gnb646vRzsA=; b=mrD5fxVZYxqgNsseFrPYWPz0RNVHcWc2EDRJFdvm9bFEHAMhJMLsbHmdzcckUBwn7Rtebz 7baLq/sRVbhF4F5SX/E9wvp7i3/KBmOXfKsmdF0H6K2vIRNRg9jq7sVTDKrqrf6smtFjP0 +gTkdPuWYB7/dn4dmo+15DN4Nt3u2Y3E1yVPLcyPgeQeCjzz5aWCfT36XuZANVq4dJBHSW xistgvXxPMGQn1/mYl1CfmJl8/IKS9+MQNUnvOhVv4xw5bjmKx8xIci2ZtHC+pqloRyJyS O8EYXwEDYcOawJhC8M9DOjimKt6jHDQ/zzZXI8utLUIPw73X0mmRjM/WMwRYbA== X-Lms-Return-Path: To: , , , , , , , , , , , , Subject: [RESEND PATCH v5 07/12] smp: Remove preempt_disable from smp_call_function Content-Transfer-Encoding: 7bit Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 In-Reply-To: <20260513124524.2569867-1-zhouchuyi@bytedance.com> From: "Chuyi Zhou" Date: Wed, 13 May 2026 20:45:19 +0800 References: <20260513124524.2569867-1-zhouchuyi@bytedance.com> X-Mailer: git-send-email 2.20.1 X-Original-From: Chuyi Zhou Content-Type: text/plain; charset=UTF-8 Cc: , "Chuyi Zhou" Message-Id: <20260513124524.2569867-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 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 a55919f39cf4..fa35c5725c98 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -1008,9 +1008,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