From patchwork Tue Jul 16 09:54:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 169049 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp619257ilk; Tue, 16 Jul 2019 02:55:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFyrjQ9zWhk6D3J01OVbROdvMVWa9PtnkF/LCq3ucIJqoIHIx6dBWSYoxwgWUyqRjKww/2 X-Received: by 2002:a17:90a:8a0b:: with SMTP id w11mr34764055pjn.125.1563270927523; Tue, 16 Jul 2019 02:55:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563270927; cv=none; d=google.com; s=arc-20160816; b=BkTLSXPHSFpHR16KrdiKK4UK0adxUqeQ+UNc/yR8+tRYS9st9hSuhNgeOtIqS1ct7/ VgtoYgTix8qa7l4f9Bz622FK7gjJqqyLaEO0Ow7UP6fL3NuUOxycv3OttU9qUN5rWZDi ogVzCBuk1UDtxgnao6MPUoTEsD3wUOgQAk2qkNmGgsKW6yV+gDDWedZEjJ7pacfSaG/7 0SXYjhcUzbTVjs/vYs+2FcfAvbaGV0FoFUU4BYSe5jv1nKQjb2IDkjVroTDCRUo8F37v /8l8LpnN45nxTZVMkrn3tR8HA+6CtDSc37305eYSl57SGMhp0JZF3R1Hhys5TcHhZw6f RHQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=igbw8Lq9b0TFNBWb47jJMKCAo+bPsNo96FEJcJLrXVc=; b=u9rjvuG84+c1wLTgtMzKG/41WixmbmGauhhbEUo5HttAcZRRgAcuzqKd9k77Wnj6Rw 2LvgEd4PzVJU4OukvN7N/AbrlI/RaHZZZLfu7IDxfK6apBh5v3aQvW+ujsCQtgckCROB nCIsORd3cT1FvJKbOZFNJi8H8qYbPE5MJOp+k/u88mGUy4v9sWOcvbAKHVFaDtdQgs9W g2rsUb/cDPh4DfmMW09I27G6cJciEo1uVo99PyaRcQIWvR5kPlmhklnllopol0zMKGAA xOx48kFsd9De2vLl3seT4iS9oMWhJ8t5jDLYyzL1gOa/DM4FmdLIBmeL3QSwcS+vKP59 6UQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H1uaGUoA; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 u20si17319936plq.421.2019.07.16.02.55.27; Tue, 16 Jul 2019 02:55:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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=H1uaGUoA; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1732199AbfGPJzZ (ORCPT + 11 others); Tue, 16 Jul 2019 05:55:25 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:40921 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733186AbfGPJzY (ORCPT ); Tue, 16 Jul 2019 05:55:24 -0400 Received: by mail-pg1-f193.google.com with SMTP id w10so9180753pgj.7 for ; Tue, 16 Jul 2019 02:55:24 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=igbw8Lq9b0TFNBWb47jJMKCAo+bPsNo96FEJcJLrXVc=; b=H1uaGUoAeqRk6S2i3GDT8ntkwDm5cC2Flj+OsmfRqTVZQOoqEeOTDCKsdr3QFfWCQA jIPdgK/siD6VGKOf89ZSbHQ+j1jPeChgW95ao4XWPlukec3p7kpdOUigGHiApEVT7fAi EafM7d2Qy7MqOBAe6k5q7qDDPhMD7AdzffO+i9yl3vvgOzpHm4gVd5lgQ58XayNvMuhh 4UHcVXOZ220ePO6/sNBsel0AOBBiS4C4rr5kGcrP7M+qOUm5wTvGLrYjEKbctD6LwlTU SwW+LMRxd/hv3ImIN9xUrJOoCbpaTxkwlDmUIlUNaY9z8ypRk3RqDmqs5LVX7Tr8mz87 okiw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=igbw8Lq9b0TFNBWb47jJMKCAo+bPsNo96FEJcJLrXVc=; b=S4wrekG4jWCbRl0HezNDT6qsLuiU/LrqF2WYUyzwf9aA+LwMZuXyPys92/J7wzI2f9 jpHwvcalkCwRHCXp1COzR3Osfd0goAne1v+h+WGuhBXRRucMXZKx1a7eOc4Fb3o336v2 OoB6xrG4VaWe96tXcUbQPEvooozTthN5PRLDW2ou0ycBGwENXeYnSCvpjGpwrZWwXCJL yNBvbIZXXR0+VR3qryB2qtuQHcoHPF1auS9YVlNutGLQpvSO2Hdi4s+Edd79uuiUFsfv CyL1znsZebd3+07SFeWAnLIYef6uZYp0tEB5yhBIV+K/RICpA84mjGGMQL5m6ACfp11U 7gRg== X-Gm-Message-State: APjAAAUI8LN2DDKAwRRap9y0hIPa6b1KQYJ+3A8h6O69CFdGOcN8oyCm RbD4Nor5adxsZFsj9BZyupZxvfMg9Fs= X-Received: by 2002:a17:90a:d14b:: with SMTP id t11mr34976911pjw.79.1563270923963; Tue, 16 Jul 2019 02:55:23 -0700 (PDT) Received: from localhost ([122.172.28.117]) by smtp.gmail.com with ESMTPSA id d14sm27038469pfo.154.2019.07.16.02.55.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 02:55:23 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Viresh Kumar Cc: linux-pm@vger.kernel.org, Vincent Guittot , linux-kernel@vger.kernel.org Subject: [PATCH 09/10] cpufreq: Remove CPUFREQ_ADJUST and CPUFREQ_NOTIFY policy notifier events Date: Tue, 16 Jul 2019 15:24:53 +0530 Message-Id: <77857b9eadc26c57de2637fcca014239a93551e4.1563270828.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.21.0.rc0.269.g1a574e7a288b In-Reply-To: References: MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org No driver makes reference to these events now, remove them and the code related to them. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq.c | 36 +++++++----------------------------- include/linux/cpufreq.h | 6 ++---- 2 files changed, 9 insertions(+), 33 deletions(-) -- 2.21.0.rc0.269.g1a574e7a288b diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 8a7eff2a3771..bd91091ed6b8 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -2362,15 +2362,13 @@ EXPORT_SYMBOL(cpufreq_get_policy); * @policy: Policy object to modify. * @new_policy: New policy data. * - * Pass @new_policy to the cpufreq driver's ->verify() callback, run the - * installed policy notifiers for it with the CPUFREQ_ADJUST value, pass it to - * the driver's ->verify() callback again and run the notifiers for it again - * with the CPUFREQ_NOTIFY value. Next, copy the min and max parameters - * of @new_policy to @policy and either invoke the driver's ->setpolicy() - * callback (if present) or carry out a governor update for @policy. That is, - * run the current governor's ->limits() callback (if the governor field in - * @new_policy points to the same object as the one in @policy) or replace the - * governor for @policy with the new one stored in @new_policy. + * Pass @new_policy to the cpufreq driver's ->verify() callback. Next, copy the + * min and max parameters of @new_policy to @policy and either invoke the + * driver's ->setpolicy() callback (if present) or carry out a governor update + * for @policy. That is, run the current governor's ->limits() callback (if the + * governor field in @new_policy points to the same object as the one in + * @policy) or replace the governor for @policy with the new one stored in + * @new_policy. * * The cpuinfo part of @policy is not updated by this function. */ @@ -2398,26 +2396,6 @@ int cpufreq_set_policy(struct cpufreq_policy *policy, if (ret) return ret; - /* - * The notifier-chain shall be removed once all the users of - * CPUFREQ_ADJUST are moved to use the QoS framework. - */ - /* adjust if necessary - all reasons */ - blocking_notifier_call_chain(&cpufreq_policy_notifier_list, - CPUFREQ_ADJUST, new_policy); - - /* - * verify the cpu speed can be set within this limit, which might be - * different to the first one - */ - ret = cpufreq_driver->verify(new_policy); - if (ret) - return ret; - - /* notification of the new policy */ - blocking_notifier_call_chain(&cpufreq_policy_notifier_list, - CPUFREQ_NOTIFY, new_policy); - policy->min = new_policy->min; policy->max = new_policy->max; trace_cpu_frequency_limits(policy); diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index e28c8af697d2..cb1e86a14c7a 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -456,10 +456,8 @@ static inline void cpufreq_resume(void) {} #define CPUFREQ_POSTCHANGE (1) /* Policy Notifiers */ -#define CPUFREQ_ADJUST (0) -#define CPUFREQ_NOTIFY (1) -#define CPUFREQ_CREATE_POLICY (2) -#define CPUFREQ_REMOVE_POLICY (3) +#define CPUFREQ_CREATE_POLICY (0) +#define CPUFREQ_REMOVE_POLICY (1) #ifdef CONFIG_CPU_FREQ int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list);