From patchwork Wed Dec 1 07:14:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tang Yizhou X-Patchwork-Id: 12649231 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 0B3E8C433FE for ; Wed, 1 Dec 2021 06:47:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346660AbhLAGun (ORCPT ); Wed, 1 Dec 2021 01:50:43 -0500 Received: from szxga01-in.huawei.com ([45.249.212.187]:15001 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346956AbhLAGun (ORCPT ); Wed, 1 Dec 2021 01:50:43 -0500 Received: from dggpeml500026.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4J3qMC5FKQzZcD1; Wed, 1 Dec 2021 14:44:39 +0800 (CST) Received: from dggpeml500006.china.huawei.com (7.185.36.76) by dggpeml500026.china.huawei.com (7.185.36.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 1 Dec 2021 14:47:21 +0800 Received: from huawei.com (10.175.100.227) by dggpeml500006.china.huawei.com (7.185.36.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 1 Dec 2021 14:47:20 +0800 From: Tang Yizhou To: , , CC: , , Tang Yizhou Subject: [PATCH v2 1/2] cpufreq: Fix a comment in cpufreq_policy_free Date: Wed, 1 Dec 2021 15:14:59 +0800 Message-ID: <20211201071500.28648-2-tangyizhou@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211201071500.28648-1-tangyizhou@huawei.com> References: <20211201071500.28648-1-tangyizhou@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.100.227] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500006.china.huawei.com (7.185.36.76) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Comment both when CPUFREQ_CREATE_POLICY and CPUFREQ_REMOVE_POLICY notification are sent. Signed-off-by: Tang Yizhou --- drivers/cpufreq/cpufreq.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index e338d2f010fe..e76777881739 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1296,8 +1296,9 @@ static void cpufreq_policy_free(struct cpufreq_policy *policy) if (policy->max_freq_req) { /* - * CPUFREQ_CREATE_POLICY notification is sent only after - * successfully adding max_freq_req request. + * Need to send CPUFREQ_REMOVE_POLICY notification if + * max_freq_req request is successfully added. + * See also: CPUFREQ_CREATE_POLICY notification. */ blocking_notifier_call_chain(&cpufreq_policy_notifier_list, CPUFREQ_REMOVE_POLICY, policy); @@ -1429,6 +1430,10 @@ static int cpufreq_online(unsigned int cpu) goto out_destroy_policy; } + /* + * CPUFREQ_CREATE_POLICY notification is sent only after + * successfully adding max_freq_req request. + */ blocking_notifier_call_chain(&cpufreq_policy_notifier_list, CPUFREQ_CREATE_POLICY, policy); } From patchwork Wed Dec 1 07:15:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tang Yizhou X-Patchwork-Id: 12649233 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 5D4CCC433EF for ; Wed, 1 Dec 2021 06:47:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347008AbhLAGup (ORCPT ); Wed, 1 Dec 2021 01:50:45 -0500 Received: from szxga03-in.huawei.com ([45.249.212.189]:28202 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346996AbhLAGuo (ORCPT ); Wed, 1 Dec 2021 01:50:44 -0500 Received: from dggpeml500025.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4J3qN43yQtz8vjp; Wed, 1 Dec 2021 14:45:24 +0800 (CST) Received: from dggpeml500006.china.huawei.com (7.185.36.76) by dggpeml500025.china.huawei.com (7.185.36.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 1 Dec 2021 14:47:21 +0800 Received: from huawei.com (10.175.100.227) by dggpeml500006.china.huawei.com (7.185.36.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 1 Dec 2021 14:47:21 +0800 From: Tang Yizhou To: , , CC: , , Tang Yizhou Subject: [PATCH v2 2/2] doc/cpufreq: Update core.rst Date: Wed, 1 Dec 2021 15:15:00 +0800 Message-ID: <20211201071500.28648-3-tangyizhou@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211201071500.28648-1-tangyizhou@huawei.com> References: <20211201071500.28648-1-tangyizhou@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.100.227] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500006.china.huawei.com (7.185.36.76) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org As the definition of struct cpufreq_freqs has changed, update core.rst with the new first member of struct cpufreq_freqs. Signed-off-by: Tang Yizhou Acked-by: Viresh Kumar --- Documentation/cpu-freq/core.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/cpu-freq/core.rst b/Documentation/cpu-freq/core.rst index 33cb90bd1d8f..4ceef8e7217c 100644 --- a/Documentation/cpu-freq/core.rst +++ b/Documentation/cpu-freq/core.rst @@ -73,12 +73,12 @@ CPUFREQ_POSTCHANGE. The third argument is a struct cpufreq_freqs with the following values: -===== =========================== -cpu number of the affected CPU +====== ====================================== +policy a pointer to the struct cpufreq_policy old old frequency new new frequency flags flags of the cpufreq driver -===== =========================== +====== ====================================== 3. CPUFreq Table Generation with Operating Performance Point (OPP) ==================================================================