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: 136521 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1406646lji; Tue, 22 May 2018 03:01:57 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpFLEJI6gviyg+EmxFVW/uSxdQiQ+XLAbuZKp3YNMTLapiq77hCcs7Iq/3sWrQPcxWJoaiQ X-Received: by 2002:a62:5754:: with SMTP id l81-v6mr23579730pfb.56.1526983317105; Tue, 22 May 2018 03:01:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526983317; cv=none; d=google.com; s=arc-20160816; b=cVwfNbo9QTG8Jf8oAUqm0t/AzFHVvENzAXdEhywQrteaj2jfiHW7Ky1zIgoMabS60d lBIypna39cCcwUc4smLt83XXx5p27AQKVLkRNghj+1m9PHdo8YnQoLiIxbVIYOcv9u0y LyVMU4DlM1Adz6+DSUG0eaI3jPkRCO1T1gFdUw2gMIdXLnkFUaeTM7Daxu4jTSsj6GKN r8oR1RICoVw0X5RxAV2kYA1S9cC9Iv8wXdArawaOg9gFPDpcGYvUsE5qs1uV1oY60WPH ut7X/kUVA6btrSk/6iI3exVm/+wNdqW5TgjDg4FEOhWM/qyyKnIBpvHMAg6CVcZ67Lww 605A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=l7GPAEshK5Iy6eh057kqFSASyOD9GP+EAFnw3/+AQD4=; b=bo+Yc60AqSTkB5Ng5LnAnOuEXrMcfyqg+Y+5nP7+T3q1Dq2ZoxMpKgm6ab4B7FLthP lB9pEyPm0qMPKjLnoJBLn65U4DN8Q4aTZBspkIRNClkNxHJbnZCU0yAlDHuJpTfWSQBW sqDJEKlLTnQYASr4TQqpIK2uW3vT0zjXpLPSxmSLkMWov5AH8FT0rmPc4s1km7fVq8Qf H29ExrIj0JhXveehf98125II4uzxNzrADgTxDZgN33N/5HP4/64LW9Nk9YF/47Absy9V giJyUwImRjsdQ8bxfTdHxSHID+ReGHHs09vdt7y3OGX8/t3h3adWSwpTpH2uwh7obKaU 1MPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MF1MBh0J; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f193-v6si12543698pgc.49.2018.05.22.03.01.55; Tue, 22 May 2018 03:01:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MF1MBh0J; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751294AbeEVKBx (ORCPT + 30 others); Tue, 22 May 2018 06:01:53 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:43320 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751173AbeEVKBt (ORCPT ); Tue, 22 May 2018 06:01:49 -0400 Received: by mail-pl0-f68.google.com with SMTP id c41-v6so10593592plj.10 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=GcfqdEvSwmwlWrxlnIeTnIizjeHBscC/xoAXF9yoqOKe0FCO/cwZqc2biEEEubLDPs kUfcsFK8ZlRKN3ipLK5RDXvuVck1E5/VRqCHSYHdOKtEk/S907Ji6qXwoWwfO20/okAs Wahcsz5naIr9hpgPnRrolAk6R+Ptq8Rsp/DcDbABreRWq5k7xeWnc2uxYxSxKeB2OROg IGDeBrd5vDCaYZSFU3fDAub1LMmYG3tcc69a4MlOG8MFOhERxTFjZQYA8BzNA+YKKR+l ksC9Wnn4gF5NmaVoctbPfKMBP2f2PPjsBf2ne/PcgdG8B+TOlZ/RpVfaiTPsYV2IDv6p fjpw== X-Gm-Message-State: ALKqPwe8ju6MPamfv47FGDGcBFJHJO9nC1Wzd4II+leZIC0cRgHLZgZf +9CrHQKxGWSJjPHbdwxqe/7DDg== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.15.0.194.g9af6a3dea062 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)