Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1282684
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Viresh Kumar <viresh.kumar@linaro.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH V2 3/6] cpufreq: governor: Pass policy as argument to ->gov_dbs_timer() |
| Date | Thu, 03 Dec 2015 05:10:02 +0100 |
| Message-ID | <qBtns-8mi-7@gated-at.bofh.it> (permalink) |
| References | <qBtnr-8mi-3@gated-at.bofh.it> |
| X-Original-To | Rafael Wysocki <rjw@rjwysocki.net> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=zAlA5bG04bKrpuSnr3CY1LRzCiqui4IbFyCr4tzTnGo=; b=A+rypqbOdqgH37K0GmrbIP/lFHb9wtoLZw319e58KMpQoSPYDv5lrt3Jdk+MUwjBDO lgxXNKxCg0ldWomdyIlU0DVvoi4Mzwg4IPC93ruru7jHEv+qjp4XmLefn6wzEpULU1iI UYuj6EE1SEtXrZlthfnOL9FA8EBBeKkUwhA+jxE72uLnSG8D3Y2b0IDG/VgOPWcJ/OMU b+vygxopqX0RLAaLGM8Mw10TFQ8TovytYN/ylsDEtsUO70m/MXaZjr4IrD7ZZxEpnEaG +/Vd8UFi6Wq5MoH9Ts36yLhFbHe+cmBBHGytAJrFlE1Iwo0rAnDUAWTM0D2HPX+ius2Z zbMg== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=zAlA5bG04bKrpuSnr3CY1LRzCiqui4IbFyCr4tzTnGo=; b=lxVsJm37EfePT4ms3eOTWgfZ0tAmcLzsYS7nRutTtCBiSrbNJ6/o5v6Lw/CVs/X7Np P5nG3/0Gd9RCX+igITbU9e6W8cbt+Dj0YszEHmll2+OMZuUG+F3SgAkUAY6mkog5oygC GG+92QDnZ2N4Q1SQY7GtUpQHhFheSnSbKoiQQX+5nAzQIbpDG0HZR38QssqnrJdWTyD0 L74hRT0epFQ9RfrPd8qGzGivt5i91DRSUCQDoHO9pgeBOTy6elvUI56jTkfxEV0e0IiA g2YgwKk9MrEGG+vyvwLUlQbW/792AIxFfOLMf1YBffZP+j22wT28EK0+f72JhrHa9aDa Qggg== |
| X-Gm-Message-State | ALoCoQk7A4SKTDoXIrvM47JvzbQvB/Y2GGnaTsSZveTXPEjgs45U6vequgUnbGWOD2Tz5FntedYR |
| X-Received | by 10.66.236.162 with SMTP id uv2mr10053222pac.101.1449115691679; Wed, 02 Dec 2015 20:08:11 -0800 (PST) |
| X-Mailer | git-send-email 2.6.2.198.g614a2ac |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 84 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, ashwin.chaugule@linaro.org, Viresh Kumar <viresh.kumar@linaro.org>, linux-kernel@vger.kernel.org (open list) |
| X-Original-Date | Thu, 3 Dec 2015 09:37:51 +0530 |
| X-Original-Message-ID | <58060974dfb6759c9fda2ed3c1649ff7d75df5ad.1449115453.git.viresh.kumar@linaro.org> |
| X-Original-References | <cover.1449115453.git.viresh.kumar@linaro.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1282684 |
Show key headers only | View raw
Pass 'policy' as argument to ->gov_dbs_timer() instead of cdbs and
dbs_data.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/cpufreq_conservative.c | 6 +++---
drivers/cpufreq/cpufreq_governor.c | 2 +-
drivers/cpufreq/cpufreq_governor.h | 3 +--
drivers/cpufreq/cpufreq_ondemand.c | 5 ++---
4 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
index 1fa1deb6e91f..606ad74abe6e 100644
--- a/drivers/cpufreq/cpufreq_conservative.c
+++ b/drivers/cpufreq/cpufreq_conservative.c
@@ -115,13 +115,13 @@ static void cs_check_cpu(int cpu, unsigned int load)
}
}
-static unsigned int cs_dbs_timer(struct cpu_dbs_info *cdbs,
- struct dbs_data *dbs_data, bool modify_all)
+static unsigned int cs_dbs_timer(struct cpufreq_policy *policy, bool modify_all)
{
+ struct dbs_data *dbs_data = policy->governor_data;
struct cs_dbs_tuners *cs_tuners = dbs_data->tuners;
if (modify_all)
- dbs_check_cpu(dbs_data, cdbs->shared->policy->cpu);
+ dbs_check_cpu(dbs_data, policy->cpu);
return delay_for_sampling_rate(cs_tuners->sampling_rate);
}
diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c
index b260576ddb12..cdcb56a49b28 100644
--- a/drivers/cpufreq/cpufreq_governor.c
+++ b/drivers/cpufreq/cpufreq_governor.c
@@ -253,7 +253,7 @@ static void dbs_timer(struct work_struct *work)
if (!need_load_eval(cdbs->shared, sampling_rate))
modify_all = false;
- delay = dbs_data->cdata->gov_dbs_timer(cdbs, dbs_data, modify_all);
+ delay = dbs_data->cdata->gov_dbs_timer(policy, modify_all);
gov_queue_work(dbs_data, policy, delay, modify_all);
unlock:
diff --git a/drivers/cpufreq/cpufreq_governor.h b/drivers/cpufreq/cpufreq_governor.h
index 5621bb03e874..0c7589016b6c 100644
--- a/drivers/cpufreq/cpufreq_governor.h
+++ b/drivers/cpufreq/cpufreq_governor.h
@@ -209,8 +209,7 @@ struct common_dbs_data {
struct cpu_dbs_info *(*get_cpu_cdbs)(int cpu);
void *(*get_cpu_dbs_info_s)(int cpu);
- unsigned int (*gov_dbs_timer)(struct cpu_dbs_info *cdbs,
- struct dbs_data *dbs_data,
+ unsigned int (*gov_dbs_timer)(struct cpufreq_policy *policy,
bool modify_all);
void (*gov_check_cpu)(int cpu, unsigned int load);
int (*init)(struct dbs_data *dbs_data, bool notify);
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
index 08f2aa602f9e..fc0384b4d02d 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
@@ -191,10 +191,9 @@ static void od_check_cpu(int cpu, unsigned int load)
}
}
-static unsigned int od_dbs_timer(struct cpu_dbs_info *cdbs,
- struct dbs_data *dbs_data, bool modify_all)
+static unsigned int od_dbs_timer(struct cpufreq_policy *policy, bool modify_all)
{
- struct cpufreq_policy *policy = cdbs->shared->policy;
+ struct dbs_data *dbs_data = policy->governor_data;
unsigned int cpu = policy->cpu;
struct od_cpu_dbs_info_s *dbs_info = &per_cpu(od_cpu_dbs_info,
cpu);
--
2.6.2.198.g614a2ac
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH V2 3/6] cpufreq: governor: Pass policy as argument to ->gov_dbs_timer() Viresh Kumar <viresh.kumar@linaro.org> - 2015-12-03 05:10 +0100
csiph-web