From patchwork Tue May 22 10:01:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 10417803 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E6BDE6053B for ; Tue, 22 May 2018 10:02:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D7B5328BB4 for ; Tue, 22 May 2018 10:02:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC37628BBB; Tue, 22 May 2018 10:02:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8512128BB4 for ; Tue, 22 May 2018 10:02:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751199AbeEVKBu (ORCPT ); Tue, 22 May 2018 06:01:50 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:36515 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751177AbeEVKBt (ORCPT ); Tue, 22 May 2018 06:01:49 -0400 Received: by mail-pl0-f68.google.com with SMTP id v24-v6so10607480plo.3 for ; Tue, 22 May 2018 03:01:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=l7GPAEshK5Iy6eh057kqFSASyOD9GP+EAFnw3/+AQD4=; b=MF1MBh0JECNlyoAuy/Zgx3+hkPoZPHegjMA8ORlVhOMd1kvF+oULxk5tBHDOMxHd4e s+Q978jiHJu0ezTx8C1IfeUVAZYCLqhvqoRwQsZ3aC3QzIbM0y9TEntYPRf0dK8V/LZN ZSQBgFsu3ekqhaVpS/65NV1IADn/cZVT/Edvk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=l7GPAEshK5Iy6eh057kqFSASyOD9GP+EAFnw3/+AQD4=; b=WW0QGaiYUA3qQFbCykyM5XcOU5hq3amxB7bXFPEWw1ylxSlzkNGUSX2MVILT5J7sjZ ncj8zMOKHh0D0nM1NWSSmhw+gKd5UjZ1QRmsnyIQqqUgvJimTK3/hqfrSAO4iOWYQiaT HrVhOdCLCHlc86XqMe0xhWXr+0IilU8Vdt2e6OwpDxIchz5pJSGit9oXfLS5O5PNkIvp Fl5qmNxabAmI6JK90AGQUp3NuCHIUEC/qJ4OEZn1KY3NwjiGoJrBhnzdsNcumH+mkiMz JcXOM4W2uyTLnHyLVUiDXYkfWSWme8eemmtkuIxBydyweQ97YNMC66IkyKR/3G3SYpx7 +GZA== X-Gm-Message-State: ALKqPwdYx9MwE7A8xEUxTCPONVZSEKoEPK1uHEVnhxouXWvDNeUxxfcs Pc7OrFCqKekom3rnEwLUtdHPEg== X-Google-Smtp-Source: AB8JxZouBJx+SFCO29y4jrvA12Z3GaWGlhk5Vg44U7fTLGMBvLD+y4/rUqjbeuJHh0bkeIiZqtl2qw== X-Received: by 2002:a17:902:622:: with SMTP id 31-v6mr16265457plg.135.1526983308588; Tue, 22 May 2018 03:01:48 -0700 (PDT) Received: from localhost ([122.167.163.112]) by smtp.gmail.com with ESMTPSA id j186-v6sm1841311pgc.10.2018.05.22.03.01.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 May 2018 03:01:47 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Ingo Molnar , Peter Zijlstra Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org Subject: [PATCH] cpufreq: Rename cpufreq_can_do_remote_dvfs() Date: Tue, 22 May 2018 15:31:30 +0530 Message-Id: <17700bd99bc34e4e189b94b417591f328005ffbf.1526983276.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This routine checks if the CPU running this code belongs to the policy of the target CPU or if not, can it do remote DVFS for it remotely. But the current name of it implies as if it is only about doing remote updates. Rename it to make it more relevant. Reported-by: Rafael J. Wysocki Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq_governor.c | 2 +- include/linux/cpufreq.h | 2 +- kernel/sched/cpufreq_schedutil.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c index ca38229b045a..871bf9cf55cf 100644 --- a/drivers/cpufreq/cpufreq_governor.c +++ b/drivers/cpufreq/cpufreq_governor.c @@ -278,7 +278,7 @@ static void dbs_update_util_handler(struct update_util_data *data, u64 time, struct policy_dbs_info *policy_dbs = cdbs->policy_dbs; u64 delta_ns, lst; - if (!cpufreq_can_do_remote_dvfs(policy_dbs->policy)) + if (!cpufreq_this_cpu_can_update(policy_dbs->policy)) return; /* diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 87f48dd932eb..882a9b9e34bc 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -571,7 +571,7 @@ struct governor_attr { size_t count); }; -static inline bool cpufreq_can_do_remote_dvfs(struct cpufreq_policy *policy) +static inline bool cpufreq_this_cpu_can_update(struct cpufreq_policy *policy) { /* * Allow remote callbacks if: diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c index 2442decbfec7..2145655dbd9e 100644 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c @@ -89,7 +89,7 @@ static bool sugov_should_update_freq(struct sugov_policy *sg_policy, u64 time) * schedule the kthread. */ if (sg_policy->policy->fast_switch_enabled && - !cpufreq_can_do_remote_dvfs(sg_policy->policy)) + !cpufreq_this_cpu_can_update(sg_policy->policy)) return false; if (sg_policy->work_in_progress)