From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50A8BC433F5 for ; Mon, 13 Dec 2021 04:01:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231579AbhLMEBC (ORCPT ); Sun, 12 Dec 2021 23:01:02 -0500 Received: from szxga03-in.huawei.com ([45.249.212.189]:29187 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229748AbhLMEBC (ORCPT ); Sun, 12 Dec 2021 23:01:02 -0500 Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.56]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4JC76K1yCVz970c; Mon, 13 Dec 2021 11:58:49 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggpemm500024.china.huawei.com (7.185.36.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 13 Dec 2021 12:00:59 +0800 Received: from thunder-town.china.huawei.com (10.174.178.55) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 13 Dec 2021 12:00:58 +0800 From: Zhen Lei To: Ingo Molnar , Peter Zijlstra , CC: Zhen Lei , Nadav Amit , "Dave Hansen" Subject: [PATCH] smp: Fix the comments of smp_call_function_many() Date: Mon, 13 Dec 2021 11:57:55 +0800 Message-ID: <20211213035755.73-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.174.178.55] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As commit a32a4d8a815c ("smp: Run functions concurrently in smp_call_function_many_cond()") itself says: "Keep other smp_call_function_many() semantic as it is today for backward compatibility: the called function is not executed in this case locally." It's clear that, the function header comments of smp_call_function_many() does not need to be changed. So move the comment about 'scf_flags' to smp_call_function_many_cond(), and restore the original comments of smp_call_function_many(). Signed-off-by: Zhen Lei --- kernel/smp.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/kernel/smp.c b/kernel/smp.c index 01a7c1706a58b1d..6ec884f41b7506d 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -861,6 +861,13 @@ EXPORT_SYMBOL_GPL(smp_call_function_any); #define SCF_WAIT (1U << 0) #define SCF_RUN_LOCAL (1U << 1) +/** + * smp_call_function_many_cond(): Run a function on a set of CPUs. + * @scf_flags: Bitmask that controls the operation. If %SCF_WAIT is set, + * wait (atomically) until function has completed on other CPUs. If + * %SCF_RUN_LOCAL is set, the function will also be run locally + * if the local CPU is set in the @cpumask. + */ static void smp_call_function_many_cond(const struct cpumask *mask, smp_call_func_t func, void *info, unsigned int scf_flags, @@ -972,14 +979,12 @@ static void smp_call_function_many_cond(const struct cpumask *mask, } /** - * smp_call_function_many(): Run a function on a set of CPUs. + * smp_call_function_many(): Run a function on a set of other CPUs. * @mask: The set of cpus to run on (only runs on online subset). * @func: The function to run. This must be fast and non-blocking. * @info: An arbitrary pointer to pass to the function. - * @wait: Bitmask that controls the operation. If %SCF_WAIT is set, wait - * (atomically) until function has completed on other CPUs. If - * %SCF_RUN_LOCAL is set, the function will also be run locally - * if the local CPU is set in the @cpumask. + * @wait: If true, wait (atomically) until function has completed + * on other CPUs. * * If @wait is true, then returns once @func has returned. * -- 2.25.1